‘linchangsheng’ 5 kuukautta sitten
vanhempi
commit
f4f948d790

+ 7 - 3
mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerWarrantyLogic.java

@@ -154,6 +154,8 @@ public class WorkerWarrantyLogic {
         //网点名称
         Map<String, User> userMap = userService.lambdaQuery()
                 .eq(User::getCompanyWechatId, adminUser.getCompanyWechatId())
+                .isNotNull(User::getMobile)
+                .ne(User::getMobile,"")
                 .list().stream().collect(Collectors.toMap(User::getMobile, Function.identity()));
 
         for (int i = 0; i < objects.size(); i++) {
@@ -218,7 +220,7 @@ public class WorkerWarrantyLogic {
                 workerWarrantyPays.addAll(workerWarrantyPays1);
 
                 if (CollectionUtils.isNotEmpty(workerWarrantyListUp))
-                    workerWarranty.setPayableAmount(workerWarrantyListUp.get(0).getPayableAmount().add(workerWarranty.getPayableAmount()));
+                    workerWarranty.setPayableAmount(workerWarrantyListUp.get(0).getPayableAmount());
                 for (WorkerWarrantyPay workerWarrantyPay : workerWarrantyPays1) {
                     workerWarranty.setPayableAmount(workerWarrantyPay.getPayAmount().add(workerWarranty.getPayableAmount()));
                 }
@@ -245,8 +247,10 @@ public class WorkerWarrantyLogic {
         List<WorkerWarrantyPay> workerWarrantyPays = new ArrayList<>();
         //默认最多10个机型
         for (int i = 0; i < 24; i++) {
-            String payAmount = (String) row.get(2 * i + 12);
-            String payAmountTime = (String) row.get(2 * i + 13);
+            if (row.size() < (2 * i + 14))
+                break;
+            String payAmount = (String) row.get(2 * i + 13);
+            String payAmountTime = (String) row.get(2 * i + 14);
 
             if (StringUtils.isBlank(payAmount)) {
                 continue;