Browse Source

结束卷BUG 修复

master
Rui_Li 4 years ago
parent
commit
51336f0b15
  1. 8
      src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java
  2. 2
      src/main/resources/mapper/schedule/ScheduleMapper.xml

8
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<String, Object> checkMap1 = this.checkFinishRollWithScheduleOpsShift(site, orderNo, itemNo, seqNo, rollNo, scheduledDate, shiftDesc);
Map<String, Object> 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<String, Object> checkMap = this.checkFinishScheduleWithScheduleOpsShift(site, orderNo, itemNo, seqNo, scheduledDate, shiftDesc);
Map<String, Object> checkMap = this.checkFinishScheduleWithScheduleOpsShift(site, orderNo, itemNo, seqNo, scheduledDate, shiftNo);
//区分是否抛出异常的信息
String checkCode = String.valueOf(checkMap.get("resultCode"));
if ("400".equalsIgnoreCase(checkCode)) {

2
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)<![CDATA[>=]]>Convert(Decimal(20,6),Convert(datetime, #{currentDate}))-1
and CONVERT(Decimal(20,6),CE.ScheduleDate)<![CDATA[<=]]>Convert(Decimal(20,6),Convert(datetime, #{currentDate}))+1
Order by CE.ScheduleDate,CES.StartTime

Loading…
Cancel
Save