|
|
@@ -81,72 +81,74 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
HashSet<String> hashSet = new HashSet<>();
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsBxPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
- InsImportResult insImportResult = new InsImportResult();
|
|
|
+ if(!(StringUtils.isEmpty(excelItem.getLicenseno()) && StringUtils.isEmpty(excelItem.getPolicyno())&& StringUtils.isEmpty(excelItem.getSyPolicyno()))){
|
|
|
+ InsImportResult insImportResult = new InsImportResult();
|
|
|
|
|
|
- String reason = "";
|
|
|
- i = i + 1;
|
|
|
- params.clear();
|
|
|
- if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
|
- String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
- params.put("licenseno", licenseno);
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(excelItem.getPolicyno())) {
|
|
|
- String policyno = excelItem.getPolicyno(); //交强保单号
|
|
|
- params.put("policyno", policyno);
|
|
|
- }
|
|
|
+ String reason = "";
|
|
|
+ i = i + 1;
|
|
|
+ params.clear();
|
|
|
+ if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
|
+ String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
+ params.put("licenseno", licenseno);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(excelItem.getPolicyno())) {
|
|
|
+ String policyno = excelItem.getPolicyno(); //交强保单号
|
|
|
+ params.put("policyno", policyno);
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(excelItem.getSyPolicyno())) {
|
|
|
- String syPolicyno = excelItem.getSyPolicyno(); //商业保单号
|
|
|
- params.put("syPolicyno", syPolicyno);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(excelItem.getSyPolicyno())) {
|
|
|
+ String syPolicyno = excelItem.getSyPolicyno(); //商业保单号
|
|
|
+ params.put("syPolicyno", syPolicyno);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
// 只查手续费
|
|
|
- params.put("isOther", "0");
|
|
|
- params.put("isNotCar", isNotCar);
|
|
|
- InsPlyIncome insPlyIncome = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
- if (ObjectUtils.isNotEmpty(insPlyIncome) && open) {
|
|
|
- open = false;
|
|
|
- companyId = insPlyIncome.getCompanyId(); // 保险公司id
|
|
|
- partnerCompaniesId = insPlyIncome.getPartnerCompaniesId(); //合作公司id
|
|
|
- agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
- }
|
|
|
- if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- idList.add(insPlyIncome.getId());
|
|
|
- if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
- totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
+ params.put("isOther", "0");
|
|
|
+ params.put("isNotCar", isNotCar);
|
|
|
+ InsPlyIncome insPlyIncome = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
+ if (ObjectUtils.isNotEmpty(insPlyIncome) && open) {
|
|
|
+ open = false;
|
|
|
+ companyId = insPlyIncome.getCompanyId(); // 保险公司id
|
|
|
+ partnerCompaniesId = insPlyIncome.getPartnerCompaniesId(); //合作公司id
|
|
|
+ agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
|
+ if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
+ idList.add(insPlyIncome.getId());
|
|
|
+ if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
+ }
|
|
|
|
|
|
- if (excelItem.getJqSuperviseCostsProportion() != null && excelItem.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getJqSuperviseCostsProportion().compareTo(insPlyIncome.getJqSuperviseCostsProportion()) != 0) {
|
|
|
- params.put("jqSuperviseCostsProportion", excelItem.getJqSuperviseCostsProportion());
|
|
|
- InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
- if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
- reason = "该数据交强手续费比例有问题";
|
|
|
+ if (excelItem.getJqSuperviseCostsProportion() != null && excelItem.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getJqSuperviseCostsProportion().compareTo(insPlyIncome.getJqSuperviseCostsProportion()) != 0) {
|
|
|
+ params.put("jqSuperviseCostsProportion", excelItem.getJqSuperviseCostsProportion());
|
|
|
+ InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
+ if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
+ reason = "该数据交强手续费比例有问题";
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if (excelItem.getSySuperviseCostsProportion() != null && excelItem.getSySuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getSySuperviseCostsProportion().compareTo(insPlyIncome.getSySuperviseCostsProportion()) != 0) {
|
|
|
- params.put("sySuperviseCostsProportion", excelItem.getSySuperviseCostsProportion());
|
|
|
- InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
- if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
- reason = "该数据商业手续费比例有问题";
|
|
|
+ if (excelItem.getSySuperviseCostsProportion() != null && excelItem.getSySuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getSySuperviseCostsProportion().compareTo(insPlyIncome.getSySuperviseCostsProportion()) != 0) {
|
|
|
+ params.put("sySuperviseCostsProportion", excelItem.getSySuperviseCostsProportion());
|
|
|
+ InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
+ if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
+ reason = "该数据商业手续费比例有问题";
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ reason = "查询不到该车辆";
|
|
|
}
|
|
|
- } else {
|
|
|
- reason = "查询不到该车辆";
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(reason)){
|
|
|
- insImportResult.setLicenseno(excelItem.getLicenseno());
|
|
|
- insImportResult.setPolicyno(excelItem.getPolicyno());
|
|
|
- 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("表里有不同保司机构");
|
|
|
+ if(StringUtils.isNotEmpty(reason)){
|
|
|
+ insImportResult.setLicenseno(excelItem.getLicenseno());
|
|
|
+ insImportResult.setPolicyno(excelItem.getPolicyno());
|
|
|
+ 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);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -485,64 +487,66 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(dtoList)) {
|
|
|
for (InsBxNoPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
- InsImportResult insImportResult = new InsImportResult();
|
|
|
- String reason = "";
|
|
|
- i = i + 1;
|
|
|
- params.clear();
|
|
|
- if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
|
- String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
- params.put("licenseno", licenseno);
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
|
|
|
- String noPolicyno = excelItem.getNoPolicyno(); //交强保单号
|
|
|
- params.put("noPolicyno", noPolicyno);
|
|
|
- }
|
|
|
-
|
|
|
-// 只查手续费
|
|
|
- params.put("isOther", "0");
|
|
|
- params.put("isNotCar", "1");
|
|
|
- InsPlyIncome insPlyIncome = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
- if (ObjectUtils.isNotEmpty(insPlyIncome) && open) {
|
|
|
- open = false;
|
|
|
- companyId = insPlyIncome.getCompanyId(); // 保险公司id
|
|
|
- partnerCompaniesId = insPlyIncome.getPartnerCompaniesId(); //合作公司id
|
|
|
- agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
- }
|
|
|
- if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- idList.add(insPlyIncome.getId());
|
|
|
- if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
- totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
- }
|
|
|
- if (excelItem.getNoSuperviseCostsProportion()!=null && excelItem.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getNoSuperviseCostsProportion().compareTo(insPlyIncome.getNoSuperviseCostsProportion()) != 0 ) {
|
|
|
- BigDecimal noSuperviseCostsProportion = excelItem.getNoSuperviseCostsProportion();//商业保单号
|
|
|
- params.put("noSuperviseCostsProportion", noSuperviseCostsProportion);
|
|
|
- InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
- if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
- reason = "该数据非车手续费比例有问题";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- reason = "查询不到该车辆";
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(reason)){
|
|
|
- insImportResult.setReason(reason);
|
|
|
+ if(!(StringUtils.isEmpty(excelItem.getLicenseno()) && StringUtils.isEmpty(excelItem.getNoPolicyno()))){
|
|
|
+ InsImportResult insImportResult = new InsImportResult();
|
|
|
+ String reason = "";
|
|
|
+ i = i + 1;
|
|
|
+ params.clear();
|
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
|
- insImportResult.setLicenseno(excelItem.getLicenseno());
|
|
|
+ String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
+ params.put("licenseno", licenseno);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
|
|
|
- insImportResult.setPolicyno(excelItem.getNoPolicyno());
|
|
|
+ String noPolicyno = excelItem.getNoPolicyno(); //交强保单号
|
|
|
+ params.put("noPolicyno", noPolicyno);
|
|
|
}
|
|
|
- insImportResult.setReason(reason);
|
|
|
- insImportResultsExcel.add(insImportResult);
|
|
|
|
|
|
- }else {
|
|
|
- if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
|
|
|
- hashSet.add(insPlyIncome.getPartnerCompaniesId());
|
|
|
+// 只查手续费
|
|
|
+ params.put("isOther", "0");
|
|
|
+ params.put("isNotCar", "1");
|
|
|
+ InsPlyIncome insPlyIncome = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
+ if (ObjectUtils.isNotEmpty(insPlyIncome) && open) {
|
|
|
+ open = false;
|
|
|
+ companyId = insPlyIncome.getCompanyId(); // 保险公司id
|
|
|
+ partnerCompaniesId = insPlyIncome.getPartnerCompaniesId(); //合作公司id
|
|
|
+ agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
|
- if(hashSet.size()>1){
|
|
|
- insImportResult.setReason("表里有不同保司机构");
|
|
|
+ if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
+ idList.add(insPlyIncome.getId());
|
|
|
+ if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
+ totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
+ }
|
|
|
+ if (excelItem.getNoSuperviseCostsProportion()!=null && excelItem.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getNoSuperviseCostsProportion().compareTo(insPlyIncome.getNoSuperviseCostsProportion()) != 0 ) {
|
|
|
+ BigDecimal noSuperviseCostsProportion = excelItem.getNoSuperviseCostsProportion();//商业保单号
|
|
|
+ params.put("noSuperviseCostsProportion", noSuperviseCostsProportion);
|
|
|
+ InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
|
|
|
+ if (ObjectUtils.isEmpty(byBxLicenseno)) {
|
|
|
+ reason = "该数据非车手续费比例有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ reason = "查询不到该车辆";
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(reason)){
|
|
|
+ insImportResult.setReason(reason);
|
|
|
+ if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
|
+ insImportResult.setLicenseno(excelItem.getLicenseno());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
|
|
|
+ insImportResult.setPolicyno(excelItem.getNoPolicyno());
|
|
|
+ }
|
|
|
+ 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);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|