Browse Source

修改

master
ruanqi 3 years ago
parent
commit
4e31b21254
  1. 9
      src/main/java/com/jianteng/modules/Schedule/entity/ShopOrderRoutingData.java
  2. 20
      src/main/java/com/jianteng/modules/Schedule/service/impl/ScheduleServiceImpl.java
  3. 9
      src/main/java/com/jianteng/modules/base/entity/DefectData.java
  4. 7
      src/main/resources/mapper/production/DailyPlanMapper.xml
  5. 14
      src/main/resources/mapper/schedule/ScheduleMapper.xml

9
src/main/java/com/jianteng/modules/Schedule/entity/ShopOrderRoutingData.java

@ -68,6 +68,7 @@ public class ShopOrderRoutingData extends ShopOrderData{
private String soremark; private String soremark;
private String planTypeDesc; private String planTypeDesc;
private String workCenterDesc; private String workCenterDesc;
private String productionLineDesc;
public float getItemNo() { public float getItemNo() {
return itemNo; return itemNo;
} }
@ -368,4 +369,12 @@ public class ShopOrderRoutingData extends ShopOrderData{
public void setPlanTypeDesc(String planTypeDesc) { public void setPlanTypeDesc(String planTypeDesc) {
this.planTypeDesc = planTypeDesc; this.planTypeDesc = planTypeDesc;
} }
public String getProductionLineDesc() {
return productionLineDesc;
}
public void setProductionLineDesc(String productionLineDesc) {
this.productionLineDesc = productionLineDesc;
}
} }

20
src/main/java/com/jianteng/modules/Schedule/service/impl/ScheduleServiceImpl.java

