|
|
|
@ -633,6 +633,42 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void checkCreateNewSfdcRoll(SearchScheduleData inData) { |
|
|
|
//公共参数 |
|
|
|
String site = inData.getSite(); |
|
|
|
String orderNo = inData.getOrderNo(); |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
|
|
|
|
//调用存储过程判断是否可以继续创建新卷 |
|
|
|
Map<String, Object> resultMap = this.checkCreateNewSfdcRoll(site, orderNo, itemNo, seqNo); |
|
|
|
//判断是否检验成功 |
|
|
|
String resultCode = String.valueOf(resultMap.get("resultCode")); |
|
|
|
if ("400".equalsIgnoreCase(resultCode)) { |
|
|
|
String msg = String.valueOf(resultMap.get("resultMsg")); |
|
|
|
throw new RRException(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author LR |
|
|
|
* @Description |
|
|
|
* @DateTime 2022/2/24 13:55 |
|
|
|
* @Param [site, orderNo, itemNo, seqNo] |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
**/ |
|
|
|
public Map<String, Object> checkCreateNewSfdcRoll(String site, String orderNo, Integer itemNo, String seqNo) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
params.add(itemNo); |
|
|
|
params.add(seqNo); |
|
|
|
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("checkCreateNewSfdcRoll", params); |
|
|
|
return resultList.get(0); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void createNewRoll(SearchScheduleData inData) { |
|
|
|
@ -641,8 +677,13 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String orderNo = inData.getOrderNo(); |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
//String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String workCenterNo = inData.getWorkCenterNo(); |
|
|
|
//先调用存储过程 判断是否可以创建新卷 |
|
|
|
this.checkCreateNewSfdcRoll(inData); |
|
|
|
|
|
|
|
//执行插入新卷属的操作 |
|
|
|
//获取rollId和normalRollId |
|
|
|
Map<String, Object> tempMap = scheduleMapper.getRollIdAndNormalRollIdByCon(inData); |
|
|
|
//判断null |
|
|
|
@ -671,7 +712,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
sfdcRollData.setItemNo(itemNo); |
|
|
|
sfdcRollData.setRollNo(currentRollNo); |
|
|
|
sfdcRollData.setCreatedDate(new Date()); |
|
|
|
sfdcRollData.setCreatedBy(username); |
|
|
|
sfdcRollData.setCreatedBy(operatorId); |
|
|
|
sfdcRollData.setOriRollNo(currentRollNo); |
|
|
|
sfdcRollData.setRemark(""); |
|
|
|
sfdcRollData.setStartOpsItemNo(itemNo); |
|
|
|
@ -697,13 +738,13 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
scheduleMapper.insertSfdcRolls(sfdcRollData); |
|
|
|
|
|
|
|
//插入sfdcRollOps的数据 |
|
|
|
SfdcRollOpsData sfdcRollOpsData = new SfdcRollOpsData(username, new Date(), "N", "N", 0f, 0f, "N"); |
|
|
|
SfdcRollOpsData sfdcRollOpsData = new SfdcRollOpsData(operatorId, new Date(), "N", "N", 0f, 0f, "N"); |
|
|
|
//设置继承的参数 |
|
|
|
sfdcRollOpsData.setSite(site); |
|
|
|
sfdcRollOpsData.setOrderNo(orderNo); |
|
|
|
sfdcRollOpsData.setItemNo(itemNo); |
|
|
|
sfdcRollOpsData.setRollNo(currentRollNo); |
|
|
|
sfdcRollOpsData.setScanedBy(username); |
|
|
|
sfdcRollOpsData.setScanedBy(operatorId); |
|
|
|
sfdcRollOpsData.setScanedDate(new Date()); |
|
|
|
sfdcRollOpsData.setSeqNo(seqNo); |
|
|
|
sfdcRollOpsData.setFinishedFlag("N"); |
|
|
|
@ -718,7 +759,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(itemNo); |
|
|
|
params.add(seqNo); |
|
|
|
params.add(currentRollNo); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
params.add(DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
//刷新时间表的记录 |
|
|
|
procedureMapper.execProduceData("refreshSfdcTimeHistRollNo", params); |
|
|
|
@ -753,8 +794,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("getSfdcRollSerialNo", params); |
|
|
|
//处理结果集 |
|
|
|
Map<String, Object> resultMap = resultList.get(0); |
|
|
|
String rollNo = String.valueOf(resultMap.get("rollNo")); |
|
|
|
return rollNo; |
|
|
|
return String.valueOf(resultMap.get("rollNo")); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -789,14 +829,14 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//首先校验是否可以开始调机 |
|
|
|
this.checkStartTuning(site, orderNo, itemNo, seqNo, rollNo); |
|
|
|
|
|
|
|
//执行存储过程开始调机 |
|
|
|
this.startTuning(site, orderNo, itemNo, seqNo, rollNo, username, currentTime); |
|
|
|
this.startTuning(site, orderNo, itemNo, seqNo, rollNo, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -875,7 +915,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String downTimeCode = inData.getDownTimeCode(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String operatorName = inData.getOperatorName(); |
|
|
|
String reportDate = inData.getReportDate(); |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
String operateTime = reportDate + " " + reportTime.substring(0, 5); |
|
|
|
@ -884,7 +925,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
this.checkDownTimeCode(inData); |
|
|
|
|
|
|
|
//调用存储过程执行报告停机内容 |
|
|
|
this.reportDownTime(site, orderNo, itemNo, seqNo, rollNo, downTimeCode, username, operateTime, totalTime); |
|
|
|
this.reportDownTime(site, orderNo, itemNo, seqNo, rollNo, downTimeCode, operatorId, operateTime, totalTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1091,14 +1132,15 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String toolInstanceId = inData.getToolInstanceId(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//首先调用检查方法 |
|
|
|
this.checkToolInstanceId(inData); |
|
|
|
|
|
|
|
//调用存储过程生成记录的数据 |
|
|
|
this.addToolInstanceId(site, orderNo, itemNo, seqNo, rollNo, toolInstanceId, username, currentTime); |
|
|
|
this.addToolInstanceId(site, orderNo, itemNo, seqNo, rollNo, toolInstanceId, username, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1109,7 +1151,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @date 2021/12/29 18:37 |
|
|
|
**/ |
|
|
|
public void addToolInstanceId(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, String toolInstanceId, |
|
|
|
String username, String currentTime) { |
|
|
|
String username, String operatorId, String currentTime) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -1118,6 +1160,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(rollNo); |
|
|
|
params.add(toolInstanceId); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
params.add(currentTime); |
|
|
|
procedureMapper.execProduceData("addToolInstanceId", params); |
|
|
|
} |
|
|
|
@ -1229,14 +1272,14 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String rmRollNo = inData.getRmRollNo(); |
|
|
|
Integer bomItemNo = inData.getBomItemNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//先调用检查方法是否通过 |
|
|
|
this.checkFeedingMaterialRoll(inData); |
|
|
|
|
|
|
|
//调用存储过程执行上料方法 |
|
|
|
this.feedingMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, bomItemNo, username, currentTime); |
|
|
|
this.feedingMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, bomItemNo, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1367,7 +1410,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String reportDate = inData.getReportDate(); |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
String operateTime = reportDate + " " + reportTime.substring(0, 5); |
|
|
|
@ -1375,7 +1418,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
this.checkStartProduce(inData); |
|
|
|
|
|
|
|
//如果可以开始生产在调用存储过程 |
|
|
|
this.startProduce(site, orderNo, itemNo, seqNo, rollNo, username, operateTime); |
|
|
|
this.startProduce(site, orderNo, itemNo, seqNo, rollNo, operatorId, operateTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1411,7 +1454,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = pageData.getItemNo(); |
|
|
|
String seqNo = pageData.getSeqNo(); |
|
|
|
String rollNo = pageData.getRollNo(); |
|
|
|
String username = pageData.getOperatorId(); |
|
|
|
String username = pageData.getUsername(); |
|
|
|
String operatorId = pageData.getOperatorId(); |
|
|
|
String reportDate = pageData.getReportDate(); |
|
|
|
String reportTime = pageData.getReportTime(); |
|
|
|
String currentTime = reportDate + " " + reportTime; |
|
|
|
@ -1462,11 +1506,11 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Float transQty = sfdcMaterialData.getTransQty(); |
|
|
|
Float netIssueQty = sfdcMaterialData.getNetIssueQty(); |
|
|
|
//调用存储过程结束当前材料卷的调机过程 |
|
|
|
this.endTuning(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, rmPartNo, histSeqNo, transQty, netIssueQty, keyRMFlag, sapBomItemNo, startFromRollNo, username, currentTime); |
|
|
|
this.endTuning(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, rmPartNo, histSeqNo, transQty, netIssueQty, keyRMFlag, sapBomItemNo, startFromRollNo, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
//执行开始生产的存储过程 |
|
|
|
this.startProduce(site, orderNo, itemNo, seqNo, rollNo, username, currentTime); |
|
|
|
this.startProduce(site, orderNo, itemNo, seqNo, rollNo, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1599,7 +1643,9 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String oriToolInstanceId = inData.getOriToolInstanceId(); |
|
|
|
String toolInstanceId = inData.getToolInstanceId(); |
|
|
|
Integer histSeqNo = inData.getHistSeqNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String operatorName = inData.getOperatorName(); |
|
|
|
String reportDate = inData.getReportDate(); |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
String currentTime = reportDate + " " + reportTime; |
|
|
|
@ -1609,7 +1655,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Map<String, Object> resultMap = this.checkConnectToolInstanceId(inData); |
|
|
|
|
|
|
|
//然后执行存储过程换刀 |
|
|
|
this.connectToolInstanceId(site, orderNo, itemNo, seqNo, rollNo, oriToolInstanceId, toolInstanceId, histSeqNo, consumeQty, downTimeQty, username, currentTime); |
|
|
|
this.connectToolInstanceId(site, orderNo, itemNo, seqNo, rollNo, oriToolInstanceId, toolInstanceId, histSeqNo, consumeQty, downTimeQty, username, operatorId, operatorName, currentTime); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -1621,7 +1667,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @date 2022/1/19 15:14 |
|
|
|
**/ |
|
|
|
public void connectToolInstanceId(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, String oriToolInstanceId, String toolInstanceId, |
|
|
|
Integer histSeqNo, Float consumeQty, Float downTimeQty, String username, String currentTime) { |
|
|
|
Integer histSeqNo, Float consumeQty, Float downTimeQty, String username, String operatorId, String operatorName, String currentTime) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -1634,6 +1680,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(consumeQty); |
|
|
|
params.add(downTimeQty); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
params.add(operatorName); |
|
|
|
params.add(currentTime); |
|
|
|
//执行存储过程 |
|
|
|
procedureMapper.execProduceData("connectToolInstanceId", params); |
|
|
|
@ -1714,12 +1762,12 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
String currentTime = reportDate + " " + reportTime; |
|
|
|
Float downTimeQty = inData.getDownTimeQty(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
//首先调用上面是的验证方法 |
|
|
|
this.checkConnectMaterialRoll(inData); |
|
|
|
|
|
|
|
//调用存储过程执行 |
|
|
|
this.connectMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, bomItemNo, histSeqNo, downTimeQty, username, currentTime); |
|
|
|
this.connectMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, bomItemNo, histSeqNo, downTimeQty, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1760,7 +1808,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = pageData.getItemNo(); |
|
|
|
String seqNo = pageData.getSeqNo(); |
|
|
|
String rollNo = pageData.getRollNo(); |
|
|
|
String username = pageData.getOperatorId(); |
|
|
|
String username = pageData.getUsername(); |
|
|
|
String operatorId = pageData.getOperatorId(); |
|
|
|
Float approvedQty = pageData.getApprovedQty(); |
|
|
|
Float editReportQty = pageData.getSfdcReportedQty(); |
|
|
|
Float editTotalReportQty = pageData.getTotalQty();//总数量 |
|
|
|
@ -1957,7 +2006,9 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = pageData.getItemNo(); |
|
|
|
String seqNo = pageData.getSeqNo(); |
|
|
|
String rollNo = pageData.getRollNo(); |
|
|
|
String username = pageData.getOperatorId(); |
|
|
|
String username = pageData.getUsername(); |
|
|
|
String operatorId = pageData.getOperatorId(); |
|
|
|
String operatorName = pageData.getOperatorName(); |
|
|
|
Float editTotalReportQty = pageData.getTotalQty();//总数量 |
|
|
|
Float totalApprovedQty = pageData.getApprovedQty();//总良数量 |
|
|
|
Float otherRollQty = pageData.getOtherRollQty(); |
|
|
|
@ -1982,25 +2033,25 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
this.checkFinishRollWithNoFqc(inMap); |
|
|
|
|
|
|
|
//1.调用存储过程 处理SfdcTimeHist的信息 |
|
|
|
this.finishRollProcessSfdcTimeHist(site, orderNo, itemNo, seqNo, rollNo, username, reportedTime); |
|
|
|
this.finishRollProcessSfdcTimeHist(site, orderNo, itemNo, seqNo, rollNo, operatorId, reportedTime); |
|
|
|
//2.调用存储过程 处理SfdcToolHist的信息 |
|
|
|
this.finishRollProcessSfdcToolHist(site, orderNo, itemNo, seqNo, rollNo, editTotalReportQty, username, reportedTime); |
|
|
|
this.finishRollProcessSfdcToolHist(site, orderNo, itemNo, seqNo, rollNo, editTotalReportQty, operatorId, operatorName, reportedTime); |
|
|
|
//3.调用存储过程 处理SfdcMaterialHist的信息 --主材 |
|
|
|
//循环for循环处理 |
|
|
|
for (int i = 0; i < sfdcMaterialList.size(); i++) { |
|
|
|
SfdcMaterialData sfdcMaterialData = sfdcMaterialList.get(0); |
|
|
|
Float netIssueQty = sfdcMaterialData.getNetIssueQty(); |
|
|
|
Integer histSeqNo = sfdcMaterialData.getHistSeqNo(); |
|
|
|
this.finishRollProcessSfdcMaterialHistWithKeyRm(site, orderNo, itemNo, seqNo, rollNo, netIssueQty, histSeqNo, username, reportedTime); |
|
|
|
this.finishRollProcessSfdcMaterialHistWithKeyRm(site, orderNo, itemNo, seqNo, rollNo, netIssueQty, histSeqNo, operatorId, reportedTime); |
|
|
|
} |
|
|
|
//4.调用存储过程 处理SfdcMaterialHist的信息 --非主材 |
|
|
|
this.finishRollProcessSfdcMaterialHistWithNotKeyRm(site, orderNo, itemNo, seqNo, rollNo, username, reportedTime); |
|
|
|
this.finishRollProcessSfdcMaterialHistWithNotKeyRm(site, orderNo, itemNo, seqNo, rollNo, operatorId, reportedTime); |
|
|
|
//5.调用存储过程 处理SfdcRoll和SfdcRoollOps |
|
|
|
this.finishRollProcessSfdcRollAndOps(site, orderNo, itemNo, seqNo, rollNo, totalApprovedQty, sfdcApprovedQty, defectedQty, username, reportedTime); |
|
|
|
this.finishRollProcessSfdcRollAndOps(site, orderNo, itemNo, seqNo, rollNo, totalApprovedQty, sfdcApprovedQty, defectedQty, operatorName, reportedTime); |
|
|
|
//6.调用存储过程 处理Sfdc和派工单 |
|
|
|
this.finishRollProcessSfdcAndSchedule(site, orderNo, itemNo, seqNo, rollNo, sfdcReportedQty, sfdcApprovedQty, |
|
|
|
sfdcSetupTime, sfdcProdTime, sfdcDownTime, eventTime, tillTime, remark, |
|
|
|
sfdcSetupDownTime, sfdcProdSetupTime, defectedQty, sfdcManufactureTime, username); |
|
|
|
sfdcSetupDownTime, sfdcProdSetupTime, defectedQty, sfdcManufactureTime, operatorId); |
|
|
|
//7.调用存储过程 处理异常信息 |
|
|
|
if ("Y".equalsIgnoreCase(exceptionFlag)) { |
|
|
|
this.finishRollProcessException(site, orderNo, itemNo, seqNo, rollNo, exceptionReason, username); |
|
|
|
@ -2134,7 +2185,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @DateTime 2022/1/25 15:31 |
|
|
|
* @Param [site, orderNo, itemNo, seqNo, rollNo, editTotalReportQty, username, reportedTime] |
|
|
|
**/ |
|
|
|
public void finishRollProcessSfdcToolHist(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, Float editTotalReportQty, String username, String reportedTime) { |
|
|
|
public void finishRollProcessSfdcToolHist(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, Float editTotalReportQty, |
|
|
|
String operatorId, String operatorName, String reportedTime) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -2142,7 +2194,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(seqNo); |
|
|
|
params.add(rollNo); |
|
|
|
params.add(editTotalReportQty); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
params.add(operatorName); |
|
|
|
params.add(reportedTime); |
|
|
|
//执行存储过程 |
|
|
|
procedureMapper.execProduceData("finishRollProcessSfdcToolHist", params); |
|
|
|
@ -2229,7 +2282,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Float reportedQty = inData.getApprovedQty();//总良品数量 |
|
|
|
Float defectedQty = inData.getDefectedQty();//总不良数量 |
|
|
|
String autoTool = inData.getAutoTool();//是否自动结束工具记录 |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
|
|
|
|
//调用存储过程 |
|
|
|
//1.调用存储过程 派工单 上机卷 班次的检验 |
|
|
|
@ -2336,7 +2390,9 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String shiftDesc = inData.getShiftDesc(); |
|
|
|
Float reportedQty = inData.getApprovedQty();//总良品数量 |
|
|
|
Float defectedQty = inData.getDefectedQty();//总不良数量 |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String operatorName = inData.getOperatorName(); |
|
|
|
String reportedTime = inData.getReportedTime(); |
|
|
|
String exceptionFlag = inData.getExceptionFlag(); |
|
|
|
String exceptionReason = inData.getExceptionReason(); |
|
|
|
@ -2348,15 +2404,15 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
// 1. 调用存储过程 处理工具的信息 |
|
|
|
this.finishScheduleProcessSfdcToolHist(site, orderNo, itemNo, seqNo, reportedTime); |
|
|
|
// 2. 调用存储过程 处理时间的信息 |
|
|
|
Map<String, Object> timeMap = this.finishScheduleProcessSfdcTimeHist(site, orderNo, itemNo, seqNo, username, reportedTime); |
|
|
|
Map<String, Object> timeMap = this.finishScheduleProcessSfdcTimeHist(site, orderNo, itemNo, seqNo, operatorId, reportedTime); |
|
|
|
//获取最后的序号 |
|
|
|
int histSeqNo = Integer.parseInt(String.valueOf(timeMap.get("histSeqNo"))); |
|
|
|
//3.调用存储过程处理 材料历史记录数据 以及原材料的数据 |
|
|
|
this.finishScheduleProcessSfdcMaterialHist(site, orderNo, itemNo, seqNo, reportedTime); |
|
|
|
//4.调用存储过程处理 派工单和sfdc的信息 |
|
|
|
this.finishScheduleProcessSfdcAndSchedule(site, orderNo, itemNo, seqNo, histSeqNo, shiftDesc, username, reportedTime, scheduledDate); |
|
|
|
this.finishScheduleProcessSfdcAndSchedule(site, orderNo, itemNo, seqNo, histSeqNo, shiftDesc, username, operatorId, reportedTime, scheduledDate); |
|
|
|
//5.调用存储过程处理 transHeader TransDetail TransDetailSub数据 |
|
|
|
this.finishScheduleProcessTransData(site, orderNo, itemNo, seqNo, username, reportedTime); |
|
|
|
this.finishScheduleProcessTransData(site, orderNo, itemNo, seqNo, username, operatorName, reportedTime); |
|
|
|
//6.调用存储过程 处理异常信息 |
|
|
|
if ("Y".equalsIgnoreCase(exceptionFlag)) { |
|
|
|
this.finishScheduleProcessException(site, orderNo, itemNo, seqNo, exceptionReason, username, reportedTime); |
|
|
|
@ -2394,13 +2450,14 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @Param [site, orderNo, itemNo, seqNo, username, reportedTime] |
|
|
|
* @return void |
|
|
|
**/ |
|
|
|
public void finishScheduleProcessTransData(String site, String orderNo, Integer itemNo, String seqNo, String username, String reportedTime) { |
|
|
|
public void finishScheduleProcessTransData(String site, String orderNo, Integer itemNo, String seqNo, String username, String operatorName, String reportedTime) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
params.add(itemNo); |
|
|
|
params.add(seqNo); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorName); |
|
|
|
params.add(reportedTime); |
|
|
|
//调用存储过程 |
|
|
|
procedureMapper.getProcedureData("finishScheduleProcessTransData", params); |
|
|
|
@ -2413,7 +2470,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @Param [site, orderNo, itemNo, seqNo, histSeqNo, shiftDesc, username, reportedTime, scheduledDate] |
|
|
|
* @return void |
|
|
|
**/ |
|
|
|
public void finishScheduleProcessSfdcAndSchedule(String site, String orderNo, Integer itemNo, String seqNo, int histSeqNo, String shiftDesc, String username, String reportedTime, String scheduledDate) { |
|
|
|
public void finishScheduleProcessSfdcAndSchedule(String site, String orderNo, Integer itemNo, String seqNo, int histSeqNo, String shiftDesc, |
|
|
|
String username, String operatorId, String reportedTime, String scheduledDate) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -2422,6 +2480,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(histSeqNo); |
|
|
|
params.add(shiftDesc); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
params.add(reportedTime); |
|
|
|
params.add(scheduledDate); |
|
|
|
//调用存储过程 |
|
|
|
@ -2574,7 +2633,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String rmRollNo = inData.getRmRollNo(); |
|
|
|
String rmPartNo = inData.getRmPartNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
Float transQty = inData.getTransQty(); |
|
|
|
Integer histSeqNo = inData.getHistSeqNo(); |
|
|
|
@ -2583,7 +2642,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
this.checkCuttingMaterial(inData); |
|
|
|
|
|
|
|
//调用存储过程 执行材料下料的功能 |
|
|
|
this.processCuttingMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, rmPartNo, transQty, histSeqNo, username, currentTime); |
|
|
|
this.processCuttingMaterialRoll(site, orderNo, itemNo, seqNo, rollNo, rmRollNo, rmPartNo, transQty, histSeqNo, operatorId, currentTime); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -2620,7 +2679,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
//调用存储过程 执行打开卷的操作 根据状态判断是否成功过 |
|
|
|
Map<String, Object> resultMap = this.workBenchReopenRoll(site, orderNo, itemNo, seqNo, rollNo, username); |
|
|
|
@ -2662,7 +2721,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String oriRollNo = inData.getOriRollNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//调用存储过程 执行删除卷的操作 根据状态判断是否成功过 |
|
|
|
@ -2705,7 +2764,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String newRollNo = inData.getNewRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//1. 存储过程 切换卷 校验是否可以继续进行 --顾总写的 |
|
|
|
@ -2782,7 +2841,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String newRollNo = inData.getNewRollNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String currentTime = DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
//调用校验的的方法 |
|
|
|
@ -2831,7 +2890,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String reportDate = inData.getReportDate(); |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
Float rollQty = inData.getRollQty(); |
|
|
|
@ -2912,7 +2971,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = inData.getItemNo(); |
|
|
|
String seqNo = inData.getSeqNo(); |
|
|
|
String rollNo = inData.getRollNo(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
String reportDate = inData.getReportDate(); |
|
|
|
String reportTime = inData.getReportTime(); |
|
|
|
Float rollQty = inData.getRollQty(); |
|
|
|
@ -3168,7 +3228,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Integer itemNo = pageData.getItemNo(); |
|
|
|
String seqNo = pageData.getSeqNo(); |
|
|
|
String rollNo = pageData.getRollNo(); |
|
|
|
String username = pageData.getOperatorId(); |
|
|
|
String username = pageData.getUsername(); |
|
|
|
String operatorId = pageData.getOperatorId(); |
|
|
|
Float defectedQty = pageData.getDefectedQty(); |
|
|
|
|
|
|
|
Float sfdcReportedQty = pageData.getSfdcReportedQty();//报告数量 |
|
|
|
@ -3190,7 +3251,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
//1.调用存储过程 处理Sfdc和派工单 |
|
|
|
this.finishPartRollProcessSfdcAndSchedule(site, orderNo, itemNo, seqNo, rollNo, sfdcReportedQty, sfdcApprovedQty, |
|
|
|
sfdcSetupTime, sfdcProdTime, sfdcDownTime, eventTime, tillTime, remark, |
|
|
|
sfdcSetupDownTime, sfdcProdSetupTime, defectedQty, sfdcManufactureTime, username); |
|
|
|
sfdcSetupDownTime, sfdcProdSetupTime, defectedQty, sfdcManufactureTime, operatorId); |
|
|
|
//2.调用存储过程 处理异常信息 |
|
|
|
if ("Y".equalsIgnoreCase(exceptionFlag)) { |
|
|
|
this.finishRollProcessException(site, orderNo, itemNo, seqNo, rollNo, exceptionReason, username); |
|
|
|
@ -3336,7 +3397,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Float newRollQty = inData.getNewRollQty(); |
|
|
|
boolean newRollFlag = inData.isNewRollFlag(); |
|
|
|
Float editReportQty = inData.getSfdcReportedQty(); |
|
|
|
String username = inData.getOperatorId(); |
|
|
|
String username = inData.getUsername(); |
|
|
|
String operatorId = inData.getOperatorId(); |
|
|
|
|
|
|
|
//1.先校验当前卷 |
|
|
|
inData.setNewRollFlag(false); |
|
|
|
@ -3346,7 +3408,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
Map<String, Object> newMap = this.checkMergeSfdcRoll(inData); |
|
|
|
|
|
|
|
//校验完成调用存储过程 |
|
|
|
Map<String, Object> resultMap = this.processMergeSfdcRoll(site, orderNo, itemNo, seqNo, rollNo, newRollNo, rollQty, newRollQty, "N", "", username); |
|
|
|
Map<String, Object> resultMap = this.processMergeSfdcRoll(site, orderNo, itemNo, seqNo, rollNo, newRollNo, rollQty, newRollQty, "N", username, operatorId); |
|
|
|
//判断是否检验成功 |
|
|
|
String resultCode = String.valueOf(resultMap.get("resultCode")); |
|
|
|
if ("400".equalsIgnoreCase(resultCode)) { |
|
|
|
@ -3362,7 +3424,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.Object> |
|
|
|
**/ |
|
|
|
public Map<String, Object> processMergeSfdcRoll(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, String newRollNo, Float rollQty, |
|
|
|
Float newRollQty, String rePackFlag, String userId, String username) { |
|
|
|
Float newRollQty, String rePackFlag, String username, String operatorId) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -3373,8 +3435,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(rollQty); |
|
|
|
params.add(newRollQty); |
|
|
|
params.add(rePackFlag); |
|
|
|
params.add(userId); |
|
|
|
params.add(username); |
|
|
|
params.add(operatorId); |
|
|
|
//调用存储过程 |
|
|
|
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("combineroll_action", params); |
|
|
|
//处理返回的结果 |
|
|
|
|