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
c1fe24ed
Unverified
Commit
c1fe24ed
authored
2 years ago
by
Mahesh Maney R
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #5 from UPHRH-platform/inspection-flow-changes
inspection-flow-change
parents
b18f38e2
d627c170
master
cvs_download
delete-form
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/com/tarento/formservice/model/IncomingData.java
+1
-0
...main/java/com/tarento/formservice/model/IncomingData.java
src/main/java/com/tarento/formservice/service/impl/FormsServiceImpl.java
+16
-0
...om/tarento/formservice/service/impl/FormsServiceImpl.java
with
17 additions
and
0 deletions
+17
-0
src/main/java/com/tarento/formservice/model/IncomingData.java
+
1
−
0
View file @
c1fe24ed
...
...
@@ -33,5 +33,6 @@ public class IncomingData {
private
String
reviewedDate
;
private
String
inspectionDate
;
private
String
inspectionCompletedDate
;
private
Boolean
inspectionCompleted
;
}
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/formservice/service/impl/FormsServiceImpl.java
+
16
−
0
View file @
c1fe24ed
...
...
@@ -903,6 +903,7 @@ 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
)
{
for
(
Assignee
assignee
:
applicationData
.
getInspection
().
getAssignedTo
())
{
...
...
@@ -910,19 +911,34 @@ public class FormsServiceImpl implements FormsService {
&&
assignee
.
getLeadInspector
())
{
isLeadIns
=
Boolean
.
TRUE
;
assignee
.
setStatus
(
workflowDto
.
getNextState
());
if
(
incomingData
.
getInspectionCompleted
())
{
assignee
.
setStatus
(
Constants
.
WorkflowActions
.
COMPLETED_INSPECTION
);
}
assignee
.
setConsentDate
(
DateUtils
.
getYyyyMmDdInUTC
());
}
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
)
{
incomingData
.
setInspection
(
applicationData
.
getInspection
());
incomingData
.
setInspectionDate
(
DateUtils
.
getYyyyMmDdInUTC
());
incomingData
.
getInspection
().
setInspectionDate
(
DateUtils
.
getYyyyMmDdInUTC
());
/*
String nextStatus = inspectionCompleted ? workflowDto.getNextState()
: Status.LEADINSCOMPLETED.name();
*/
String
nextStatus
=
inspectionCompleted
?
Status
.
INSCOMPLETED
.
name
()
:
Status
.
LEADINSCOMPLETED
.
name
();
incomingData
.
getInspection
().
setStatus
(
nextStatus
);
if
(
inspectionCompleted
)
{
incomingData
.
setStatus
(
workflowDto
.
getNextState
());
...
...
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