Commit 4c03d1d0 authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 726c6472 cc780621
......@@ -17,6 +17,9 @@ public class UpdateEmpVo implements Serializable {
String empIdCard;
// 项目编码
String projectNo;
// 合同开始时间
String contractName;
// 合同ID
String contractId;
// type 0 审核通过 2.审核不通过
String type;
}
......@@ -125,8 +125,8 @@ public class TEmpChangeInfoController {
*/
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page));
public R<IPage<TSettleDomain>> getItemNamePage(Page page,String deptName) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, deptName));
}
/**
......
......@@ -68,5 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
R<List<TCustomerInfo>> getAllUint();
IPage<TSettleDomain> getAllDeptPage(Page page);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName);
}
......@@ -65,7 +65,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* @Author huyc
* @Description 档案划转
* @Description 档案划转
* @Date 2022/6/22
**/
@Override
......@@ -73,8 +73,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,tEmpChangeInfo.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, tEmpChangeInfo.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tEmployeeProject)) {
return R.failed("待划转员工已在目标项目下不可划转");
}
......@@ -85,8 +85,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//划转,更新项目信息
TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName,tEmpChangeInfo.getOldSettle())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName, tEmpChangeInfo.getOldSettle())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) {
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
......@@ -116,9 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
public R<List<ErrorMessage>> batchChangeArc(List<TEmpChangeInfoVO> excelVOList, BindingResult bindingResult) {
// 通用校验获取失败的数据
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
Map<Long,ErrorMessage> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)){
errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(),errorMessage));
Map<Long, ErrorMessage> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)) {
errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(), errorMessage));
}
List<TEmployeeProject> updateList = new ArrayList<>();
......@@ -126,7 +126,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
if (Common.isNotNull(errorMsgMap.get(i+2))){
if (Common.isNotNull(errorMsgMap.get(i + 2))) {
continue;
}
errorMsg = new HashSet<>();
......@@ -159,9 +159,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, excel.getNewSettleCode())
.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()));
}
......@@ -169,8 +169,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (CollUtil.isEmpty(errorMsg)) {
//划转,更新项目信息
TEmployeeProject updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo, excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
......@@ -211,6 +211,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* 获取所有项目名称
*
* @return R
* @Author huyc
* @Date 2022-06-22
......@@ -218,12 +219,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override
public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL));
return R.ok(list);
}
/**
* 获取所有单位名称
*
* @return R
* @Author huyc
* @Date 2022-06-22
......@@ -236,20 +238,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* 分页获取所有项目名称
*
* @return R
* @Author huyc
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper();
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper() {
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
wrapper.likeRight(TSettleDomain::getDepartName, deptName);
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return wrapper;
return tSettleDomainMapper.selectPage(page, wrapper);
}
}
......@@ -2095,41 +2095,49 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
public Boolean updateEmpInfo(UpdateEmpVo vo) {
if (Common.isNotNull(vo)){
if (Common.isNotNull(vo.getEmpIdCard())){
TEmployeeInfo employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(employeeInfo)){
employeeInfo.setStatus(CommonConstants.ONE_INT);
baseMapper.updateById(employeeInfo);
}
if (Common.isNotNull(vo.getContractName())){
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
TEmployeeInfo employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(employeeInfo)){
employeeInfo.setStatus(CommonConstants.ONE_INT);
baseMapper.updateById(employeeInfo);
}
if (Common.isNotNull(vo.getProjectNo())){
TEmployeeProject p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo,vo.getProjectNo())
.eq(TEmployeeProject::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(p)){
p.setStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(p);
}
}
}
if (Common.isNotNull(vo.getContractId())){
TEmployeeContractInfo c = contractServicer.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeContractInfo::getId,vo.getContractId())
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT)
.eq(TEmployeeContractInfo::getContractName,vo.getContractName())
.eq(TEmployeeContractInfo::getDispatchFlag,CommonConstants.ONE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(c)){
c.setAuditStatus(CommonConstants.TWO_INT);
c.setInUse(CommonConstants.ZERO_STRING);
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.TWO_INT);
c.setInUse(CommonConstants.ZERO_STRING);
}else if (CommonConstants.ONE_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.THREE_INT);
c.setInUse(CommonConstants.ONE_STRING);
}
contractServicer.updateById(c);
}
}
if (Common.isNotNull(vo.getProjectNo())){
TEmployeeProject p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo,vo.getProjectNo())
.eq(TEmployeeProject::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(p)){
p.setStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(p);
}
}
}
}
return true;
......@@ -2178,6 +2186,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract.setApplyNo(contractServicer.getCode(false));
contract.setInUse(CommonConstants.ONE_STRING);
contract.setIsObsolete(CommonConstants.ZERO_ONE);
contract.setDispatchFlag(CommonConstants.ONE_STRING);
contractServicer.save(contract);
contractAdd.setId(contract.getId());
contractAdd.setEmpNo(contract.getEmpNo());
......
......@@ -336,6 +336,12 @@ public class Common {
}
return obj;
}
public static String isNullToString(StringBuilder obj) {
if(obj == null) {
return CommonConstants.EMPTY_STRING;
}
return obj.toString();
}
/**
* 两个日期中间年份
......
......@@ -68,7 +68,9 @@ public class ExcelAttributeValidityUtil<T> {
//日期格式校验
if (attr.isDate()) {
try {
DateUtil.parseDate(c.trim(), attr.dateFormat());
if (!Common.isEmpty(c)) {
DateUtil.parseDate(c.replace("/", "").replace("-", ""), "yyyyMMdd");
}
} catch (ParseException e) {
return (Common.isEmpty(attr.errorInfo()) ? attr.name() + "_日期格式错误:" + attr.dateFormat() : attr.errorInfo());
}
......
......@@ -168,17 +168,21 @@ public class ArchivesDaprUtil {
* @Author fxj
* @Description 派单审核通过 同步人员档案 项目档案 合同状态信息
* @Date 19:30 2022/8/1
* @Param
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractName){
if (Common.isEmpty(empIdCard) || Common.isEmpty(projectNo) || Common.isEmpty(contractName)){
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type){
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(contractId)
|| Common.isEmpty(type)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
UpdateEmpVo vo = new UpdateEmpVo();
vo.setEmpIdCard(empIdCard);
vo.setProjectNo(projectNo);
vo.setContractName(contractName);
vo.setContractId(contractId);
vo.setType(type);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
......
......@@ -41,7 +41,8 @@ public class DispatchConstants {
public static final String DISPATCH_UNEMP = "失业、";
public static final String DISPATCH_BIGMAILMENT= "大病、";
public static final String DISPATCH_FUND= "公积金、";
public static final String DISPATCH_FUND_REDUCE_SUCCESS = "公积金派减办理成功:";
public static final String DISPATCH_FUND_REDUCE_FAIL = "公积金派减办理失败:";
/**
......
......@@ -25,10 +25,10 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 缴费库
......@@ -127,15 +127,17 @@ public class TPaymentInfo extends BaseEntity {
/**
* 社保缴纳月份
*/
@ExcelAttribute(name = "社保缴纳月份" )
@ExcelAttribute(name = "社保缴纳月份", maxLength = 6,isInteger = true)
@Schema(description ="社保缴纳月份")
@Length(max = 6, message = "社保缴纳月份不能超过6个字符")
@ExcelProperty("社保缴纳月份")
private String socialPayMonth;
/**
* 社保生成月份
*/
@ExcelAttribute(name = "社保生成月份" )
@ExcelAttribute(name = "社保生成月份", maxLength = 6,isInteger = true)
@Length(max = 6, message = "社保生成月份不能超过6个字符")
@Schema(description ="社保生成月份")
@ExcelProperty("社保生成月份")
private String socialCreateMonth;
......@@ -159,7 +161,8 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金缴纳月份
*/
@ExcelAttribute(name = "公积金缴纳月份" )
@ExcelAttribute(name = "公积金缴纳月份", maxLength = 6,isInteger = true)
@Length(max = 6, message = "公积金缴纳月份不能超过6个字符")
@Schema(description ="公积金缴纳月份")
@ExcelProperty("公积金缴纳月份")
private String providentPayMonth;
......@@ -167,7 +170,8 @@ public class TPaymentInfo extends BaseEntity {
/**
* 公积金生成月份
*/
@ExcelAttribute(name = "公积金生成月份" )
@ExcelAttribute(name = "公积金生成月份", maxLength = 6,isInteger = true)
@Length(max = 6, message = "公积金生成月份不能超过6个字符")
@Schema(description ="公积金生成月份")
@ExcelProperty("公积金生成月份")
private String providentCreateMonth;
......@@ -393,176 +397,176 @@ public class TPaymentInfo extends BaseEntity {
/**
* 个人养老基数
*/
@ExcelAttribute(name = "个人养老基数" )
@ExcelAttribute(name = "个人养老基数")
@ExcelProperty("个人养老基数")
private BigDecimal personalPensionSet;
/**
* 个人医疗基数
*/
@ExcelAttribute(name = "个人医疗基数" )
@ExcelAttribute(name = "个人医疗基数")
@ExcelProperty("个人医疗基数")
private BigDecimal personalMedicalSet;
/**
* 个人失业基数
*/
@ExcelAttribute(name = "个人失业基数" )
@ExcelAttribute(name = "个人失业基数")
@ExcelProperty("个人失业基数")
private BigDecimal personalUnemploymentSet;
/**
* 单位养老比例
*/
@ExcelAttribute(name = "单位养老比例" )
@ExcelAttribute(name = "单位养老比例")
@ExcelProperty("单位养老比例")
private BigDecimal unitPensionPer;
/**
* 单位医疗比例
*/
@ExcelAttribute(name = "单位医疗比例" )
@ExcelAttribute(name = "单位医疗比例")
@ExcelProperty("单位医疗比例")
private BigDecimal unitMedicalPer;
/**
* 单位失业比例
*/
@ExcelAttribute(name = "单位失业比例" )
@ExcelAttribute(name = "单位失业比例")
@ExcelProperty("单位失业比例")
private BigDecimal unitUnemploymentPer;
/**
* 单位工伤比例
*/
@ExcelAttribute(name = "单位工伤比例" )
@ExcelAttribute(name = "单位工伤比例")
@ExcelProperty("单位工伤比例")
private BigDecimal unitInjuryPer;
/**
* 单位生育比例
*/
@ExcelAttribute(name = "单位生育比例" )
@ExcelAttribute(name = "单位生育比例")
@ExcelProperty("单位生育比例")
private BigDecimal unitBirthPer;
/**
* 个人养老比例
*/
@ExcelAttribute(name = "个人养老比例" )
@ExcelAttribute(name = "个人养老比例")
@ExcelProperty("个人养老比例")
private BigDecimal personalPensionPer;
/**
* 个人医疗比例
*/
@ExcelAttribute(name = "个人医疗比例" )
@ExcelAttribute(name = "个人医疗比例")
@ExcelProperty("个人医疗比例")
private BigDecimal personalMedicalPer;
/**
* 个人失业比例
*/
@ExcelAttribute(name = "个人失业比例" )
@ExcelAttribute(name = "个人失业比例")
@ExcelProperty("个人失业比例")
private BigDecimal personalUnemploymentPer;
/**
* 单位大病比例
*/
@ExcelAttribute(name = "单位大病比例" )
@ExcelAttribute(name = "单位大病比例")
@ExcelProperty("单位大病比例")
private BigDecimal unitBigailmentPer;
/**
* 个人大病比例
*/
@ExcelAttribute(name = "个人大病比例" )
@ExcelAttribute(name = "个人大病比例")
@ExcelProperty("个人大病比例")
private BigDecimal personalBigailmentPer;
/**
* 单位养老金额
*/
@ExcelAttribute(name = "单位养老金额" )
@ExcelAttribute(name = "单位养老金额")
@ExcelProperty("单位养老金额")
private BigDecimal unitPensionMoney;
/**
* 单位医疗金额
*/
@ExcelAttribute(name = "单位医疗金额" )
@ExcelAttribute(name = "单位医疗金额")
@ExcelProperty("单位医疗金额")
private BigDecimal unitMedicalMoney;
/**
* 单位失业金额
*/
@ExcelAttribute(name = "单位失业金额" )
@ExcelAttribute(name = "单位失业金额")
@ExcelProperty("单位失业金额")
private BigDecimal unitUnemploymentMoney;
/**
* 单位工伤金额
*/
@ExcelAttribute(name = "单位工伤金额" )
@ExcelAttribute(name = "单位工伤金额")
@ExcelProperty("单位工伤金额")
private BigDecimal unitInjuryMoney;
/**
* 单位生育金额
*/
@ExcelAttribute(name = "单位生育金额" )
@ExcelAttribute(name = "单位生育金额")
@ExcelProperty("单位生育金额")
private BigDecimal unitBirthMoney;
/**
* 单位大病金额
*/
@ExcelAttribute(name = "单位大病金额" )
@ExcelAttribute(name = "单位大病金额")
@ExcelProperty("单位大病金额")
private BigDecimal unitBigmailmentMoney;
/**
* 个人养老金额
*/
@ExcelAttribute(name = "个人养老金额" )
@ExcelAttribute(name = "个人养老金额")
@ExcelProperty("个人养老金额")
private BigDecimal personalPensionMoney;
/**
* 个人医疗金额
*/
@ExcelAttribute(name = "个人医疗金额" )
@ExcelAttribute(name = "个人医疗金额")
@ExcelProperty("个人医疗金额")
private BigDecimal personalMedicalMoney;
/**
* 个人失业金额
*/
@ExcelAttribute(name = "个人失业金额" )
@ExcelAttribute(name = "个人失业金额")
@ExcelProperty("个人失业金额")
private BigDecimal personalUnemploymentMoney;
/**
* 个人大病金额
*/
@ExcelAttribute(name = "个人大病金额" )
@ExcelAttribute(name = "个人大病金额")
@ExcelProperty("个人大病金额")
private BigDecimal personalBigmailmentMoney;
/**
* 公积金编号
*/
@ExcelAttribute(name = "公积金编号" , maxLength = 50 )
@ExcelAttribute(name = "公积金编号", maxLength = 50)
@Size(max = 50, message = "公积金编号不可超过50位")
@ExcelProperty("公积金编号")
private String providentNo;
/**
* 单位公积金基数
*/
@ExcelAttribute(name = "单位公积金基数" )
@ExcelAttribute(name = "单位公积金基数")
@ExcelProperty("单位公积金基数")
private BigDecimal unitProvidentSet;
/**
* 单位公积金比例
*/
@ExcelAttribute(name = "单位公积金比例" )
@ExcelAttribute(name = "单位公积金比例")
@ExcelProperty("单位公积金比例")
private BigDecimal providentPercent;
/**
* 单位公积金费用
*/
@ExcelAttribute(name = "单位公积金费用" )
@ExcelAttribute(name = "单位公积金费用")
@ExcelProperty("单位公积金费用")
private BigDecimal unitProvidentSum;
/**
* 个人公积金基数
*/
@ExcelAttribute(name = "个人公积金基数" )
@ExcelAttribute(name = "个人公积金基数")
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金费用
*/
@ExcelAttribute(name = "个人公积金费用" )
@ExcelAttribute(name = "个人公积金费用")
@ExcelProperty("个人公积金费用")
private BigDecimal personalProvidentSum;
......
......@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -11,8 +10,8 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@Data
public class TPreDispatchExportVo implements Serializable {
......@@ -95,7 +94,7 @@ public class TPreDispatchExportVo implements Serializable {
*/
@ExcelProperty(value ="入职日期")
@ExcelAttribute(name = "入职日期", needExport = true)
private LocalDate entryDate;
private String entryDate;
/**
* 正式工资
*/
......@@ -413,7 +412,7 @@ public class TPreDispatchExportVo implements Serializable {
*/
@ExcelProperty(value ="离职日期")
@ExcelAttribute(name = "离职日期", needExport = true)
private LocalDateTime leaveDate;
private String leaveDate;
/**
* 离职原因
*/
......
......@@ -8,6 +8,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.DecimalMax;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
......@@ -62,14 +63,14 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 联系电话1
*/
@Length(max = 20, message = "联系电话1不能超过20个字符")
@ExcelAttribute(name = "联系电话1", maxLength = 20)
@Length(max = 11, message = "联系电话1不能超过11个字符")
@ExcelAttribute(name = "联系电话1", maxLength = 11)
private String telOne;
/**
* 联系电话2
*/
@Length(max = 20, message = "联系电话2不能超过20个字符")
@ExcelAttribute(name = "联系电话2", maxLength = 20)
@Length(max = 11, message = "联系电话2不能超过11个字符")
@ExcelAttribute(name = "联系电话2", maxLength = 11)
private String telTwo;
/**
* 入职日期
......@@ -79,7 +80,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 正式工资
*/
@ExcelAttribute(name = "正式工资")
@ExcelAttribute(name = "正式工资", maxLength = 20)
private String formalSalary;
/**
* 派遣开始日期
......@@ -120,7 +121,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 试用期工资
*/
@ExcelAttribute(name = "试用期工资")
@ExcelAttribute(name = "试用期工资", maxLength = 20)
private String trialSalary;
/**
* 工作制
......@@ -143,8 +144,8 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 实际工作地
*/
@Length(max = 100, message = "实际工作地不能超过100个字符")
@ExcelAttribute(name = "实际工作地", maxLength = 100)
@Length(max = 20, message = "实际工作地不能超过20个字符")
@ExcelAttribute(name = "实际工作地", maxLength = 20)
private String workingAddress;
/**
* 备注说明1
......@@ -167,7 +168,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 养老基数
*/
@ExcelAttribute(name = "养老基数",isFloat = true)
@ExcelAttribute(name = "养老基数",isFloat = true, maxLength = 12)
private BigDecimal pensionBase;
/**
* 养老起缴月
......@@ -184,7 +185,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 医疗基数
*/
@ExcelAttribute(name = "医疗基数", isFloat = true)
@ExcelAttribute(name = "医疗基数", isFloat = true, maxLength = 12)
private BigDecimal medicalBase;
/**
* 医疗起缴月
......@@ -201,7 +202,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 工伤基数
*/
@ExcelAttribute(name = "工伤基数", isFloat = true)
@ExcelAttribute(name = "工伤基数", isFloat = true, maxLength = 12)
private BigDecimal injuryBase;
/**
* 工伤起缴月
......@@ -218,7 +219,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 生育基数
*/
@ExcelAttribute(name = "生育基数", isFloat = true)
@ExcelAttribute(name = "生育基数", isFloat = true, maxLength = 12)
private BigDecimal birthBase;
/**
* 生育起缴月
......@@ -235,7 +236,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 失业基数
*/
@ExcelAttribute(name = "失业基数", isFloat = true)
@ExcelAttribute(name = "失业基数", isFloat = true, maxLength = 12)
private BigDecimal unemploymentBase;
/**
* 失业起缴月
......@@ -252,7 +253,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 公积金基数
*/
@ExcelAttribute(name = "公积金基数", isFloat = true)
@ExcelAttribute(name = "公积金基数", isFloat = true, maxLength = 12)
private BigDecimal fundBase;
/**
* 公积金起缴月
......@@ -264,17 +265,19 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 公积金个人比例
*/
@ExcelAttribute(name = "公积金个人比例", isFloat = true)
@DecimalMax(value = "100.00",message = "公积金个人比例不能大于100.00")
private BigDecimal fundPersonalPer;
/**
* 公积金企业比例
*/
@ExcelAttribute(name = "公积金企业比例", isFloat = true)
@DecimalMax(value = "100.00",message = "公积金企业比例不能大于100.00")
private BigDecimal fundCompanyPer;
/**
* 派单分公司
*/
@Length(max = 50, message = "派单分公司不能超过50个字符")
@ExcelAttribute(name = "派单分公司", maxLength = 50)
@Length(max = 50, message = "派单分公司不能超过20个字符")
@ExcelAttribute(name = "派单分公司", maxLength = 20)
private String dispatchCompany;
/**
* 派单客服
......@@ -285,8 +288,8 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 小合同名称
*/
@Length(max = 150, message = "小合同名称不能超过150个字符")
@ExcelAttribute(name = "小合同名称", maxLength = 150)
@Length(max = 20, message = "小合同名称不能超过20个字符")
@ExcelAttribute(name = "小合同名称", maxLength = 20)
private String contractMinorName;
/**
* 唯一号
......@@ -384,7 +387,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 离职日期
*/
@ExcelAttribute(name = "离职日期", isDate = true)
private Date leaveDate;
private String leaveDate;
/**
* 离职原因
*/
......@@ -402,8 +405,8 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 合同类型
*/
@Length(max = 50, message = "合同类型不能超过50个字符")
@ExcelAttribute(name = "合同类型", maxLength = 50)
@Length(max = 20, message = "合同类型不能超过20个字符")
@ExcelAttribute(name = "合同类型", maxLength = 20)
@ExcelProperty(value ="合同类型")
private String contractType;
/**
......@@ -587,6 +590,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 备注
*/
@ExcelAttribute(name = "备注", maxLength = 255)
@Length(max = 255, message = "备注不能超过255个字符")
private String remark;
/**
......
......@@ -267,8 +267,9 @@ public class TDispatchInfoController {
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')")
public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "auditStatus", required = true) String auditStatus,
@RequestParam(name = "auditRemark", required = false) String auditRemark) {
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark);
@RequestParam(name = "auditRemark", required = false) String auditRemark,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark,remark);
}
/**
......@@ -290,8 +291,9 @@ public class TDispatchInfoController {
@RequestParam(name = "typeSub", required = true) String typeSub,
@RequestParam(name = "handleStatus", required = true) String handleStatus,
@RequestParam(name = "handleRemark", required = false) String handleRemark,
@RequestParam(name = "socialType", required = false) String socialType) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType);
@RequestParam(name = "socialType", required = false) String socialType,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType,remark);
}
/**
......
......@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchReduceVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -270,12 +271,12 @@ public class TPreDispatchInfoController {
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
}
ExcelUtil<TPreDispatchInfo> util1 = null;
ExcelUtil<TPreDispatchReduceVo> util1 = null;
try {
jsonString = URLDecoder.decode(jsonString, CommonConstants.UTF8).replace("=", "");
util1 = new ExcelUtil<>(TPreDispatchInfo.class);
util1 = new ExcelUtil<>(TPreDispatchReduceVo.class);
util1.getJsonStringToList(jsonString, null);
List<TPreDispatchInfo> listInfo = util1.getEntityList();
List<TPreDispatchReduceVo> listInfo = util1.getEntityList();
//用于返回错误信息
List<ErrorMessage> errorInfo = new ArrayList<>();
if (null != util1.getErrorInfo() && !util1.getErrorInfo().isEmpty()) {
......
......@@ -64,11 +64,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo getSocialAndFundInfoById(String id);
List<ErrorMessage> addBatchApplyAudit(List<String> initStrToList, YifuUser user, Integer flag, String auditStatus, String auditRemark);
List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, Integer flag, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyAudit(String ids,String auditStatus,String auditRemark);
R<List<ErrorMessage>> addApplyAudit(String ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyHandle(String ids,String typeSub,String handleStatus,String handleRemark,String socialType);
R<List<ErrorMessage>> addApplyHandle(String ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
......
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.social.entity.TPreDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchReduceVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo;
import javax.servlet.http.HttpServletResponse;
......@@ -118,7 +119,7 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
* @param user
* @return
**/
List<ErrorMessage> batchSavePreDisPatchReduce(List<TPreDispatchInfo> listInfo, YifuUser user);
List<ErrorMessage> batchSavePreDisPatchReduce(List<TPreDispatchReduceVo> listInfo, YifuUser user);
/**
* 预派单批量更新
......
......@@ -307,7 +307,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date: 2022/7/25 19:41
* @return: void
**/
private void getBaseMap(List<TForecastLibrary> librarySocialList, List<TForecastLibrary> librarySocialListTemp, List<TForecastLibrary> libraryFundList, List<TForecastLibrary> libraryFundListTemp, HashMap<String, TForecastLibrary> socialHistoryMap, HashMap<String, TForecastLibrary> fundHistoryMap, HashMap<String, TForecastLibrary> socialPushMap, HashMap<String, TForecastLibrary> fundPushMap) {
private void getBaseMap(List<TForecastLibrary> librarySocialList, List<TForecastLibrary> librarySocialListTemp
, List<TForecastLibrary> libraryFundList, List<TForecastLibrary> libraryFundListTemp
, HashMap<String, TForecastLibrary> socialHistoryMap, HashMap<String, TForecastLibrary> fundHistoryMap
, HashMap<String, TForecastLibrary> socialPushMap, HashMap<String, TForecastLibrary> fundPushMap) {
// Map的key
String sfMapKey;
if (Common.isNotNull(librarySocialList)) {
......@@ -409,25 +412,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
private void getChangeReduceData(TSocialFundInfo socialFund, TForecastLibrary libraryOld) {
//单位社保
libraryOld.setUnitPensionFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitPensionFee(), socialFund.getUnitPersionMoney()));
libraryOld.setUnitMedicalFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitMedicalFee(), socialFund.getUnitMedicalMoney()));
libraryOld.setUnitBirthFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitBirthFee(), socialFund.getUnitBirthMoney()));
libraryOld.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitWorkInjuryFee(), socialFund.getUnitInjuryMoney()));
libraryOld.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitUnemploymentFee(), socialFund.getUnitUnemploymentMoney()));
libraryOld.setUnitBitailmentFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitBitailmentFee(), socialFund.getUnitBigailmentMoney()));
libraryOld.setUnitInterestFee(BigDecimalUtils.safeSubtract(libraryOld.getUnitInterestFee(), socialFund.getUnitInterestFee()));
libraryOld.setUnitSocialSum(BigDecimalUtils.safeSubtract(libraryOld.getUnitSocialSum(), socialFund.getUnitSocialSum()));
libraryOld.setUnitPensionFee(BigDecimalUtils.safeSubtract(socialFund.getUnitPersionMoney(), libraryOld.getUnitPensionFee()));
libraryOld.setUnitMedicalFee(BigDecimalUtils.safeSubtract(socialFund.getUnitMedicalMoney(), libraryOld.getUnitMedicalFee()));
libraryOld.setUnitBirthFee(BigDecimalUtils.safeSubtract(socialFund.getUnitBirthMoney(), libraryOld.getUnitBirthFee()));
libraryOld.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract(socialFund.getUnitInjuryMoney(), libraryOld.getUnitWorkInjuryFee()));
libraryOld.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract(socialFund.getUnitUnemploymentMoney(), libraryOld.getUnitUnemploymentFee()));
libraryOld.setUnitBitailmentFee(BigDecimalUtils.safeSubtract(socialFund.getUnitBigailmentMoney(), libraryOld.getUnitBitailmentFee()));
libraryOld.setUnitInterestFee(BigDecimalUtils.safeSubtract(socialFund.getUnitInterestFee(), libraryOld.getUnitInterestFee()));
libraryOld.setUnitSocialSum(BigDecimalUtils.safeSubtract(socialFund.getUnitSocialSum(), libraryOld.getUnitSocialSum()));
// 个人社保
libraryOld.setPersonalPensionFee(BigDecimalUtils.safeSubtract(libraryOld.getPersonalPensionFee(), socialFund.getPersonalPersionMoney()));
libraryOld.setPersonalMedicalFee(BigDecimalUtils.safeSubtract(libraryOld.getPersonalMedicalFee(), socialFund.getPersonalMedicalMoney()));
libraryOld.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract(libraryOld.getPersonalUnemploymentFee(), socialFund.getPersonalUnemploymentMoney()));
libraryOld.setPersonalInterestFee(BigDecimalUtils.safeSubtract(libraryOld.getPersonalUnemploymentFee(), socialFund.getPersonalUnemploymentMoney()));
libraryOld.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract(libraryOld.getPersonalBigailmentFee(), socialFund.getPersonalBigailmentMoney()));
libraryOld.setPersonalSocialSum(BigDecimalUtils.safeSubtract(libraryOld.getPersonalSocialSum(), socialFund.getPersonalSocialSum()));
libraryOld.setPersonalPensionFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalPersionMoney(), libraryOld.getPersonalPensionFee()));
libraryOld.setPersonalMedicalFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalMedicalMoney(), libraryOld.getPersonalMedicalFee()));
libraryOld.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalUnemploymentMoney(), libraryOld.getPersonalUnemploymentFee()));
libraryOld.setPersonalInterestFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalUnemploymentMoney(), libraryOld.getPersonalUnemploymentFee()));
libraryOld.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalBigailmentMoney(), libraryOld.getPersonalBigailmentFee()));
libraryOld.setPersonalSocialSum(BigDecimalUtils.safeSubtract(socialFund.getPersonalSocialSum(), libraryOld.getPersonalSocialSum()));
// 单位公积金
libraryOld.setUnitFundSum(BigDecimalUtils.safeSubtract(libraryOld.getUnitFundSum(), socialFund.getUnitFundSum()));
libraryOld.setUnitFundSum(BigDecimalUtils.safeSubtract(socialFund.getUnitFundSum(), libraryOld.getUnitFundSum()));
// 个人公积金
libraryOld.setPersonalFundSum(BigDecimalUtils.safeSubtract(libraryOld.getPersonalFundSum(), socialFund.getPersonalFundSum()));
libraryOld.setPersonalFundSum(BigDecimalUtils.safeSubtract(socialFund.getPersonalFundSum(), libraryOld.getPersonalFundSum()));
}
......@@ -451,7 +454,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
, TForecastLibrary lib, String sfMapKey, TForecastLibrary historyLibrary) {
if (null == lib) {
lib = new TForecastLibrary();
} else if (Common.isNotNull(lib.getId())) {
lib.setId(null);
}
lib.setDataPush(CommonConstants.ZERO_INT);
lib.setSocialHousehold(tSocialInfo.getSocialHousehold());
lib.setSocialHouseholdName(tSocialInfo.getSocialHouseholdName());
lib.setDiffType(diffType);
......@@ -1082,7 +1088,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @param library 预估库
* @param socialInfo 社保
* @param sysBaseSetInfo 基数配置
* @param paymentType 0最低、1自定义、2最高
* @param paymentType 0最低缴纳、1自定义、2最高缴纳
* @Description: 塞大病金额
* @Author: hgw
* @Date: 2020/11/25 15:51
......@@ -1248,7 +1254,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
, TForecastLibrary historyLibrary) {
if (lib == null) {
lib = new TForecastLibrary();
} else if (Common.isNotNull(lib.getId())) {
lib.setId(null);
}
lib.setDataPush(CommonConstants.ZERO_INT);
lib.setProvidentHousehold(providentFund.getProvidentHousehold());
lib.setProvidentHouseholdName(providentFund.getProvidentHouseholdName());
lib.setDiffType(diffType);
......
......@@ -38,11 +38,9 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -386,7 +384,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo.setEmpName(preInfo.getEmpName());
dispatchReduceVo.setEmpIdcard(preInfo.getEmpIdcard());
if (Common.isNotNull(preInfo.getLeaveDate())){
dispatchReduceVo.setLeaveDate(preInfo.getLeaveDate());
dispatchReduceVo.setLeaveDate(DateUtil.stringToDate(preInfo.getLeaveDate()));
}
dispatchReduceVo.setReasonType(preInfo.getLeaveReasonAdd());
dispatchReduceVo.setTrustRemark(preInfo.getLeaveReason());
......@@ -486,7 +484,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo.setEmpName(pre.getEmpName());
dispatchReduceVo.setEmpIdcard(pre.getEmpIdcard());
if (null != pre.getLeaveDate()){
dispatchReduceVo.setLeaveDate(pre.getLeaveDate());
dispatchReduceVo.setLeaveDate(DateUtil.stringToDate(pre.getLeaveDate()));
}
dispatchReduceVo.setReasonType(pre.getLeaveReasonAdd());
dispatchReduceVo.setTrustRemark(pre.getLeaveReason());
......@@ -629,7 +627,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* 预派单批量新增派减
* @param listInfo
* @param list
* @param user
* @Author huyc
* @Date 2022-07-18
......@@ -637,11 +635,15 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
**/
@Transactional
@Override
public List<ErrorMessage> batchSavePreDisPatchReduce(List<TPreDispatchInfo> listInfo, YifuUser user) {
public List<ErrorMessage> batchSavePreDisPatchReduce(List<TPreDispatchReduceVo> list, YifuUser user) {
List<ErrorMessage> errorList = new ArrayList<>();
// 获取区域数据MAP
HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
// 做下转换
List<TPreDispatchInfo> listInfo = changePreRes(list);
if (dataCheck(listInfo, errorList, areaHashMap, areaIdMap)) {
return errorList;
}
......@@ -832,6 +834,18 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
return listInfo;
}
private List<TPreDispatchInfo> changePreRes(List<TPreDispatchReduceVo> list) {
List<TPreDispatchInfo> listInfo = new ArrayList<>();
TPreDispatchInfo preInfo = new TPreDispatchInfo();
if (Common.isNotNull(list)){
for (TPreDispatchReduceVo info:list){
BeanUtils.copyProperties(preInfo,info);
listInfo.add(preInfo);
}
}
return listInfo;
}
private void initBatchUpdateArea(HashMap<String, SysArea> areaHashMap, HashMap<String, SysArea> areaIdMap, TPreDispatchInfo info) {
R<Boolean> x;
if (CommonConstants.ZERO_STRING.equals(info.getType())){
......@@ -2131,7 +2145,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchInfo.setFundReduceDate(DateUtil.getFirstDay(pre.getFundEndReduce()));
}
if (null != pre.getLeaveDate()) {
dispatchInfo.setLeaveDate(pre.getLeaveDate());
dispatchInfo.setLeaveDate(DateUtil.stringToDate(pre.getLeaveDate()));
}
}
......
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