Sfoglia il codice sorgente

导出错误项去掉需求单号换成身份证号码

LiFei 4 anni fa
parent
commit
b7208a9632

+ 18 - 18
happy-boot-module-flexjob/src/main/java/org/jeecg/modules/hwpayment/service/impl/HwPaymentDetailServiceImpl.java

@@ -219,6 +219,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
 
             //循环遍历排查错误数据
             for (int j = 0; j < hwPaymentDetailList.size(); j++) {
+                String idcardNumber = hwPaymentDetailList.get(j).getIdcardNumber();  //身份证号
                 boolean bo = false;
                 String requirementId = hwPaymentDetailList.get(j).getRequirementId();   //需求编号
                 Map map = new HashMap();//存放错误行数和错误原因
@@ -228,7 +229,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                         if (hwPaymentDetailList.get(j).getId().equals(list1.get(i).getId())) {
                             bo = true;
                             map.put("id", list1.get(i).getId());
-                            map.put("requirementId", requirementId);
+                            map.put("idcardNumber", idcardNumber);
                             map.put("reason", "身份证与excel中前面的数据重复");
                             resultlist.add(map);
                             break;
@@ -244,7 +245,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                         if (hwPaymentDetailList.get(j).getId().equals(list3.get(i).getId())) {
                             bo = true;
                             map.put("id", list3.get(i).getId());
-                            map.put("requirementId", requirementId);
+                            map.put("idcardNumber", idcardNumber);
                             map.put("reason", "银行卡号与excel中前面的数据重复");
                             resultlist.add(map);
                             break;
@@ -255,7 +256,6 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                     continue;
                 }
                 String name = hwPaymentDetailList.get(j).getName();//姓名
-                String idcardNumber = hwPaymentDetailList.get(j).getIdcardNumber();  //身份证号
                 String cardNumber = hwPaymentDetailList.get(j).getCardNumber();   //银行卡号
                 String payment = hwPaymentDetailList.get(j).getPayment();  //金额
                 String bnkflg = hwPaymentDetailList.get(j).getBnkflg();   //是否招商银行卡
@@ -274,14 +274,14 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                         hwPaymentDetailList.get(j).setOrderId(hwOrderList.get(0).getOrderNumber());
                         if (hwOrderList.get(0).getStatus() != 2) {
                             map.put("id", j + 9);
-                            map.put("requirementId", requirementId);
-                            map.put("reason", "订单不是服务中");
+                            map.put("idcardNumber", idcardNumber);
+                            map.put("reason", "订单未电签");
                             resultlist.add(map);
                             continue;
                         }
                     } else {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "订单不存在");
                         resultlist.add(map);
                         continue;
@@ -289,14 +289,14 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                 }
                 if (StringUtils.isBlank(name)) {
                     map.put("id", j + 9);
-                    map.put("requirementId", requirementId);
+                    map.put("idcardNumber", idcardNumber);
                     map.put("reason", "姓名未填写");
                     resultlist.add(map);
                     continue;
                 }
                 if (StringUtils.isBlank(idcardNumber)) {
                     map.put("id", j + 9);
-                    map.put("requirementId", requirementId);
+                    map.put("idcardNumber", idcardNumber);
                     map.put("reason", "身份证号未填写");
                     resultlist.add(map);
                     continue;
@@ -305,7 +305,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                             "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
                     if (!Pattern.matches(regex, idcardNumber)) {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "身份证号无效");
                         resultlist.add(map);
                         continue;
@@ -313,7 +313,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                 }
                 if (StringUtils.isBlank(cardNumber)) {
                     map.put("id", j + 9);
-                    map.put("requirementId", requirementId);
+                    map.put("idcardNumber", idcardNumber);
                     map.put("reason", "银行卡号未填写");
                     resultlist.add(map);
                     continue;
@@ -321,7 +321,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                     String regex = "[0-9]*";
                     if (!Pattern.matches(regex, cardNumber)) {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "银行卡号无效");
                         resultlist.add(map);
                         continue;
@@ -330,7 +330,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                     List<HwUser> hwUserList = hwUserService.findHwuser1(null, idcardNumber, null);
                     if (hwUserList.size() == 0) {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "用户信息与已有信息不匹配");
                         resultlist.add(map);
                         continue;
@@ -340,7 +340,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                 }
                 if (StringUtils.isBlank(payment)) {
                     map.put("id", j + 9);
-                    map.put("requirementId", requirementId);
+                    map.put("idcardNumber", idcardNumber);
                     map.put("reason", "金额未填写");
                     resultlist.add(map);
                     continue;
@@ -349,7 +349,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                     Matcher match = pattern.matcher(payment);
                     if (!match.matches()) {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "金额格式错误");
                         resultlist.add(map);
                         continue;
@@ -362,21 +362,21 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                 } else if ("N".equals(bnkflg)) {
                     if (StringUtils.isBlank(eacbnk) || StringUtils.isBlank(rcveaa)) {
                         map.put("id", j + 9);
-                        map.put("requirementId", requirementId);
+                        map.put("idcardNumber", idcardNumber);
                         map.put("reason", "开户行或开户地未填写");
                         resultlist.add(map);
                         continue;
                     } else {
                         if (eacbnk.getBytes("UTF-8").length > 62) {
                             map.put("id", j + 9);
-                            map.put("requirementId", requirementId);
+                            map.put("idcardNumber", idcardNumber);
                             map.put("reason", "开户行字符串长度过长");
                             resultlist.add(map);
                             continue;
                         }
                         if (rcveaa.getBytes("UTF-8").length > 120) {
                             map.put("id", j + 9);
-                            map.put("requirementId", requirementId);
+                            map.put("idcardNumber", idcardNumber);
                             map.put("reason", "开户地字符串长度过长");
                             resultlist.add(map);
                             continue;
@@ -384,7 +384,7 @@ public class HwPaymentDetailServiceImpl extends ServiceImpl<HwPaymentDetailMappe
                     }
                 } else {
                     map.put("id", j + 9);
-                    map.put("requirementId", requirementId);
+                    map.put("idcardNumber", idcardNumber);
                     map.put("reason", "是否招商银行卡填Y或N");
                     resultlist.add(map);
                     continue;