jinpengyong
2021-12-16 4450dd41e8d5828e5da4d277c86e54551a6b6c15
设备新增,修改是工艺字段可以为多个,修改mapper,sql
3 files modified
23 ■■■■■ changed files
screen-manage/src/main/java/com/moral/api/pojo/vo/device/DeviceVO.java 3 ●●●● patch | view | raw | blame | history
screen-manage/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java 3 ●●●● patch | view | raw | blame | history
screen-manage/src/main/resources/mapper/DeviceMapper.xml 17 ●●●● patch | view | raw | blame | history
screen-manage/src/main/java/com/moral/api/pojo/vo/device/DeviceVO.java
@@ -4,6 +4,7 @@
import lombok.EqualsAndHashCode;
import java.util.List;
import java.util.Map;
import com.moral.api.entity.Device;
import com.moral.api.entity.GovMonitorPoint;
@@ -19,7 +20,7 @@
    /*
     * 行业
     * */
    private String professionName;
    private List<Map<String, Object>> professions;
    /*
screen-manage/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java
@@ -349,8 +349,7 @@
        deviceInfo.put("extend", device.getExtend());
        //行业
        deviceInfo.put("profession", device.getProfession());
        deviceInfo.put("professionName", device.getProfessionName());
        deviceInfo.put("professions", device.getProfessions());
        //工艺
        deviceInfo.put("tech", device.getTech());
screen-manage/src/main/resources/mapper/DeviceMapper.xml
@@ -28,9 +28,6 @@
    </resultMap>
    <resultMap id="resultMap" type="com.moral.api.pojo.vo.device.DeviceVO" extends="BaseResultMap">
        <!--行业-->
        <result column="profession_name" property="professionName"/>
        <!--工艺-->
        <result column="tech_name" property="techName"/>
@@ -71,6 +68,12 @@
        <collection property="operators" ofType="com.moral.api.entity.ManageAccount">
            <result column="operate_id" property="id" jdbcType="INTEGER"/>
            <result column="operate_name" property="userName" jdbcType="VARCHAR"/>
        </collection>
        <!--行业-->
        <collection property="professions" ofType="java.util.HashMap">
            <result column="profession_key" property="dataKey" jdbcType="INTEGER"/>
            <result column="profession_value" property="dataValue" jdbcType="VARCHAR"/>
        </collection>
    </resultMap>
@@ -134,7 +137,8 @@
            v.id version_id,
            v.`name` version_name,
            ma.user_name operate_name,
            profession.dataValue profession_name,
            profession.dataKey profession_key,
            profession.dataValue profession_value,
            tech.dataValue tech_name,
            detector.dataValue detector_name,
            purchaser.dataValue purchaser_name
@@ -160,7 +164,10 @@
                 WHERE sdt.id = sdd.dict_type_id
                   AND sdt.`name` = 'profession'
             ) profession
             ON d.profession = profession.dataKey
             ON FIND_IN_SET
             (
                 profession.dataKey, (SELECT profession FROM device WHERE id = d.id)
             )
                 LEFT JOIN
             (