功能重构开发
This commit is contained in:
@@ -189,6 +189,65 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectStockStatisticByCondition"
|
||||
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticVO">
|
||||
|
||||
SELECT
|
||||
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS total_amount,
|
||||
COUNT(DISTINCT ri.pcode) AS location_count,
|
||||
IFNULL(SUM(ri.real_qty), 0) AS total_quantity
|
||||
FROM rk_info ri
|
||||
<where>
|
||||
ri.exec_status = 1
|
||||
AND ri.is_chuku = 0
|
||||
AND ri.is_delete = 0
|
||||
|
||||
<if test="operationType != null and operationType != ''">
|
||||
AND ri.operation_type LIKE CONCAT('%', #{operationType}, '%')
|
||||
</if>
|
||||
<if test="sapNo != null and sapNo != ''">
|
||||
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
|
||||
</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="gysMc != null and gysMc != ''">
|
||||
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
||||
</if>
|
||||
<if test="pcode != null and pcode != ''">
|
||||
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
|
||||
</if>
|
||||
<if test="bizType != null and bizType != ''">
|
||||
AND ri.biz_type LIKE CONCAT('%', #{bizType}, '%')
|
||||
</if>
|
||||
<if test="wlType != null and wlType != ''">
|
||||
AND ri.wl_type LIKE CONCAT('%', #{wlType}, '%')
|
||||
</if>
|
||||
<if test="cangku != null and cangku != ''">
|
||||
AND ri.cangku LIKE CONCAT('%', #{cangku}, '%')
|
||||
</if>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
AND ri.operation_time >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
AND ri.operation_time <= #{endDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- ========================= 删除 ========================= -->
|
||||
<delete id="deleteRkInfoById" parameterType="Long">
|
||||
DELETE FROM rk_info WHERE id = #{id}
|
||||
@@ -327,6 +386,7 @@
|
||||
return_time = #{returnTime},
|
||||
update_time = NOW()
|
||||
WHERE id = #{id}
|
||||
AND is_delete = '0'
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user