Commit 6efff77f authored by fangxinjiang's avatar fangxinjiang

派单调整

parent 44ee2df9
......@@ -474,4 +474,16 @@ public class TEmployeeInfoController {
public Boolean updateEmpInfo(@RequestBody UpdateEmpVo vo) {
return tEmployeeInfoService.updateEmpInfo(vo);
}
/**
* @Description: 查验手机号码是否存在
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Operation(summary = "通过mobile查询是否已存在", description = "通过mobile查询是否已存在")
@Inner
@PostMapping("/inner/checkMobile")
public Boolean checkMobile(@RequestBody String mobile) {
return tEmployeeInfoService.checkMobile(mobile);
}
}
......@@ -186,4 +186,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
EmpDispatchAddVo addDispatchInfo(EmpDispatchAddVo addVo);
Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean checkMobile(String mobile);
}
......@@ -2135,6 +2135,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return true;
}
@Override
public Boolean checkMobile(String mobile) {
if (Common.isEmpty(mobile)){
return true;
}
return !(baseMapper.selectCount(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getFileStatus,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0);
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
Map<String, EmpContractDispatchVo> contractsMap,
Map<String, EmpAddDispatchVo> empAddsMap) {
......
......@@ -480,4 +480,8 @@ public interface ErrorCodes {
* 派增异常: 单派工伤其他起缴日期不可填写
*/
String EMP_DISPATCH_SOCIAL_DIY_INJURY_ERROR = "emp.dispatch.social.diy.injury.error";
/**
* 派增异常: 已存在对应手机号码的在用员工档案
*/
String EMP_DISPATCH_EMP_MOBILE_REPEAT = "emp.dispatch.emp.mobile.repeat";
}
......@@ -183,6 +183,8 @@ emp.dispatch.reduce.fund.depart.no.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u65E0\u
emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E\u5DE5\u4F24\u5176\u4ED6\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u586B\u5199
emp.dispatch.emp.mobile.repeat=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5DF2\u5B58\u5728\u5BF9\u5E94\u624B\u673A\u53F7\u7801\u7684\u5728\u7528\u5458\u5DE5\u6863\u6848
......
......@@ -187,4 +187,18 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author fxj
* @Description 校验手机号码重复
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public R<Boolean> checkMobile(String mobile) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/checkMobile" , mobile, Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("检验号码重复信息失败!");
}
return res;
}
}
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