Commit 67ed65a7 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent e9b33042
......@@ -53,7 +53,6 @@ public class TEmployeeProject extends BaseEntity {
* 人员档案主表id
*/
@Schema(description ="人员档案主表id")
@NotNull(message = "人员档案主表id不能为空")
@Size(max = 32, message = "人员档案主表id不可超过32位")
private String empId;
......@@ -141,7 +140,6 @@ public class TEmployeeProject extends BaseEntity {
* 员工编码
*/
@Schema(description ="员工编码")
@NotNull(message = "员工编码不能为空")
@Size(max = 20, message = "员工编码不可超过20位")
private String empNo;
......
......@@ -102,7 +102,7 @@ public class TEmployeeProjectController {
@PostMapping
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_add')" )
public R save(@Valid @RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.save(tEmployeeProject));
return tEmployeeProjectService.saveEmp(tEmployeeProject);
}
/**
......
......@@ -45,6 +45,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R reEmpInfo(JSONObject jsonObject);
R saveEmp(TEmployeeProject tEmployeeProject);
/**
* @param tEmployeeProject
* @Description: 减项
......
......@@ -140,6 +140,20 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok();
}
@Override
public R saveEmp(TEmployeeProject tEmployeeProject) {
//查询人员档案
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tEmployeeInfo)) {
tEmployeeProject.setEmpId(tEmployeeInfo.getId());
this.save(tEmployeeProject);
return R.ok();
}
return R.failed("未在人员档案中查到身份信息");
}
@Override
public R reEmpInfo(JSONObject jsonObject) {
if (Common.isNotNull(jsonObject)) {
......
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