From 3c6efb35ff0ebcca6e7104c20cde64825fddd59d Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期四, 07 九月 2023 19:35:24 +0800 Subject: [PATCH] 添加数据 --- igds-inout/src/main/resources/mapper/InoutCheckMapper.xml | 78 ++++++++++++++++++++++++++++++-------- 1 files changed, 61 insertions(+), 17 deletions(-) diff --git a/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml b/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml index 9a31375..29ed5d6 100644 --- a/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml +++ b/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml @@ -38,7 +38,6 @@ <if test="param.sampleStatus != null and param.sampleStatus != 'NONE' ">AND SAMPLE_TIME_ IS NOT NULL</if> </where> AND RECORD_STATUS_ != 'DEL' - AND RECORD_STATUS_ != 'ERROR' ORDER BY REGISTER_TIME_ </select> @@ -80,6 +79,7 @@ CHECK_ID_ as checkId, CHECK_STATUS_ AS checkStatus, REMARKS_ AS remarks, + FOOD_YEAR_ AS foodYear, IF(ISNULL(SAMPLE_TIME_),'NONE','SAMPLE') AS sampleStatus from D_INOUT_RECORD @@ -87,34 +87,40 @@ <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> <if test="param.deptId != null and param.deptId != '' ">AND DEPT_ID_ = #{param.deptId}</if> <if test="param.checkId != null and param.checkId != '' ">AND CHECK_ID_ like #{param.checkId}</if> - <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ = #{param.foodVariety}</if> + <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ = #{param.foodVariety} + </if> <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if> <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if> <if test="param.start != null">AND REGISTER_TIME_ <![CDATA[ >= ]]>#{param.start,jdbcType=TIMESTAMP}</if> <if test="param.end != null">AND REGISTER_TIME_ <![CDATA[ <= ]]>#{param.end,jdbcType=TIMESTAMP}</if> - <if test="param.checkStatus != null and param.checkStatus != 'NONE' ">AND CHECK_STATUS_ != 'NONE' AND CHECK_STATUS_ IS NOT NULL</if> + <if test="param.checkStatus != null and param.checkStatus != 'NONE' ">AND CHECK_STATUS_ != 'NONE' AND + CHECK_STATUS_ IS NOT NULL + </if> <if test="param.checkStatus != null and param.checkStatus == 'NONE' ">AND CHECK_STATUS_ = 'NONE'</if> </where> AND RECORD_STATUS_ != 'DEL' - AND RECORD_STATUS_ != 'ERROR' ORDER BY REGISTER_TIME_ </select> <!--鏇存柊鍖栭獙淇℃伅--> <update id="updateCheckData" parameterType="com.ld.igds.inout.dto.InoutData"> UPDATE D_INOUT_RECORD - SET TYPE_ = #{data.type}, - <if test="data.depotId != null">DEPOT_ID_ = #{data.depotId},</if> - <if test="data.checkUser != null">CHECK_USER_ = #{data.checkUser},</if> - <if test="data.checkTime != null">CHECK_TIME_ = #{data.checkTime},</if> - <if test="data.progress != null">PROGRESS_ = #{data.progress},</if> - <if test="data.checkStatus != null">CHECK_STATUS_ = #{data.checkStatus},</if> - <if test="data.foodLevel != null">FOOD_LEVEL_ = #{data.foodLevel},</if> - <if test="data.foodVariety != null">FOOD_VARIETY_ = #{data.foodVariety},</if> - <if test="data.deCheck != null">DE_CHECK_ = #{data.deCheck},</if> - <if test="data.addCheck != null">ADD_CHECK_ = #{data.addCheck},</if> - <if test="data.price != null">PRICE_ = #{data.price},</if> - <if test="data.remarks != null">REMARKS_ = #{data.remarks},</if> + <trim prefix="SET" suffixOverrides=","> + TYPE_ = #{data.type}, + <if test="data.depotId != null">DEPOT_ID_ = #{data.depotId},</if> + <if test="data.checkUser != null">CHECK_USER_ = #{data.checkUser},</if> + <if test="data.checkTime != null">CHECK_TIME_ = #{data.checkTime},</if> + <if test="data.progress != null">PROGRESS_ = #{data.progress},</if> + <if test="data.checkStatus != null">CHECK_STATUS_ = #{data.checkStatus},</if> + <if test="data.foodLevel != null">FOOD_LEVEL_ = #{data.foodLevel},</if> + <if test="data.foodYear != null">FOOD_YEAR_ = #{data.foodYear},</if> + <if test="data.foodVariety != null">FOOD_VARIETY_ = #{data.foodVariety},</if> + <if test="data.deCheck != null">DE_CHECK_ = #{data.deCheck},</if> + <if test="data.addCheck != null">ADD_CHECK_ = #{data.addCheck},</if> + <if test="data.price != null">PRICE_ = #{data.price},</if> + <if test="data.remarks != null">REMARKS_ = #{data.remarks},</if> + <if test="data.updateTime != null">UPDATE_TIME_ = #{data.updateTime},</if> + </trim> WHERE COMPANY_ID_ =#{data.companyId} AND ID_ =#{data.id} @@ -139,11 +145,49 @@ <where> <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> <if test="param.foodLevel != null and param.foodLevel != '' ">AND FOOD_LEVEL_ = #{param.foodLevel}</if> - <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ like #{param.foodVariety}</if> + <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ like + #{param.foodVariety} + </if> <if test="param.end != null">AND END_TIME_ <![CDATA[ >= ]]>#{param.end,jdbcType=TIMESTAMP}</if> <if test="param.start != null">AND START_TIME_ <![CDATA[ <= ]]>#{param.start,jdbcType=TIMESTAMP}</if> </where> ORDER BY UPDATE_TIME_ </select> + <!--鍒嗛〉鑾峰彇鍖栭獙鏁版嵁--> + <select id="inoutDataByCheckId" resultType="com.ld.igds.inout.dto.InoutCheckData" + parameterType="com.ld.igds.inout.dto.InoutCheckParam"> + select + ID_ as id, + COMPANY_ID_ as companyId, + DEPT_ID_ as deptId, + TYPE_ as type, + PROGRESS_ as progress, + RECORD_STATUS_ as recordStatus, + INTEL_CARD_ as intelCard, + REGISTER_TIME_ as registerTime, + REGISTER_USER_ as registerUser, + DEPOT_ID_ as depotId, + FOOD_VARIETY_ as foodVariety, + FOOD_LEVEL_ as foodLevel, + PRICE_ as price, + PLATE_NUM_ as plateNum, + SAMPLE_USER_ as sampleUser, + SAMPLE_TIME_ as sampleTime, + CHECK_USER_ as checkUser, + CHECK_TIME_ as checkTime, + CHECK_ID_ as checkId, + CHECK_STATUS_ AS checkStatus, + REMARKS_ AS remarks + from + D_INOUT_RECORD + <where> + <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> + <if test="param.checkId != null and param.checkId != '' ">AND CHECK_ID_ = #{param.checkId}</if> + <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if> + </where> + AND RECORD_STATUS_ != 'DEL' + ORDER BY REGISTER_TIME_ + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3