Browse Source

20250521

master
qiezi 8 months ago
parent
commit
48a68e7a26
  1. 3
      src/main/java/com/heai/modules/production/entity/OrderViewData.java
  2. 61
      src/main/resources/mapper/production/SoScheduledListMapper.xml

3
src/main/java/com/heai/modules/production/entity/OrderViewData.java

@ -36,4 +36,7 @@ public class OrderViewData {
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date firstReportDate;
private String customerDesc;
private String customerId;
}

61
src/main/resources/mapper/production/SoScheduledListMapper.xml

@ -178,42 +178,51 @@
</select>
<select id="getOrderView" resultType="OrderViewData">
SELECT site,a.OrderNo,dbo.Get_Part_Spec(a.site,a.PartNo) partSpec,dbo.Get_orderView_liuhuaReportTime(a.site,a.OrderNo) as firstReportDate,
Round(isnull(dbo.Get_orderView_liuhuaReport(a.site,a.OrderNo),0),3) as liuhuaReport ,
Round(isnull(dbo.Get_orderView_liuhuaFinish(a.site,a.OrderNo),0),3) as liuhuaFinish ,
Round(isnull(dbo.Get_orderView_routeReport(a.site,a.OrderNo,'修边'),0),3) as xiubianReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site,a.OrderNo,'烘烤'),0),3) as hongkaoReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site,a.OrderNo,'检验'),0),3) as jianyanReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site,a.OrderNo,'加工'),0),3) as jiagongReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site,a.OrderNo,'包装'),0),3) as baozhuangReport,
Round(FinishedQty,3) FinishedQty ,
LotSize,NeedDate
SELECT site,
a.OrderNo,
dbo.Get_Part_Spec(a.site, a.PartNo) partSpec,
dbo.Get_orderView_liuhuaReportTime(a.site, a.OrderNo) as firstReportDate,
Round(isnull(dbo.Get_orderView_liuhuaReport(a.site, a.OrderNo), 0), 3) as liuhuaReport,
Round(isnull(dbo.Get_orderView_liuhuaFinish(a.site, a.OrderNo), 0), 3) as liuhuaFinish,
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '修边'), 0), 3) as xiubianReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '烘烤'), 0), 3) as hongkaoReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '检验'), 0), 3) as jianyanReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '加工'), 0), 3) as jiagongReport,
Round(isnull(dbo.Get_orderView_routeReport(a.site, a.OrderNo, '包装'), 0), 3) as baozhuangReport,
Round(FinishedQty, 3) as FinishedQty,
dbo.Get_CustomerDesc(a.Site, a.CustomerID) as customerDesc,
LotSize,
NeedDate
FROM ShopOrder a
<where>
<where>
AND a.PartNo like 'FP%'
AND a.status != '已取消' and a.status != '已计划'
AND a.status != '已取消'
and a.status != '已计划'
<if test="partNo != null and partNo != ''">
and a.partNo like #{partNo}
and a.partNo like #{partNo}
</if>
<if test="site != null and site != ''">
and site=#{site}
<if test="site != null and site != ''">
and site = #{site}
</if>
<if test="orderNo != null and orderNo != ''">
and a.orderNo like #{orderNo}
<if test="orderNo != null and orderNo != ''">
and a.orderNo like #{orderNo}
</if>
<if test="closedFlag != null and closedFlag != ''">
and a.status != '已关闭'
<if test="closedFlag != null and closedFlag != ''">
and a.status != '已关闭'
</if>
<if test="partSpec != null and partSpec != ''">
and dbo.Get_Part_Spec(a.site,a.PartNo) like #{partSpec}
<if test="partSpec != null and partSpec != ''">
and dbo.Get_Part_Spec(a.site, a.PartNo) like #{partSpec}
</if>
<if test="startDate != null ">
AND a.EnterDate >= #{startDate}
<if test="startDate != null">
AND a.EnterDate >= #{startDate}
</if>
<if test="endDate != null ">
AND #{endDate} >= DATEADD(dd, -1, a.EnterDate)
<if test="endDate != null">
AND #{endDate} >= DATEADD(dd, -1, a.EnterDate)
</if>
</where>
<if test="customerId != null and customerId != ''">
AND a.CustomerID like #{customerId}
</if>
</where>
</select>

Loading…
Cancel
Save