Browse Source

2026-03-26

产线产量采集报表页面优化
master
fengyuan_yang 3 months ago
parent
commit
38d8ecf532
  1. 20
      src/main/resources/mapper/shopOrder/ProductionReportMapper.xml

20
src/main/resources/mapper/shopOrder/ProductionReportMapper.xml

@ -237,6 +237,9 @@
<if test=" sResourceID != null and sResourceID != ''"> <if test=" sResourceID != null and sResourceID != ''">
AND SS.S_ResourceID like '%' + #{sResourceID} + '%' AND SS.S_ResourceID like '%' + #{sResourceID} + '%'
</if> </if>
<if test=" assJobSeqNo != null and assJobSeqNo != ''">
AND T.AssJobSeqNo = #{assJobSeqNo}
</if>
<if test=" date1 != null "> <if test=" date1 != null ">
AND T.ReportDate >= #{date1} AND T.ReportDate >= #{date1}
</if> </if>
@ -259,33 +262,36 @@
and T.Site=S.Site and T.OrderNo=S.OrderNo and T.Site=R.Site and T.OrderNo=R.OrderNo and T.ItemNo=R.ItemNo and s.Site=p.Site and T.Site=S.Site and T.OrderNo=S.OrderNo and T.Site=R.Site and T.OrderNo=R.OrderNo and T.ItemNo=R.ItemNo and s.Site=p.Site
and s.PartNo=p.PartNo and R.Site=W.Site and R.WorkCenterNo=W.WorkCenterNo and T.Site=O.Site and T.OperatorID=O.OperatorID and s.PartNo=p.PartNo and R.Site=W.Site and R.WorkCenterNo=W.WorkCenterNo and T.Site=O.Site and T.OperatorID=O.OperatorID
and T.Site=R.Site and T.OrderNo=R.OrderNo and T.ItemNo=R.ItemNo and T.Site=R.Site and T.OrderNo=R.OrderNo and T.ItemNo=R.ItemNo
and T.Site in (Select Site from AccessSite where upper(UserID)=#{user})
and T.Site in (Select Site from AccessSite where upper(UserID)=#{user})
AND T.Reverseflag = 'N' AND T.Reverseflag = 'N'
<if test=" site != null and site != ''"> <if test=" site != null and site != ''">
AND T.Site = #{site} AND T.Site = #{site}
</if> </if>
<if test=" partNo != null and partNo != ''">
<if test=" partNo != null and partNo != ''">
AND s.PartNo like '%' + #{partNo} + '%' AND s.PartNo like '%' + #{partNo} + '%'
</if> </if>
<if test=" partDescription != null and partDescription != ''">
<if test=" partDescription != null and partDescription != ''">
AND p.PartDescription+' / '+p.Spec like '%' + #{partDescription} + '%' AND p.PartDescription+' / '+p.Spec like '%' + #{partDescription} + '%'
</if> </if>
<if test=" orderNo != null and orderNo != ''"> <if test=" orderNo != null and orderNo != ''">
AND T.OrderNo = #{orderNo} AND T.OrderNo = #{orderNo}
</if> </if>
<if test=" operatorID != null and operatorID != ''">
<if test=" operatorID != null and operatorID != ''">
AND T.OperatorID like '%' + #{operatorID} + '%' AND T.OperatorID like '%' + #{operatorID} + '%'
</if> </if>
<if test=" workCenterNo != null and workCenterNo != ''">
<if test=" workCenterNo != null and workCenterNo != ''">
AND R.WorkcenterNo like '%' + #{workCenterNo} + '%' AND R.WorkcenterNo like '%' + #{workCenterNo} + '%'
</if> </if>
<if test=" sResourceID != null and sResourceID != ''"> <if test=" sResourceID != null and sResourceID != ''">
AND SS.S_ResourceID like '%' + #{sResourceID} + '%' AND SS.S_ResourceID like '%' + #{sResourceID} + '%'
</if> </if>
<if test=" date1 != null ">
<if test=" assJobSeqNo != null and assJobSeqNo != ''">
AND T.AssJobSeqNo = #{assJobSeqNo}
</if>
<if test=" date1 != null ">
AND T.ReportDate >= #{date1} AND T.ReportDate >= #{date1}
</if> </if>
<if test=" date2 != null ">
<if test=" date2 != null ">
AND dateadd( DAY, 1, #{date2} ) > T.ReportDate AND dateadd( DAY, 1, #{date2} ) > T.ReportDate
</if> </if>
</where> </where>

Loading…
Cancel
Save