|
@@ -82,14 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="createById != null">create_by_id,</if>
|
|
<if test="createById != null">create_by_id,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
- <if test="updateById != null">update_by_id,</if>
|
|
|
|
- <if test="updateBy != null">update_by,</if>
|
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
|
- <if test="delFlag != null">del_flag,</if>
|
|
|
|
<if test="taskProcessKey != null">task_process_key,</if>
|
|
<if test="taskProcessKey != null">task_process_key,</if>
|
|
<if test="taskNodeKey != null">task_node_key,</if>
|
|
<if test="taskNodeKey != null">task_node_key,</if>
|
|
<if test="materieEncoding != null">materie_encoding,</if>
|
|
<if test="materieEncoding != null">materie_encoding,</if>
|
|
<if test="materieColorNumber != null">materie_color_number,</if>
|
|
<if test="materieColorNumber != null">materie_color_number,</if>
|
|
|
|
+ del_flag
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="materielCode != null">#{materielCode},</if>
|
|
<if test="materielCode != null">#{materielCode},</if>
|
|
@@ -106,14 +103,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="createById != null">#{createById},</if>
|
|
<if test="createById != null">#{createById},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
- <if test="updateById != null">#{updateById},</if>
|
|
|
|
- <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
- <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
<if test="taskProcessKey != null">#{taskProcessKey},</if>
|
|
<if test="taskProcessKey != null">#{taskProcessKey},</if>
|
|
<if test="taskNodeKey != null">#{taskNodeKey},</if>
|
|
<if test="taskNodeKey != null">#{taskNodeKey},</if>
|
|
<if test="materieEncoding != null">#{materieEncoding},</if>
|
|
<if test="materieEncoding != null">#{materieEncoding},</if>
|
|
<if test="materieColorNumber != null">#{materieColorNumber},</if>
|
|
<if test="materieColorNumber != null">#{materieColorNumber},</if>
|
|
|
|
+ '0'
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -131,9 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
|
|
<if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
- <if test="createById != null">create_by_id = #{createById},</if>
|
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="updateById != null">update_by_id = #{updateById},</if>
|
|
<if test="updateById != null">update_by_id = #{updateById},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
@@ -151,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteMaterielByIds" parameterType="String">
|
|
<delete id="deleteMaterielByIds" parameterType="String">
|
|
- delete from {DBNAME}.materiel where id in
|
|
|
|
|
|
+ update {DBNAME}.materiel set del_flag = '2' where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -161,4 +152,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<include refid="selectMaterielVo"/>
|
|
<include refid="selectMaterielVo"/>
|
|
where del_flag = '0' and materiel_species = '1' order by materiel_name desc
|
|
where del_flag = '0' and materiel_species = '1' order by materiel_name desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="selectMaterielManageList" parameterType="com.zkqy.business.domain.Materiel" resultMap="MaterielResult">
|
|
|
|
+ <include refid="selectMaterielVo"/>
|
|
|
|
+ where del_flag = '0' and materiel_species = '1'
|
|
|
|
+ <if test="materieEncoding != null and materieEncoding != ''"> and materie_encoding like concat('%', #{materieEncoding}, '%')</if>
|
|
|
|
+ <if test="materieColorNumber != null and materieColorNumber != ''"> and materie_color_number like concat('%',#{materieColorNumber}, '%' )</if>
|
|
|
|
+ order by id desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getMaxMaterielCode" resultType="string">
|
|
|
|
+ SELECT
|
|
|
|
+ CONCAT('ML_', MAX(CAST(SUBSTRING(materiel_code, LOCATE('ML_', materiel_code) + 3) AS UNSIGNED)) + 1) AS next_value
|
|
|
|
+ FROM
|
|
|
|
+ {DBNAME}.materiel
|
|
|
|
+ WHERE
|
|
|
|
+ materiel_code LIKE 'ML_%';
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectMaterielBymaterieEncoding" parameterType="string" resultMap="MaterielResult">
|
|
|
|
+ <include refid="selectMaterielVo"/>
|
|
|
|
+ where materie_encoding = #{materieEncoding} and del_flag = '0'
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|