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;
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
hongXiangStationDeviceDriver.writing(code,value);
hongXiangStationDeviceDriver.writing(code, value);
}
}
response.setStatus(200);
@@ -200,8 +200,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("mode", hongXiangStationDeviceDriver.getMode());
jo.put("move", hongXiangStationDeviceDriver.getMove());
}
else if(device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver){
} else if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code);
jo.put("mode", hongXiangConveyorDeviceDriver.getMode());
@@ -214,8 +213,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
jo.put("error", hongXiangConveyorDeviceDriver.getError());
}
else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
} else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code);
jo.put("move", standardCoveyorControlWithScannerDeviceDriver.getMove());
@@ -299,9 +297,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String storage_task_type = request.getDtl_type();
String agv_system_type = request.getAgv_system_type();
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();
Map<String,String> params = request.getParams();
Map<String, String> params = request.getParams();
String start_point_code = "";
String start_point_code2 = "";
@@ -339,7 +340,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (!ObjectUtil.isEmpty(put_device_json)) {
put_point_code = (String) put_device_json.get("parent_storage_code") == null ? put_device_code : (String) next_device_json.get("storage_code");
}
if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) {
if (StrUtil.isNotEmpty(start_point_code) && start_point_code.indexOf("-") > 0) {
String str[] = start_point_code.split("-");
start_device_code = str[0];
} else {
@@ -353,21 +354,21 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
next_device_code = next_point_code;
}
if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) {
if (StrUtil.isNotEmpty(start_point_code2) && start_point_code2.indexOf("-") > 0) {
String str[] = start_point_code2.split("-");
start_device_code2 = str[0];
} else {
start_device_code2 = start_point_code2;
}
if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) {
if (StrUtil.isNotEmpty(next_point_code2) && next_point_code2.indexOf("-") > 0) {
String str[] = next_point_code2.split("-");
next_device_code2 = str[0];
} else {
next_device_code2 = next_point_code2;
}
if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) {
if (StrUtil.isNotEmpty(put_point_code) && put_point_code.indexOf("-") > 0) {
String str[] = put_point_code.split("-");
put_device_code = str[0];
} else {
@@ -393,7 +394,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject json = new JSONObject();
json.put("task_code", task_code);
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);
continue;
}
@@ -401,7 +402,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject json = new JSONObject();
json.put("task_code", task_code);
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);
continue;
}
@@ -438,7 +439,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
try {
// task_type=7 则是立库任务需要下刻下发
if(StrUtil.equals(task_dto.getTask_type(),"7")){
if (StrUtil.equals(task_dto.getTask_type(), "7")) {
taskService.create(task_dto);
} else {
taskService.create(task_dto);