From 51336f0b15a5a1d650d195becac9b98139b2bf6b Mon Sep 17 00:00:00 2001 From: Rui_Li <877258667@qq.com> Date: Wed, 9 Feb 2022 11:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=8D=B7BUG=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../schedule/service/impl/ScheduleServiceImpl.java | 8 ++++++-- src/main/resources/mapper/schedule/ScheduleMapper.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java b/src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java index 829647e..fa90822 100644 --- a/src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java +++ b/src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java @@ -382,6 +382,8 @@ public class ScheduleServiceImpl implements ScheduleService { if (curTime < startTime) { result.put("code", "500"); result.put("shiftDesc", "无班次"); + result.put("shiftNo", ""); + result.put("scheduledDate", ""); break; } else if (curTime >= startTime && curTime <= endTime) { result = resultList.get(i); @@ -1757,6 +1759,7 @@ public class ScheduleServiceImpl implements ScheduleService { Float editNewRollQty = pageData.getEditNewRollQty(); String scheduledDate = pageData.getScheduledDate(); String shiftDesc = pageData.getShiftDesc(); + String shiftNo = pageData.getShiftNo(); //判断报工的数量是否为正整数 Double remainderQty = approvedQty % 1.0; @@ -1787,7 +1790,7 @@ public class ScheduleServiceImpl implements ScheduleService { throw new RRException("为扫描主材不可结束卷!"); } //1.调用存储过程 校验工单 派工单 上机卷 信息是否符合条件 - Map checkMap1 = this.checkFinishRollWithScheduleOpsShift(site, orderNo, itemNo, seqNo, rollNo, scheduledDate, shiftDesc); + Map checkMap1 = this.checkFinishRollWithScheduleOpsShift(site, orderNo, itemNo, seqNo, rollNo, scheduledDate, shiftNo); //判断是否检验成功 String code1 = String.valueOf(checkMap1.get("resultCode")); if ("400".equalsIgnoreCase(code1)) { @@ -2211,6 +2214,7 @@ public class ScheduleServiceImpl implements ScheduleService { Integer itemNo = inData.getItemNo(); String seqNo = inData.getSeqNo(); String scheduledDate = inData.getScheduledDate(); + String shiftNo = inData.getShiftNo(); String shiftDesc = inData.getShiftDesc(); Float reportedQty = inData.getApprovedQty();//总良品数量 Float defectedQty = inData.getDefectedQty();//总不良数量 @@ -2219,7 +2223,7 @@ public class ScheduleServiceImpl implements ScheduleService { //调用存储过程 //1.调用存储过程 派工单 上机卷 班次的检验 - Map checkMap = this.checkFinishScheduleWithScheduleOpsShift(site, orderNo, itemNo, seqNo, scheduledDate, shiftDesc); + Map checkMap = this.checkFinishScheduleWithScheduleOpsShift(site, orderNo, itemNo, seqNo, scheduledDate, shiftNo); //区分是否抛出异常的信息 String checkCode = String.valueOf(checkMap.get("resultCode")); if ("400".equalsIgnoreCase(checkCode)) { diff --git a/src/main/resources/mapper/schedule/ScheduleMapper.xml b/src/main/resources/mapper/schedule/ScheduleMapper.xml index 54f702e..9062938 100644 --- a/src/main/resources/mapper/schedule/ScheduleMapper.xml +++ b/src/main/resources/mapper/schedule/ScheduleMapper.xml @@ -683,7 +683,7 @@ where WR.Site=CE.Site and WR.CalendarID=CE.CalendarID and CE.Site=CES.Site and CE.CalendarID=CES.CalendarID and CE.ScheduleDate=CES.ScheduleDate and WR.Site='1' - and WR.ResourceID='QW-01' + and WR.ResourceID= #{resourceId} and CONVERT(Decimal(20,6),CE.ScheduleDate)=]]>Convert(Decimal(20,6),Convert(datetime, #{currentDate}))-1 and CONVERT(Decimal(20,6),CE.ScheduleDate)Convert(Decimal(20,6),Convert(datetime, #{currentDate}))+1 Order by CE.ScheduleDate,CES.StartTime