Browse Source

Merge remote-tracking branch 'origin/master'

tomatozq 5 years ago
parent
commit
ef3105bc3c

+ 42 - 1
picc-admin-server/src/main/java/com/jpsoft/picc/modules/business/controller/InsurancePolicyController.java

@@ -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);

+ 29 - 17
picc-common/src/main/java/com/jpsoft/picc/modules/common/utils/ItextPDFUtil.java

@@ -274,31 +274,43 @@ public class ItextPDFUtil {
 
 
         table.addCell(PdfTable.createCell("二、承保信息", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
         table.addCell(PdfTable.createCell("二、承保信息", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
 
 
-        table.addCell(PdfTable.createCell("主险", textfont, Element.ALIGN_CENTER,2,7,BaseColor.WHITE,false));
+        table.addCell(PdfTable.createCell(insuranceApplication.getDefinitionName(), textfont, Element.ALIGN_CENTER,2,mapList.size()+1,BaseColor.WHITE,false));
 
 
         table.addCell(PdfTable.createCell("限额名称", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("限额名称", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("责任限额/免赔额", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("责任限额/免赔额", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("保险费(元)", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("保险费(元)", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
 
 
-        table.addCell(PdfTable.createCell("累计责任限额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(cumulativeValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(String.valueOf(insuranceApplication.getInsuranceFee()), textfont, Element.ALIGN_CENTER,1,6,BaseColor.WHITE,false));
 
 
-        table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,1,4,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(accidentValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
-
-        table.addCell(PdfTable.createCell("每人伤亡责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(casualtiesValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
-
-        table.addCell(PdfTable.createCell("每人医疗费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(medicalCareValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+        int n =0;
+        for (Map<String,Object> mapData : mapList){
+            table.addCell(PdfTable.createCell(mapData.get("name").toString(), textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
+            table.addCell(PdfTable.createCell(mapData.get("limit").toString()+mapData.get("unit"), textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+            n++;
+            if (n==1){
+                table.addCell(PdfTable.createCell(String.valueOf(insuranceApplication.getInsuranceFee()), textfont, Element.ALIGN_CENTER,1,mapList.size(),BaseColor.WHITE,false));
+            }
+        }
 
 
-        table.addCell(PdfTable.createCell("法律费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell(lawValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
 
 
-        table.addCell(PdfTable.createCell("每次事故每人医疗费用免赔额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
-        table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell("累计责任限额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(cumulativeValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(String.valueOf(insuranceApplication.getInsuranceFee()), textfont, Element.ALIGN_CENTER,1,6,BaseColor.WHITE,false));
+//
+//        table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,1,4,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(accidentValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//
+//        table.addCell(PdfTable.createCell("每人伤亡责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(casualtiesValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//
+//        table.addCell(PdfTable.createCell("每人医疗费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(medicalCareValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//
+//        table.addCell(PdfTable.createCell("法律费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell(lawValue, textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
+//
+//        table.addCell(PdfTable.createCell("每次事故每人医疗费用免赔额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
+//        table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
 
 
         table.addCell(PdfTable.createCell("附加险", textfont, Element.ALIGN_CENTER,2,4,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("附加险", textfont, Element.ALIGN_CENTER,2,4,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("□附加职业病责任保险", textfont, Element.ALIGN_LEFT,4,1,BaseColor.WHITE,false));
         table.addCell(PdfTable.createCell("□附加职业病责任保险", textfont, Element.ALIGN_LEFT,4,1,BaseColor.WHITE,false));