Commit fa54392c authored by fangxinjiang's avatar fangxinjiang

Merge branch 'MVP1.7.9' into MVP1.7.10

parents 1f32f109 ecbce6f6
...@@ -135,13 +135,10 @@ public class CustomerBusinessContoller { ...@@ -135,13 +135,10 @@ public class CustomerBusinessContoller {
if(mSetttleCustomerUserService.saveBatch(mSetttleCustomerUser.getList())){ if(mSetttleCustomerUserService.saveBatch(mSetttleCustomerUser.getList())){
//清除用户缓存 //清除用户缓存
R<SysUser> simpleUser = upmsDaprUtils.getSimpleUser(userId); R<SysUser> simpleUser = upmsDaprUtils.getSimpleUser(userId);
log.info("清除b端结算主体缓存开始");
if(null != simpleUser && null != simpleUser.getData()){ if(null != simpleUser && null != simpleUser.getData()){
SysUser user = simpleUser.getData(); SysUser user = simpleUser.getData();
log.info("清除b端结算主体缓存: "+ ServiceNameConstants.UMPS_SERVICE + "_user_details::" + user.getUsername());
redisUtil.remove(ServiceNameConstants.UMPS_SERVICE + "_user_details::" + user.getUsername()); redisUtil.remove(ServiceNameConstants.UMPS_SERVICE + "_user_details::" + user.getUsername());
if( Common.isNotNull(user.getPhone())){ if( Common.isNotNull(user.getPhone())){
log.info("清除b端结算主体缓存: "+ ServiceNameConstants.UMPS_SERVICE + "_user_details_phone::" + user.getPhone());
redisUtil.remove(ServiceNameConstants.UMPS_SERVICE + "_user_details_phone::" + user.getPhone()); redisUtil.remove(ServiceNameConstants.UMPS_SERVICE + "_user_details_phone::" + user.getPhone());
} }
// 清空userinfo // 清空userinfo
......
...@@ -25,7 +25,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.RegistParamVo; ...@@ -25,7 +25,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.RegistParamVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil;
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;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
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.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
...@@ -67,15 +70,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -67,15 +70,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired @Autowired
private InsuranceDaprUtil insuranceDaprUtil; private InsuranceDaprUtil insuranceDaprUtil;
@Autowired
private SocialDaprUtils socialDaprUtils;
@Autowired @Autowired
private CspDaprUtils cspDaprUtils; private CspDaprUtils cspDaprUtils;
@Autowired
private TEmployeeLogService tEmployeeLogService;
private final TEmployeePreLogService tEmployeePreLogService; private final TEmployeePreLogService tEmployeePreLogService;
private final TCompleteMonitorMapper completeMonitorMapper; private final TCompleteMonitorMapper completeMonitorMapper;
...@@ -509,17 +506,23 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -509,17 +506,23 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
preVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName()); preVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName());
preVo.setPolicyStart(insurancePreVo.getPolicyStart()); preVo.setPolicyStart(insurancePreVo.getPolicyStart());
preVo.setPolicyEnd(insurancePreVo.getPolicyEnd()); preVo.setPolicyEnd(insurancePreVo.getPolicyEnd());
checkVo = checkInsuranceExit(preVo); if (Common.isEmpty(insurancePreVo.getModelType())
if (null != checkVo) { || !CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) {
errorList.add(checkVo); checkVo = checkInsuranceExit(preVo);
} else { if (null != checkVo) {
if (Common.isNotNull(preVo.getProcessStatus())) { errorList.add(checkVo);
insurancePreVo.setProcessStatus(preVo.getProcessStatus());
} else { } else {
insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING); if (Common.isNotNull(preVo.getProcessStatus())) {
} insurancePreVo.setProcessStatus(preVo.getProcessStatus());
if (Common.isNotNull(preVo.getIsAddress())) { } else {
insurancePreVo.setIsAddress(preVo.getIsAddress()); insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING);
}
if (Common.isNotNull(preVo.getIsAddress())) {
insurancePreVo.setIsAddress(preVo.getIsAddress());
}
if (Common.isNotNull(preVo.getInsurancesId())) {
insurancePreVo.setInsurancesId(preVo.getInsurancesId());
}
} }
} }
} }
...@@ -684,7 +687,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -684,7 +687,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private void initInsurancePreInfo(EmployeeRegistrationPre registration, TEmployeeInsurancePre preVo, private void initInsurancePreInfo(EmployeeRegistrationPre registration, TEmployeeInsurancePre preVo,
YifuUser user, String id) { YifuUser user, String id) {
preVo.setRegisterId(id); preVo.setRegisterId(id);
preVo.setCustomerUsername(registration.getCustomerUsername()); preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname()); preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
preVo.setDeptName(registration.getDeptName()); preVo.setDeptName(registration.getDeptName());
preVo.setDeptId(registration.getDeptId()); preVo.setDeptId(registration.getDeptId());
...@@ -698,27 +701,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -698,27 +701,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
preVo.setCreateBy(user.getId()); preVo.setCreateBy(user.getId());
preVo.setCreateName(user.getNickname()); preVo.setCreateName(user.getNickname());
preVo.setUpdateBy(user.getId()); preVo.setUpdateBy(user.getId());
/*if (Common.isNotNull(preVo.getPolicyStartType()) && CommonConstants.ONE_STRING.equals(preVo.getPolicyStartType())) {
preVo.setPolicyStart(preVo.getJoinLeaveDate());
}
//预计派单日期
if (Common.isEmpty(preVo.getExpectedCollectionTime())) {
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.ONE_STRING);
if (preVo.getBuyType() ==1) {
dayVo.setRegistDate(preVo.getPolicyStart());
} else {
dayVo.setRegistDate(preVo.getJoinLeaveDate());
}
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getRegistDate());
} else {
preVo.setExpectedCollectionTime(preVo.getPolicyStart());
}
}*/
// 初始化preVo.setExpectedCollectionTime为15:20 // 初始化preVo.setExpectedCollectionTime为15:20
if (preVo.getExpectedCollectionTime() != null) { if (preVo.getExpectedCollectionTime() != null) {
preVo.setExpectedCollectionTime(preVo.getExpectedCollectionTime().withHour(15).withMinute(20)); preVo.setExpectedCollectionTime(preVo.getExpectedCollectionTime().withHour(15).withMinute(20));
...@@ -857,6 +839,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -857,6 +839,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
//是否地市自购 //是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress()); preVo.setIsAddress(insuranceDetail.getIsAdress());
preVo.setInsurancesId(insuranceDetail.getId());
} }
} }
} }
......
...@@ -227,7 +227,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -227,7 +227,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//查询项目档案 //查询项目档案
TEmployeeProject tEmployeeProject = employeeProjectMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject tEmployeeProject = employeeProjectMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, settleDomain.getDepartNo()) .eq(TEmployeeProject::getDeptNo, settleDomain.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TEmployeeProject::getEmpIdcard, fddContractAttachInfo.getEmpIdcard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
//查询人员档案 //查询人员档案
TEmployeeInfo tEmployeeInfo = employeeInfoService.getOne(Wrappers.<TEmployeeInfo>query().lambda().eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING) TEmployeeInfo tEmployeeInfo = employeeInfoService.getOne(Wrappers.<TEmployeeInfo>query().lambda().eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
...@@ -275,7 +277,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -275,7 +277,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
TEmployeeContractInfo employeeContractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo employeeContractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId()) .eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)); .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
//无可用合同 //无可用合同
if (null == employeeContractInfo) { if (null == employeeContractInfo) {
//新增合同 //新增合同
...@@ -410,7 +414,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -410,7 +414,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//查询员工合同 //查询员工合同
TEmployeeContractInfo employeeContractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo employeeContractInfo = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, attachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId()) .eq(TEmployeeContractInfo::getEmpIdcard, attachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (employeeContractInfo != null) { if (employeeContractInfo != null) {
long count = this.count(Wrappers.<FddContractAttachInfo>query().lambda().eq(FddContractAttachInfo::getContractId, employeeContractInfo.getId())); long count = this.count(Wrappers.<FddContractAttachInfo>query().lambda().eq(FddContractAttachInfo::getContractId, employeeContractInfo.getId()));
if (count > CommonConstants.ZERO_INT && attachInfo.getContractStart().before(employeeContractInfo.getContractEnd())) { if (count > CommonConstants.ZERO_INT && attachInfo.getContractStart().before(employeeContractInfo.getContractEnd())) {
...@@ -513,7 +519,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -513,7 +519,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
TEmployeeContractInfo employeeContractInfoValid = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo employeeContractInfoValid = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpName, attachInfo.getEmpName()).eq(TEmployeeContractInfo::getEmpIdcard, attachInfo.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpName, attachInfo.getEmpName()).eq(TEmployeeContractInfo::getEmpIdcard, attachInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).eq(TEmployeeContractInfo::getIsObsolete, CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).eq(TEmployeeContractInfo::getIsObsolete, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart())); .eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart())
.last(CommonConstants.LAST_ONE_SQL));
if (employeeContractInfoValid == null) { if (employeeContractInfoValid == null) {
errorList.add(new ErrorMessage(i, NO_VALID_CONTRACT_FOUND, CommonConstants.RED)); errorList.add(new ErrorMessage(i, NO_VALID_CONTRACT_FOUND, CommonConstants.RED));
continue; continue;
...@@ -531,7 +538,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -531,7 +538,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
.and(wrapper -> wrapper.and(wrapper2 -> wrapper2.eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart()) .and(wrapper -> wrapper.and(wrapper2 -> wrapper2.eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart())
.eq(TEmployeeContractInfo::getContractEnd, attachInfo.getContractEnd()).eq(TEmployeeContractInfo::getContractType, CommonConstants.ONE_STRING))//有合同截止日期 .eq(TEmployeeContractInfo::getContractEnd, attachInfo.getContractEnd()).eq(TEmployeeContractInfo::getContractType, CommonConstants.ONE_STRING))//有合同截止日期
.or(wrapper1 -> wrapper1.eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart()).in(TEmployeeContractInfo::getContractType, CommonConstants.ZERO_STRING, CommonConstants.TWO_STRING))//无合同截止时间 .or(wrapper1 -> wrapper1.eq(TEmployeeContractInfo::getContractStart, attachInfo.getContractStart()).in(TEmployeeContractInfo::getContractType, CommonConstants.ZERO_STRING, CommonConstants.TWO_STRING))//无合同截止时间
)); ).last(CommonConstants.LAST_ONE_SQL));
if (employeeContractInfo == null) { if (employeeContractInfo == null) {
errorList.add(new ErrorMessage(i, NO_VALID_CONTRACT_FOUND, CommonConstants.RED)); errorList.add(new ErrorMessage(i, NO_VALID_CONTRACT_FOUND, CommonConstants.RED));
continue; continue;
...@@ -591,7 +598,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -591,7 +598,9 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
TEmployeeInfo tEmployeeInfo, TCustomerInfo tCustomerInfo, TEmployeeProject tEmployeeProject) { TEmployeeInfo tEmployeeInfo, TCustomerInfo tCustomerInfo, TEmployeeProject tEmployeeProject) {
TEmployeeContractInfo employeeContractCount = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo employeeContractCount = employeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId()) .eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)); .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
//合同表里没有在用的合同 //合同表里没有在用的合同
if (null == employeeContractCount) { if (null == employeeContractCount) {
newEmployeeContractInfo.setEmpName(fddContractAttachInfo.getEmpName()); newEmployeeContractInfo.setEmpName(fddContractAttachInfo.getEmpName());
......
...@@ -287,7 +287,8 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe ...@@ -287,7 +287,8 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
} }
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoMapper.selectOne(Wrappers.<FddContractAttachInfo>query().lambda() FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoMapper.selectOne(Wrappers.<FddContractAttachInfo>query().lambda()
.eq(FddContractAttachInfo::getContractId,entity.getContractId())); .eq(FddContractAttachInfo::getContractId,entity.getContractId())
.last(CommonConstants.LAST_ONE_SQL));
if (!user.getId().equals(fddContractAttachInfo.getCreateBy())) { if (!user.getId().equals(fddContractAttachInfo.getCreateBy())) {
return R.failed("当前用户不是电子合同导入用户,不能操作"); return R.failed("当前用户不是电子合同导入用户,不能操作");
} }
...@@ -893,7 +894,9 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe ...@@ -893,7 +894,9 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
if (reviseTaskDetailR.getCode() != CommonConstants.SUCCESS) { if (reviseTaskDetailR.getCode() != CommonConstants.SUCCESS) {
return R.failed(reviseTaskDetailR.getMsg()); return R.failed(reviseTaskDetailR.getMsg());
} }
FddContractAttachInfo attachInfo = fddContractAttachInfoMapper.selectOne(Wrappers.<FddContractAttachInfo>query().lambda().eq(FddContractAttachInfo::getContractId, entity.getContractId())); FddContractAttachInfo attachInfo = fddContractAttachInfoMapper.selectOne(Wrappers.<FddContractAttachInfo>query().lambda()
.eq(FddContractAttachInfo::getContractId, entity.getContractId())
.last(CommonConstants.LAST_ONE_SQL));
int status = reviseTaskDetailR.getData(); int status = reviseTaskDetailR.getData();
CancelReviseTaskReq req = new CancelReviseTaskReq(); CancelReviseTaskReq req = new CancelReviseTaskReq();
if (status == CommonConstants.ZERO_INT || status == CommonConstants.ONE_INT) { if (status == CommonConstants.ZERO_INT || status == CommonConstants.ONE_INT) {
......
...@@ -174,7 +174,6 @@ public class FileUploadServiceImpl implements FileUploadService { ...@@ -174,7 +174,6 @@ public class FileUploadServiceImpl implements FileUploadService {
TAttaInfo attaInfo; TAttaInfo attaInfo;
URL url; URL url;
if (flag) { if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, 0); attaInfo = initUnitAttaForInsert(fileName, key, 0);
attaInfo.setRelationType(String.valueOf(type)); attaInfo.setRelationType(String.valueOf(type));
try { try {
......
...@@ -116,7 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -116,7 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle()) .eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(tSettleDomain)) { if (Common.isEmpty(tSettleDomain)) {
return R.failed("对应项目编码的项目已停止合作"); return R.failed("对应项目编码的项目已停止合作");
} }
...@@ -257,7 +259,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -257,7 +259,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getNewSettleCode()) .eq(TSettleDomain::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(tSettleDomain)) { if (Common.isEmpty(tSettleDomain)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getNewSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
} }
...@@ -565,7 +568,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -565,7 +568,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, vo.getNewDeptNo()) .eq(TSettleDomain::getDepartNo, vo.getNewDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(tSettleDomain)) { if (Common.isEmpty(tSettleDomain)) {
return R.failed("对应项目编码的项目已停止合作"); return R.failed("对应项目编码的项目已停止合作");
} }
......
...@@ -311,7 +311,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -311,7 +311,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
TEmployeePreLogDetail detailEmpLog = null; TEmployeePreLogDetail detailEmpLog = null;
if (Common.isNotNull(differenceKey) && !"insurancePreList".equals(differenceKey)) { if (Common.isNotNull(differenceKey) && !"insurancePreList".equals(differenceKey)) {
differenceKey = differenceKey.replace("insurancePreList",""); differenceKey = differenceKey.replace("insurancePreList","");
diffTitle = "档案信息"; diffTitle = "档案信息二次确认";
detailEmpLog = new TEmployeePreLogDetail(); detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.TWO_STRING); detailEmpLog.setModelType(CommonConstants.TWO_STRING);
detailEmpLog.setType(CommonConstants.ONE_STRING); detailEmpLog.setType(CommonConstants.ONE_STRING);
......
...@@ -635,32 +635,27 @@ ...@@ -635,32 +635,27 @@
</sql> </sql>
<update id="updateExcelEmpProject" parameterType="java.util.List"> <update id="updateExcelEmpProject" parameterType="java.util.List">
update t_employee_project <foreach collection="list" index="index" item="i" separator=";">
<set> update t_employee_project set
<foreach collection="list" item="i" separator=","> EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL), EMP_NATRUE = COALESCE(#{i.empNatrue}, EMP_NATRUE),
EMP_NATRUE = COALESCE(#{i.empNatrue}, EMP_NATRUE), EMP_IDCARD = COALESCE(#{i.empIdcard}, EMP_IDCARD),
EMP_IDCARD = COALESCE(#{i.empIdcard}, EMP_IDCARD), PROJECT_STATUS = 0,
PROJECT_STATUS = 0, UPDATE_TIME = now(),
UPDATE_TIME = now(), UPDATE_BY = COALESCE(#{i.updateBy}, UPDATE_BY),
UPDATE_BY = COALESCE(#{i.updateBy}, UPDATE_BY), DEPT_NO = COALESCE(#{i.deptNo}, DEPT_NO),
DEPT_NO = COALESCE(#{i.deptNo}, DEPT_NO), CONTRACT_TYPE = COALESCE(#{i.contractType}, CONTRACT_TYPE),
CONTRACT_TYPE = COALESCE(#{i.contractType}, CONTRACT_TYPE), WORKING_HOURS = COALESCE(#{i.workingHours}, WORKING_HOURS),
WORKING_HOURS = COALESCE(#{i.workingHours}, WORKING_HOURS), POST = COALESCE(#{i.post}, POST),
POST = COALESCE(#{i.post}, POST), TRY_PERIOD = COALESCE(#{i.tryPeriod}, TRY_PERIOD),
TRY_PERIOD = COALESCE(#{i.tryPeriod}, TRY_PERIOD), ENJOIN_DATE = COALESCE(#{i.enjoinDate}, ENJOIN_DATE),
ENJOIN_DATE = COALESCE(#{i.enjoinDate}, ENJOIN_DATE), BANK_NAME = COALESCE(#{i.bankName}, BANK_NAME),
BANK_NAME = COALESCE(#{i.bankName}, BANK_NAME), BANK_NO = COALESCE(#{i.bankNo}, BANK_NO),
BANK_NO = COALESCE(#{i.bankNo}, BANK_NO), BANK_SUB_NAME = COALESCE(#{i.bankSubName}, BANK_SUB_NAME)
BANK_SUB_NAME = COALESCE(#{i.bankSubName}, BANK_SUB_NAME) where id = #{i.id}
</foreach>
</set>
where id in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.id}
</foreach> </foreach>
</update> </update>
<insert id="insertExcelEmpProject" parameterType="java.util.List"> <insert id="insertExcelEmpProject" parameterType="java.util.List">
insert into t_employee_project insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST, (ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
...@@ -708,24 +703,21 @@ ...@@ -708,24 +703,21 @@
) )
</foreach> </foreach>
</insert> </insert>
<update id="updateReduceEmpProject" parameterType="java.util.List"> <update id="updateReduceEmpProject" parameterType="java.util.List">
update t_employee_project <foreach collection="list" index="index" item="i" separator=";">
<set> update t_employee_project
<foreach collection="list" item="i" separator=","> set
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL), EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
PROJECT_STATUS = 1, PROJECT_STATUS = 1,
LEAVE_TIME = now(), LEAVE_TIME = now(),
LEAVE_REASON = COALESCE(#{i.leaveReason}, LEAVE_REASON), LEAVE_REASON = COALESCE(#{i.leaveReason}, LEAVE_REASON),
LEAVE_USER = COALESCE(#{i.leaveUser}, LEAVE_USER), LEAVE_USER = COALESCE(#{i.leaveUser}, LEAVE_USER),
LEAVE_REMARK = COALESCE(#{i.leaveRemark}, LEAVE_REMARK) LEAVE_REMARK = COALESCE(#{i.leaveRemark}, LEAVE_REMARK)
</foreach> where id = #{i.id}
</set>
where id in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.id}
</foreach> </foreach>
</update> </update>
<!--查询部门编码和最大员工数--> <!--查询部门编码和最大员工数-->
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String"> <select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
select MAX(EMP_NO) from t_employee_project where select MAX(EMP_NO) from t_employee_project where
......
...@@ -572,7 +572,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -572,7 +572,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insurancePreVo.setEmpIdcard(registration.getEmpIdcard()); insurancePreVo.setEmpIdcard(registration.getEmpIdcard());
insurancePreVo.setDeptNo(registration.getDeptNo()); insurancePreVo.setDeptNo(registration.getDeptNo());
//商险是否存在判断 //商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo,preVo.getEmployeeName(),preVo.getEmpIdcard()); checkVo = checkInsuranceExit(insurancePreVo,registration.getEmployeeName(),registration.getEmpIdcard());
if (null != checkVo) { if (null != checkVo) {
errorList.add(checkVo); errorList.add(checkVo);
} else { } else {
...@@ -697,7 +697,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -697,7 +697,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
exitCheckVo.setBuyStandard(insurancePreVo.getBuyStandard()); exitCheckVo.setBuyStandard(insurancePreVo.getBuyStandard());
exitCheckVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName()); exitCheckVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName());
exitCheckVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName()); exitCheckVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName());
exitCheckVo.setErrorMsg("入职日期需要小于保单截止日期/保单开始日期需小于等于保单截止日期"); exitCheckVo.setErrorMsg("入职日期需要小于等于保单截止日期/保单开始日期需小于等于保单截止日期");
errorList.add(exitCheckVo); errorList.add(exitCheckVo);
continue; continue;
} }
...@@ -750,8 +750,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -750,8 +750,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
EmployeeRegistrationBatchErrorVo batchErrorVo = new EmployeeRegistrationBatchErrorVo(); EmployeeRegistrationBatchErrorVo batchErrorVo = new EmployeeRegistrationBatchErrorVo();
batchErrorVo.setErrorList(errorList);
batchErrorVo.setRegistrationReceiveVoList(receiveVoList); batchErrorVo.setRegistrationReceiveVoList(receiveVoList);
batchErrorVo.setErrorList(errorList);
if (!errorList.isEmpty()) { if (!errorList.isEmpty()) {
return R.other(CommonConstants.TWO_INT, null, batchErrorVo); return R.other(CommonConstants.TWO_INT, null, batchErrorVo);
} }
...@@ -1205,7 +1205,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1205,7 +1205,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
private void initRegistPreInfo(EmployeeRegistration registration,EmployeeRegistrationPreVo preVo, private void initRegistPreInfo(EmployeeRegistration registration,EmployeeRegistrationPreVo preVo,
YifuUser user,String status) throws ParseException { YifuUser user,String status) throws ParseException {
preVo.setId(registration.getId()); preVo.setId(registration.getId());
preVo.setCustomerUsername(registration.getCustomerUsername()); preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname()); preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
preVo.setDeptName(registration.getDeptName()); preVo.setDeptName(registration.getDeptName());
preVo.setDeptId(registration.getDeptId()); preVo.setDeptId(registration.getDeptId());
...@@ -1215,7 +1215,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1215,7 +1215,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setConfirmTime(DateUtil.getCurrentDateTime()); preVo.setConfirmTime(DateUtil.getCurrentDateTime());
preVo.setDeptNo(registration.getDeptNo()); preVo.setDeptNo(registration.getDeptNo());
preVo.setConfirmUser(user.getNickname()); preVo.setConfirmUser(user.getNickname());
preVo.setCustomerUsernameNew(registration.getCustomerUsername()); preVo.setCustomerUsernameNew(registration.getCustomerUsernameNew());
preVo.setEmpPhone(registration.getEmpPhone()); preVo.setEmpPhone(registration.getEmpPhone());
preVo.setEmployeeName(registration.getEmployeeName()); preVo.setEmployeeName(registration.getEmployeeName());
preVo.setEmpIdcard(registration.getEmpIdcard()); preVo.setEmpIdcard(registration.getEmpIdcard());
...@@ -1233,7 +1233,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1233,7 +1233,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
private void initInsruancePreInfo(EmployeeRegistration registration,TEmployeeInsurancePreVo preVo, private void initInsruancePreInfo(EmployeeRegistration registration,TEmployeeInsurancePreVo preVo,
YifuUser user,String id) throws ParseException { YifuUser user,String id) throws ParseException {
preVo.setRegisterId(id); preVo.setRegisterId(id);
preVo.setCustomerUsername(registration.getCustomerUsername()); preVo.setCustomerUsername(registration.getCustomerUsernameNew());
preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname()); preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
preVo.setDeptName(registration.getDeptName()); preVo.setDeptName(registration.getDeptName());
preVo.setDeptId(registration.getDeptId()); preVo.setDeptId(registration.getDeptId());
......
...@@ -4,12 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema; ...@@ -4,12 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
/** /**
* @author licancan * @author huyc
* @description 商险办理批增入参 * @description 商险办理批增入参
* @date 2022-07-20 08:43:31 * @date 2025-04-3 08:43:31
*/ */
@Data @Data
@Schema(description = "商险办理单个/批量批增入参") @Schema(description = "商险办理单个/批量批增入参")
...@@ -146,4 +145,10 @@ public class InsuranceAutoParam implements Serializable { ...@@ -146,4 +145,10 @@ public class InsuranceAutoParam implements Serializable {
@Schema(description = "替换员工项目编码") @Schema(description = "替换员工项目编码")
private String replaceDeptNo; private String replaceDeptNo;
/**
* 商险待购买id
*/
@Schema(description = "商险待购买id")
private String insurancePreId;
} }
...@@ -251,19 +251,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -251,19 +251,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
List<InsuranceReplaceParam> replaceParamList = new ArrayList<>(); List<InsuranceReplaceParam> replaceParamList = new ArrayList<>();
if (!addParamList.isEmpty()) { if (!addParamList.isEmpty()) {
R<List<InsuranceAddParam>> listR = detailService.addInsurance(addParamList,null); R<List<InsuranceAddParam>> listR = detailService.addInsurance(addParamList,null);
if (Common.isNotNull(listR) && !listR.getData().isEmpty()) { if (Common.isNotNull(listR) && Common.isNotNull(listR.getData()) && !listR.getData().isEmpty()) {
paramList = listR.getData(); paramList = listR.getData();
} }
} }
if (!batchAddParamList.isEmpty()) { if (!batchAddParamList.isEmpty()) {
R<List<InsuranceBatchParam>> listR = detailService.batchInsurance(batchAddParamList,null); R<List<InsuranceBatchParam>> listR = detailService.batchInsurance(batchAddParamList,null);
if (Common.isNotNull(listR) && !listR.getData().isEmpty()) { if (Common.isNotNull(listR) && Common.isNotNull(listR.getData()) && !listR.getData().isEmpty()) {
batchParamList = listR.getData(); batchParamList = listR.getData();
} }
} }
if (!replaceAddParamList.isEmpty()) { if (!replaceAddParamList.isEmpty()) {
R<List<InsuranceReplaceParam>> listR = detailService.replaceInsurance(replaceAddParamList,null); R<List<InsuranceReplaceParam>> listR = detailService.replaceInsurance(replaceAddParamList,null);
if (Common.isNotNull(listR) && !listR.getData().isEmpty()) { if (Common.isNotNull(listR) && Common.isNotNull(listR.getData()) && !listR.getData().isEmpty()) {
replaceParamList = listR.getData(); replaceParamList = listR.getData();
} }
} }
...@@ -282,28 +282,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -282,28 +282,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING); .set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING);
this.update(updateWrapper); this.update(updateWrapper);
} else { } else {
// 将 autoAddParamList 中的身份证和项目等信息提取出来,放入一个 Set 中 // 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中
Set<String> autoAddParamSet = autoAddParamList.stream() Set<String> autoAddParamSet = autoAddParamList.stream()
.map(param -> param.getEmpIdcardNo() + "-" + param.getDeptNo() .map(InsuranceAutoParam::getInsurancePreId)
+ "-" + param.getBuyStandard()+ "-" + param.getInsuranceTypeName()
+ "-" + param.getInsuranceCompanyName() + "-" + param.getPolicyStart()
+ "-" + param.getPolicyEnd())
.collect(Collectors.toSet()); .collect(Collectors.toSet());
// 找出 insurancePreList 中在 autoAddParamList 中存在的数据 // 找出 insurancePreList 中在 autoAddParamList 中存在的数据
List<TEmployeeInsurancePre> existingList = insurancePreList.stream() List<TEmployeeInsurancePre> existingList = insurancePreList.stream()
.filter(pre -> autoAddParamSet.contains(pre.getEmpIdcard() + "-" + pre.getDeptNo() .filter(pre -> autoAddParamSet.contains(pre.getId()))
+ "-" + pre.getBuyStandard()+ "-" + pre.getInsuranceTypeName()
+ "-" + pre.getInsuranceCompanyName() + "-" + DateUtil.dateToString(pre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)
+ "-" + DateUtil.dateToString(pre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 找出 insurancePreList 中在 autoAddParamList 中不存在的数据 // 找出 insurancePreList 中在 autoAddParamList 中不存在的数据
List<TEmployeeInsurancePre> nonExistingList = insurancePreList.stream() List<TEmployeeInsurancePre> nonExistingList = insurancePreList.stream()
.filter(pre -> !autoAddParamSet.contains(pre.getEmpIdcard() + "-" + pre.getDeptNo() .filter(pre -> !autoAddParamSet.contains(pre.getId()))
+ "-" + pre.getBuyStandard()+ "-" + pre.getInsuranceTypeName()
+ "-" + pre.getInsuranceCompanyName() + "-" + DateUtil.dateToString(pre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)
+ "-" + DateUtil.dateToString(pre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.collect(Collectors.toList()); .collect(Collectors.toList());
//派单成功的更新状态为代投保,派单失败更新成派单失败 //派单成功的更新状态为代投保,派单失败更新成派单失败
if (!existingList.isEmpty()){ if (!existingList.isEmpty()){
...@@ -496,6 +487,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -496,6 +487,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setPost(addParam.getPost()); autoParam.setPost(addParam.getPost());
autoParam.setRemark(addParam.getRemark()); autoParam.setRemark(addParam.getRemark());
autoParam.setErrorMessage(addParam.getErrorMessage()); autoParam.setErrorMessage(addParam.getErrorMessage());
autoParam.setInsurancePreId(addParam.getInsurancePreId());
return autoParam; return autoParam;
} }
...@@ -515,6 +507,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -515,6 +507,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setPost(batchParam.getPost()); autoParam.setPost(batchParam.getPost());
autoParam.setRemark(batchParam.getRemark()); autoParam.setRemark(batchParam.getRemark());
autoParam.setErrorMessage(batchParam.getErrorMessage()); autoParam.setErrorMessage(batchParam.getErrorMessage());
autoParam.setInsurancePreId(batchParam.getInsurancePreId());
return autoParam; return autoParam;
} }
...@@ -534,6 +527,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -534,6 +527,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setReplaceDeptNo(replaceParam.getReplaceDeptNo()); autoParam.setReplaceDeptNo(replaceParam.getReplaceDeptNo());
autoParam.setReplaceEmpIdcardNo(replaceParam.getReplaceEmpIdcardNo()); autoParam.setReplaceEmpIdcardNo(replaceParam.getReplaceEmpIdcardNo());
autoParam.setErrorMessage(replaceParam.getErrorMessage()); autoParam.setErrorMessage(replaceParam.getErrorMessage());
autoParam.setInsurancePreId(replaceParam.getInsurancePreId());
return autoParam; return autoParam;
} }
......
...@@ -153,13 +153,13 @@ ...@@ -153,13 +153,13 @@
</if> </if>
<if test="tEmployeeInsurancePre.deptId != null and tEmployeeInsurancePre.deptId.trim() != ''"> <if test="tEmployeeInsurancePre.deptId != null and tEmployeeInsurancePre.deptId.trim() != ''">
AND a.dept_id = #{tEmployeeInsurancePre.deptId} AND a.dept_id = #{tEmployeeInsurancePre.deptId}
</if>
<if test="tEmployeeInsurancePre.expectedCollectionTime != null">
AND a.expected_collection_time = #{tEmployeeInsurancePre.expectedCollectionTime}
</if> </if>
<if test="tEmployeeInsurancePre.registTimeStart != null"> <if test="tEmployeeInsurancePre.registTimeStart != null">
AND a.regist_time <![CDATA[ >= ]]> #{tEmployeeInsurancePre.registTimeStart} AND a.regist_time <![CDATA[ >= ]]> #{tEmployeeInsurancePre.registTimeStart}
</if> </if>
<if test="tEmployeeInsurancePre.expectedCollectionTime != null">
AND DATE_FORMAT(a.expected_collection_time,'%Y-%m-%d') = CURDATE()
</if>
<if test="tEmployeeInsurancePre.registTimeEnd != null"> <if test="tEmployeeInsurancePre.registTimeEnd != null">
and a.regist_time <![CDATA[ <= ]]> #{tEmployeeInsurancePre.registTimeEnd} and a.regist_time <![CDATA[ <= ]]> #{tEmployeeInsurancePre.registTimeEnd}
</if> </if>
......
...@@ -2144,7 +2144,7 @@ ...@@ -2144,7 +2144,7 @@
a.INSURANCE_CITY as insuranceCity, a.INSURANCE_CITY as insuranceCity,
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.POLICY_NO is not null and a.POLICY_NO != "" where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 3 and a.POLICY_NO is not null and a.POLICY_NO != ""
<if test="param.policyNo != null and param.policyNo.trim() != ''"> <if test="param.policyNo != null and param.policyNo.trim() != ''">
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%') and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if> </if>
......
...@@ -108,7 +108,7 @@ public class TPaymentInfoController { ...@@ -108,7 +108,7 @@ public class TPaymentInfoController {
if (null != res){ if (null != res){
return res; return res;
} }
return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo)); return tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo);
} }
/** /**
* 实缴查询详情 * 实缴查询详情
......
...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param tPaymentInfo 缴费库 * @param tPaymentInfo 缴费库
* @return * @return
*/ */
IPage<TPaymentInfoNewVo> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo); R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo);
/** /**
* 缴费库查询详情 * 缴费库查询详情
......
...@@ -349,7 +349,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -349,7 +349,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfo = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda() socialFundInfo = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getEmpIdcard, empIdCard) .eq(TSocialFundInfo::getEmpIdcard, empIdCard)
.eq(TSocialFundInfo::getSettleDomain, library.getSettleDomainId()) .eq(TSocialFundInfo::getSettleDomain, library.getSettleDomainId())
.eq(TSocialFundInfo::getSocialHousehold, library.getSocialHousehold())); .eq(TSocialFundInfo::getSocialHousehold, library.getSocialHousehold())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(socialFundInfo) && (Common.isNotNull(socialFundInfo.getSocialId()) if (Common.isNotNull(socialFundInfo) && (Common.isNotNull(socialFundInfo.getSocialId())
&& CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus()) && CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus()))) { || CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus()))) {
...@@ -363,7 +364,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -363,7 +364,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfoF = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda() socialFundInfoF = socialFundInfoMapper.selectOne(Wrappers.<TSocialFundInfo>query().lambda()
.eq(TSocialFundInfo::getEmpIdcard, empIdCard) .eq(TSocialFundInfo::getEmpIdcard, empIdCard)
.eq(TSocialFundInfo::getSettleDomain, library.getSettleDomainId()) .eq(TSocialFundInfo::getSettleDomain, library.getSettleDomainId())
.eq(TSocialFundInfo::getProvidentHousehold, library.getProvidentHousehold())); .eq(TSocialFundInfo::getProvidentHousehold, library.getProvidentHousehold())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(socialFundInfoF) && (Common.isNotNull(socialFundInfoF.getFundId()) if (Common.isNotNull(socialFundInfoF) && (Common.isNotNull(socialFundInfoF.getFundId())
&& CommonConstants.THREE_STRING.equals(socialFundInfoF.getFundStatus()))) { && CommonConstants.THREE_STRING.equals(socialFundInfoF.getFundStatus()))) {
//办理成功生成收入 //办理成功生成收入
......
...@@ -188,10 +188,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -188,10 +188,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @return * @return
*/ */
@Override @Override
public IPage<TPaymentInfoNewVo> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//如果是含身份证查询直接查询走索引,无需走特殊处理逻辑,身份证查询量不会大 //如果是含身份证查询直接查询走索引,无需走特殊处理逻辑,身份证查询量不会大
if (Common.isNotNull(tPaymentInfo.getEmpIdcard())){ if (Common.isNotNull(tPaymentInfo.getEmpIdcard())){
return baseMapper.getTPaymentInfoNewPage(page, tPaymentInfo); return R.ok(baseMapper.getTPaymentInfoNewPage(page, tPaymentInfo));
} }
Page<TPaymentInfoNewVo> pageNew = new Page<>(); Page<TPaymentInfoNewVo> pageNew = new Page<>();
pageNew.setSize(page.getSize()); pageNew.setSize(page.getSize());
...@@ -210,7 +210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -210,7 +210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (totalCount > ((page.getCurrent() - 1) * page.getSize())) { if (totalCount > ((page.getCurrent() - 1) * page.getSize())) {
pageNew.setRecords(getPageData(tPaymentInfo,pageNew,totalCount)); pageNew.setRecords(getPageData(tPaymentInfo,pageNew,totalCount));
} }
return pageNew; return R.ok(pageNew);
} }
/** /**
* @Author fxj * @Author fxj
...@@ -5384,6 +5384,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5384,6 +5384,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public R<IPage<TPaymentInfo>> specialHandle(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfo>> specialHandle(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//确认为大户查询或安徽省或安徽省合肥市单独查询提示选择更多条件
String res = searchCheck(tPaymentInfo);
if (Common.isNotNull(res)){
return R.failed(res);
}
//判断社保户 //判断社保户
if (socialFlag(tPaymentInfo)){ if (socialFlag(tPaymentInfo)){
return getLock(page, tPaymentInfo); return getLock(page, tPaymentInfo);
...@@ -5397,6 +5402,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5397,6 +5402,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public R<IPage<TPaymentInfoNewVo>> specialHandleNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfoNewVo>> specialHandleNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
//确认为大户查询或安徽省或安徽省合肥市单独查询提示选择更多条件
String res = searchCheck(tPaymentInfo);
if (Common.isNotNull(res)){
return R.failed(res);
}
//判断社保户 //判断社保户
if (socialFlag(tPaymentInfo)){ if (socialFlag(tPaymentInfo)){
return getLockNew(page, tPaymentInfo); return getLockNew(page, tPaymentInfo);
...@@ -5415,7 +5425,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5415,7 +5425,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
requestId = RedisDistributedLock.getLock(keyTemp,"120"); requestId = RedisDistributedLock.getLock(keyTemp,"120");
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
//查询数据 //查询数据
return new R<>(this.getTPaymentInfoNewPage(page, tPaymentInfo)); return this.getTPaymentInfoNewPage(page, tPaymentInfo);
} else { } else {
return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH); return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH);
} }
...@@ -5480,4 +5490,44 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5480,4 +5490,44 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
public String searchCheck(TPaymentInfoSearchVo searchVo){
boolean flag = Common.isEmpty(searchVo.getEmpIdcard())
&& Common.isEmpty(searchVo.getSocialSecurityNo())
&& Common.isEmpty(searchVo.getUnitName())
&& Common.isEmpty(searchVo.getSettleDomainName())
&& Common.isEmpty(searchVo.getSocialCreateMonth())
&& Common.isEmpty(searchVo.getSocialPayMonth())
&& Common.isEmpty(searchVo.getCreateName())
&& null == searchVo.getCreateTimeEnd()
&& Common.isEmpty(searchVo.getSecondIndicatorBelong())
&& Common.isEmpty(searchVo.getPushStatus())
&& Common.isEmpty(searchVo.getLockStatus());
// 单独处理户数据查询
if (flag && Common.isEmpty(searchVo.getSocialProvince())){
// 只有社保户
if (Common.isNotNull(searchVo.getSocialHousehold()) && !Common.isNotNull(searchVo.getProvidentHousehold())){
//特殊处理皖信户
if ("安徽皖信人力资源管理有限公司".equals(searchVo.getSocialHousehold())){
return "当前条件查询量较大,请选择更多条件";
}
}
//只有公积金户
if (Common.isNotNull(searchVo.getProvidentHousehold()) && !Common.isNotNull(searchVo.getSocialHousehold())){
//特殊处理皖信户
if ("安徽皖信人力资源管理有限公司".equals(searchVo.getProvidentHousehold())){
return "当前条件查询量较大,请选择更多条件";
}
}
}
// 单独处理区域数据
if (flag && Common.isEmpty(searchVo.getSocialHousehold())
&& Common.isEmpty(searchVo.getProvidentHousehold())){
if ((Common.isEmpty(searchVo.getSocialCity()) && "12".equals(searchVo.getSocialProvince()))
||(Common.isEmpty(searchVo.getSocialTown()) && "135".equals(searchVo.getSocialCity()))){
return "当前条件查询量较大,请选择更多条件";
}
}
return null;
}
} }
...@@ -12,11 +12,14 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog; ...@@ -12,11 +12,14 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendBackLog;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Base64; import java.util.Base64;
/** /**
...@@ -30,6 +33,8 @@ public class ExcelToImage { ...@@ -30,6 +33,8 @@ public class ExcelToImage {
private final static String toImag ="\\ToImg.png"; private final static String toImag ="\\ToImg.png";
private static final String TO_IMAGE_TEMP ="\\ToImgTemp.png";
private final static String toImagParamError = ":带印章excel生成图片传参异常"; private final static String toImagParamError = ":带印章excel生成图片传参异常";
private final static String toImagConvertError = ":ExcelToImage转换异常-"; private final static String toImagConvertError = ":ExcelToImage转换异常-";
...@@ -55,6 +60,8 @@ public class ExcelToImage { ...@@ -55,6 +60,8 @@ public class ExcelToImage {
// 上传税友文件服务器,返回文件路径 // 上传税友文件服务器,返回文件路径
file = new File(projectRoot+toImag); file = new File(projectRoot+toImag);
if (file.exists()){ if (file.exists()){
// file 压缩到1M以内
file = compressImage(projectRoot, toImag, 1024 * 1024);
String key = System.currentTimeMillis() + file.getName(); String key = System.currentTimeMillis() + file.getName();
byte[] fileContent = Files.readAllBytes(file.toPath()); byte[] fileContent = Files.readAllBytes(file.toPath());
String base64String = Base64.getEncoder().encodeToString(fileContent); String base64String = Base64.getEncoder().encodeToString(fileContent);
...@@ -80,6 +87,24 @@ public class ExcelToImage { ...@@ -80,6 +87,24 @@ public class ExcelToImage {
} }
return R.failed(CommonConstants.RESULT_DATA_FAIL); return R.failed(CommonConstants.RESULT_DATA_FAIL);
} }
//压缩文件到指定大小
private File compressImage(String projectRoot, String toImag, int maxSize) throws IOException {
File originalFile = Paths.get(projectRoot, toImag).toFile();
BufferedImage image = ImageIO.read(originalFile);
int quality = 100; // 从100%开始
File compressedFile = new File(projectRoot, TO_IMAGE_TEMP);
while (originalFile.length() > maxSize && quality > 10) {
quality -= 5;
ImageIO.write(image, "png", compressedFile);
if (compressedFile.length() < maxSize) {
originalFile.delete();
compressedFile.renameTo(originalFile);
break;
}
compressedFile.delete();
}
return originalFile;
}
public R<URL> excelToImg(InputStream inputStream ,OSSUtil ossUtil){ public R<URL> excelToImg(InputStream inputStream ,OSSUtil ossUtil){
if (null == inputStream || null == ossUtil){ if (null == inputStream || null == ossUtil){
return R.failed(CommonConstants.RESULT_DATA_FAIL+toImagParamError); return R.failed(CommonConstants.RESULT_DATA_FAIL+toImagParamError);
......
...@@ -2271,6 +2271,12 @@ ...@@ -2271,6 +2271,12 @@
<if test="tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''"> <if test="tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''">
AND a.SOCIAL_ID = #{tDispatchInfo.socialId} AND a.SOCIAL_ID = #{tDispatchInfo.socialId}
</if> </if>
<if test="tDispatchInfo.socialIdList != null and tDispatchInfo.socialIdList.size > 0 ">
AND a.SOCIAL_ID in
<foreach item="items" index="index" collection="tDispatchInfo.socialIdList" open="(" separator="," close=")">
#{items}
</foreach>
</if>
<if test="tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'"> <if test="tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'">
AND a.STATUS = '2' AND a.STATUS = '2'
</if> </if>
......
...@@ -3881,57 +3881,48 @@ ...@@ -3881,57 +3881,48 @@
) z GROUP BY z.EMP_ID ) z GROUP BY z.EMP_ID
</select> </select>
<select id="selectCountPaymentSearchInfoSocial" resultType="java.lang.Integer"> <select id="selectCountPaymentSearchInfoSocial" resultType="java.lang.Integer">
select count(1) as 'count' from (
SELECT SELECT
<!--<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null"> count(1)
distinct a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
distinct a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
</if>-->
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)) as 'count'
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)) as 'count'
</when>
<otherwise>
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count'
</otherwise>
</choose>
FROM t_payment_info a FROM t_payment_info a
<where> <where>
<include refid="tPaymentInfo_export_count_where"/> <include refid="tPaymentInfo_export_count_where"/>
</where> </where>
</select> group by
<select id="selectCountPaymentSearchInfoSocialByLimit" resultType="java.lang.Integer">
SELECT
<!--<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
distinct a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
distinct a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
</if>-->
<choose> <choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null"> <when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)) as 'count' CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)
</when> </when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"> <when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)) as 'count' CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)
</when> </when>
<otherwise> <otherwise>
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count' CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))
</otherwise> </otherwise>
</choose> </choose>
) g
</select>
<select id="selectCountPaymentSearchInfoSocialByLimit" resultType="java.lang.Integer">
select count(1) as 'count' from (
SELECT
count(1)
FROM t_payment_info a FROM t_payment_info a
<where> <where>
<include refid="tPaymentInfo_export_count_where"/> <include refid="tPaymentInfo_export_count_where"/>
</where> </where>
group by
<choose>
<when test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != '' and tPaymentInfo.socialHousehold == null">
CONCAT(a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH)
</when>
<when test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)
</when>
<otherwise>
CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))
</otherwise>
</choose>
) g
limit 20001 limit 20001
</select> </select>
<select id="selectCountPaymentSearchInfoFund" resultType="java.lang.Integer"> <select id="selectCountPaymentSearchInfoFund" resultType="java.lang.Integer">
......
...@@ -232,22 +232,17 @@ ...@@ -232,22 +232,17 @@
</insert> </insert>
<update id="batchUpdateUser" parameterType="java.util.List"> <update id="batchUpdateUser" parameterType="java.util.List">
update sys_user <foreach collection="list" index="index" item="i" separator=";">
<set> update sys_user
<foreach collection="list" item="i" separator=","> set
phone = COALESCE(#{i.telephoneNumber}, phone), phone = COALESCE(#{i.telephoneNumber}, phone),
update_time = now(), update_time = now(),
email = COALESCE(#{i.email}, email), email = COALESCE(#{i.email}, email),
nickname = COALESCE(#{i.personName}, nickname), nickname = COALESCE(#{i.personName}, nickname),
password = COALESCE(#{i.password}, password), password = COALESCE(#{i.password}, password),
dept_id = COALESCE(#{i.deptId}, dept_id), dept_id = COALESCE(#{i.deptId}, dept_id),
dept_name = COALESCE(#{i.deptName}, dept_name) dept_name = COALESCE(#{i.deptName}, dept_name)
</foreach> where username = #{i.uid}
</set>
where username in
<foreach item="i" index="index" collection="list" open="("
separator="," close=")">
#{i.uid}
</foreach> </foreach>
</update> </update>
......
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