Browse Source

产品检测标准查询类别信息

wangxin 10 months ago
parent
commit
48003bf816

+ 55 - 55
src/main/java/cn/ezhizao/project/business/controller/BizInspectionStandardsController.java

@@ -159,7 +159,7 @@ public class BizInspectionStandardsController extends BaseController
         List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
         Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
         //上下其实都一样,就是过滤掉admin
-        if (userId == 1L){
+//        if (userId == 1L){
             if ( bizInspectionStandards.getFactoryInspection() != null && bizInspectionStandards.getFactoryInspection()){
                 saveCheck("factoryInspection",bizInspectionStandards);
             }else {
@@ -196,60 +196,60 @@ public class BizInspectionStandardsController extends BaseController
                 //更新将取消的删除
                 removeCheck("outsourcedInspector",bizInspectionStandards);
             }
-        }else {
-            for(SysRole item:roles){
-                if (item.getRoleKey().equals("factoryInspector")){
-                    if (bizInspectionStandards.getFactoryInspection() != null && bizInspectionStandards.getFactoryInspection()){
-                        saveCheck("factoryInspection",bizInspectionStandards);
-                    }else {
-                        //更新将取消的删除
-                        removeCheck("factoryInspection",bizInspectionStandards);
-                    }
-                }
-                if(item.getRoleKey().equals("deliveryInspection")){
-                    if ( bizInspectionStandards.getDeliveryInspection() != null && bizInspectionStandards.getDeliveryInspection()){
-                        saveCheck("deliveryInspection",bizInspectionStandards);
-                    }else {
-                        //更新将取消的删除
-                        removeCheck("deliveryInspection",bizInspectionStandards);
-                    }
-                }
-
-                if(item.getRoleKey().equals("patrolInspection")){
-                    if ( bizInspectionStandards.getPatrolInspection() != null && bizInspectionStandards.getPatrolInspection()){
-                        saveCheck("patrolInspection",bizInspectionStandards);
-                    }else {
-                        //更新将取消的删除
-                        removeCheck("patrolInspection",bizInspectionStandards);
-                    }
-                }
-                if(item.getRoleKey().equals("instrumentRoomInspection")){
-                    if ( bizInspectionStandards.getInstrumentRoomInspection() != null && bizInspectionStandards.getInstrumentRoomInspection()){
-                        saveCheck("instrumentRoomInspection",bizInspectionStandards);
-                    }else {
-                        //更新将取消的删除
-                        removeCheck("instrumentRoomInspection",bizInspectionStandards);
-                    }
-                }
-               if(item.getRoleKey().equals("firstArticleInspection")){
-                   if ( bizInspectionStandards.getFirstArticleInspection() != null && bizInspectionStandards.getFirstArticleInspection()){
-                       saveCheck("firstArticleInspection",bizInspectionStandards);
-                   }else {
-                       //更新将取消的删除
-                       removeCheck("firstArticleInspection",bizInspectionStandards);
-                   }
-               }
-               if(item.getRoleKey().equals("outsourcedInspector")){
-                   if ( bizInspectionStandards.getOutsourcedInspector() != null && bizInspectionStandards.getOutsourcedInspector()){
-                       saveCheck("outsourcedInspector",bizInspectionStandards);
-                   }else {
-                       //更新将取消的删除
-                       removeCheck("outsourcedInspector",bizInspectionStandards);
-                   }
-               }
-
-            }
-        }
+//        }else {
+//            for(SysRole item:roles){
+//                if (item.getRoleKey().equals("factoryInspector")){
+//                    if (bizInspectionStandards.getFactoryInspection() != null && bizInspectionStandards.getFactoryInspection()){
+//                        saveCheck("factoryInspection",bizInspectionStandards);
+//                    }else {
+//                        //更新将取消的删除
+//                        removeCheck("factoryInspection",bizInspectionStandards);
+//                    }
+//                }
+//                if(item.getRoleKey().equals("deliveryInspection")){
+//                    if ( bizInspectionStandards.getDeliveryInspection() != null && bizInspectionStandards.getDeliveryInspection()){
+//                        saveCheck("deliveryInspection",bizInspectionStandards);
+//                    }else {
+//                        //更新将取消的删除
+//                        removeCheck("deliveryInspection",bizInspectionStandards);
+//                    }
+//                }
+//
+//                if(item.getRoleKey().equals("patrolInspection")){
+//                    if ( bizInspectionStandards.getPatrolInspection() != null && bizInspectionStandards.getPatrolInspection()){
+//                        saveCheck("patrolInspection",bizInspectionStandards);
+//                    }else {
+//                        //更新将取消的删除
+//                        removeCheck("patrolInspection",bizInspectionStandards);
+//                    }
+//                }
+//                if(item.getRoleKey().equals("instrumentRoomInspection")){
+//                    if ( bizInspectionStandards.getInstrumentRoomInspection() != null && bizInspectionStandards.getInstrumentRoomInspection()){
+//                        saveCheck("instrumentRoomInspection",bizInspectionStandards);
+//                    }else {
+//                        //更新将取消的删除
+//                        removeCheck("instrumentRoomInspection",bizInspectionStandards);
+//                    }
+//                }
+//               if(item.getRoleKey().equals("firstArticleInspection")){
+//                   if ( bizInspectionStandards.getFirstArticleInspection() != null && bizInspectionStandards.getFirstArticleInspection()){
+//                       saveCheck("firstArticleInspection",bizInspectionStandards);
+//                   }else {
+//                       //更新将取消的删除
+//                       removeCheck("firstArticleInspection",bizInspectionStandards);
+//                   }
+//               }
+//               if(item.getRoleKey().equals("outsourcedInspector")){
+//                   if ( bizInspectionStandards.getOutsourcedInspector() != null && bizInspectionStandards.getOutsourcedInspector()){
+//                       saveCheck("outsourcedInspector",bizInspectionStandards);
+//                   }else {
+//                       //更新将取消的删除
+//                       removeCheck("outsourcedInspector",bizInspectionStandards);
+//                   }
+//               }
+//
+//            }
+//        }
 
 
         return success();