|
|
|
@ -19,7 +19,7 @@ |
|
|
|
<result property="labelType" column="label_type"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<!-- 查询当天的盘点单列表 --> |
|
|
|
<!-- 查询盘点单列表(默认查询未完成的盘点单) --> |
|
|
|
<select id="queryTodayCountingList" resultType="map"> |
|
|
|
SELECT |
|
|
|
cr.site, |
|
|
|
@ -46,11 +46,11 @@ |
|
|
|
FROM counting_report cr |
|
|
|
WHERE cr.site IN (SELECT site FROM AccessSite WHERE UPPER(userID) = #{userName}) |
|
|
|
AND cr.bu_no IN (SELECT bu_no FROM AccessBu WHERE username = #{userName}) |
|
|
|
AND CONVERT(varchar(10), cr.plan_date, 120) = CONVERT(varchar(10), GETDATE(), 120) |
|
|
|
AND cr.status IN (0, 1, 2) -- 只查询未完成的盘点单(草稿、盘点中、待核销) |
|
|
|
<if test="reportId != null and reportId != ''"> |
|
|
|
AND cr.report_id LIKE '%' + #{reportId} + '%' |
|
|
|
</if> |
|
|
|
ORDER BY cr.create_date DESC |
|
|
|
ORDER BY cr.plan_date DESC, cr.create_date DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 根据盘点单号查询WIP数据 --> |
|
|
|
|