This commit is contained in:
2022-12-27 12:12:58 +08:00
parent 269558eb03
commit ac79b05c14

View File

@@ -154,7 +154,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
HongXiangStationDeviceDriver hongXiangStationDeviceDriver; HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
hongXiangStationDeviceDriver.writing(code,value); hongXiangStationDeviceDriver.writing(code, value);
} }
} }
response.setStatus(200); response.setStatus(200);
@@ -200,8 +200,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("mode", hongXiangStationDeviceDriver.getMode()); jo.put("mode", hongXiangStationDeviceDriver.getMode());
jo.put("move", hongXiangStationDeviceDriver.getMove()); jo.put("move", hongXiangStationDeviceDriver.getMove());
} } else if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
else if(device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver(); hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code); jo.put("device_code", parent_device_code);
jo.put("mode", hongXiangConveyorDeviceDriver.getMode()); jo.put("mode", hongXiangConveyorDeviceDriver.getMode());
@@ -214,8 +213,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish()); jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
jo.put("task", hongXiangConveyorDeviceDriver.getTask()); jo.put("task", hongXiangConveyorDeviceDriver.getTask());
jo.put("error", hongXiangConveyorDeviceDriver.getError()); jo.put("error", hongXiangConveyorDeviceDriver.getError());
} } else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver(); standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code); jo.put("device_code", parent_device_code);
jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove()); jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove());
@@ -299,9 +297,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String storage_task_type = request.getDtl_type(); String storage_task_type = request.getDtl_type();
String agv_system_type = request.getAgv_system_type(); String agv_system_type = request.getAgv_system_type();
String remark = request.getRemark(); String remark = request.getRemark();
double oven_time = Double.parseDouble(request.getOven_time()); double oven_time = 0.00d;
if (StrUtil.isNotEmpty(request.getOven_time())) {
oven_time = Double.parseDouble(request.getOven_time());
}
String temperature = request.getTemperature(); String temperature = request.getTemperature();
Map<String,String> params = request.getParams(); Map<String, String> params = request.getParams();
String start_point_code = ""; String start_point_code = "";
String start_point_code2 = ""; String start_point_code2 = "";
@@ -393,7 +394,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("task_code", task_code); json.put("task_code", task_code);
json.put("ext_task_id", ext_task_id); json.put("ext_task_id", ext_task_id);
json.put("message", request.getStart_device_code() +" 该设备号未找到对应点位"); json.put("message", request.getStart_device_code() + " 该设备号未找到对应点位");
errArr.add(json); errArr.add(json);
continue; continue;
} }
@@ -401,7 +402,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("task_code", task_code); json.put("task_code", task_code);
json.put("ext_task_id", ext_task_id); json.put("ext_task_id", ext_task_id);
json.put("message", request.getNext_device_code() +" 该设备号未找到对应点位"); json.put("message", request.getNext_device_code() + " 该设备号未找到对应点位");
errArr.add(json); errArr.add(json);
continue; continue;
} }
@@ -438,7 +439,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
TaskDto task_dto = jo.toJavaObject(TaskDto.class); TaskDto task_dto = jo.toJavaObject(TaskDto.class);
try { try {
// task_type=7 则是立库任务需要下刻下发 // task_type=7 则是立库任务需要下刻下发
if(StrUtil.equals(task_dto.getTask_type(),"7")){ if (StrUtil.equals(task_dto.getTask_type(), "7")) {
taskService.create(task_dto); taskService.create(task_dto);
} else { } else {
taskService.create(task_dto); taskService.create(task_dto);