소스 검색

Merge branch 'feature-2022.07.29' of https://git.flowbb.cn/RK-Dev/fqgz-server into feature-2022.07.29

humuyu 3 년 전
부모
커밋
c11af68bd0

+ 48 - 0
eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java

@@ -16,6 +16,7 @@
 
 package me.zhengjie.utils;
 
+import java.text.SimpleDateFormat;
 import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.util.Date;
@@ -29,6 +30,9 @@ public class DateUtil {
 
     public static final DateTimeFormatter DFY_MD_HMS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
     public static final DateTimeFormatter DFY_MD = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+    public static final String FORMAT_YEAR_WITH_CHINESE_SEPARATOR = "yyyy年";
+    public static final String FORMAT_MONTH_WITH_CHINESE_SEPARATOR_AND_NO_ZERO_FILLED = "yyyy年M月";
+    public static final String FORMAT_DATE_WITH_CHINESE_SEPARATOR_AND_NO_ZERO_FILLED = "yyyy年M月d日";
 
     /**
      * LocalDateTime 转时间戳
@@ -157,4 +161,48 @@ public class DateUtil {
     public static LocalDateTime parseLocalDateTimeFormatyMdHms(String localDateTime) {
         return LocalDateTime.from(DFY_MD_HMS.parse(localDateTime));
     }
+
+    /**
+     * 将日期格式化成用中文分割符表示的年份
+     *
+     * @param date
+     * @return
+     */
+    public static String formatYearWithChineseSeparator(Date date) {
+        SimpleDateFormat destDateFormat = new SimpleDateFormat(FORMAT_YEAR_WITH_CHINESE_SEPARATOR);
+        return destDateFormat.format(date);
+    }
+
+    /**
+     * 原格式字符日期转换成目标格式字符日期
+     *
+     * @param date
+     * @param srcFormat
+     * @return
+     * @throws Exception
+     */
+    public static String formatDateWithChineseSeparatorAndNoZeroFilled(String date, String srcFormat) throws Exception {
+        SimpleDateFormat srcDateFormat = new SimpleDateFormat(srcFormat);
+        SimpleDateFormat destDateFormat = new SimpleDateFormat(FORMAT_DATE_WITH_CHINESE_SEPARATOR_AND_NO_ZERO_FILLED);
+        return destDateFormat.format(srcDateFormat.parse(date));
+    }
+
+    /**
+     * 将指定日期转换成目标格式字符串
+     *
+     * @param date
+     * @return
+     */
+    public static String formatDateWithChineseSeparatorAndNoZeroFilled(Date date) {
+        SimpleDateFormat destDateFormat = new SimpleDateFormat(FORMAT_DATE_WITH_CHINESE_SEPARATOR_AND_NO_ZERO_FILLED);
+        return destDateFormat.format(date);
+    }
+
+    public static void main(String[] args) {
+        try {
+            System.out.println(formatDateWithChineseSeparatorAndNoZeroFilled("1989-11-02", "yyyy-MM-dd"));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
 }

+ 11 - 119
eladmin-system/src/main/java/me/zhengjie/application/admin/controller/AdminNoteVideoController.java

@@ -1,13 +1,17 @@
 package me.zhengjie.application.admin.controller;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.tencentcloudapi.common.exception.TencentCloudSDKException;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.annotation.rest.AnonymousPostMapping;
 import me.zhengjie.base.AppBaseResponse;
 import me.zhengjie.base.sms.CreateCloudRecording;
 import me.zhengjie.base.sms.TrtcVo;
+import me.zhengjie.base.util.DownloadUtils;
+import me.zhengjie.dao.mybatis.entity.OrderRoomIdEntity;
+import me.zhengjie.dao.mybatis.mapper.OrderRoomIdMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Controller;
@@ -15,17 +19,9 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-
-import lombok.RequiredArgsConstructor;
-import me.zhengjie.annotation.rest.AnonymousPostMapping;
-import me.zhengjie.base.util.DownloadUtils;
-import me.zhengjie.dao.mybatis.entity.OrderRoomIdEntity;
-import me.zhengjie.dao.mybatis.entity.PushDataEntity;
-import me.zhengjie.dao.mybatis.mapper.OrderRoomIdMapper;
-import me.zhengjie.dao.mybatis.mapper.PushDataMapper;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Controller
 @RequiredArgsConstructor
@@ -33,85 +29,8 @@ import me.zhengjie.dao.mybatis.mapper.PushDataMapper;
 public class AdminNoteVideoController {
 
 	private static final Logger log = LoggerFactory.getLogger(AdminNoteVideoController.class);
-	private final PushDataMapper pushDataMapper;
 	private final OrderRoomIdMapper orderRoomIdMapper;
 
-	@AnonymousPostMapping("/tencentpush")
-	@ResponseBody
-	public Map<String, Object> tencentpush(@RequestBody Map<String, String> json) throws Exception {
-
-		log.info("推送信息:" + JSON.toJSON(json));
-
-		String channelId = json.get("channel_id");
-
-		if (channelId.contains("share")) {
-			log.info("pc端的推送信息:" + JSON.toJSON(json));
-			// 转成json形式
-			Map<String, String> map = split(json.get("stream_param"));
-			String fileId = (String) json.get("file_id");
-			PushDataEntity pushData = new PushDataEntity();
-			pushData.setFileId(fileId);
-			pushData.setPushType("pc");
-			pushData.setTypeName(json.get("appname"));
-			pushData.setData(JSON.toJSONString(json));
-			pushData.setPath(json.get("video_url"));
-			pushDataMapper.insert(pushData);
-			// 文件fileId
-			String roomId = map.get("groupid");
-			QueryWrapper<OrderRoomIdEntity> orderRoomQuery = new QueryWrapper<>();
-			orderRoomQuery.eq("roomId", roomId);
-			orderRoomQuery.orderByDesc("create_time");
-			List<OrderRoomIdEntity> orderRoomId = orderRoomIdMapper.selectList(orderRoomQuery);
-			// 这里通过订单查询相关信息
-			if (orderRoomId != null && orderRoomId.size() > 0) {
-				OrderRoomIdEntity orderRoomIdEntity = orderRoomId.get(0);
-				String filePath = orderRoomIdEntity.getBusinessNo();
-				String fileName = filePath + "/PC" + fileId + ".mp4";
-				DownloadUtils.downloadFile(json.get("video_url"), fileName);
-				OrderRoomIdEntity update = new OrderRoomIdEntity();
-				update.setPcFileId(fileId);
-				update.setPcVideoUrl(fileName);
-				update.setId(orderRoomIdEntity.getId());
-				orderRoomIdMapper.updateById(update);
-			}
-		}
-		if (channelId.contains("aux")) {
-			log.info("app的视频推送:" + JSON.toJSON(json));
-			Map<String, String> map = split(json.get("stream_param"));
-			// 转成json形式
-			String fileId = (String) json.get("file_id");
-			PushDataEntity pushData = new PushDataEntity();
-			pushData.setFileId(fileId);
-			pushData.setPushType("pc");
-			pushData.setTypeName(json.get("appname"));
-			pushData.setData(JSON.toJSONString(json));
-			pushData.setPath(json.get("video_url"));
-			pushDataMapper.insert(pushData);
-			// 文件fileId
-			String roomId = map.get("groupid");
-			QueryWrapper<OrderRoomIdEntity> orderRoomQuery = new QueryWrapper<>();
-			orderRoomQuery.eq("roomId", roomId);
-			orderRoomQuery.orderByDesc("create_time");
-			List<OrderRoomIdEntity> orderRoomId = orderRoomIdMapper.selectList(orderRoomQuery);
-			// 这里通过订单查询相关信息
-			if (orderRoomId != null && orderRoomId.size() > 0) {
-				OrderRoomIdEntity orderRoomIdEntity = orderRoomId.get(0);
-				String filePath = orderRoomIdEntity.getBusinessNo();
-				String fileName = filePath + "/APP" + fileId + ".mp4";
-				DownloadUtils.downloadFile(json.get("video_url"), fileName);
-				OrderRoomIdEntity update = new OrderRoomIdEntity();
-				update.setAppFileId(fileId);
-				update.setAppVideoUrl(fileName);
-				update.setId(orderRoomIdEntity.getId());
-				orderRoomIdMapper.updateById(update);
-			}
-		}
-		Map<String, Object> result = new HashMap<>();
-		result.put("success", true);
-		result.put("code", 200);
-		return result;
-	}
-
 	/**
 	 * 录制PC端面谈笔录视频
 	 *
@@ -203,31 +122,4 @@ public class AdminNoteVideoController {
 		result.put("code", 200);
 		return result;
 	}
-
-	/**
-	 * @param urlparam 带分隔的url参数
-	 * @return
-	 */
-	private Map<String, String> split(String urlparam) {
-		Map<String, String> map = new HashMap<String, String>();
-		String[] param = urlparam.split("&");
-		for (String keyvalue : param) {
-			String[] pair = keyvalue.split("=");
-			if (pair.length == 2) {
-				map.put(pair[0], pair[1]);
-			}
-		}
-		return map;
-	}
-
-	@AnonymousPostMapping(value = "/uploadToken", produces = "text/plain")
-	@ResponseBody
-	public String uploadToken(String auth_token) throws Exception {
-
-		return "ok";
-	}
-
-	public static void main(String[] args) {
-		System.out.println("app_166375560_1663755604877".startsWith("app"));
-	}
 }

+ 3 - 2
eladmin-system/src/main/java/me/zhengjie/application/user/app/mq/WebSocketReceiver.java

@@ -89,12 +89,13 @@ public class WebSocketReceiver implements MessageListener {
 						obj = new JSONObject();
 						obj.put("socketId", socketId);
 						obj.put("orderId", orderId);
+						obj.put("businessNo", businessNo);
 						obj.put("customerName", sysUser.getNickName());
 						obj.put("borrowerName", notaryOrder.getName());
 						obj.put("consultNo", notaryOrder.getConsultNo());
 						obj.put("bankName", notaryOrder.getBankName());
-						obj.put("appUserId",appUserId);
-						obj.put("taskId",taskId);
+						obj.put("appUserId", appUserId);
+						obj.put("taskId", taskId);
 						log.info("socket数据的推送给页面:" + notaryId);
 						AppSocketServer.sendInfo(webSocket, obj.toString(), userDto.getUsername());
 					}

+ 50 - 58
eladmin-system/src/main/java/me/zhengjie/domain/model/ModelSynthesizerDomain.java

@@ -13,6 +13,7 @@ import me.zhengjie.dao.mybatis.ContractOrderRepository;
 import me.zhengjie.dao.mybatis.entity.*;
 import me.zhengjie.dao.mybatis.mapper.*;
 import me.zhengjie.domain.order.OrderConstant;
+import me.zhengjie.utils.DateUtil;
 import org.apache.commons.io.IOUtils;
 import org.springframework.stereotype.Component;
 
@@ -95,33 +96,29 @@ public class ModelSynthesizerDomain {
         map.put("$NotaryOffice$", notaryOffice.getName());
         // 当事人信息
         try {
-            SimpleDateFormat yearFormatter = new SimpleDateFormat("yyyy");
             SimpleDateFormat monthformatter = new SimpleDateFormat("yyyy-MM");
             Date beginDate = monthformatter.parse(contractOrderEntity.getStartDate());
             Date endDate = monthformatter.parse(contractOrderEntity.getEndDate());
             Integer months = DateUtils.getDiffNaturalMonth(endDate, beginDate);
-            map.put("$Year$", yearFormatter.format(new Date()));
+            map.put("$Year$", DateUtil.formatYearWithChineseSeparator(new Date()));
             map.put("$Name$", contractOrderEntity.getName());
             map.put("$Sex$", "1".equals(contractOrderEntity.getSex()) ? "男" : "女");
-            map.put("$Birthdday$", contractOrderEntity.getBirth());
+            map.put("$Birthdday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getBirth(), "yyyy/M/d"));
             map.put("$Phone$",contractOrderEntity.getPhone());
             map.put("$Addr$",contractOrderEntity.getResidence());
             map.put("$IDNo$", contractOrderEntity.getIdCard());
             map.put("$LoanRate$", contractOrderEntity.getRate());
-            map.put("$Term$", contractOrderEntity.getStartDate().concat(" - ").concat(contractOrderEntity.getEndDate()));
+            map.put("$Term$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getStartDate(), "yyyy-MM-dd").concat(" - ").concat(DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getEndDate(), "yyyy-MM-dd")));
             map.put("$TotalMonth$", months.toString());
         } catch (Exception e) {
             e.printStackTrace();
         }
         // 客户经理
         try {
-            SimpleDateFormat dateSrcFormatter = new SimpleDateFormat("yyyyMMdd");
-            SimpleDateFormat dateDestFormatter = new SimpleDateFormat("yyyy/MM/dd");
             SysUserEntity customer = sysUserMapper.selectById(contractOrderEntity.getCustomerId());
-            Date date = dateSrcFormatter.parse(customer.getIdCard().substring(6, 14));
             map.put("$PBName$", customer.getNickName());
             map.put("$PBSex$", customer.getGender());
-            map.put("$PBBirthday$", dateDestFormatter.format(date));
+            map.put("$PBBirthday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(customer.getIdCard().substring(6, 14), "yyyyMMdd"));
             map.put("$PBIDNo$", customer.getIdCard());
             map.put("$PBPhone$", customer.getPhone());
         } catch (Exception e) {
@@ -132,10 +129,9 @@ public class ModelSynthesizerDomain {
         map.put("$Bank$", bankEntity.getBankName());
         map.put("$BankAddr$", bankEntity.getAddress());
         map.put("$BankLeader$", bankEntity.getPrincipal());
-        map.put("$BankPhone",bankEntity.getPhone());
+        map.put("$BankPhone", bankEntity.getPhone());
         // 其他信息
-        SimpleDateFormat dayFormatter = new SimpleDateFormat("yyyy-MM-dd");
-        map.put("$Date$", dayFormatter.format(new Date()));
+        map.put("$Date$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(new Date()));
         return map;
     }
 
@@ -155,9 +151,8 @@ public class ModelSynthesizerDomain {
             htmlContent = htmlContent.concat("<li class=\"question\">问:").concat(noteDto.getQuestion()).concat("</li>")
                     .concat("<li class=\"answer\">答:").concat(noteDto.getAnswer()).concat("</li>");
         }
-        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
         htmlContent = modelContent.replace("${QuestionAnswerList}", htmlContent).replace("${yyyyMMdd}",
-                formatter.format(new Date())).replace("${NotaryUserName}", userName).replace("${QueryUsers}", composeNotePartyList(businessNo));
+                DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(new Date())).replace("${NotaryUserName}", userName).replace("${QueryUsers}", composeNotePartyList(businessNo));
         return htmlContent;
     }
 
@@ -203,8 +198,6 @@ public class ModelSynthesizerDomain {
      */
     private List<Map<String, String>> prepareNotePartyTemplateData(ContractOrderEntity order) {
         List<Map<String, String>> userList = new ArrayList<>();
-        SimpleDateFormat dateSrcFormatter = new SimpleDateFormat("yyyyMMdd");
-        SimpleDateFormat dateDestFormatter = new SimpleDateFormat("yyyy/MM/dd");
         try {
             // 客户经理
             SysUserEntity user = sysUserMapper.selectById(order.getCustomerId());
@@ -212,7 +205,7 @@ public class ModelSynthesizerDomain {
             customerMap.put("$Title$", "委托代理人");
             customerMap.put("$Name$", user.getNickName());
             customerMap.put("$Sex$", user.getGender());
-            customerMap.put("$Birth$", dateDestFormatter.format(dateSrcFormatter.parse(user.getIdCard().substring(6, 14))));
+            customerMap.put("$Birth$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(user.getIdCard().substring(6, 14), "yyyyMMdd"));
             customerMap.put("$IdCard$", user.getIdCard());
             customerMap.put("$Phone$", user.getPhone());
             userList.add(customerMap);
@@ -233,7 +226,7 @@ public class ModelSynthesizerDomain {
             }
             partyMap.put("$Name$", order.getName());
             partyMap.put("$Sex$", "1".equals(order.getSex()) ? "男" : "女");
-            partyMap.put("$Birth$", order.getBirth());
+            partyMap.put("$Birth$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(order.getBirth(), "yyyy/M/d"));
             partyMap.put("$IdCard$", order.getIdCard());
             partyMap.put("$Phone$", order.getPhone());
             userList.add(partyMap);
@@ -255,7 +248,7 @@ public class ModelSynthesizerDomain {
                 }
                 jointMap.put("$Name$", order.getJointName());
                 jointMap.put("$Sex$", "1".equals(order.getJointSex()) ? "男" : "女");
-                jointMap.put("$Birth$", dateDestFormatter.format(dateSrcFormatter.parse(order.getJointIdCard().substring(6, 14))));
+                jointMap.put("$Birth$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(order.getJointIdCard().substring(6, 14), "yyyyMMdd"));
                 jointMap.put("$IdCard$", order.getJointIdCard());
                 jointMap.put("$Phone$", order.getJointPhone());
                 userList.add(jointMap);
@@ -275,7 +268,7 @@ public class ModelSynthesizerDomain {
     public Map<String, String> prepareNoteTemplateData(String businessNo) {
         Map<String, String> noteValue = new HashMap<String, String>();
         // 设置默认值
-        noteValue.put("$Date$", DateUtils.date2String(new Date(), 1));
+        noteValue.put("$Date$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(new Date()));
         noteValue.put("$Dissent$", "无异议");
         noteValue.put("$Voluntarily$", "是");
         noteValue.put("$Know$", "知道");
@@ -288,17 +281,21 @@ public class ModelSynthesizerDomain {
         noteValue.put("$NotaryOffice$", entity.getName());
         // 设置主订单参数
         ContractOrderEntity contractOrderEntity = contractOrderRepository.getContractOrderWithBizNo(businessNo);
-        noteValue.put("$Bank$", contractOrderEntity.getBankName());
-        noteValue.put("$Name$", contractOrderEntity.getName());
-        noteValue.put("$Birthday$", contractOrderEntity.getBirth());
-        noteValue.put("$IDNo$", contractOrderEntity.getIdCard());
-        noteValue.put("$Phone$", contractOrderEntity.getPhone());
-        noteValue.put("$Sex$", "1".equals(contractOrderEntity.getSex()) ? "男" : "女");
-        noteValue.put("$Addr$", contractOrderEntity.getResidence());
-        noteValue.put("$Amounts$", contractOrderEntity.getContractMoney());
-        noteValue.put("$Term$", contractOrderEntity.getStartDate() + "~" + contractOrderEntity.getEndDate());
-        noteValue.put("$LoanRate$", contractOrderEntity.getRate());
-        noteValue.put("$McontractNO$",contractOrderEntity.getMainContractNo());
+        try {
+            noteValue.put("$Bank$", contractOrderEntity.getBankName());
+            noteValue.put("$Name$", contractOrderEntity.getName());
+            noteValue.put("$Birthday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getBirth(), "yyyy/M/d"));
+            noteValue.put("$IDNo$", contractOrderEntity.getIdCard());
+            noteValue.put("$Phone$", contractOrderEntity.getPhone());
+            noteValue.put("$Sex$", "1".equals(contractOrderEntity.getSex()) ? "男" : "女");
+            noteValue.put("$Addr$", contractOrderEntity.getResidence());
+            noteValue.put("$Amounts$", contractOrderEntity.getContractMoney());
+            noteValue.put("$Term$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getStartDate(), "yyyy-MM-dd") + "~" + DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getEndDate(), "yyyy-MM-dd"));
+            noteValue.put("$LoanRate$", contractOrderEntity.getRate());
+            noteValue.put("$McontractNO$", contractOrderEntity.getMainContractNo());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
         // 抵押合同需要补充借款合同中借款人信息
         if (contractOrderEntity.getContractType() == OrderConstant.CONTRACT_TYPE_MORTGAGE || contractOrderEntity.getContractType() == OrderConstant.CONTRACT_TYPE_GUARANTEE) {
             ContractOrderEntity mainOrder = contractOrderRepository.getEntityWithContractNo(contractOrderEntity.getBankId(), contractOrderEntity.getProdId(), contractOrderEntity.getMainContractNo());
@@ -323,15 +320,13 @@ public class ModelSynthesizerDomain {
         noteValue.put("$BankAddr$", bank.getAddress());
         noteValue.put("$BankLeader$", bank.getPrincipal());
         noteValue.put("$BankPhone$", bank.getPhone());
+        // 准备客户经理信息
         try {
-            // 准备客户经理信息
-            SimpleDateFormat dateSrcFormatter = new SimpleDateFormat("yyyyMMdd");
-            SimpleDateFormat dateDestFormatter = new SimpleDateFormat("yyyy/MM/dd");
             SysUserEntity customer = sysUserMapper.selectById(contractOrderEntity.getCustomerId());
             noteValue.put("$PBName$", customer.getNickName());
             noteValue.put("$PBSex$", customer.getGender());
             noteValue.put("$PBPhone$", customer.getPhone());
-            noteValue.put("$PBBirthday$", dateDestFormatter.format(dateSrcFormatter.parse(customer.getIdCard().substring(6, 14))));
+            noteValue.put("$PBBirthday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(customer.getIdCard().substring(6, 14), "yyyyMMdd"));
             noteValue.put("$PBIDNo$", customer.getIdCard());
         } catch (Exception e) {
             e.printStackTrace();
@@ -381,35 +376,32 @@ public class ModelSynthesizerDomain {
         //
         Map<String, String> map = new HashMap<>();
         map.put("$Greffier$", userName);
-        map.put("$Date$", DateUtils.date2String(new Date(), 1));
-        map.put("$AcceptedNO$", contractOrderEntity.getConsultNo());
-        map.put("$BusinessOrderNo$", contractOrderEntity.getBusinessNo());
-        map.put("$Name$", contractOrderEntity.getName());
-        map.put("$Sex$", StatusEnum.SexStatusEnum.getValue(contractOrderEntity.getSex()));
-        map.put("$Birthday$", contractOrderEntity.getBirth());
-        map.put("$Addr$", contractOrderEntity.getResidence());
-        map.put("$IDNo$", contractOrderEntity.getIdCard());
-        map.put("$Phone$", contractOrderEntity.getPhone());
-        if (contractOrderEntity.getJointFlag() == 1) {
-            try {
-                SimpleDateFormat dateSrcFormatter = new SimpleDateFormat("yyyyMMdd");
-                SimpleDateFormat dateDestFormatter = new SimpleDateFormat("yyyy/MM/dd");
-                Date date = dateSrcFormatter.parse(contractOrderEntity.getIdCard().substring(6, 14));
+        map.put("$Date$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(new Date()));
+        // 准备订单信息
+        try {
+            map.put("$AcceptedNO$", contractOrderEntity.getConsultNo());
+            map.put("$BusinessOrderNo$", contractOrderEntity.getBusinessNo());
+            map.put("$Name$", contractOrderEntity.getName());
+            map.put("$Sex$", StatusEnum.SexStatusEnum.getValue(contractOrderEntity.getSex()));
+            map.put("$Birthday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getBirth(), "yyyy/M/d"));
+            map.put("$Addr$", contractOrderEntity.getResidence());
+            map.put("$IDNo$", contractOrderEntity.getIdCard());
+            map.put("$Phone$", contractOrderEntity.getPhone());
+            if (contractOrderEntity.getJointFlag() == 1) {
                 map.put("$MateName$", contractOrderEntity.getJointName());
                 map.put("$MateSex$", StatusEnum.SexStatusEnum.getValue(contractOrderEntity.getJointSex()));
-                map.put("$MateBirthday$", dateDestFormatter.format(date));
+                map.put("$MateBirthday$", DateUtil.formatDateWithChineseSeparatorAndNoZeroFilled(contractOrderEntity.getIdCard().substring(6, 14), "yyyyMMdd"));
                 map.put("$MateAddr$", contractOrderEntity.getJointResidence());
                 map.put("$MatePhone$", contractOrderEntity.getJointPhone());
-
-            } catch (Exception e) {
-                e.printStackTrace();
+            } else {
+                map.put("$MateName$", "无");
+                map.put("$MateSex$", "无");
+                map.put("$MateBirthday$", "无");
+                map.put("$MateAddr$", "无");
+                map.put("$MatePhone$", "无");
             }
-        } else {
-            map.put("$MateName$", "无");
-            map.put("$MateSex$", "无");
-            map.put("$MateBirthday$", "无");
-            map.put("$MateAddr$", "无");
-            map.put("$MatePhone$", "无");
+        } catch (Exception e) {
+            e.printStackTrace();
         }
         // 准备银行信息
         BankEntity bank = bankMapper.selectById(contractOrderEntity.getBankId());

+ 2 - 2
eladmin-system/src/main/resources/config/application-prod.yml

@@ -179,8 +179,8 @@ tencent:
     secret: pzFuoHgzUWHKw01XT0H7FIMDMf0a58JsTP31gE1hpP5T5uY1RfyAGftROvAiMery
     keyLicence: CXBS6ZUHLqfjMWlJ8gK5qI9s/RCe+PTtWueoddT7VJol717t0cHdeKhRaocOw+bpzZUZmIcCCIJ/Vtjo0mSn20YalgSlhbw4y1sunC903hFewJfs1fd3EP3+5trx7gicdvUdCfXTbxRizh1wtTDN04W4pJx62g1sO98XyAWF5mWNTCECObvKiDJdNqcXJKl0Dht9jtc5JojGPFPXYBAuN0manuUxpSwl5wq1H/OOhZ9RrklAqFxie4Z5r4PhEbiBKE6FAgwCNcE4NKNbk7Tr1VgMnOn/R4IqYbKaNA2u7OYaGBmSKuBPG5hcRl72k6XMqTYZnP85CybfQ/fEthVkvA==
   ttlsig:
-    sdkappid: 1400574616
-    key: 9ef701536792a0bdacf7dbf902301a1f113d200157e9e6be368b3dadba321800
+    sdkappid: 1400743315
+    key: 3b8f5b1a04511a8e9f40a90b61bc8312452226416c5e533e81cbbf52e9b0e351
 
 xxl:
   job: