Browse Source

0412更新

master
ruanqi 2 years ago
parent
commit
1b1e41dfb2
  1. 27
      src/main/java/com/heai/modules/production/entity/HunlianData.java
  2. 10
      src/main/resources/mapper/production/DailyPlanMapper.xml

27
src/main/java/com/heai/modules/production/entity/HunlianData.java

@ -35,6 +35,9 @@ public class HunlianData extends HunlianTaskHeaderData {
private String issurePartNo;
private String issurePartDesc;
private Double qtyIssure;
private Double returnQty;
private Double returnPercent;
private Double realQty;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date sScheduledDate;
@ -233,4 +236,28 @@ public class HunlianData extends HunlianTaskHeaderData {
public void setQtyIssure(Double qtyIssure) {
this.qtyIssure = qtyIssure;
}
public Double getReturnQty() {
return returnQty;
}
public void setReturnQty(Double returnQty) {
this.returnQty = returnQty;
}
public Double getReturnPercent() {
return returnPercent;
}
public void setReturnPercent(Double returnPercent) {
this.returnPercent = returnPercent;
}
public Double getRealQty() {
return realQty;
}
public void setRealQty(Double realQty) {
this.realQty = realQty;
}
}

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

@ -1233,10 +1233,12 @@
</select>
<select id="getHunlianTaskIssure" resultType="com.heai.modules.production.entity.HunlianData">
select b.SeqNo,b.S_ScheduledDate,b.operatorId,round( sum( case when c.Direction='-' then c.TransQty else c.TransQty* (-1.0) end ),2) as issureQty,
dbo.Get_OperatorDesc(a.site,b.operatorId) operatorName
select b.SeqNo,b.S_ScheduledDate,b.operatorId,round( sum( case when c.Direction='-' then c.TransQty else 0 end ),2) as issureQty,
dbo.Get_OperatorDesc(a.site,b.operatorId) operatorName ,b.partNo,dbo.Get_Part_SpecDesc(a.site,b.partNo) partDesc,
round( sum( case when c.Direction='+' then c.TransQty else 0 end ),2) as returnQty,
round(sum( case when c.Direction='+' then c.TransQty else 0 end )*100/sum( case when c.Direction='-' then c.TransQty else 0 end ),2) as returnPercent
, round( sum( case when c.Direction='-' then c.TransQty else 0 end )-sum( case when c.Direction='+' then c.TransQty else 0 end ),2) as realQty
from TransDetail a
left join TransDetail c on a.Site=c.Site and a.PartNo=c.PartNo and a.BatchNo=c.BatchNo and c.TransNo like 'SI%' and c.OrderRef3 is not null
@ -1247,7 +1249,7 @@
where b.SeqNo is not null and a.TransNo like 'SR%' and a.Direction='+' and c.TransNo is not null and a.orderRef1=#{orderRef1} and a.site=#{site}
group by a.site,b.SeqNo,b.S_ScheduledDate,b.operatorId
group by a.site,b.SeqNo,b.S_ScheduledDate,b.operatorId,b.partNo
</select>
<select id="liuhuaIssureAndReport" resultType="com.heai.modules.production.entity.HunlianData">

Loading…
Cancel
Save