页面上的出库量与领料单里的出库量不一致问题修改

This commit is contained in:
cwchen 2025-03-18 18:25:37 +08:00
parent 5f94050bba
commit 0f55010fa3
1 changed files with 10 additions and 2 deletions

View File

@ -92,14 +92,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
sai.agreement_id = #{agreementId}
<if test="startTime != null">
AND start_time &lt;= #{endTime}
AND (end_time &gt;= #{startTime} OR end_time IS NULL)
AND(
DATE_FORMAT(start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startTime},'%Y-%m-%d') AND DATE_FORMAT(#{endTime},'%Y-%m-%d') OR
DATE_FORMAT(start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startTime},'%Y-%m-%d') AND DATE_FORMAT(#{endTime},'%Y-%m-%d')
)
</if>
<if test="typeId != null">
and sai.type_id = #{typeId}
</if>
<if test="maName != null and maName!=''">
AND INSTR(mt2.type_name,#{maName}) >0
</if>
<if test="typeName != null and typeName!=''">
AND INSTR(mt.type_name,#{typeName}) >0
</if>
) rs
GROUP BY rs.typeId,rs.startTime
ORDER BY rs.maName