Commit 7be115e8 authored by huyuchen's avatar huyuchen

huych-入职登记商险待办提交

parent 5f74b85d
...@@ -381,7 +381,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -381,7 +381,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
List<TEmployeeInsurancePre> unConfirmList = baseMapper.getAllUnconfimData(); List<TEmployeeInsurancePre> unConfirmList = baseMapper.getAllUnconfimData();
if (Common.isNotNull(unConfirmList) && !unConfirmList.isEmpty()) { if (Common.isNotNull(unConfirmList) && !unConfirmList.isEmpty()) {
for(TEmployeeInsurancePre pre : unConfirmList) { for(TEmployeeInsurancePre pre : unConfirmList) {
sendMessageToWx(pre,CommonConstants.ONE_STRING); sendMessageToWx(pre);
} }
} }
} }
...@@ -478,7 +478,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -478,7 +478,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
} }
//发送企业微信待办 //发送企业微信待办
private void sendMessageToWx(TEmployeeInsurancePre insurancePre, String type) { private void sendMessageToWx(TEmployeeInsurancePre insurancePre) {
//获取前端客服 //获取前端客服
SysUser user; SysUser user;
if (Common.isEmpty(insurancePre.getCustomerUserLoginname())) { if (Common.isEmpty(insurancePre.getCustomerUserLoginname())) {
...@@ -498,33 +498,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -498,33 +498,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>(); Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>(); Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "6" + insurancePre.getId()); String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "03" + insurancePre.getCustomerUserLoginname());
StringBuilder description = new StringBuilder(); StringBuilder description = new StringBuilder();
String result;
int buyType = insurancePre.getBuyType();
switch (buyType) {
case CommonConstants.ONE_INT:
result = "新增";
break;
case CommonConstants.THREE_INT:
result = "批增";
break;
default:
result = "替换";
}
String title = "商险投保确认"; String title = "商险投保确认";
if (CommonConstants.ONE_STRING.equals(type)) { description.append("您有新的商险购买待确认数据,请及时确认").append("<br>");
description.append("项目名称:").append(insurancePre.getDeptName()).append("<br>");
description.append("项目编码:").append(insurancePre.getDeptNo()).append("<br>");
description.append("员工姓名:").append(insurancePre.getEmployeeName()).append("<br>");
description.append("身份证号:").append(insurancePre.getEmpIdcard()).append("<br>");
description.append("购买类型:").append(result).append("<br>");
} else {
// description.append("项目名称:").append(registration.getDeptName()).append("<br>");
// description.append("项目编码:").append(registration.getDeptNo()).append("<br>");
// description.append("入职人数:").append(registration.getInNum()).append("<br>");
// description.append("购买类型:").append(registration.getOutNum()).append("<br>");
}
textcard.put("title", title); textcard.put("title", title);
textcard.put("url", authUrl); textcard.put("url", authUrl);
textcard.put("description", description.toString()); textcard.put("description", description.toString());
......
...@@ -289,5 +289,6 @@ ...@@ -289,5 +289,6 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_employee_insurance_pre a FROM t_employee_insurance_pre a
where a.process_status = '0' and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") = CURDATE() where a.process_status = '0' and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") = CURDATE()
group by a.customer_user_loginname
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment