|
@@ -320,7 +320,16 @@ public class InsurancePolicyController {
|
|
|
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
- String status = String.valueOf(PolicyStatus.PendingRetrial.getValue());
|
|
|
+ String status ="";
|
|
|
+
|
|
|
+ if(processStatus.equals("正常")){
|
|
|
+ //30
|
|
|
+ status = String.valueOf(PolicyStatus.PendingRetrial.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ //15
|
|
|
+ status = String.valueOf(PolicyStatus.Back.getValue());
|
|
|
+ }
|
|
|
|
|
|
int affectCount = approval(applicationId,policyId,processStatus,opinion,status ,subject);
|
|
|
|
|
@@ -346,7 +355,16 @@ public class InsurancePolicyController {
|
|
|
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
- String status = String.valueOf(PolicyStatus.PendingPay.getValue());
|
|
|
+ String status ="";
|
|
|
+
|
|
|
+ if(processStatus.equals("正常")){
|
|
|
+ //40
|
|
|
+ status = String.valueOf(PolicyStatus.PendingPay.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ //20
|
|
|
+ status = String.valueOf(PolicyStatus.PendingTrial.getValue());
|
|
|
+ }
|
|
|
|
|
|
int affectCount = approval(applicationId,policyId,processStatus,opinion,status ,subject);
|
|
|
|
|
@@ -363,25 +381,43 @@ public class InsurancePolicyController {
|
|
|
@ApiImplicitParam(name="applicationId",value = "投保单ID",required = true,paramType = "query"),
|
|
|
@ApiImplicitParam(name="policyId",value = "每月投保单ID",required = true,paramType = "query"),
|
|
|
@ApiImplicitParam(name="processStatus",value = "流程审核状态(正常/回退)",required = true,paramType = "query"),
|
|
|
- @ApiImplicitParam(name="opinion",value = "意见",required = true,paramType = "query")
|
|
|
+ @ApiImplicitParam(name="opinion",value = "意见",required = true,paramType = "query"),
|
|
|
+ @ApiImplicitParam(name="insurancePolicyFile",value = "投保单附件",required = true,paramType = "query")
|
|
|
})
|
|
|
- public MessageResult<Integer> issued(String applicationId,String policyId,String processStatus,String opinion,@RequestAttribute String subject){
|
|
|
+ public MessageResult<Integer> issued(String applicationId,String policyId,String processStatus,String opinion,String insurancePolicyFile,@RequestAttribute String subject){
|
|
|
|
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
|
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
- String status = String.valueOf(PolicyStatus.SendOutPolicy.getValue());
|
|
|
+ String status ="";
|
|
|
+
|
|
|
+ if(processStatus.equals("正常")){
|
|
|
+ //70
|
|
|
+ status = String.valueOf(PolicyStatus.SendOutPolicy.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ //50
|
|
|
+ status = String.valueOf(PolicyStatus.PendingMakePolicy.getValue());
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(insurancePolicyFile)){
|
|
|
+
|
|
|
+ InsurancePolicy insurancePolicy = insurancePolicyService.get(policyId);
|
|
|
+
|
|
|
+ insurancePolicy.setInsurancePolicyFile(insurancePolicyFile);
|
|
|
+
|
|
|
+ insurancePolicyService.update(insurancePolicy);
|
|
|
+ }
|
|
|
|
|
|
int affectCount = approval(applicationId,policyId,processStatus,opinion,status ,subject);
|
|
|
|
|
|
boolean flag = false;
|
|
|
String msg = "";
|
|
|
|
|
|
- if(affectCount>0){
|
|
|
+ if(affectCount > 0 && processStatus.equals("正常")){
|
|
|
//生成下月投保单
|
|
|
-
|
|
|
try {
|
|
|
generatePolicyInTrans(applicationId, policyId, subject);
|
|
|
flag = true;
|
|
@@ -416,7 +452,16 @@ public class InsurancePolicyController {
|
|
|
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
- String status = String.valueOf(PolicyStatus.PendingMakePolicy.getValue());
|
|
|
+ String status ="";
|
|
|
+
|
|
|
+ if(processStatus.equals("正常")){
|
|
|
+ //50
|
|
|
+ status = String.valueOf(PolicyStatus.PendingMakePolicy.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ //30
|
|
|
+ status = String.valueOf(PolicyStatus.PendingRetrial.getValue());
|
|
|
+ }
|
|
|
|
|
|
int affectCount = approval(applicationId,policyId,processStatus,opinion,status ,subject);
|
|
|
|
|
@@ -448,7 +493,16 @@ public class InsurancePolicyController {
|
|
|
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
- String status = String.valueOf(PolicyStatus.PendingOutPolicy.getValue());
|
|
|
+ String status ="";
|
|
|
+
|
|
|
+ if(processStatus.equals("正常")){
|
|
|
+ //60
|
|
|
+ status = String.valueOf(PolicyStatus.PendingOutPolicy.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ //40
|
|
|
+ status = String.valueOf(PolicyStatus.PendingPay.getValue());
|
|
|
+ }
|
|
|
|
|
|
InsurancePolicy item = insurancePolicyService.get(policyId);
|
|
|
|