上报apms炉号
This commit is contained in:
李广豪 2022-11-18 10:09:47 +08:00
parent 59f008f19e
commit 592d27b858

View File

@ -491,6 +491,7 @@ public class AsynRunTaskService extends BaseService {
webSocketServer.sendtoAll("任务 " + currTask.getTaskCode() + " 车辆从工业炉到缓存区过程中失败。"); webSocketServer.sendtoAll("任务 " + currTask.getTaskCode() + " 车辆从工业炉到缓存区过程中失败。");
} }
} }
//出库起点为加工炉终点为提升台 //出库起点为加工炉终点为提升台
@Async("asyncServiceExecutor") @Async("asyncServiceExecutor")
public void asynRunOutStockForKilnToYYT(Long currTaskId, String yeyaTaiCode, Long vehicleId) throws IOException { public void asynRunOutStockForKilnToYYT(Long currTaskId, String yeyaTaiCode, Long vehicleId) throws IOException {
@ -589,6 +590,7 @@ public class AsynRunTaskService extends BaseService {
webSocketServer.sendtoAll("出库任务车辆从加工炉到提升平台过程中失败。"); webSocketServer.sendtoAll("出库任务车辆从加工炉到提升平台过程中失败。");
} }
} }
//出库起点为缓存区库位终点为提升台 //出库起点为缓存区库位终点为提升台
@Async("asyncServiceExecutor") @Async("asyncServiceExecutor")
public void asynRunOutStock(Long locationId, String yeyaTaiCode, Long vehicleId) throws IOException { public void asynRunOutStock(Long locationId, String yeyaTaiCode, Long vehicleId) throws IOException {
@ -1225,6 +1227,7 @@ public class AsynRunTaskService extends BaseService {
logger.info(currTask.getId() + "任务为多步骤任务且第一步为清洗,不生成洗炉炉号."); logger.info(currTask.getId() + "任务为多步骤任务且第一步为清洗,不生成洗炉炉号.");
} }
} }
/** /**
* 上报apms创建生产单并开始处理 * 上报apms创建生产单并开始处理
* *
@ -1250,7 +1253,10 @@ public class AsynRunTaskService extends BaseService {
createItem.setWeight(e.getWeight().doubleValue()); createItem.setWeight(e.getWeight().doubleValue());
createItems.add(createItem); createItems.add(createItem);
}); });
apmsCreateSheet.setStoveCode(code); //apmsCreateSheet.setStoveCode(code);
if (currTask.getStoveCode() != null) {
apmsCreateSheet.setStoveCode(currTask.getStoveCode());
}
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);
@ -1281,6 +1287,7 @@ public class AsynRunTaskService extends BaseService {
/** /**
* 上报apms开始加工 * 上报apms开始加工
*
* @param currTask * @param currTask
* @return * @return
*/ */
@ -1291,7 +1298,10 @@ public class AsynRunTaskService extends BaseService {
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(code); if (currTask.getStoveCode() != null) {
apmsStartProcess.setStoveCode(currTask.getStoveCode());
}
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失败");
@ -1303,6 +1313,7 @@ public class AsynRunTaskService extends BaseService {
/** /**
* 上报apms-end * 上报apms-end
*
* @param currTask * @param currTask
* @return * @return
*/ */
@ -1322,6 +1333,7 @@ public class AsynRunTaskService extends BaseService {
/** /**
* 上报apms-finish * 上报apms-finish
*
* @param currTask * @param currTask
* @return * @return
*/ */
@ -1350,8 +1362,10 @@ public class AsynRunTaskService extends BaseService {
} }
return true; return true;
} }
/** /**
* 车辆是否在线 * 车辆是否在线
*
* @param vehicleId 车辆id * @param vehicleId 车辆id
* @return true/false * @return true/false
* @throws IOException plc访问失败 * @throws IOException plc访问失败
@ -1381,6 +1395,7 @@ public class AsynRunTaskService extends BaseService {
/** /**
* 传入车辆ID,检查另一辆车是否在线如果在线检查是否位置冲突冲突则避让若另一辆车不在线则不检查是否冲突 * 传入车辆ID,检查另一辆车是否在线如果在线检查是否位置冲突冲突则避让若另一辆车不在线则不检查是否冲突
*
* @param vehicleId * @param vehicleId
* @param currTask * @param currTask
* @throws IOException * @throws IOException
@ -1437,6 +1452,7 @@ public class AsynRunTaskService extends BaseService {
/** /**
* 判断任务是否为单步骤任务多步骤任务第一步 * 判断任务是否为单步骤任务多步骤任务第一步
*
* @param currTask 任务 * @param currTask 任务
* @return 单步骤任务true多步骤任务第一步true,其他false * @return 单步骤任务true多步骤任务第一步true,其他false
*/ */