add: 生箔下料到分切上料试运行
This commit is contained in:
@@ -36,6 +36,8 @@ import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.TrappedManip
|
||||
import org.nl.acs.device_driver.one_manipulator.volume_two_manipulator.VolumeTwoManipulatorManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.pipe_core_rack_manipulator.PipeCoreRackManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.roll_up_roller_manipulator.RollUpRollerManipulatorDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.slit_two_manipulator.SlitTwoManipulatorDeviceDriver;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.route.domain.RouteLine;
|
||||
@@ -1059,6 +1061,15 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
TrappedManipulatorManipulatorDeviceDriver trappedManipulatorManipulatorDeviceDriver = (TrappedManipulatorManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
trappedManipulatorManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
else if (device.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
|
||||
RollUpRollerManipulatorDeviceDriver rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
rollUpRollerManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
|
||||
else if (device.getDeviceDriver() instanceof PipeCoreRackManipulatorDeviceDriver) {
|
||||
PipeCoreRackManipulatorDeviceDriver pipeCoreRackManipulatorDeviceDriver = (PipeCoreRackManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
pipeCoreRackManipulatorDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
}
|
||||
|
||||
public String formatNum(int x) {
|
||||
|
||||
@@ -181,6 +181,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
move = this.itemProtocol.getMove();
|
||||
action = this.itemProtocol.getAction();
|
||||
error = this.itemProtocol.getError();
|
||||
error2 = this.itemProtocol.getError2();
|
||||
task = this.itemProtocol.getTask();
|
||||
heartbeat = this.itemProtocol.getHeartbeat();
|
||||
x = this.itemProtocol.getX();
|
||||
@@ -212,18 +213,18 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
message = "universal_off-line";
|
||||
|
||||
//有报警
|
||||
} else if (error != 0 || error2 != 0) {
|
||||
} else if (error2 != 0 || error != 0) {
|
||||
this.setIserror(true);
|
||||
message = "universal_message3";
|
||||
//满入空出分配新点位
|
||||
if (error2 == 2 || error2 == 3) {
|
||||
if ((error2 == 2 || error2 == 3) && !actionRequireSucess) {
|
||||
if (task == 0 || target == null) {
|
||||
notCreateInstMessage = "管芯规格或库位为空";
|
||||
} else {
|
||||
if (error2 == 2) {
|
||||
errorDispose(PointErrorTypeEnum.IN.getCode());
|
||||
} else {
|
||||
errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||
// errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -347,7 +348,12 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
} else {
|
||||
Instruction instruction = checkInst();
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("target", target);
|
||||
if (error2 == 3){
|
||||
param.put("target", instruction.getStart_device_code());
|
||||
}
|
||||
if (error2 == 2){
|
||||
param.put("target", instruction.getNext_device_code());
|
||||
}
|
||||
param.put("type", code);
|
||||
param.put("task_code", instruction.getTask_code());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
@@ -365,7 +371,8 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
if (jo.getInteger("status") == 200) {
|
||||
|
||||
Device gxDevice = deviceAppService.findDeviceByCode(jo.getString("device_code"));
|
||||
String targetAddress = gxDevice.getExtraValue().get("address").toString();
|
||||
List list = new ArrayList();
|
||||
if (error2 == 2) {
|
||||
Map<String, Object> map1 = new HashMap<>();
|
||||
@@ -374,8 +381,8 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
list.add(map1);
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
map2.put("code", "to_new_target");
|
||||
map2.put("value", jo.getInteger("target"));
|
||||
list.add(map1);
|
||||
map2.put("value", targetAddress);
|
||||
list.add(map2);
|
||||
this.writing(list);
|
||||
}
|
||||
if (error2 == 3) {
|
||||
@@ -384,9 +391,9 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
map1.put("value", 8);
|
||||
list.add(map1);
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
map2.put("code", "to_new_target");
|
||||
map2.put("value", jo.getInteger("target"));
|
||||
list.add(map1);
|
||||
map2.put("code", "to_new_onset");
|
||||
map2.put("value", targetAddress);
|
||||
list.add(map2);
|
||||
this.writing(list);
|
||||
}
|
||||
this.actionRequireSucess = true;
|
||||
|
||||
@@ -44,7 +44,6 @@ public class AcsToWmsController {
|
||||
}
|
||||
|
||||
@PostMapping("/outHotTaskApply")
|
||||
@Record(interactName = "申请出烘箱任务", direction = RecordDefinition.ACS_LMS)
|
||||
// @Log(value = "申请出烘箱任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> outHotTaskApply(@RequestBody JSONObject whereJson) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -117,22 +118,32 @@ public class OtherOperationServiceImpl implements OtherOperationService {
|
||||
} else {
|
||||
// 空出:点位清空,从新获取新点位
|
||||
PointUtils.clearPoint(exceptionPoint, TaskFinishedTypeEnum.AUTO_ACS);
|
||||
allSjgPoints = pointService.getWindRollNotTaskPoints(requestObj.getString("ext_code"));
|
||||
allSjgPoints = pointService.getAllBusinessNotTaskPoint("A1",
|
||||
"A1-SJGK", "3", "2", null, null);
|
||||
// 出库从高往低出倒序
|
||||
Collections.reverse(allSjgPoints);
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (allSjgPoints.size() == 0) {
|
||||
throw new BadRequestException("收卷辊重新分配货位失败!");
|
||||
}
|
||||
SchBasePoint point = allSjgPoints.get(0);
|
||||
task.setPoint_code3(point.getPoint_code());
|
||||
// 满入空出:更新任务点位
|
||||
if ("1".equals(type)){
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
}else {
|
||||
task.setPoint_code1(point.getPoint_code());
|
||||
}
|
||||
task.setPoint_code3(deviceCode);
|
||||
task.setRemark("重新分配货位");
|
||||
TaskUtils.setUpdateByDefault(task);
|
||||
taskService.updateById(task);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("device_code", point.getPoint_code());
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "满入空出异常处理请求成功!");
|
||||
result.put("data", data);
|
||||
result.put("device_code", point.getPoint_code());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user