浏览代码

出入库日志添加搜素条件、产线排序

xuezizhuo 1 年之前
父节点
当前提交
b55ca49cab

+ 1 - 2
zkqy-custom-business/src/main/resources/mapper/business/MaterielMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectMaterielList" parameterType="com.zkqy.business.domain.Materiel" resultMap="MaterielResult">
         <include refid="selectMaterielVo"/>
-        <where>  
+        where del_flag = '0'
             <if test="materielCode != null  and materielCode != ''"> and materiel_code = #{materielCode}</if>
             <if test="materielName != null  and materielName != ''"> and materiel_name like concat('%', #{materielName}, '%')</if>
             <if test="materielAsname != null  and materielAsname != ''"> and materiel_asname like concat('%', #{materielAsname}, '%')</if>
@@ -54,7 +54,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
             <if test="materieEncoding != null  and materieEncoding != ''"> and materie_encoding = #{materieEncoding}</if>
             <if test="materieColorNumber != null  and materieColorNumber != ''"> and materie_color_number = #{materieColorNumber}</if>
-        </where>
     </select>
 
     <select id="selectMaterielById" parameterType="Long" resultMap="MaterielResult">

+ 1 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml

@@ -269,6 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
         WHERE
         r.del_flag = '0'
+        <if test="qrCode != null and qrCode != ''">and r.qr_code like concat('%', #{qrCode}, '%')</if>
         <if test="lotNum != null  and lotNum != ''"> and r.lot_num like concat('%', #{lotNum}, '%')</if>
         <if test="productionDate != null"> and r.production_date = #{productionDate}</if>
         <if test="warehousingTime != null "> and r.warehousing_time = #{warehousingTime}</if>

+ 1 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductWarehousingRecordMapper.xml

@@ -267,6 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
         WHERE
             r.del_flag = '0'
+            <if test="qrCode != null and qrCode != ''">and r.qr_code like concat('%', #{qrCode}, '%')</if>
             <if test="lotNum != null  and lotNum != ''"> and r.lot_num like concat('%', #{lotNum}, '%')</if>
             <if test="productionDate != null"> and r.production_date = #{productionDate}</if>
             <if test="warehousingTime != null "> and r.warehousing_time = #{warehousingTime}</if>

+ 2 - 2
zkqy-custom-business/src/main/resources/mapper/business/ProductionLineMapper.xml

@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectProductionLineList" parameterType="com.zkqy.business.domain.ProductionLine" resultMap="ProductionLineResult">
         <include refid="selectProductionLineVo"/>
-        <where>  
+        where del_flag = '0'
             <if test="productionLineNo != null  and productionLineNo != ''"> and production_line_no = #{productionLineNo}</if>
             <if test="productionLineName != null  and productionLineName != ''"> and production_line_name like concat('%', #{productionLineName}, '%')</if>
             <if test="productionLineDepartment != null  and productionLineDepartment != ''"> and production_line_department = #{productionLineDepartment}</if>
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
             <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
             <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
-        </where>
+        order by sort asc
     </select>
     
     <select id="selectProductionLineById" parameterType="Long" resultMap="ProductionLineResult">