Commit 7f9b7c3b authored by hongguangwu's avatar hongguangwu

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

parents 028d9827 59a0d47e
......@@ -450,6 +450,14 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
@ExcelProperty(value ="项目档案状态")
private String status;
/**
* 项目档案状态
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="项目档案状态")
@ExcelAttribute(name = "项目档案状态")
private String projectStatusReplace;
/**
* 社保-省
*/
......
......@@ -442,12 +442,12 @@ public class EmployeeProjectExportVO {
private String projectSource;
/**
* 项目档案状态(0草稿、1已审核
* 项目档案状态(0=正常,1=已减项
*/
@ExcelAttribute(name ="项目档案状态", readConverterExp = "0=草稿,1=已审核")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="项目档案状态")
private String status;
@ExcelAttribute(name = "项目档案状态")
private String projectStatus;
/**
* 项目档案创建人
......
......@@ -30,7 +30,7 @@ public class EmployeeConstants {
public static final String FILE_ROVINCE_MUST = "更新档案市,档案省必填";
public static final String FILE_CITY_MUST = "更新档案县,档案市必填";
public static final String DEPT_NO_ERROR = "项目编码错误";
public static final String DEPT_NO_EXIST = "未找到对应的项目或者项目已停止合作,请核实";
public static final String DEPT_NO_EXIST = "未找到对应的项目,请核实";
public static final String CHECK_ERROR = "校验服务错误,请联系管理员!";
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
......
......@@ -373,10 +373,13 @@ public class TEmployeeContractInfoController {
@SysLog("批量导出合同审核")
@PostMapping("/exportAuditContractInfo")
@PreAuthorize("@pms.hasPermission('employee_export_contract_audit')")
public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo, HttpServletResponse response) {
public void exportAuditContractInfo(@RequestBody(required = false) TEmployeeContractSearchVo contractInfo,
@RequestParam(required = false,name = "mId") String mId,
HttpServletResponse response) {
if (Common.isEmpty(contractInfo)){
contractInfo = new TEmployeeContractSearchVo();
}
contractInfo.setMId(mId);
contractInfo.setAuditStatus(CommonConstants.ONE_INT);
this.setAuth(contractInfo);
tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response);
......
......@@ -201,7 +201,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(tEmployeeProject)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHECKS_CHANGE_EMP_PROJECT, excel.getNewSettleCode()));
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
}
// 数据合法情况
if (CollUtil.isEmpty(errorMsg)) {
......
......@@ -152,6 +152,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (null == tEmployeeInfo || tEmployeeProject == null) {
return R.failed(EMPINFO_IS_NOT_EXITS_BYID);
}
if (!(ArchivesConstants.contractSituation[0].equals(tEmployeeContractInfo.getSituation()) ||
ArchivesConstants.contractSituation[6].equals(tEmployeeContractInfo.getSituation()))) {
TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeContractInfo.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
......@@ -159,6 +162,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (Common.isEmpty(settleDomain)) {
return R.failed(EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
}
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
......@@ -1023,6 +1027,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
insert.setContractEnd(contractInfo.getContractEnd());
}
} else {
TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, insert.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(settleDomain)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP));
return;
}
// 2022-9-28 16:59:57 徐梅说产品在验收时,业务说已完成一定任务的也不必填
if (EmployeeConstants.CONTRACT_TYPE_ONE.equals(insert.getContractType())
&& Common.isEmpty(insert.getContractEnd())) {
......
......@@ -957,6 +957,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String idCard;
// 个性化校验逻辑
List<String> deptNoList = new ArrayList<>();
TSettleDomain settleDomain;
for (int i = 0; i < excelVOList.size(); i++) {
errorMsg = new HashSet<>();
// 判空
......@@ -992,7 +993,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (!deptNoList.isEmpty()) {
List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL)
.in(TSettleDomain::getDepartNo, deptNoList)
);
if (deptList == null || deptList.isEmpty()) {
......@@ -1112,6 +1112,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveList.add(saveEmp);
}
} else {
settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(settleDomain)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getEmpIdcard()));
}
// 档案不存在
// 校验身份证实名
TCheckIdCard checkIdCard = new TCheckIdCard();
......
......@@ -128,14 +128,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return new R<>(CommonConstants.dingleDigitIntArray[2], "该人员已减档减项,是否“复档复项”", map);
}
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
return R.failed("未找到对应的项目或者项目已停止合作,请核实");
}
//状态为草稿、已审核
if (CommonConstants.dingleDigitIntArray[0] == employeeProject.getStatus() ||
CommonConstants.dingleDigitIntArray[1] == employeeProject.getStatus()) {
......@@ -154,6 +146,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return new R<>(CommonConstants.dingleDigitIntArray[3], "该人员在离职库已存在,是否“恢复档案”", map);
}
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
return R.failed("未找到对应的项目或者项目已停止合作,请核实");
}
return R.ok();
}
......@@ -407,7 +407,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (contractCount > CommonConstants.ZERO_INT){
errorTemp.append("合同可用或在途、");
}
if (Common.isNotNull(errorTemp)){
if (Common.isNotNull(errorTemp.toString())){
return R.failed(errorTemp.substring(0,errorTemp.length()-1) +",禁止减项");
}
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
......@@ -600,7 +600,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (contractCount > CommonConstants.ZERO_INT){
errorTemp.append("合同可用或在途、");
}
if (Common.isNotNull(errorTemp)){
if (Common.isNotNull(errorTemp.toString())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage +errorTemp.substring(0,errorTemp.length()-1) +",禁止减项"));
break;
}
......
......@@ -60,6 +60,7 @@
<resultMap id="tEmployeeProjectExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO">
<result property="empCode" column="EMP_CODE"/>
<result property="projectStatus" column="PROJECT_STATUS"/>
<result property="proEmpNatrue" column="PROEMP_NATRUE"/>
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="empName" column="EMP_NAME"/>
......@@ -103,7 +104,6 @@
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="proCreateName" column="PROCREATE_NAME"/>
<result property="proCreateTime" column="PROCREATE_TIME"/>
<result property="status" column="STATUS"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
......@@ -224,7 +224,7 @@
b.ADMISSION_DATE,
b.GRADUTION_DATE,
b.REMARK,
if(a.STATUS=0,'草稿','已审核') STATUS,
if(a.STATUS='0','草稿',IF(a.PROJECT_STATUS=1,'已减项','已审核')) PROJECT_STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_EMAIL,
......@@ -377,10 +377,10 @@
<if test="tEmployeeProject.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
<if test="tEmployeeProject.socialCity != null">
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if test="tEmployeeProject.fileTown != null">
<if test="tEmployeeProject.socialTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
<if test="tEmployeeProject.empNatureArray != null and tEmployeeProject.empNatureArray.length > 0">
......@@ -435,6 +435,9 @@
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%')
</if>
<if test="tEmployeeProject.projectStatusReplace != null and tEmployeeProject.projectStatusReplace.trim() != ''">
AND a.PROJECT_STATUS = #{tEmployeeProject.projectStatusReplace}
</if>
<if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''">
AND a.BANK_NAME = #{tEmployeeProject.bankName}
</if>
......@@ -528,10 +531,10 @@
<if test="tEmployeeProject.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
<if test="tEmployeeProject.socialCity != null">
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if test="tEmployeeProject.fileTown != null">
<if test="tEmployeeProject.socialTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
<if test="tEmployeeProject.idList != null">
......
......@@ -307,6 +307,10 @@ public interface ErrorCodes {
* 人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
* 未找到对应的新项目或者新项目已停止合作,请核实
*/
String PROJECT_NEW_SEARCH_NOT_EXIST = "project.new.search.not.exist";
/**
* 未找到对应的项目或者项目已停止合作,请核实
*/
......
......@@ -102,7 +102,8 @@ archives.project.change.contract.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
qt.project.change.not.exist=\u4EBA\u5458\u5728\u539F\u9879\u76EE\u4E2D\u5B58\u5728\u5728\u9014\u7684\u670D\u52A1\uFF0C\u8BF7\u5148\u7EC8\u6B62\u540E\uFF0C\u518D\u8FDB\u884C\u5212\u8F6C
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u65B0\u9879\u76EE\u6216\u8005\u65B0\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\u6216\u8005\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E
project.new.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u65B0\u9879\u76EE\u6216\u8005\u65B0\u9879\u76EE\u5DF2\u505C\u6B62\u5408\u4F5C\uFF0C\u8BF7\u6838\u5B9E
change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
change.less.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u8981\u5C0F\u4E8E\u7B49\u4E8E\u5F53\u524D\u6708
......
......@@ -112,6 +112,10 @@ public class InsurancesConstants {
* 对应项目编码已停止合作
*/
public static final String EMP_DISPATCH_SETTLEDOMAIN_STOP = "对应项目编码已停止合作";
/**
* 对应替换员工项目编码已停止合作
*/
public static final String EMP_DISPATCH_REPALCE_SETTLEDOMAIN_STOP = "对应替换员工项目编码已停止合作";
/**
* 替换员工项目不存在
*/
......
......@@ -2890,10 +2890,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//对应的项目编码已停止合作
//对应的替换员工项目编码已停止合作
if (CommonConstants.ONE_STRING.equals(projectSetInfoVo.getStopFlag()) ||
CommonConstants.TWO_STRING.equals(projectSetInfoVo.getStopFlag())){
param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_REPALCE_SETTLEDOMAIN_STOP);
listResult.add(param);
continue;
}
......
......@@ -344,7 +344,11 @@ public class TDispatchInfoController {
@Operation(description = "导出派单审核记录 hasPermission('tdispatchinfo-export')")
@PostMapping("/auditExport")
@PreAuthorize("@pms.hasPermission('tdispatchinfo-export')")
public void auditExport(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) {
public void auditExport(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo,
@RequestParam(required = false,name = "mId") String mId) {
searchVo.setDeleteFlag(CommonConstants.ZERO_STRING);
searchVo.setStatus(CommonConstants.ONE_STRING);
searchVo.setMId(mId);
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) {
......
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