Commit 2f8e4c13 authored by huyuchen's avatar huyuchen

结算状态同步

parent 404aa084
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId> <artifactId>yifu-salary-api</artifactId>
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util; package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
...@@ -17,5 +20,14 @@ public class SalaryDaprUtil { ...@@ -17,5 +20,14 @@ public class SalaryDaprUtil {
@Autowired @Autowired
private DaprSalaryProperties daprProperties; private DaprSalaryProperties daprProperties;
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateSalarySettleStatus(EkpSocialViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
}
} }
...@@ -5,6 +5,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; ...@@ -5,6 +5,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
...@@ -133,4 +135,26 @@ public class SocialDaprUtils { ...@@ -133,4 +135,26 @@ public class SocialDaprUtils {
public void deleteById(TIncomeDetail infoVo) { public void deleteById(TIncomeDetail infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/deleteById", JSON.toJSONString(infoVo), TIncomeDetail.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/deleteById", JSON.toJSONString(infoVo), TIncomeDetail.class, SecurityConstants.FROM_IN);
} }
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateSocialSettleStatus(EkpSocialViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), EkpSocialViewVo.class, SecurityConstants.FROM_IN);
}
/**
* @Author huyc
* @Description 更新结算信息
* @Date 17:38 2022/12/26
* @Param
* @return
**/
public void updateIncomeSettleStatus(EkpInsuranceViewVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), EkpInsuranceViewVo.class, SecurityConstants.FROM_IN);
}
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpInsuranceViewVo implements Serializable {
/**
* 明细id
**/
private String id;
/**
* 收入信息结算状态 0 已结算 1 结算中 2 未结算 3 已冻结
*/
private String incomeSettleFlag;
/**
* 收入信息结算状态 0 已收 1 未收 2 垫付
*/
private String incomeCollectFlag;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
private String paySettleFlag;
/**
* 支出信息付款状态 0 已付 1 未付
*/
private String payCollectFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpSocialViewVo implements Serializable {
/**
* 明细id
**/
private String id;
/**
* 收入信息结算状态 0 已结算 1 结算中 2 未结算 3 已冻结
*/
private String incomeSettleFlag;
/**
* 收入信息结算状态 0 已收 1 未收 2 垫付
*/
private String incomeCollectFlag;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
private String paySettleFlag;
/**
* 支出信息付款状态 0 已付 1 未付
*/
private String payCollectFlag;
/**
* 结算单标识 预估 实缴
*/
private String settleFlag;
/**
* 0 收入结算单号 1 支出结算单号
*/
private String payFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2022/12/27
* @Description 结算单号对应参数
* @Version 1.0
*/
@Data
public class EkpStatusParamVo implements Serializable {
/**
* 结算单号
**/
private String settleNo;
/**
* 0 收入结算单号 1 支出结算单号
*/
private String payFlag;
/**
* 结算单类型 0 社保/管理费 1公积金/风险金
*/
private String typeFlag;
}
...@@ -640,4 +640,56 @@ public class TInsuranceDetailController { ...@@ -640,4 +640,56 @@ public class TInsuranceDetailController {
tInsuranceDetailService.ekpUpdateInsuranceDept(changeDeptVo); tInsuranceDetailService.ekpUpdateInsuranceDept(changeDeptVo);
} }
/**
* 更新收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新商险收款状态--EKP调用接口", description = "更新商险收款状态--EKP调用接口")
@SysLog("更新商险收款状态--EKP调用接口")
@PostMapping("/updateInsuranceSettleStatus")
public R updateInsuranceSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateInsuranceSettleStatus(vo);
}
/**
* 更新社保收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新社保收款状态--EKP调用接口", description = "更新社保收款状态--EKP调用接口")
@SysLog("更新社保收款状态--EKP调用接口")
@PostMapping("/updateSocialSettleStatus")
public R updateSocialSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateSocialSettleStatus(vo);
}
/**
* 更新收入收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新收入收款状态--EKP调用接口", description = "更新收入收款状态--EKP调用接口")
@SysLog("更新收入收款状态--EKP调用接口")
@PostMapping("/updateIncomeSettleStatus")
public R updateIncomeSettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateIncomeSettleStatus(vo);
}
/**
* 更新薪资收款状态--EKP调用接口
* @author hyc
* @param vo
* @return R
*/
@Operation(summary = "更新薪资收款状态--EKP调用接口", description = "更新薪资收款状态--EKP调用接口")
@SysLog("更新薪资收款状态--EKP调用接口")
@PostMapping("/updateSalarySettleStatus")
public R updateSalarySettleStatus(@RequestBody EkpStatusParamVo vo) {
return tInsuranceDetailService.updateSalarySettleStatus(vo);
}
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp; package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* @author zhaji * @author zhaji
...@@ -18,4 +21,18 @@ public interface EkpSettleMapper { ...@@ -18,4 +21,18 @@ public interface EkpSettleMapper {
* @return {@link SettleVo} * @return {@link SettleVo}
*/ */
SettleVo getSettle(String id); SettleVo getSettle(String id);
EkpInsuranceViewVo selectSettleStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpSocialViewVo selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpSocialViewVo selectFundViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
EkpInsuranceViewVo selectFIncomelViewBySettleNo(@Param("settleNo") String settleNo);
EkpInsuranceViewVo selectIncomeViewBySettleNo(@Param("settleNo") String settleNo);
EkpSocialViewVo selectSalarylViewBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
} }
...@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.ekp; ...@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.ekp;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
/** /**
...@@ -20,4 +22,37 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> { ...@@ -20,4 +22,37 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
* @return {@link R} * @return {@link R}
*/ */
SettleVo getSettle(String id); SettleVo getSettle(String id);
/**
* 根据结算单编号查询商险视图信息
*
*/
EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询社保视图信息
*
*/
EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询公积金视图信息
*
*/
EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag);
/**
* 根据结算单编号查询管理费视图信息
*
*/
EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo);
/**
* 根据结算单编号查询风险金视图信息
*
*/
EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo);
/**
* 根据结算单编号查询薪资视图信息
*
*/
EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag);
} }
...@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp.EkpSettleMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp.EkpSettleMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -28,6 +30,36 @@ public class EkpSettleServiceImpl implements EkpSettleService { ...@@ -28,6 +30,36 @@ public class EkpSettleServiceImpl implements EkpSettleService {
return ekpSettleMapper.getSettle(id); return ekpSettleMapper.getSettle(id);
} }
@Override
public EkpInsuranceViewVo selectViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag);
}
@Override
public EkpSocialViewVo selectSocialViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSocialViewStatusBySettleNo(settleNo,payFlag);
}
@Override
public EkpSocialViewVo selectFundViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectFundViewBySettleNo(settleNo,payFlag);
}
@Override
public EkpInsuranceViewVo selectFIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectFIncomelViewBySettleNo(settleNo);
}
@Override
public EkpInsuranceViewVo selectIncomelViewBySettleNo(String settleNo) {
return ekpSettleMapper.selectIncomeViewBySettleNo(settleNo);
}
@Override
public EkpSocialViewVo selectSalarylViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSalarylViewBySettleNo(settleNo,payFlag);
}
@Override @Override
public boolean saveBatch(Collection<TInsuranceTypeRate> entityList, int batchSize) { public boolean saveBatch(Collection<TInsuranceTypeRate> entityList, int batchSize) {
return false; return false;
......
...@@ -408,4 +408,40 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -408,4 +408,40 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return: void * @return: void
**/ **/
void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo); void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo);
/**
* @param vo
* @Description: 更新商险结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateInsuranceSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新社保结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateSocialSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新收入结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateIncomeSettleStatus(EkpStatusParamVo vo);
/**
* @param vo
* @Description: 更新薪资结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
R updateSalarySettleStatus(EkpStatusParamVo vo);
} }
...@@ -107,6 +107,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -107,6 +107,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource @Resource
private SocialDaprUtils socialDaprUtils; private SocialDaprUtils socialDaprUtils;
@Resource
private SalaryDaprUtil salaryDaprUtil;
@Resource @Resource
private MenuUtil menuUtil; private MenuUtil menuUtil;
@Resource @Resource
...@@ -6493,6 +6496,108 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6493,6 +6496,108 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
@Override
public R updateInsuranceSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpInsuranceViewVo viewVo;
TInsuranceDetail detail;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
viewVo = ekpSettleService.selectViewBySettleNo(vo.getSettleNo(),payFlag);
if (Common.isNotNull(viewVo)) {
//获取所有的明细id
detail = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(detail)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(vo.getPayFlag())) {
detail.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
}else {
detail.setPaySettleFlag(viewVo.getPaySettleFlag());
detail.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(detail);
}
}
}catch (Exception e) {
log.error("商险结算状态更新异常", e);
return R.failed("商险结算状态更新异常");
}
return R.ok(); }
@Override
public R updateSocialSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpSocialViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
viewVo = ekpSettleService.selectSocialViewBySettleNo(vo.getSettleNo(),payFlag);
} else {
viewVo = ekpSettleService.selectFundViewBySettleNo(vo.getSettleNo(),payFlag);
}
if (Common.isNotNull(viewVo)) {
viewVo.setPayFlag(vo.getPayFlag());
socialDaprUtils.updateSocialSettleStatus(viewVo);
}
}catch (Exception e) {
log.error("社保结算状态更新异常", e);
return R.failed("社保结算状态更新异常");
}
return R.ok(); }
@Override
public R updateIncomeSettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpInsuranceViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态;判断是管理费还是风险金
if (CommonConstants.ZERO_STRING.equals(vo.getTypeFlag())) {
viewVo = ekpSettleService.selectIncomelViewBySettleNo(vo.getSettleNo());
}else {
viewVo = ekpSettleService.selectFIncomelViewBySettleNo(vo.getSettleNo());
}
if (Common.isNotNull(viewVo)) {
socialDaprUtils.updateIncomeSettleStatus(viewVo);
}
}catch (Exception e) {
log.error("收入结算状态更新异常", e);
return R.failed("收入结算状态更新异常");
}
return R.ok(); }
@Override
public R updateSalarySettleStatus(EkpStatusParamVo vo) {
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EkpSocialViewVo viewVo;
try {
//根据结算单号获取明细id和结算状态
String payFlag = CommonConstants.ZERO_STRING.equals(vo.getPayFlag()) ? "0" : "1";
viewVo = ekpSettleService.selectSalarylViewBySettleNo(vo.getSettleNo(),payFlag);
if (Common.isNotNull(viewVo)) {
viewVo.setPayFlag(vo.getPayFlag());
salaryDaprUtil.updateSalarySettleStatus(viewVo);
}
}catch (Exception e) {
log.error("薪资结算状态更新异常", e);
return R.failed("薪资结算状态更新异常");
}
return R.ok(); }
private Map<String, TSettleDomainSelectVo> getSelectVoMap() { private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos(); R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null; Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
...@@ -11,10 +11,31 @@ ...@@ -11,10 +11,31 @@
<result property="actualStatus" column="fd_3b05bd5ed0b976" jdbcType="VARCHAR"/> <result property="actualStatus" column="fd_3b05bd5ed0b976" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<resultMap id="BaseResultStatusMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo">
<id property="id" column="detailsId" jdbcType="VARCHAR"/>
<result property="incomeSettleFlag" column="earningStatus" jdbcType="VARCHAR"/>
<result property="incomeCollectFlag" column="receiptStatus" jdbcType="VARCHAR"/>
<result property="paySettleFlag" column="zhichuEarningStatus" jdbcType="VARCHAR"/>
<result property="payCollectFlag" column="payStatus" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="BaseResultSocialStatusMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo">
<id property="id" column="detailsId" jdbcType="VARCHAR"/>
<result property="incomeSettleFlag" column="earningStatus" jdbcType="VARCHAR"/>
<result property="incomeCollectFlag" column="receiptStatus" jdbcType="VARCHAR"/>
<result property="paySettleFlag" column="zhichuEarningStatus" jdbcType="VARCHAR"/>
<result property="payCollectFlag" column="payStatus" jdbcType="VARCHAR"/>
<result property="settleFlag" column="orderType" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
fd_id,fd_3b05ba46bb042e,fd_3b05ba4808a3ca,fd_3b05bd5ed0b976 fd_id,fd_3b05ba46bb042e,fd_3b05ba4808a3ca,fd_3b05bd5ed0b976
</sql> </sql>
<sql id="Base_Column_List_Status">
detailsId,earningStatus,receiptStatus,zhichuEarningStatus,payStatus
</sql>
<select id="getSettle" resultMap="BaseResultMap"> <select id="getSettle" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"></include> <include refid="Base_Column_List"></include>
...@@ -23,6 +44,106 @@ ...@@ -23,6 +44,106 @@
where where
fd_3b05ba46bb042e = #{id} fd_3b05ba46bb042e = #{id}
</select> </select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap">
select
<include refid="Base_Column_List_Status"></include>
from
ekp.view_insurance_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取社保视图信息 -->
<select id="selectSocialViewStatusBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus,
orderType
from
ekp.view_social_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取公积金视图信息 -->
<select id="selectFundViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
from
ekp.view_funds_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectFIncomelViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
from
ekp.view_riskfund_info
where
earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectIncomeViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
from
ekp.view_management_info
where
earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSalarylViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
from
ekp.view_salary_info
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
</if>
</select>
</mapper> </mapper>
......
...@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; ...@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
...@@ -290,4 +291,17 @@ public class TSalaryAccountController { ...@@ -290,4 +291,17 @@ public class TSalaryAccountController {
public R<List<THaveSalaryNosocial>> getLastMonthTHaveSalaryNosocial(@RequestParam(name = "month") String month){ public R<List<THaveSalaryNosocial>> getLastMonthTHaveSalaryNosocial(@RequestParam(name = "month") String month){
return new R<>(tSalaryAccountService.getLastMonthTHaveSalaryNosocial(month)); return new R<>(tSalaryAccountService.getLastMonthTHaveSalaryNosocial(month));
} }
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateSalarySettleStatus")
public void updateSalarySettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tSalaryAccountService.updateSalarySettleStatus(viewVo);
}
} }
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
...@@ -123,4 +124,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -123,4 +124,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: void * @return: void
**/ **/
void backSalaryBySalaryId(String salaryId); void backSalaryBySalaryId(String salaryId);
/**
* @param viewVo
* @Description: 更新薪资结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return: R
**/
void updateSalarySettleStatus(EkpSocialViewVo viewVo);
} }
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -28,6 +28,7 @@ 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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
...@@ -35,7 +36,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; ...@@ -35,7 +36,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
...@@ -234,4 +234,20 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -234,4 +234,20 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
baseMapper.backSalaryBySalaryId(salaryId); baseMapper.backSalaryBySalaryId(salaryId);
} }
@Override
public void updateSalarySettleStatus(EkpSocialViewVo viewVo) {
//根据明细id更新结算状态
TSalaryAccount account = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(account)) {
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
account.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
account.setPaySettleFlag(viewVo.getPaySettleFlag());
account.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(account);
}
}
} }
...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; ...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
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.service.TIncomeService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
...@@ -220,4 +221,17 @@ public class TIncomeController { ...@@ -220,4 +221,17 @@ public class TIncomeController {
} }
return R.ok(); return R.ok();
} }
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateIncomeSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tIncomeService.updateIncomeSettleStatus(viewVo);
}
} }
...@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -23,6 +23,7 @@ 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.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
...@@ -445,4 +446,17 @@ public class TPaymentInfoController { ...@@ -445,4 +446,17 @@ public class TPaymentInfoController {
public R<Boolean> batchUpdatePaymentInfo(@RequestBody TPaymentInfoSearchVo searchVo) { public R<Boolean> batchUpdatePaymentInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
return tPaymentInfoService.batchUpdatePaymentInfo(searchVo); return tPaymentInfoService.batchUpdatePaymentInfo(searchVo);
} }
/**
* @param viewVo
* @Description: 更新结算信息
* @Author: huyc
* @Date: 2022/8/25
* @return:
**/
@Inner
@PostMapping("/inner/updateSocialSettleStatus")
public void updateSocialSettleStatus(@RequestBody EkpSocialViewVo viewVo) {
tPaymentInfoService.updateSocialSettleStatus(viewVo);
}
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; 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.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
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.vo.TIncomeSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
...@@ -90,4 +91,13 @@ public interface TIncomeService extends IService<TIncome> { ...@@ -90,4 +91,13 @@ public interface TIncomeService extends IService<TIncome> {
**/ **/
void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept); void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept);
/**
* @param viewVo
* @Description: 更新收入结算状态
* @Author: huyc
* @Date: 2022/12/26 17:56
* @return:
**/
void updateIncomeSettleStatus(EkpSocialViewVo viewVo);
} }
...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; 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.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
...@@ -168,4 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -168,4 +169,6 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/ **/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo); R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
void updateSocialSettleStatus(EkpSocialViewVo viewVo);
} }
...@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*; ...@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil; import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
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;
...@@ -800,4 +801,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -800,4 +801,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
baseMapper.changeIncomeDetailDept(idSet, dept); baseMapper.changeIncomeDetailDept(idSet, dept);
} }
@Override
public void updateIncomeSettleStatus(EkpSocialViewVo viewVo) {
//根据明细id更新结算状态
TIncome income = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(income)) {
income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
baseMapper.updateById(income);
}
}
} }
...@@ -45,6 +45,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; ...@@ -45,6 +45,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
...@@ -152,7 +153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -152,7 +153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取要导出的列表 //获取要导出的列表
List<TPaymentInfoBatchVo> list = new ArrayList<>(); List<TPaymentInfoBatchVo> list = new ArrayList<>();
Integer count = baseMapper.selectCountTPaymentInfo(searchVo); Integer count = baseMapper.selectCountTPaymentInfo(searchVo);
try (ServletOutputStream out = response.getOutputStream()){ try (ServletOutputStream out = response.getOutputStream()) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
...@@ -207,7 +208,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -207,7 +208,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取要导出的列表 //获取要导出的列表
List<TPaymentInfoExportVo> list = new ArrayList<>(); List<TPaymentInfoExportVo> list = new ArrayList<>();
Integer count = baseMapper.selectCountSumPaymentInfo(searchVo); Integer count = baseMapper.selectCountSumPaymentInfo(searchVo);
try (ServletOutputStream out = response.getOutputStream()){ try (ServletOutputStream out = response.getOutputStream()) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
...@@ -305,6 +306,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -305,6 +306,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
return R.ok(); return R.ok();
} }
/** /**
* 通过ID获取缴费库 及社保、公积金明细 * 通过ID获取缴费库 及社保、公积金明细
* *
...@@ -462,9 +464,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -462,9 +464,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialInfo(cachedDataList, sumNumKey,importSuccessKey,errorMessageList, user, importTPaymentSocialInfo(cachedDataList, sumNumKey, importSuccessKey, errorMessageList, user,
rowNumber,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap,birMoneyMap,injuryMoneyMap, rowNumber, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, injuryMoneyMap,
medicalMoneyMap,accrualMoneyMap); medicalMoneyMap, accrualMoneyMap);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -508,7 +510,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -508,7 +510,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.ok(); return R.ok();
} }
private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey,String importSuccessKey, private void importTPaymentSocialInfo(List<TPaymentInfoVo> list, String sumNumKey, String importSuccessKey,
List<ErrorDetailVO> errorMessageList, List<ErrorDetailVO> errorMessageList,
YifuUser user, Integer rowNumber, YifuUser user, Integer rowNumber,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
...@@ -547,7 +549,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -547,7 +549,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity(); int residualCapacity = yfSocialImportThreadPoolExecutor.getResidualCapacity();
if (taskSize > residualCapacity) { if (taskSize > residualCapacity) {
errorMessageList.add(new ErrorDetailVO(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE))); errorMessageList.add(new ErrorDetailVO(-1, MsgUtils.getMessage(ErrorCodes.SOCIALINFO_LIST_NUM_LARGE)));
}else { } else {
// -----------------------------生成paymentInfoMap本段开始-------------------------------- // -----------------------------生成paymentInfoMap本段开始--------------------------------
//已存在的档案数据 //已存在的档案数据
List<String> monthList = Common.listObjectToStrList(list, ExcelAttributeConstants.SOCIAL_PAY_MONTH).stream().distinct().collect(Collectors.toList()); List<String> monthList = Common.listObjectToStrList(list, ExcelAttributeConstants.SOCIAL_PAY_MONTH).stream().distinct().collect(Collectors.toList());
...@@ -737,37 +739,37 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -737,37 +739,37 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
// -----------------------------生成paymentInfoMap本段结束-------------------------------- // -----------------------------生成paymentInfoMap本段结束--------------------------------
// -----------------------------线程池处理list,批量保存社保信息开始-------------------------------- // -----------------------------线程池处理list,批量保存社保信息开始--------------------------------
List<TPaymentInfoVo> tempList = new ArrayList<>(); List<TPaymentInfoVo> tempList = new ArrayList<>();
List<CompletableFuture<List<ErrorDetailVO>>> completableFutureList = new ArrayList<>(); List<CompletableFuture<List<ErrorDetailVO>>> completableFutureList = new ArrayList<>();
// 创建一个数值格式化对象 // 创建一个数值格式化对象
NumberFormat numberFormat = NumberFormat.getInstance(); NumberFormat numberFormat = NumberFormat.getInstance();
// 设置精确到小数点后2位 // 设置精确到小数点后2位
numberFormat.setMaximumFractionDigits(2); numberFormat.setMaximumFractionDigits(2);
String maerialRatio = ""; String maerialRatio = "";
Integer bfInt = (Integer) redisUtil.get(sumNumKey); Integer bfInt = (Integer) redisUtil.get(sumNumKey);
if (Common.isNotNull(bfInt)) { if (Common.isNotNull(bfInt)) {
if (rowNumber > bfInt + 1) { if (rowNumber > bfInt + 1) {
maerialRatio = numberFormat.format(((float) bfInt / (float) rowNumber) * 100); maerialRatio = numberFormat.format(((float) bfInt / (float) rowNumber) * 100);
bfInt = bfInt + 100; bfInt = bfInt + 100;
redisUtil.set(sumNumKey, bfInt, 360L); redisUtil.set(sumNumKey, bfInt, 360L);
} else { } else {
maerialRatio = "100"; maerialRatio = "100";
} }
} else {
if (rowNumber >= 100) {
maerialRatio = numberFormat.format(((float) 100 / (float) rowNumber) * 100);
bfInt = 100;
redisUtil.set(sumNumKey, bfInt, 360L);
} else { } else {
maerialRatio = "100"; if (rowNumber >= 100) {
maerialRatio = numberFormat.format(((float) 100 / (float) rowNumber) * 100);
bfInt = 100;
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
}
} }
} redisUtil.set(importSuccessKey, maerialRatio, 360L);
redisUtil.set(importSuccessKey, maerialRatio, 360L);
try { try {
// 1.list.size()不足partSize,直接执行 // 1.list.size()不足partSize,直接执行
...@@ -776,7 +778,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -776,7 +778,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, list, areaMap, areaMap2, executeImportSocialList(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor); ), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
...@@ -791,7 +793,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -791,7 +793,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalList, areaMap, areaMap2, executeImportSocialList(user, finalList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor); ), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
...@@ -807,7 +809,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -807,7 +809,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalTempList, areaMap, areaMap2, executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor); ), yfSocialImportThreadPoolExecutor);
completableFutureList.add(oneCompletableFuture); completableFutureList.add(oneCompletableFuture);
...@@ -835,7 +837,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -835,7 +837,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
executeImportSocialList(user, finalTempList, areaMap, areaMap2, executeImportSocialList(user, finalTempList, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap, paymentInfoPensionMap, paymentInfoBigMap, paymentInfoBirMap,
paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
errorMessageList,pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, birMoneyMap,
injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap injuryMoneyMap, medicalMoneyMap, accrualMoneyMap, paymentInfoaccrualMap
), yfSocialImportThreadPoolExecutor); ), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
...@@ -852,7 +854,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -852,7 +854,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} while (computeFlag); } while (computeFlag);
} catch (Exception e) { } catch (Exception e) {
log.error("社保缴费库数据批量导入异常:" + e); log.error("社保缴费库数据批量导入异常:" + e);
redisUtil.remove(key); redisUtil.remove(key);
} }
} }
...@@ -902,24 +904,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -902,24 +904,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @return: * @return:
*/ */
private List<ErrorDetailVO> executeImportSocialList(YifuUser user, private List<ErrorDetailVO> executeImportSocialList(YifuUser user,
List<TPaymentInfoVo> list, List<TPaymentInfoVo> list,
HashMap<String, String> areaMap, HashMap<String, String> areaMap,
HashMap<String, String> areaMap2, HashMap<String, String> areaMap2,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBirMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoBirMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
List<ErrorDetailVO> errorMessageList, List<ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap, ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> birMoneyMap, ConcurrentHashMap<String, BigDecimal> birMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap, ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap, ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
ConcurrentHashMap<String, BigDecimal> accrualMoneyMap, ConcurrentHashMap<String, BigDecimal> accrualMoneyMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoaccrualMap) { ConcurrentHashMap<String, TPaymentInfo> paymentInfoaccrualMap) {
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo; TPaymentInfo paymentInfo;
TSocialFundInfo socialInfo; TSocialFundInfo socialInfo;
...@@ -953,15 +955,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -953,15 +955,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
//导入校验 //导入校验
if (!Common.isNotNull(infoVo.getSocialPayMonth())) { if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getSocialCreateMonth())) { if (!Common.isNotNull(infoVo.getSocialCreateMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保生成月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保生成月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getSocialPayAddr())) { if (!Common.isNotNull(infoVo.getSocialPayAddr())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳地不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "社保缴纳地不可为空!"));
continue; continue;
} }
//无对应员工的社保数据 //无对应员工的社保数据
...@@ -975,11 +977,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -975,11 +977,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
? "null" : infoVo.getSocialTown())); ? "null" : infoVo.getSocialTown()));
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) { if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
if (socialInfo != null && socialInfo.getSocialStartDate() == null) { if (socialInfo != null && socialInfo.getSocialStartDate() == null) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpIdcard() , SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpIdcard(), SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!"));
continue; continue;
} }
...@@ -990,12 +992,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -990,12 +992,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince()) .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity())); .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity()));
if (!socialist.isEmpty()) { if (!socialist.isEmpty()) {
for (TSocialInfo socialInfo1:socialist) { for (TSocialInfo socialInfo1 : socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().equals(socialInfo1.getSocialTown()))) && infoVo.getSocialTown().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 && DateUtil.dateToString(socialInfo1.getSocialStartDate(), "yyyyMM").compareTo(infoVo.getSocialPayMonth()) <= 0 &&
(Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) && (Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) &&
DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) { DateUtil.dateToString(socialInfo1.getSocialReduceDate(), "yyyyMM").compareTo(infoVo.getSocialPayMonth()) >= 0))) {
isTrueAdder = true; isTrueAdder = true;
tSocialInfo = socialInfo1; tSocialInfo = socialInfo1;
break; break;
...@@ -1014,7 +1016,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1014,7 +1016,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalPensionMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalPensionMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的养老缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的养老缴费数据"));
continue; continue;
} else { } else {
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()), pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getUnitPensionMoney()),
...@@ -1025,7 +1027,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1025,7 +1027,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (accrualMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (accrualMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getPersonalAccrual()), BigDecimalUtils.isNullToZero(
infoVo.getCompanyAccrual())), accrualMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getCompanyAccrual())), accrualMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的补缴缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的补缴缴费数据"));
continue; continue;
} else { } else {
accrualMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( accrualMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1037,7 +1039,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1037,7 +1039,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的医保缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的医保缴费数据"));
continue; continue;
} else { } else {
medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1049,7 +1051,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1049,7 +1051,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalUnemploymentMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalUnemploymentMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的失业缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的失业缴费数据"));
continue; continue;
} else { } else {
unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1060,7 +1062,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1060,7 +1062,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.GS)); exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.GS));
if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的工伤缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的工伤缴费数据"));
continue; continue;
} else { } else {
injuryMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney())); injuryMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()));
...@@ -1069,7 +1071,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1069,7 +1071,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.BIR)); exitMoney = infoVo.getEmpIdcard().concat(infoVo.getSocialPayMonth().concat(infoVo.getSocialCreateMonth()).concat(SocialConstants.BIR));
if (birMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), if (birMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
birMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { birMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的生育缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的生育缴费数据"));
continue; continue;
} else { } else {
birMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney())); birMoneyMap.put(exitMoney, BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()));
...@@ -1080,7 +1082,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1080,7 +1082,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())),
bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的医疗救助金缴费数据")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的医疗救助金缴费数据"));
continue; continue;
} else { } else {
bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -1107,7 +1109,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1107,7 +1109,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalPensionMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalPensionMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1132,7 +1134,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1132,7 +1134,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getCompanyAccrual())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalAccrual()), BigDecimalUtils.isNullToZero(paymentInfo.getPersonalAccrual()),
BigDecimalUtils.isNullToZero(paymentInfo.getCompanyAccrual()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getCompanyAccrual()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的补缴缴费数据,请勿重复导入!")); + "的补缴缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1157,7 +1159,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1157,7 +1159,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalUnemploymentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalUnemploymentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1183,7 +1185,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1183,7 +1185,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1208,7 +1210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1208,7 +1210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalBigmailmentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(paymentInfo.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1229,7 +1231,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1229,7 +1231,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && ((null != paymentInfo.getGsSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getGsSameFlg())) if (null != paymentInfo && ((null != paymentInfo.getGsSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getGsSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()), || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitInjuryMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1250,7 +1252,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1250,7 +1252,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && ((null != paymentInfo.getBrSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBrSameFlg())) if (null != paymentInfo && ((null != paymentInfo.getBrSameFlg() && CommonConstants.ONE_STRING.equals(paymentInfo.getBrSameFlg()))
|| (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()), || (BigDecimalUtils.safeMultiply(BigDecimalUtils.isNullToZero(infoVo.getUnitBirthMoney()),
BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(paymentInfo.getUnitBirthMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位生育缴费数据,请勿重复导入!")); + "的单位生育缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -1276,7 +1278,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1276,7 +1278,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSocialCity(socialInfo.getSocialCity()); paymentInfo.setSocialCity(socialInfo.getSocialCity());
paymentInfo.setSocialTown(socialInfo.getSocialTown()); paymentInfo.setSocialTown(socialInfo.getSocialTown());
paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName()); paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName());
} else if(Common.isNotNull(tSocialInfo)){ } else if (Common.isNotNull(tSocialInfo)) {
paymentInfo.setEmpId(tSocialInfo.getEmpId()); paymentInfo.setEmpId(tSocialInfo.getEmpId());
paymentInfo.setEmpIdcard(tSocialInfo.getEmpIdcard()); paymentInfo.setEmpIdcard(tSocialInfo.getEmpIdcard());
paymentInfo.setEmpName(tSocialInfo.getEmpName()); paymentInfo.setEmpName(tSocialInfo.getEmpName());
...@@ -1286,11 +1288,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1286,11 +1288,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO(); settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) { for (TSettleDomainSelectVo vo : settleDomainR) {
paymentInfo.setSettleDomainName(vo.getDepartName()); paymentInfo.setSettleDomainName(vo.getDepartName());
paymentInfo.setSettleDomainCode(vo.getDepartNo()); paymentInfo.setSettleDomainCode(vo.getDepartNo());
paymentInfo.setUnitId(vo.getCustomerId()); paymentInfo.setUnitId(vo.getCustomerId());
paymentInfo.setUnitName(vo.getCustomerName()); } paymentInfo.setUnitName(vo.getCustomerName());
}
} }
} }
paymentInfo.setSocialProvince(tSocialInfo.getSocialProvince()); paymentInfo.setSocialProvince(tSocialInfo.getSocialProvince());
...@@ -1371,9 +1374,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1371,9 +1374,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSocialId(UUID.randomUUID().toString()); paymentInfo.setSocialId(UUID.randomUUID().toString());
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_FAILED)); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.SAVE_FAILED));
} else { } else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.SAVE_SUCCESS));
} }
} }
} }
...@@ -1460,8 +1463,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1460,8 +1463,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type, rowNumber,pensionMoneyMap, importTPaymentSocialHeFei(cachedDataList, errorMessageList, user, type, rowNumber, pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap,sumNumKey,importSuccessKey); bigMoneyMap, unEmpMoneyMap, injuryMoneyMap, medicalMoneyMap, sumNumKey, importSuccessKey);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -1598,27 +1601,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1598,27 +1601,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
//检查数据规范性 //检查数据规范性
if (!Common.isNotNull(infoVo.getEmpIdcard())) { if (!Common.isNotNull(infoVo.getEmpIdcard())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "员工身份证不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "员工身份证不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPayMonth())) { if (!Common.isNotNull(infoVo.getProvidentPayMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentCreateMonth())) { if (!Common.isNotNull(infoVo.getProvidentCreateMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金生成月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金生成月份不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPercent())) { if (!Common.isNotNull(infoVo.getProvidentPercent())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边比例不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边比例不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getUnitProvidentSet())) { if (!Common.isNotNull(infoVo.getUnitProvidentSet())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边基数不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金单边基数不可为空!"));
continue; continue;
} }
if (!Common.isNotNull(infoVo.getProvidentPayAddr())) { if (!Common.isNotNull(infoVo.getProvidentPayAddr())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳地不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), infoVo.getSocialHousehold(), infoVo.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.DOWN_LINE_STRING + "公积金缴纳地不可为空!"));
continue; continue;
} }
if (fundMap.size() > CommonConstants.ZERO_INT) { if (fundMap.size() > CommonConstants.ZERO_INT) {
...@@ -1626,11 +1629,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1626,11 +1629,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (null != fund && !fund.getEmpName().equals(infoVo.getEmpName())) { if (null != fund && !fund.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add errorMessageList.add
(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), fund.getSocialHousehold(), fund.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!")); (new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), fund.getSocialHousehold(), fund.getProvidentHousehold(), infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING); areaArray = infoVo.getProvidentPayAddr().split(CommonConstants.CENTER_SPLIT_LINE_STRING);
fund = checkAddress(areaArray, areaMap, fund, areaMap2,infoVo); fund = checkAddress(areaArray, areaMap, fund, areaMap2, infoVo);
//无对应员工公积金数据 //无对应员工公积金数据
if (null == fund) { if (null == fund) {
boolean isTrueAdder = false; boolean isTrueAdder = false;
...@@ -1639,12 +1642,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1639,12 +1642,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TProvidentFund::getFundProvince, infoVo.getSocialProvince()) .eq(TProvidentFund::getFundProvince, infoVo.getSocialProvince())
.eq(TProvidentFund::getFundCity, infoVo.getSocialCity())); .eq(TProvidentFund::getFundCity, infoVo.getSocialCity()));
if (!fundlist.isEmpty()) { if (!fundlist.isEmpty()) {
for (TProvidentFund providentFund:fundlist) { for (TProvidentFund providentFund : fundlist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getFundTown().equals(providentFund.getFundTown()))) && infoVo.getFundTown().equals(providentFund.getFundTown()))) &&
DateUtil.dateToString(providentFund.getProvidentStart(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) <=0 && DateUtil.dateToString(providentFund.getProvidentStart(), "yyyyMM").compareTo(infoVo.getProvidentPayMonth()) <= 0 &&
(Common.isEmpty(providentFund.getFundReduceDate()) || (Common.isNotNull(providentFund.getFundReduceDate()) && (Common.isEmpty(providentFund.getFundReduceDate()) || (Common.isNotNull(providentFund.getFundReduceDate()) &&
DateUtil.dateToString(providentFund.getFundReduceDate(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >=0))) { DateUtil.dateToString(providentFund.getFundReduceDate(), "yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >= 0))) {
isTrueAdder = true; isTrueAdder = true;
tProvidentFund = providentFund; tProvidentFund = providentFund;
break; break;
...@@ -1676,7 +1679,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1676,7 +1679,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getProvidentSum()).compareTo(BigDecimal.ZERO) != 0) { if (null != paymentInfo && BigDecimalUtils.isNullToZero(paymentInfo.getProvidentSum()).compareTo(BigDecimal.ZERO) != 0) {
//允许覆盖,但已核准表或工资结算或已锁定不允许覆盖 //允许覆盖,但已核准表或工资结算或已锁定不允许覆盖
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" +
infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard() infoVo.getEmpName() + CommonConstants.DOWN_LINE_STRING + infoVo.getEmpIdcard()
+ "公积金缴费数据,禁止覆盖!")); + "公积金缴费数据,禁止覆盖!"));
continue; continue;
...@@ -1712,11 +1715,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1712,11 +1715,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO(); settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) { for (TSettleDomainSelectVo vo : settleDomainR) {
paymentInfo.setSettleDomainName(vo.getDepartName()); paymentInfo.setSettleDomainName(vo.getDepartName());
paymentInfo.setSettleDomainCode(vo.getDepartNo()); paymentInfo.setSettleDomainCode(vo.getDepartNo());
paymentInfo.setUnitId(vo.getCustomerId()); paymentInfo.setUnitId(vo.getCustomerId());
paymentInfo.setUnitName(vo.getCustomerName()); } paymentInfo.setUnitName(vo.getCustomerName());
}
} }
} }
paymentInfo.setFundProvince(tProvidentFund.getFundProvince()); paymentInfo.setFundProvince(tProvidentFund.getFundProvince());
...@@ -1763,14 +1767,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1763,14 +1767,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setFundId(UUID.randomUUID().toString()); paymentInfo.setFundId(UUID.randomUUID().toString());
res = insertAndSTimestamp(paymentInfo); res = insertAndSTimestamp(paymentInfo);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName()
, CommonConstants.SAVE_FAILED)); , CommonConstants.SAVE_FAILED));
continue; continue;
} else { } else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), paymentInfo.getSocialHousehold(), paymentInfo.getProvidentHousehold(), infoVo.getEmpName()
, CommonConstants.SAVE_SUCCESS)); , CommonConstants.SAVE_SUCCESS));
} }
if (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()
...@@ -1796,7 +1800,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1796,7 +1800,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap, ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap, ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap, ConcurrentHashMap<String, BigDecimal> medicalMoneyMap,
String sumNumKey,String importSuccessKey) { String sumNumKey, String importSuccessKey) {
HashMap<String, String> areaMap = new HashMap<>(); HashMap<String, String> areaMap = new HashMap<>();
HashMap<String, String> areaMap2 = new HashMap<>(); HashMap<String, String> areaMap2 = new HashMap<>();
...@@ -2000,8 +2004,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2000,8 +2004,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, list, areaMap, areaMap2, -> executeImportSocialListThree(user, list, areaMap, areaMap2,
paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, paymentInfoInjuryMap,
paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, bigMoneyMap, paymentInfoBigMap, type, errorMessageList, pensionMoneyMap, bigMoneyMap,
unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap), unEmpMoneyMap, injuryMoneyMap, medicalMoneyMap),
yfSocialImportThreadPoolExecutor); yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
} }
...@@ -2015,7 +2019,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2015,7 +2019,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
-> executeImportSocialListThree(user, finalList, areaMap, -> executeImportSocialListThree(user, finalList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type, paymentInfoInjuryMap, paymentInfoBigMap, type,
errorMessageList,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap,injuryMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap, injuryMoneyMap,
medicalMoneyMap), yfSocialImportThreadPoolExecutor); medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(oneCompletableFuture); completableFutureList.add(oneCompletableFuture);
lastIdx = 1; lastIdx = 1;
...@@ -2029,8 +2033,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2029,8 +2033,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
-> executeImportSocialListThree(user, finalTempList1 -> executeImportSocialListThree(user, finalTempList1
, areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, , areaMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap,
paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap, type, paymentInfoUnEmpMap, paymentInfoInjuryMap, paymentInfoBigMap, type,
errorMessageList,pensionMoneyMap, bigMoneyMap,unEmpMoneyMap, errorMessageList, pensionMoneyMap, bigMoneyMap, unEmpMoneyMap,
injuryMoneyMap,medicalMoneyMap), yfSocialImportThreadPoolExecutor); injuryMoneyMap, medicalMoneyMap), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
tempList = new ArrayList<>(); tempList = new ArrayList<>();
} }
...@@ -2055,8 +2059,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2055,8 +2059,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(() CompletableFuture<List<ErrorDetailVO>> listCompletableFuture = CompletableFuture.supplyAsync(()
-> executeImportSocialListThree(user, finalTempList, areaMap, -> executeImportSocialListThree(user, finalTempList, areaMap,
areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap, areaMap2, paymentInfoPensionMap, paymentInfoMedicalMap, paymentInfoUnEmpMap,
paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList,pensionMoneyMap, paymentInfoInjuryMap, paymentInfoBigMap, type, errorMessageList, pensionMoneyMap,
bigMoneyMap,unEmpMoneyMap,injuryMoneyMap,medicalMoneyMap) bigMoneyMap, unEmpMoneyMap, injuryMoneyMap, medicalMoneyMap)
, yfSocialImportThreadPoolExecutor); , yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
} }
...@@ -2080,20 +2084,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2080,20 +2084,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
private List<ErrorDetailVO> executeImportSocialListThree(YifuUser user, private List<ErrorDetailVO> executeImportSocialListThree(YifuUser user,
List<TPaymentHeFeiVo> list, List<TPaymentHeFeiVo> list,
HashMap<String, String> areaMap, HashMap<String, String> areaMap,
HashMap<String, String> areaMap2, HashMap<String, String> areaMap2,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoPensionMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoMedicalMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoUnEmpMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoInjuryMap,
ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap, ConcurrentHashMap<String, TPaymentInfo> paymentInfoBigMap,
String type, List<ErrorDetailVO> errorMessageList, String type, List<ErrorDetailVO> errorMessageList,
ConcurrentHashMap<String, BigDecimal> pensionMoneyMap, ConcurrentHashMap<String, BigDecimal> pensionMoneyMap,
ConcurrentHashMap<String, BigDecimal> bigMoneyMap, ConcurrentHashMap<String, BigDecimal> bigMoneyMap,
ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap, ConcurrentHashMap<String, BigDecimal> unEmpMoneyMap,
ConcurrentHashMap<String, BigDecimal> injuryMoneyMap, ConcurrentHashMap<String, BigDecimal> injuryMoneyMap,
ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) { ConcurrentHashMap<String, BigDecimal> medicalMoneyMap) {
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
TPaymentInfo payExists; TPaymentInfo payExists;
TSocialFundInfo socialInfo = null; TSocialFundInfo socialInfo = null;
...@@ -2141,11 +2145,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2141,11 +2145,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//对身份证与人员姓名的对应关系进行校验 //对身份证与人员姓名的对应关系进行校验
if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) { if (socialInfo != null && !socialInfo.getEmpName().equals(infoVo.getEmpName())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "姓名与身份证信息不一致,请核实后再次尝试!"));
continue; continue;
} }
if (socialInfo != null && socialInfo.getSocialStartDate() == null) { if (socialInfo != null && socialInfo.getSocialStartDate() == null) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的社保起缴日期为空!"));
continue; continue;
} }
} }
...@@ -2156,12 +2160,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2156,12 +2160,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString()) .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())); .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()));
if (!socialist.isEmpty()) { if (!socialist.isEmpty()) {
for (TSocialInfo socialInfo1:socialist) { for (TSocialInfo socialInfo1 : socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) && if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().toString().equals(socialInfo1.getSocialTown()))) && infoVo.getSocialTown().toString().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 && DateUtil.dateToString(socialInfo1.getSocialStartDate(), "yyyyMM").compareTo(infoVo.getSocialPayMonth()) <= 0 &&
(Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) && (Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) &&
DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) { DateUtil.dateToString(socialInfo1.getSocialReduceDate(), "yyyyMM").compareTo(infoVo.getSocialPayMonth()) >= 0))) {
isTrueAdder = true; isTrueAdder = true;
tSocialInfo = socialInfo1; tSocialInfo = socialInfo1;
break; break;
...@@ -2182,8 +2186,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2182,8 +2186,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (pensionMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getUnitMoney())), pensionMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的养老缴费数据")); infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的养老缴费数据"));
continue; continue;
} else { } else {
pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), pensionMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
...@@ -2206,7 +2210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2206,7 +2210,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitPensionMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitPensionMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalPensionMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的养老缴费数据,请勿重复导入!")); + "的养老缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2219,8 +2223,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2219,8 +2223,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (unEmpMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMoney())), unEmpMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的失业缴费数据")); infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的失业缴费数据"));
continue; continue;
} else { } else {
unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( unEmpMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2244,7 +2248,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2244,7 +2248,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitUnemploymentMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitUnemploymentMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalUnemploymentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的失业缴费数据,请勿重复导入!")); + "的失业缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2257,8 +2261,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2257,8 +2261,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (medicalMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero( BigDecimalUtils.isNullToZero(infoVo.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(
infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { infoVo.getPersonalMedicalMoney())), medicalMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的医保缴费数据")); infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的医保缴费数据"));
continue; continue;
} else { } else {
medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( medicalMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2283,7 +2287,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2283,7 +2287,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalMedicalMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitMedicalMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitMedicalMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalMedicalMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医保缴费数据,请勿重复导入!")); + "的医保缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2296,9 +2300,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2296,9 +2300,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd( if (injuryMoneyMap.get(exitMoney) != null && BigDecimalUtils.safeMultiply(BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { injuryMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的工伤缴费数据")); infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的工伤缴费数据"));
continue; continue;
} else { } else {
injuryMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( injuryMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2322,7 +2326,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2322,7 +2326,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()), BigDecimalUtils.isNullToZero(infoVo.getPersonalMoney()),
BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())), BigDecimalUtils.isNullToZero(infoVo.getUnitMoney())),
BigDecimalUtils.isNullToZero(payExists.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getUnitInjuryMoney())).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的单位工伤缴费数据,请勿重复导入!")); + "的单位工伤缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2336,8 +2340,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2336,8 +2340,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()), BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()),
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())),
bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) { bigMoneyMap.get(exitMoney)).compareTo(BigDecimal.ZERO) > 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE + errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", SocialConstants.ERROR_TEMPLATE +
infoVo.getEmpName() , SocialConstants.ERROR_TEMPLATE + "的医疗救助金缴费数据")); infoVo.getEmpName(), SocialConstants.ERROR_TEMPLATE + "的医疗救助金缴费数据"));
continue; continue;
} else { } else {
bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd( bigMoneyMap.put(exitMoney, BigDecimalUtils.safeAdd(
...@@ -2362,7 +2366,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2362,7 +2366,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.safeAdd( BigDecimalUtils.isNullToZero(infoVo.getPersonalBigailmentMoney())), BigDecimalUtils.safeAdd(
BigDecimalUtils.isNullToZero(payExists.getUnitBigmailmentMoney()), BigDecimalUtils.isNullToZero(payExists.getUnitBigmailmentMoney()),
BigDecimalUtils.isNullToZero(payExists.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) { BigDecimalUtils.isNullToZero(payExists.getPersonalBigmailmentMoney()))).compareTo(BigDecimal.ZERO) > 0))) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard() errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), "已存在对应员工身份证" + infoVo.getEmpIdcard()
+ "的医疗救助金缴费数据,请勿重复导入!")); + "的医疗救助金缴费数据,请勿重复导入!"));
continue; continue;
} }
...@@ -2389,7 +2393,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2389,7 +2393,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setSocialCity(socialInfo.getSocialCity()); payExists.setSocialCity(socialInfo.getSocialCity());
payExists.setSocialTown(socialInfo.getSocialTown()); payExists.setSocialTown(socialInfo.getSocialTown());
payExists.setSocialHousehold(socialInfo.getSocialHouseholdName()); payExists.setSocialHousehold(socialInfo.getSocialHouseholdName());
}else if (Common.isNotNull(tSocialInfo)) { } else if (Common.isNotNull(tSocialInfo)) {
payExists.setEmpId(tSocialInfo.getEmpId()); payExists.setEmpId(tSocialInfo.getEmpId());
payExists.setEmpIdcard(tSocialInfo.getEmpIdcard()); payExists.setEmpIdcard(tSocialInfo.getEmpIdcard());
payExists.setEmpName(tSocialInfo.getEmpName()); payExists.setEmpName(tSocialInfo.getEmpName());
...@@ -2399,11 +2403,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2399,11 +2403,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO(); settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) { for (TSettleDomainSelectVo vo : settleDomainR) {
payExists.setSettleDomainName(vo.getDepartName()); payExists.setSettleDomainName(vo.getDepartName());
payExists.setSettleDomainCode(vo.getDepartNo()); payExists.setSettleDomainCode(vo.getDepartNo());
payExists.setUnitId(vo.getCustomerId()); payExists.setUnitId(vo.getCustomerId());
payExists.setUnitName(vo.getCustomerName()); } payExists.setUnitName(vo.getCustomerName());
}
} }
} }
payExists.setSocialProvince(tSocialInfo.getSocialProvince()); payExists.setSocialProvince(tSocialInfo.getSocialProvince());
...@@ -2484,9 +2489,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2484,9 +2489,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
res = insertAndSTimestamp(payExists); res = insertAndSTimestamp(payExists);
if (res < 0) { if (res < 0) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_FAILED)); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.SAVE_FAILED));
} else { } else {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName() , CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ONE_INT, infoVo.getEmpIdcard(), payExists.getSocialHousehold(), payExists.getProvidentHousehold(), infoVo.getEmpName(), CommonConstants.SAVE_SUCCESS));
} }
} }
} }
...@@ -2499,21 +2504,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2499,21 +2504,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private boolean socialThreeCheckBase(List<ErrorDetailVO> errorMessageList, TPaymentHeFeiVo private boolean socialThreeCheckBase(List<ErrorDetailVO> errorMessageList, TPaymentHeFeiVo
infoVo, String type) { infoVo, String type) {
if (!Common.isNotNull(infoVo.getSocialPayMonth())) { if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳月份不可为空!"));
return true; return true;
} }
if (!Common.isNotNull(infoVo.getSocialCreateMonth())) { if (!Common.isNotNull(infoVo.getSocialCreateMonth())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保生成月份不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保生成月份不可为空!"));
return true; return true;
} }
if (!Common.isNotNull(infoVo.getSocialPayAddr())) { if (!Common.isNotNull(infoVo.getSocialPayAddr())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳地不可为空!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "社保缴纳地不可为空!"));
return true; return true;
} }
if (CommonConstants.ZERO_STRING.equals(type) && !PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType()) if (CommonConstants.ZERO_STRING.equals(type) && !PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())
&& !PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType()) && !PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())
&& !PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) { && !PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())) {
errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无相关险种!")); errorMessageList.add(new ErrorDetailVO(infoVo.getRowIndex(), CommonConstants.ZERO_INT, infoVo.getEmpIdcard(), "", "", infoVo.getEmpName(), "无相关险种!"));
return true; return true;
} }
return false; return false;
...@@ -2610,6 +2615,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2610,6 +2615,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/** /**
* 薪资获取缴费库 * 薪资获取缴费库
*
* @Author hgw * @Author hgw
* @Date 2022-8-10 18:06:13 * @Date 2022-8-10 18:06:13
**/ **/
...@@ -2667,16 +2673,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2667,16 +2673,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId)); .isNotNull(TPaymentInfo::getSocialId));
if (count > 0){ if (count > 0) {
List<TPaymentInfo> unPushs; List<TPaymentInfo> unPushs;
int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j=0;j<i;j++){ for (int j = 0; j < i; j++) {
unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000")); .isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000"));
synchronized (this){ synchronized (this) {
if (Common.isNotNull(unPushs)) { if (Common.isNotNull(unPushs)) {
//推送数据封装并推送 //推送数据封装并推送
doJointSocialTask.asynchronousEkpPaymentSocial(unPushs, mapSelectVo); doJointSocialTask.asynchronousEkpPaymentSocial(unPushs, mapSelectVo);
...@@ -2698,7 +2704,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2698,7 +2704,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
...@@ -2724,18 +2730,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2724,18 +2730,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L); redisUtil.set(key, user.getId(), 36000L);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
//手动推送未推送的社保公积金明细数据 //手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user, searchVo,mapSelectVo); createPaymentSocialInfoReal(user, searchVo, mapSelectVo);
createPaymentFundInfoReal(user, searchVo,mapSelectVo); createPaymentFundInfoReal(user, searchVo, mapSelectVo);
//推送社保公积金收入数据 //推送社保公积金收入数据
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush"; String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
createPaymentInfoIncomeReal(user, searchVo,mapSelectVo,redisKey); createPaymentInfoIncomeReal(user, searchVo, mapSelectVo, redisKey);
createPaymentFundIncomeReal(user, searchVo,mapSelectVo,redisKey); createPaymentFundIncomeReal(user, searchVo, mapSelectVo, redisKey);
//推送失败的数据重新推送 //推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) { if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey); List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) { for (TIncome income : list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income); doJointSocialTask.asynchronousEkpIncomePaymentT(income);
} }
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
...@@ -2758,7 +2764,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2758,7 +2764,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return R.failed("未找到本人创建的未标识确认无误的数据"); return R.failed("未找到本人创建的未标识确认无误的数据");
} else { } else {
LambdaUpdateWrapper<TPaymentInfo> updateWrapper = new UpdateWrapper<TPaymentInfo>().lambda(); LambdaUpdateWrapper<TPaymentInfo> updateWrapper = new UpdateWrapper<TPaymentInfo>().lambda();
updateWrapper.set(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING).in(TPaymentInfo::getId,list); updateWrapper.set(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING).in(TPaymentInfo::getId, list);
return R.ok(this.update(updateWrapper)); return R.ok(this.update(updateWrapper));
} }
} }
...@@ -2766,33 +2772,33 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2766,33 +2772,33 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public void createPaymentInfoIncome() { public void createPaymentInfoIncome() {
long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda() long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus,CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .eq(TPaymentInfo::getIsIncomeStatus, CommonConstants.ZERO_STRING)
.isNotNull(TPaymentInfo::getSocialId)); .isNotNull(TPaymentInfo::getSocialId));
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush"; String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入 //判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .eq(TPaymentInfo::getIsIncomeStatus, CommonConstants.ZERO_STRING)
.isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000")); .isNotNull(TPaymentInfo::getSocialId).last(" limit 0,10000"));
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 //生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo,redisKey); createIncomeInfo(sumList, CommonConstants.ONE_STRING, mapSelectVo, redisKey);
} }
} }
} }
//推送失败的数据重新推送 //推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) { if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey); List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) { for (TIncome income : list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income); doJointSocialTask.asynchronousEkpIncomePaymentT(income);
} }
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
...@@ -2806,32 +2812,32 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2806,32 +2812,32 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override @Override
public void createPaymentFundIncome() { public void createPaymentFundIncome() {
long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda() long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus,CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .eq(TPaymentInfo::getIsIncomeStatus, CommonConstants.ZERO_STRING)
.isNotNull(TPaymentInfo::getFundId)); .isNotNull(TPaymentInfo::getFundId));
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush"; String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getIsIncomeStatus,CommonConstants.ZERO_STRING) .eq(TPaymentInfo::getIsIncomeStatus, CommonConstants.ZERO_STRING)
.isNotNull(TPaymentInfo::getFundId).last(" limit 0,10000")); .isNotNull(TPaymentInfo::getFundId).last(" limit 0,10000"));
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 //生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo,redisKey); createIncomeInfo(sumList, CommonConstants.TWO_STRING, mapSelectVo, redisKey);
} }
} }
} }
//推送失败的数据重新推送 //推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) { if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey); List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) { for (TIncome income : list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income); doJointSocialTask.asynchronousEkpIncomePaymentT(income);
} }
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
...@@ -2846,8 +2852,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2846,8 +2852,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public void signPaymentNoIncomeFlag() { public void signPaymentNoIncomeFlag() {
//标识根据项目不需要生成收入的数据 //标识根据项目不需要生成收入的数据
long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda() long count = baseMapper.selectCount(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus,CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING)); .eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING));
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
...@@ -2866,11 +2872,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2866,11 +2872,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo, public void createPaymentSocialInfoReal(YifuUser user, TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) { Map<String, TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的社保实缴明细数据 //获取所有未推送的社保实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialPushCount(searchVo,user.getId()); long count = baseMapper.getTPaymentSocialPushCount(searchVo, user.getId());
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
...@@ -2886,11 +2892,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2886,11 +2892,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo, public void createPaymentFundInfoReal(YifuUser user, TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) { Map<String, TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundPushCount(searchVo,user.getId()); long count = baseMapper.getTPaymentFundPushCount(searchVo, user.getId());
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
...@@ -2906,10 +2912,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2906,10 +2912,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo, public void createPaymentInfoIncomeReal(YifuUser user, TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) { Map<String, TSettleDomainSelectVo> mapSelectVo, String redisKey) {
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId()); long count = baseMapper.getTPaymentSocialIncomeCount(searchVo, user.getId());
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
...@@ -2918,17 +2924,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2918,17 +2924,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 //生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo,redisKey); createIncomeInfo(sumList, CommonConstants.ONE_STRING, mapSelectVo, redisKey);
} }
} }
} }
} }
} }
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo, public void createPaymentFundIncomeReal(YifuUser user, TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) { Map<String, TSettleDomainSelectVo> mapSelectVo, String redisKey) {
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId()); long count = baseMapper.getTPaymentFundIncomeCount(searchVo, user.getId());
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
...@@ -2937,7 +2943,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2937,7 +2943,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 //生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo,redisKey); createIncomeInfo(sumList, CommonConstants.TWO_STRING, mapSelectVo, redisKey);
} }
} }
} }
...@@ -2991,128 +2997,128 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2991,128 +2997,128 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}catch (Exception e) { } catch (Exception e) {
log.error("标识是否需要生成收入异常",e); log.error("标识是否需要生成收入异常", e);
} }
} }
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag, public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag,
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) { Map<String, TSettleDomainSelectVo> mapSelectVo, String redisKey) {
List<TIncomeDetail> exitIncome; List<TIncomeDetail> exitIncome;
TSettleDomain settleDomain; TSettleDomain settleDomain;
try { try {
for (TPaymentInfo paymentInfo : updateList) { for (TPaymentInfo paymentInfo : updateList) {
boolean exitFlag = false; boolean exitFlag = false;
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())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth()) .eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING)); .eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING));
} else { } else {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth()) .eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING)); .eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
} }
if (Common.isNotNull(exitIncome)) { if (Common.isNotNull(exitIncome)) {
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())) { if (paymentInfo.getId().equals(income.getSourceId())) {
exitFlag = true; exitFlag = true;
} }
} }
if (exitFlag) { if (exitFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
continue; continue;
} }
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) { if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
exitFlag = true; exitFlag = true;
} }
} }
//获取项目信息 //获取项目信息
if (Common.isNotNull(mapSelectVo)) { if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(paymentInfo.getSettleDomainCode()); settleDomain = mapSelectVo.get(paymentInfo.getSettleDomainCode());
} else { } else {
settleDomain = null; settleDomain = null;
} }
int isSum = 0; int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
boolean isIncomeFlag = false; boolean isIncomeFlag = false;
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式 //预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
BigDecimal gMoney; 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();
} else { } else {
isSum = 1; isSum = 1;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 1) { if (!exitFlag || isSum == 1) {
isIncomeFlag = true; isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag,redisKey); gMoney, socialFundFlag, redisKey);
} }
} }
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式 //预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
BigDecimal money; 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();
} else { } else {
isSum = 2; isSum = 2;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 2) { if (!exitFlag || isSum == 2) {
isIncomeFlag = true; isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag,redisKey); money, socialFundFlag, redisKey);
} }
} }
} }
if (!isIncomeFlag) { if (!isIncomeFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
} }
} }
} }
}catch (Exception e) { } catch (Exception e) {
log.error("生成社保收入异常",e); log.error("生成社保收入异常", e);
} }
} }
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType, public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
...@@ -3147,7 +3153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3147,7 +3153,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail.setMrSettleType(settleDomain.getMrSettleType()); detail.setMrSettleType(settleDomain.getMrSettleType());
detail.setId(CommonConstants.NULL); detail.setId(CommonConstants.NULL);
detail.setRedData(CommonConstants.ZERO_STRING); detail.setRedData(CommonConstants.ZERO_STRING);
incomeService.saveBathDetail(detail,library.getId()); incomeService.saveBathDetail(detail, library.getId());
} }
/** /**
...@@ -3214,7 +3220,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3214,7 +3220,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 2划转管理费、风险金 // 2划转管理费、风险金
if ((changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty()) if ((changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty())
|| (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty())) { || (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty())) {
idSet = new HashSet<>(); idSet = new HashSet<>();
if (changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty()) { if (changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGuanlifei()) { for (ChangeDeptDetailVo vo : changeDeptVo.getGuanlifei()) {
...@@ -3266,6 +3272,40 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3266,6 +3272,40 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
@Override
public void updateSocialSettleStatus(EkpSocialViewVo viewVo) {
//判断预估还是实缴
if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_THR)) {
//根据明细id更新结算状态
TPaymentInfo paymentInfo = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(paymentInfo)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
paymentInfo.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
paymentInfo.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
paymentInfo.setPaySettleFlag(viewVo.getPaySettleFlag());
paymentInfo.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(paymentInfo);
}
} else if(viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_ONE)){
//根据明细id更新结算状态
TForecastLibrary library = tForecastLibraryMapper.selectById(viewVo.getId());
if (Common.isNotNull(library)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
library.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
library.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
library.setPaySettleFlag(viewVo.getPaySettleFlag());
library.setPayCollectFlag(viewVo.getPayCollectFlag());
}
tForecastLibraryMapper.updateById(library);
}
}
}
/** /**
* @param idSet * @param idSet
* @Description: 校验是否存在已结算薪资的数据 * @Description: 校验是否存在已结算薪资的数据
...@@ -3283,14 +3323,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3283,14 +3323,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
/**
* @Description: 手动推送时筛选数据
* @Author: huyc
**/
public boolean findList(TPaymentInfo t,YifuUser user) {
return CommonConstants.ONE_STRING.equals(t.getLockStatus()) && user.getId().equals(t.getCreateBy());
}
private Map<String, TSettleDomainSelectVo> getSelectVoMap() { private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos(); R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null; Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
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