Commit 13d83b68 authored by huyuchen's avatar huyuchen

huych-实缴导入逻辑修改

parent 9e5fc81d
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
package com.yifu.cloud.plus.v1.yifu.common.core.constant; package com.yifu.cloud.plus.v1.yifu.common.core.constant;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* @author lengleng * @author lengleng
...@@ -622,4 +625,8 @@ public interface CommonConstants { ...@@ -622,4 +625,8 @@ public interface CommonConstants {
Integer TEN_INTEGER = 10; Integer TEN_INTEGER = 10;
Integer ELEVEN_INTEGER =11; Integer ELEVEN_INTEGER =11;
List<String> socialStatus = Stream.of("3","4","6","7","9","11","12").collect(Collectors.toList());
List<String> socialInfoStatus = Stream.of("1","5","7").collect(Collectors.toList());
} }
...@@ -1154,8 +1154,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1154,8 +1154,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TSocialInfo> socialist; List<TSocialInfo> socialist;
TSettleDomain domain; TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus,CommonConstants.socialStatus));
//已存在的社保数据 //已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>(); HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
...@@ -1214,12 +1216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1214,12 +1216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince()) .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity()) .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity())
.and(obj -> obj.eq(TSocialInfo::getHandleStatus, CommonConstants.ONE_STRING) .in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.FIVE_STRING)
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.SEVEN_STRING)
)
); );
if (CollectionUtils.isNotEmpty(socialist)) { if (CollectionUtils.isNotEmpty(socialist)) {
for (TSocialInfo socialInfo1 : socialist) { for (TSocialInfo socialInfo1 : socialist) {
...@@ -1492,6 +1489,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1492,6 +1489,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) { if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
} }
...@@ -2827,7 +2825,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2827,7 +2825,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomain domain; TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus,CommonConstants.socialStatus));
//已存在的社保数据 //已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>(); HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
...@@ -2882,12 +2881,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2882,12 +2881,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString()) .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()) .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())
.and(obj -> obj.eq(TSocialInfo::getHandleStatus, CommonConstants.ONE_STRING) .in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.FIVE_STRING)
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.SEVEN_STRING)
)
); );
if (CollectionUtils.isNotEmpty(socialist)) { if (CollectionUtils.isNotEmpty(socialist)) {
for (TSocialInfo socialInfo1 : socialist) { for (TSocialInfo socialInfo1 : socialist) {
...@@ -3107,6 +3101,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3107,6 +3101,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) { if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
} }
...@@ -3300,7 +3295,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3300,7 +3295,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomain domain; TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda() List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))); .in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus, CommonConstants.socialStatus));
//已存在的社保数据 //已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>(); HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
...@@ -3357,12 +3353,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3357,12 +3353,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString()) .eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()) .eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())
.and(obj -> obj.eq(TSocialInfo::getHandleStatus, CommonConstants.ONE_STRING) .in(TSocialInfo::getHandleStatus, CommonConstants.socialInfoStatus));
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.FIVE_STRING)
.or()
.eq(TSocialInfo::getHandleStatus, CommonConstants.SEVEN_STRING)
));
if (CollectionUtils.isNotEmpty(socialist)) { if (CollectionUtils.isNotEmpty(socialist)) {
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()) &&
...@@ -3389,6 +3380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3389,6 +3380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) { if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda() tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime) .eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus, CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
} }
......
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