Prechádzať zdrojové kódy

1.平台上涉及投保人名称的统一默认为:湖北远鹏众创空间科技有限公司;联系电话:13907216102。
2.投保人声明这里加上远鹏众创空间的电子签章,就是上面有两个电子签章:一个 是远鹏的,一个是客户的。
3.PICC录入保险服务费用发送微信通知。

zhengqiang 5 rokov pred
rodič
commit
f0cb95c248

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

@@ -154,17 +154,27 @@ public class InsurancePolicyController {
         return msgResult;
     }
 
-    @ApiOperation(value="更新用户")
+    @ApiOperation(value="更新保险信息")
     @PostMapping("update")
     public MessageResult<InsurancePolicy> update(@RequestBody InsurancePolicy insurancePolicy,@RequestAttribute String subject){
         MessageResult<InsurancePolicy> msgResult = new MessageResult<>();
 
         try {
+            InsurancePolicy srcPolicy = insurancePolicyService.get(insurancePolicy.getId());
+
             insurancePolicy.setUpdateBy(subject);
             insurancePolicy.setUpdateTime(new Date());
 
             int affectCount = insurancePolicyService.update(insurancePolicy);
 
+            //已出单
+            if (srcPolicy.getStatus().equals(String.valueOf(PolicyStatus.SendOutPolicy.getValue()))) {
+                //第一次录入金额
+                if (srcPolicy.getCommission()==null && insurancePolicy.getCommission()!=null){
+                    templateMessageService.sendTemplateMessage(insurancePolicy.getId(), PolicyStatus.SendOutPolicy, PolicyStatus.EntryCommission);
+                }
+            }
+
             if (affectCount > 0) {
                 msgResult.setResult(true);
                 msgResult.setData(insurancePolicy);

+ 3 - 0
picc-admin-server/src/main/resources/application-dev.yml

@@ -3,6 +3,9 @@ spring:
     url: jdbc:log4jdbc:mysql://192.168.33.20:3306/picc?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
     username: root
     password: jpsoft2016
+#    url: jdbc:log4jdbc:mysql://hbjpsoft.mysql.rds.aliyuncs.com:3306/picc?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#    username: picc
+#    password: picc@8121234
   devtools:
     add-properties: false
     restart:

+ 2 - 1
picc-common/src/main/java/com/jpsoft/picc/modules/base/service/impl/TemplateMessageServiceImpl.java

@@ -227,7 +227,8 @@ public class TemplateMessageServiceImpl implements TemplateMessageService {
 
 		jsonVars.put("content",content);
 		jsonVars.put("time", DateTime.now().toString("yyyy-MM-dd HH:mm"));
-		jsonVars.put("insuredName",insuranceApplication.getInsuredName());
+		jsonVars.put("insuredName",insuranceApplication.getInsuredName());  //投保人都是人才超市
+		jsonVars.put("companyName",companyName);  //增加显示被保险人企业名称
 		jsonVars.put("insuranceName",insuranceApplication.getDefinitionName());
 		jsonVars.put("duration",sdf.format(insurancePolicy.getStartTime()) + "至" + sdf.format(insurancePolicy.getEndTime()));
 

+ 2 - 1
picc-common/src/main/java/com/jpsoft/picc/modules/common/constant/PolicyStatus.java

@@ -9,10 +9,11 @@ public enum PolicyStatus {
     PendingTrial("人才超市核准",20),
     PendingRetrial("中国人保审核",30),
     PendingPay("待缴费",40),
-    NotifyInAdvance("提前通知",45),
+    NotifyInAdvance("保单生效前提前通知",45),
     PendingMakePolicy("待制单",50),
     PendingOutPolicy("待出单",60),
     SendOutPolicy("已出单",70),
+    EntryCommission("佣金录入",80),
     Expired("已过期",100);
 
     private int value;