Commit a6545edc authored by hongguangwu's avatar hongguangwu

MVP1.7.17-商险待续签

parent 7e265cac
......@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAlertSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -87,6 +88,12 @@ public class TEmpContractAlertController {
setAuth(searchVo);
return R.ok(tEmpContractAlertService.getAutoPage(page, searchVo));
}
@Operation(description = "合同待续签数量查询")
@PostMapping("/getAutoContractCount")
public R<Long> getAutoContractCount(@RequestBody ContractAlertSearchVo searchVo) {
setAuth(searchVo);
return R.ok(tEmpContractAlertService.getAutoContractCount(searchVo));
}
/**
* 不分页查询
* @param searchVo 员工合同续签待办
......
......@@ -41,7 +41,10 @@ import java.util.List;
public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo);
// 给自动化用的-合同待续签-分页查询
IPage<TEmpContractAlert> getAutoPage(Page page, ContractAlertSearchVo searchVo);
// 合同待续签数量查询
long getAutoContractCount(ContractAlertSearchVo searchVo);
List<TEmpContractAlert> listDiy(ContractAlertSearchVo searchVo);
......
......@@ -122,6 +122,26 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}
return baseMapper.selectPage(page,wrapper);
}
@Override
public long getAutoContractCount(ContractAlertSearchVo searchVo) {
List<String> deptList = tAutoMainRelMapper.getAutoDeptNo();
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
wrapper.isNotNull(TEmpContractAlert::getId);
if (deptList != null && !deptList.isEmpty()) {
wrapper.in(TEmpContractAlert::getProjectNo, deptList);
}
if (Common.isNotNull(searchVo.getContractEndStart())){
wrapper.ge(TEmpContractAlert::getContractEnd,searchVo.getContractEndStart());
}
if (Common.isNotNull(searchVo.getContractEndEnd())){
wrapper.le(TEmpContractAlert::getContractEnd,searchVo.getContractEndEnd());
}
if (Common.isNotNull(searchVo.getAuthSql())) {
wrapper.last(searchVo.getAuthSql());
}
return baseMapper.selectCount(wrapper);
}
@Override
public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
......
......@@ -391,7 +391,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
errorMessageMap.put(info.getInsurancePreRenewId(), info.getErrorMessage());
}
Map<String, Set<String>> deptNumMap = new HashMap<>();
Map<String, Integer> allNumMap = new HashMap<>();
Map<String, Integer> failNumMap = new HashMap<>();
Map<String, TInsurancePreRenewDetailQw> preQwMap = new HashMap<>();
......@@ -400,7 +399,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
TInsurancePreRenewDetail updatePre;
LocalDateTime now = LocalDateTime.now();
String errorrMessage;
Set<String> tempSet;
Integer nums;
String customerUserLoginname;
......@@ -411,14 +409,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
for (TInsurancePreRenewDetail pre : insurancePreList) {
customerUserLoginname = pre.getCustomerUserLoginname();
if (Common.isNotNull(customerUserLoginname)) {
tempSet = deptNumMap.get(customerUserLoginname);
if (tempSet == null) {
tempSet = new HashSet<>();
}
tempSet.add(pre.getDeptNo());
deptNumMap.put(customerUserLoginname, tempSet);
}
updatePre = new TInsurancePreRenewDetail();
updatePre.setId(pre.getId());
String qwUuId;
......@@ -483,7 +473,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
// pushQiWeiFlag 推送企微的flag,true表示推送企微
if (pushQiWeiFlag && !preQwMap.isEmpty()) {
List<TInsurancePreRenewDetailQw> qwList = new ArrayList<>();
int deptNum;
int allNum;
int failNum;
StringBuilder description;
......@@ -496,12 +485,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
userLoginNames = customerUserLoginname;
}
qw = entry.getValue();
tempSet = deptNumMap.get(customerUserLoginname);
if (Common.isNotNull(tempSet)) {
deptNum = tempSet.size();
} else {
deptNum = 0;
}
allNum = allNumMap.get(customerUserLoginname);
if (Common.isEmpty(allNum)) {
allNum = 0;
......@@ -510,8 +493,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
if (Common.isEmpty(failNum)) {
failNum = 0;
}
description = new StringBuilder("项目数:").append(deptNum).append("个;自动化派单人数:")
.append(allNum).append("个,【失败人数:").append(failNum).append("个】<br>请及时至HRO系统处理,以免人员漏保!");
description = new StringBuilder("商险派单数:").append(allNum).append("份,【失败份数:").append(failNum)
.append("份】<br>点击查看详情!<br>请及时至HRO系统处理,以免耽误购买进度!");
qw.setDescription(description.toString());
qwList.add(qw);
}
......@@ -649,7 +632,7 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
textcard.put("title", "【商险自动化派单——失败提醒】");
textcard.put("title", "【作业自动化——商险续保发起失败提醒】");
textcard.put("url", String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "76" + mainId));
textcard.put("description", content);
requestMap.put("touser", sendUser);
......
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