From c28d3bb363dde2afb44c168b93379b2bf6b1f67f Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期四, 07 九月 2023 15:26:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
inspect-server/src/main/resources/mapper/InspectionItemMapper.xml | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InspectionItemMapper.xml b/inspect-server/src/main/resources/mapper/InspectionItemMapper.xml
index 4ee7346..b117cab 100644
--- a/inspect-server/src/main/resources/mapper/InspectionItemMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InspectionItemMapper.xml
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.InspectionItemMapper">
-
<resultMap id="selectInspectionItemMap" type="inspectionItemDto">
- <id property="father" column="father"/>
+ <id property="father" column="ifather"/>
<association property="children" resultMap="selectInspectionItemDto2Map"/>
</resultMap>
-
<resultMap id="selectInspectionItemDto2Map" type="inspectionItemDto2">
<id property="id" column="id"/>
<result property="name" column="name"/>
@@ -14,14 +12,34 @@
<result property="internal" column="internal"/>
<result property="required" column="required"/>
<result property="inspectionValue" column="inspection_value"/>
- <result property="deviceId" column="device_id"/>
+ <result property="dname" column="dname"/>
<result property="result" column="result"/>
+ <result property="username" column="username"/>
</resultMap>
-
<select id="selectInspectionItem" resultMap="selectInspectionItemMap">
- SELECT i.`id`, IFNULL(i.`father`,i.`name`) father, i.`name`, i.`unit`, i.`internal`, i.`required`, i.`inspection_value`, i.`device_id`, i.`result`
- FROM inspection_item i
- WHERE i.`finish_inspect_id` = #{finishInspectId}
+ SELECT i.`id`,
+ i.`father` ifather,
+ i.`name`,
+ i.`unit`,
+ i.`internal`,
+ i.`required`,
+ i.`inspection_value`,
+ device.name dname,
+ i.`result`,
+ username
+ FROM mom_ocean.inspection_item i
+ left join mom_ocean.device on i.device_id = device.id
+ WHERE i.`inspect_id` = #{id}
AND i.`state` = 1
+ and i.type = #{type}
+ </select>
+
+ <!--鑾峰彇璇ユ楠屽崟涓嬫楠岄」鐩殑缁撴灉闆�-->
+ <select id="getResult" resultType="java.lang.Integer">
+ select distinct result
+ from mom_ocean.inspection_item
+ where state = 1
+ and type = #{type}
+ and inspect_id = #{id}
</select>
</mapper>
--
Gitblit v1.9.3