Commit 182d4402 authored by hongguangwu's avatar hongguangwu

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

parents a6e646a9 a8e96132
...@@ -227,12 +227,47 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -227,12 +227,47 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
.eq(EmployeeRegistrationPre::getDeptNo, preVo.getDeptNo()) .eq(EmployeeRegistrationPre::getDeptNo, preVo.getDeptNo())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
EmployeeRegistrationPre pre = new EmployeeRegistrationPre(); EmployeeRegistrationPre pre = new EmployeeRegistrationPre();
BeanUtils.copyProperties(preVo,pre);
if (Common.isNotNull(preExit)) { if (Common.isNotNull(preExit)) {
pre.setId(pre.getId()); pre.setId(preExit.getId());
baseMapper.deleteById(pre); baseMapper.deleteById(preExit);
// if (Common.isNotNull(preVo.getServerItem())) {
// pre.setServerItem(preVo.getServerItem());
// }
// if (Common.isNotNull(preVo.getFileProvince())) {
// pre.setFileProvince(preVo.getFileProvince());
// }
// if (Common.isNotNull(preVo.getFileCity())) {
// pre.setFileCity(preVo.getFileCity());
// }
// if (Common.isNotNull(preVo.getFileTown())) {
// pre.setFileTown(preVo.getFileTown());
// } else {
// pre.setFileTown(null);
// }
// if (Common.isNotNull(preVo.getProvinceCode())) {
// pre.setProvinceCode(preVo.getProvinceCode());
// }
// if (Common.isNotNull(preVo.getCityCode())) {
// pre.setCityCode(preVo.getCityCode());
// }
// if (Common.isNotNull(preVo.getTownCode())) {
// pre.setTownCode(preVo.getTownCode());
// } else {
// pre.setTownCode(null);
// }
// if (Common.isNotNull(preVo.getContractType())) {
// pre.setContractType(preVo.getContractType());
// }
// if (Common.isNotNull(preVo.getEmpNature())) {
// pre.setEmpNature(preVo.getEmpNature());
// }
// if (Common.isNotNull(preVo.getContractSubName())) {
// pre.setContractSubName(preVo.getContractSubName());
// }else {
// pre.setContractSubName(null);
// }
} }
BeanUtils.copyProperties(preVo,pre);
if (Common.isNotNull(preVo.getExpectedCollectionTime())) { if (Common.isNotNull(preVo.getExpectedCollectionTime())) {
pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime())); pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
} }
...@@ -389,13 +424,14 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -389,13 +424,14 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Override @Override
public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) { public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) {
//获取短信待发放和信息待填写的数据 //获取短信待发放和信息待填写的数据
List<String> errorList = new ArrayList<>();
if (CommonConstants.ONE_STRING.equals(type)) {
for(SendMessageUpdateVo updateVo:voList) {
RegistParamVo paramVo = new RegistParamVo(); RegistParamVo paramVo = new RegistParamVo();
List<RegistParamVo> params = new ArrayList<>(); List<RegistParamVo> params = new ArrayList<>();
List<String> phones = new ArrayList<>(); List<String> phones = new ArrayList<>();
EmployeeRegistrationPre updatePre; EmployeeRegistrationPre updatePre;
AliSmsResult res; AliSmsResult res;
if (CommonConstants.ONE_STRING.equals(type)) {
for(SendMessageUpdateVo updateVo:voList) {
updatePre = baseMapper.selectOne(Wrappers.<EmployeeRegistrationPre>query() updatePre = baseMapper.selectOne(Wrappers.<EmployeeRegistrationPre>query()
.lambda().eq(EmployeeRegistrationPre::getId, updateVo.getId()) .lambda().eq(EmployeeRegistrationPre::getId, updateVo.getId())
.in(EmployeeRegistrationPre::getProcessStatus, CommonConstants.processStatus) .in(EmployeeRegistrationPre::getProcessStatus, CommonConstants.processStatus)
...@@ -428,12 +464,18 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -428,12 +464,18 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} else { } else {
smsEmployee.setMessage("短信发送失败"); smsEmployee.setMessage("短信发送失败");
employeeService.updateById(smsEmployee); employeeService.updateById(smsEmployee);
errorList.add("短信发送失败");
} }
} }
} }
} else { } else {
TEmployeeInfo info; TEmployeeInfo info;
for(SendMessageUpdateVo updateVo:voList) { for(SendMessageUpdateVo updateVo:voList) {
RegistParamVo paramVo = new RegistParamVo();
List<RegistParamVo> params = new ArrayList<>();
List<String> phones = new ArrayList<>();
EmployeeRegistrationPre updatePre;
AliSmsResult res;
info = employeeInfoMapper.selectById(updateVo.getId()); info = employeeInfoMapper.selectById(updateVo.getId());
if (Common.isNotNull(info)) { if (Common.isNotNull(info)) {
paramVo.setName(info.getEmpName()); paramVo.setName(info.getEmpName());
...@@ -471,9 +513,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -471,9 +513,13 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} else { } else {
smsEmployee.setMessage("短信发送失败"); smsEmployee.setMessage("短信发送失败");
employeeService.updateById(smsEmployee); employeeService.updateById(smsEmployee);
errorList.add("短信发送失败");
}
} }
} }
} }
if (!errorList.isEmpty() && errorList.stream().allMatch(e->e.equals("短信发送失败"))) {
return R.ok("短信发送失败");
} }
return R.ok("短信发送成功"); return R.ok("短信发送成功");
} }
......
...@@ -887,7 +887,7 @@ ...@@ -887,7 +887,7 @@
FROM t_employee_project a left join t_employee_info b on a.EMP_ID = b.id FROM t_employee_project a left join t_employee_info b on a.EMP_ID = b.id
where where
a.DELETE_FLAG = '0' and a.DEPT_NO = #{tEmployeeProject.deptNo} a.DELETE_FLAG = '0' and a.DEPT_NO = #{tEmployeeProject.deptNo}
and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1') and a.PROJECT_STATUS = 0
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''"> <if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND (a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%') or a.EMP_NAME like concat('%',#{tEmployeeProject.empIdcard})) AND (a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%') or a.EMP_NAME like concat('%',#{tEmployeeProject.empIdcard}))
</if> </if>
......
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