Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-smf-form
Commits
11defa9e
Unverified
Commit
11defa9e
authored
2 years ago
by
Mahesh Maney R
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #6 from UPHRH-platform/inspection-flow-changes
Inspection flow changes
parents
c1fe24ed
af3e4e1e
master
cvs_download
delete-form
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/com/tarento/formservice/controllers/FormsController.java
+1
-0
.../com/tarento/formservice/controllers/FormsController.java
src/main/java/com/tarento/formservice/model/IncomingData.java
+1
-1
...main/java/com/tarento/formservice/model/IncomingData.java
src/main/java/com/tarento/formservice/service/impl/FormsServiceImpl.java
+6
-9
...om/tarento/formservice/service/impl/FormsServiceImpl.java
with
8 additions
and
10 deletions
+8
-10
src/main/java/com/tarento/formservice/controllers/FormsController.java
+
1
−
0
View file @
11defa9e
...
...
@@ -288,6 +288,7 @@ public class FormsController {
String
validation
=
validationService
.
validateInspectionObject
(
incomingData
);
if
(
validation
.
equals
(
Constants
.
ResponseCodes
.
SUCCESS
))
{
IncomingData
inspectionData
=
new
IncomingData
();
inspectionData
.
setInspectionCompleted
(
incomingData
.
getInspectionCompleted
());
inspectionData
.
setInspectorDataObject
(
incomingData
);
inspectionData
.
setApplicationId
(
incomingData
.
getApplicationId
());
inspectionData
.
setInspectorSummaryDataObject
(
incomingData
.
getInspectorSummaryDataObject
());
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/formservice/model/IncomingData.java
+
1
−
1
View file @
11defa9e
...
...
@@ -33,6 +33,6 @@ public class IncomingData {
private
String
reviewedDate
;
private
String
inspectionDate
;
private
String
inspectionCompletedDate
;
private
Boolean
inspectionCompleted
;
private
Boolean
inspectionCompleted
=
Boolean
.
FALSE
;
}
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/formservice/service/impl/FormsServiceImpl.java
+
6
−
9
View file @
11defa9e
...
...
@@ -892,6 +892,7 @@ public class FormsServiceImpl implements FormsService {
@Override
public
Boolean
submitInspection
(
IncomingData
incomingData
,
UserInfo
userInfo
)
{
try
{
Boolean
inspectionCompleted
=
incomingData
.
getInspectionCompleted
();
Map
<
String
,
Object
>
applicationMap
=
getApplicationById
(
incomingData
.
getApplicationId
(),
userInfo
);
if
(
applicationMap
!=
null
)
{
IncomingData
applicationData
=
objectMapper
.
convertValue
(
applicationMap
,
IncomingData
.
class
);
...
...
@@ -902,7 +903,6 @@ public class FormsServiceImpl implements FormsService {
// update assignee inspection status in data object
Boolean
isLeadIns
=
Boolean
.
FALSE
;
Boolean
inspectionCompleted
=
Boolean
.
TRUE
;
if
(
applicationData
!=
null
&&
applicationData
.
getInspection
()
!=
null
&&
applicationData
.
getInspection
().
getAssignedTo
()
!=
null
)
{
...
...
@@ -916,17 +916,14 @@ public class FormsServiceImpl implements FormsService {
}
assignee
.
setConsentDate
(
DateUtils
.
getYyyyMmDdInUTC
());
}
else
if
(
StringUtils
.
isBlank
(
assignee
.
getStatus
()))
{
}
/*
else if (StringUtils.isBlank(assignee.getStatus())) {
inspectionCompleted = Boolean.FALSE;
}
}
*/
}
}
if
(
incomingData
.
getInspectionCompleted
())
{
inspectionCompleted
=
Boolean
.
TRUE
;
}
// allow only lead inspector to submit inspection details
if
(
isLeadIns
)
{
//
if (isLeadIns) {
incomingData
.
setInspection
(
applicationData
.
getInspection
());
incomingData
.
setInspectionDate
(
DateUtils
.
getYyyyMmDdInUTC
());
incomingData
.
getInspection
().
setInspectionDate
(
DateUtils
.
getYyyyMmDdInUTC
());
...
...
@@ -949,7 +946,7 @@ public class FormsServiceImpl implements FormsService {
inspectionCompleted
?
Constants
.
WorkflowActions
.
COMPLETED_INSPECTION
:
Constants
.
WorkflowActions
.
LEAD_INSPECTION_COMPLETED
);
return
response
;
}
//
}
}
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
String
.
format
(
Constants
.
EXCEPTION
,
"submitInspection"
,
e
.
getMessage
()));
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets