Commit 89a4509a authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.2' into MVP1.7.2

parents 7fc1899b 1bb97888
......@@ -203,4 +203,12 @@ public class DispatchEmpVo implements Serializable {
*/
private String contactAddress;
/**
* 试用期(单位月)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="试用期")
private String tryPeriod;
}
......@@ -203,7 +203,7 @@ public class EmpProjectDispatchVo implements Serializable {
* 是否更新岗位信息
*/
@Schema(description ="是否更新岗位信息")
private Boolean postUpdate;
private Boolean needUpdate;
/**
* 入职日期
......
......@@ -117,7 +117,7 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
void updateContractStatus(@Param("empId") String empId, @Param("deptId") String deptId, @Param("status")int status);
int updatePostByEmpDeptNo(@Param("deptNo")String deptNo, @Param("post")String post,@Param("empIdcard")String empIdcard);
int updatePostByEmpDeptNo(@Param("deptNo")String deptNo, @Param("tryPeriod")String tryPeriod, @Param("post")String post,@Param("empIdcard")String empIdcard);
/**
......
......@@ -271,7 +271,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
void updateContractStatus(String empId, String deptId, int status);
void updatePostByEmpDeptNo(String deptNo, String post, String empIdcard);
void updatePostByEmpDeptNo(String deptNo, String tryPeriod, String post, String empIdcard);
/**
* @param deptId 项目id
......
......@@ -2788,7 +2788,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
EmpAddDispatchVo emp;
for (Map.Entry<String, EmpProjectDispatchVo> entry : projectsMap.entrySet()) {
projectAdd = entry.getValue();
if (Common.isNotNull(projectAdd.getPostUpdate()) && projectAdd.getPostUpdate()) {
if (Common.isNotNull(projectAdd.getNeedUpdate()) && projectAdd.getNeedUpdate()) {
continue;
}
try {
......@@ -2838,8 +2838,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
EmpProjectDispatchVo projectAdd;
for (Map.Entry<String, EmpProjectDispatchVo> entry : projectsMap.entrySet()) {
projectAdd = entry.getValue();
if (Common.isNotNull(projectAdd.getPostUpdate()) && projectAdd.getPostUpdate()) {
tEmployeeProjectService.updatePostByEmpDeptNo(projectAdd.getDeptNo(), projectAdd.getPost(), projectAdd.getEmpIdcard());
if (Common.isNotNull(projectAdd.getNeedUpdate()) && projectAdd.getNeedUpdate()) {
tEmployeeProjectService.updatePostByEmpDeptNo(projectAdd.getDeptNo(), projectAdd.getTryPeriod(), projectAdd.getPost(), projectAdd.getEmpIdcard());
}
}
}
......
......@@ -1905,8 +1905,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
@Override
public void updatePostByEmpDeptNo(String deptNo, String post, String empIdcard) {
baseMapper.updatePostByEmpDeptNo(deptNo,post,empIdcard);
public void updatePostByEmpDeptNo(String deptNo,String tryPeriod, String post, String empIdcard) {
baseMapper.updatePostByEmpDeptNo(deptNo,tryPeriod,post,empIdcard);
}
/**
......
......@@ -197,6 +197,7 @@
<result property="deptNo" column="DEPT_NO"/>
<result property="post" column="POST"/>
<result property="empNo" column="EMP_NO"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
</resultMap>
<sql id="baseParam">
......@@ -968,7 +969,7 @@
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID,
c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE,c.TRY_PERIOD
from (
select e.ID,e.EMP_CODE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY,
e.ID_TOWN,e.EMP_REGIS_TYPE,e.FILE_PROVINCE,e.FILE_CITY,e.FILE_TOWN,e.HIGN_EDUCATION,e.FILE_STATUS,e.CONTACT_ADDRESS
......@@ -984,7 +985,7 @@
</if>
) a
left join (
select p.UNIT_NAME,p.UNIT_NO,p.DEPT_ID,p.DEPT_NAME,p.DEPT_NO,p.POST,p.EMP_ID,p.EMP_NO,P.PROJECT_STATUS,p.EMP_NATRUE
select p.UNIT_NAME,p.UNIT_NO,p.DEPT_ID,p.DEPT_NAME,p.DEPT_NO,p.POST,p.EMP_ID,p.EMP_NO,P.PROJECT_STATUS,p.EMP_NATRUE,p.TRY_PERIOD
from t_employee_project p
where 1=1 and p.DELETE_FLAG = '0'
<if test="checkVo != null">
......
......@@ -1093,7 +1093,13 @@
</update>
<update id="updatePostByEmpDeptNo" >
update t_employee_project a
set a.POST = #{post}
set
<if test="post != null and post !=''">
a.POST = #{post}
</if>
<if test="tryPeriod != null and tryPeriod !=''">
a.TRY_PERIOD = #{tryPeriod}
</if>
WHERE a.DEPT_NO=#{deptNo} and a.EMP_IDCARD=#{empIdcard} and a.DELETE_FLAG ='0'
</update>
......
......@@ -626,4 +626,8 @@ public interface ErrorCodes {
* 户口性质不可为空
*/
String EMP_DISPATCH_EMP_REGISTYPE_NOT_EMPTY = "dispatch.emp.registype.not.empty";
/**
* 试用期不可为空
*/
String EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY = "dispatch.emp.tryperiod.not.empty";
}
......@@ -242,6 +242,8 @@ dispatch.emp.education.not.empty=\u5DF2\u6709\u6863\u6848\u5B66\u5386\u4E3A\u7A7
dispatch.emp.registype.not.empty=\u5DF2\u6709\u6863\u6848\u6237\u53E3\u6027\u8D28\u4E3A\u7A7A\u6216\u65E0\u6863\u6848\uFF0C\u6D3E\u5355\u6A21\u677F\u6237\u53E3\u6027\u8D28\u4E0D\u53EF\u4E3A\u7A7A\uFF0C\u8BF7\u8865\u5145\u6237\u53E3\u6027\u8D28
dispatch.emp.tryperiod.not.empty=\u5DF2\u6709\u6863\u6848\u8BD5\u7528\u671F\u4E3A\u7A7A\u6216\u65E0\u6863\u6848\uFF0C\u6D3E\u5355\u6A21\u677F\u8BD5\u7528\u671F\u4E0D\u53EF\u4E3A\u7A7A\uFF0C\u8BF7\u8865\u5145\u8BD5\u7528\u671F
......
......@@ -180,7 +180,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 试用期(单位月)
*/
@Length(max = 3, message = "试用期 不能超过3个字符" )
@ExcelAttribute(name = "试用期", maxLength = 3, isNotEmpty = true)
@ExcelAttribute(name = "试用期", maxLength = 3)
@Schema(description = "试用期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("试用期" )
......
......@@ -1605,16 +1605,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化合同
initContractInfo(contracts, excel, empVo, setInfoVo, user);
}
// 有项目档案但岗位信息为空
// 有项目档案但岗位信息为空 && fxj 20241124 1.7.2 有项目档案 试用期为空
if (Common.isNotNull(empVo)
&& Common.isNotNull(empVo.getDeptNo())
&& Common.isEmpty(empVo.getPost())
&& Common.isNotNull(excel.getPost())){
&& Common.isNotNull(empVo.getDeptNo())){
EmpProjectDispatchVo project = new EmpProjectDispatchVo();
project.setDeptNo(empVo.getDeptNo());
project.setPost(excel.getPost());
if (Common.isEmpty(empVo.getPost()) && Common.isNotNull(excel.getPost())){
project.setPost(excel.getPost());
project.setNeedUpdate(true);
}
if (Common.isEmpty(empVo.getTryPeriod()) && Common.isNotNull(excel.getTryPeriod())){
project.setTryPeriod(excel.getTryPeriod());
project.setNeedUpdate(true);
}
project.setEmpIdcard(empVo.getEmpIdcard());
project.setPostUpdate(true);
projectsUpdateMap.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project);
}
}
......@@ -2324,7 +2328,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true;
}
//无档案必填2024-08-21 fxj
if (Common.isEmpty(excel.getEmpRegisType()) ){
if (Common.isEmpty(excel.getEmpRegisType())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_REGISTYPE_NOT_EMPTY)));
return true;
}
......@@ -2335,6 +2339,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(excel.getContractName()) && validContractInfo(errorMessageList,excel)){
return true;
}
//无档案试用期必填 20241128 fxj 1.7.2
if (Common.isEmpty(excel.getTryPeriod())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY)));
return true;
}
// 如果没有人员档案和项目档案的时候校验身份证和手机号码
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(excel.getEmpName(),excel.getEmpIdcard(),excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
......@@ -2360,6 +2369,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
签订期限:无固定期限 合同到期时间、合同期限非必填,合同开始时间必填;
签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填*/
if (Common.isNotNull(empVo)){
//无档案试用期必填 20241128 fxj 1.7.2
if (Common.isEmpty(empVo.getTryPeriod()) && Common.isEmpty(excel.getTryPeriod())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY)));
return true;
}
// fxj 2024-08-30 有档案 学历或户口性质为空 派单必填 学历或客户性质
if (Common.isEmpty(empVo.getHignEducation()) && Common.isEmpty(excel.getEducationName())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_EDUCATION_NOT_EMPTY)));
......
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