Commit 052fd56d authored by hongguangwu's avatar hongguangwu

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

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