Commit 5ff77781 authored by huyuchen's avatar huyuchen

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

parents a2a59408 97ebb8fb
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
......@@ -23,4 +27,13 @@ public class UpdateEmpVo implements Serializable {
// type 0 审核通过 2.审核不通过
String type;
/**
* @Description: 合同审核人要传过去
* @Author: hgw
* @Date: 2023/5/23 9:59
* @return:
**/
private String createName;
private String createBy;
}
......@@ -47,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -251,8 +252,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.eq(TEmployeeContractInfo::getContractStart, tEmployeeContractInfo.getContractStart())
.eq(TEmployeeContractInfo::getContractEnd, tEmployeeContractInfo.getContractEnd())
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT)
.or().eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT)
.and(obj->obj.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT)
)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfo != null) {
return R.failed("不能重复添加");
......
......@@ -2241,8 +2241,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TEmployeeContractAudit contractAudit = new TEmployeeContractAudit();
contractAudit.setLinkId(c.getId());
contractAudit.setLinkType(CommonConstants.ONE_INT);
contractAudit.setCreateBy(c.getCreateBy());
contractAudit.setCreateName(c.getCreateName());
contractAudit.setCreateBy(vo.getCreateBy());
contractAudit.setCreateName(vo.getCreateName());
contractAudit.setCreateTime(LocalDateTime.now());
//审核通过
c.setAuditUserName(c.getCreateBy());
......
......@@ -925,14 +925,9 @@
WHERE
x.DELETE_FLAG = '0'
AND (
(
x.AUDIT_STATUS = '2'
AND x.IN_USE = '0'
)
OR (
x.AUDIT_STATUS = '1'
AND x.IN_USE = '1'
)
( x.AUDIT_STATUS = '2' AND x.IN_USE = '0' )
OR
( x.AUDIT_STATUS = '1' AND x.IN_USE = '1' )
)
<if test="checkVo != null">
<if test="checkVo.idCards != null">
......
......@@ -11,6 +11,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -280,7 +281,7 @@ public class ArchivesDaprUtil {
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type,String remarkTemp){
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type,String remarkTemp, YifuUser user){
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(type)){
......@@ -292,6 +293,8 @@ public class ArchivesDaprUtil {
vo.setContractId(contractId);
vo.setRemarkTemp(remarkTemp);
vo.setType(type);
vo.setCreateBy(user.getId());
vo.setCreateName(user.getNickname());
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
......
......@@ -117,4 +117,7 @@ public class TSalaryAccountExportVo {
@ExcelProperty("支出结算状态")
private String paySettleFlag;
@ExcelProperty("HRO状态")
private String status;
}
......@@ -292,6 +292,13 @@ public class SalaryAccountUtil implements Serializable {
if (fieldType == null) {
continue;
}
if (SalaryConstants.SALARY_GIVE_TIME_JAVA.equals(scs.getJavaFiedName())
&& !SalaryConstants.SALARY_GIVE_TIME.equals(cellValueStr)
&& !SalaryConstants.SALARY_GIVE_TIME_TWO.equals(cellValueStr)) {
errorFlag = false;
errorList.add(new ErrorMessage((i + 2), "请注意:工资发放时间,只能是【立即发】或【暂停发】!你的内容:【"+cellValueStr+"】"));
continue;
}
setFields(field, cellValueStr, attr, fieldType, entity);
error = validateUtil(cellValueStr, attr, (i + 2));
if (null != error) {
......
......@@ -44,6 +44,7 @@ public class SalaryConstants {
public static final String IS_NEW = "是";
public static final String ID_NUMBER = "身份证号";
public static final String SALARY_GIVE_TIME = "暂停发";
public static final String SALARY_GIVE_TIME_TWO = "立即发";
//暂停发
public static final String SALARY_GIVE_TIME_VALUE = "1";
//0:生成月;
......@@ -192,4 +193,6 @@ public class SalaryConstants {
public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!";
public static final String EKP_NO_RETURN = "推送EKP无结果返回";
public static final String TAX_MONTH_LENGTH = "计税月份错误";
// 暂停发java
public static final String SALARY_GIVE_TIME_JAVA = "salaryGiveTime";
}
......@@ -842,9 +842,11 @@
a.CREATE_NAME as createName,
GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY SEPARATOR ';') pdeductionDetail,
sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeductionMoney,
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag,
case s.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '已推送待发放' when 4 then '已发放' when 5 then '审核不通过' when 7 then '财务退回' when 10 then '推送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' else '-' end as status
from
t_salary_account a
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
......@@ -852,7 +854,7 @@
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
GROUP BY a.id ORDER BY a.CREATE_TIME desc
GROUP BY a.id ORDER BY a.SETTLEMENT_MONTH asc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
......
......@@ -1250,7 +1250,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (isSsc) {
dispatch.setStatus(CommonConstants.FIVE_STRING);
}
dispatch.setStatus(CommonConstants.ONE_STRING);
dispatch.setDeleteFlag(CommonConstants.ZERO_STRING);
// 封装项目客户信息
dispatch.setBelongUnit(excel.getCustomerId());
......@@ -2250,9 +2249,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true;
}
// 档案无合同 合同起日期、合同类型必填
if (Common.isEmpty(empVo.getContractName()) && validContractInfo(errorMessageList,excel)){
if (Common.isEmpty(empVo.getContractName()) && validContractInfo(errorMessageList,excel)) {
return true;
}
if (Common.isNotNull(empVo.getContractStart()) && Common.isNotNull(excel.getContractStart())) {
// 系统已存在的合同起缴日期
String conYearMonthDay = DateUtil.formatDatePatten(empVo.getContractStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT);
String excelConYearMonthDay = DateUtil.formatDatePatten(excel.getContractStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT);
if (!conYearMonthDay.equals(excelConYearMonthDay)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统内[合同]起缴日期年月日【"
+ conYearMonthDay + "】与派单[合同]日期的年月日【" + excelConYearMonthDay + "】不一致!禁止派单!"));
return true;
}
String conYearMonth = DateUtil.formatDatePatten(empVo.getContractStart(),DateUtil.DATETIME_YYYYMM);
if (Common.isEmpty(excel.getTrustRemark())) {
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getPensionStart(), "养老")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getMedicalStart(), "医疗")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getUnemployStart(), "失业")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getWorkInjuryStart(), "工伤")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getBirthStart(), "生育")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getBigailmentStart(), "大病")) { return true;}
}
}
if (Common.isNotNull(empVo.getEmpNatrue())){
excel.setEmpType(empVo.getEmpNatrue());
}
......@@ -2423,6 +2441,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return false;
}
/**
* @param errorMessageList
* @param excel
* @param conYearMonth
* @param startDate
* @Description: 判断合同日期与社保公积金日期是否一致
* @Author: hgw
* @Date: 2023/5/22 17:06
* @return: boolean
**/
private boolean judgeConStartAndSocialFund(List<ErrorMessage> errorMessageList, TDispatchImportVo excel
, String conYearMonth, Date startDate, String message) {
if (Common.isNotNull(startDate)) {
String startD = DateUtil.formatDatePatten(startDate, DateUtil.DATETIME_YYYYMM);
if (!conYearMonth.equals(startD) ) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统内[合同]起缴日期年月【"
+ conYearMonth + "】与派单[" + message + "]日期的年月【" + startD + "】不一致!委托备注必填!"));
return true;
}
}
return false;
}
private boolean checkMobileAndIdcard(List<ErrorMessage> errorMessageList, TDispatchImportVo excel) {
// 如果没有人员档案和项目档案的时候校验身份证和手机号码
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(null,null, excel.getEmpMobile());
......@@ -2510,17 +2551,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
}
flag = (Common.isNotNull(contractDateTemp)
&& ((!contractDateTemp.equals(excel.getPensionStart()) && Common.isNotNull(excel.getPensionStart()))
|| (!contractDateTemp.equals(excel.getMedicalStart()) && Common.isNotNull(excel.getMedicalStart()))
|| (!contractDateTemp.equals(excel.getUnemployStart()) && Common.isNotNull(excel.getUnemployStart()))
|| (!contractDateTemp.equals(excel.getBirthStart()) && Common.isNotNull(excel.getBirthStart()))
|| (!contractDateTemp.equals(excel.getWorkInjuryStart()) && Common.isNotNull(excel.getWorkInjuryStart()))
|| (!contractDateTemp.equals(excel.getBigailmentStart()) && Common.isNotNull(excel.getBigailmentStart()))));
if (flag){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2)));
return true;
}
}
Date temp;
if (Common.isEmpty(empVo)){
......@@ -2540,7 +2570,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 其他 只用判断对应养老基数和时间 与合同时间 即可
if (!CommonConstants.ONE_STRING.equals(excel.getPaymentType()) && Common.isEmpty(excel.getTrustRemark())
&& !temp.equals(excel.getPensionStart())
&& !DateUtil.formatDatePatten(temp,DateUtil.DATETIME_YYYYMM).equals(DateUtil.formatDatePatten(excel.getPensionStart(),DateUtil.DATETIME_YYYYMM))
){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2)));
return true;
......@@ -3283,10 +3313,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())){
R<Boolean> res = null;
if (CommonConstants.ZERO_INT == flag && !isSSC){
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(),dis.getSettleDomainCode(),dis.getContractId(),CommonConstants.ZERO_STRING,remarkTemp);
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(),dis.getSettleDomainCode(),dis.getContractId(),CommonConstants.ZERO_STRING,remarkTemp, user);
}
if (CommonConstants.ONE_INT == flag){
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(),dis.getSettleDomainCode(),dis.getContractId(),CommonConstants.ONE_STRING,remarkTemp);
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(),dis.getSettleDomainCode(),dis.getContractId(),CommonConstants.ONE_STRING,remarkTemp, user);
}
if ((Common.isEmpty(res) || CommonConstants.SUCCESS != res.getCode()) && !isSSC){
ServiceUtil.runTimeExceptionDiy("更新人员档案、项目档案、合同状态异常:" + (Common.isNotNull(res)?res.getMsg():CommonConstants.EMPTY_STRING));
......
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