Commit 2a1a9f0c authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.17' into MVP1.7.17

parents 9615a97c 3879e29b
...@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; ...@@ -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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; 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.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.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -74,6 +75,25 @@ public class TEmpContractAlertController { ...@@ -74,6 +75,25 @@ public class TEmpContractAlertController {
setAuth(searchVo); setAuth(searchVo);
return R.ok(tEmpContractAlertService.pageDiy(page, searchVo)); return R.ok(tEmpContractAlertService.pageDiy(page, searchVo));
} }
/**
* 合同待续签-分页查询
* @param page 分页对象
* @param searchVo 员工合同续签待办
* @return
*/
@Operation(summary = "给自动化用的-合同待续签-分页查询", description = "合同待续签-分页查询")
@GetMapping("/getAutoPage" )
public R<IPage<TEmpContractAlert>> getAutoPage(Page page, ContractAlertSearchVo searchVo) {
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 员工合同续签待办 * @param searchVo 员工合同续签待办
......
...@@ -46,6 +46,9 @@ public interface TAutoMainRelMapper extends BaseMapper<TAutoMainRel> { ...@@ -46,6 +46,9 @@ public interface TAutoMainRelMapper extends BaseMapper<TAutoMainRel> {
// 获取全量自动化项目与商险续保周期 // 获取全量自动化项目与商险续保周期
List<TAutoMainRel> getAutoDeptMap(); List<TAutoMainRel> getAutoDeptMap();
// 获取所有自动化的项目编号
List<String> getAutoDeptNo();
Long noPageCountDiy(@Param("tAutoMainRel")TAutoMainRelSearchVo tAutoMainRel); Long noPageCountDiy(@Param("tAutoMainRel")TAutoMainRelSearchVo tAutoMainRel);
List<TAutoMainRelExportVo> noPageDiy(@Param("tAutoMainRel")TAutoMainRelSearchVo tAutoMainRel); List<TAutoMainRelExportVo> noPageDiy(@Param("tAutoMainRel")TAutoMainRelSearchVo tAutoMainRel);
......
...@@ -41,6 +41,10 @@ import java.util.List; ...@@ -41,6 +41,10 @@ import java.util.List;
public interface TEmpContractAlertService extends IService<TEmpContractAlert> { public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo); IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo);
// 给自动化用的-合同待续签-分页查询
IPage<TEmpContractAlert> getAutoPage(Page page, ContractAlertSearchVo searchVo);
// 合同待续签数量查询
long getAutoContractCount(ContractAlertSearchVo searchVo);
List<TEmpContractAlert> listDiy(ContractAlertSearchVo searchVo); List<TEmpContractAlert> listDiy(ContractAlertSearchVo searchVo);
......
...@@ -35,6 +35,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -35,6 +35,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -67,6 +69,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -67,6 +69,8 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private static final String FASC_NO_EMP_CONTRACT = "未找到自动生成的员工合同"; private static final String FASC_NO_EMP_CONTRACT = "未找到自动生成的员工合同";
private static final String FASC_NO_TEMPLATE = "未找到新法大大模板"; private static final String FASC_NO_TEMPLATE = "未找到新法大大模板";
private static final Logger logger = LoggerFactory.getLogger(FascService.class);
@Override @Override
public R<String> getTemplate(String templateName) throws ApiException { public R<String> getTemplate(String templateName) throws ApiException {
...@@ -82,14 +86,43 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -82,14 +86,43 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
// templateName 签署任务模板名称 // templateName 签署任务模板名称
List<TFascTemplate> tList = new ArrayList<>(); List<TFascTemplate> tList = new ArrayList<>();
List<SignTemplateListInfo> listSubList; List<SignTemplateListInfo> listSubList;
List<TFascTemplate> tempList = new ArrayList<>(); List<TFascTemplate> tempList;
List<TFascTemplateDetail> detailList = new ArrayList<>(); List<TFascTemplateDetail> detailList = new ArrayList<>();
List<TFascTemplateDetail> detailSubList; List<TFascTemplateDetail> detailSubList;
// 重试次数
int maxRetries = 3;
boolean success;
Exception lastException;
// 20秒后重试、40秒后重试、60秒后重试
long millis = 20000;
for (TFascCompany company : companyList) { for (TFascCompany company : companyList) {
listSubList = fascUtil.getTemplateList(templateName, tFascPushLogService, company); listSubList = fascUtil.getTemplateList(templateName, tFascPushLogService, company);
if (listSubList != null && !listSubList.isEmpty()) { if (listSubList != null && !listSubList.isEmpty()) {
detailSubList = new ArrayList<>(); detailSubList = new ArrayList<>();
fascUtil.getTemplateDetailList(listSubList, tempList, detailSubList, tFascPushLogService, company); tempList = new ArrayList<>();
success = false;
lastException = null;
for (int attempt = 0; attempt < maxRetries && !success; attempt++) {
try {
fascUtil.getTemplateDetailList(listSubList, tempList, detailSubList, tFascPushLogService, company);
success = true;
} catch (Exception e) {
lastException = e;
if (attempt < maxRetries - 1) { // Don't wait after the last attempt
try {
Thread.sleep(millis * (attempt + 1)); // Wait 10 seconds
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
}
}
}
if (!success) {
logger.error("法大大获取模板详情,重试 " + maxRetries + " 次依然失败", lastException);
continue;
}
if (!tempList.isEmpty() && !detailSubList.isEmpty()) { if (!tempList.isEmpty() && !detailSubList.isEmpty()) {
tList.addAll(tempList); tList.addAll(tempList);
detailList.addAll(detailSubList); detailList.addAll(detailSubList);
...@@ -108,7 +141,9 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -108,7 +141,9 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
List<TFascTemplate> updateMain = new ArrayList<>(); List<TFascTemplate> updateMain = new ArrayList<>();
List<TFascTemplateDetail> updateDetail = new ArrayList<>(); List<TFascTemplateDetail> updateDetail = new ArrayList<>();
// TODO - 这里后期要分每个公司去拉取
List<TFascTemplate> allMain = tFascTemplateService.getTFascTemplateListAll(null); List<TFascTemplate> allMain = tFascTemplateService.getTFascTemplateListAll(null);
// TODO - 这里后期要分每个公司去拉取
List<TFascTemplateDetail> allDetail = tFascTemplateDetailService.getTFascTemplateDetailList(null); List<TFascTemplateDetail> allDetail = tFascTemplateDetailService.getTFascTemplateDetailList(null);
List<TFascEditLog> logList = new ArrayList<>(); List<TFascEditLog> logList = new ArrayList<>();
if (allMain == null || allMain.isEmpty()) { if (allMain == null || allMain.isEmpty()) {
...@@ -305,7 +340,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -305,7 +340,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
} }
private TFascCompany getTFascCompany(TEmployeeContractPre contract) { private TFascCompany getTFascCompany(TEmployeeContractPre contract) {
TFascCompany company = null; TFascCompany company = null;
if (Common.isNotNull(contract.getFadadaTemplateId())) { if (Common.isNotNull(contract.getFadadaTemplateId())) {
TFascTemplate tFascTemplate = tFascTemplateService.getOne(Wrappers.<TFascTemplate>query() TFascTemplate tFascTemplate = tFascTemplateService.getOne(Wrappers.<TFascTemplate>query()
.lambda().eq(TFascTemplate::getSignTemplateId, contract.getFadadaTemplateId()) .lambda().eq(TFascTemplate::getSignTemplateId, contract.getFadadaTemplateId())
...@@ -342,6 +377,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -342,6 +377,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return fascUtil.urgeTask(contract, tFascPushLogService, tEmployeeContractPreMapper, company); return fascUtil.urgeTask(contract, tFascPushLogService, tEmployeeContractPreMapper, company);
} }
/** /**
* @param id TEmployeeContractPre主键 * @param id TEmployeeContractPre主键
* @Description: 获取附件 * @Description: 获取附件
......
...@@ -88,6 +88,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -88,6 +88,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private final FeedBackDetailService feedBackDetailService; private final FeedBackDetailService feedBackDetailService;
private final TSettleDomainMapper settleDomainMapper; private final TSettleDomainMapper settleDomainMapper;
private final TAutoMainRelMapper tAutoMainRelMapper;
@Autowired @Autowired
private UpmsDaprUtils upmsDaprUtils; private UpmsDaprUtils upmsDaprUtils;
...@@ -98,6 +99,49 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -98,6 +99,49 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
@Autowired @Autowired
private WxConfig wxConfig; private WxConfig wxConfig;
@Override
public IPage<TEmpContractAlert> getAutoPage(Page page, 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() + " order by CREATE_TIME desc");
} else {
wrapper.orderByDesc(BaseEntity::getCreateTime);
}
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 @Override
public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) { public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
......
...@@ -129,6 +129,13 @@ ...@@ -129,6 +129,13 @@
left join t_settle_domain b on d.DEPT_ID = b.id left join t_settle_domain b on d.DEPT_ID = b.id
</select> </select>
<!-- 获取全量自动化项目编码 -->
<select id="getAutoDeptNo" resultType="java.lang.String">
SELECT
d.DEPT_NO
FROM t_auto_main_rel d
</select>
<select id="noPageCountDiy" resultType="java.lang.Long"> <select id="noPageCountDiy" resultType="java.lang.Long">
SELECT SELECT
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 自动化离职待办-导出
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveConfirmExportVo {
@ExcelProperty("项目名称")
private String deptName;
@ExcelProperty("项目编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("离职日期")
private String joinLeaveDate;
@ExcelProperty("确认人")
private String confirmUser;
@ExcelProperty("确认时间")
private String confirmTime;
// 联动端口:固定值:人员离职
@ExcelProperty("联动端口")
private String linkPort;
@ExcelProperty("离职处理状态")
private String leaveStatus;
/**
* 执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理
*/
@ExcelProperty("执行结果")
private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
*/
@ExcelProperty("合同终止")
private String doStatusContract;
/**
* 社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过
*/
@ExcelProperty("社保减员")
private String doStatusSocial;
/**
* 公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过
*/
@ExcelProperty("公积金减员")
private String doStatusFund;
/**
* 商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回
*/
@ExcelProperty("商险退保")
private String doStatusInsurance;
/**
* 减项:0空1无需处理2待减项8减项成功9减项失败
*/
@ExcelProperty("减项")
private String doStatusProject;
/**
* 减档:0空1无需处理2待减档8减档成功9减档失败
*/
@ExcelProperty("减档")
private String doStatusEmp;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 自动化离职待办-导出
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveExportVo {
@ExcelProperty("项目名称")
private String deptName;
@ExcelProperty("项目编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("离职日期")
private String joinLeaveDate;
@ExcelProperty("离职处理状态")
private String leaveStatus;
/**
* 执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理
*/
@ExcelProperty("执行结果")
private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
*/
@ExcelProperty("合同终止")
private String doStatusContract;
/**
* 社保减员:0空1无需处理2待派单3发起失败4待审核5待办理6部分办理失败8办理成功9办理失败10审核不通过
*/
@ExcelProperty("社保减员")
private String doStatusSocial;
/**
* 公积金减员:0空1无需处理2待派单3发起失败4待审核5待办理8办理成功9办理失败10审核不通过
*/
@ExcelProperty("公积金减员")
private String doStatusFund;
/**
* 商险退保:0空1无需处理2待派单3发起失败4待减员5待办理6减员中8减员成功9减员退回
*/
@ExcelProperty("商险退保")
private String doStatusInsurance;
/**
* 减项:0空1无需处理2待减项8减项成功9减项失败
*/
@ExcelProperty("减项")
private String doStatusProject;
/**
* 减档:0空1无需处理2待减档8减档成功9减档失败
*/
@ExcelProperty("减档")
private String doStatusEmp;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveSearchVo extends EmployeeRegistrationLeave {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
//开始时间(查询专用)
@Schema(description = "入离职开始时间")
@TableField(exist = false)
private LocalDateTime joinTimeStart;
//截止时间(查询专用)
@Schema(description = "入离职截止时间")
@TableField(exist = false)
private LocalDateTime joinTimeEnd;
@Schema(description = "身份证合集")
@TableField(exist = false)
private List<String> idcardList;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@ExcelProperty("项目名称")
private String deptName;
@ExcelProperty("项目编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("离职日期")
private String joinLeaveDate;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 自动化离职待办-列表
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Data
public class EmployeeRegistrationLeaveTableVo extends EmployeeRegistrationLeaveExportVo {
@Schema(description = "主键ID")
private String id;
@Schema(description = "确认人")
private String confirmUser;
@Schema(description = "确认时间")
private String confirmTime;
// 联动端口:固定值:人员离职
@Schema(description = "联动端口")
private String linkPort;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/employeeregistrationleave")
@Tag(name = "自动化离职待办管理")
public class EmployeeRegistrationLeaveController {
private final EmployeeRegistrationLeaveService employeeRegistrationLeaveService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职待办分页查询")
@GetMapping("/getEmployeeRegistrationLeaveTablePage")
public R<IPage<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveTablePage(page, employeeRegistrationLeave));
}
/**
* 简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职待办分页查询2000条")
@GetMapping("/getEmployeeRegistrationLeaveTablePage2000")
public R<List<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveTablePage2000(employeeRegistrationLeave));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Operation(description = "离职确认分页查询")
@GetMapping("/getEmployeeRegistrationLeaveConfirmTablePage")
public R<IPage<EmployeeRegistrationLeaveTableVo>> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return new R<>(employeeRegistrationLeaveService.getEmployeeRegistrationLeaveConfirmTablePage(page, employeeRegistrationLeave));
}
/**
* 通过id查询自动化离职待办
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<EmployeeRegistrationLeave> getById(@PathVariable("id") String id) {
return R.ok(employeeRegistrationLeaveService.getById(id));
}
/**
* 自动化离职待办 批量导出
*
* @author hgw
* @date 2025-11-19 19:23:15
**/
@SysLog(value = "导出自动化离职待办")
@Operation(description = "导出自动化离职待办")
@PostMapping("/exportTable")
public void exportTable(HttpServletResponse response, @RequestBody EmployeeRegistrationLeaveSearchVo searchVo) {
employeeRegistrationLeaveService.exportTable(response, searchVo);
}
/**
* 自动化离职确认 批量导出
*
* @author hgw
* @date 2025-11-19 19:23:15
**/
@SysLog(value = "导出自动化离职确认")
@Operation(description = "导出自动化离职确认")
@PostMapping("/exportConfirmTable")
public void exportConfirmTable(HttpServletResponse response, @RequestBody EmployeeRegistrationLeaveSearchVo searchVo) {
employeeRegistrationLeaveService.exportConfirmTable(response, searchVo);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveConfirmExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Mapper
public interface EmployeeRegistrationLeaveMapper extends BaseMapper<EmployeeRegistrationLeave> {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, @Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page
, @Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveExportVo> getEmployeeRegistrationLeaveTableList(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveConfirmExportVo> getEmployeeRegistrationLeaveConfirmTableList(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
int getEmployeeRegistrationLeaveTableCount(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
int getEmployeeRegistrationLeaveConfirmTableCount(
@Param("employeeRegistrationLeave") EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
public interface EmployeeRegistrationLeaveService extends IService<EmployeeRegistrationLeave> {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave);
void exportTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo);
void exportConfirmTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.csp.service.impl;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeave;
import com.yifu.cloud.plus.v1.csp.mapper.EmployeeRegistrationLeaveMapper;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationLeaveService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveConfirmExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveExportVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationLeaveTableVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 自动化离职待办
*
* @author hgw
* @date 2025-11-19 19:23:15
*/
@Log4j2
@Service
public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRegistrationLeaveMapper, EmployeeRegistrationLeave> implements EmployeeRegistrationLeaveService {
/**
* 自动化离职待办简单分页查询
*
* @param employeeRegistrationLeave 自动化离职待办
* @return
*/
@Override
public IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveTablePage(page, employeeRegistrationLeave);
}
@Override
public List<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveTablePage2000(EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveTablePage2000(employeeRegistrationLeave);
}
@Override
public IPage<EmployeeRegistrationLeaveTableVo> getEmployeeRegistrationLeaveConfirmTablePage(Page<EmployeeRegistrationLeaveTableVo> page, EmployeeRegistrationLeaveSearchVo employeeRegistrationLeave) {
return baseMapper.getEmployeeRegistrationLeaveConfirmTablePage(page, employeeRegistrationLeave);
}
/**
* 自动化离职待办批量导出
*
* @param searchVo 自动化离职待办
* @return
*/
@Override
public void exportTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo) {
String fileName = "自动化离职待处理批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationLeaveExportVo> list = new ArrayList<>();
long count = baseMapper.getEmployeeRegistrationLeaveTableCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, EmployeeRegistrationLeave.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getEmployeeRegistrationLeaveTableList(searchVo);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职待处理" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职待处理" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public void exportConfirmTable(HttpServletResponse response, EmployeeRegistrationLeaveSearchVo searchVo) {
String fileName = "自动化离职确认批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationLeaveConfirmExportVo> list = new ArrayList<>();
long count = baseMapper.getEmployeeRegistrationLeaveConfirmTableCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, EmployeeRegistrationLeave.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getEmployeeRegistrationLeaveConfirmTableList(searchVo);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职确认" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("自动化离职确认" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
}
...@@ -1349,5 +1349,5 @@ public class InsurancesConstants { ...@@ -1349,5 +1349,5 @@ public class InsurancesConstants {
public static final String INSURANCE_AUTO_FLAG_IS_ENABLE = "该项目已纳入自动化,请至作业自动化模块入职登记-接收确认后自动派单"; public static final String INSURANCE_AUTO_FLAG_IS_ENABLE = "该项目已纳入自动化,请至作业自动化模块入职登记-接收确认后自动派单";
// 0待确认1待派单 可忽略 // 0待确认1待派单 可忽略
public static final Set<String> ALERT_IGNORE_STATUS = new HashSet<>(Arrays.asList("0", "1")); public static final Set<String> ALERT_IGNORE_STATUS = new HashSet<>(Arrays.asList("0", "1", "2", "5"));
} }
...@@ -208,6 +208,14 @@ public class TInsurancePreRenewDetail extends BaseEntity { ...@@ -208,6 +208,14 @@ public class TInsurancePreRenewDetail extends BaseEntity {
@ExcelProperty("险种名称") @ExcelProperty("险种名称")
@Schema(description = "险种名称") @Schema(description = "险种名称")
private String insuranceTypeName; private String insuranceTypeName;
/**
* 险种Id
*/
@ExcelAttribute(name = "险种Id", maxLength = 50)
@Length(max = 50, message = "险种Id不能超过50个字符")
@ExcelProperty("险种Id")
@Schema(description = "险种Id")
private String insuranceTypeId;
/** /**
* 原购买标准 * 原购买标准
*/ */
......
...@@ -20,6 +20,12 @@ import java.util.List; ...@@ -20,6 +20,12 @@ import java.util.List;
public class InsuredParam extends BaseEntity implements Serializable { public class InsuredParam extends BaseEntity implements Serializable {
private static final long serialVersionUID = -2689686777914935788L; private static final long serialVersionUID = -2689686777914935788L;
/**
* 员工姓名或身份证(移动端搜索专用——这个接口:replacePageToAutoSelect)
*/
@Schema(description = "员工姓名或身份证")
private String empNameOrCard;
/** /**
* 员工姓名 * 员工姓名
*/ */
......
...@@ -18,10 +18,12 @@ ...@@ -18,10 +18,12 @@
package com.yifu.cloud.plus.v1.yifu.insurances.controller; package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwDetailService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -29,6 +31,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -29,6 +31,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -66,4 +69,16 @@ public class TInsurancePreRenewDetailQwDetailController { ...@@ -66,4 +69,16 @@ public class TInsurancePreRenewDetailQwDetailController {
} }
return new R<>(tInsurancePreRenewDetailQwDetailService.getTInsurancePreRenewDetailQwDetailPage(page, tInsurancePreRenewDetailQwDetail)); return new R<>(tInsurancePreRenewDetailQwDetailService.getTInsurancePreRenewDetailQwDetailPage(page, tInsurancePreRenewDetailQwDetail));
} }
@Operation(description = "获取1条详情")
@GetMapping("/getQwDetailByMainId")
public R<TInsurancePreRenewDetailQwDetail> getQwDetailByMainId(@RequestParam(required = false) String mainId) {
if (Common.isEmpty(mainId)) {
return R.failed("请传参MainId");
}
TInsurancePreRenewDetailQwDetail pre = tInsurancePreRenewDetailQwDetailService.getOne(Wrappers.<TInsurancePreRenewDetailQwDetail>query().lambda()
.eq(TInsurancePreRenewDetailQwDetail::getMainId, mainId)
.last(CommonConstants.LAST_ONE_SQL));
return new R<>(pre);
}
} }
...@@ -391,7 +391,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -391,7 +391,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
errorMessageMap.put(info.getInsurancePreRenewId(), info.getErrorMessage()); errorMessageMap.put(info.getInsurancePreRenewId(), info.getErrorMessage());
} }
Map<String, Set<String>> deptNumMap = new HashMap<>();
Map<String, Integer> allNumMap = new HashMap<>(); Map<String, Integer> allNumMap = new HashMap<>();
Map<String, Integer> failNumMap = new HashMap<>(); Map<String, Integer> failNumMap = new HashMap<>();
Map<String, TInsurancePreRenewDetailQw> preQwMap = new HashMap<>(); Map<String, TInsurancePreRenewDetailQw> preQwMap = new HashMap<>();
...@@ -400,7 +399,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -400,7 +399,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
TInsurancePreRenewDetail updatePre; TInsurancePreRenewDetail updatePre;
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
String errorrMessage; String errorrMessage;
Set<String> tempSet;
Integer nums; Integer nums;
String customerUserLoginname; String customerUserLoginname;
...@@ -411,14 +409,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -411,14 +409,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
for (TInsurancePreRenewDetail pre : insurancePreList) { for (TInsurancePreRenewDetail pre : insurancePreList) {
customerUserLoginname = pre.getCustomerUserLoginname(); 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 = new TInsurancePreRenewDetail();
updatePre.setId(pre.getId()); updatePre.setId(pre.getId());
String qwUuId; String qwUuId;
...@@ -483,7 +473,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -483,7 +473,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
// pushQiWeiFlag 推送企微的flag,true表示推送企微 // pushQiWeiFlag 推送企微的flag,true表示推送企微
if (pushQiWeiFlag && !preQwMap.isEmpty()) { if (pushQiWeiFlag && !preQwMap.isEmpty()) {
List<TInsurancePreRenewDetailQw> qwList = new ArrayList<>(); List<TInsurancePreRenewDetailQw> qwList = new ArrayList<>();
int deptNum;
int allNum; int allNum;
int failNum; int failNum;
StringBuilder description; StringBuilder description;
...@@ -496,12 +485,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -496,12 +485,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
userLoginNames = customerUserLoginname; userLoginNames = customerUserLoginname;
} }
qw = entry.getValue(); qw = entry.getValue();
tempSet = deptNumMap.get(customerUserLoginname);
if (Common.isNotNull(tempSet)) {
deptNum = tempSet.size();
} else {
deptNum = 0;
}
allNum = allNumMap.get(customerUserLoginname); allNum = allNumMap.get(customerUserLoginname);
if (Common.isEmpty(allNum)) { if (Common.isEmpty(allNum)) {
allNum = 0; allNum = 0;
...@@ -510,8 +493,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -510,8 +493,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
if (Common.isEmpty(failNum)) { if (Common.isEmpty(failNum)) {
failNum = 0; failNum = 0;
} }
description = new StringBuilder("项目数:").append(deptNum).append("个;自动化派单人数:") description = new StringBuilder("商险派单数:").append(allNum).append("份,【失败份数:").append(failNum)
.append(allNum).append("个,【失败人数:").append(failNum).append("个】<br>请及时至HRO系统处理,以免人员漏保!"); .append("份】<br>点击查看详情!<br>请及时至HRO系统处理,以免耽误购买进度!");
qw.setDescription(description.toString()); qw.setDescription(description.toString());
qwList.add(qw); qwList.add(qw);
} }
...@@ -649,7 +632,7 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -649,7 +632,7 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
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<>();
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("url", String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName() + "/auth/oauth/wxLogin", "76" + mainId));
textcard.put("description", content); textcard.put("description", content);
requestMap.put("touser", sendUser); requestMap.put("touser", sendUser);
......
...@@ -2139,6 +2139,12 @@ ...@@ -2139,6 +2139,12 @@
a.INSURANCE_CITY_NAME as insuranceCityName a.INSURANCE_CITY_NAME as insuranceCityName
from t_insurance_detail a from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 3 and IS_USE = 0 and IS_EFFECT = 0 and IS_OVERDUE = 0 where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 3 and IS_USE = 0 and IS_EFFECT = 0 and IS_OVERDUE = 0
<if test="param.empNameOrCard != null and param.empNameOrCard.trim() != ''">
and (
a.EMP_NAME like concat('%',replace(replace(#{param.empNameOrCard},'_','\_'),'%','\%'),'%')
or a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empNameOrCard},'_','\_'),'%','\%'),'%')
)
</if>
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<result property="configName" column="CONFIG_NAME"/> <result property="configName" column="CONFIG_NAME"/>
<result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME"/> <result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME"/>
<result property="insuranceTypeName" column="INSURANCE_TYPE_NAME"/> <result property="insuranceTypeName" column="INSURANCE_TYPE_NAME"/>
<result property="insuranceTypeId" column="INSURANCE_TYPE_ID"/>
<result property="buyStandardOld" column="BUY_STANDARD_OLD"/> <result property="buyStandardOld" column="BUY_STANDARD_OLD"/>
<result property="buyStandard" column="BUY_STANDARD"/> <result property="buyStandard" column="BUY_STANDARD"/>
<result property="insuranceProvinceName" column="INSURANCE_PROVINCE_NAME"/> <result property="insuranceProvinceName" column="INSURANCE_PROVINCE_NAME"/>
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
a.CONFIG_NAME, a.CONFIG_NAME,
a.INSURANCE_COMPANY_NAME, a.INSURANCE_COMPANY_NAME,
a.INSURANCE_TYPE_NAME, a.INSURANCE_TYPE_NAME,
a.INSURANCE_TYPE_ID,
a.BUY_STANDARD_OLD, a.BUY_STANDARD_OLD,
a.BUY_STANDARD, a.BUY_STANDARD,
a.INSURANCE_PROVINCE_NAME, a.INSURANCE_PROVINCE_NAME,
......
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