移库记录去掉库位和仓库的对应关系校验
施工队新增时去掉编号,由代码生成 新增出入库记录查询接口
This commit is contained in:
@@ -1338,6 +1338,127 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectRkInfoPageList"
|
||||
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
||||
resultMap="RkInfoResult">
|
||||
|
||||
<include refid="selectRkInfoVo"/>
|
||||
|
||||
<where>
|
||||
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
|
||||
|
||||
<if test="isChukuList != null and isChukuList.size() > 0">
|
||||
AND ri.is_chuku IN
|
||||
<foreach collection="isChukuList"
|
||||
item="item"
|
||||
open="("
|
||||
separator=","
|
||||
close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="(isChukuList == null or isChukuList.size() == 0)
|
||||
and isChuku != null">
|
||||
AND ri.is_chuku = #{isChuku}
|
||||
</if>
|
||||
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
AND ri.cangku = #{warehouseCode}
|
||||
</if>
|
||||
|
||||
<if test="parentWarehouseCode != null and parentWarehouseCode != ''">
|
||||
AND wh.parent_warehouse_code = #{parentWarehouseCode}
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
<if test="rkType != null and rkType != ''">
|
||||
AND ri.rk_type = #{rkType}
|
||||
</if>
|
||||
|
||||
<if test="wlType != null and wlType != ''">
|
||||
AND ri.wl_type = #{wlType}
|
||||
</if>
|
||||
|
||||
<!-- 时间范围查询:入库时间 OR 出库时间 -->
|
||||
<if test="statDate != null and endDate != null">
|
||||
AND (
|
||||
(
|
||||
ri.rk_time <![CDATA[ >= ]]> #{statDate}
|
||||
AND ri.rk_time <![CDATA[ < ]]> DATE_ADD(#{endDate}, INTERVAL 1 SECOND)
|
||||
)
|
||||
OR
|
||||
(
|
||||
ri.ly_time <![CDATA[ >= ]]> #{statDate}
|
||||
AND ri.ly_time <![CDATA[ < ]]> DATE_ADD(#{endDate}, INTERVAL 1 SECOND)
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- <!– 入库时间 –>-->
|
||||
<!-- <if test="startTime != null">-->
|
||||
<!-- AND ri.rk_time <![CDATA[ >= ]]> #{startTime}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="endTime != null">-->
|
||||
<!-- AND ri.rk_time <![CDATA[ < ]]> DATE_ADD(#{endTime}, INTERVAL 1 SECOND)-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <!– 出库时间 –>-->
|
||||
<!-- <if test="lyStartTime != null">-->
|
||||
<!-- AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="lyEndTime != null">-->
|
||||
<!-- AND ri.ly_time <![CDATA[ < ]]> DATE_ADD(#{lyEndTime}, INTERVAL 1 SECOND)-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="xmNo != null and xmNo != ''">
|
||||
AND ri.xm_no LIKE CONCAT('%', #{xmNo}, '%')
|
||||
</if>
|
||||
<if test="xmMs != null and xmMs != ''">
|
||||
AND ri.xm_ms LIKE CONCAT('%', #{xmMs}, '%')
|
||||
</if>
|
||||
<if test="wlNo != null and wlNo != ''">
|
||||
AND ri.wl_no LIKE CONCAT('%', #{wlNo}, '%')
|
||||
</if>
|
||||
<if test="wlMs != null and wlMs != ''">
|
||||
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
|
||||
</if>
|
||||
<if test="gysNo != null and gysNo != ''">
|
||||
AND ri.gys_no LIKE CONCAT('%', #{gysNo}, '%')
|
||||
</if>
|
||||
<if test="gysMc != null and gysMc != ''">
|
||||
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
||||
</if>
|
||||
<if test="sapNo != null and sapNo != ''">
|
||||
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
|
||||
</if>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="billNoCk != null and billNoCk != ''">
|
||||
AND ri.bill_no_ck LIKE CONCAT('%', #{billNoCk}, '%')
|
||||
</if>
|
||||
<if test="ckType != null and ckType != ''">
|
||||
AND ri.ck_type LIKE CONCAT('%', #{ckType}, '%')
|
||||
</if>
|
||||
<if test="pcode != null and pcode != ''">
|
||||
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
|
||||
</if>
|
||||
<if test="fycde1 != null and fycde1 != ''">
|
||||
AND ri.fycde_1 LIKE CONCAT('%', #{fycde1}, '%')
|
||||
</if>
|
||||
<if test="fycde2 != null and fycde2 != ''">
|
||||
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
<!-- ✅ 核心排序规则 -->
|
||||
ORDER BY
|
||||
COALESCE(ri.ly_time, ri.rk_time) DESC,
|
||||
ri.id DESC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectDeliveryCkList"
|
||||
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
||||
|
||||
Reference in New Issue
Block a user