@ -286,17 +286,17 @@ public class ScheduleServiceImpl implements ScheduleService {
//----------检查下是否第一道工序 是否发料-----------------end //----------检查下是否第一道工序 是否发料-----------------end
//----------检查前道工序是否报工----------------- //----------检查前道工序是否报工-----------------
if(checkFirstItem.size()>0) { if(checkFirstItem.size()>0) {
//0326
//如果不是首道工序 需要记录上道派工单 //如果不是首道工序 需要记录上道派工单
if(result.getPreviousSeqNo()==null&&inData.getPreviousSeqNo()==null){
throw new RuntimeException("该派工单不是首道工序且未扫描交接派工单!请扫描上道派工单");
}
List<SORoutingData> checkLast = scheduleMapper.checkLastItemReport(result);
if(checkLast.size()>0){
if(checkLast.get(0).getQtyReported().doubleValue()<=0){
throw new RuntimeException("上道工序的派工单未报工无法开始生产");
}
}
// if(result.getPreviousSeqNo()==null&&inData.getPreviousSeqNo()==null){
// throw new RuntimeException("该派工单不是首道工序且未扫描交接派工单!请扫描上道派工单");
// }
// List<SORoutingData> checkLast = scheduleMapper.checkLastItemReport(result);
// if(checkLast.size()>0){
// if(checkLast.get(0).getQtyReported().doubleValue()<=0){
// throw new RuntimeException("上道工序的派工单未报工无法对接");
// }
// }
if(inData.getPreviousSeqNo()!=null){ if(inData.getPreviousSeqNo()!=null){
List<SfdcCancel> sfdcCheck=scheduleMapper.sfdcCheck(inData.getPreviousSeqNo()); List<SfdcCancel> sfdcCheck=scheduleMapper.sfdcCheck(inData.getPreviousSeqNo());
if(sfdcCheck.size()==0){ if(sfdcCheck.size()==0){

9
src/main/java/com/jianteng/modules/base/entity/DefectData.java

@ -8,6 +8,7 @@ public class DefectData {
*/ */
private String defectNo; private String defectNo;
private String defectCode; private String defectCode;
private Double defectQty;
/** /**
* *
*/ */
@ -72,5 +73,13 @@ public class DefectData {
public void setDefectCode(String defectCode) { public void setDefectCode(String defectCode) {
this.defectCode = defectCode; this.defectCode = defectCode;
} }
public Double getDefectQty() {
return defectQty;
}
public void setDefectQty(Double defectQty) {
this.defectQty = defectQty;
}
} }

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

@ -228,7 +228,7 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId,dispatched_hunlian FROM SOTaskOrde
P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.machSetupTime, P.Spec+'/'+isnull(P.PartDescription,'') 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, S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,a.qtyfinished,a.finishFlag,
so.needDate,dbo.Get_WorkCenterDesc( a.site,s.workCenterNo) WorkCenterDesc,so.remark soremark, so.needDate,dbo.Get_WorkCenterDesc( a.site,s.workCenterNo) WorkCenterDesc,so.remark soremark,
dbo.Get_ShopOrder_PlanerDesc(a.site,so.Planner) planTypeDesc
dbo.Get_ShopOrder_PlanerDesc(a.site,so.Planner) planTypeDesc,dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,s.workCenterNo)) ProductionLineDesc
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 v_SORouting S on S.site=a.site and S.OrderNo=a.OrderRef1 LEFT JOIN v_SORouting S on S.site=a.site and S.OrderNo=a.OrderRef1
@ -247,6 +247,9 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId,dispatched_hunlian FROM SOTaskOrde
</if> </if>
<if test="workCenterNo != null and workCenterNo != ''"> <if test="workCenterNo != null and workCenterNo != ''">
AND S.workCenterNo LIKE #{workCenterNo} AND S.workCenterNo LIKE #{workCenterNo}
</if>
<if test="productionLineDesc != null and productionLineDesc != ''">
AND dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,s.workCenterNo)) LIKE #{productionLineDesc}
</if> </if>
<if test="operationDesc != null and operationDesc != ''"> <if test="operationDesc != null and operationDesc != ''">
AND S.OperationDesc LIKE #{operationDesc} AND S.OperationDesc LIKE #{operationDesc}
@ -291,7 +294,7 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId,dispatched_hunlian FROM SOTaskOrde
<!-- AND #{endDate4} >= cod.PlanShipDate--> <!-- AND #{endDate4} >= cod.PlanShipDate-->
<!-- </if>--> <!-- </if>-->
</where> </where>
order by a.OrderDate desc,s.itemNo
order by a.OrderDate ,a.OrderNo,s.itemNo
</select> </select>
<select id="getWorkCenterOperatorList" resultType="OperatorData"> <select id="getWorkCenterOperatorList" resultType="OperatorData">

14
src/main/resources/mapper/schedule/ScheduleMapper.xml

@ -111,9 +111,9 @@
a.BarcodeID,a.Remark,a.Crewsize,a.ClosedFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo, a.BarcodeID,a.Remark,a.Crewsize,a.ClosedFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
S_WorkCenterNo, a.EnteredDate,a.scheduleType,a.operatorId,a.partNo,dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partDesc, 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,ItemNo) as itemDesc,a.orderRef1 , dbo.Get_OperatorDesc(a.Site,a.operatorId) as operatorName,dbo.Get_ItemDesc(a.Site,a.OrderNo,ItemNo) as itemDesc,a.orderRef1 ,
dbo.Get_WorkCenterDesc(a.Site,S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partSpec,a.circulation_seqNo,a.circulation_qty
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_Part_UMID(a.Site,a.PartNo) umid,b.lotSize ,b.customerId,a.ClosedDate,a.FirstWorkDate,a.printFlag,previousSeqNo ,dbo.Get_Part_UMID(a.Site,a.PartNo) umid,b.lotSize ,b.customerId,a.ClosedDate,a.FirstWorkDate,a.printFlag,previousSeqNo
,dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,a.S_WorkCenterNo)) ProductionLineDesc
from SOScheduledRouting a left join shopOrder b on a.OrderNo=b.OrderNo and a.site=b.site from SOScheduledRouting a left join shopOrder b on a.OrderNo=b.OrderNo and a.site=b.site
<!-- 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}-->
<where> <where>
@ -123,19 +123,21 @@
AND a.site = #{site} AND a.site = #{site}
</if> </if>
<if test="orderNo != null and orderNo != ''"> <if test="orderNo != null and orderNo != ''">
AND a.OrderNo LIKE '%' + #{orderNo} + '%'
AND a.OrderNo LIKE #{orderNo}
</if> </if>
<if test="seqNo != null "> <if test="seqNo != null ">
AND a.seqNo = #{seqNo} AND a.seqNo = #{seqNo}
</if> </if>
<if test="partNo != null and partNo != ''"> <if test="partNo != null and partNo != ''">
AND a.PartNo LIKE '%' + #{partNo} + '%'
AND a.PartNo LIKE #{partNo}
</if> </if>
<if test="sWorkCenterNo != null and sWorkCenterNo != ''"> <if test="sWorkCenterNo != null and sWorkCenterNo != ''">
AND a.S_WorkCenterNo LIKE '%'+#{sWorkCenterNo}+'%'
AND a.S_WorkCenterNo LIKE #{sWorkCenterNo}
</if>
<if test="productionLineDesc != null and productionLineDesc != ''">
AND dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,a.S_WorkCenterNo)) LIKE #{productionLineDesc}
</if> </if>
<if test="itemNo != null and itemNo != ''"> <if test="itemNo != null and itemNo != ''">
and a.ItemNo = #{itemNo} and a.ItemNo = #{itemNo}
</if> </if>

Loading…
Cancel
Save