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. 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 map;
// return R.ok().put("rows", list).put("total",list.size()); // 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 * @Description TODO
* @Title getStockPrintList * @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; private String planStatus;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @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; private Date orderDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date planShipDate;
private BigDecimal lastApproveQty; private BigDecimal lastApproveQty;
private String finishFlag; private String finishFlag;
private Double weight; private Double weight;
@ -297,4 +306,28 @@ public class ShopOrderRoutingData extends ShopOrderData{
public void setPartPlanQty(Double partPlanQty) { public void setPartPlanQty(Double partPlanQty) {
this.partPlanQty = 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;
}
} }

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, 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, 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, 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 FROM ShopOrder a
LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site 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 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 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 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 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> <where>
and uwc.WorkCenterNo is not null and uwc.WorkCenterNo is not null
and a.E_Levels =0 and a.E_Levels =0
@ -249,6 +250,12 @@
</if> </if>
<if test="endDate3 != null "> <if test="endDate3 != null ">
AND #{endDate3} >= a.NeedDate AND #{endDate3} >= a.NeedDate
</if>
<if test="startDate4 != null ">
AND cod.PlanShipDate >= #{startDate4}
</if>
<if test="endDate4 != null ">
AND #{endDate4} >= cod.PlanShipDate
</if> </if>
<if test="partNo != null and partNo != ''"> <if test="partNo != null and partNo != ''">
AND a.PartNo LIKE #{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, 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, 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, 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 FROM SOTaskOrderHeader a
LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site 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 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 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 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> <where>
and uwc.WorkCenterNo is not null and uwc.WorkCenterNo is not null
<if test="site != null and site != ''"> <if test="site != null and site != ''">
@ -309,6 +318,18 @@
<if test="finishFlag != null and finishFlag != ''"> <if test="finishFlag != null and finishFlag != ''">
AND a.FinishFlag=#{finishFlag} AND a.FinishFlag=#{finishFlag}
</if> </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> </where>
order by a.OrderDate desc,s.itemNo order by a.OrderDate desc,s.itemNo
</select> </select>

Loading…
Cancel
Save