Commit 67b786f1 authored by huyuchen's avatar huyuchen

缴费库 代码修改

parent a4cc521f
...@@ -110,10 +110,9 @@ public class TPaymentInfoController { ...@@ -110,10 +110,9 @@ public class TPaymentInfoController {
* @param ids * @param ids
* @return R * @return R
*/ */
@Operation(summary = "通过ids删除缴费库", description = "通过ids删除缴费库:hasPermission('social_tpaymentinfo_del')") @Operation(summary = "通过ids删除缴费库", description = "通过ids删除缴费库")
@SysLog("删除缴费库") @SysLog("删除缴费库")
@DeleteMapping("/removeBatchByIds") @DeleteMapping("/removeBatchByIds")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_del')")
public R<Boolean> removeBatchByIds(String ids) { public R<Boolean> removeBatchByIds(String ids) {
return tPaymentInfoService.removeAllInfoById(ids); return tPaymentInfoService.removeAllInfoById(ids);
} }
...@@ -198,10 +197,9 @@ public class TPaymentInfoController { ...@@ -198,10 +197,9 @@ public class TPaymentInfoController {
* @param socialPayMonth 缴纳月份 * @param socialPayMonth 缴纳月份
* @return R * @return R
*/ */
@Operation(description = "根据条件批量删除 hasPermission('social_tpaymentinfo_del')") @Operation(description = "根据条件批量删除")
@SysLog("根据条件批量删除") @SysLog("根据条件批量删除")
@PostMapping("/removeBatchByIdsAndType") @PostMapping("/removeBatchByIdsAndType")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_del')")
public R removeBatchByIdsAndType(@RequestParam(name = "empIdCard", required = false) String empIdCard, public R removeBatchByIdsAndType(@RequestParam(name = "empIdCard", required = false) String empIdCard,
@RequestParam(name = "socialHouseId", required = false) String socialHouseId, @RequestParam(name = "socialHouseId", required = false) String socialHouseId,
@RequestParam(name = "fundHouseId", required = false) String fundHouseId, @RequestParam(name = "fundHouseId", required = false) String fundHouseId,
......
...@@ -22,13 +22,15 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; ...@@ -22,13 +22,15 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
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.Dept;
import com.yifu.cloud.plus.v1.yifu.social.concurrent.threadpool.YFSocialImportThreadPoolExecutor; import com.yifu.cloud.plus.v1.yifu.social.concurrent.threadpool.YFSocialImportThreadPoolExecutor;
import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
...@@ -107,6 +109,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -107,6 +109,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private final int partSize = 30; private final int partSize = 30;
@Autowired
private ArchivesDaprUtil archivesDaprUtil;
/** /**
* 缴费库简单分页查询 * 缴费库简单分页查询
* *
...@@ -710,6 +715,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -710,6 +715,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String[] areaArray; String[] areaArray;
String checkRes; String checkRes;
Map<String,String> cusMap = new HashMap<>();
Map<String,String> itemMap = new HashMap<>();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
listVo = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
}
}
if(CollectionUtils.isNotEmpty(settleDomainR)){
for (TSettleDomainSelectVo tSettleDomainSelectVo : settleDomainR) {
cusMap.put(tSettleDomainSelectVo.getCustomerId(), tSettleDomainSelectVo.getCustomerName());
itemMap.put(tSettleDomainSelectVo.getId(), tSettleDomainSelectVo.getDepartName());
}
}
for (TPaymentInfoVo infoVo : list) { for (TPaymentInfoVo infoVo : list) {
atomicLine.incrementAndGet(); atomicLine.incrementAndGet();
++i; ++i;
...@@ -967,8 +990,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -967,8 +990,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard()); paymentInfo.setEmpIdcard(socialInfo.getEmpIdcard());
paymentInfo.setEmpName(socialInfo.getEmpName()); paymentInfo.setEmpName(socialInfo.getEmpName());
paymentInfo.setEmpNo(socialInfo.getEmpNo()); paymentInfo.setEmpNo(socialInfo.getEmpNo());
paymentInfo.setSettleDomainId(socialInfo.getSettleDomain()); if (Common.isNotNull(itemMap) && Common.isNotNull(cusMap)) {
paymentInfo.setUnitId(socialInfo.getBelongUnit()); paymentInfo.setSettleDomainId(itemMap.get(socialInfo.getSettleDomain()));
paymentInfo.setUnitId(cusMap.get(socialInfo.getBelongUnit()));
}
paymentInfo.setInauguralTeam(socialInfo.getInauguralTeam()); paymentInfo.setInauguralTeam(socialInfo.getInauguralTeam());
paymentInfo.setTelecomNumber(socialInfo.getTelecomNumber()); paymentInfo.setTelecomNumber(socialInfo.getTelecomNumber());
...@@ -977,7 +1002,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -977,7 +1002,8 @@ 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.getSocialHousehold());
paymentInfo.setSocialHousehold(socialInfo.getSocialHouseholdName());
paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth()); paymentInfo.setSocialPayMonth(infoVo.getSocialPayMonth());
// 同时设置公积金缴纳日期方便导入处理 // 同时设置公积金缴纳日期方便导入处理
paymentInfo.setProvidentPayMonth(infoVo.getSocialPayMonth()); paymentInfo.setProvidentPayMonth(infoVo.getSocialPayMonth());
...@@ -1073,6 +1099,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1073,6 +1099,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
logList.add(new TPaymentInfoImportLog(null, infoVo.getEmpName(), infoVo.getEmpIdcard() logList.add(new TPaymentInfoImportLog(null, infoVo.getEmpName(), infoVo.getEmpIdcard()
, CommonConstants.SUCCESS_MSG_PREFIX + "保存成功!", i, random)); , CommonConstants.SUCCESS_MSG_PREFIX + "保存成功!", i, random));
} }
itemMap.clear();
cusMap.clear();
} else { } else {
return null; return null;
} }
...@@ -1389,8 +1417,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1389,8 +1417,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
String[] areaArray = null; String[] areaArray = null;
List<TPaymentInfo> paymentInfoListTemp = null;
BigDecimal cTemp; Map<String,String> cusMap = new HashMap<>();
Map<String,String> itemMap = new HashMap<>();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
listVo = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
}
}
if(CollectionUtils.isNotEmpty(settleDomainR)){
for (TSettleDomainSelectVo tSettleDomainSelectVo : settleDomainR) {
cusMap.put(tSettleDomainSelectVo.getCustomerId(), tSettleDomainSelectVo.getCustomerName());
itemMap.put(tSettleDomainSelectVo.getId(), tSettleDomainSelectVo.getDepartName());
}
}
for (TPaymentInfoVo infoVo : list) { for (TPaymentInfoVo infoVo : list) {
if (Common.isNotNull(infoVo.getEmpIdcard())) { if (Common.isNotNull(infoVo.getEmpIdcard())) {
infoVo.setEmpIdcard(infoVo.getEmpIdcard().replace("x", "X")); infoVo.setEmpIdcard(infoVo.getEmpIdcard().replace("x", "X"));
...@@ -1515,8 +1559,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1515,8 +1559,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setEmpIdcard(fund.getEmpIdcard()); paymentInfo.setEmpIdcard(fund.getEmpIdcard());
paymentInfo.setEmpName(fund.getEmpName()); paymentInfo.setEmpName(fund.getEmpName());
paymentInfo.setEmpNo(fund.getEmpNo()); paymentInfo.setEmpNo(fund.getEmpNo());
paymentInfo.setSettleDomainId(fund.getSettleDomain()); if (Common.isNotNull(itemMap) && Common.isNotNull(cusMap)) {
paymentInfo.setUnitId(fund.getBelongUnit()); paymentInfo.setSettleDomainId(itemMap.get(fund.getSettleDomain()));
paymentInfo.setUnitId(cusMap.get(fund.getBelongUnit()));
}
paymentInfo.setInauguralTeam(fund.getInauguralTeam()); paymentInfo.setInauguralTeam(fund.getInauguralTeam());
paymentInfo.setTelecomNumber(fund.getTelecomNumber()); paymentInfo.setTelecomNumber(fund.getTelecomNumber());
} }
...@@ -1526,7 +1572,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1526,7 +1572,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo.setFundProvince(fund.getFundProvince()); paymentInfo.setFundProvince(fund.getFundProvince());
paymentInfo.setFundCity(fund.getFundCity()); paymentInfo.setFundCity(fund.getFundCity());
paymentInfo.setFundTown(fund.getFundTown()); paymentInfo.setFundTown(fund.getFundTown());
paymentInfo.setProvidentHousehold(fund.getProvidentHousehold()); paymentInfo.setProvidentHousehold(fund.getProvidentHouseholdName());
if (null != paymentInfo.getFundProvince()) { if (null != paymentInfo.getFundProvince()) {
temp = areaMap.get(paymentInfo.getFundProvince()); temp = areaMap.get(paymentInfo.getFundProvince());
if (Common.isNotNull(temp)) { if (Common.isNotNull(temp)) {
...@@ -1588,6 +1634,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1588,6 +1634,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
itemMap.clear();
cusMap.clear();
} else { } else {
errorMessageList.add(new ErrorMessage(-1, "无数据可导入!")); errorMessageList.add(new ErrorMessage(-1, "无数据可导入!"));
} }
...@@ -1916,6 +1964,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1916,6 +1964,24 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String[] areaArray; String[] areaArray;
String checkRes; String checkRes;
Map<String,String> cusMap = new HashMap<>();
Map<String,String> itemMap = new HashMap<>();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
listVo = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
}
}
if(CollectionUtils.isNotEmpty(settleDomainR)){
for (TSettleDomainSelectVo tSettleDomainSelectVo : settleDomainR) {
cusMap.put(tSettleDomainSelectVo.getCustomerId(), tSettleDomainSelectVo.getCustomerName());
itemMap.put(tSettleDomainSelectVo.getId(), tSettleDomainSelectVo.getDepartName());
}
}
for (TPaymentHeFeiVo infoVo : list) { for (TPaymentHeFeiVo infoVo : list) {
atomicLine.incrementAndGet(); atomicLine.incrementAndGet();
++i; ++i;
...@@ -2110,8 +2176,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2110,8 +2176,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
payExists.setEmpIdcard(socialInfo.getEmpIdcard()); payExists.setEmpIdcard(socialInfo.getEmpIdcard());
payExists.setEmpName(socialInfo.getEmpName()); payExists.setEmpName(socialInfo.getEmpName());
payExists.setEmpNo(socialInfo.getEmpNo()); payExists.setEmpNo(socialInfo.getEmpNo());
payExists.setSettleDomainId(socialInfo.getSettleDomain()); if (Common.isNotNull(itemMap) && Common.isNotNull(cusMap)) {
payExists.setUnitId(socialInfo.getBelongUnit()); payExists.setSettleDomainId(itemMap.get(socialInfo.getSettleDomain()));
payExists.setUnitId(cusMap.get(socialInfo.getBelongUnit()));
}
payExists.setInauguralTeam(socialInfo.getInauguralTeam()); payExists.setInauguralTeam(socialInfo.getInauguralTeam());
payExists.setTelecomNumber(socialInfo.getTelecomNumber()); payExists.setTelecomNumber(socialInfo.getTelecomNumber());
} }
...@@ -2119,7 +2187,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2119,7 +2187,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.getSocialHousehold()); payExists.setSocialHousehold(socialInfo.getSocialHouseholdName());
payExists.setSocialPayMonth(infoVo.getSocialPayMonth()); payExists.setSocialPayMonth(infoVo.getSocialPayMonth());
// 同时设置公积金缴纳日期方便导入处理 // 同时设置公积金缴纳日期方便导入处理
payExists.setProvidentPayMonth(infoVo.getSocialPayMonth()); payExists.setProvidentPayMonth(infoVo.getSocialPayMonth());
...@@ -2229,6 +2297,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2229,6 +2297,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
logList.add(new TPaymentInfoImportLog(null, infoVo.getEmpName(), infoVo.getEmpIdcard() logList.add(new TPaymentInfoImportLog(null, infoVo.getEmpName(), infoVo.getEmpIdcard()
, CommonConstants.SUCCESS_MSG_PREFIX + "保存成功!", i, random)); , CommonConstants.SUCCESS_MSG_PREFIX + "保存成功!", i, random));
} }
itemMap.clear();
cusMap.clear();
} else { } else {
return null; return 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