diff --git a/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java b/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java index 15305df..37ca6f1 100644 --- a/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java +++ b/src/main/java/com/heai/modules/production/dao/DailyPlanMapper.java @@ -319,6 +319,8 @@ public interface DailyPlanMapper { * @throw */ List checkSfdcTimeHistData(StartSeqNoData inData); + + Integer getHistSeqNo(StartSeqNoData inData); /** * @Description 保存开始生产 * @Title saveSfdcTimeHistDataStart diff --git a/src/main/java/com/heai/modules/production/entity/GenerateReportData.java b/src/main/java/com/heai/modules/production/entity/GenerateReportData.java index d46a6f8..36c22e7 100644 --- a/src/main/java/com/heai/modules/production/entity/GenerateReportData.java +++ b/src/main/java/com/heai/modules/production/entity/GenerateReportData.java @@ -29,11 +29,11 @@ public class GenerateReportData { private String workCenterDesc; - private Integer qtyRequired; + private String qtyRequired; - private Integer qtyReported; + private String qtyReported; - private Integer qtyApprove; + private String qtyApprove; private BigDecimal timeRequired; diff --git a/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java b/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java index d46f361..da2ef0f 100644 --- a/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java +++ b/src/main/java/com/heai/modules/production/service/impl/DailyPlanServiceImpl.java @@ -712,6 +712,13 @@ public class DailyPlanServiceImpl implements DailyPlanService { @Override public SOScheduledRoutingOutData searchSeqNo(SOScheduledRoutingOutData inData){ + StartSeqNoData startSeqNoData=new StartSeqNoData(); + startSeqNoData.setSeqNo(inData.getSeqNo()); + startSeqNoData.setSite(inData.getSite()); + List checkSfdcTimeHistData =dailyPlanMapper.checkSfdcTimeHistData(startSeqNoData); + if(checkSfdcTimeHistData.size()==0){ + throw new RuntimeException("派工单未开始生产!"); + } SOScheduledRoutingOutData result =dailyPlanMapper.searchSeqNo(inData); return result; } @@ -726,6 +733,8 @@ public class DailyPlanServiceImpl implements DailyPlanService { if(checkSfdcTimeHistData.size()>0){ throw new RuntimeException("派工单已经开始生产无需再次开始!"); } + Integer histSeqNo=dailyPlanMapper.getHistSeqNo(inData); + sfdcTimeHistData.setHistSeqNo(histSeqNo); dailyPlanMapper.saveSfdcTimeHistDataStart(sfdcTimeHistData); } } diff --git a/src/main/resources/mapper/production/DailyPlanMapper.xml b/src/main/resources/mapper/production/DailyPlanMapper.xml index 8d042e8..488f110 100644 --- a/src/main/resources/mapper/production/DailyPlanMapper.xml +++ b/src/main/resources/mapper/production/DailyPlanMapper.xml @@ -324,7 +324,7 @@ update ScheduleList set scheduledQty=scheduledQty+#{sumQty} where Site=#{site} and OrderNo=#{orderNo} and itemNo=#{itemNo} and type=#{scheduleType} + insert into SFDC_TimeHist (Site,OrderNo,ItemNo,SeqNo,HistSeqNo,EventTime,Enteredby,EventDesc,DowntimeCode,EventType,LinkHistSeqNo,TillTime,TillEnteredTime, TillEnteredBy,CompletedFlag,TotalTime,DowntimePhaseIn,RollNo) values - (#{site},#{orderNo},#{itemNo},#{seqNo},1,GetDate(),#{enteredby},'开始生产','','P',null,null,null,null,'N',0,'','*') + (#{site},#{orderNo},#{itemNo},#{seqNo},#{histSeqNo},GetDate(),#{enteredby},'开始生产','','P',null,null,null,null,'N',0,'','*') \ No newline at end of file