|
|
@@ -36,6 +36,7 @@ import java.nio.file.Paths;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
@@ -73,10 +74,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
ImportResult importResult = new ImportResult();
|
|
|
importResult.setId(taskId);
|
|
|
importResult.setStatus("ready");
|
|
|
+ importResult.setHandStatus("0");
|
|
|
importResult.setCreateTime(LocalDateTime.now());
|
|
|
importResult.setCreatedAt(LocalDateTime.now());
|
|
|
baseMapper.insert(importResult);
|
|
|
-
|
|
|
+ HashSet<String> hashSet = new HashSet<>();
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsBxPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
@@ -166,6 +168,14 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
insImportResult.setSyPolicyno(excelItem.getSyPolicyno());
|
|
|
insImportResult.setReason(reason);
|
|
|
insImportResultsExcel.add(insImportResult);
|
|
|
+ }else {
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
|
|
|
+ hashSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+ }
|
|
|
+ if(hashSet.size()>1){
|
|
|
+ insImportResult.setReason("表里有不同保司机构");
|
|
|
+ insImportResultsExcel.add(insImportResult);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -193,7 +203,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setHandStatus("0");
|
|
|
baseMapper.updateById(endTask);
|
|
|
}
|
|
|
|
|
|
@@ -240,9 +249,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
ImportResult importResult = new ImportResult();
|
|
|
importResult.setId(taskId);
|
|
|
importResult.setStatus("ready");
|
|
|
+ importResult.setHandStatus("2");
|
|
|
importResult.setCreateTime(LocalDateTime.now());
|
|
|
importResult.setCreatedAt(LocalDateTime.now());
|
|
|
baseMapper.insert(importResult);
|
|
|
+ HashSet<String> hashSet = new HashSet<>();
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsBxOtherExcelDto excelItem : dtoList) {
|
|
|
@@ -315,8 +326,14 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
if (StringUtils.isNotEmpty(excelItem.getSyPolicyno())) {
|
|
|
insImportResult.setSyPolicyno(excelItem.getSyPolicyno());
|
|
|
}
|
|
|
- insImportResult.setReason(reason);
|
|
|
- insImportResultsExcel.add(insImportResult);
|
|
|
+ }else {
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
|
|
|
+ hashSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+ }
|
|
|
+ if(hashSet.size()>1){
|
|
|
+ insImportResult.setReason("表里有不同保司机构");
|
|
|
+ insImportResultsExcel.add(insImportResult);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -345,7 +362,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setHandStatus("2");
|
|
|
baseMapper.updateById(endTask);
|
|
|
}
|
|
|
|
|
|
@@ -367,10 +383,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
ImportResult importResult = new ImportResult();
|
|
|
importResult.setId(taskId);
|
|
|
importResult.setStatus("ready");
|
|
|
+ importResult.setHandStatus("3");
|
|
|
importResult.setCreateTime(LocalDateTime.now());
|
|
|
importResult.setCreatedAt(LocalDateTime.now());
|
|
|
baseMapper.insert(importResult);
|
|
|
|
|
|
+ HashSet<String> hashSet = new HashSet<>();
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsNoBxOtherExcelDto excelItem : dtoList) {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
@@ -423,7 +441,14 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
|
|
|
insImportResult.setPolicyno(excelItem.getNoPolicyno());
|
|
|
}
|
|
|
- insImportResultsExcel.add(insImportResult);
|
|
|
+ }else {
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
|
|
|
+ hashSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+ }
|
|
|
+ if(hashSet.size()>1){
|
|
|
+ insImportResult.setReason("表里有不同保司机构");
|
|
|
+ insImportResultsExcel.add(insImportResult);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -452,7 +477,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setHandStatus("3");
|
|
|
baseMapper.updateById(endTask);
|
|
|
|
|
|
}
|
|
|
@@ -475,9 +499,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
ImportResult importResult = new ImportResult();
|
|
|
importResult.setId(taskId);
|
|
|
importResult.setStatus("ready");
|
|
|
+ importResult.setHandStatus("1");
|
|
|
importResult.setCreateTime(LocalDateTime.now());
|
|
|
importResult.setCreatedAt(LocalDateTime.now());
|
|
|
baseMapper.insert(importResult);
|
|
|
+ HashSet<String> hashSet = new HashSet<>();
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsBxNoPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
@@ -529,8 +555,15 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
|
|
|
insImportResult.setPolicyno(excelItem.getNoPolicyno());
|
|
|
}
|
|
|
- insImportResultsExcel.add(insImportResult);
|
|
|
|
|
|
+ }else {
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
|
|
|
+ hashSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+ }
|
|
|
+ if(hashSet.size()>1){
|
|
|
+ insImportResult.setReason("表里有不同保司机构");
|
|
|
+ insImportResultsExcel.add(insImportResult);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -559,7 +592,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setHandStatus("1");
|
|
|
baseMapper.updateById(endTask);
|
|
|
}
|
|
|
|