浏览代码

点位权限修改,点位详情变更

车车 10 月之前
父节点
当前提交
0156362182

+ 6 - 6
ktg-iscs/src/main/java/com/ktg/iscs/controller/IsIsolationPointController.java

@@ -44,7 +44,7 @@ public class IsIsolationPointController extends BaseController {
             @Parameter(name = "page", description = "Page"),
             @Parameter(name = "dto", description = "实体参数")
     })
-    @PreAuthorize("@ss.hasPermi('mes:md:seg:query')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:list')")
     @GetMapping("/getIsIsolationPointPage")
     public CommonResult<Page<PointPageVO>> getIsIsolationPointPage(Page<IsIsolationPoint> page, PagePointDTO dto) {
         Page<PointPageVO> result = isIsolationPointService.getIsIsolationPointPage(page, dto);
@@ -56,7 +56,7 @@ public class IsIsolationPointController extends BaseController {
             @Parameter(name = "workshopId", description = "所属车间ID"),
             @Parameter(name = "workareaId", description = "所属区域ID")
     })
-    // @PreAuthorize("@ss.hasPermi('iscs:point:list')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:list')")
     @GetMapping("/getIsIsolationPointList")
     public CommonResult<List<IsIsolationPoint>> getIsIsolationPointList(Long workshopId, Long workareaId) {
         List<IsIsolationPoint> result = isIsolationPointService.list(Wrappers.<IsIsolationPoint>lambdaQuery()
@@ -85,7 +85,7 @@ public class IsIsolationPointController extends BaseController {
      */
     @ApiOperation("获取隔离点详细信息")
     @Parameter(name = "pointId", description = "pointId")
-    // @PreAuthorize("@ss.hasPermi('iscs:point:query')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:query')")
     @GetMapping(value = "/selectIsIsolationPointById")
     public CommonResult<PointDetailVO> selectIsIsolationPointById(Long pointId) {
         return CommonResult.success(isIsolationPointService.selectIsIsolationPointByPointId(pointId));
@@ -95,7 +95,7 @@ public class IsIsolationPointController extends BaseController {
      * 新增隔离点
      */
     @ApiOperation("新增隔离点")
-    @PreAuthorize("@ss.hasPermi('mes:md:seg:add')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:add')")
     @Log(title = "隔离点", businessType = BusinessType.INSERT)
     @PostMapping("/insertIsIsolationPoint")
     public CommonResult<Boolean> insertIsIsolationPoint(@RequestBody @Parameter(name = "isIsolationPoint", description = "新增数据类,放到body") IsIsolationPoint isIsolationPoint) {
@@ -106,7 +106,7 @@ public class IsIsolationPointController extends BaseController {
      * 修改隔离点
      */
     @ApiOperation("修改隔离点")
-    @PreAuthorize("@ss.hasPermi('mes:md:seg:edit')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:edit')")
     @Log(title = "隔离点", businessType = BusinessType.UPDATE)
     @PostMapping("/updateIsIsolationPoint")
     public CommonResult<Boolean> updateIsIsolationPoint(@RequestBody @Parameter(name = "isIsolationPoint", description = "修改数据类,放到body") IsIsolationPoint isIsolationPoint) {
@@ -117,7 +117,7 @@ public class IsIsolationPointController extends BaseController {
      * 删除隔离点
      */
     @ApiOperation("删除隔离点")
-    // @PreAuthorize("@ss.hasPermi('iscs:point:remove')")
+    @PreAuthorize("@ss.hasPermi('iscs:point:remove')")
     @Log(title = "隔离点", businessType = BusinessType.DELETE)
     @PostMapping("/deleteIsIsolationPointByPointIds")
     public CommonResult<Boolean> deleteIsIsolationPointByPointIds(String pointIds) {

+ 12 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/vo/points/PointDetailVO.java

@@ -47,6 +47,18 @@ public class PointDetailVO extends BaseBean
     @ApiModelProperty(value = "所属区域Name")
     private String workareaName;
 
+    @ApiModelProperty(value = "所属mars岗位ID")
+    private Long workstationId;
+
+    @ApiModelProperty(value = "所属mars岗位Name")
+    private String workstationName;
+
+    @ApiModelProperty(value = "所属电柜ID")
+    private Long lotoId;
+
+    @ApiModelProperty(value = "所属电柜Name")
+    private String lotoName;
+
     @ApiModelProperty(value = "危险能量类型")
     private String powerType;
 

+ 1 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsIsolationPointServiceImpl.java

@@ -72,7 +72,7 @@ public class IsIsolationPointServiceImpl extends ServiceImpl<IsIsolationPointMap
         Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointName()), "隔离点名称不可为空!");
         Assert.isTrue(StringUtils.isNotBlank(isIsolationPoint.getPointCode()), "隔离点编号名称不可为空!");
         // Assert.notNull(isIsolationPoint.getWorkshopId(), "所属车间不可为空!");
-        Assert.notNull(isIsolationPoint.getWorkareaId(), "所属区域不可为空!");
+        // Assert.notNull(isIsolationPoint.getWorkareaId(), "所属区域不可为空!");
         List<IsIsolationPoint> list = list(Wrappers.<IsIsolationPoint>lambdaQuery()
                 .eq(IsIsolationPoint::getPointCode, isIsolationPoint.getPointCode()));
         Assert.isTrue(list.isEmpty(), "该隔离点编号已被使用!");

+ 4 - 2
ktg-iscs/src/main/resources/mapper/IsIsolationPointMapper.xml

@@ -148,14 +148,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectIsIsolationPointByPointId" resultType="com.ktg.iscs.domain.vo.points.PointDetailVO">
         SELECT
             p.*,
-            wa.workarea_name,
+            wa.workstation_name,
+            ls.loto_name,
             l.lock_type_name,
             l.lock_type_code,
             l.lock_type_icon,
             l.lock_type_img
         FROM
             is_isolation_point p
-                LEFT JOIN is_workarea wa ON p.workarea_id = wa.workarea_id
+                LEFT JOIN is_workstation wa ON wa.workstation_id = p.workstation_id
+                LEFT JOIN is_loto_station ls ON ls.loto_id = p.loto_id
                 LEFT JOIN is_lock_type l ON l.lock_type_id = p.lock_type_id
         WHERE
             p.point_id = #{pointId}

+ 1 - 0
ktg-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -95,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
+		order by u.user_id
 	</select>
 
 	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">