Merge remote-tracking branch 'remotes/origin/fix/福利台账-线下对比导入分批' into release/2.9.3.2308.01

This commit is contained in:
sy 2023-08-02 15:41:33 +08:00
commit 3f10c8eb96
2 changed files with 6 additions and 3 deletions

View File

@ -129,7 +129,7 @@ public class InsuranceComparisonResultBO {
*/
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap) {
Map<String, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getWorkcode);
Map<Long, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId);
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
List<TaxAgentPO> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
@ -172,7 +172,7 @@ public class InsuranceComparisonResultBO {
map.put("otherSchemeName", schemeIdNameMap.get(accountExportPO.getOtherSchemeId()));
//线下值
List<ExcelAccountExportPO> excelResultValueList = excelResultMap.get(accountExportPO.getWorkcode());
List<ExcelAccountExportPO> excelResultValueList = excelResultMap.get(accountExportPO.getEmployeeId());
ExcelAccountExportPO excelAccountExportPO = new ExcelAccountExportPO();
if (excelResultValueList != null && excelResultValueList.size() == 1) {
excelAccountExportPO = excelResultValueList.get(0);

View File

@ -2381,7 +2381,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
getExcelInsuranceDetailMapper().batchDelByIds(idList);
}
//新增
getExcelInsuranceDetailMapper().batchSave(addCompareList);
List<List<ExcelInsuranceDetailPO>> partition = Lists.partition((List<ExcelInsuranceDetailPO>) addCompareList, 20);
partition.forEach(getExcelInsuranceDetailMapper()::batchSave);
// getExcelInsuranceDetailMapper().batchSave(addCompareList);
apidatas.put("successCount", successCount);
apidatas.put("errorCount", failCount);