|
@@ -23,6 +23,16 @@
|
|
|
<result column="remark" property="remark"/>
|
|
|
<result column="document" property="document"/>
|
|
|
<result column="state" property="state"/>
|
|
|
+
|
|
|
+ <result column="code" property="code"/>
|
|
|
+ <result column="godownId" property="godownId"/>
|
|
|
+ <result column="modelBindType" property="modelBindType"/>
|
|
|
+ <result column="modelBindContent" property="modelBindContent"/>
|
|
|
+ <result column="manufacturer" property="manufacturer"/>
|
|
|
+ <result column="liaison" property="liaison"/>
|
|
|
+ <result column="liaisonPhone" property="liaisonPhone"/>
|
|
|
+ <result column="entryTime" property="entryTime"/>
|
|
|
+ <result column="maintenanceRecord" property="maintenanceRecord"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="get" resultMap="OperateDeviceResult">
|
|
@@ -48,6 +58,16 @@
|
|
|
<if test="deviceModel!=null">and deviceModel=#{deviceModel}</if>
|
|
|
<if test="deviceSerialNumber!=null">and deviceSerialNumber=#{deviceSerialNumber}</if>
|
|
|
<if test="state!=0">and state=#{state}</if>
|
|
|
+
|
|
|
+ <if test="code!=null">and code=#{code}</if>
|
|
|
+ <if test="godownId!=0">and godownId=#{godownId}</if>
|
|
|
+ <if test="modelBindType!=0">and modelBindType=#{modelBindType}</if>
|
|
|
+ <if test="modelBindContent!=null">and modelBindContent=#{modelBindContent}</if>
|
|
|
+ <if test="manufacturer!=manufacturer">and manufacturer=#{manufacturer}</if>
|
|
|
+ <if test="liaison!=null">and liaison=#{liaison}</if>
|
|
|
+ <if test="liaisonPhone!=null">and liaisonPhone=#{liaisonPhone}</if>
|
|
|
+ <if test="entryTime!=null">and entryTime=#{entryTime}</if>
|
|
|
+ <if test="maintenanceRecord!=null">and maintenanceRecord=#{maintenanceRecord}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -70,6 +90,16 @@
|
|
|
<if test="deviceModel!=null">and deviceModel=#{deviceModel}</if>
|
|
|
<if test="deviceSerialNumber!=null">and deviceSerialNumber=#{deviceSerialNumber}</if>
|
|
|
<if test="state!=0">and state=#{state}</if>
|
|
|
+
|
|
|
+ <if test="code!=null">and code=#{code}</if>
|
|
|
+ <if test="godownId!=0">and godownId=#{godownId}</if>
|
|
|
+ <if test="modelBindType!=0">and modelBindType=#{modelBindType}</if>
|
|
|
+ <if test="modelBindContent!=null">and modelBindContent=#{modelBindContent}</if>
|
|
|
+ <if test="manufacturer!=null">and manufacturer=#{manufacturer}</if>
|
|
|
+ <if test="liaison!=null">and liaison=#{liaison}</if>
|
|
|
+ <if test="liaisonPhone!=null">and liaisonPhone=#{liaisonPhone}</if>
|
|
|
+ <if test="entryTime!=null">and entryTime=#{entryTime}</if>
|
|
|
+ <if test="maintenanceRecord!=null">and maintenanceRecord=#{maintenanceRecord}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -92,15 +122,27 @@
|
|
|
<if test="od.deviceModel!=null">and deviceModel=#{od.deviceModel}</if>
|
|
|
<if test="od.deviceSerialNumber!=null">and deviceSerialNumber=#{od.deviceSerialNumber}</if>
|
|
|
<if test="od.state!=0">and state=#{od.state}</if>
|
|
|
+
|
|
|
+ <if test="od.code!=null">and code=#{od.code}</if>
|
|
|
+ <if test="od.godownId!=0">and godownId=#{od.godownId}</if>
|
|
|
+ <if test="od.modelBindType!=0">and modelBindType=#{od.modelBindType}</if>
|
|
|
+ <if test="od.modelBindContent!=null">and modelBindContent=#{od.modelBindContent}</if>
|
|
|
+ <if test="od.manufacturer!=null">and manufacturer=#{od.manufacturer}</if>
|
|
|
+ <if test="od.liaison!=null">and liaison=#{od.liaison}</if>
|
|
|
+ <if test="od.liaisonPhone!=null">and liaisonPhone=#{od.liaisonPhone}</if>
|
|
|
+ <if test="od.entryTime!=null">and entryTime=#{od.entryTime}</if>
|
|
|
+ <if test="od.maintenanceRecord!=null">and maintenanceRecord=#{od.maintenanceRecord}</if>
|
|
|
</where>
|
|
|
limit #{currIndex} , #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<insert id="save" parameterType="com.bosshand.virgo.api.operate.model.OperateDevice" useGeneratedKeys="true" keyProperty="id">
|
|
|
INSERT into operate_device(operateDeviceLevelId, projectId, projectItemId, projectItemTargetId, projectItemTargetRoomId, name, type, designNumber, assetNumber, deviceNumber,
|
|
|
- deviceBrand, deviceModel, deviceSerialNumber, attachment, remark, document, state)
|
|
|
+ deviceBrand, deviceModel, deviceSerialNumber, attachment, remark, document, state,
|
|
|
+ code, godownId, modelBindType, modelBindContent, manufacturer, liaison, liaisonPhone, entryTime, maintenanceRecord)
|
|
|
values(#{operateDeviceLevelId}, #{projectId}, #{projectItemId}, #{projectItemTargetId}, #{projectItemTargetRoomId}, #{name}, #{type}, #{designNumber},
|
|
|
- #{assetNumber}, #{deviceNumber}, #{deviceBrand}, #{deviceModel}, #{deviceSerialNumber}, #{attachment}, #{remark}, #{document}, #{state})
|
|
|
+ #{assetNumber}, #{deviceNumber}, #{deviceBrand}, #{deviceModel}, #{deviceSerialNumber}, #{attachment}, #{remark}, #{document}, #{state},
|
|
|
+ #{code}, #{godownId}, #{modelBindType}, #{modelBindContent}, #{manufacturer}, #{liaison}, #{liaisonPhone}, #{entryTime}, #{maintenanceRecord})
|
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.operate.model.OperateDevice">
|
|
@@ -123,6 +165,15 @@
|
|
|
<if test="remark!=null">remark=#{remark},</if>
|
|
|
<if test="document!=null">document=#{document},</if>
|
|
|
<if test="state!=0">state=#{state},</if>
|
|
|
+
|
|
|
+ <if test="godownId!=0">and godownId=#{godownId},</if>
|
|
|
+ <if test="modelBindType!=0">and modelBindType=#{modelBindType},</if>
|
|
|
+ <if test="modelBindContent!=null">and modelBindContent=#{modelBindContent},</if>
|
|
|
+ <if test="manufacturer!=null">and manufacturer=#{manufacturer},</if>
|
|
|
+ <if test="liaison!=null">and liaison=#{liaison},</if>
|
|
|
+ <if test="liaisonPhone!=null">and liaisonPhone=#{liaisonPhone},</if>
|
|
|
+ <if test="entryTime!=null">and entryTime=#{entryTime},</if>
|
|
|
+ <if test="maintenanceRecord!=null">and maintenanceRecord=#{maintenanceRecord},</if>
|
|
|
</trim>
|
|
|
WHERE id=#{id}
|
|
|
</update>
|