Pārlūkot izejas kodu

权限功能修改

liujh 3 gadi atpakaļ
vecāks
revīzija
a208db65b6

+ 7 - 0
zd-common/zd-common-core/src/main/java/com/zd/common/core/domain/per/PerPrefix.java

@@ -590,6 +590,8 @@ public class PerPrefix {
      * 用气申请
      */
     public static final String AIRBOTTLE_USEAGSAPPLY= "airbottle:useAgsApplyManage:";
+    public static final String AIRBOTTLE_USEAGSMANAGE= "airbottle:useAgsManage:";
+    public static final String AIRBOTTLE_USEAGSAUDITMANAGE= "airbottle:useAgsAuditManage:";
 
     /**
      * 气瓶入库
@@ -602,6 +604,11 @@ public class PerPrefix {
     public static final String AIRBOTTLE_FLOWDETAIL= "airbottle:flowDetail:";
 
     /**
+     * RFID标签管理
+     */
+    public static final String AIRBOTTLE_TAG= "airbottle:tag:";
+
+    /**
      * 气瓶出库
      */
     public static final String AIRBOTTLE_STORAGE_OUT= "airbottle:storageOutManage:";

+ 8 - 6
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/controller/QpRfidTagController.java

@@ -2,6 +2,8 @@ package com.zd.airbottle.controller;
 
 import com.zd.airbottle.domain.QpRfidTag;
 import com.zd.airbottle.service.IQpRfidTagService;
+import com.zd.common.core.domain.per.PerFun;
+import com.zd.common.core.domain.per.PerPrefix;
 import com.zd.common.core.utils.poi.ExcelUtil;
 import com.zd.common.core.web.controller.BaseController;
 import com.zd.common.core.web.page.TableDataInfo;
@@ -34,7 +36,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
     /**
      * 查询RFID标签管理列表
      */
-    @PreAuthorize(hasPermi = "airbottle:tag:list")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.LIST)
     @GetMapping("/list")
     @ApiOperation(value = "查询RFID标签管理列表")
     public TableDataInfo<QpRfidTag> list(QpRfidTag qpRfidTag) {
@@ -47,7 +49,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
      * 导出RFID标签管理列表
      */
     @ApiOperation(value = "导出RFID标签管理列表")
-    @PreAuthorize(hasPermi = "airbottle:tag:export")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.EXPORT)
     @Log(title = "RFID标签管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, QpRfidTag qpRfidTag) throws IOException {
@@ -60,7 +62,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
      * 获取RFID标签管理详细信息
      */
     @ApiOperation(value = "获取RFID标签管理详细信息")
-    @PreAuthorize(hasPermi = "airbottle:tag:query")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.QUERY)
     @GetMapping(value = "/{id}")
     public ResultData<QpRfidTag> getInfo(@PathVariable("id") Long id) {
         return ResultData.success(qpRfidTagService.selectQpRfidTagById(id));
@@ -70,7 +72,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
      * 新增RFID标签管理
      */
     @ApiOperation(value = "新增RFID标签管理")
-    @PreAuthorize(hasPermi = "airbottle:tag:add")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.ADD)
     @Log(title = "RFID标签管理", businessType = BusinessType.INSERT)
     @PostMapping
     public ResultData<Boolean> add(@RequestBody QpRfidTag qpRfidTag) {
@@ -85,7 +87,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
      * 修改RFID标签管理
      */
     @ApiOperation(value = "修改RFID标签管理")
-    @PreAuthorize(hasPermi = "airbottle:tag:edit")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.EDIT)
     @Log(title = "RFID标签管理", businessType = BusinessType.UPDATE)
     @PutMapping
     public ResultData<Boolean> edit(@RequestBody QpRfidTag qpRfidTag) {
@@ -96,7 +98,7 @@ public class QpRfidTagController extends BaseController<QpRfidTag> {
      * 删除RFID标签管理
      */
     @ApiOperation(value = "删除RFID标签管理")
-    @PreAuthorize(hasPermi = "airbottle:tag:remove")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_TAG+ PerFun.REMOVE)
     @Log(title = "RFID标签管理", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public ResultData<Boolean> remove(@PathVariable Long[] ids) {

+ 5 - 5
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/controller/QpUsegasApplyManageController.java

@@ -86,9 +86,9 @@ public class QpUsegasApplyManageController extends BaseController
      * 查询用气管理列表
      */
     // @PreAuthorize(hasPermi = "airbottle:useAgsApply:list")
-    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_USEAGSAPPLY+ "listManage")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_USEAGSMANAGE+ PerFun.LIST)
     @GetMapping("/listManage")
-    @ApiOperation(value = "查询用气管理列表",notes = "权限字符:"+PerPrefix.AIRBOTTLE_USEAGSAPPLY+ "listManage")
+    @ApiOperation(value = "查询用气管理列表",notes = "权限字符:"+PerPrefix.AIRBOTTLE_USEAGSAPPLY+ PerFun.LIST)
     public TableDataInfo<QpUsegasApplyVO> listManage(QpUsegasApplyVO qpUsegasApply)
     {
         //qpUsegasApply.setLeadAuditStaus(1);//实验室负责人审核通过
@@ -96,7 +96,7 @@ public class QpUsegasApplyManageController extends BaseController
 
         qpUsegasApply.setCenterAuditStatus(1);//通过审核的数据
         startPage();
-        List<QpUsegasApplyVO> list = qpUsegasApplyService.selectQpUsegasApplyList(qpUsegasApply);
+        List<QpUsegasApplyVO> list = qpUsegasApplyService.selectQpUsegasApplyManageList(qpUsegasApply);
 
         return getDataTable(list);
     }
@@ -105,9 +105,9 @@ public class QpUsegasApplyManageController extends BaseController
      * 查询用气审核列表
      */
     // @PreAuthorize(hasPermi = "airbottle:useAgsApply:list")
-    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_USEAGSAPPLY+ "auditList")
+    @PreAuthorize(hasPermi = PerPrefix.AIRBOTTLE_USEAGSAUDITMANAGE+ PerFun.LIST)
     @GetMapping("/auditList")
