|
@@ -624,7 +624,48 @@ public class InsurancePolicyController {
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
|
|
- private Integer approval(String applicationId,String policyId,String processStatus,String opinion,String status,String subject){
|
|
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value="回退转单通用")
|
|
|
|
+ @RequestMapping(value = "rollbackOrder",method = RequestMethod.POST)
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name="applicationId",value = "投保单ID",required = true,paramType = "query"),
|
|
|
|
+ @ApiImplicitParam(name="policyId",value = "每月投保单ID",required = true,paramType = "query")
|
|
|
|
+ })
|
|
|
|
+ public MessageResult<Integer> rollbackOrder(String applicationId,String policyId, @RequestAttribute String subject){
|
|
|
|
+ //当前用户ID
|
|
|
|
+ System.out.println(subject);
|
|
|
|
+
|
|
|
|
+ MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+
|
|
|
|
+ InsurancePolicy insurancePolicy = insurancePolicyService.get(policyId);
|
|
|
|
+
|
|
|
|
+ PolicyStatus srcPolicyStatus = PolicyStatus.valueOf(Integer.valueOf(insurancePolicy.getStatus()));
|
|
|
|
+
|
|
|
|
+ PolicyStatus destPolicyStatus = PolicyStatus.PendingTrial;
|
|
|
|
+
|
|
|
|
+ int affectCount = approval(applicationId, policyId, "回退", "", destPolicyStatus.getValue() + "", subject);
|
|
|
|
+
|
|
|
|
+ //发送微信通知
|
|
|
|
+ templateMessageService.sendTemplateMessage(policyId, srcPolicyStatus, destPolicyStatus);
|
|
|
|
+
|
|
|
|
+ msgResult.setResult(true);
|
|
|
|
+ msgResult.setData(affectCount);
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex){
|
|
|
|
+ logger.error(ex.getMessage(),ex);
|
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return msgResult;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private Integer approval(String applicationId,String policyId,String processStatus,String opinion,String status,String subject){
|
|
int affectCount = 0;
|
|
int affectCount = 0;
|
|
|
|
|
|
InsuranceApplication insuranceApplication = insuranceApplicationService.get(applicationId);
|
|
InsuranceApplication insuranceApplication = insuranceApplicationService.get(applicationId);
|