bug修改
This commit is contained in:
parent
10e46121c3
commit
f3dda753a4
@ -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()));
|
OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
|
||||||
e.setProductModel(one.getProductModel());
|
e.setProductModel(one.getProductModel());
|
||||||
e.setCustomer(one.getCustomerName());
|
e.setCustomer(one.getCustomerName());
|
||||||
|
e.setCraftIll(orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM,e.getIdenCardNum())).getCraftIll());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return successful(currTaskDetVo);
|
return successful(currTaskDetVo);
|
||||||
|
@ -663,7 +663,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
//氮气量
|
//氮气量
|
||||||
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
|
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
|
||||||
//二氧化碳量
|
//二氧化碳量
|
||||||
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CarbonDioxideFlow");
|
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CO2Flow");
|
||||||
ParGasValue parGasValue3 = new ParGasValue();
|
ParGasValue parGasValue3 = new ParGasValue();
|
||||||
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
|
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
|
||||||
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
|
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
|
||||||
@ -856,7 +856,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
//氮气量
|
//氮气量
|
||||||
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
|
nitrogenFlow = readPlc(nameSpaceNote, "NitrogenFlow");
|
||||||
//二氧化碳量
|
//二氧化碳量
|
||||||
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CarbonDioxideFlow");
|
Double carbonDioxideFlow = readPlc(nameSpaceNote, "CO2Flow");
|
||||||
ParGasValue parGasValue3 = new ParGasValue();
|
ParGasValue parGasValue3 = new ParGasValue();
|
||||||
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
|
parGasValue3.setNitFlowValue(nitrogenFlow.floatValue());
|
||||||
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
|
parGasValue3.setAmmoniaFlowValue(ammoniaFlow.floatValue());
|
||||||
@ -960,7 +960,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
json.put("taskType", 4);
|
json.put("taskType", 4);
|
||||||
json.put("sendRow", sendRow);
|
json.put("sendRow", sendRow);
|
||||||
json.put("pickRow", 0);
|
json.put("pickRow", 0);
|
||||||
json.put("taskNo", 1);
|
json.put("taskNo", currTaskId);
|
||||||
json.put("ideNumber", currTaskId);
|
json.put("ideNumber", currTaskId);
|
||||||
json.put("processNumber", processNumber);
|
json.put("processNumber", processNumber);
|
||||||
String taskJson = JSON.toJSONString(json);
|
String taskJson = JSON.toJSONString(json);
|
||||||
@ -1000,7 +1000,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
json.put("sendRow", endPoint);
|
json.put("sendRow", endPoint);
|
||||||
json.put("pickRow", startPoint);
|
json.put("pickRow", startPoint);
|
||||||
json.put("taskNo", currTaskId);
|
json.put("taskNo", currTaskId);
|
||||||
json.put("ideNumber", 1);
|
json.put("ideNumber", currTaskId);
|
||||||
json.put("processNumber", processNumber);
|
json.put("processNumber", processNumber);
|
||||||
String taskJson = JSON.toJSONString(json);
|
String taskJson = JSON.toJSONString(json);
|
||||||
String result = null;
|
String result = null;
|
||||||
@ -1029,6 +1029,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
*/
|
*/
|
||||||
private Boolean apmsCreateProcess(CurrTask currTask) throws IOException {
|
private Boolean apmsCreateProcess(CurrTask currTask) throws IOException {
|
||||||
List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTask.getId()));
|
List<CurrTaskDet> currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID, currTask.getId()));
|
||||||
|
String code = kilnInfoServiceBiz.getById(currTask.getKilnId()).getCode();
|
||||||
//通知apms创建一个生产单
|
//通知apms创建一个生产单
|
||||||
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
ApmsCreateProcessSheet apmsCreateSheet = new ApmsCreateProcessSheet();
|
||||||
apmsCreateSheet.setWorkShopCode("BM");
|
apmsCreateSheet.setWorkShopCode("BM");
|
||||||
@ -1044,7 +1045,7 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
createItem.setWeight(e.getWeight().doubleValue());
|
createItem.setWeight(e.getWeight().doubleValue());
|
||||||
createItems.add(createItem);
|
createItems.add(createItem);
|
||||||
});
|
});
|
||||||
apmsCreateSheet.setStoveCode(CodeGeneratorHelper.getStoveCode(currTask.getKilnName() + String.format("%02d", currTask.getCraftCodeId())));
|
apmsCreateSheet.setStoveCode(code);
|
||||||
apmsCreateSheet.setItems(createItems);
|
apmsCreateSheet.setItems(createItems);
|
||||||
logger.info(currTask.getId() + "开始创建apms生产单号");
|
logger.info(currTask.getId() + "开始创建apms生产单号");
|
||||||
R<ApmsCreateProcessSheetVo> processSheet = apmsController.createProcessSheet(apmsCreateSheet);
|
R<ApmsCreateProcessSheetVo> processSheet = apmsController.createProcessSheet(apmsCreateSheet);
|
||||||
@ -1066,12 +1067,13 @@ public class AsynRunTaskService extends BaseService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Boolean apmsStartProcess(CurrTask currTask) {
|
private Boolean apmsStartProcess(CurrTask currTask) {
|
||||||
|
String code = kilnInfoServiceBiz.getById(currTask.getKilnId()).getCode();
|
||||||
ApmsStartProcess apmsStartProcess=new ApmsStartProcess();
|
ApmsStartProcess apmsStartProcess=new ApmsStartProcess();
|
||||||
apmsStartProcess.setStartUser("QJJP03");
|
apmsStartProcess.setStartUser("QJJP03");
|
||||||
apmsStartProcess.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
apmsStartProcess.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||||
apmsStartProcess.setTechName(currTask.getCraftCodeId().toString());
|
apmsStartProcess.setTechName(currTask.getCraftCodeId().toString());
|
||||||
apmsStartProcess.setSheetNo(currTask.getSheetNo());
|
apmsStartProcess.setSheetNo(currTask.getSheetNo());
|
||||||
apmsStartProcess.setStoveCode(CodeGeneratorHelper.getStoveCode(currTask.getKilnName()+String.format("%02d",currTask.getCraftCodeId())));
|
apmsStartProcess.setStoveCode(code);
|
||||||
R<ApmsStartProcess> apmsStartProcessR = apmsController.startProcess(apmsStartProcess);
|
R<ApmsStartProcess> apmsStartProcessR = apmsController.startProcess(apmsStartProcess);
|
||||||
if (apmsStartProcessR.getCode() != 0) {
|
if (apmsStartProcessR.getCode() != 0) {
|
||||||
logger.info("任务号" + currTask.getTaskCode() + "生产单号:" + currTask.getSheetNo() + "生产单开始生产上报apms失败");
|
logger.info("任务号" + currTask.getTaskCode() + "生产单号:" + currTask.getSheetNo() + "生产单开始生产上报apms失败");
|
||||||
|
@ -112,7 +112,7 @@ public class ScheduledTask extends BaseService {
|
|||||||
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
|
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
|
||||||
for (CurrTaskDetVo currTaskDetVo:currTaskDetVoList
|
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);
|
currTaskDetVo.setCustomer(customerName);
|
||||||
}
|
}
|
||||||
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
|
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
|
||||||
@ -151,7 +151,12 @@ public class ScheduledTask extends BaseService {
|
|||||||
//剩余时间
|
//剩余时间
|
||||||
Integer remainingTime=0;
|
Integer remainingTime=0;
|
||||||
if (kilnInfo.getType()!=4){
|
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){
|
if(kilnInfo.getType()==1||kilnInfo.getType()==3){
|
||||||
//运行时间
|
//运行时间
|
||||||
@ -171,7 +176,7 @@ public class ScheduledTask extends BaseService {
|
|||||||
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
|
List<CurrTaskDetVo> currTaskDetVoList = BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
|
||||||
for (CurrTaskDetVo currTaskDetVo:currTaskDetVoList
|
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);
|
currTaskDetVo.setCustomer(customerName);
|
||||||
}
|
}
|
||||||
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
|
nowCurrTask.setCurrTaskDetVoList(currTaskDetVoList);
|
||||||
|
Loading…
Reference in New Issue
Block a user