bug修改

This commit is contained in:
lgh 2022-07-11 16:48:20 +08:00
parent 10e46121c3
commit f3dda753a4
3 changed files with 17 additions and 9 deletions

View File

@ -78,6 +78,7 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
e.setProductModel(one.getProductModel());
e.setCustomer(one.getCustomerName());
e.setCraftIll(orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM,e.getIdenCardNum())).getCraftIll());
}
);
return successful(currTaskDetVo);

View File

@ -663,7 +663,7 @@ public class AsynRunTaskService extends BaseService {
//氮气量
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
//二氧化碳量
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CarbonDioxideFlow");
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CO2Flow");
ParGasValue parGasValue3 = new ParGasValue();
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
@ -856,7 +856,7 @@ public class AsynRunTaskService extends BaseService {
//氮气量
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
//二氧化碳量
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CarbonDioxideFlow");
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CO2Flow");
ParGasValue parGasValue3 = new ParGasValue();
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
@ -960,7 +960,7 @@ public class AsynRunTaskService extends BaseService {
json.put("taskType", 4);
json.put("sendRow", sendRow);
json.put("pickRow", 0);
json.put("taskNo", 1);
json.put("taskNo", currTaskId);
json.put("ideNumber", currTaskId);
json.put("processNumber", processNumber);
String taskJson = JSON.toJSONString(json);
@ -1000,7 +1000,7 @@ public class AsynRunTaskService extends BaseService {
json.put("sendRow", endPoint);
json.put("pickRow", startPoint);
json.put("taskNo", currTaskId);
json.put("ideNumber", 1);
json.put("ideNumber", currTaskId);
json.put("processNumber", processNumber);
String taskJson = JSON.toJSONString(json);
String result = null;
@ -1029,6 +1029,7 @@ public class AsynRunTaskService extends BaseService {
*/
private Boolean apmsCreateProcess(CurrTask currTask) throws IOException {
List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTask.getId()));
String code = kilnInfoServiceBiz.getById(currTask.getKilnId()).getCode();
//通知apms创建一个生产单
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
apmsCreateSheet.setWorkShopCode("BM");
@ -1044,7 +1045,7 @@ public class AsynRunTaskService extends BaseService {
createItem.setWeight(e.getWeight().doubleValue());
createItems.add(createItem);
});
apmsCreateSheet.setStoveCode(CodeGeneratorHelper.getStoveCode(currTask.getKilnName() + String.format("%02d", currTask.getCraftCodeId())));
apmsCreateSheet.setStoveCode(code);
apmsCreateSheet.setItems(createItems);
logger.info(currTask.getId() + "开始创建apms生产单号");
R<ApmsCreateProcessSheetVo> processSheet = apmsController.createProcessSheet(apmsCreateSheet);
@ -1066,12 +1067,13 @@ public class AsynRunTaskService extends BaseService {
* @return
*/
private Boolean apmsStartProcess(CurrTask currTask) {
String code = kilnInfoServiceBiz.getById(currTask.getKilnId()).getCode();
ApmsStartProcess apmsStartProcess=new ApmsStartProcess();
apmsStartProcess.setStartUser("QJJP03");
apmsStartProcess.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
apmsStartProcess.setTechName(currTask.getCraftCodeId().toString());
apmsStartProcess.setSheetNo(currTask.getSheetNo());
apmsStartProcess.setStoveCode(CodeGeneratorHelper.getStoveCode(currTask.getKilnName()+String.format("%02d",currTask.getCraftCodeId())));
apmsStartProcess.setStoveCode(code);
R<ApmsStartProcess> apmsStartProcessR = apmsController.startProcess(apmsStartProcess);
if (apmsStartProcessR.getCode() != 0) {
logger.info("任务号" + currTask.getTaskCode() + "生产单号:" + currTask.getSheetNo() + "生产单开始生产上报apms失败");

View File

@ -112,7 +112,7 @@ public class ScheduledTask extends BaseService {
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
for (CurrTaskDetVo currTaskDetVo:currTaskDetVoList
) {
String customerName = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.ORDER_NO, currTaskDetVo.getOrderNo())).getCustomerName();
String customerName = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, currTaskDetVo.getIdenCardNum())).getCustomerName();
currTaskDetVo.setCustomer(customerName);
}
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
@ -151,7 +151,12 @@ public class ScheduledTask extends BaseService {
//剩余时间
Integer remainingTime=0;
if (kilnInfo.getType()!=4){
remainingTime = readPlc(nameSpace, "ProgramTimeRemain").intValue();
if (kilnInfo.getType()==3){
remainingTime = readPlc(nameSpace, "ProgramTimeRemaining").intValue();
}else {
remainingTime = readPlc(nameSpace, "ProgramTimeRemain").intValue();
}
}
if(kilnInfo.getType()==1||kilnInfo.getType()==3){
//运行时间
@ -171,7 +176,7 @@ public class ScheduledTask extends BaseService {
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
for (CurrTaskDetVo currTaskDetVo:currTaskDetVoList
) {
String customerName = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.ORDER_NO, currTaskDetVo.getOrderNo())).getCustomerName();
String customerName = orderInfoServiceBiz.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, currTaskDetVo.getIdenCardNum())).getCustomerName();
currTaskDetVo.setCustomer(customerName);
}
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);