Commit 40c336a3 authored by hongguangwu's avatar hongguangwu

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

parents 2159f328 237e0a37
...@@ -886,6 +886,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -886,6 +886,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Override @Override
public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) { public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) {
if (Common.isNotNull(voList) && voList.size() >200) {
return R.failed("短信批量发送单次最多两百条");
}
//获取短信待发放和信息待填写的数据 //获取短信待发放和信息待填写的数据
List<String> errorList = new ArrayList<>(); List<String> errorList = new ArrayList<>();
if (CommonConstants.ONE_STRING.equals(type)) { if (CommonConstants.ONE_STRING.equals(type)) {
......
...@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo; ...@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
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.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator; import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
...@@ -156,6 +155,16 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -156,6 +155,16 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
IGNORE_FIELD.add("isAddress"); IGNORE_FIELD.add("isAddress");
} }
private static final List<String> PRE_IGNORE_FIELD = new ArrayList<>();
static {
IGNORE_FIELD.add("createTime");
IGNORE_FIELD.add("deptId");
IGNORE_FIELD.add("dataSource");
IGNORE_FIELD.add("createBy");
IGNORE_FIELD.add("createName");
IGNORE_FIELD.add("updateBy");
}
@Override @Override
public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) { , EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) {
...@@ -321,7 +330,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -321,7 +330,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isNotNull(newInsurance.getId())) { if (Common.isNotNull(newInsurance.getId())) {
oldInsurance = oldMap.get(newInsurance.getId()); oldInsurance = oldMap.get(newInsurance.getId());
if (oldInsurance != null) { if (oldInsurance != null) {
differenceInsuranceKey = HrEquator.comparisonValue(oldInsurance, newInsurance); differenceInsuranceKey = HrEquator.comparisonValueIgnoreField(oldInsurance, newInsurance,PRE_IGNORE_FIELD);
} }
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) { if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail(); detailInsuranceLog = new TEmployeePreLogDetail();
......
...@@ -203,7 +203,7 @@ public class TEmployeeProjectBelongDeptServiceImpl extends ServiceImpl<TEmployee ...@@ -203,7 +203,7 @@ public class TEmployeeProjectBelongDeptServiceImpl extends ServiceImpl<TEmployee
dept.setId(vo.getProjectId()); dept.setId(vo.getProjectId());
dept.setEmpDeptid(vo.getDepartId().toString()); dept.setEmpDeptid(vo.getDepartId().toString());
dept.setEmpDeptname(vo.getDepartName()); dept.setEmpDeptname(vo.getDepartName());
this.save(dept); this.saveOrUpdate(dept);
} else { } else {
this.removeById(vo.getProjectId()); this.removeById(vo.getProjectId());
} }
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
inner join t_employee_info b on a.EMP_ID = b.id inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
<where> <where>
a.delete_flag = '0' and a.IS_COMPLETE = '1' a.delete_flag = '0' and a.IS_COMPLETE = '1' and a.project_status = 0
<include refid="employeeRegistrationPre_where"/> <include refid="employeeRegistrationPre_where"/>
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
......
...@@ -666,6 +666,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -666,6 +666,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(registration.getJoinLeaveDate()); dayVo.setRegistDate(registration.getJoinLeaveDate());
if (insurancePreVo.getBuyType() ==1) {
dayVo.setAddOrBatch(CommonConstants.ONE_STRING);
}
dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo); dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData()) if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate()) && Common.isNotNull(dataR.getData().getRegistDate())
...@@ -1330,6 +1333,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1330,6 +1333,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
//是否地市自购 //是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress()); preVo.setIsAddress(insuranceDetail.getIsAdress());
preVo.setInsurancesId(insuranceDetail.getId());
} }
} }
} }
......
...@@ -80,6 +80,11 @@ ...@@ -80,6 +80,11 @@
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>org.apache.shardingsphere</groupId>--> <!-- <groupId>org.apache.shardingsphere</groupId>-->
<!-- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>--> <!-- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>-->
......
...@@ -136,4 +136,9 @@ public class IcbcTransactionFlowIssueController { ...@@ -136,4 +136,9 @@ public class IcbcTransactionFlowIssueController {
return icbcTransactionFlowIssueService.doGetEkpBankStatus(); return icbcTransactionFlowIssueService.doGetEkpBankStatus();
} }
@Operation(summary = "获取回单文件", description = "获取回单文件")
@PostMapping("/getPdfFile")
public void getPdfFile() {
icbcTransactionFlowIssueService.getPdfFile();
}
} }
...@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.ekp.service; ...@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1; import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1;
import com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo; import com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -76,4 +75,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> ...@@ -76,4 +75,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
**/ **/
R<String> doGetEkpBankStatus(); R<String> doGetEkpBankStatus();
void getPdfFile();
} }
...@@ -16,6 +16,7 @@ import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1; ...@@ -16,6 +16,7 @@ import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1; import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.icbc.api.utils.IcbcSignature; import com.icbc.api.utils.IcbcSignature;
import com.icbc.api.utils.WebUtils; import com.icbc.api.utils.WebUtils;
import com.jcraft.jsch.*;
import com.yifu.cloud.plus.v1.ekp.config.IcbcIssueConfigProperties; import com.yifu.cloud.plus.v1.ekp.config.IcbcIssueConfigProperties;
import com.yifu.cloud.plus.v1.ekp.entity.*; import com.yifu.cloud.plus.v1.ekp.entity.*;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper; import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
...@@ -1035,6 +1036,68 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1035,6 +1036,68 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok(); return R.ok();
} }
@Override
public void getPdfFile() {
String host = "gw.open.icbc.com.cn";
int port = 8001;
String username = "wxrl";
// String privateKeyPath = "/path/to/your/private_key"; // 替换为你的私钥路径
String privateKeyPath = "D:/icbcFile/id_rsa"; // 替换为你的私钥路径
String remoteDir = "/JFTStatementDownload/download";
String localPath = "D:/icbcFile/pdfFile"; // 替换为本地保存路径
Session session = null;
ChannelSftp channelSftp = null;
try {
JSch jsch = new JSch();
// 添加私钥(注意:需要是没有密码保护的私钥)
jsch.addIdentity(privateKeyPath);
// 创建会话
session = jsch.getSession(username, host, port);
// 关闭严格的主机密钥检查(生产环境应配置known_hosts)
session.setConfig("StrictHostKeyChecking", "no");
session.connect();
// 创建SFTP通道
channelSftp = (ChannelSftp) session.openChannel("sftp");
channelSftp.connect();
// 切换远程目录
channelSftp.cd(remoteDir);
// 列出目录文件
Vector<ChannelSftp.LsEntry> files = channelSftp.ls("*");
log.info("找到文件数量: " + files.size());
// 下载所有文件
for (ChannelSftp.LsEntry entry : files) {
if (!entry.getAttrs().isDir()) {
String fileName = entry.getFilename();
log.info("正在下载: " + fileName);
channelSftp.get(fileName, localPath + fileName);
}
}
} catch (JSchException e) {
if (e.getMessage().contains("Auth fail")) {
return;
}
} catch (SftpException e) {
return;
} finally {
if (channelSftp != null && channelSftp.isConnected()) {
channelSftp.exit();
}
if (session != null && session.isConnected()) {
session.disconnect();
}
}
}
/** /**
* @Description: 发放记录日志 * @Description: 发放记录日志
* @Author: hgw * @Author: hgw
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<mapper namespace="com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper"> <mapper namespace="com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper">
<!--查询事业部信息:目前是测试环境的表名--> <!--查询事业部信息:目前是生产环境的表名-->
<select id="getDivisionLoginNameList" resultType="string"> <select id="getDivisionLoginNameList" resultType="string">
select du.fd_login_name as loginName from ekp_shenhepeizhi_table a select du.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d35e2548a3e d on d.fd_parent_id = a.fd_id LEFT JOIN ekporg_192dc6529f546b9f2008 d on d.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person du on du.fd_id = d.sys_org_person_id LEFT JOIN sys_org_person du on du.fd_id = d.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division} where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select> </select>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!--查询副总信息--> <!--查询副总信息-->
<select id="getFuLoginNameList" resultType="string"> <select id="getFuLoginNameList" resultType="string">
select fu.fd_login_name as loginName from ekp_shenhepeizhi_table a select fu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe509c6554968429 f on f.fd_parent_id = a.fd_id LEFT JOIN ekporg_192dc6529f5576856a70 f on f.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person fu on fu.fd_id = f.sys_org_person_id LEFT JOIN sys_org_person fu on fu.fd_id = f.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division} where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select> </select>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!--查询事业部条线负责人--> <!--查询事业部条线负责人-->
<select id="getLineLoginNameList" resultType="string"> <select id="getLineLoginNameList" resultType="string">
select lu.fd_login_name as loginName from ekp_shenhepeizhi_table a select lu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d389080b7a7 l on l.fd_parent_id = a.fd_id LEFT JOIN ekporg_192dc6529f5b1d699c39 l on l.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person lu on lu.fd_id = l.sys_org_person_id LEFT JOIN sys_org_person lu on lu.fd_id = l.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division} where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select> </select>
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -187,4 +189,12 @@ public class InsuranceExportListOneVO implements Serializable { ...@@ -187,4 +189,12 @@ public class InsuranceExportListOneVO implements Serializable {
*/ */
@Schema(description = "是否地市自购") @Schema(description = "是否地市自购")
private String isAdress; private String isAdress;
/**
* 派单备注
*/
@Schema(description = "派单备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "派单备注")
private String remarkDispatch;
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -194,4 +196,12 @@ public class InsuranceExportListVO implements Serializable { ...@@ -194,4 +196,12 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "是否地市自购") @Schema(description = "是否地市自购")
private String isAdress; private String isAdress;
/**
* 派单备注
*/
@Schema(description = "派单备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "派单备注")
private String remarkDispatch;
} }
...@@ -330,6 +330,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -330,6 +330,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
List<TEmployeeInsurancePreVo> employeeInsurancePreVos = registrationPreVo.getEmployeeInsurancePreVos(); List<TEmployeeInsurancePreVo> employeeInsurancePreVos = registrationPreVo.getEmployeeInsurancePreVos();
TEmployeeInsurancePre preExit; TEmployeeInsurancePre preExit;
if (null != employeeInsurancePreVos && !employeeInsurancePreVos.isEmpty()) { if (null != employeeInsurancePreVos && !employeeInsurancePreVos.isEmpty()) {
try {
for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) { for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) {
//判断是否存在商险待购买信息 //判断是否存在商险待购买信息
preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda() preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
...@@ -338,8 +339,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -338,8 +339,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard()) .eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard())
.eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName()) .eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName())
.eq(TEmployeeInsurancePre::getInsuranceCompanyName, preVo.getInsuranceCompanyName()) .eq(TEmployeeInsurancePre::getInsuranceCompanyName, preVo.getInsuranceCompanyName())
.eq(TEmployeeInsurancePre::getPolicyStart, preVo.getPolicyStart()) .eq(TEmployeeInsurancePre::getPolicyStart, DateUtil.parseDate(DateUtil.dateToString(preVo.getPolicyStart()), DateUtil.ISO_EXPANDED_DATE_FORMAT))
.eq(TEmployeeInsurancePre::getPolicyEnd, preVo.getPolicyEnd()) .eq(TEmployeeInsurancePre::getPolicyEnd, DateUtil.parseDate(DateUtil.dateToString(preVo.getPolicyEnd()), DateUtil.ISO_EXPANDED_DATE_FORMAT))
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
TEmployeeInsurancePre pre = new TEmployeeInsurancePre(); TEmployeeInsurancePre pre = new TEmployeeInsurancePre();
BeanUtils.copyProperties(preVo, pre); BeanUtils.copyProperties(preVo, pre);
...@@ -369,6 +370,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -369,6 +370,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
// } // }
} }
} }
}catch (Exception e){
log.error("执行异常" ,e);
return null;
}
} }
return true; return true;
} }
...@@ -395,12 +400,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -395,12 +400,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
@Override @Override
public void updateInsurancePreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo) { public void updateInsurancePreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo) {
if (Common.isNotNull(updateVo)) {
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getDeptNo,updateVo.getDeptNo()) updateWrapper.eq(TEmployeeInsurancePre::getDeptNo, updateVo.getDeptNo())
.set(TEmployeeInsurancePre::getCustomerUsername, updateVo.getCustomerUserName()) .set(TEmployeeInsurancePre::getCustomerUsername, updateVo.getCustomerUserName())
.set(TEmployeeInsurancePre::getCustomerUserLoginname, updateVo.getCustomerUserLoginName()); .set(TEmployeeInsurancePre::getCustomerUserLoginname, updateVo.getCustomerUserLoginName());
this.update(updateWrapper); this.update(updateWrapper);
} }
}
@Override @Override
public void pushWxConfrimMessage() { public void pushWxConfrimMessage() {
...@@ -422,6 +429,12 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -422,6 +429,12 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
//获取所有待派单的数据 //获取所有待派单的数据
List<String> unConfirmList = baseMapper.getAllUnDisData(); List<String> unConfirmList = baseMapper.getAllUnDisData();
if (null != unConfirmList && !unConfirmList.isEmpty()) { if (null != unConfirmList && !unConfirmList.isEmpty()) {
//更新成已确认
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeInsurancePre::getId, unConfirmList)
.eq(TEmployeeInsurancePre::getProcessStatus, CommonConstants.ZERO_STRING)
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.ONE_STRING);
this.update(updateWrapper);
try { try {
this.batchDispatcherInsurance(unConfirmList); this.batchDispatcherInsurance(unConfirmList);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -1125,6 +1125,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1125,6 +1125,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceExportListOneVO> list = new ArrayList<>(); List<InsuranceExportListOneVO> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listVOS)){ if(CollectionUtils.isNotEmpty(listVOS)){
for (InsuranceExportListOneVO listVO : listVOS) { for (InsuranceExportListOneVO listVO : listVOS) {
listVO.setRemarkDispatch(listVO.getRemark());
listVO.setRemark(InsurancesConstants.INSERT); listVO.setRemark(InsurancesConstants.INSERT);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
...@@ -1289,6 +1290,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1289,6 +1290,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceExportListVO> list = new ArrayList<>(); List<InsuranceExportListVO> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listVOS)){ if(CollectionUtils.isNotEmpty(listVOS)){
for (InsuranceExportListVO listVO : listVOS) { for (InsuranceExportListVO listVO : listVOS) {
listVO.setRemarkDispatch(listVO.getRemark());
listVO.setRemark(InsurancesConstants.INSERT); listVO.setRemark(InsurancesConstants.INSERT);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
......
...@@ -327,6 +327,6 @@ ...@@ -327,6 +327,6 @@
SELECT SELECT
id id
FROM t_employee_insurance_pre a FROM t_employee_insurance_pre a
where a.process_status in ('1','2','5') and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE() where a.process_status in ('0','1','2','5') and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
</select> </select>
</mapper> </mapper>
...@@ -85,4 +85,17 @@ public class UpdateOverdueTask { ...@@ -85,4 +85,17 @@ public class UpdateOverdueTask {
"/temployeeinsurancepre/inner/pushWxConfrimMessage","", Void.class, SecurityConstants.FROM_IN); "/temployeeinsurancepre/inner/pushWxConfrimMessage","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天九点推送商险待确认信息-定时任务开始------------"); log.info("-------------每天九点推送商险待确认信息-定时任务开始------------");
} }
/**
* 每天刷新商险到期提醒信息
* @author huych
* @param
* @return void
*/
public void pushDisConfrimInsurances() {
log.info("-------------每天三点二十推送商险待确认信息------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId(),
"/temployeeinsurancepre/inner/pushDisConfrimInsurances","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天三点二十推送商险待确认信息-定时任务开始------------");
}
} }
...@@ -27,4 +27,7 @@ public class TEmployeeInsuranceWorkDayVo implements Serializable { ...@@ -27,4 +27,7 @@ public class TEmployeeInsuranceWorkDayVo implements Serializable {
@Schema(description = "类型 1 前一个工作日 2 后一个工作日") @Schema(description = "类型 1 前一个工作日 2 后一个工作日")
private String type; private String type;
@Schema(description = "类型 1 新增 2 其他")
private String addOrBatch;
} }
...@@ -309,7 +309,14 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -309,7 +309,14 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
for (THolidayInfo h:holidayInfos){ for (THolidayInfo h:holidayInfos){
holidayMap.put(h.getDate(),h.getDay()); holidayMap.put(h.getDate(),h.getDay());
} }
} else {
vo.setPriDisDate(vo.getRegistDate());
return vo;
} }
LocalDate preRegistDate = vo.getRegistDate().toInstant()
.atZone(java.time.ZoneId.systemDefault())
.toLocalDate();
//查找入职日期的前一个工作日 //查找入职日期的前一个工作日
TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo();
newVo.setRegistDate(DateUtil.addDayByDate(vo.getRegistDate(), CommonConstants.ONE_INT_NEGATE)); newVo.setRegistDate(DateUtil.addDayByDate(vo.getRegistDate(), CommonConstants.ONE_INT_NEGATE));
...@@ -328,8 +335,18 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -328,8 +335,18 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
// 如果日期前一个工作日日期小于等于今天 // 如果日期前一个工作日日期小于等于今天
if (currentTime.isBefore(LocalTime.of(15, 20)) || currentTime.equals(LocalTime.of(15, 20))) { if (currentTime.isBefore(LocalTime.of(15, 20)) || currentTime.equals(LocalTime.of(15, 20))) {
// 如果当前时间在15:20之前 // 如果当前时间在15:20之前
//判断当前时间是否为非工作日,如果是的话,预派时间需要为下个工作日
if (null != holidayMap.get(LocalDateTimeUtils.convertLDToDate(today))) {
TEmployeeInsuranceWorkDayVo newVoUnWork = new TEmployeeInsuranceWorkDayVo();
newVoUnWork.setRegistDate(LocalDateTimeUtils.convertLDToDate(today));
newVoUnWork.setType(CommonConstants.TWO_STRING);
getWorkDay(holidayMap, newVoUnWork);
vo.setPriDisDate(newVoUnWork.getRegistDate());
vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT));
} else {
vo.setPriDisDate(LocalDateTimeUtils.convertLDToDate(today)); vo.setPriDisDate(LocalDateTimeUtils.convertLDToDate(today));
vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT)); vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT));
}
} else { } else {
// 如果当前时间在15:20之后 // 如果当前时间在15:20之后
TEmployeeInsuranceWorkDayVo afterVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo afterVo = new TEmployeeInsuranceWorkDayVo();
...@@ -346,6 +363,12 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -346,6 +363,12 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
//预计生效日期 //预计生效日期
vo.setRegistDate(DateUtil.addDayByDate(newVo.getRegistDate(), CommonConstants.ONE_INT)); vo.setRegistDate(DateUtil.addDayByDate(newVo.getRegistDate(), CommonConstants.ONE_INT));
} }
if (Common.isNotNull(vo.getAddOrBatch()) && CommonConstants.ONE_STRING.equals(vo.getAddOrBatch())
&& vo.getRegistDate().toInstant().atZone(java.time.ZoneId.systemDefault())
.toLocalDate().isBefore(preRegistDate)) {
//针对新增如果保单开始日期小于入职日期那么保单开始日期等于入职日期
vo.setRegistDate(LocalDateTimeUtils.convertLDToDate(preRegistDate));
}
return vo; return vo;
} }
......
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