Ver Fonte

LY 特种设备

ly há 3 anos atrás
pai
commit
0f9958d989

+ 7 - 1
master/src/main/resources/mybatis/sems/TSpecdevCcMapper.xml

@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectTSpecdevCcVo">
         select d.id,
                d.plant_code,
+               d.unit,
                d.car_no,
                d.devname,
                d.devno,
@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTSpecdevCcVo"/>
         <where>
             <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
             <if test="devname != null  and devname != ''"> and devname like concat(concat('%', #{devname}), '%')</if>
             <if test="devno != null  and devno != ''"> and devno = #{devno}</if>
@@ -82,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScopePlant}
-        order by d.plant_code asc , d.id
+        order by d.plant_code asc , d.unit,  d.id
     </select>
 
     <select id="selectTSpecdevCcListByYear" parameterType="TSpecdevCc" resultMap="TSpecdevCcResult">
@@ -128,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
             <if test="plantCode != null and plantCode != ''">plant_code,</if>
+            <if test="unit != null">unit,</if>
             <if test="carNo != null">car_no,</if>
             <if test="devname != null">devname,</if>
             <if test="devno != null">devno,</if>
@@ -173,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
+            <if test="unit != null">#{unit},</if>
             <if test="carNo != null">#{carNo},</if>
             <if test="devname != null">#{devname},</if>
             <if test="devno != null">#{devno},</if>
@@ -221,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update t_specdev_cc
         <trim prefix="SET" suffixOverrides=",">
             <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
+            <if test="unit != null">unit = #{unit},</if>
             <if test="carNo != null">car_no = #{carNo},</if>
             <if test="devname != null">devname = #{devname},</if>
             <if test="devno != null">devno = #{devno},</if>
@@ -270,6 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update t_specdev_cc
         <trim prefix="SET" suffixOverrides=",">
             <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
+            <if test="unit != null">unit = #{unit},</if>
             <if test="carNo != null">car_no = #{carNo},</if>
             <if test="devname != null">devname = #{devname},</if>
             <if test="devno != null">devno = #{devno},</if>