-    @ApiOperation(value = "查询用气审核列表",notes = "权限字符:"+ PerPrefix.AIRBOTTLE_USEAGSAPPLY+ "auditList")
+    @ApiOperation(value = "查询用气审核列表",notes = "权限字符:"+ PerPrefix.AIRBOTTLE_USEAGSAUDITMANAGE+ PerFun.LIST)
     public TableDataInfo<QpUsegasApplyVO> auditList(QpUsegasApplyVO qpUsegasApply)
     {
         //qpUsegasApply.setAuditStatus(0);//审核未完成的数据

+ 16 - 8
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/service/IQpUsegasApplyService.java

@@ -7,15 +7,15 @@ import com.zd.airbottle.domain.vo.QpUsegasApplyVO;
 
 /**
  * 用气申请Service接口
- * 
+ *
  * @author zd
  * @date 2022-05-10
  */
-public interface IQpUsegasApplyService 
+public interface IQpUsegasApplyService
 {
     /**
      * 查询用气申请
-     * 
+     *
      * @param id 用气申请主键
      * @return 用气申请
      */
@@ -23,15 +23,23 @@ public interface IQpUsegasApplyService
 
     /**
      * 查询用气申请列表
-     * 
+     *
      * @param qpUsegasApply 用气申请
      * @return 用气申请集合
      */
     public List<QpUsegasApplyVO> selectQpUsegasApplyList(QpUsegasApplyVO qpUsegasApply);
 
     /**
+     * 用气管理
+     *
+     * @param qpUsegasApply 用气申请
+     * @return 用气申请集合
+     */
+    public List<QpUsegasApplyVO> selectQpUsegasApplyManageList(QpUsegasApplyVO qpUsegasApply);
+
+    /**
      * 新增用气申请
-     * 
+     *
      * @param qpUsegasApply 用气申请
      * @return 结果
      */
@@ -39,7 +47,7 @@ public interface IQpUsegasApplyService
 
     /**
      * 修改用气申请
-     * 
+     *
      * @param qpUsegasApply 用气申请
      * @return 结果
      */
@@ -47,7 +55,7 @@ public interface IQpUsegasApplyService
 
     /**
      * 批量删除用气申请
-     * 
+     *
      * @param ids 需要删除的用气申请主键集合
      * @return 结果
      */
@@ -55,7 +63,7 @@ public interface IQpUsegasApplyService
 
     /**
      * 删除用气申请信息
-     * 
+     *
      * @param id 用气申请主键
      * @return 结果
      */

+ 26 - 0
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/service/impl/QpUsegasApplyServiceImpl.java

@@ -96,6 +96,32 @@ public class QpUsegasApplyServiceImpl implements IQpUsegasApplyService
     }
 
     /**
+     * 用气管理
+     *
+     * @param qpUsegasApply 用气申请
+     * @return 用气申请集合
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u", permi = PerPrefix.AIRBOTTLE_USEAGSMANAGE)
+    public List<QpUsegasApplyVO> selectQpUsegasApplyManageList(QpUsegasApplyVO qpUsegasApply) {
+        List<QpUsegasApplyVO> list = qpUsegasApplyMapper.selectQpUsegasApplyList(qpUsegasApply);
+        if(!list.isEmpty()){
+            for (QpUsegasApplyVO qpUsegasApplyVO : list) {
+                if (qpUsegasApplyVO.getLeadAuditStaus() == 2 || qpUsegasApplyVO.getCenterAuditStatus() == 2) {
+                    qpUsegasApplyVO.setRemark("2");//驳回
+                } else if (qpUsegasApplyVO.getLeadAuditStaus() == 0 || qpUsegasApplyVO.getCenterAuditStatus() == 0 || qpUsegasApplyVO.getLeadAuditStaus() == 2) {
+                    qpUsegasApplyVO.setRemark("0");//待审核
+                } else if (qpUsegasApplyVO.getCenterAuditStatus() == 1) {
+                    qpUsegasApplyVO.setRemark("1");//通过
+                } else {
+                    qpUsegasApplyVO.setRemark("");//
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
      * 新增用气申请
      *
      * @param qpUsegasApply 用气申请

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSubjectMapper.xml

@@ -668,7 +668,7 @@
                 and s.name like concat('%', #{name}, '%')
             </if>
             <if test="deptId != null">
-                and s.dept_id = #{deptId}
+                ( s.dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE find_in_set(#{deptId} ,ancestors )) or s.dept_id = #{deptId} )
             </if>
             <if test="level != null">
                 and s.level = #{level}