Commit 052fd56d authored by hongguangwu's avatar hongguangwu

MVP1.7.8-hgw(判断简档详档)

parent 9e05df49
...@@ -42,7 +42,7 @@ import java.time.LocalDateTime; ...@@ -42,7 +42,7 @@ import java.time.LocalDateTime;
public class TPreEmpDeclaration implements Serializable { public class TPreEmpDeclaration implements Serializable {
/** /**
* id * id 默认ID为2的为简档对应的声明
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id") @ExcelProperty("id")
......
...@@ -245,6 +245,11 @@ public class TPreEmpMain extends BaseEntity { ...@@ -245,6 +245,11 @@ public class TPreEmpMain extends BaseEntity {
@Schema(description = "数据来源") @Schema(description = "数据来源")
private String sourType; private String sourType;
@ExcelAttribute(name = "是否简档1详档2简档", maxLength = 2)
@ExcelProperty("是否简档1详档2简档")
@Schema(description = "是否简档1详档2简档")
private String isSimple;
@Schema(description = "状态多个") @Schema(description = "状态多个")
@TableField(exist = false) @TableField(exist = false)
private String[] statusArray; private String[] statusArray;
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService; import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeInfoMsgVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo;
...@@ -193,8 +194,8 @@ public class EmployeeRegistrationPreController { ...@@ -193,8 +194,8 @@ public class EmployeeRegistrationPreController {
**/ **/
@Operation(summary = "查询身份信息") @Operation(summary = "查询身份信息")
@SysLog("查询身份信息") @SysLog("查询身份信息")
@PostMapping("/getEmployeeInfo") @GetMapping("/getEmployeeInfo")
public R getEmployeeInfo(@RequestBody String id) { public R<EmployeeInfoMsgVo> getEmployeeInfo(@RequestParam String id) {
return employeeRegistrationPreService.getEmployeeInfo(id); return employeeRegistrationPreService.getEmployeeInfo(id);
} }
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeInfoMsgVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo;
...@@ -85,14 +86,14 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -85,14 +86,14 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
void updatePreStatusToEnd(String deptNo, String empIdcard); void updatePreStatusToEnd(String deptNo, String empIdcard);
R getEmployeeInfo(String cardOrId); R<EmployeeInfoMsgVo> getEmployeeInfo(String cardOrId);
/** /**
* @param empIdCard 身份证 * @param empIdCard 身份证
* @param deptId 项目ID * @param deptId 项目ID
* @Description: 判断简档详档(员工类型:代理的是简档,“非代理”且员工合同类型为:空、标准合同、劳务派遣合同、补贴合同 是详档,其余为简档) * @Description: 判断简档详档,类型1详档2简档(员工类型:代理的是简档,“非代理”且员工合同类型为:空、标准合同、劳务派遣合同、补贴合同 是详档,其余为简档)
* @Author: hgw * @Author: hgw
* @Date: 2025/3/20 15:03 * @Date: 2025/3/20 15:03
* @return: java.lang.String * @return: java.lang.String
......
...@@ -487,7 +487,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -487,7 +487,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
@Override @Override
public R getEmployeeInfo(String id) { public R<EmployeeInfoMsgVo> getEmployeeInfo(String id) {
//获取人员档案id //获取人员档案id
EmployeeInfoMsgVo msgInfoVo = baseMapper.getEmployeeArchivesInfo(id); EmployeeInfoMsgVo msgInfoVo = baseMapper.getEmployeeArchivesInfo(id);
return R.ok(msgInfoVo); return R.ok(msgInfoVo);
......
...@@ -210,6 +210,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -210,6 +210,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tSalaryEmployee = sdr.getData(); tSalaryEmployee = sdr.getData();
} }
TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId); TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId);
// 类型1详档2简档
String isSimple = registrationPreService.judgeIsSimple(empIdCard, deptId);
TPreEmpDeclaration declaration;
if (CommonConstants.TWO_STRING.equals(isSimple)) {
declaration = tPreEmpDeclarationService.getById(CommonConstants.TWO_STRING);
} else {
declaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
if (declaration == null) {
return R.failed("请联系管理员添加员工声明信息!");
}
TEmployeeInfo employee = tEmployeeInfoService.getInfoByIdcard(empIdCard); TEmployeeInfo employee = tEmployeeInfoService.getInfoByIdcard(empIdCard);
String empId = null; String empId = null;
TEmployeeProject project = tEmployeeProjectService.getByEmpIdCardAndDeptId(empIdCard, deptId); TEmployeeProject project = tEmployeeProjectService.getByEmpIdCardAndDeptId(empIdCard, deptId);
...@@ -239,6 +251,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -239,6 +251,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empFirst = true; empFirst = true;
} }
if (main != null) { if (main != null) {
main.setIsSimple(isSimple);
this.updateById(main);
// 2024-7-3 17:23:50 倩倩要求放开状态拦截,前端加按钮禁用即可 // 2024-7-3 17:23:50 倩倩要求放开状态拦截,前端加按钮禁用即可
/* (CommonConstants.ONE_STRING.equals(main.getStatus()) /* (CommonConstants.ONE_STRING.equals(main.getStatus())
|| CommonConstants.TWO_STRING.equals(main.getStatus())) || CommonConstants.TWO_STRING.equals(main.getStatus()))
...@@ -335,14 +349,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -335,14 +349,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
main.setBusinessThirdType(dept.getBusinessThirdType()); main.setBusinessThirdType(dept.getBusinessThirdType());
main.setStatus(CommonConstants.FIVE_STRING); main.setStatus(CommonConstants.FIVE_STRING);
// 预入职-员工声明 // 预入职-员工声明
TPreEmpDeclaration tPreEmpDeclaration; vo.setTpreEmpDeclaration(declaration);
if (Common.isNotNull(main.getDeclarationId())) { main.setDeclarationId(declaration.getId());
tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId()); main.setIsSimple(isSimple);
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
vo.setTpreEmpDeclaration(tPreEmpDeclaration);
main.setDeclarationId(tPreEmpDeclaration.getId());
this.save(main); this.save(main);
TPreEmployeeInfo tPreEmployeeInfo; TPreEmployeeInfo tPreEmployeeInfo;
...@@ -405,14 +414,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -405,14 +414,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
String id = main.getId(); String id = main.getId();
vo.setMain(main); vo.setMain(main);
if (vo.getTpreEmpDeclaration() == null) { if (vo.getTpreEmpDeclaration() == null) {
// 预入职-员工声明 vo.setTpreEmpDeclaration(declaration);
TPreEmpDeclaration tPreEmpDeclaration;
if (Common.isNotNull(main.getDeclarationId())) {
tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId());
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
vo.setTpreEmpDeclaration(tPreEmpDeclaration);
} }
// 预入职-员工不良记录表 // 预入职-员工不良记录表
TPreEmpBadRecord tPreEmpBadRecord = tPreEmpBadRecordService.getTPreEmpBadRecordList(id); TPreEmpBadRecord tPreEmpBadRecord = tPreEmpBadRecordService.getTPreEmpBadRecordList(id);
...@@ -1116,7 +1118,20 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1116,7 +1118,20 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(main.getDeclarationId())) { if (Common.isNotNull(main.getDeclarationId())) {
tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId()); tPreEmpDeclaration = tPreEmpDeclarationService.getById(main.getDeclarationId());
} else { } else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList(); // 类型1详档2简档
if (Common.isNotNull(main.getEmpIdcard()) && Common.isNotNull(main.getDeptId())) {
String isSimple = registrationPreService.judgeIsSimple(main.getEmpIdcard(), main.getDeptId());
if (CommonConstants.TWO_STRING.equals(isSimple)) {
tPreEmpDeclaration = tPreEmpDeclarationService.getById(CommonConstants.TWO_STRING);
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
} else {
tPreEmpDeclaration = tPreEmpDeclarationService.getTPreEmpDeclarationList();
}
}
if (tPreEmpDeclaration == null) {
return R.failed("请联系管理员添加员工声明信息!");
} }
vo.setTpreEmpDeclaration(tPreEmpDeclaration); vo.setTpreEmpDeclaration(tPreEmpDeclaration);
// 预入职-员工伤残信息表 // 预入职-员工伤残信息表
...@@ -1444,6 +1459,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1444,6 +1459,18 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
YifuUser user = getNewYifuUser(); YifuUser user = getNewYifuUser();
String idCard = main.getEmpIdcard(); String idCard = main.getEmpIdcard();
if (Common.isNotNull(idCard)) { if (Common.isNotNull(idCard)) {
if (Common.isEmpty(main.getDeptId())) {
return R.failed("项目ID不可为空");
}
String isSimple = registrationPreService.judgeIsSimple(idCard, main.getDeptId());
if (CommonConstants.ONE_STRING.equals(isSimple) && !isSimple.equals(main.getIsSimple())) {
return R.failed("员工类型或合同类型已变更,请刷新后重新提交!");
}
// 如果是简档,将清空多余信息
if (CommonConstants.TWO_STRING.equals(isSimple)) {
// TODO - 删除多余
}
TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject(); TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject();
if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) { if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) {
// 预入职-人员档案表 // 预入职-人员档案表
......
...@@ -54,6 +54,7 @@ security: ...@@ -54,6 +54,7 @@ security:
- /tpreempmain/sendCode - /tpreempmain/sendCode
- /tpreempmain/checkCode - /tpreempmain/checkCode
- /employeeregistrationpre/getEmployeeInfo - /employeeregistrationpre/getEmployeeInfo
- /employeeregistrationpre/judgeIsSimple
# 文件上传相关 支持阿里云、华为云、腾讯、minio # 文件上传相关 支持阿里云、华为云、腾讯、minio
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<result property="settleDomain" column="SETTLE_DOMAIN"/> <result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="declarationId" column="DECLARATION_ID"/> <result property="declarationId" column="DECLARATION_ID"/>
<result property="sourType" column="SOUR_TYPE"/> <result property="sourType" column="SOUR_TYPE"/>
<result property="isSimple" column="IS_SIMPLE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -83,7 +84,8 @@ ...@@ -83,7 +84,8 @@
a.UPDATE_TIME, a.UPDATE_TIME,
a.SETTLE_DOMAIN, a.SETTLE_DOMAIN,
a.DECLARATION_ID, a.DECLARATION_ID,
a.SOUR_TYPE a.SOUR_TYPE,
a.IS_SIMPLE
</sql> </sql>
<sql id="tPreEmpMain_where"> <sql id="tPreEmpMain_where">
<if test="tPreEmpMain != null"> <if test="tPreEmpMain != null">
......
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