Commit 973f0198 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 9641f9f0 9dfa656d
...@@ -348,7 +348,7 @@ public class TSettleDomain extends BaseEntity { ...@@ -348,7 +348,7 @@ public class TSettleDomain extends BaseEntity {
@Schema(description = "公积金类型0:缴费库;1:预估库") @Schema(description = "公积金类型0:缴费库;1:预估库")
private String fundType; private String fundType;
/** /**
* 商险结算类型0 合并 1 单独 * 商险结算类型0 合并(预估) 1 单独(实缴)
*/ */
@ExcelAttribute(name = "商险结算类型0 合并 1 单独") @ExcelAttribute(name = "商险结算类型0 合并 1 单独")
@ExcelProperty("商险结算类型0 合并 1 单独") @ExcelProperty("商险结算类型0 合并 1 单独")
......
...@@ -1419,14 +1419,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1419,14 +1419,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return str; return str;
} }
public boolean saveCheck(EmployeeXProjectVO employeeXProjectVO, TEmployeeProject tEmployeeProject) {
if (employeeXProjectVO.getDeptNo().equals(tEmployeeProject.getDeptNo()) &&
employeeXProjectVO.getEmpIdcard().equals(tEmployeeProject.getEmpIdcard())) {
return true;
}
return false;
}
/** /**
* @Description: 更新社保公积金状态 : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减 * @Description: 更新社保公积金状态 : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
* 派增: * 派增:
......
...@@ -31,20 +31,6 @@ import java.util.Map; ...@@ -31,20 +31,6 @@ import java.util.Map;
public class ArchivesDaprUtil { public class ArchivesDaprUtil {
@Autowired @Autowired
private DaprArchivesProperties daprArchivesProperties; private DaprArchivesProperties daprArchivesProperties;
/**
* @Author fxj
* @Description 获取登录用户对应的计算主体权限
* @Date 21:15 2022/7/18
* @Param
* @return
**/
public R<List<String>> getSettleDomainIdsByUserId(){
R<List<String>> res = HttpDaprUtil.invokeMethodGet(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainIdsByUserId","", Object.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取用户项目权限失败!");
}
return res;
}
/** /**
* @Author fxj * @Author fxj
* @Description 获取派单校验需要的档案信息 * @Description 获取派单校验需要的档案信息
......
...@@ -1431,6 +1431,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1431,6 +1431,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.orderByDesc(TInsuranceDetail::getUpdateTime) .orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL) .last(CommonConstants.LAST_ONE_SQL)
); );
BigDecimal actualMoney;
actualMoney = detail.getActualPremium();
if (StringUtils.isNotBlank(success.getInvoiceNo())){ if (StringUtils.isNotBlank(success.getInvoiceNo())){
detail.setInvoiceNo(success.getInvoiceNo()); detail.setInvoiceNo(success.getInvoiceNo());
//如果发票号不为空,将替换类型的发票号也全部更新 //如果发票号不为空,将替换类型的发票号也全部更新
...@@ -1625,27 +1627,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1625,27 +1627,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this.updateById(detail); this.updateById(detail);
detailList.add(detail); detailList.add(detail);
try { try {
if (detail.getBuyType() != CommonConstants.FOUR_INT) { if (detail.getBuyType() != CommonConstants.FOUR_INT &&
if (new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) != 0) { CommonConstants.ONE_INT == detail.getSettleType()) {
//判断是否存在当月的商险收入数据 if (new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) {
TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setSourceId(detail.getId());
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
&& detailInfoList.getData().getDetailList().size() > 0) {
//生成红冲数据
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detailInfo);
}
}
//生成收入数据
createInsuranceInfo(detail);
} else {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null; List<TSettleDomainSelectVo> settleDomainR = null;
...@@ -1666,39 +1650,77 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1666,39 +1650,77 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 含有商险,则计算收入 // 含有商险,则计算收入
if (settleDomain.getMrSettleType().equals(CommonConstants.TWO_STRING)) { if (settleDomain.getMrSettleType().equals(CommonConstants.TWO_STRING)) {
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem() if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
.contains(CommonConstants.THREE_STRING)) { .contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getManagementType())) {
gMoney = BigDecimalUtils.safeMultiply(detail.getActualPremium(), gMoney = BigDecimalUtils.safeMultiply(actualMoney,
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
isBl = true; isBl = true;
} }
} else if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem() //判断是否存在当月的商险收入数据
.contains(CommonConstants.THREE_STRING)) { TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setSourceId(detail.getId());
if (isBl) {
incomeDetail.setMoney(gMoney);
}else {
incomeDetail.setMoney(actualMoney);
}
incomeDetail.setFeeType(CommonConstants.ONE_STRING);
//判断是否存在当月的商险收入数据
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
&& detailInfoList.getData().getDetailList().size() > 0) {
//生成红冲数据
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detail1);
break;
}
}
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem()
.contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getRiskFundType())) {
gMoney = BigDecimalUtils.safeMultiply(detail.getActualPremium(), gMoney = BigDecimalUtils.safeMultiply(actualMoney,
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
isBl = true; isBl = true;
} }
}
}
}
//判断是否存在当月的商险收入数据 //判断是否存在当月的商险收入数据
TIncomeDetail incomeDetail = new TIncomeDetail(); TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setSourceId(detail.getId()); incomeDetail.setSourceId(detail.getId());
incomeDetail.setFeeType(CommonConstants.TWO_STRING);
if (isBl) { if (isBl) {
incomeDetail.setMoney(gMoney); incomeDetail.setMoney(gMoney);
}else { }else {
incomeDetail.setMoney(detail.getActualPremium()); incomeDetail.setMoney(actualMoney);
} }
//判断是否存在当月的商险收入数据
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail); R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if (Common.isNotNull(detailInfoList) && detailInfoList.getData().getDetailList().size() == 0) { if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
&& detailInfoList.getData().getDetailList().size() > 0) {
//生成红冲数据
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detail1);
break;
}
}
}
}
}
//生成收入数据 //生成收入数据
createInsuranceInfo(detail); createInsuranceInfo(detail);
} }
} }
}
}catch (Exception e){ }catch (Exception e){
log.error("收入数据同步处理失败:"+e); log.error("收入数据同步处理失败:"+e);
} }
...@@ -6074,6 +6096,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6074,6 +6096,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//判断是否存在当月的商险收入数据 //判断是否存在当月的商险收入数据
Boolean isExist = false; Boolean isExist = false;
List<TIncomeDetail> incomeDetailList = new ArrayList<>();
TIncomeDetail incomeDetail = new TIncomeDetail(); TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setEmpIdcard(insuranceDetail.getEmpIdcardNo()); incomeDetail.setEmpIdcard(insuranceDetail.getEmpIdcardNo());
incomeDetail.setCreateMonth(DateUtil.getYearAndMonth(insuranceDetail.getHandledTime(),0)); incomeDetail.setCreateMonth(DateUtil.getYearAndMonth(insuranceDetail.getHandledTime(),0));
...@@ -6082,15 +6105,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6082,15 +6105,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<TIncomeDetailReturnVo> detailList = socialDaprUtils.getTIncomeDetailList(incomeDetail); R<TIncomeDetailReturnVo> detailList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS
&& detailList.getData().getDetailList().size() > 0){ && detailList.getData().getDetailList().size() > 0){
incomeDetailList = detailList.getData().getDetailList();
isExist = true; isExist = true;
} }
//预估或者实缴保费 //预估或者实缴保费
BigDecimal fee; BigDecimal fee;
if (CommonConstants.ONE_STRING.equals(insuranceDetail.getSettleType())) { if (CommonConstants.ONE_INT == insuranceDetail.getSettleType()) {
fee = insuranceDetail.getEstimatePremium();
} else {
fee = insuranceDetail.getActualPremium(); fee = insuranceDetail.getActualPremium();
} else {
fee = insuranceDetail.getEstimatePremium();
} }
//判断是否为按人次收费 //判断是否为按人次收费
...@@ -6104,7 +6128,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6104,7 +6128,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
if (Common.isNotNull(incomeDetailList)) {
for (TIncomeDetail incomeDetailSum: incomeDetailList) {
if (!(incomeDetailSum.getSourceId().equals(insuranceDetail.getId()) &&
CommonConstants.ONE_STRING.equals(incomeDetailSum.getFeeType()) &&
CommonConstants.ONE_STRING.equals(incomeDetailSum.getMrSettleType()))) {
isSum = 1; isSum = 1;
break;
}
}
}
} }
if (!isExist || isSum == 1) { if (!isExist || isSum == 1) {
createIncomeInsurance(insuranceDetail, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(insuranceDetail, settleDomain, CommonConstants.ONE_STRING,
...@@ -6112,12 +6145,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6112,12 +6145,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settleDomain.getManagementFee()); settleDomain.getManagementFee());
} }
} else { } else {
BigDecimal gMoney = BigDecimal.ZERO; BigDecimal gMoney;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
if (Common.isNotNull(incomeDetailList)) {
for (TIncomeDetail incomeDetailSum: incomeDetailList) {
if (incomeDetailSum.getSourceId().equals(insuranceDetail.getId()) &&
CommonConstants.ONE_STRING.equals(incomeDetailSum.getFeeType()) &&
CommonConstants.TWO_STRING.equals(incomeDetailSum.getMrSettleType()) &&
CommonConstants.THREE_STRING.equals(incomeDetailSum.getFeeMode())) {
isSum = 6;
break;
} else {
isSum = 2; isSum = 2;
}
}
}
} else { } else {
isSum = 2; isSum = 2;
gMoney = BigDecimalUtils.safeMultiply(fee, settleDomain.getManagementFee().divide( gMoney = BigDecimalUtils.safeMultiply(fee, settleDomain.getManagementFee().divide(
...@@ -6133,10 +6178,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6133,10 +6178,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem() if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem()
.contains(CommonConstants.THREE_STRING)) { .contains(CommonConstants.THREE_STRING)) {
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
if (Common.isNotNull(incomeDetailList)) {
for (TIncomeDetail incomeDetailSum: incomeDetailList) {
if (!(incomeDetailSum.getSourceId().equals(insuranceDetail.getId()) &&
CommonConstants.TWO_STRING.equals(incomeDetailSum.getFeeType()) &&
CommonConstants.ONE_STRING.equals(incomeDetailSum.getMrSettleType()))) {
isSum = 3; isSum = 3;
break;
}
}
}
} }
if (!isExist || isSum == 3) { if (!isExist || isSum == 3) {
createIncomeInsurance(insuranceDetail, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(insuranceDetail, settleDomain, CommonConstants.TWO_STRING,
...@@ -6145,12 +6199,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6145,12 +6199,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} else { } else {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
BigDecimal money = BigDecimal.ZERO; BigDecimal money;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
if (Common.isNotNull(incomeDetailList)) {
for (TIncomeDetail incomeDetailSum: incomeDetailList) {
if (incomeDetailSum.getSourceId().equals(insuranceDetail.getId()) &&
CommonConstants.TWO_STRING.equals(incomeDetailSum.getFeeType()) &&
CommonConstants.TWO_STRING.equals(incomeDetailSum.getMrSettleType()) &&
CommonConstants.THREE_STRING.equals(incomeDetailSum.getFeeMode())) {
isSum = 5;
break;
} else {
isSum = 4; isSum = 4;
}
}
}
} else { } else {
isSum = 4; isSum = 4;
money = BigDecimalUtils.safeMultiply(fee, settleDomain.getRiskFundFee().divide( money = BigDecimalUtils.safeMultiply(fee, settleDomain.getRiskFundFee().divide(
...@@ -6165,6 +6231,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6165,6 +6231,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
}
public void createIncomeInsurance(TInsuranceDetail insuranceDetail, TSettleDomain settleDomain, String feeType, public void createIncomeInsurance(TInsuranceDetail insuranceDetail, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money) { String charges, String feeMode, BigDecimal money) {
......
...@@ -377,6 +377,14 @@ public class TPaymentInfo extends BaseEntity { ...@@ -377,6 +377,14 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("推送状态 0已推送 1未推送") @ExcelProperty("推送状态 0已推送 1未推送")
private String pushStatus; private String pushStatus;
/**
* 收入状态
*/
@ExcelAttribute(name = "收入状态 0已生成 1未生成" )
@Schema(description ="收入状态 0已生成 1未生成")
@ExcelProperty("收入状态 0已生成 1未生成")
private String incomeStatus;
/** /**
* 单位社保补缴利息 * 单位社保补缴利息
*/ */
......
...@@ -381,4 +381,18 @@ public class TPaymentInfoController { ...@@ -381,4 +381,18 @@ public class TPaymentInfoController {
public TPaymentVo getPaymentSocialAndFound(@RequestBody TPaymentInfo info) { public TPaymentVo getPaymentSocialAndFound(@RequestBody TPaymentInfo info) {
return tPaymentInfoService.getPaymentSocialAndFound(info); return tPaymentInfoService.getPaymentSocialAndFound(info);
} }
/**
* @Description: 手动推送社保缴费库明细的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
@Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据")
@SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo() {
tPaymentInfoService.pushPaymentSocialFundInfo();
return R.ok();
}
} }
...@@ -117,6 +117,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -117,6 +117,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void updatePaymentSocialAndFound(@Param("infoVo") UpdateSocialFoundVo infoVo); void updatePaymentSocialAndFound(@Param("infoVo") UpdateSocialFoundVo infoVo);
void updateByIncome(@Param("id")String id);
/** /**
* 更新社保推送 * 更新社保推送
* @Author huyc * @Author huyc
......
...@@ -140,4 +140,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -140,4 +140,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo getPaymentSocialAndFound(TPaymentInfo info); TPaymentVo getPaymentSocialAndFound(TPaymentInfo info);
void pushPaymentSocialFundInfo();
} }
...@@ -1589,7 +1589,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1589,7 +1589,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TIncomeDetail::getEmpIdcard, library.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard, library.getEmpIdcard())
.eq(TIncomeDetail::getDeptId, library.getSettleDomainId()) .eq(TIncomeDetail::getDeptId, library.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING) .eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING)
.eq(TIncomeDetail::getPayMonth, library.getSocialPayMonth())); .eq(TIncomeDetail::getPayMonth, library.getSocialPayMonth())
.eq(TIncomeDetail::getMrSettleType, CommonConstants.ONE_STRING));
if (Common.isNotNull(updateList)) { if (Common.isNotNull(updateList)) {
for (TIncomeDetail upd : updateList) { for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
...@@ -1627,7 +1628,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1627,7 +1628,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TIncomeDetail::getEmpIdcard,library.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard,library.getEmpIdcard())
.eq(TIncomeDetail::getDeptId,library.getSettleDomainId()) .eq(TIncomeDetail::getDeptId,library.getSettleDomainId())
.eq(TIncomeDetail::getSourceType,CommonConstants.TWO_STRING) .eq(TIncomeDetail::getSourceType,CommonConstants.TWO_STRING)
.eq(TIncomeDetail::getPayMonth,library.getProvidentPayMonth())); .eq(TIncomeDetail::getPayMonth,library.getProvidentPayMonth())
.eq(TIncomeDetail::getMrSettleType, CommonConstants.ONE_STRING));
if (Common.isNotNull(updateList)) { if (Common.isNotNull(updateList)) {
for (TIncomeDetail upd : updateList) { for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
......
...@@ -36,8 +36,10 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk; ...@@ -36,8 +36,10 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError; import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService; import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
...@@ -74,6 +76,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -74,6 +76,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired @Autowired
private EkpIncomeUtil ekpIncomeUtil; private EkpIncomeUtil ekpIncomeUtil;
@Autowired
private TPaymentInfoMapper tPaymentInfoMapper;
/** /**
* 收入明细表简单分页查询 * 收入明细表简单分页查询
* *
...@@ -296,6 +301,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -296,6 +301,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
detail.setEmpIdcard(tIncomeDetail.getEmpIdcard()); detail.setEmpIdcard(tIncomeDetail.getEmpIdcard());
detail.setDeptId(tIncomeDetail.getDeptId()); detail.setDeptId(tIncomeDetail.getDeptId());
List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail); List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail);
tIncomeDetail.setCreateTime(new Date());
tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0));
tIncomeDetailService.save(tIncomeDetail);
tPaymentInfoMapper.updateByIncome(tIncomeDetail.getSourceId());
// 不存在,直接新增 // 不存在,直接新增
if (incomeList == null || incomeList.isEmpty()) { if (incomeList == null || incomeList.isEmpty()) {
BeanUtil.copyProperties(tIncomeDetail, income); BeanUtil.copyProperties(tIncomeDetail, income);
...@@ -307,8 +316,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -307,8 +316,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
income.setId(CommonConstants.NULL);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -333,6 +340,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -333,6 +340,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} else { } else {
// 判断,比例,直接加 // 判断,比例,直接加
if (CommonConstants.ONE_STRING.equals(tIncomeDetail.getFeeMode())) { if (CommonConstants.ONE_STRING.equals(tIncomeDetail.getFeeMode())) {
...@@ -345,7 +353,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -345,7 +353,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -370,6 +377,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -370,6 +377,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} else { } else {
Map<String, Integer> numMap = new HashMap<>(); Map<String, Integer> numMap = new HashMap<>();
Map<String, Integer> incomeMap = new HashMap<>(); Map<String, Integer> incomeMap = new HashMap<>();
...@@ -421,7 +429,40 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -421,7 +429,40 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) { if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) {
if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) { || incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
this.saveIncome(tIncomeDetail); BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
} }
} else { } else {
// 红冲判断:当本类型是最大值,才可以红冲 // 红冲判断:当本类型是最大值,才可以红冲
...@@ -435,7 +476,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -435,7 +476,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -460,6 +500,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -460,6 +500,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} }
} }
} else if (CommonConstants.THREE_STRING.equals(tIncomeDetail.getSourceType())) { } else if (CommonConstants.THREE_STRING.equals(tIncomeDetail.getSourceType())) {
...@@ -477,7 +518,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -477,7 +518,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -502,6 +542,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -502,6 +542,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} }
} else { } else {
if (this.redDateJudge(tIncomeDetail, numMap)) { if (this.redDateJudge(tIncomeDetail, numMap)) {
...@@ -514,7 +555,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -514,7 +555,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -539,6 +579,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -539,6 +579,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} }
} }
} else { } else {
...@@ -559,7 +600,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -559,7 +600,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ONE_STRING); income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0)); income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack); income.setEkpId(sendBack);
tIncomeDetailService.save(tIncomeDetail);
} else { } else {
if (map.get(sendBack) > 0) { if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1; int i = map.get(sendBack) + 1;
...@@ -584,6 +624,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -584,6 +624,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
idMap.put(sendBack,income.getId()); idMap.put(sendBack,income.getId());
} }
} }
this.updateById(income);
} }
} else { } else {
// 3金额-人次 // 3金额-人次
......
...@@ -380,7 +380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -380,7 +380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialInfo(cachedDataList, errorMessageList, random, user, rowNumber); importTPaymentSocialInfo(cachedDataList, errorMessageList, user, rowNumber);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -392,7 +392,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -392,7 +392,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList, private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList,
String random, YifuUser user, Integer rowNumber) { YifuUser user, Integer rowNumber) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
HashMap<String, String> areaMap = new HashMap<>(); HashMap<String, String> areaMap = new HashMap<>();
...@@ -404,7 +404,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -404,7 +404,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (SysArea area : areaList.getSysAreaList()) { for (SysArea area : areaList.getSysAreaList()) {
areaMap.put(Integer.toString(area.getId()), area.getAreaName()); areaMap.put(Integer.toString(area.getId()), area.getAreaName());
areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + ( areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + (
null == area.getParentId() ? "null" : (0 == area.getParentId().intValue() ? "null" : Integer.toString( null == area.getParentId() ? "null" : (0 == area.getParentId() ? "null" : Integer.toString(
area.getParentId()))), Integer.toString(area.getId())); area.getParentId()))), Integer.toString(area.getId()));
} }
} }
...@@ -523,10 +523,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -523,10 +523,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
// -----------------------------生成paymentInfoMap本段结束-------------------------------- // -----------------------------生成paymentInfoMap本段结束--------------------------------
/**
* 修改批量导入社保为线程池的方式。逻辑分析,根据前端传入的list,将list分成每份partSize个。
* 有以下3种情况。1.list数量不足partSize,直接进行处理;2.list数量正好可以根据partSize等分,循环处理;3.不能等分有剩余的情况
*/
// -----------------------------线程池处理list,批量保存社保信息开始-------------------------------- // -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentInfoVo> tempList = new ArrayList<>(); List<TPaymentInfoVo> tempList = new ArrayList<>();
...@@ -544,15 +540,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -544,15 +540,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key"; String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
Integer bfInt = (Integer) redisUtil.get(sumNumKey); Integer bfInt = (Integer) redisUtil.get(sumNumKey);
if (Common.isNotNull(bfInt)) { if (Common.isNotNull(bfInt)) {
if (bfInt <= rowNumber.intValue()) { if (rowNumber >= bfInt) {
maerialRatio = numberFormat.format((float) bfInt.intValue() / (float) rowNumber.intValue() * 100); maerialRatio = numberFormat.format(((float) bfInt / (float) rowNumber) * 100);
bfInt = bfInt + 100; bfInt = bfInt + 100;
} else { } else {
maerialRatio = "100"; maerialRatio = "100";
} }
}else { }else {
if (100 <= rowNumber.intValue()) { if (rowNumber >= 100) {
maerialRatio = numberFormat.format((float) 100 / (float) rowNumber.intValue() * 100); maerialRatio = numberFormat.format(((float) 100 / (float) rowNumber) * 100);
bfInt = 100; bfInt = 100;
} else { } else {
maerialRatio = "100"; maerialRatio = "100";
...@@ -715,7 +711,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -715,7 +711,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo = null; TPaymentInfo paymentInfo = null;
TSocialFundInfo socialInfo = null; TSocialFundInfo socialInfo = null;
String temp = null; String temp;
int res = -1; int res = -1;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
...@@ -756,7 +752,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -756,7 +752,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue; continue;
} }
//无对应员工的社保数据 //无对应员工的社保数据
if (null != socialMap) {
//采用客服导入的地址 //采用客服导入的地址
areaArray = infoVo.getSocialPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING); areaArray = infoVo.getSocialPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING);
infoVo = initAddress(areaArray, areaMap2, infoVo); infoVo = initAddress(areaArray, areaMap2, infoVo);
...@@ -774,7 +769,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -774,7 +769,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "的社保起缴日期为空!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "的社保起缴日期为空!"));
continue; continue;
} }
}
if (null == socialInfo) { if (null == socialInfo) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无对应员工" + errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "无对应员工" +
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)")); infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
...@@ -945,7 +940,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -945,7 +940,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (null == paymentInfo) {
paymentInfo = new TPaymentInfo(); paymentInfo = new TPaymentInfo();
paymentInfo.setLockStatus(CommonConstants.ZERO_STRING); paymentInfo.setLockStatus(CommonConstants.ZERO_STRING);
paymentInfo.setEmpId(socialInfo.getEmpId()); paymentInfo.setEmpId(socialInfo.getEmpId());
...@@ -960,7 +954,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -960,7 +954,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam()); paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam());
paymentInfo.setEmpNo(tSocialInfo.getEmpNo()); paymentInfo.setEmpNo(tSocialInfo.getEmpNo());
} }
}
paymentInfo.setSocialProvince(socialInfo.getSocialProvince()); paymentInfo.setSocialProvince(socialInfo.getSocialProvince());
paymentInfo.setSocialCity(socialInfo.getSocialCity()); paymentInfo.setSocialCity(socialInfo.getSocialCity());
paymentInfo.setSocialTown(socialInfo.getSocialTown()); paymentInfo.setSocialTown(socialInfo.getSocialTown());
...@@ -1033,20 +1026,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1033,20 +1026,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSumAll(paymentInfo.getSocialSum()); paymentInfo.setSumAll(paymentInfo.getSocialSum());
paymentInfo.setCreateBy(user.getId()); paymentInfo.setCreateBy(user.getId());
paymentInfo.setCreateName(user.getNickname()); paymentInfo.setCreateName(user.getNickname());
if (null != paymentInfo && Common.isEmpty(paymentInfo.getSocialId())) { if (Common.isEmpty(paymentInfo.getSocialId())) {
paymentInfo.setSocialId(UUID.randomUUID().toString()); paymentInfo.setSocialId(UUID.randomUUID().toString());
} }
if (null != paymentInfo && Common.isNotNull(paymentInfo.getId())) { if (Common.isNotNull(paymentInfo.getId())) {
res = baseMapper.updateById(paymentInfo); res = baseMapper.updateById(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库更新失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库更新失败!"));
continue;
} }
} else { } else {
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库保存失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + "_缴费库保存失败!"));
continue;
} }
} }
} }
...@@ -1175,7 +1166,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1175,7 +1166,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialHeFei(cachedDataList, errorMessageList, random, user, type,rowNumber); importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type,rowNumber);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -1188,7 +1179,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1188,7 +1179,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public R<List<ErrorMessage>> batchImportPaymentFundInfo(InputStream inputStream) { public R<List<ErrorMessage>> batchImportPaymentFundInfo(InputStream inputStream) {
YifuUser user = SecurityUtils.getUser();
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class); ExcelUtil<TPaymentInfoVo> util1 = new ExcelUtil<>(TPaymentInfoVo.class);
// 写法2: // 写法2:
...@@ -1233,7 +1223,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1233,7 +1223,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
batchSavePaymentFundInfo(cachedDataList, errorMessageList, user); batchSavePaymentFundInfo(cachedDataList, errorMessageList);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -1244,7 +1234,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1244,7 +1234,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.ok(errorMessageList); return R.ok(errorMessageList);
} }
private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList, YifuUser user) { private void batchSavePaymentFundInfo(List<TPaymentInfoVo> list, List<ErrorMessage> errorMessageList) {
HashMap<String, String> areaMap = new HashMap<String, String>(); HashMap<String, String> areaMap = new HashMap<String, String>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR(); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
...@@ -1259,8 +1249,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1259,8 +1249,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
try { try {
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo = null; TPaymentInfo paymentInfo = null;
TSocialFundInfo fund = null; TSocialFundInfo fund;
String temp = null; String temp;
int res = -1; int res = -1;
//获取身份证列表 //获取身份证列表
...@@ -1292,7 +1282,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1292,7 +1282,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
, info); , info);
} }
} }
String[] areaArray = null; String[] areaArray;
for (TPaymentInfoVo infoVo : list) { for (TPaymentInfoVo infoVo : list) {
if (Common.isNotNull(infoVo.getEmpIdcard())) { if (Common.isNotNull(infoVo.getEmpIdcard())) {
...@@ -1382,7 +1372,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1382,7 +1372,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda() TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda()
.eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TProvidentFund::getCreateTime) .eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TProvidentFund::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (null == paymentInfo) {
paymentInfo = new TPaymentInfo(); paymentInfo = new TPaymentInfo();
paymentInfo.setLockStatus(CommonConstants.ZERO_STRING); paymentInfo.setLockStatus(CommonConstants.ZERO_STRING);
paymentInfo.setEmpId(fund.getEmpId()); paymentInfo.setEmpId(fund.getEmpId());
...@@ -1398,7 +1387,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1398,7 +1387,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setInauguralTeam(tProvidentFund.getInauguralTeam()); paymentInfo.setInauguralTeam(tProvidentFund.getInauguralTeam());
paymentInfo.setEmpNo(tProvidentFund.getEmpNo()); paymentInfo.setEmpNo(tProvidentFund.getEmpNo());
} }
}
paymentInfo.setProvidentPayMonth(infoVo.getProvidentPayMonth()); paymentInfo.setProvidentPayMonth(infoVo.getProvidentPayMonth());
paymentInfo.setFundProvince(fund.getFundProvince()); paymentInfo.setFundProvince(fund.getFundProvince());
paymentInfo.setFundCity(fund.getFundCity()); paymentInfo.setFundCity(fund.getFundCity());
...@@ -1434,10 +1422,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1434,10 +1422,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum()); paymentInfo.setUnitProvidentSum(null == infoVo.getUnitProvidentSum() ? BigDecimal.ZERO : infoVo.getUnitProvidentSum());
paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum()); paymentInfo.setProvidentSum(null == infoVo.getProvidentSum() ? BigDecimal.ZERO : infoVo.getProvidentSum());
paymentInfo.setSumAll(paymentInfo.getProvidentSum()); paymentInfo.setSumAll(paymentInfo.getProvidentSum());
if (null != paymentInfo && Common.isEmpty(paymentInfo.getFundId())) { if (Common.isEmpty(paymentInfo.getFundId())) {
paymentInfo.setFundId(UUID.randomUUID().toString()); paymentInfo.setFundId(UUID.randomUUID().toString());
} }
if (null != paymentInfo && Common.isNotNull(paymentInfo.getId())) { if (Common.isNotNull(paymentInfo.getId())) {
res = baseMapper.updateById(paymentInfo); res = baseMapper.updateById(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() + errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpName() +
...@@ -1452,7 +1440,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1452,7 +1440,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue; continue;
} }
} }
if (null != paymentInfo && Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) { if (Common.isNotNull(paymentInfo.getId()) && Common.isNotNull(paymentInfo.getFundId())) {
paymentInfoMap.put(paymentInfo.getProvidentPayAddr() paymentInfoMap.put(paymentInfo.getProvidentPayAddr()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+ paymentInfo.getEmpIdcard().trim() + paymentInfo.getEmpIdcard().trim()
...@@ -1474,10 +1462,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1474,10 +1462,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
private void importTPaymentSocialHeFei(List<TPaymentHeFeiVo> list, List<ErrorMessage> errorMessageList, private void importTPaymentSocialHeFei(List<TPaymentHeFeiVo> list, List<ErrorMessage> errorMessageList,
String random, YifuUser user, String type, Integer rowNumber) { YifuUser user, String type, Integer rowNumber) {
HashMap<String, String> areaMap = new HashMap<String, String>(); HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<String, String>(); HashMap<String, String> areaMap2 = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR(); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (Common.isNotNull(areaListR)) { if (Common.isNotNull(areaListR)) {
AreaVo areaList = areaListR.getData(); AreaVo areaList = areaListR.getData();
...@@ -1485,7 +1473,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1485,7 +1473,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (SysArea area : areaList.getSysAreaList()) { for (SysArea area : areaList.getSysAreaList()) {
areaMap.put(Integer.toString(area.getId()), area.getAreaName()); areaMap.put(Integer.toString(area.getId()), area.getAreaName());
areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + (null == area.getParentId() ? areaMap2.put(area.getAreaName() + CommonConstants.DOWN_LINE_STRING + (null == area.getParentId() ?
"null" : (0 == area.getParentId().intValue() ? "null" : Integer.toString( "null" : (0 == area.getParentId() ? "null" : Integer.toString(
area.getParentId()))), Integer.toString(area.getId())); area.getParentId()))), Integer.toString(area.getId()));
} }
} }
...@@ -1586,11 +1574,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1586,11 +1574,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
// -----------------------------生成paymentInfoMap本段结束-------------------------------- // -----------------------------生成paymentInfoMap本段结束--------------------------------
/**
* 修改批量导入社保为线程池的方式。逻辑分析,根据前端传入的list,将list分成每份partSize个。
* 有以下3种情况。1.list数量不足partSize,直接进行处理;2.list数量正好可以根据partSize等分,循环处理;3.不能等分有剩余的情况
*/
// -----------------------------线程池处理list,批量保存社保信息开始-------------------------------- // -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentHeFeiVo> tempList = new ArrayList<>(); List<TPaymentHeFeiVo> tempList = new ArrayList<>();
AtomicInteger atomicLine = new AtomicInteger(CommonConstants.ZERO_INT); AtomicInteger atomicLine = new AtomicInteger(CommonConstants.ZERO_INT);
...@@ -1606,15 +1589,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1606,15 +1589,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key"; String sumNumKey = user.getId() + CommonConstants.DOWN_LINE_STRING + "sum_key";
Integer bfInt = (Integer) redisUtil.get(sumNumKey); Integer bfInt = (Integer) redisUtil.get(sumNumKey);
if (Common.isNotNull(bfInt)) { if (Common.isNotNull(bfInt)) {
if (bfInt <= rowNumber.intValue()) { if (bfInt <= rowNumber) {
maerialRatio = numberFormat.format((float) bfInt.intValue() / (float) rowNumber.intValue() * 100); maerialRatio = numberFormat.format((float) bfInt / (float) rowNumber * 100);
bfInt = bfInt + 100; bfInt = bfInt + 100;
} else { } else {
maerialRatio = "100"; maerialRatio = "100";
} }
}else { }else {
if (100 <= rowNumber.intValue()) { if (100 <= rowNumber) {
maerialRatio = numberFormat.format((float) 100 / (float) rowNumber.intValue() * 100); maerialRatio = numberFormat.format((float) 100 / (float) rowNumber * 100);
bfInt = 100; bfInt = 100;
} else { } else {
maerialRatio = "100"; maerialRatio = "100";
...@@ -1627,7 +1610,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1627,7 +1610,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 1.list.size()不足partSize,直接执行 // 1.list.size()不足partSize,直接执行
if (list.size() < partSize) { if (list.size() < partSize) {
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, atomicLine, random, list, areaMap, areaMap2, -> executeImportSocialListThree(user, atomicLine, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
paymentInfoBigMap,CommonConstants.ONE_INT, type, errorMessageList), paymentInfoBigMap,CommonConstants.ONE_INT, type, errorMessageList),
yfSocialImportThreadPoolExecutor); yfSocialImportThreadPoolExecutor);
...@@ -1640,7 +1623,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1640,7 +1623,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 处理第一个0位元素 // 处理第一个0位元素
final List<TPaymentHeFeiVo> finalList = list.subList(0, 1); final List<TPaymentHeFeiVo> finalList = list.subList(0, 1);
CompletableFuture<List<ErrorMessage>> oneCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorMessage>> oneCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, atomicLine, random, finalList, areaMap, -> executeImportSocialListThree(user, atomicLine, finalList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap,CommonConstants.ONE_INT, type, paymentInfoInjuryMap, paymentInfoBigMap,CommonConstants.ONE_INT, type,
errorMessageList), yfSocialImportThreadPoolExecutor); errorMessageList), yfSocialImportThreadPoolExecutor);
...@@ -1654,7 +1637,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1654,7 +1637,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
final int idx = i - partSize + 2; final int idx = i - partSize + 2;
List<TPaymentHeFeiVo> finalTempList1 = tempList; List<TPaymentHeFeiVo> finalTempList1 = tempList;
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, atomicLine, random, finalTempList1 -> executeImportSocialListThree(user, atomicLine, finalTempList1
, areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, , areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap,
paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap,idx, type, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap,idx, type,
errorMessageList), yfSocialImportThreadPoolExecutor); errorMessageList), yfSocialImportThreadPoolExecutor);
...@@ -1681,7 +1664,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1681,7 +1664,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentHeFeiVo> finalTempList = tempList; List<TPaymentHeFeiVo> finalTempList = tempList;
int finalLastIdx = lastIdx + 1; int finalLastIdx = lastIdx + 1;
CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorMessage>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, atomicLine, random, finalTempList, areaMap, -> executeImportSocialListThree(user, atomicLine, finalTempList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap,finalLastIdx, type, errorMessageList) paymentInfoInjuryMap, paymentInfoBigMap,finalLastIdx, type, errorMessageList)
, yfSocialImportThreadPoolExecutor); , yfSocialImportThreadPoolExecutor);
...@@ -1713,7 +1696,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1713,7 +1696,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
private List<ErrorMessage> executeImportSocialListThree(YifuUser user, AtomicInteger atomicLine, private List<ErrorMessage> executeImportSocialListThree(YifuUser user, AtomicInteger atomicLine,
String random,
List<TPaymentHeFeiVo> list, List<TPaymentHeFeiVo> list,
HashMap<String, String> areaMap, HashMap<String, String> areaMap,
HashMap<String, String> areaMap2, HashMap<String, String> areaMap2,
...@@ -1729,7 +1711,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1729,7 +1711,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSocialFundInfo socialInfo = null; TSocialFundInfo socialInfo = null;
String temp; String temp;
int res = -1; int res = -1;
List<String> idcards = Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD);
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
...@@ -1756,7 +1737,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1756,7 +1737,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
infoVo.setEmpIdcard(infoVo.getEmpIdcard().replace("x", "X")); infoVo.setEmpIdcard(infoVo.getEmpIdcard().replace("x", "X"));
} }
//导入校验 //导入校验
if (socialThreeCheckBase(random, i, errorMessageList, infoVo, type)) { if (socialThreeCheckBase(errorMessageList, infoVo, type)) {
continue; continue;
} }
//无对应员工的社保数据 //无对应员工的社保数据
...@@ -2013,20 +1994,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2013,20 +1994,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setSumAll(payExists.getSocialSum()); payExists.setSumAll(payExists.getSocialSum());
payExists.setCreateBy(user.getId()); payExists.setCreateBy(user.getId());
payExists.setCreateName(user.getNickname()); payExists.setCreateName(user.getNickname());
if (null != payExists && Common.isEmpty(payExists.getSocialId())) { if (Common.isEmpty(payExists.getSocialId())) {
payExists.setSocialId(UUID.randomUUID().toString()); payExists.setSocialId(UUID.randomUUID().toString());
} }
if (null != payExists && Common.isNotNull(payExists.getId())) { if (Common.isNotNull(payExists.getId())) {
res = baseMapper.updateById(payExists); res = baseMapper.updateById(payExists);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库更新失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库更新失败!"));
continue;
} }
} else { } else {
res = insertAndSTimestamp(payExists); res = insertAndSTimestamp(payExists);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库保存失败!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), infoVo.getEmpIdcard() + "_缴费库保存失败!"));
continue;
} }
} }
} }
...@@ -2037,7 +2016,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2037,7 +2016,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/** /**
* 导入校验 * 导入校验
**/ **/
private boolean socialThreeCheckBase(String random, int i, List<ErrorMessage> errorMessageList, TPaymentHeFeiVo private boolean socialThreeCheckBase(List<ErrorMessage> errorMessageList, TPaymentHeFeiVo
infoVo, String type) { infoVo, String type) {
if (!Common.isNotNull(infoVo.getSocialPayMonth())) { if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳月份不可为空!")); errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), "社保缴纳月份不可为空!"));
...@@ -2063,12 +2042,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2063,12 +2042,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/** /**
* 转换缴纳地址为省市县ID * 转换缴纳地址为省市县ID
**/ **/
private TPaymentHeFeiVo initAddressThree(String[] private TPaymentHeFeiVo initAddressThree(String[] areaArray, HashMap<String, String> areaMap2, TPaymentHeFeiVo s) {
areaArray, HashMap<String, String> areaMap2, TPaymentHeFeiVo s) {
if (null == areaArray || null == areaMap2 || null == s) { if (null == areaArray || null == areaMap2 || null == s) {
return s; return s;
} }
String temp = null; String temp;
if (areaArray.length >= CommonConstants.TWO_INT) { if (areaArray.length >= CommonConstants.TWO_INT) {
temp = areaMap2.get(areaArray[0] + CommonConstants.DOWN_LINE_STRING + "null"); temp = areaMap2.get(areaArray[0] + CommonConstants.DOWN_LINE_STRING + "null");
if (Common.isNotNull(temp)) { if (Common.isNotNull(temp)) {
...@@ -2226,7 +2204,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2226,7 +2204,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public void createPaymentSocialInfo() { public void createPaymentSocialInfo() {
//获取所有未推送的社保预估明细数据 //获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId)); .isNotNull(TPaymentInfo::getSocialId));
...@@ -2238,7 +2216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2238,7 +2216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public void createPaymentFundInfo() { public void createPaymentFundInfo() {
//获取所有未推送的社保预估明细数据 //获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId)); .isNotNull(TPaymentInfo::getFundId));
...@@ -2248,33 +2226,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2248,33 +2226,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
@Override
public void pushPaymentSocialFundInfo() {
YifuUser user = SecurityUtils.getUser();
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user);
createPaymentFundInfoReal(user);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user);
createPaymentFundIncomeReal(user);
}
@Override @Override
public void createPaymentInfoIncome() { public void createPaymentInfoIncome() {
BigDecimal sumSocial = BigDecimal.ZERO;
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入 //判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.between(TPaymentInfo::getCreateTime,LocalDateTimeUtils.getThatDayStartTime(LocalDateTime.now().plusDays(-1)), .between(TPaymentInfo::getCreateTime,LocalDateTimeUtils.getThatDayStartTime(LocalDateTime.now().plusDays(-1)),
LocalDateTimeUtils.getDayStart(LocalDateTime.now())) LocalDateTimeUtils.getDayStart(LocalDateTime.now()))
.isNotNull(TPaymentInfo::getSocialId)); .isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
List<TPaymentInfo> updateList = new ArrayList<>();
for (TPaymentInfo paymentInfo: sumList) {
//获取员工当前缴纳月总合计
List<TPaymentInfo> payInfoList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TPaymentInfo::getSocialPayMonth, paymentInfo.getSocialPayMonth())
.eq(TPaymentInfo::getSettleDomainId, paymentInfo.getSettleDomainId()));
if (Common.isNotNull(payInfoList)) {
for (TPaymentInfo payInfo:payInfoList)
sumSocial = BigDecimalUtils.safeAdd(sumSocial,payInfo.getSocialSum());
}
if (sumSocial.compareTo(BigDecimal.ZERO) == CommonConstants.ZERO_INT) {
continue;
}
updateList.add(paymentInfo);
}
//生成收入 //生成收入
createIncomeInfo(updateList,CommonConstants.ONE_STRING); createIncomeInfo(sumList,CommonConstants.ONE_STRING);
} }
} }
...@@ -2290,6 +2262,53 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2290,6 +2262,53 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentSocialInfoReal(YifuUser user) {
//获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo);
}
}
public void createPaymentFundInfoReal(YifuUser user) {
//获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo);
}
}
public void createPaymentInfoIncomeReal(YifuUser user) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList,CommonConstants.ONE_STRING);
}
}
public void createPaymentFundIncomeReal(YifuUser user) {
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList,CommonConstants.TWO_STRING);
}
}
@Override @Override
public TPaymentVo getPaymentSocialAndFound(TPaymentInfo info) { public TPaymentVo getPaymentSocialAndFound(TPaymentInfo info) {
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
...@@ -2309,8 +2328,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2309,8 +2328,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null; List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo = null; R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) { if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
...@@ -2548,14 +2567,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2548,14 +2567,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单个异常超过十次,保存异常内容 //单个异常超过十次,保存异常内容
if (i >= 10) { if (i >= 10) {
baseMapper.updatePushStatus(pushList); baseMapper.updatePushStatus(pushList);
for (String key: map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(library.getId()); error.setLinkId(library.getId());
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
break; break;
...@@ -2589,8 +2608,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2589,8 +2608,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (TPaymentInfo library:unPushInfo) { for (TPaymentInfo library:unPushInfo) {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null; List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo = null; R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) { if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
...@@ -2720,14 +2739,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2720,14 +2739,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单个异常超过十次,保存异常内容 //单个异常超过十次,保存异常内容
if (i >= 10) { if (i >= 10) {
baseMapper.updatePushStatus(pushList); baseMapper.updatePushStatus(pushList);
for (String key: map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(library.getId()); error.setLinkId(library.getId());
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
break; break;
...@@ -2757,23 +2776,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2757,23 +2776,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public void createIncomeInfo(List<TPaymentInfo> updateList,String socialFundFlag) { public void createIncomeInfo(List<TPaymentInfo> updateList,String socialFundFlag) {
List<TIncomeDetail> detailList = new ArrayList<>(); List<TIncomeDetail> detailList = new ArrayList<>();
for (TPaymentInfo paymentInfo : updateList) { for (TPaymentInfo paymentInfo : updateList) {
//获取项目信息 boolean exitFlag = false;
TSettleDomain settleDomain = new TSettleDomain(); List<TIncomeDetail> exitIncome;
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
}
Boolean exitFlag = false;
List<TIncomeDetail> exitIncome = new ArrayList<>();
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
...@@ -2791,12 +2795,33 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2791,12 +2795,33 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimal sumMoney = BigDecimal.ZERO; BigDecimal sumMoney = BigDecimal.ZERO;
for (TIncomeDetail income : exitIncome) { for (TIncomeDetail income : exitIncome) {
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney); sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney);
if (paymentInfo.getId().equals(income.getSourceId())) {
exitFlag = true;
}
} }
if (sumMoney.compareTo(BigDecimal.ZERO) == CommonConstants.ONE_INT) { if (exitFlag) {
continue;
}
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
exitFlag = true; exitFlag = true;
} }
} }
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
}
int isSum = 0; int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
...@@ -2919,7 +2944,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2919,7 +2944,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public String dateStringInsert(String month) { public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month); StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-"); sb.insert(4, "-");
String replaceMonth = sb.toString(); return sb.toString();
return replaceMonth;
} }
} }
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
<result property="createMonth" column="CREATE_MONTH"/> <result property="createMonth" column="CREATE_MONTH"/>
<result property="payMonth" column="PAY_MONTH"/> <result property="payMonth" column="PAY_MONTH"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="dataCreateMonth" column="DATA_CREATE_MONTH"/>
<result property="sendStatus" column="SEND_STATUS"/> <result property="sendStatus" column="SEND_STATUS"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
......
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="incomeStatus" column="INCOME_STATUS"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -1098,6 +1099,14 @@ ...@@ -1098,6 +1099,14 @@
and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard} and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard}
</update> </update>
<!-- 更改薪资公积金结算状态 -->
<update id="updateByIncome">
update t_payment_info
set INCOME_STATUS = '0'
where
ID = #{id}
</update>
<!-- 更改社保推送结算状态 --> <!-- 更改社保推送结算状态 -->
<update id="updatePushStatus"> <update id="updatePushStatus">
update t_payment_info update t_payment_info
......
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