Commit fcad1092 authored by hongguangwu's avatar hongguangwu

Merge branch 'MVP1.6.4' into develop

parents 1cfeee1f 55685508
......@@ -57,4 +57,7 @@ public interface TSalaryStandardOriginalMapper extends BaseMapper<TSalaryStandar
List<TSalaryOriginalExportVo> getTSalaryOriginalExportVoList(@Param("tSalaryStandardOriginal") TSalaryOriginalSearchVo tSalaryStandardOriginal
, @Param("idsStr") List<String> idsStr);
int exportListCount(@Param("tSalaryStandardOriginal") TSalaryOriginalSearchVo tSalaryStandardOriginal
, @Param("idsStr") List<String> idsStr);
}
......@@ -20,9 +20,7 @@ import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.monitorjbl.xlsx.StreamingReader;
......@@ -97,6 +95,11 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
return baseMapper.getTSalaryOriginalExportVoList(searchVo, idList);
}
private int exportListCount(TSalaryOriginalSearchVo searchVo) {
List<String> idList = Common.getList(searchVo.getIds());
return baseMapper.exportListCount(searchVo, idList);
}
/**
* @Description: 分页查询
* @Author: hgw
......@@ -1042,7 +1045,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
String fileName = "薪资原表配置导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryOriginalExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
long count = exportListCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
......@@ -1087,21 +1090,4 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
}
}
private Long noPageCountDiy(TSalaryOriginalSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandardOriginal> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandardOriginal::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryOriginalSearchVo entity) {
LambdaQueryWrapper<TSalaryOriginalSearchVo> wrapper = Wrappers.lambdaQuery(entity);
if (Common.isNotNull(entity.getCreateName())) {
wrapper.like(TSalaryOriginalSearchVo::getCreateName, entity.getCreateName());
}
return wrapper;
}
}
......@@ -123,6 +123,22 @@
ORDER BY a.CREATE_TIME desc
</select>
<select id="exportListCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM
t_salary_standard_original a
<where> a.DELETE_FLAG = 0
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items}
</foreach>
</if>
<include refid="TSalaryStandardOriginal_where"/>
</where>
</select>
<select id="getTSalaryOriginalExportVoList" resultMap="TSalaryOriginalExportMap">
SELECT
a.DEPT_NO,a.DEPT_NAME,a.SET_NAME,a.CREATE_NAME,a.CREATE_TIME
......
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
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.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -615,7 +616,7 @@ public class TPaymentInfoController {
@Operation(description = "税务社保明细导入")
@SysLog("税务社保明细导入")
@PostMapping("/importTaxSocialInfoList")
public R<List<ErrorDetailVO>> importTaxSocialInfoList(@RequestBody MultipartFile file) {
public R<List<ErrorMessage>> importTaxSocialInfoList(@RequestBody MultipartFile file) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
......
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/*
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.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.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
......@@ -79,7 +80,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream
* @return
*/
R<List<ErrorDetailVO>> importTaxSocialInfoDiy(InputStream inputStream);
R<List<ErrorMessage>> importTaxSocialInfoDiy(InputStream inputStream);
/**
* 批量导入公积金
......
......@@ -688,6 +688,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.ok();
}
/**
* @param errorMessageList
* @Description: 判断所有返回数据,是否全部为正确的
* @Author: hgw
* @Date: 2022/11/24 18:03
* @return: void
**/
private R<List<ErrorMessage>> judgeAllMessage1(List<ErrorMessage> errorMessageList) {
if (!errorMessageList.isEmpty()) {
if(errorMessageList.stream().allMatch(e-> CommonConstants.SAVE_SUCCESS.equals(e.getMessage()))) {
return R.ok(errorMessageList);
} else {
return R.failed(errorMessageList);
}
}
return R.ok();
}
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey, String importSuccessKey,
ConcurrentHashMap<String, ErrorDetailVO> errorMessageMap,
YifuUser user, Integer rowNumber,
......@@ -1689,7 +1707,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public R<List<ErrorDetailVO>> importTaxSocialInfoDiy(InputStream inputStream) {
public R<List<ErrorMessage>> importTaxSocialInfoDiy(InputStream inputStream) {
YifuUser user = SecurityUtils.getUser();
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
if (Common.isNotNull(redisUtil.get(sumNumKey))) {
......@@ -1728,7 +1746,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
ConcurrentHashMap<String, ErrorDetailVO> errorMessageMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, ErrorMessage> errorMessageMap = new ConcurrentHashMap<>();
ExcelUtil<TPaymentTaxSocialVo> util1 = new ExcelUtil<>(TPaymentTaxSocialVo.class);
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap = new ConcurrentHashMap<>();
ConcurrentHashMap<String, BigDecimal> bigMoneyMap = new ConcurrentHashMap<>();
......@@ -1761,7 +1779,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageMap.put(UUID.randomUUID().toString(),new ErrorDetailVO(errorMessage.getLineNum(), errorMessage.getMessage()));
errorMessageMap.put(UUID.randomUUID().toString(),new ErrorMessage(errorMessage.getLineNum(), errorMessage.getMessage(),data));
} else {
cachedDataList.add(data);
}
......@@ -1847,9 +1865,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
List<ErrorDetailVO> errorMessageList = new ArrayList<>(errorMessageMap.values());
List<ErrorMessage> errorMessageList = new ArrayList<>(errorMessageMap.values());
errorMessageMap.clear();
return this.judgeAllMessage(errorMessageList);
return this.judgeAllMessage1(errorMessageList);
}
@Override
......@@ -2209,7 +2227,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
private void importTPaymentSocialTax(List<TPaymentTaxSocialVo> list,
ConcurrentHashMap<String, ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, ErrorMessage> errorMessageList,
Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> birthMoneyMap,
......@@ -2234,7 +2252,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int taskSize = list.size() / partSize + CommonConstants.ONE_INT;
int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity();
if (taskSize > residualCapacity) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE)));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE)));
} else {
//已存在的档案数据
List<String> monthList = Common.listObjectToStrList(list, ExcelAttributeConstants.SOCIAL_PAY_MONTH).stream().distinct().collect(Collectors.toList());
......@@ -2401,7 +2419,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
// -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<CompletableFuture<ConcurrentHashMap<String, ErrorDetailVO>>> completableFutureList = new ArrayList<>();
List<CompletableFuture<ConcurrentHashMap<String, ErrorMessage>>> completableFutureList = new ArrayList<>();
// 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance();
......@@ -2431,7 +2449,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
try {
// 1.list.size()不足100时直接执行
if (list.size() < 100) {
CompletableFuture<ConcurrentHashMap<String, ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
CompletableFuture<ConcurrentHashMap<String, ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListTax(list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
paymentInfoBigMap, errorMessageList, pensionMoneyMap, birthMoneyMap,bigMoneyMap,
......@@ -2444,7 +2462,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = 0; i < 100; i = i + 25) {
// 单个线程每次执行25条
List<TPaymentTaxSocialVo> finalTempList1 = list.subList(i,i+j);
CompletableFuture<ConcurrentHashMap<String, ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
CompletableFuture<ConcurrentHashMap<String, ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListTax(finalTempList1
, areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap,
paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap,
......@@ -2460,7 +2478,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
boolean computeFlag;
do {
computeFlag = false;
for (CompletableFuture<ConcurrentHashMap<String, ErrorDetailVO>> listCompletableFuture : completableFutureList) {
for (CompletableFuture<ConcurrentHashMap<String, ErrorMessage>> listCompletableFuture : completableFutureList) {
if (!listCompletableFuture.isDone()) {
computeFlag = true;
}
......@@ -3196,7 +3214,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return errorMessageList;
}
private ConcurrentHashMap<String, ErrorDetailVO> executeImportSocialListTax(List<TPaymentTaxSocialVo> list,
private ConcurrentHashMap<String, ErrorMessage> executeImportSocialListTax(List<TPaymentTaxSocialVo> list,
HashMap<String, String> areaMap,
HashMap<String, String> areaMap2,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap,
......@@ -3204,7 +3222,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
ConcurrentHashMap<String, ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, ErrorMessage> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> birthMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
......@@ -3261,7 +3279,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//无对应员工的社保数据
if (socialMap.size() > CommonConstants.ZERO_INT) {
if (null == infoVo.getSocialProvince() || null == infoVo.getSocialCity()) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳地填写错误,请核实后再次尝试!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "社保缴纳地填写错误,请核实后再次尝试!",infoVo));
continue;
}
socialInfo = socialMap.get(infoVo.getEmpIdcard()
......@@ -3271,11 +3289,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验
if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "姓名与身份证信息不一致,请核实后再次尝试!",infoVo));
continue;
}
if (socialInfo != null && socialInfo.getSocialStartDate() == null) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!",infoVo));
continue;
}
}
......@@ -3299,8 +3317,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if (!isTrueAdder) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(),
"无对应员工(身份证:" + infoVo.getEmpIdcard() + ")" + "的社保数据(请查验社保缴纳地)"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(),
"无对应员工(身份证:" + infoVo.getEmpIdcard() + ")" + "的社保数据(请查验社保缴纳地)",infoVo));
continue;
}
} else {
......@@ -3325,9 +3343,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
domain = null;
}
if (Common.isEmpty(domain)) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(),
payExists.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.NOT_EXIT_SETTLEiNFO));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.NOT_EXIT_SETTLEiNFO,infoVo));
continue;
}
payExists.setBpoFlag(domain.getBpoFlag());
......@@ -3351,9 +3367,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
domain = null;
}
if (Common.isEmpty(domain)) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(),
payExists.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.NOT_EXIT_SETTLEiNFO));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.NOT_EXIT_SETTLEiNFO,infoVo));
continue;
}
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
......@@ -3371,10 +3385,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 项目信息校验
errorInfo = settleInfoCheck(payExists);
if (!Common.isEmpty(errorInfo)){
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(),
CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(),
payExists.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_PRI
+ errorInfo + SocialConstants.ERROR_END));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_PRI
+ errorInfo + SocialConstants.ERROR_END,infoVo));
continue;
}
if (Common.isNotNull(tSocialInfo)) {
......@@ -3420,8 +3432,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, pensionMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位养老缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(),SocialConstants.ERROR_TEMPLATE + "的单位养老缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(pensionMoneyMap.get(exitMoneyPer))) {
......@@ -3434,8 +3445,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoneyPer) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, pensionMoneyMap.get(exitMoneyPer)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的个人养老缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的个人养老缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(pensionMoneyMap.get(exitMoneyCon))) {
......@@ -3465,8 +3475,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
|| (BigDecimalUtils.safeMultiply(payExists.getSocialSum(), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payInsert.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(payInsert.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payInsert.getSocialHousehold(), payInsert.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!",infoVo));
continue;
}
batchYlInsertList.put(exitInsertPaymnet, payExists);
......@@ -3482,8 +3492,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, unEmpMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位失业缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的单位失业缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(unEmpMoneyMap.get(exitMoneyPer))) {
......@@ -3496,8 +3505,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoneyPer) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, unEmpMoneyMap.get(exitMoneyPer)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的个人失业缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的个人失业缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(unEmpMoneyMap.get(exitMoneyCon))) {
......@@ -3527,8 +3535,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
|| (BigDecimalUtils.safeMultiply(payExists.getSocialSum(), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payInsert.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(payInsert.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!",infoVo));
continue;
}
batchSyInsertList.put(exitInsertPaymnet, payExists);
......@@ -3544,8 +3552,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, medicalMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位医疗缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的单位医疗缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(medicalMoneyMap.get(exitMoneyPer))) {
......@@ -3558,8 +3565,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoneyPer) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, medicalMoneyMap.get(exitMoneyPer)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的个人医疗缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的个人医疗缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(medicalMoneyMap.get(exitMoneyCon))) {
......@@ -3589,8 +3595,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
|| (BigDecimalUtils.safeMultiply(payExists.getSocialSum(), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payInsert.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(payInsert.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗缴费数据,请勿重复导入!",infoVo));
continue;
}
batchYyInsertList.put(exitInsertPaymnet, payExists);
......@@ -3604,8 +3610,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (injuryMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, injuryMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位工伤缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的单位工伤缴费数据",infoVo));
continue;
} else {
payExists.setUnitInjuryMoney(infoVo.getPaymentMoney());
......@@ -3629,8 +3634,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != payInsert && ((null != payInsert.getGsSameFlg() && CommonConstants.ONE_STRING.equals(payInsert.getGsSameFlg()))
|| (BigDecimalUtils.safeMultiply(infoVo.getPaymentMoney(),
BigDecimalUtils.isNullToZero(payInsert.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!",infoVo));
continue;
}
batchGsInsertList.put(exitInsertPaymnet, payExists);
......@@ -3647,8 +3652,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (bigMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, bigMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位大病救助金缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的单位大病救助金缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(bigMoneyMap.get(exitMoneyPer))) {
......@@ -3661,8 +3665,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (bigMoneyMap.get(exitMoneyPer) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, bigMoneyMap.get(exitMoneyPer)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的个人大病救助金缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(), new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE + "的个人大病救助金缴费数据",infoVo));
continue;
} else {
if (Common.isNotNull(bigMoneyMap.get(exitMoneyCon))) {
......@@ -3691,8 +3694,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
|| (BigDecimalUtils.safeMultiply(payExists.getSocialSum(), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payInsert.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(payInsert.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的大病救助金缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(),"已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的大病救助金缴费数据,请勿重复导入!",infoVo));
continue;
}
batchBigInsertList.put(exitInsertPaymnet, payExists);
......@@ -3706,8 +3709,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (birthMoneyMap.get(exitMoneyCon) != null && BigDecimalUtils.safeMultiply(
BigDecimalUtils.isNullToZero(infoVo.getPaymentMoney())
, birthMoneyMap.get(exitMoneyCon)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.put(UUID.randomUUID().toString(), new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "",
infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的单位生育缴费数据"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), SocialConstants.ERROR_TEMPLATE +
"的单位生育缴费数据",infoVo));
continue;
} else {
payExists.setUnitBirthMoney(infoVo.getPaymentMoney());
......@@ -3731,17 +3734,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != payInsert && ((null != payInsert.getBrSameFlg() && CommonConstants.ONE_STRING.equals(payInsert.getBrSameFlg()))
|| (BigDecimalUtils.safeMultiply(infoVo.getPaymentMoney(),
BigDecimalUtils.isNullToZero(payInsert.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位生育缴费数据,请勿重复导入!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位生育缴费数据,请勿重复导入!",infoVo));
continue;
}
batchBirthInsertList.put(exitInsertPaymnet, payExists);
}
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT,
infoVo.getEmpIdcard(),
payExists.getSocialHousehold(),
payExists.getProvidentHousehold(), infoVo.getEmpName(),
"对应员工身份证" + infoVo.getEmpIdcard() + CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(),
CommonConstants.SAVE_SUCCESS,infoVo));
}
}
return errorMessageList;
......@@ -3777,18 +3777,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/**
* 导入校验
**/
private boolean socialThreeCheckBaseTax(ConcurrentHashMap<String, ErrorDetailVO> errorMessageList,
private boolean socialThreeCheckBaseTax(ConcurrentHashMap<String, ErrorMessage> errorMessageList,
TPaymentTaxSocialVo infoVo) {
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳月份不可为空!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "社保缴纳月份不可为空!",infoVo));
return true;
}
if (!Common.isNotNull(infoVo.getSocialCreateMonth())) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保生成月份不可为空!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "社保生成月份不可为空!",infoVo));
return true;
}
if (!Common.isNotNull(infoVo.getSocialPayAddr())) {
errorMessageList.put(UUID.randomUUID().toString(),new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳地不可为空!"));
errorMessageList.put(UUID.randomUUID().toString(),new ErrorMessage(infoVo.getRowIndex(), "社保缴纳地不可为空!",infoVo));
return true;
}
return false;
......
......@@ -794,6 +794,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
personVo.setPersonName(updateJson.get("cn")==null?"":updateJson.getString("cn"));
personVo.setTelephoneNumber(updateJson.get("telephoneNumber")==null?"":updateJson.getString("telephoneNumber"));
personVo.setEmail(updateJson.get("mail")==null?"":updateJson.getString("mail"));
personVo.setRoleIds(updateJson.get("x-init-role-ids")==null?"":updateJson.getString("x-init-role-ids"));
String dn = updateJson.get("dn")==null?"":updateJson.getString("dn");
log.info("更新人员信息:" + dn + "_" +personVo.getUid());
if (dn.contains("uid")) {
......
......@@ -39,6 +39,7 @@ security:
- /actuator/**
- /swagger-ui/**
- /role/getRoleList
- /user/updateUserAndDept
......
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