Commit b304aede authored by huyuchen's avatar huyuchen

优化修改

parent b69ceeab
......@@ -923,10 +923,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(list)) {
TPaymentInfo paymentInfo;
TSocialFundInfo socialInfo;
TSocialInfo tSocialInfo;
TSocialInfo tSocialInfo = new TSocialInfo();
String temp;
int res;
List<TSocialInfo> socialist;
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -992,9 +994,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
(Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) &&
DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
tSocialInfo = socialInfo1;
break;
}
}
......@@ -1252,12 +1255,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
}
if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
}
paymentInfo = new TPaymentInfo();
paymentInfo.setLockStatus(CommonConstants.ZERO_STRING);
if (Common.isNotNull(socialInfo)) {
paymentInfo.setEmpId(socialInfo.getEmpId());
paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard());
paymentInfo.setEmpName(socialInfo.getEmpName());
......@@ -1266,14 +1272,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSettleDomainCode(socialInfo.getSettleDomainCode());
paymentInfo.setUnitId(socialInfo.getUnitId());
paymentInfo.setUnitName(socialInfo.getUnitName());
if (Common.isNotNull(tSocialInfo)) {
paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam());
paymentInfo.setEmpNo(tSocialInfo.getEmpNo());
}
paymentInfo.setSocialProvince(socialInfo.getSocialProvince());
paymentInfo.setSocialCity(socialInfo.getSocialCity());
paymentInfo.setSocialTown(socialInfo.getSocialTown());
paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName());
} else if(Common.isNotNull(tSocialInfo)){
paymentInfo.setEmpId(tSocialInfo.getEmpId());
paymentInfo.setEmpIdcard(tSocialInfo.getEmpIdcard());
paymentInfo.setEmpName(tSocialInfo.getEmpName());
paymentInfo.setSettleDomainId(tSocialInfo.getSettleDomain());
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tSocialInfo.getSettleDomain());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) {
paymentInfo.setSettleDomainName(vo.getDepartName());
paymentInfo.setSettleDomainCode(vo.getDepartNo());
paymentInfo.setUnitId(vo.getCustomerId());
paymentInfo.setUnitName(vo.getCustomerName()); }
}
}
paymentInfo.setSocialProvince(tSocialInfo.getSocialProvince());
paymentInfo.setSocialCity(tSocialInfo.getSocialCity());
paymentInfo.setSocialTown(tSocialInfo.getSocialTown());
paymentInfo.setSocialHousehold(tSocialInfo.getSocialHouseholdName());
}
if (Common.isNotNull(tSocialInfo)) {
paymentInfo.setInauguralTeam(tSocialInfo.getInauguralTeam());
paymentInfo.setEmpNo(tSocialInfo.getEmpNo());
}
paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth());
if (null != paymentInfo.getSocialProvince()) {
......@@ -1529,6 +1557,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String temp;
int res = -1;
List<TProvidentFund> fundlist;
TProvidentFund tProvidentFund = new TProvidentFund();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
//获取身份证列表
List<String> idcards = list.stream().map(TPaymentInfoVo::getEmpIdcard).collect(Collectors.toList());
......@@ -1612,9 +1643,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getFundTown().equals(providentFund.getFundTown()))) &&
DateUtil.dateToString(providentFund.getProvidentStart(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) <=0 &&
(Common.isEmpty(providentFund.getReduceHandleTime()) || (Common.isNotNull(providentFund.getReduceHandleTime()) &&
DateUtil.dateToString(providentFund.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >=0))) {
(Common.isEmpty(providentFund.getFundReduceDate()) || (Common.isNotNull(providentFund.getFundReduceDate()) &&
DateUtil.dateToString(providentFund.getFundReduceDate(),"yyyyMM").compareTo(infoVo.getProvidentPayMonth()) >=0))) {
isTrueAdder = true;
tProvidentFund = providentFund;
break;
}
}
......@@ -1650,11 +1682,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
continue;
}
TProvidentFund tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda()
if (Common.isEmpty(tProvidentFund)) {
tProvidentFund = providentFundMapper.selectOne(Wrappers.<TProvidentFund>query().lambda()
.eq(TProvidentFund::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TProvidentFund::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
}
paymentInfo = new TPaymentInfo();
paymentInfo.setLockStatus(CommonConstants.ZERO_STRING);
if (Common.isNotNull(fund)) {
paymentInfo.setEmpId(fund.getEmpId());
paymentInfo.setEmpIdcard(fund.getEmpIdcard());
paymentInfo.setEmpName(fund.getEmpName());
......@@ -1663,16 +1698,38 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setSettleDomainCode(fund.getSettleDomainCodeFund());
paymentInfo.setUnitId(fund.getUnitIdFund());
paymentInfo.setUnitName(fund.getUnitNameFund());
paymentInfo.setFundProvince(fund.getFundProvince());
paymentInfo.setFundCity(fund.getFundCity());
paymentInfo.setFundTown(fund.getFundTown());
paymentInfo.setProvidentHousehold(fund.getProvidentHouseholdName());
} else if (Common.isNotNull(tProvidentFund)) {
paymentInfo.setEmpId(tProvidentFund.getEmpId());
paymentInfo.setEmpIdcard(tProvidentFund.getEmpIdcard());
paymentInfo.setEmpName(tProvidentFund.getEmpName());
paymentInfo.setSettleDomainId(tProvidentFund.getSettleDomain());
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tProvidentFund.getSettleDomain());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) {
paymentInfo.setSettleDomainName(vo.getDepartName());
paymentInfo.setSettleDomainCode(vo.getDepartNo());
paymentInfo.setUnitId(vo.getCustomerId());
paymentInfo.setUnitName(vo.getCustomerName()); }
}
}
paymentInfo.setFundProvince(tProvidentFund.getFundProvince());
paymentInfo.setFundCity(tProvidentFund.getFundCity());
paymentInfo.setFundTown(tProvidentFund.getFundTown());
paymentInfo.setProvidentHousehold(tProvidentFund.getProvidentHouseholdName());
}
if (Common.isNotNull(tProvidentFund)) {
paymentInfo.setInauguralTeam(tProvidentFund.getInauguralTeam());
paymentInfo.setEmpNo(tProvidentFund.getEmpNo());
}
paymentInfo.setProvidentPayMonth(infoVo.getProvidentPayMonth());
paymentInfo.setFundProvince(fund.getFundProvince());
paymentInfo.setFundCity(fund.getFundCity());
paymentInfo.setFundTown(fund.getFundTown());
paymentInfo.setProvidentHousehold(fund.getProvidentHouseholdName());
if (null != paymentInfo.getFundProvince()) {
temp = areaMap.get(paymentInfo.getFundProvince());
if (Common.isNotNull(temp)) {
......@@ -2040,11 +2097,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isNotNull(list)) {
TPaymentInfo payExists;
TSocialFundInfo socialInfo = null;
TSocialInfo tSocialInfo;
TSocialInfo tSocialInfo = new TSocialInfo();
String temp;
List<TSocialInfo> socialist;
int res;
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
......@@ -2102,9 +2160,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
infoVo.getSocialTown().toString().equals(socialInfo1.getSocialTown()))) &&
DateUtil.dateToString(socialInfo1.getSocialStartDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) <=0 &&
(Common.isEmpty(socialInfo1.getReduceHandleTime()) || (Common.isNotNull(socialInfo1.getReduceHandleTime()) &&
DateUtil.dateToString(socialInfo1.getReduceHandleTime(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
(Common.isEmpty(socialInfo1.getSocialReduceDate()) || (Common.isNotNull(socialInfo1.getSocialReduceDate()) &&
DateUtil.dateToString(socialInfo1.getSocialReduceDate(),"yyyyMM").compareTo(infoVo.getSocialPayMonth()) >=0))) {
isTrueAdder = true;
tSocialInfo = socialInfo1;
break;
}
}
......@@ -2309,12 +2368,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
}
payExists = new TPaymentInfo();
payExists.setLockStatus(CommonConstants.ZERO_STRING);
if (Common.isNotNull(socialInfo)) {
payExists.setEmpId(socialInfo.getEmpId());
payExists.setEmpIdcard(socialInfo.getEmpIdcard());
payExists.setEmpName(socialInfo.getEmpName());
......@@ -2323,16 +2385,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setSettleDomainCode(socialInfo.getSettleDomainCode());
payExists.setUnitId(socialInfo.getUnitId());
payExists.setUnitName(socialInfo.getUnitName());
if (Common.isNotNull(tSocialInfo)) {
payExists.setInauguralTeam(tSocialInfo.getInauguralTeam());
payExists.setEmpNo(tSocialInfo.getEmpNo());
}
payExists.setSocialProvince(socialInfo.getSocialProvince());
payExists.setSocialCity(socialInfo.getSocialCity());
payExists.setSocialTown(socialInfo.getSocialTown());
payExists.setSocialHousehold(socialInfo.getSocialHouseholdName());
}else if (Common.isNotNull(tSocialInfo)) {
payExists.setEmpId(tSocialInfo.getEmpId());
payExists.setEmpIdcard(tSocialInfo.getEmpIdcard());
payExists.setEmpName(tSocialInfo.getEmpName());
payExists.setSettleDomainId(tSocialInfo.getSettleDomain());
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(tSocialInfo.getSettleDomain());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) {
payExists.setSettleDomainName(vo.getDepartName());
payExists.setSettleDomainCode(vo.getDepartNo());
payExists.setUnitId(vo.getCustomerId());
payExists.setUnitName(vo.getCustomerName()); }
}
}
payExists.setSocialProvince(tSocialInfo.getSocialProvince());
payExists.setSocialCity(tSocialInfo.getSocialCity());
payExists.setSocialTown(tSocialInfo.getSocialTown());
payExists.setSocialHousehold(tSocialInfo.getSocialHouseholdName());
}
if (Common.isNotNull(tSocialInfo)) {
payExists.setInauguralTeam(tSocialInfo.getInauguralTeam());
payExists.setEmpNo(tSocialInfo.getEmpNo());
}
payExists.setSocialPayMonth(infoVo.getSocialPayMonth());
if (null != payExists.getSocialProvince()) {
......
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