Browse Source

0412更新

master
ruanqi 3 years ago
parent
commit
c2a2e4f320
  1. 16
      src/main/java/com/heai/modules/board/controller/BoardController.java
  2. 33
      src/main/java/com/heai/modules/production/entity/ShopOrderRoutingData.java
  3. 42
      src/main/resources/mapper/board/BoardMapper.xml
  4. 25
      src/main/resources/mapper/production/DailyPlanMapper.xml

16
src/main/java/com/heai/modules/board/controller/BoardController.java

@ -256,7 +256,21 @@ public class BoardController {
return map;
// return R.ok().put("rows", list).put("total",list.size());
}
/**
* @Description TODO
* @Title getPrintsList
* @param
* @author rq
* @date 2022/9/25 20:46
* @return R
* @throw
*/
@GetMapping("/getPrintsList/{ip}")
public R getPrintsList(@PathVariable("ip") String ip) {
List<OutBoxPrintData> resultList2=boardService.getOutBoxPrintData(ip);
List<PackagePrintData> resultList3=boardService.getPackagePrintData(ip);
return R.ok().put("rows2", resultList2).put("rows3", resultList3);
}
/**
* @Description TODO
* @Title getStockPrintList

33
src/main/java/com/heai/modules/production/entity/ShopOrderRoutingData.java

@ -47,7 +47,16 @@ public class ShopOrderRoutingData extends ShopOrderData{
private String planStatus;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate4;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate4;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date orderDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planShipDate;
private BigDecimal lastApproveQty;
private String finishFlag;
private Double weight;
@ -297,4 +306,28 @@ public class ShopOrderRoutingData extends ShopOrderData{
public void setPartPlanQty(Double partPlanQty) {
this.partPlanQty = partPlanQty;
}
public Date getPlanShipDate() {
return planShipDate;
}
public void setPlanShipDate(Date planShipDate) {
this.planShipDate = planShipDate;
}
public Date getStartDate4() {
return startDate4;
}
public void setStartDate4(Date startDate4) {
this.startDate4 = startDate4;
}
public Date getEndDate4() {
return endDate4;
}
public void setEndDate4(Date endDate4) {
this.endDate4 = endDate4;
}
}

42
src/main/resources/mapper/board/BoardMapper.xml

@ -226,27 +226,27 @@
<select id="getPackagePrintData" resultType="com.heai.modules.production.entity.PackagePrintData">
Select T.Site,T.OrderNo+'-'+Convert(Varchar(4),T.ItemNo) as TransNo,T.SeqNo as ItemNo,SO.PartNo,dbo.Get_PartDesc(T.Site,SO.PartNo) as PartDesc
,dbo.Get_Part_Spec(T.Site,SO.PartNo) as PartSpec
,dbo.Get_Part_UMID(T.Site,SO.PartNo) as umid
,T.Remark,CH.CustomerPONo as OrderRef4
,Convert(Datetime,Convert(Integer,Convert(Float,T.StatisticDate))) as ReceiveDate
,isnull((Select OurVendorCode from Customer as C Where C.Site=CH.Site and C.CustomerID=CH.CustomerID),'') as SiteName,t.OrderNo as BatchNo
,T.OperatorID as Inspector,s1.Address_E as siteAdress ,'Phone:'+s1.PhoneNo+' Email:'+s1.Email as sitePhone
,convert(varchar(100),isnull(V.TextValue,'')) as bilNote,pi.id,pi.printQty,pi.UnitQty,SUBSTRING(LabelType, 5, 10) code from print_info
from SFDC as T left join print_info pi on pi.Site=T.site and pi.status!='Y' and pi.orderRef1=T.OrderNo and pi.orderRef2=CONVERT(VARCHAR(10),T.ItemNo )
and pi.orderRef3=CONVERT(VARCHAR(10),T.SeqNo )
,ShopOrder as SO
Left Join COHeader as CH On CH.Site=SO.Site and CH.OrderNo=SO.OrderRef1
left join site s1 on s1.SiteID=SO.Site
,Part as P
Left Join PartSubPropertiesValue as V
On P.Site=V.Site and P.PartNo=V.PartNo and P.CodeNo=V.CodeNo and V.SubCodeSeqNo=1 and V.RecordType='P' and V.PropertiesItemNo='BILNOTE'
,Site as S
Where T.Site=S.SiteID and T.Site=SO.Site and T.OrderNo=SO.OrderNo
and SO.Site=P.Site and SO.PartNo=P.PartNo
AND pi.status='N' and pi.LabelType like '产品标签%' AND ComputerName=#{ip}
,dbo.Get_Part_Spec(T.Site,SO.PartNo) as PartSpec
,dbo.Get_Part_UMID(T.Site,SO.PartNo) as umid
,T.Remark,CH.CustomerPONo as OrderRef4
,Convert(Datetime,Convert(Integer,Convert(Float,T.StatisticDate))) as ReceiveDate
,isnull((Select OurVendorCode from Customer as C Where C.Site=CH.Site and C.CustomerID=CH.CustomerID),'') as SiteName,t.OrderNo as BatchNo
,T.OperatorID as Inspector,s1.Address_E as siteAdress ,'Phone:'+s1.PhoneNo+' Email:'+s1.Email as sitePhone
,convert(varchar(100),isnull(V.TextValue,'')) as bilNote,pi.id,pi.printQty,pi.UnitQty,SUBSTRING(LabelType, 5, 10) code from print_info
from SFDC as T left join print_info pi on pi.Site=T.site and pi.status!='Y' and pi.orderRef1=T.OrderNo and pi.orderRef2=CONVERT(VARCHAR(10),T.ItemNo )
and pi.orderRef3=CONVERT(VARCHAR(10),T.SeqNo )
,ShopOrder as SO
Left Join COHeader as CH On CH.Site=SO.Site and CH.OrderNo=SO.OrderRef1
left join site s1 on s1.SiteID=SO.Site
,Part as P
Left Join PartSubPropertiesValue as V
On P.Site=V.Site and P.PartNo=V.PartNo and P.CodeNo=V.CodeNo and V.SubCodeSeqNo=1 and V.RecordType='P' and V.PropertiesItemNo='BILNOTE'
,Site as S
Where T.Site=S.SiteID and T.Site=SO.Site and T.OrderNo=SO.OrderNo
and SO.Site=P.Site and SO.PartNo=P.PartNo
AND pi.status='N' and pi.LabelType like '产品标签%' AND ComputerName=#{ip}
</select>
</mapper>

25
src/main/resources/mapper/production/DailyPlanMapper.xml

@ -213,13 +213,14 @@
select a.site, a.OrderNo,a.PartNo,a.Status,a.PlanStartDate,a.NeedDate,a.LotSize,a.EnterDate,a.UserName,
P.PartDescription+'/'+isnull(P.Spec,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.qtyReported,S.qtyApprove,S.machSetupTime,
S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,isnull(SOP.TotalFinishedQty,0) lastApproveQty,dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo) weightFactor,
Round(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo)*a.LotSize,2) weight,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderNo) partPlanQty
Round(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo)*a.LotSize,2) weight,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderNo) partPlanQty,cod.PlanShipDate
FROM ShopOrder a
LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site
LEFT JOIN SORouting S on S.site=a.site and S.OrderNo=a.orderNo
LEFT JOIN ScheduleList SL on S.site=SL.site and S.OrderNo=SL.orderNo and S.ItemNo=SL.ItemNo
LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,S.itemNo)
left join user_work_center uwc on a.site=uwc.site and s.workCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId}
left join CODetail cod on a.site=cod.site and a.orderRef1=cod.OrderNo and a.orderRef2= CONVERT(VARCHAR(10),cod.ItemNo)
<where>
and uwc.WorkCenterNo is not null
and a.E_Levels =0
@ -249,6 +250,12 @@
</if>
<if test="endDate3 != null ">
AND #{endDate3} >= a.NeedDate
</if>
<if test="startDate4 != null ">
AND cod.PlanShipDate >= #{startDate4}
</if>
<if test="endDate4 != null ">
AND #{endDate4} >= cod.PlanShipDate
</if>
<if test="partNo != null and partNo != ''">
AND a.PartNo LIKE #{partNo}
@ -271,12 +278,14 @@
select a.site, a.OrderNo,a.PartNo,a.Status,a.OrderRef1,a.OrderDate,a.OrderQty as LotSize,
P.PartDescription+'/'+isnull(P.Spec,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.machSetupTime,
S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,a.qtyfinished,a.finishFlag,ROUND(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderRef1)*a.OrderQty,2) as weight,
dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderRef1) as weightFactor,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderRef1) partPlanQty
dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderRef1) as weightFactor,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderRef1) partPlanQty,so.needDate,cod.PlanShipDate
FROM SOTaskOrderHeader a
LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site
LEFT JOIN SORouting S on S.site=a.site and S.OrderNo=a.OrderRef1
LEFT JOIN ScheduleList SL on S.site=SL.site and a.OrderNo=SL.orderNo and S.ItemNo=SL.ItemNo
left join user_work_center uwc on a.site=uwc.site and s.workCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId}
LEFT JOIN ShopOrder so on a.OrderRef1=so.OrderNo and a.site=so.site
left join CODetail cod on so.site=cod.site and so.orderRef1=cod.OrderNo and so.orderRef2= CONVERT(VARCHAR(10),cod.ItemNo)
<where>
and uwc.WorkCenterNo is not null
<if test="site != null and site != ''">
@ -309,6 +318,18 @@
<if test="finishFlag != null and finishFlag != ''">
AND a.FinishFlag=#{finishFlag}
</if>
<if test="startDate3 != null ">
AND so.NeedDate >= #{startDate3}
</if>
<if test="endDate3 != null ">
AND #{endDate3} >= so.NeedDate
</if>
<if test="startDate4 != null ">
AND cod.PlanShipDate >= #{startDate4}
</if>
<if test="endDate4 != null ">
AND #{endDate4} >= cod.PlanShipDate
</if>
</where>
order by a.OrderDate desc,s.itemNo
</select>

Loading…
Cancel
Save