zhangyuewww 1 year ago
parent
commit
ffee191f34
13 changed files with 71 additions and 73 deletions
  1. 6 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/BiInfoController.java
  2. 7 4
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CacheComponent.java
  3. 3 5
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java
  4. 3 3
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ExpenseInfoServiceImpl.java
  5. 2 2
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/InOutWarehouseTaskServiceImpl.java
  6. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchasePriceServiceImpl.java
  7. 6 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/QualityInspectionManagementServiceImpl.java
  8. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java
  9. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java
  10. 6 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java
  11. 6 6
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java
  12. 3 3
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousingOrderServiceImpl.java
  13. 26 29
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java

+ 6 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/BiInfoController.java

@@ -83,12 +83,12 @@ public class BiInfoController {
 
     //清理所有Redis缓存
     @GetMapping("/clearCache")
-    public void clearCache() {
-        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_BI_INFO);
+    public void clearCache(String compId) {
+        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,compId);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,compId);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,compId);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,compId);
+        cacheComponent.delPrefixKey(Const.ADMIN_BI_INFO,compId);
     }
 
     /**

+ 7 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CacheComponent.java

@@ -160,12 +160,15 @@ public class CacheComponent {
      * @param prefix
      * @return
      */
-    public Set<String> getPrefixKeySet(String prefix) {
-        return stringRedisTemplate.keys(prefix + "*");
+    public Set<String> getPrefixKeySet(String prefix,String compId) {
+        return stringRedisTemplate.keys(prefix + "*" +compId +"*");
     }
 
-    public void delPrefixKey(String prefix) {
-        Set<String> prefixKeySet = getPrefixKeySet(prefix);
+    public void delPrefixKey(String prefix,String compId) {
+        if (StringUtils.isEmpty(compId)){
+            compId="";
+        }
+        Set<String> prefixKeySet = getPrefixKeySet(prefix,compId);
         for (String key : prefixKeySet) {
             stringRedisTemplate.delete(key);
         }

+ 3 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -459,7 +459,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
 
         boolean two = contractGoodsInfoService.insert(contractGoodsInfo);
         boolean three = contractProcessInfoService.insert(contractProcessInfo);
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,contractManagementInfo.getCompId());
         // 假如 都成功返回ok
         if (one && two && three) {
             // 插入操作历史
@@ -1414,10 +1414,9 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
             this.billOperateHisService.saveBillOperateHis(contractManagementInfo.getId(), NumberConstant.CONSTANT_CONTRACT, staffName, null,
                     contractManagementInfo.getStatus(), null, "");
 
-            cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
+            cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,contractManagementInfo.getCompId());
             return "OK";
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
         return "NG";
     }
 
@@ -2278,9 +2277,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
 
                 }
             }
-
+            cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,contractManagementInfo.getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
 
     }
 

+ 3 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ExpenseInfoServiceImpl.java

@@ -389,8 +389,8 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
             // 先删除任务
             noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "FEIYONGGUANLI-APPROVE",
                     expenseInfo.getId(), null);
+            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,expenseInfo.getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
     }
 
     @Override
@@ -549,7 +549,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
             commonBillOperateHisService.create(commonBillOperateHis);
 
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
+        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,expenseInfo.getCompId());
         if (flag == 1) {
             return "合同请款金额超出总粮款!";
         }
@@ -968,7 +968,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
 //            commonBillOperateHisService.create(commonBillOperateHis);
 //        }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
+        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,expenseInfo1.getCompId());
         if (flag == 1) {
             return "合同请款金额超出总粮款!";
         }

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/InOutWarehouseTaskServiceImpl.java

@@ -341,7 +341,7 @@ public class InOutWarehouseTaskServiceImpl extends ServiceImpl<InOutWarehouseTas
             noticeTaskService.createNoticeTask(staffIds,
                     null, taskInfo);
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,inOutWarehouseTask.getCompId());
         return inOutWarehouseTask.getId();
     }
 
