Browse Source

0412更新

master
ruanqi 2 years ago
parent
commit
0b904f2108
  1. 19
      src/main/java/com/heai/modules/production/entity/SOScheduledRoutingOutData.java
  2. 49
      src/main/resources/mapper/production/DailyPlanMapper.xml
  3. 2
      src/main/resources/static/js/pda/transferWarehousing2.js

19
src/main/java/com/heai/modules/production/entity/SOScheduledRoutingOutData.java

@ -91,7 +91,8 @@ public class SOScheduledRoutingOutData {
* *
*/ */
private String remark; private String remark;
private Double machRunFactor;
private Double xiaolv;
/** /**
* *
*/ */
@ -809,5 +810,21 @@ public class SOScheduledRoutingOutData {
public void setWorkTime(Double workTime) { public void setWorkTime(Double workTime) {
this.workTime = workTime; this.workTime = workTime;
} }
public Double getMachRunFactor() {
return machRunFactor;
}
public void setMachRunFactor(Double machRunFactor) {
this.machRunFactor = machRunFactor;
}
public Double getXiaolv() {
return xiaolv;
}
public void setXiaolv(Double xiaolv) {
this.xiaolv = xiaolv;
}
} }

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

@ -452,15 +452,18 @@
</select> </select>
<select id="getSOScheduleRoutingData" resultType="SOScheduledRoutingOutData"> <select id="getSOScheduleRoutingData" resultType="SOScheduledRoutingOutData">
select a.Site,OrderNo,ItemNo,SeqNo,QtyRequired,QtyReported,QtyApprove,TimeRequired,TimeReported,previousSeqNo,previousBatchNo,materSeqNo,
BarcodeID,Remark,Crewsize,ClosedFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
S_WorkCenterNo, EnteredDate,scheduleType,operatorId,partNo,dbo.Get_Part_SpecDesc(a.Site,partNo) as partDesc,
dbo.Get_OperatorDesc(a.Site,operatorId) as operatorName,dbo.Get_ItemDesc(a.Site,OrderNo,ItemNo) as itemDesc,orderRef1 ,
dbo.Get_WorkCenterDesc(a.Site,S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_SpecDesc(a.Site,partNo) as partSpec,circulation_seqNo,circulation_qty
,dbo.Get_PartWeightFactorForReport(a.site,PartNo,OrderNo) as weightFactor,dbo.Get_Part_UMID(a.Site,PartNo) umid,a.jobType,
case when a.worktime is not null and a.worktime>0 then Round(QtyReported/a.worktime,2) else 0 end as efficiency,Round(isnull(a.workTime,0),2) workTime,
Round(dbo.Get_PartWeightFactorForReport(a.site,PartNo,OrderNo)*QtyRequired,2) as weight from SOScheduledRouting a
select a.Site,a.OrderNo,a.ItemNo,a.SeqNo,a.QtyRequired,a.QtyReported,a.QtyApprove,a.TimeRequired,a.TimeReported,a.previousSeqNo,a.previousBatchNo,a.materSeqNo,
a.BarcodeID,a.Remark,a.Crewsize,a.ClosedFlag,a.S_ScheduledDate,a.S_ResourceID,a.S_ScheduledSeqNo,a.S_ShiftNo,
a.S_WorkCenterNo, a.EnteredDate,a.scheduleType,a.operatorId,a.partNo,dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partDesc,
dbo.Get_OperatorDesc(a.Site,a.operatorId) as operatorName,dbo.Get_ItemDesc(a.Site,a.OrderNo,a.ItemNo) as itemDesc,a.orderRef1 ,
dbo.Get_WorkCenterDesc(a.Site,a.S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partSpec,a.circulation_seqNo,a.circulation_qty
,dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo) as weightFactor,dbo.Get_Part_UMID(a.Site,a.PartNo) umid,a.jobType,
case when a.worktime is not null and a.worktime>0 then Round(a.QtyReported/a.worktime,2) else 0 end as efficiency,Round(isnull(a.workTime,0),2) workTime,
Round(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo)*a.QtyRequired,2) as weight ,c.MachRunFactor
,case when 0>=c.MachRunFactor then 0 else Round(a.QtyReported*100/case when isnull(a.worktime,0.1)=0 then 0.1 else a.worktime end/c.MachRunFactor,2) end as xiaolv
from SOScheduledRouting a
left join user_work_center uwc on a.site=uwc.site and a.S_WorkCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId} left join user_work_center uwc on a.site=uwc.site and a.S_WorkCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId}
left join SORouting c on a.Site=c.Site and a.orderNo=c.orderNo and a.itemNo=c.itemNo
<where> <where>
and uwc.WorkCenterNo is not null and uwc.WorkCenterNo is not null
@ -468,50 +471,50 @@
AND a.site = #{site} AND a.site = #{site}
</if> </if>
<if test="orderNo != null and orderNo != ''"> <if test="orderNo != null and orderNo != ''">
AND OrderNo LIKE #{orderNo}
AND a.OrderNo LIKE #{orderNo}
</if> </if>
<if test="partDesc != null and partDesc != ''"> <if test="partDesc != null and partDesc != ''">
AND dbo.Get_Part_SpecDesc(a.Site,partNo) LIKE #{partDesc}
AND dbo.Get_Part_SpecDesc(a.Site,a.partNo) LIKE #{partDesc}
</if> </if>
<if test="seqNo != null "> <if test="seqNo != null ">
AND seqNo = #{seqNo}
AND a.seqNo = #{seqNo}
</if> </if>
<if test="partNo != null and partNo != ''"> <if test="partNo != null and partNo != ''">
AND PartNo LIKE #{partNo}
AND a.PartNo LIKE #{partNo}
</if> </if>
<if test="sWorkCenterNo != null and sWorkCenterNo != ''"> <if test="sWorkCenterNo != null and sWorkCenterNo != ''">
AND S_WorkCenterNo LIKE #{sWorkCenterNo}
AND a.S_WorkCenterNo LIKE #{sWorkCenterNo}
</if> </if>
<if test="itemNo != null and itemNo != ''"> <if test="itemNo != null and itemNo != ''">
and ItemNo = #{itemNo}
and a.ItemNo = #{itemNo}
</if> </if>
<if test="itemDesc != null and itemDesc != ''"> <if test="itemDesc != null and itemDesc != ''">
and dbo.Get_ItemDesc(a.Site,OrderNo,ItemNo) = #{itemDesc}
and dbo.Get_ItemDesc(a.Site,a.OrderNo,a.ItemNo) = #{itemDesc}
</if> </if>
<if test="closedFlag != null and closedFlag != ''"> <if test="closedFlag != null and closedFlag != ''">
and ClosedFlag = #{closedFlag}
and a.ClosedFlag = #{closedFlag}
</if> </if>
<if test="startDate != null "> <if test="startDate != null ">
and S_ScheduledDate >= #{startDate}
and a.S_ScheduledDate >= #{startDate}
</if> </if>
<if test="endDate != null "> <if test="endDate != null ">
and #{endDate} >= S_ScheduledDate
and #{endDate} >= a.S_ScheduledDate
</if> </if>
<if test="scheduleType != null and scheduleType != ''"> <if test="scheduleType != null and scheduleType != ''">
and scheduleType = #{scheduleType}
and a.scheduleType = #{scheduleType}
</if> </if>
<if test="reportFlag != null and reportFlag != ''"> <if test="reportFlag != null and reportFlag != ''">
and ${reportFlag} and ${reportFlag}
</if> </if>
<if test="operatorName != null and operatorName != ''"> <if test="operatorName != null and operatorName != ''">
and dbo.Get_OperatorDesc(a.Site,operatorId) like #{operatorName}
and dbo.Get_OperatorDesc(a.Site,a.operatorId) like #{operatorName}
</if> </if>
<if test="sResourceID != null and sResourceID != ''"> <if test="sResourceID != null and sResourceID != ''">
and S_ResourceID like #{sResourceID}
and a.S_ResourceID like #{sResourceID}
</if> </if>
<if test="sShiftNo != null and sShiftNo != ''"> <if test="sShiftNo != null and sShiftNo != ''">
and S_ShiftNo = #{sShiftNo}
and a.S_ShiftNo = #{sShiftNo}
</if> </if>
<if test="previousSeqNo != null "> <if test="previousSeqNo != null ">
and a.previousSeqNo = #{previousSeqNo} and a.previousSeqNo = #{previousSeqNo}
@ -520,7 +523,7 @@
and a.materSeqNo = #{materSeqNo} and a.materSeqNo = #{materSeqNo}
</if> </if>
</where> </where>
order by S_ScheduledDate
order by a.S_ScheduledDate
</select> </select>
<select id="checkUserSeqNo" resultType="SOScheduledRoutingOutData"> <select id="checkUserSeqNo" resultType="SOScheduledRoutingOutData">
select seqNo ,CancelReportFlag,a.mat_issueflag,a.site,a.OrderNo,a.ItemNo,a.QtyRequired,a.S_WorkCenterNo,a.operatorId,a.partNo,dbo.Get_Part_Spec(a.site,a.partNo) PartSpec select seqNo ,CancelReportFlag,a.mat_issueflag,a.site,a.OrderNo,a.ItemNo,a.QtyRequired,a.S_WorkCenterNo,a.operatorId,a.partNo,dbo.Get_Part_Spec(a.site,a.partNo) PartSpec

2
src/main/resources/static/js/pda/transferWarehousing2.js

@ -275,7 +275,7 @@ function saveProduction(){
warehouseId : warehouseId, warehouseId : warehouseId,
partnerId : "", partnerId : "",
partNo : currentData.partNo, partNo : currentData.partNo,
batchNo : currentData.orderNo.substring(5)+'-'+strSeqNo.substring(strSeqNo.length-5),
batchNo : currentData.orderNo.substring(4)+'-'+strSeqNo.substring(strSeqNo.length-5),
locationId : locationId, locationId : locationId,
transQty : warehouseQty, transQty : warehouseQty,
userId : userId, userId : userId,

Loading…
Cancel
Save