Commit e5aa87a6 authored by maqing's avatar maqing

修改校验srvOrganEmpVo.getEmpTypeId()

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