Kaynağa Gözat

对接调整

车车 11 ay önce
ebeveyn
işleme
1da5652d88

+ 3 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/vo/sop/SopDetailVO.java

@@ -38,6 +38,9 @@ public class SopDetailVO extends BaseBean {
     @ApiModelProperty(value = "所属区域ID")
     private Long workareaId;
 
+    @ApiModelProperty(value = "所属区域Name")
+    private String workareaName;
+
     @ApiModelProperty(value = "SOP内容")
     private String sopContent;
 

+ 3 - 1
ktg-iscs/src/main/java/com/ktg/iscs/mapper/IsSopMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ktg.common.mapper.BaseMapperX;
 import com.ktg.iscs.domain.IsSop;
 import com.ktg.iscs.domain.dto.sop.PageSopDTO;
+import com.ktg.iscs.domain.vo.sop.SopDetailVO;
 import com.ktg.iscs.domain.vo.sop.SopPageVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -25,7 +26,7 @@ public interface IsSopMapper extends BaseMapperX<IsSop>
      * @param sopId SOP信息主键
      * @return SOP信息
      */
-    IsSop selectIsSopBySopId(Long sopId);
+    SopDetailVO selectIsSopBySopId(Long sopId);
 
     /**
      * 查询SOP信息列表
@@ -74,4 +75,5 @@ public interface IsSopMapper extends BaseMapperX<IsSop>
      * @return
      */
     Page<SopPageVO> getIsSopPage(Page<IsSop> page, @Param(value = "dto") PageSopDTO dto);
+
 }

+ 2 - 2
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopServiceImpl.java

@@ -56,8 +56,8 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
     @Override
     public SopDetailVO selectIsSopBySopId(Long sopId) {
         // 1.查询基础数据
-        IsSop isSop = isSopMapper.selectIsSopBySopId(sopId);
-        SopDetailVO sopDetailVO = BeanUtils.toBean(isSop, SopDetailVO.class);
+        SopDetailVO sopDetailVO = isSopMapper.selectIsSopBySopId(sopId);
+        // SopDetailVO sopDetailVO = BeanUtils.toBean(isSop, SopDetailVO.class);
         // 2.查询sop隔离点关联数据
         List<IsSopPoints> isSopPoints = iIsSopPointsService.list(Wrappers.<IsSopPoints>lambdaQuery()
                 .eq(IsSopPoints::getSopId, sopId));

+ 1 - 1
ktg-iscs/src/main/resources/mapper/IsKeyMapper.xml

@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         h.hardware_name
         FROM
         is_key k
-        LEFT JOIN is_hardware h ON k.key_id = h.id
+        LEFT JOIN is_hardware h ON k.hardware_id = h.id
         <where>
             <if test="isKey.keyCode != null and isKey.keyCode.trim != ''">
                 and k.key_code like concat('%',#{isKey.keyCode},'%')

+ 1 - 1
ktg-iscs/src/main/resources/mapper/IsLockMapper.xml

@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT
         l.*,
         lt.lock_type_name,
-        h.hardware_type_name
+        h.hardware_name
         FROM
         is_lock l
         LEFT JOIN is_lock_type lt ON l.lock_type_id = lt.lock_type_id

+ 4 - 3
ktg-iscs/src/main/resources/mapper/IsSopMapper.xml

@@ -37,9 +37,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
-    <select id="selectIsSopBySopId" parameterType="Long" resultMap="IsSopResult">
-        <include refid="selectIsSopVo"/>
-        where sop_id = #{sopId}
+    <select id="selectIsSopBySopId" parameterType="Long" resultType="com.ktg.iscs.domain.vo.sop.SopDetailVO">
+        select s.*, w.workarea_name from is_sop s
+                   left join is_workarea w on s.workarea_id = w.workarea_id
+        where s.sop_id = #{sopId}
     </select>
 
     <insert id="insertIsSop" parameterType="IsSop" useGeneratedKeys="true" keyProperty="sopId">