@@ -482,8 +482,8 @@ public class InOutWarehouseTaskServiceImpl extends ServiceImpl<InOutWarehouseTas
                     }
                 }
             }
+            cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,inOutWarehouseTask.getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
     }
 
     /**

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchasePriceServiceImpl.java

@@ -331,7 +331,7 @@ public class PurchasePriceServiceImpl extends ServiceImpl<PurchasePriceMapper, P
             warehouseBaseInfo.setAllowEdit("1");
             warehouseBaseInfoService.updateById(warehouseBaseInfo);
         }
-        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo.getCompId());
         return "ok";
     }
 

+ 6 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/QualityInspectionManagementServiceImpl.java

@@ -351,8 +351,8 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
             }
         }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,qualityInspectionManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,qualityInspectionManagement1.getCompId());
         //成功返回ok
         if (one ) {
             return "OK";
@@ -545,8 +545,8 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
         boolean two=weighingManagementService.insert(weighingManagement);
         boolean one=this.insert(qualityInspectionManagement);
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,qualityInspectionManagement.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,qualityInspectionManagement.getCompId());
         //成功返回ok
         if (one &&two ) {
             return qualityInspectionManagement.getId();
@@ -739,8 +739,8 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
             paymentManagementService.insert(paymentManagement);
             this.insert(qualityInspectionManagement1);
             weighingManagementService.insert(weighingManagement);
-            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,qualityInspectionManagement1.getCompId());
+            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,qualityInspectionManagement1.getCompId());
         }
         return "ok";
     }

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -912,7 +912,7 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
 //                }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
         return tranProcessInfo.getId();
     }
 

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java

@@ -784,8 +784,8 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
             JSONObject jsonObject = (JSONObject) JSONObject.toJSON(expenseInfo);
             commonBillOperateHis.setBusinessHistory(jsonObject.toJSONString());
             commonBillOperateHisService.create(commonBillOperateHis);
+            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,tranSettlementReportList.get(0).getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
 //        batchReviewInfo.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
 //        batchReviewInfoService.insert(batchReviewInfo);
 //        boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(batchReviewInfo.getWorkflowId());

+ 6 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -488,7 +488,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         }
         boolean one = this.insert(warehouseBaseInfo);
         boolean two = warehousePositionInfoService.insertBatch(warehousePositionInfoList);
-        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo.getCompId());
         // 假如 都成功返回ok
         if (one && two) {
             return "OK";
@@ -545,7 +545,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             throw new YException(YExceptionEnum.WAREHOUSE_NAME_ERROR);
         }
         this.insert(warehouseBaseInfo);
-        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+        cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo.getCompId());
         return warehouseBaseInfo.getId();
     }
 
@@ -560,20 +560,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         String otherPhone = warehouseBaseInfo.getOtherPersonPhone();
         if (personPhone != null) {
             if (!personPhone.equals(warehouseBaseInfo1.getPersonPhone())) {
-                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo1.getCompId());
             }
         } else {
             if (warehouseBaseInfo1.getPersonPhone() != null) {
-                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo1.getCompId());
             }
         }
         if (otherPhone != null) {
             if (!otherPhone.equals(warehouseBaseInfo1.getOtherPersonPhone())) {
-                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo1.getCompId());
             }
         } else {
             if (warehouseBaseInfo1.getOtherPersonPhone() != null) {
-                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehouseBaseInfo1.getCompId());
             }
         }
         this.updateById(warehouseBaseInfo);

+ 6 - 6
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -2363,9 +2363,9 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                 }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,warehouseBaseInfo.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,warehouseBaseInfo.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,warehouseBaseInfo.getCompId());
         return warehouseInOutInfo.getId();
     }
 
@@ -5470,9 +5470,9 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                 }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO,warehouseBaseInfo.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,warehouseBaseInfo.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,warehouseBaseInfo.getCompId());
         return warehouseInOutInfo.getWeighingManagement().getId();
     }
 

+ 3 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousingOrderServiceImpl.java

@@ -1802,8 +1802,8 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
 
                 }
             }
+            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,warehousingOrderList.get(0).getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
         return "OK";
     }
 
@@ -2712,7 +2712,7 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
                 warehouseInOutDetail1.setInfoId(warehouseInOutInfo1.getId());
                 warehouseInOutDetail1.setId(IdGenerator.generateUUID());
                 warehouseInOutDetailService.insert(warehouseInOutDetail1);
-                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE);
+                cacheComponent.delPrefixKey(Const.SELF_WAREHOUSE,warehousingOrderList.get(0).getCompId());
                 return "ok";
             }
             //所选仓位库存不足
@@ -2880,8 +2880,8 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
                     }
                 }
             }
+            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,dataList.get(0).getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST);
         return "OK";
     }
 

+ 26 - 29
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java

@@ -266,8 +266,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
 //            }
 //        }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,commonStaff.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,commonStaff.getCompId());
         if( weighingManagement.getGrossWeight() == null || weighingManagement.getGrossWeight() == 0){
             throw new YException(YExceptionEnum.GROSSWEIGHT_NULL);
         }
@@ -421,8 +421,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             throw new YException(YExceptionEnum.TARE_NULL);
         }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO, weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM, weighingManagement1.getCompId());
         boolean one = this.updateById(weighingManagement);
         if (one) {
             return weighingManagement.getId();
@@ -502,9 +502,9 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             else{
                 throw new YException(YExceptionEnum.PAYMENT_NOT_DELETED_ERROR);
             }
+            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement.getCompId());
+            cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement.getCompId());
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
     }
 
     /**
@@ -684,8 +684,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
         qualityInspectionManagement.setWarehouseName(weighingManagement.getWarehouseName());
         qualityInspectionManagement.setStorageTagNo(weighingManagement.getStorageNumber());
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement.getCompId());
         boolean two=qualityInspectionManagementService.insert(qualityInspectionManagement);
         boolean one=this.insert(weighingManagement);
         //成功返回ok
@@ -707,15 +707,12 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
         //状态改为已称皮重
         weighingManagement.setStatus(StatusEnum.TARED.getName());
         weighingManagement.setStatusFlag(StatusEnum.TARED.getFlag());
-
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
         //更新检斤信息
         boolean one = this.updateById(weighingManagement);
         //更新质检信息
         boolean two = qualityInspectionManagementService.updateById(weighingManagement.getQualityInspectionManagement());
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement.getCompId());
         //成功返回ok
         if (one &&two ) {
             return weighingManagement.getId();
@@ -874,8 +871,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             }
         }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement1.getCompId());
         return "OK";
     }
 
@@ -982,8 +979,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             }
         }
 
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement1.getCompId());
         return "OK";
     }
 
@@ -1019,8 +1016,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             warehouseInOutInfo.setPositionId(weighingManagement.getChangePositionId());
             warehouseInOutInfoService.updateById(warehouseInOutInfo);
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement1.getCompId());
         return "ok";
     }
 
@@ -1109,8 +1106,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             }
             warehouseInOutInfoService.updateById(warehouseInOutInfo);
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement1.getCompId());
         return "ok";
     }
 
@@ -1138,8 +1135,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
             qualityInspectionManagement.setCustomerPhone(weighingManagement.getCustomerPhone());
             qualityInspectionManagementService.updateById(qualityInspectionManagement);
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,weighingManagement1.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,weighingManagement1.getCompId());
         return "ok";
     }
 
@@ -1392,8 +1389,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                 }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,inOutWarehouseTask.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,inOutWarehouseTask.getCompId());
         return "ok";
     }
 
@@ -1860,8 +1857,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                 }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,inOutWarehouseTask.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,inOutWarehouseTask.getCompId());
         return "ok";
     }
 
@@ -2195,8 +2192,8 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                 }
             }
         }
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO);
-        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM);
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO,inOutWarehouseTask.getCompId());
+        cacheComponent.delPrefixKey(Const.ADMIN_WEIGHINGINFO_NUM,inOutWarehouseTask.getCompId());
         return "ok";
     }
 }