Commit e5aa87a6 authored by maqing's avatar maqing

修改校验srvOrganEmpVo.getEmpTypeId()

parent a1e08d62
...@@ -244,10 +244,14 @@ public class SrvOrganController { ...@@ -244,10 +244,14 @@ public class SrvOrganController {
*/ */
@PostMapping("/srvOrganEmp") @PostMapping("/srvOrganEmp")
public Result saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo) { public Result saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo) {
if (null == srvOrganEmpVo.getOrganId() || null == srvOrganEmpVo.getSrvOrganId() if (null == srvOrganEmpVo.getOrganId()
|| StrUtil.isBlank(srvOrganEmpVo.getEmpName()) || StrUtil.isBlank(srvOrganEmpVo.getCertifType()) || null == srvOrganEmpVo.getSrvOrganId()
|| StrUtil.isBlank(srvOrganEmpVo.getCertifNum()) || StrUtil.isBlank(srvOrganEmpVo.getGender()) || StrUtil.isBlank(srvOrganEmpVo.getEmpName())
|| null == srvOrganEmpVo.getAge() || StrUtil.isBlank(srvOrganEmpVo.getMobilePhone()) || StrUtil.isBlank(srvOrganEmpVo.getCertifType())
|| StrUtil.isBlank(srvOrganEmpVo.getCertifNum())
|| StrUtil.isBlank(srvOrganEmpVo.getGender())
|| null == srvOrganEmpVo.getAge()
|| StrUtil.isBlank(srvOrganEmpVo.getMobilePhone())
|| null == srvOrganEmpVo.getEmpType() || null == srvOrganEmpVo.getEmpType()
|| null == srvOrganEmpVo.getEduId()) { || null == srvOrganEmpVo.getEduId()) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
......
...@@ -76,11 +76,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -76,11 +76,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
SrvOrganEmpVo srvOrganEmpVo = new SrvOrganEmpVo(); SrvOrganEmpVo srvOrganEmpVo = new SrvOrganEmpVo();
ChSrvOrganEmp chSrvOrganEmp = chSrvOrganEmpMapper.selectById(empId); ChSrvOrganEmp chSrvOrganEmp = chSrvOrganEmpMapper.selectById(empId);
Long empTypeId = chSrvOrganEmp.getEmpTypeId(); Long empTypeId = chSrvOrganEmp.getEmpTypeId();
if(empTypeId!=null){
ChCfgSrvEmpType chCfgSrvEmpType = srvEmpTypeMapper.selectById(empTypeId); ChCfgSrvEmpType chCfgSrvEmpType = srvEmpTypeMapper.selectById(empTypeId);
srvOrganEmpVo.setEmpCateId(chCfgSrvEmpType.getEmpCateId());
}else{
srvOrganEmpVo.setEmpCateId(0);
}
Long srvOrganId = chSrvOrganEmp.getSrvOrganId(); Long srvOrganId = chSrvOrganEmp.getSrvOrganId();
ChSrvOrgan chSrvOrgan = srvOrganMapper.selectById(srvOrganId); ChSrvOrgan chSrvOrgan = srvOrganMapper.selectById(srvOrganId);
BeanUtils.copyProperties(chSrvOrganEmp, srvOrganEmpVo); BeanUtils.copyProperties(chSrvOrganEmp, srvOrganEmpVo);
srvOrganEmpVo.setEmpCateId(chCfgSrvEmpType.getEmpCateId());
srvOrganEmpVo.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode()); srvOrganEmpVo.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode());
try { try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(empId, AttachType.SRV_ORGAN_EMP.getUploadType()); Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(empId, AttachType.SRV_ORGAN_EMP.getUploadType());
......
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