huangfuli hace 3 años
padre
commit
d2cf0e7603

+ 5 - 7
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/QualityInspectionManagementMapper.xml

@@ -137,13 +137,11 @@
         SELECT quality_no from quality_inspection_management
         WHERE comp_id = #{compId}
         <if test="numberLetter != null and numberLetter != ''">
-        AND (lower(quality_no) like lower(CONCAT('%',#{numberLetter},'%')))
-        </if>
-        <if test="date != null and date != ''">
-        AND (lower(quality_no) like lower(CONCAT('%',#{date},'%')))
-        </if>
-        <if test="warehouseNo != null and warehouseNo != ''">
-        AND (lower(quality_no) like lower(CONCAT('%',#{warehouseNo},'%')))
+            <if test="date != null and date != ''">
+                <if test="warehouseNo != null and warehouseNo != ''">
+                    AND (lower(quality_no) like lower(CONCAT('%',#{numberLetter}, + #{date}, + #{warehouseNo},'%')))
+                </if>
+            </if>
         </if>
         ORDER BY quality_no DESC
     </select>

+ 5 - 7
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WeighingManagementMapper.xml

@@ -137,13 +137,11 @@
         SELECT number from weighing_management
         WHERE comp_id = #{compId}
         <if test="numberLetter != null and numberLetter != ''">
-            AND (lower(number) like lower(CONCAT('%',#{numberLetter},'%')))
-        </if>
-        <if test="date != null and date != ''">
-            AND (lower(number) like lower(CONCAT('%',#{date},'%')))
-        </if>
-        <if test="warehouseNo != null and warehouseNo != ''">
-            AND (lower(number) like lower(CONCAT('%',#{warehouseNo},'%')))
+            <if test="date != null and date != ''">
+                <if test="warehouseNo != null and warehouseNo != ''">
+                    AND (lower(quality_no) like lower(CONCAT('%',#{numberLetter}, + #{date}, + #{warehouseNo},'%')))
+                </if>
+            </if>
         </if>
         ORDER BY number DESC
     </select>