|
|
|
@ -137,7 +137,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcTimeData> getSfdcTimeByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcTimeByCon(inData); |
|
|
|
@ -152,7 +152,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcToolData> getSfdcToolByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcToolByCon(inData); |
|
|
|
@ -166,7 +166,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
inData.setReferenceCustomerId(referenceCustomerId); |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getOrderBomByCon(inData); |
|
|
|
@ -176,7 +176,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcMaterialData> getSfdcMaterialByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcMaterialByCon(inData); |
|
|
|
@ -186,7 +186,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcRollOpsData> getSfdcRollOpsByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcRollOpsByCon(inData); |
|
|
|
@ -196,7 +196,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcDefectData> getSfdcDefectByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcDefectByCon(inData); |
|
|
|
@ -206,7 +206,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcRollData> getSfdcRollByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcRollByCon(inData); |
|
|
|
@ -216,7 +216,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcData> getSfdcDataByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getSfdcDataByCon(inData); |
|
|
|
@ -1968,27 +1968,27 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
String msg = String.valueOf(resultMap.get("resultMsg")); |
|
|
|
throw new RRException(msg); |
|
|
|
} |
|
|
|
if("Y".equals(pageData.getCreateNewRollFlag())){ |
|
|
|
if ("Y".equals(pageData.getCreateNewRollFlag())) { |
|
|
|
//调用存储过程校验每一个卷的数量 |
|
|
|
this.finishRollProcessSFDCNewRoll(site, orderNo, itemNo, rollNo, seqNo,pageData.getNewCreateRollQty(),pageData.getOperatorId() ); |
|
|
|
this.finishRollProcessSFDCNewRoll(site, orderNo, itemNo, rollNo, seqNo, pageData.getNewCreateRollQty(), pageData.getOperatorId()); |
|
|
|
} |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public void finishRollProcessSFDCNewRoll(String site, String orderNo, Integer itemNo, String seqNo, String rollNo,Double newRollQty,String operatorId){ |
|
|
|
public void finishRollProcessSFDCNewRoll(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, Double newRollQty, String operatorId) { |
|
|
|
|
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
params.add(itemNo); |
|
|
|
params.add(seqNo); |
|
|
|
params.add(rollNo); |
|
|
|
params.add(newRollQty); |
|
|
|
params.add(operatorId); |
|
|
|
//执行存储过程 |
|
|
|
procedureMapper.getProcedureData("finishRollProcessSFDCNewRoll", params); |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
params.add(itemNo); |
|
|
|
params.add(seqNo); |
|
|
|
params.add(rollNo); |
|
|
|
params.add(newRollQty); |
|
|
|
params.add(operatorId); |
|
|
|
//执行存储过程 |
|
|
|
procedureMapper.getProcedureData("finishRollProcessSFDCNewRoll", params); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -2048,7 +2048,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @DateTime 2022/1/25 13:55 |
|
|
|
* @Param [site, orderNo, itemNo, seqNo, rollNo] // todo 添加是否创建新卷参数 sxm 2022 -3-15 |
|
|
|
**/ |
|
|
|
public Map<String, Object> checkFinishRollWithSfdcRoll(String site, String orderNo, Integer itemNo, String seqNo, String rollNo,String createNewRollFlag) { |
|
|
|
public Map<String, Object> checkFinishRollWithSfdcRoll(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, String createNewRollFlag) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -2136,12 +2136,12 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
//4.调用存储过程 处理SfdcMaterialHist的信息 --非主材 |
|
|
|
this.finishRollProcessSfdcMaterialHistWithNotKeyRm(site, orderNo, itemNo, seqNo, rollNo, operatorId, reportedTime); |
|
|
|
//5.调用存储过程 处理SfdcRoll和SfdcRoollOps todo sxm 2022 -3 -15 添加参数 是否创建新卷 |
|
|
|
this.finishRollProcessSfdcRollAndOps(site, orderNo, itemNo, seqNo, rollNo, totalApprovedQty, sfdcApprovedQty, defectedQty, operatorName, reportedTime,pageData.getCreateNewRollFlag()); |
|
|
|
this.finishRollProcessSfdcRollAndOps(site, orderNo, itemNo, seqNo, rollNo, totalApprovedQty, sfdcApprovedQty, defectedQty, operatorName, reportedTime, pageData.getCreateNewRollFlag()); |
|
|
|
//6.调用存储过程 处理Sfdc和派工单 |
|
|
|
this.finishRollProcessSfdcAndSchedule(site, orderNo, itemNo, seqNo, rollNo, sfdcReportedQty, sfdcApprovedQty, |
|
|
|
sfdcSetupTime, sfdcProdTime, sfdcDownTime, eventTime, tillTime, remark, |
|
|
|
sfdcSetupDownTime, sfdcProdSetupTime, defectedQty, sfdcManufactureTime, operatorId, reportedTime); |
|
|
|
//7.调用存储过程 处理异常信息 |
|
|
|
//7.正常结束卷还是 异常下机 |
|
|
|
if ("Y".equalsIgnoreCase(exceptionFlag)) { |
|
|
|
this.finishRollProcessException(site, orderNo, itemNo, seqNo, rollNo, exceptionReason, username); |
|
|
|
} |
|
|
|
@ -2210,7 +2210,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
* @Param [site, orderNo, itemNo, seqNo, rollNo, totalApprovedQty, sfdcApproveQty, defectedQty] |
|
|
|
**/ |
|
|
|
public void finishRollProcessSfdcRollAndOps(String site, String orderNo, Integer itemNo, String seqNo, String rollNo, |
|
|
|
Float totalApprovedQty, Float sfdcApproveQty, Float defectedQty, String username, String reportedTime,String createNewRollFlag) { |
|
|
|
Float totalApprovedQty, Float sfdcApproveQty, Float defectedQty, String username, String reportedTime, String createNewRollFlag) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(site); |
|
|
|
params.add(orderNo); |
|
|
|
@ -3295,7 +3295,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
} |
|
|
|
|
|
|
|
//2.调用存储过程 校验是否可以下机卷 |
|
|
|
Map<String, Object> checkMap2 = this.checkFinishRollWithSfdcRoll(site, orderNo, itemNo, seqNo, rollNo,pageData.getCreateNewRollFlag()); |
|
|
|
Map<String, Object> checkMap2 = this.checkFinishRollWithSfdcRoll(site, orderNo, itemNo, seqNo, rollNo, pageData.getCreateNewRollFlag()); |
|
|
|
//判断是否检验成功 |
|
|
|
String code2 = String.valueOf(checkMap2.get("resultCode")); |
|
|
|
if ("400".equalsIgnoreCase(code2)) { |
|
|
|
@ -3628,8 +3628,8 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(inData.getsFQCSlitFlag()); |
|
|
|
// 调用存储过程 |
|
|
|
Map<String, Object> checkMap = workbenchCreateslittingrollFqcCheck("workbench_createslittingroll_fqc_check", params); |
|
|
|
if(checkMap == null){ |
|
|
|
throw new RRException("存储过程未返回信息",400); |
|
|
|
if (checkMap == null) { |
|
|
|
throw new RRException("存储过程未返回信息", 400); |
|
|
|
} |
|
|
|
|
|
|
|
//判断结果是否成功 |
|
|
|
@ -3677,7 +3677,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
private Map<String, Object> workbenchCreateslittingrollFqcCheck(String procedureName, List<Object> params) { |
|
|
|
//调用存储过程 |
|
|
|
List<Map<String, Object>> resultList = procedureMapper.getProcedureData(procedureName, params); |
|
|
|
if(CollectionUtils.isEmpty(resultList)){ |
|
|
|
if (CollectionUtils.isEmpty(resultList)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
//处理返回的结果 |
|
|
|
@ -3799,7 +3799,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(dto.getSite()); |
|
|
|
params.add(dto.getResourceId()); |
|
|
|
params.add(dto.getCurrentDateTime()); |
|
|
|
return workbenchCreateslittingrollFqcCheck("get_ScheduleDate_Shift",params); |
|
|
|
return workbenchCreateslittingrollFqcCheck("get_ScheduleDate_Shift", params); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -3820,11 +3820,11 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
params.add(rollData.getCurrentDatetime()); |
|
|
|
params.add(" "); |
|
|
|
Map<String, Object> map = workbenchCreateslittingrollFqcCheck("workbench_postinspection", params); |
|
|
|
if(map == null){ |
|
|
|
throw new RRException("存储过程未返回信息",400); |
|
|
|
if (map == null) { |
|
|
|
throw new RRException("存储过程未返回信息", 400); |
|
|
|
} |
|
|
|
if ("400".equals(map.get("resultCode"))){ |
|
|
|
throw new RRException(map.get("resultMsg").toString(),400); |
|
|
|
if ("400".equals(map.get("resultCode"))) { |
|
|
|
throw new RRException(map.get("resultMsg").toString(), 400); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -3833,9 +3833,33 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
public List<SfdcRollData> getReworkSfdcRollByCon(SearchScheduleData inData) { |
|
|
|
//判断是否查询当前卷的 |
|
|
|
boolean currentRollFlag = inData.isCurrentRollFlag(); |
|
|
|
if(!currentRollFlag){ |
|
|
|
if (!currentRollFlag) { |
|
|
|
inData.setRollNo(null); |
|
|
|
} |
|
|
|
return scheduleMapper.getReworkSfdcRollByCon(inData); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void switchrollReverse(SearchScheduleData inData) { |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
params.add(inData.getSite()); |
|
|
|
params.add(inData.getOrderNo()); |
|
|
|
params.add(inData.getItemNo()); |
|
|
|
params.add(inData.getSeqNo()); |
|
|
|
params.add(inData.getRollNo()); |
|
|
|
workbenchCreateslittingrollFqcCheck("switchroll_reverse", params); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void reportCheck(SearchScheduleData inData) { |
|
|
|
int i = scheduleMapper.reportCheck(inData); |
|
|
|
if (i > 0) { |
|
|
|
String flag = scheduleMapper.getUserSpecialSecurity(inData.getUsername(), "236"); |
|
|
|
if ("Y".equals(flag)) { |
|
|
|
throw new RRException("该机台尚有未结束的其他派工单,确实要继续对该派工单进行报工吗?", 400); |
|
|
|
} else { |
|
|
|
throw new RRException(" 该机台尚有未结束的其他派工单,不能对其他的派工单进行报工!", 300); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |