Commit cd651d14 authored by huyuchen's avatar huyuchen

优化接口修改

parent e40b839f
......@@ -6166,7 +6166,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//判断是否存在当月的商险收入数据
Boolean isExist = false;
boolean isExist = false;
List<TIncomeDetail> incomeDetailList = new ArrayList<>();
TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setEmpIdcard(insuranceDetail.getEmpIdcardNo());
......
......@@ -188,60 +188,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty("公积金缴纳地")
private String providentPayAddr;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", isArea = true)
@Schema(description ="公积金缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-省")
private String fundProvince;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市",isArea = true, parentField = "fundProvince")
@Schema(description ="公积金缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-市")
private String fundCity;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县",isArea = true, parentField = "fundCity")
@Schema(description ="公积金缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-县")
private String fundTown;
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地-省",isArea = true)
@Schema(description ="社保缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市", isArea = true, parentField = "socialProvince")
@Schema(description ="社保缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-市")
private String socialCity;
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县", isArea = true, parentField = "socialCity")
@Schema(description ="社保缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-县")
private String socialTown;
/**
* 社保合计
*/
......
......@@ -16,6 +16,8 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -43,10 +45,18 @@ public class TPaymentInfoSearchVo extends TPaymentInfo {
private List<String> idList;
/**
* 创建时间区间 [开始时间,结束时间]
* 开始时间(查询专用)
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
@ExcelAttribute(name = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
/**
* 截止时间(查询专用)
*/
@ExcelAttribute(name = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
/**
* @Author fxj
* 查询数据起
......
......@@ -402,8 +402,10 @@ public class TPaymentInfoController {
@Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据")
@SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo() {
tPaymentInfoService.pushPaymentSocialFundInfo();
public R<Boolean> pushPaymentSocialFundInfo(@RequestParam(name = "socialHouse", required = false) String socialHouse,
@RequestParam(name = "fundHouse", required = false) String fundHouse,
@RequestParam(name = "settleDomainId", required = false) String settleDomainId) {
tPaymentInfoService.pushPaymentSocialFundInfo(socialHouse,fundHouse,settleDomainId);
return R.ok();
}
......@@ -418,4 +420,17 @@ public class TPaymentInfoController {
public R<String> changeDeptByEkp(@RequestBody ChangeDeptVo changeDeptVo) {
return tPaymentInfoService.changeDeptByEkp(changeDeptVo);
}
/**
* @Description: 批量标识可以推送的数据
* @Author: huyc
* @Date: 2022/11/16
* @return: R
**/
@Operation(summary = "批量标识可以推送的数据", description = "批量标识可以推送的数据")
@SysLog("批量标识可以推送的数据")
@PostMapping("/batchUpdatePaymentInfo")
public R<Boolean> batchUpdatePaymentInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
return tPaymentInfoService.batchUpdatePaymentInfo(searchVo);
}
}
......@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -91,13 +90,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
TPaymentInfoVo getAllInfoById(String id);
/**
* 查询要删除的数据
* @param queryEntity
* @return
**/
List<TPaymentInfo> selectListForDelete(@Param("queryEntity")TPaymentInfo queryEntity);
/*
* 已存在社保缴费库数据 非删除状态
* @param months
......@@ -164,4 +156,11 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
int changePaymentDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* 缴费库未打标数据查询
* @param searchVo 缴费库
* @return
*/
List<String> getTPaymentInfoList(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
}
......@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import javax.servlet.http.HttpServletResponse;
......@@ -65,7 +66,7 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/9/9 11:42
* @return:
**/
void saveBathDetail(List<TIncomeDetail> tIncomeDetail);
boolean saveBathDetail(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo);
void pushDetail();
......
......@@ -148,7 +148,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo getPaymentSocialAndFound(TPaymentInfo info);
void pushPaymentSocialFundInfo();
void pushPaymentSocialFundInfo(String socialHouse,String fundHouse,String settleDomainId);
/**
* 批量标识可以推送的数据
* @Author huyc
* @Date 2022-11-16 10:06:13
**/
R<Boolean> batchUpdatePaymentInfo(TPaymentInfoSearchVo searchVo);
/**
* @param changeDeptVo
......
......@@ -4231,7 +4231,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
//判断是否存在当月的公积金收入数据
Boolean isExist = false;
boolean isExist = false;
TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setEmpIdcard(library.getEmpIdcard());
incomeDetail.setPayMonth(library.getProvidentPayMonth());
......@@ -4243,12 +4243,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
for (TIncomeDetail income : detailList) {
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(),sumMoney);
}
if (sumMoney.compareTo(BigDecimal.ZERO) == CommonConstants.ONE_INT) {
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
isExist = true;
}
}
int isSum = 0;
if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
......
......@@ -51,11 +51,13 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -95,6 +97,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private final TSendEkpErrorService tSendEkpErrorService;
@Autowired
private DoJointSocialTask doJointSocialTask;
/**
* 预估费用简单分页查询
*
......@@ -2371,9 +2376,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
public void initEkpPushSocialParam(List<TForecastLibrary> unPushInfo) {
List<String> pushList = new ArrayList<>();
Map<String,Integer> map = new HashMap<>();
Map<String,String> idMap = new HashMap<>();
R<TSettleDomainListVo> listVo;
List<TSettleDomainSelectVo> settleDomainR;
for (TForecastLibrary library : unPushInfo) {
......@@ -2605,60 +2607,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表
pushList.add(library.getId());
if (pushList.size() >= CommonConstants.FIVES_INT) {
baseMapper.updatePushStatus(pushList);
pushList.clear();
}
}else {
if (map.get(body) > 0) {
int i = map.get(body) + 1;
map.put(body,i);
idMap.put(body,library.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
baseMapper.updatePushStatus(pushList);
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setLinkId(library.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(body,1);
idMap.put(body,library.getId());
}
}
}
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setTitle(key);
error.setLinkId(idMap.get(key));
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
//更新推送状态
if (Common.isNotNull(pushList)) {
baseMapper.updatePushStatus(pushList);
doJointSocialTask.asynchronousEkpForecastSocial(socialParam, library);
}
}
public void initEkpPushFundParam(List<TForecastLibrary> unPushInfo) {
List<String> pushList = new ArrayList<>();
Map<String,Integer> map = new HashMap<>();
Map<String,String> idMap = new HashMap<>();
R<TSettleDomainListVo> listVo;
List<TSettleDomainSelectVo> settleDomainR;
for (TForecastLibrary library : unPushInfo) {
......@@ -2788,53 +2741,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表
pushList.add(library.getId());
if (pushList.size() >= CommonConstants.FIVES_INT) {
baseMapper.updatePushStatus(pushList);
pushList.clear();
}
}else {
if (map.get(body) > 0) {
int i = map.get(body) + 1;
map.put(body,i);
idMap.put(body,library.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
baseMapper.updatePushStatus(pushList);
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setLinkId(library.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(body,1);
idMap.put(body,library.getId());
}
}
}
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setLinkId(idMap.get(key));
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
//更新推送状态
if (Common.isNotNull(pushList)) {
baseMapper.updatePushStatus(pushList);
doJointSocialTask.asynchronousEkpForecastFund(fundParam, library);
}
}
......@@ -2883,30 +2790,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
int isSum = 0;
if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(sourceType)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(sourceType)))) {
//预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!isExist) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && !isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), sourceType);
}
}
}
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(sourceType)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(sourceType)))) {
//预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!isExist) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && !isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), sourceType);
......@@ -2914,8 +2816,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
}
public void createIncomeInsurance(TForecastLibrary library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money, String sourceType) {
......
......@@ -37,9 +37,9 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
......@@ -49,7 +49,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -58,6 +57,10 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 收入明细表
......@@ -78,9 +81,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
private EkpIncomeUtil ekpIncomeUtil;
@Autowired
private TPaymentInfoMapper tPaymentInfoMapper;
@Autowired
private DoJointSocialTask doJointSocialTask;
......@@ -288,10 +288,12 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
**/
@Override
public void saveBathDetail(List<TIncomeDetail> tIncomeDetailList) {
Map<String,Integer> map = new HashMap<>();
Map<String,String> idMap = new HashMap<>();
for (TIncomeDetail tIncomeDetail : tIncomeDetailList) {
public boolean saveBathDetail(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo) {
if (Common.isEmpty(tIncomeDetail.getEmpIdcard())
|| Common.isEmpty(tIncomeDetail.getDeptId())
|| Common.isEmpty(tIncomeDetail.getPayMonth())) {
return false;
}
// 获取对应信息的统计表,根据项目配置,判断是否可以加一条统计:
TIncome income = new TIncome();
income.setEmpIdcard(tIncomeDetail.getEmpIdcard());
......@@ -302,363 +304,31 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
detail.setEmpIdcard(tIncomeDetail.getEmpIdcard());
detail.setDeptId(tIncomeDetail.getDeptId());
List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail);
tIncomeDetail.setCreateTime(new Date());
tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0));
tIncomeDetailService.save(tIncomeDetail);
tPaymentInfoMapper.updateByIncome(tIncomeDetail.getSourceId());
// 不存在,直接新增
if (incomeList == null || incomeList.isEmpty()) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
} else {
// 判断,比例,直接加
if (CommonConstants.ONE_STRING.equals(tIncomeDetail.getFeeMode())) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
} else {
Map<String, Integer> numMap = new HashMap<>();
Map<String, Integer> incomeMap = new HashMap<>();
// 商险Map
Map<String, Integer> insureMap = new HashMap<>();
Integer nums;
Integer insureNums;
for (TIncomeDetail detail1 : detailList) {
nums = numMap.get(detail1.getPayMonth() + CommonConstants.DOWN_LINE_STRING + detail1.getSourceType()
+ CommonConstants.DOWN_LINE_STRING + detail1.getFeeType());
if (Common.isEmpty(nums)) {
nums = CommonConstants.ZERO_INT;
}
if (CommonConstants.ONE_STRING.equals(detail1.getRedData())) {
nums--;
} else {
nums++;
}
numMap.put(detail1.getPayMonth() + CommonConstants.DOWN_LINE_STRING + detail1.getSourceType()
+ CommonConstants.DOWN_LINE_STRING + detail1.getFeeType(), nums);
}
for (TIncome income1 : incomeList) {
nums = incomeMap.get(income1.getPayMonth() + CommonConstants.DOWN_LINE_STRING + income1.getFeeType());
if (Common.isEmpty(nums)) {
nums = CommonConstants.ZERO_INT;
}
if (CommonConstants.ONE_STRING.equals(income1.getRedData())) {
nums--;
} else {
nums++;
}
incomeMap.put(income1.getPayMonth() + CommonConstants.DOWN_LINE_STRING + income1.getFeeType(), nums);
insureNums = insureMap.get(income1.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + income1.getFeeType());
if (Common.isEmpty(insureNums)) {
insureNums = CommonConstants.ZERO_INT;
}
if (CommonConstants.ONE_STRING.equals(income1.getRedData())) {
insureNums--;
} else {
insureNums++;
}
insureMap.put(income1.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + income1.getFeeType(), insureNums);
}
// 金额人数、人次,需要判重
// 社保、公积金(收入来源:1社保2公积金3商险4薪资)
if (CommonConstants.ONE_STRING.equals(tIncomeDetail.getSourceType())
|| CommonConstants.TWO_STRING.equals(tIncomeDetail.getSourceType())) {
if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) {
if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
}
} else {
// 红冲判断:当本类型是最大值,才可以红冲
if (this.redDateJudge(tIncomeDetail, numMap)) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
}
}
} else if (CommonConstants.THREE_STRING.equals(tIncomeDetail.getSourceType())) {
// 商险。收费方式:2金额-人数
if (CommonConstants.TWO_STRING.equals(tIncomeDetail.getFeeMode())) {
if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) {
if (insureMap.get(tIncomeDetail.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| insureMap.get(tIncomeDetail.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
}
} else {
if (this.redDateJudge(tIncomeDetail, numMap)) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
}
}
} else {
// 各个模式累加逻辑:
this.judgeMixModel(tIncomeDetail, numMap, incomeMap);
}
} else {
// 薪资。收费方式:2金额-人数
if (CommonConstants.TWO_STRING.equals(tIncomeDetail.getFeeMode())) {
if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
this.save(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
}
}
this.updateById(income);
}
} else {
// 3金额-人次
// 各个模式累加逻辑:
this.judgeMixModel(tIncomeDetail, numMap, incomeMap);
}
}
}
}
}
for (String key: map.keySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(idMap.get(key));
error.setTitle(key);
error.setNums(map.get(key));
tSendEkpErrorService.save(error);
// 核心判断
return this.copyCore(tIncomeDetail, incomeList, detailList);
}
}
@Override
public void pushDetail() {
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
List<TIncome> list = baseMapper.selectList(Wrappers.<TIncome>query().lambda()
.eq(TIncome::getSendStatus, CommonConstants.ZERO_STRING));
String sendBack;
Map<String,Integer> map = new HashMap<>();
Map<String,String> idMap = new HashMap<>();
ConcurrentHashMap<String,Integer> map = new ConcurrentHashMap<>();
ConcurrentHashMap<String,String> idMap = new ConcurrentHashMap<>();
//收入更新
List<TIncome> updateList = new ArrayList<>();
threadPool.execute(() -> {
for (TIncome income : list) {
sendBack = this.getSendBack(income);
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
......@@ -672,37 +342,38 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
} else {
if (map.get(sendBack) > 0) {
int i = map.get(sendBack) + 1;
map.put(sendBack,i);
idMap.put(sendBack,income.getId());
map.put(sendBack, i);
idMap.put(sendBack, income.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
baseMapper.updateIncomeById(updateList);
for (String key: map.keySet()) {
for (Map.Entry<String, Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(income.getId());
error.setTitle(key);
error.setNums(map.get(key));
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(sendBack,1);
idMap.put(sendBack,income.getId());
map.put(sendBack, 1);
idMap.put(sendBack, income.getId());
}
}
}
for (String key: map.keySet()) {
});
for (Map.Entry<String, Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FIVE_STRING);
error.setLinkId(idMap.get(key));
error.setTitle(key);
error.setNums(map.get(key));
error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
baseMapper.updateIncomeById(updateList);
......@@ -742,6 +413,19 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return true;
}
// 复制并保存
private boolean savePaymentIncome(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo) {
TIncome income = new TIncome();
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
income.setApplyNo(tIncomeDetail.getApplyNo());
this.save(income);
long start = System.currentTimeMillis();
doJointSocialTask.asynchronousEkpIncomePayment(income,paymentInfo);
log.error("线程执行耗时:"+ (System.currentTimeMillis()-start));
return true;
}
/**
* @param income 收入
* @param sendParam 目标格式
......
......@@ -24,6 +24,8 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -58,6 +60,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
......@@ -72,7 +75,6 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.text.NumberFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
......@@ -138,6 +140,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private TEkpChangeDeptLogService tEkpChangeDeptLogService;
@Autowired
private DoJointSocialTask doJointSocialTask;
/**
* 缴费库简单分页查询
*
......@@ -2515,6 +2520,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
......@@ -2527,6 +2533,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
......@@ -2535,17 +2542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public void pushPaymentSocialFundInfo() {
public void pushPaymentSocialFundInfo(String socialHouse,String fundHouse,String settleDomainId) {
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user);
createPaymentFundInfoReal(user);
createPaymentSocialInfoReal(user,socialHouse,settleDomainId);
createPaymentFundInfoReal(user,fundHouse,settleDomainId);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user);
createPaymentFundIncomeReal(user);
createPaymentInfoIncomeReal(user,socialHouse,settleDomainId);
createPaymentFundIncomeReal(user,fundHouse,settleDomainId);
redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
......@@ -2553,12 +2560,29 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
@Override
public R<Boolean> batchUpdatePaymentInfo(TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)) {
return R.failed("获取登录用户信息失败!");
}
searchVo.setCreateBy(user.getId());
List<String> list = baseMapper.getTPaymentInfoList(searchVo);
if (Common.isEmpty(list)) {
return R.failed("未找到本人创建的未标识确认无误的数据");
} else {
LambdaUpdateWrapper<TPaymentInfo> updateWrapper = new UpdateWrapper<TPaymentInfo>().lambda();
updateWrapper.set(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING).in(TPaymentInfo::getId,list);
return R.ok(this.update(updateWrapper));
}
}
@Override
public void createPaymentInfoIncome() {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.between(TPaymentInfo::getCreateTime, LocalDateTimeUtils.getThatDayStartTime(LocalDateTime.now().plusDays(-1)),
LocalDateTimeUtils.getDayStart(LocalDateTime.now()))
.eq(TPaymentInfo::getIncomeStatus,CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
if (Common.isNotNull(sumList)) {
//生成收入
......@@ -2569,8 +2593,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public void createPaymentFundIncome() {
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.between(TPaymentInfo::getCreateTime, LocalDateTimeUtils.getThatDayStartTime(LocalDateTime.now().plusDays(-1)),
LocalDateTimeUtils.getDayStart(LocalDateTime.now()))
.eq(TPaymentInfo::getIncomeStatus,CommonConstants.ONE_STRING)
.eq(TPaymentInfo::getLockStatus,CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
if (Common.isNotNull(sumList)) {
//生成公积金收入
......@@ -2578,47 +2602,79 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public void createPaymentSocialInfoReal(YifuUser user) {
public void createPaymentSocialInfoReal(YifuUser user,String socialHouse,String settleDomainId) {
//获取所有未推送的社保实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getSocialId);
if (Common.isNotNull(socialHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, socialHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
}
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper);
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo);
}
}
public void createPaymentFundInfoReal(YifuUser user) {
public void createPaymentFundInfoReal(YifuUser user,String fundHouse,String settleDomainId) {
//获取所有未推送的公积金实缴明细数据
List<TPaymentInfo> unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getFundId);
if (Common.isNotNull(fundHouse)) {
wrapper.eq(TPaymentInfo::getProvidentHousehold, fundHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
}
List<TPaymentInfo> unPushInfo = baseMapper.selectList(wrapper);
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo);
}
}
public void createPaymentInfoIncomeReal(YifuUser user) {
public void createPaymentInfoIncomeReal(YifuUser user,String socialHouse,String settleDomainId) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getSocialId));
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getSocialId);
if (Common.isNotNull(socialHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, socialHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
}
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper);
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING);
}
}
public void createPaymentFundIncomeReal(YifuUser user) {
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getCreateBy, user.getId())
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
.isNotNull(TPaymentInfo::getFundId));
public void createPaymentFundIncomeReal(YifuUser user,String fundHouse,String settleDomainId) {
LambdaQueryWrapper<TPaymentInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TPaymentInfo::getCreateBy, user.getId());
wrapper.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING);
wrapper.eq(TPaymentInfo::getLockStatus, CommonConstants.ONE_STRING);
wrapper.isNotNull(TPaymentInfo::getFundId);
if (Common.isNotNull(fundHouse)) {
wrapper.eq(TPaymentInfo::getSocialHousehold, fundHouse);
}
if (Common.isNotNull(settleDomainId)) {
wrapper.eq(TPaymentInfo::getSettleDomainId, settleDomainId);
}
List<TPaymentInfo> sumList = baseMapper.selectList(wrapper);
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING);
......@@ -2637,13 +2693,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) {
List<String> pushList = new ArrayList<>();
Map<String, Integer> map = new HashMap<>();
Map<String, String> idMap = new HashMap<>();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
for (TPaymentInfo library : unPushInfo) {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
......@@ -2873,60 +2927,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表
pushList.add(library.getId());
if (pushList.size() >= CommonConstants.FIVES_INT) {
baseMapper.updatePushStatus(pushList);
pushList.clear();
}
} else {
if (map.get(body) > 0) {
int i = map.get(body) + 1;
idMap.put(body, library.getId());
map.put(body, i);
//单个异常超过十次,保存异常内容
if (i >= 10) {
baseMapper.updatePushStatus(pushList);
for (Map.Entry<String, Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setLinkId(library.getId());
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(body, 1);
idMap.put(body, library.getId());
}
}
}
for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
//更新推送状态
if (Common.isNotNull(pushList)) {
baseMapper.updatePushStatus(pushList);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
}
}
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) {
List<String> pushList = new ArrayList<>();
Map<String, Integer> map = new HashMap<>();
Map<String, String> idMap = new HashMap<>();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
for (TPaymentInfo library : unPushInfo) {
......@@ -3051,58 +3057,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表
pushList.add(library.getId());
if (pushList.size() >= CommonConstants.FIVES_INT) {
baseMapper.updatePushStatus(pushList);
pushList.clear();
}
} else {
if (map.get(body) > 0) {
int i = map.get(body) + 1;
map.put(body, i);
idMap.put(body, library.getId());
//单个异常超过十次,保存异常内容
if (i >= 10) {
baseMapper.updatePushStatus(pushList);
for (Map.Entry<String, Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setLinkId(library.getId());
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
break;
}
} else {
map.put(body, 1);
idMap.put(body, library.getId());
}
}
}
for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(entry.getKey());
error.setNums(entry.getValue());
tSendEkpErrorService.save(error);
}
//更新推送状态
if (Common.isNotNull(pushList)) {
baseMapper.updatePushStatus(pushList);
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
}
}
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag) {
List<TIncomeDetail> detailList = new ArrayList<>();
for (TPaymentInfo paymentInfo : updateList) {
boolean exitFlag = false;
List<TIncomeDetail> exitIncome;
......@@ -3157,14 +3116,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式只有按人次和人数收费
if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), socialFundFlag, detailList);
}
} else {
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
BigDecimal gMoney;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee();
......@@ -3185,7 +3137,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (!exitFlag || isSum == 1) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag, detailList);
gMoney, socialFundFlag);
}
}
}
......@@ -3193,14 +3145,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), socialFundFlag, detailList);
}
} else {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
BigDecimal money;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee();
......@@ -3221,19 +3167,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (!exitFlag || isSum == 2) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag, detailList);
}
money, socialFundFlag);
}
}
}
}
}
incomeService.saveBathDetail(detailList);
}
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money, String sourceType,
List<TIncomeDetail> detailList) {
String charges, String feeMode, BigDecimal money, String sourceType) {
//生成收入数据
TIncomeDetail detail = new TIncomeDetail();
detail.setCreateTime(DateUtil.getCurrentDateTime());
......@@ -3262,7 +3205,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail.setMrSettleType(settleDomain.getMrSettleType());
detail.setId(CommonConstants.NULL);
detail.setRedData(CommonConstants.ZERO_STRING);
detailList.add(detail);
incomeService.saveBathDetail(detail,library);
}
public String dateStringInsert(String month) {
......
......@@ -3,13 +3,21 @@ package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
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.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,12 +39,24 @@ public class DoJointSocialTask {
@Autowired
private EkpIncomeUtil ekpIncomeUtil;
@Autowired
private EkpSocialUtil ekpSocialUtil;
@Autowired
private EkpFundUtil ekpFundUtil;
@Autowired
private TSendEkpErrorService tSendEkpErrorService;
@Autowired
private TIncomeMapper incomeMapper;
@Autowired
private TPaymentInfoMapper paymentInfoMapper;
@Autowired
private TForecastLibraryMapper forecastLibraryMapper;
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
......@@ -83,6 +103,54 @@ public class DoJointSocialTask {
log.info("推送收入到EKP结束");
}
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Date: 2022-7-8
* @return: void
**/
@Async
public void asynchronousEkpIncomePayment(TIncome income,TPaymentInfo paymentInfo) {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = this.getSendBack(income);
}
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
incomeMapper.updateById(income);
paymentInfo.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(paymentInfo);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送收入到EKP错误", e);
}
log.info("推送收入到EKP结束");
}
/**
* @param income
* @Description: 判断类型发送
......@@ -241,4 +309,176 @@ public class DoJointSocialTask {
// 薪酬申请编号
sendParam.setFd_3b3bf0e75ef6c4(income.getApplyNo()==null?"":income.getApplyNo());
}
/**
* @Description: 实缴数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public void asynchronousEkpPaymentSocial(EkpPushSocialParam socialParam, TPaymentInfo library) {
log.info("推送社保实缴费用到EKP-线程开始");
try {
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
log.info("推送社保实缴费用到EKP结束");
}
/**
* @Description: 实缴数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public void asynchronousEkpPaymentFund(EkpPushFundParam fundParam, TPaymentInfo library) {
log.info("推送公积金实缴费用到EKP-线程开始");
try {
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
log.info("公积金推送实缴费用到EKP结束");
}
/**
* @Description: 预估数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public void asynchronousEkpForecastSocial(EkpPushSocialParam socialParam, TForecastLibrary library) {
log.info("推送社保预估费用到EKP-线程开始");
try {
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
log.info("推送社保预估费用到EKP结束");
}
/**
* @Description: 预估数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public void asynchronousEkpForecastFund(EkpPushFundParam fundParam, TForecastLibrary library) {
log.info("推送公积金预估费用到EKP-线程开始");
try {
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
log.info("推送公积金预估费用到EKP结束");
}
}
......@@ -446,8 +446,8 @@
<if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if test="tPaymentInfo.createTime != null">
AND a.CREATE_TIME = #{tPaymentInfo.createTime}
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
</if>
</sql>
......@@ -537,6 +537,12 @@
<if test="tPaymentInfo.providentNo != null and tPaymentInfo.providentNo.trim() != ''">
AND a.PROVIDENT_NO = #{tPaymentInfo.providentNo}
</if>
<if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if test="tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null">
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
</if>
</if>
</sql>
......@@ -708,6 +714,17 @@
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
</select>
<!--tPaymentInfo不分页查询-->
<select id="getTPaymentInfoList" resultType="java.lang.String">
SELECT
a.ID
FROM t_payment_info a
<where>
a.LOCK_STATUS = '0' AND a.CREATE_BY = #{tPaymentInfo.createBy}
<include refid="tPaymentInfo_export_where"/>
</where>
</select>
<!--tPaymentInfo数量查询-->
<select id="selectCountTPaymentInfo" resultType="java.lang.Integer">
SELECT
......@@ -1016,43 +1033,6 @@
</if>
</select>
<!--tPaymentInfo 查询缴费库要删除的数据-->
<select id="selectListForDelete" resultType="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo">
select
<include refid="Base_Column_List"/>
from t_payment_info
<where>
1=1
<if test="queryEntity != null">
<if test="queryEntity.createUser != null and queryEntity.createUser.trim() != ''">
AND CREATE_BY = #{queryEntity.createBy}
</if>
<if test="queryEntity.socialCreateMonth != null and queryEntity.socialCreateMonth.trim() != ''">
AND SOCIAL_CREATE_MONTH = #{queryEntity.socialCreateMonth}
</if>
<if test="queryEntity.providentCreateMonth != null and queryEntity.providentCreateMonth.trim() != ''">
AND PROVIDENT_CREATE_MONTH = #{queryEntity.providentCreateMonth}
</if>
<if test="queryEntity.settleDomainId != null and queryEntity.settleDomainId.trim() != ''">
AND SETTLE_DOMAIN_ID = #{queryEntity.settleDomainId}
</if>
<if test="queryEntity.unitId != null and queryEntity.unitId.trim() != ''">
AND UNIT_ID = #{queryEntity.unitId}
</if>
<if test="queryEntity.empIdcard != null and queryEntity.empIdcard.trim() != ''">
AND EMP_IDCARD = #{queryEntity.empIdcard}
</if>
<if test="queryEntity.socialHousehold != null and queryEntity.socialHousehold.trim() != ''">
AND SOCIAL_HOUSEHOLD = #{queryEntity.socialHousehold}
</if>
<if test="queryEntity.providentHousehold != null and queryEntity.providentHousehold.trim() != ''">
AND PROVIDENT_HOUSEHOLD = #{queryEntity.providentHousehold}
</if>
AND CREATE_TIME > DATE_ADD(curdate(),interval -day(curdate())+1 day)
</if>
</where>
</select>
<!--洪光武2022-8-10 18:05:42-->
<resultMap id="tPaymentBySalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo">
<id property="id" column="ID"/>
......
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