Browse Source

Merge branch 'master' into 外协收回按炉结算判断

ezhizao_zx 10 tháng trước cách đây
mục cha
commit
8999b950e7

+ 2 - 15
src/main/java/cn/ezhizao/project/business/controller/BizCheckCategoryController.java

@@ -51,23 +51,10 @@ public class BizCheckCategoryController extends BaseController
     @GetMapping("/roleList")
     public AjaxResult roleList(BizCheckCategory bizCheckCategory) throws NoSuchFieldException, IllegalAccessException
     {
-
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
-        List<BizCheckCategory>newList = new ArrayList<>();
-
+        //此处应该查询所有的类别信息
         List<BizCheckCategory> list = bizCheckCategoryService.getList(bizCheckCategory);
-        if (SecurityUtils.getLoginUser().getUser().getUserId() == 1L){
-            return success(list);
-        }else {
-        for(BizCheckCategory bizCheckCategory1 : list){
-            for (SysRole role : roles){
-                if(role.getRoleKey().equals(bizCheckCategory1.getCode())){
-                    newList.add(bizCheckCategory1);
+        return success(list);
 
-                }
-            }
-        }
-        return success(newList);}
     }
 
     /**

+ 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();

+ 1 - 1
src/main/resources/mybatis/business/BizOutsourceBalanceAccountMapper.xml

@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wastePrice != null "> AND waste_price = #{wastePrice}</if>
             <if test="carrierNum != null "> AND carrier_num = #{carrierNum}</if>
             <if test="processSort != null "> AND process_sort = #{processSort}</if>
-            <if test="checkoutDate != null "> AND checkout_date = #{checkoutDate}</if>
+            <if test="checkoutDate != null "> AND (checkout_date &lt;= #{checkoutDate} or checkout_date is null)</if>
             <if test="auditDate != null "> AND audit_date = #{auditDate}</if>
             <if test="returnDate != null "> AND return_date = #{returnDate}</if>
             <if test="returnNo != null  and returnNo != ''"> AND return_no = #{returnNo}</if>