add:三色灯
This commit is contained in:
@@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@Api(tags = "仙工AGV")
|
@Api(tags = "仙工AGV")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
|
@RequestMapping("/api")
|
||||||
public class XianGongAgvController {
|
public class XianGongAgvController {
|
||||||
|
|
||||||
private final XianGongAgvService agvService;
|
private final XianGongAgvService agvService;
|
||||||
@@ -33,4 +34,20 @@ public class XianGongAgvController {
|
|||||||
public ResponseEntity<JSONObject> xgAGVWaitPointRequest(@RequestBody JSONObject requestParam) {
|
public ResponseEntity<JSONObject> xgAGVWaitPointRequest(@RequestBody JSONObject requestParam) {
|
||||||
return new ResponseEntity<>(agvService.xgAGVWaitPointRequest(requestParam), HttpStatus.OK);
|
return new ResponseEntity<>(agvService.xgAGVWaitPointRequest(requestParam), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping ("/acquireBlockGroup")
|
||||||
|
@Log("占用互斥组")
|
||||||
|
@ApiOperation("占用互斥组")
|
||||||
|
public ResponseEntity<JSONObject> getBlockGroup(@RequestBody JSONObject requestParam) {
|
||||||
|
return new ResponseEntity<>(agvService.getBlockGroup(requestParam), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping ("/releaseBlockGroup")
|
||||||
|
@Log("释放互斥组")
|
||||||
|
@ApiOperation("释放互斥组")
|
||||||
|
public ResponseEntity<JSONObject> releaseBlockGroup(@RequestBody JSONObject requestParam) {
|
||||||
|
return new ResponseEntity<>(agvService.releaseBlockGroup(requestParam), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.acs.device_driver.basedriver.standard_conveyor_control.StandardCoveyorControlDeviceDriver;
|
||||||
import org.nl.acs.device_driver.sdk.PhotoelectricDetectionDeviceDriver;
|
import org.nl.acs.device_driver.sdk.PhotoelectricDetectionDeviceDriver;
|
||||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
|
import org.nl.acs.task.service.TaskService;
|
||||||
import org.nl.acs.task.service.dto.TaskDto;
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -25,6 +27,8 @@ public class AgvWaitUtil {
|
|||||||
private DeviceAppService deviceAppService;
|
private DeviceAppService deviceAppService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeviceExecuteLogService deviceExecuteLogService;
|
private DeviceExecuteLogService deviceExecuteLogService;
|
||||||
|
@Autowired
|
||||||
|
private TaskService taskService;
|
||||||
|
|
||||||
//取货前等待
|
//取货前等待
|
||||||
public JSONObject waitInGet(String deviceCode) {
|
public JSONObject waitInGet(String deviceCode) {
|
||||||
@@ -36,9 +40,13 @@ public class AgvWaitUtil {
|
|||||||
throw new BadRequestException("请求失败,未找到设备!");
|
throw new BadRequestException("请求失败,未找到设备!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||||
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
|
// 标准版输送线驱动
|
||||||
if (driver.getMove() == 1) {
|
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 通知输送线申请取货-1
|
||||||
|
driver.writing(1);
|
||||||
|
// 判断是否满足条件:action = 1(允许取货) && move = 1(有货)
|
||||||
|
if (driver.getMove() == 1 && driver.getAction() == 1) {
|
||||||
String message = "允许AGV取货。";
|
String message = "允许AGV取货。";
|
||||||
driver.setMessage(message);
|
driver.setMessage(message);
|
||||||
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
||||||
@@ -71,8 +79,11 @@ public class AgvWaitUtil {
|
|||||||
throw new BadRequestException("请求失败,未找到设备!");
|
throw new BadRequestException("请求失败,未找到设备!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||||
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
|
// 标准版输送线驱动
|
||||||
|
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 通知输送线取货完成-2
|
||||||
|
driver.writing(2);
|
||||||
if (driver.getMove() == 0) {
|
if (driver.getMove() == 0) {
|
||||||
String message = "允许AGV取货后离开。";
|
String message = "允许AGV取货后离开。";
|
||||||
driver.setMessage(message);
|
driver.setMessage(message);
|
||||||
@@ -99,7 +110,7 @@ public class AgvWaitUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//放货前等待
|
//放货前等待
|
||||||
public JSONObject waitInPut(String deviceCode) {
|
public JSONObject waitInPut(String deviceCode,TaskDto taskDto) {
|
||||||
log.info("仙工AGV请求放货,设备号 - {}", deviceCode);
|
log.info("仙工AGV请求放货,设备号 - {}", deviceCode);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
@@ -108,17 +119,26 @@ public class AgvWaitUtil {
|
|||||||
throw new BadRequestException("请求失败,未找到设备!");
|
throw new BadRequestException("请求失败,未找到设备!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||||
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
|
// 标准版输送线驱动
|
||||||
if (driver.getMove() == 0) {
|
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 通知输送线申请放货-3
|
||||||
|
driver.writing(3);
|
||||||
|
// 判断是否满足条件:action = 2(允许放货) && move = 0(无货)
|
||||||
|
if (driver.getMove() == 0 && driver.getAction() == 2) {
|
||||||
String message = "允许AGV放货。";
|
String message = "允许AGV放货。";
|
||||||
driver.setMessage(message);
|
driver.setMessage(message);
|
||||||
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
||||||
|
if (taskDto.getIs_vehicle().equals("1")) {
|
||||||
|
// 获取当前母载具号
|
||||||
|
taskDto.setVehicle_code(driver.getBarcode());
|
||||||
|
taskService.update(taskDto);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
String message = "光电信号有货,不允许放货!";
|
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", "光电信号为:" + driver.getMove());
|
||||||
driver.setMessage(message);
|
|
||||||
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = true;
|
flag = true;
|
||||||
@@ -146,15 +166,20 @@ public class AgvWaitUtil {
|
|||||||
throw new BadRequestException("请求失败,未找到设备!");
|
throw new BadRequestException("请求失败,未找到设备!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
|
||||||
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
|
// 标准版输送线驱动
|
||||||
|
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 通知输送线放货完成-4
|
||||||
|
driver.writing(4);
|
||||||
if (driver.getMove() == 1) {
|
if (driver.getMove() == 1) {
|
||||||
String message = "允许AGV放货完成离开。";
|
String message = "允许AGV放货后离开。";
|
||||||
driver.setMessage(message);
|
driver.setMessage(message);
|
||||||
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
||||||
flag = true;
|
flag = true;
|
||||||
} else {
|
} else {
|
||||||
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", "光电信号为:" + driver.getMove() + ",不允许AGV放货完成离开!");
|
String message = "光电信号有货,不允许AGV放货后离开。";
|
||||||
|
driver.setMessage(message);
|
||||||
|
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.nl.acs.agv.server;
|
package org.nl.acs.agv.server;
|
||||||
|
|
||||||
import cn.hutool.http.HttpResponse;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.acs.agv.server.dto.AgvDto;
|
import org.nl.acs.agv.server.dto.AgvDto;
|
||||||
import org.nl.acs.ext.UnifiedResponse;
|
import org.nl.acs.ext.UnifiedResponse;
|
||||||
@@ -91,10 +90,9 @@ public interface XianGongAgvService {
|
|||||||
* 占用互斥组
|
* 占用互斥组
|
||||||
*
|
*
|
||||||
* @param reqParam
|
* @param reqParam
|
||||||
* @param <T>
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public <T> UnifiedResponse<T> getBlockGroup(JSONObject reqParam);
|
JSONObject getBlockGroup(JSONObject reqParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询互斥组状态
|
* 查询互斥组状态
|
||||||
@@ -110,10 +108,9 @@ public interface XianGongAgvService {
|
|||||||
* 释放互斥组
|
* 释放互斥组
|
||||||
*
|
*
|
||||||
* @param reqParam
|
* @param reqParam
|
||||||
* @param <T>
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public <T> UnifiedResponse<T> releaseBlockGroup(JSONObject reqParam);
|
JSONObject releaseBlockGroup(JSONObject reqParam);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -167,4 +164,14 @@ public interface XianGongAgvService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public JSONObject xgAGVWaitPointRequest(JSONObject requestParam);
|
public JSONObject xgAGVWaitPointRequest(JSONObject requestParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发运单急停
|
||||||
|
*
|
||||||
|
* @param requestParam
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject requestParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ import org.nl.acs.agv.server.AgvWaitUtil;
|
|||||||
import org.nl.acs.agv.server.XianGongAgvService;
|
import org.nl.acs.agv.server.XianGongAgvService;
|
||||||
import org.nl.acs.agv.server.dto.AgvDto;
|
import org.nl.acs.agv.server.dto.AgvDto;
|
||||||
import org.nl.acs.config.AcsConfig;
|
import org.nl.acs.config.AcsConfig;
|
||||||
|
import org.nl.acs.device_driver.basedriver.standard_conveyor_control.StandardCoveyorControlDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.standard_storage.StandardStorageDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.standard_storage.StandardStorageDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.lamp_three_color.LampThreecolorDeviceDriver;
|
||||||
import org.nl.acs.ext.UnifiedResponse;
|
import org.nl.acs.ext.UnifiedResponse;
|
||||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||||
import org.nl.acs.ext.xg.XgHttpUtil;
|
import org.nl.acs.ext.xg.XgHttpUtil;
|
||||||
@@ -130,15 +132,78 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> UnifiedResponse<T> getBlockGroup(JSONObject reqParam) {
|
public JSONObject getBlockGroup(JSONObject reqParam) {
|
||||||
String path = "/getBlockGroup";
|
log.info("getBlockGroup收到AGV请求参数:{}", reqParam.toString());
|
||||||
return xgHttpUtil.sendPostRequest(path, reqParam);
|
// 需返回参数
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
// 根据设备号获取对应的设备
|
||||||
|
Device device = deviceAppService.findDeviceByCode(reqParam.getString("block_group_id"));
|
||||||
|
if (ObjectUtil.isEmpty(device)) {
|
||||||
|
throw new BadRequestException("设备号 " + reqParam.getString("block_group_id") + " 不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (device.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {
|
||||||
|
// 三色灯驱动
|
||||||
|
LampThreecolorDeviceDriver driver = (LampThreecolorDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 给三色灯写入进入命令0-离开,1-进入
|
||||||
|
driver.writing(1,3);
|
||||||
|
|
||||||
|
// 判断是否允许进入 1-允许,0-不允许
|
||||||
|
if (driver.getAction() == 1) {
|
||||||
|
// 记录车号
|
||||||
|
driver.setCar_no(reqParam.getString("robot_name"));
|
||||||
|
|
||||||
|
result.put("code", 200);
|
||||||
|
result.put("message", "ok");
|
||||||
|
} else {
|
||||||
|
result.put("code", 400);
|
||||||
|
result.put("message", "ok");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result.put("code", 400);
|
||||||
|
result.put("message", "ok");
|
||||||
|
}
|
||||||
|
log.info("getBlockGroup反馈AGV输出参数:{}", result.toString());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> UnifiedResponse<T> releaseBlockGroup(JSONObject reqParam) {
|
public JSONObject releaseBlockGroup(JSONObject reqParam) {
|
||||||
String path = "/releaseBlockGroup";
|
log.info("releaseBlockGroup收到AGV请求参数:{}", reqParam.toString());
|
||||||
return xgHttpUtil.sendPostRequest(path, reqParam);
|
// 需返回参数
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
// 根据设备号获取对应的设备
|
||||||
|
Device device = deviceAppService.findDeviceByCode(reqParam.getString("block_group_id"));
|
||||||
|
if (ObjectUtil.isEmpty(device)) {
|
||||||
|
throw new BadRequestException("设备号 " + reqParam.getString("block_group_id") + " 不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (device.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {
|
||||||
|
// 三色灯驱动
|
||||||
|
LampThreecolorDeviceDriver driver = (LampThreecolorDeviceDriver) device.getDeviceDriver();
|
||||||
|
// 给三色灯写入进入命令0-离开,1-进入
|
||||||
|
driver.writing(0,Integer.parseInt(device.getExtraValue().get("color").toString()));
|
||||||
|
|
||||||
|
// 判断是否允许离开 1-允许,0-不允许
|
||||||
|
if (driver.getAction() == 1) {
|
||||||
|
// 判断是否清楚车号
|
||||||
|
if (device.getExtraValue().get("color").toString().equals("1")) {
|
||||||
|
driver.setCar_no("");
|
||||||
|
}
|
||||||
|
result.put("code", 200);
|
||||||
|
result.put("message", "ok");
|
||||||
|
} else {
|
||||||
|
result.put("code", 400);
|
||||||
|
result.put("message", "ok");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result.put("code", 400);
|
||||||
|
result.put("message", "ok");
|
||||||
|
}
|
||||||
|
log.info("releaseBlockGroup反馈AGV输出参数:{}", result.toString());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -830,7 +895,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
if (address.contains("GET")) {
|
if (address.contains("GET")) {
|
||||||
return agvWaitUtil.waitInGet(deviceCodeNow);
|
return agvWaitUtil.waitInGet(deviceCodeNow);
|
||||||
} else if (address.contains("PUT")) {
|
} else if (address.contains("PUT")) {
|
||||||
return agvWaitUtil.waitInPut(deviceCodeNow);
|
return agvWaitUtil.waitInPut(deviceCodeNow,task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (address.contains("OUT")) {
|
if (address.contains("OUT")) {
|
||||||
@@ -849,6 +914,12 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
throw new BadRequestException("请求失败,IN OUT 站点错误!");
|
throw new BadRequestException("请求失败,IN OUT 站点错误!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject json) {
|
||||||
|
String path = "/gotoSitePause";
|
||||||
|
return xgHttpUtil.sendPostRequest(path, json);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 叉车运单动作块
|
* 叉车运单动作块
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ public enum DriverTypeEnum {
|
|||||||
XIANGONG_AGV_DEVICE_DRIVER(4, "xg_agv", "仙工AGV", "agv"),
|
XIANGONG_AGV_DEVICE_DRIVER(4, "xg_agv", "仙工AGV", "agv"),
|
||||||
RGV_DEVICE_DRIVER(5, "rgv_station", "RGV", "rgv"),
|
RGV_DEVICE_DRIVER(5, "rgv_station", "RGV", "rgv"),
|
||||||
ELEVATOR_DRIVER(6, "standard_elevator", "电梯", "elevator"),
|
ELEVATOR_DRIVER(6, "standard_elevator", "电梯", "elevator"),
|
||||||
CONVEYOR_CONTROL(7, "standard_conveyor_control", "标准版-输送线", "conveyor");
|
CONVEYOR_CONTROL(7, "standard_conveyor_control", "标准版-输送线", "conveyor"),
|
||||||
|
CONVEYOR_COLOR(8, "lamp_three_color", "标准版-三色灯", "color");
|
||||||
//驱动索引
|
//驱动索引
|
||||||
private int index;
|
private int index;
|
||||||
//驱动编码
|
//驱动编码
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class ItemProtocol {
|
|||||||
public static String item_direction = "direction";
|
public static String item_direction = "direction";
|
||||||
public static String item_operation_type = "operation_type";
|
public static String item_operation_type = "operation_type";
|
||||||
public static String item_task = "task";
|
public static String item_task = "task";
|
||||||
|
public static String item_barcode = "barcode";
|
||||||
|
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
public static String item_to_target = "to_target";
|
public static String item_to_target = "to_target";
|
||||||
@@ -39,6 +40,10 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_heartbeat);
|
return this.getOpcIntegerValue(item_heartbeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBarcode() {
|
||||||
|
return this.getOpcStringValue(item_barcode);
|
||||||
|
}
|
||||||
|
|
||||||
public int getMode() {
|
public int getMode() {
|
||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_mode);
|
||||||
}
|
}
|
||||||
@@ -95,6 +100,15 @@ public class ItemProtocol {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public String getOpcStringValue(String protocol) {
|
||||||
|
String value = this.driver.getStringValue(protocol);
|
||||||
|
if (value == null) {
|
||||||
|
//throw new BusinessException("{} : {}", new Object[]{protocol, DeviceErrorProtocol.getMessage(10000)});
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
public static List<ItemDTO> getReadableItemDtos() {
|
public static List<ItemDTO> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
int mode = 0;
|
int mode = 0;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int move = 0;
|
int move = 0;
|
||||||
|
int action = 0;
|
||||||
|
String barcode = null;
|
||||||
int task = 0;
|
int task = 0;
|
||||||
//出入库模式
|
//出入库模式
|
||||||
int operation_type = 0;
|
int operation_type = 0;
|
||||||
@@ -155,6 +157,8 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
move = this.itemProtocol.getMove();
|
move = this.itemProtocol.getMove();
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
|
action = this.itemProtocol.getAction();
|
||||||
|
barcode = this.itemProtocol.getBarcode();
|
||||||
hasGoods = this.itemProtocol.getMove();
|
hasGoods = this.itemProtocol.getMove();
|
||||||
operation_type = this.itemProtocol.getOperation_type();
|
operation_type = this.itemProtocol.getOperation_type();
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
@@ -169,7 +173,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
if (error != last_error) {
|
if (error != last_error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 2 && move != 0 && task > 0) {
|
/* if (mode == 2 && move != 0 && task > 0) {
|
||||||
//inst_message
|
//inst_message
|
||||||
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
inst = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||||
if (inst != null) {
|
if (inst != null) {
|
||||||
@@ -182,7 +186,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
instructionService.update(inst);
|
instructionService.update(inst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -214,9 +218,6 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//申请任务
|
//申请任务
|
||||||
if (!StrUtil.isBlank(material) && !StrUtil.isBlank(qty) && material.length() > 0 && qty.length() > 0 && !requireSucess) {
|
|
||||||
this.instruction_require(container);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
@@ -227,18 +228,9 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
//申请空盘
|
//申请空盘
|
||||||
if (move == 0 && !requireSucess) {
|
|
||||||
apply_OutEmpty();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
//申请入库
|
//申请入库
|
||||||
if (move != 0 && !applySucess) {
|
|
||||||
instruction_apply();
|
|
||||||
}
|
|
||||||
if (move != 0 && !requireSucess) {
|
|
||||||
apply_InEmpty();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ public class ItemProtocol {
|
|||||||
public static String item_mode = "mode";
|
public static String item_mode = "mode";
|
||||||
public static String item_action = "action";
|
public static String item_action = "action";
|
||||||
public static String item_error = "error";
|
public static String item_error = "error";
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "toCommand";
|
||||||
|
public static String item_to_color = "toColor";
|
||||||
|
public static String item_color = "color";
|
||||||
|
|
||||||
|
|
||||||
private LampThreecolorDeviceDriver driver;
|
private LampThreecolorDeviceDriver driver;
|
||||||
@@ -25,6 +27,10 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_heartbeat);
|
return this.getOpcIntegerValue(item_heartbeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getColor() {
|
||||||
|
return this.getOpcIntegerValue(item_color);
|
||||||
|
}
|
||||||
|
|
||||||
public int getMode() {
|
public int getMode() {
|
||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_mode);
|
||||||
}
|
}
|
||||||
@@ -57,14 +63,16 @@ public class ItemProtocol {
|
|||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDTO(item_heartbeat, "心跳", "DB51.B0"));
|
list.add(new ItemDTO(item_heartbeat, "心跳", "DB51.B0"));
|
||||||
list.add(new ItemDTO(item_mode, "工作模式", "DB51.B1", Boolean.valueOf(true)));
|
list.add(new ItemDTO(item_mode, "工作模式", "DB51.B1", Boolean.valueOf(true)));
|
||||||
list.add(new ItemDTO(item_action, "动作信号", "DB51.B2"));
|
list.add(new ItemDTO(item_action, "是否允许进入", "DB51.B2"));
|
||||||
list.add(new ItemDTO(item_error, "报警信号", "DB51.B4"));
|
list.add(new ItemDTO(item_error, "报警信号", "DB51.B4"));
|
||||||
|
list.add(new ItemDTO(item_color, "颜色", "DB51.B5"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDTO> getWriteableItemDtos() {
|
public static List<ItemDTO> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDTO(item_to_command, "作业命令", "DB52.W2", Boolean.valueOf(true)));
|
list.add(new ItemDTO(item_to_command, "作业命令", "DB52.W2", Boolean.valueOf(true)));
|
||||||
|
list.add(new ItemDTO(item_to_color, "颜色", "DB52.W3", Boolean.valueOf(true)));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,7 @@ public class LampThreecolorDefinition implements OpcDeviceDriverDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDTO> getReadableItemDtos2() {
|
public static List<ItemDTO> getReadableItemDtos2() {
|
||||||
List<ItemDTO> list = new ArrayList();
|
return ItemProtocol.getReadableItemDtos();
|
||||||
list.add(new ItemDTO(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
|
||||||
list.add(new ItemDTO(ItemProtocol.item_mode, "工作模式", "DB600.B1", true));
|
|
||||||
list.add(new ItemDTO(ItemProtocol.item_action, "动作信号", "DB600.B2"));
|
|
||||||
list.add(new ItemDTO(ItemProtocol.item_error, "报警信号", "DB600.B4"));
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.acs.agv.server.impl.XianGongAgvServiceImpl;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
|
import org.nl.acs.ext.UnifiedResponse;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.acs.route.service.RouteLineService;
|
import org.nl.acs.route.service.RouteLineService;
|
||||||
@@ -18,9 +20,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
|||||||
import org.openscada.opc.lib.da.Server;
|
import org.openscada.opc.lib.da.Server;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测站点驱动
|
* 检测站点驱动
|
||||||
@@ -50,6 +50,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
String devicecode;
|
String devicecode;
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int action = 0;
|
int action = 0;
|
||||||
|
int heartbeat = 0;
|
||||||
|
int color = 0;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int move = 0;
|
int move = 0;
|
||||||
int task = 0;
|
int task = 0;
|
||||||
@@ -59,6 +61,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
int last_move = 0;
|
int last_move = 0;
|
||||||
int last_task = 0;
|
int last_task = 0;
|
||||||
|
|
||||||
|
String car_no = "";
|
||||||
|
|
||||||
boolean hasVehicle = false;
|
boolean hasVehicle = false;
|
||||||
boolean isReady = false;
|
boolean isReady = false;
|
||||||
protected int instruction_num = 0;
|
protected int instruction_num = 0;
|
||||||
@@ -97,9 +101,11 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
String device_code = this.getDevice().getDevice_code();
|
String device_code = this.getDevice().getDevice_code();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
action = this.itemProtocol.getAction();
|
action = this.itemProtocol.getAction();
|
||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
|
color = this.itemProtocol.getColor();
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
}
|
}
|
||||||
if (action != last_action) {
|
if (action != last_action) {
|
||||||
@@ -109,8 +115,22 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
last_action = action;
|
last_action = action;
|
||||||
last_mode = mode;
|
last_mode = mode;
|
||||||
last_error = error;
|
last_error = error;
|
||||||
//message = StringFormatUtl.format("设备报警:{}", new Object[]{});
|
|
||||||
|
|
||||||
|
if (error == 1) {
|
||||||
|
String[] carArr = {car_no};
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("vehicles", carArr);
|
||||||
|
// 请求下发agv急停
|
||||||
|
XianGongAgvServiceImpl xianGongAgv = SpringContextHolder.getBean(XianGongAgvServiceImpl.class);
|
||||||
|
//创建订单序列
|
||||||
|
UnifiedResponse<JSONObject> response = xianGongAgv.sendOrderStopToXZ(json);
|
||||||
|
|
||||||
|
if (!response.isSuccess()) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//message = StringFormatUtl.format("设备报警:{}", new Object[]{});
|
||||||
// String manual_create_task = this.getDevice().getExtraValue().get("manual_create_task").toString();
|
// String manual_create_task = this.getDevice().getExtraValue().get("manual_create_task").toString();
|
||||||
|
|
||||||
|
|
||||||
@@ -150,10 +170,29 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
|||||||
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
|
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writing(int command,int color) {
|
||||||
|
String toCommand = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + ItemProtocol.item_to_command;
|
||||||
|
|
||||||
|
String toColor = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + ItemProtocol.item_to_color;
|
||||||
|
|
||||||
|
String opcservcerid = this.getDevice().getOpc_server_id();
|
||||||
|
Server server = ReadUtil.getServer(opcservcerid);
|
||||||
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
|
itemMap.put(toCommand, command);
|
||||||
|
itemMap.put(toColor, color);
|
||||||
|
ReadUtil.write(itemMap, server);
|
||||||
|
ReadUtil.write(itemMap, server);
|
||||||
|
server.disconnect();
|
||||||
|
log.info("下发PLC信号:{},{}", toCommand, command);
|
||||||
|
log.info("下发PLC信号:{},{}", toColor, color);
|
||||||
|
System.out.println("设备:" + devicecode + ",下发PLC信号:" + toCommand + ",value:" + command);
|
||||||
|
System.out.println("设备:" + devicecode + ",下发PLC信号:" + toColor + ",value:" + color);
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void OpenOrClose(String type) {
|
public synchronized void OpenOrClose(String type) {
|
||||||
|
|
||||||
writing(Integer.parseInt(type));
|
writing(Integer.parseInt(type));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
String task_type = task.getTask_type();
|
String task_type = task.getTask_type();
|
||||||
String remark = task.getRemark();
|
String remark = task.getRemark();
|
||||||
String params = task.getParams();
|
String params = task.getParams();
|
||||||
|
String is_vehicle = task.getIs_vehicle();
|
||||||
// 双工RGV任务 后工位任务
|
// 双工RGV任务 后工位任务
|
||||||
String start_point_code2 = task.getStart_device_code2();
|
String start_point_code2 = task.getStart_device_code2();
|
||||||
String next_point_code2 = task.getNext_device_code2();
|
String next_point_code2 = task.getNext_device_code2();
|
||||||
@@ -223,6 +224,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("vehicle_code", vehicle_code);
|
jo.put("vehicle_code", vehicle_code);
|
||||||
jo.put("vehicle_type", vehicle_type);
|
jo.put("vehicle_type", vehicle_type);
|
||||||
jo.put("remark", remark);
|
jo.put("remark", remark);
|
||||||
|
jo.put("is_vehicle", is_vehicle);
|
||||||
jo.put("params", params);
|
jo.put("params", params);
|
||||||
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
||||||
jo.put("direction", direction);
|
jo.put("direction", direction);
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
/* LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
||||||
|
|
||||||
|
|
||||||
//变更三色灯状态
|
//变更三色灯状态
|
||||||
@@ -469,7 +469,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) lamddevice.getDeviceDriver();
|
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) lamddevice.getDeviceDriver();
|
||||||
lampThreecolorDeviceDriver.writing(0);
|
lampThreecolorDeviceDriver.writing(0);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ public enum DeviceType {
|
|||||||
shadow("影子设备", 20),
|
shadow("影子设备", 20),
|
||||||
other("其他设备", 14),
|
other("其他设备", 14),
|
||||||
safetydoor("安全门", 17),
|
safetydoor("安全门", 17),
|
||||||
elevator("电梯", 21);
|
elevator("电梯", 21),
|
||||||
|
color("三色灯", 22);
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
private int order;
|
private int order;
|
||||||
|
|||||||
@@ -282,4 +282,9 @@ public class TaskDto implements Serializable {
|
|||||||
* 放货设备编号(覆膜机)
|
* 放货设备编号(覆膜机)
|
||||||
*/
|
*/
|
||||||
private String put_device_code;
|
private String put_device_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要载具
|
||||||
|
*/
|
||||||
|
private String is_vehicle;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -493,6 +493,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
return this.tasks
|
return this.tasks
|
||||||
.stream()
|
.stream()
|
||||||
.filter(taskDto -> "0".equals(taskDto.getTask_status()))
|
.filter(taskDto -> "0".equals(taskDto.getTask_status()))
|
||||||
|
.sorted(Comparator.comparing(TaskDto::getPriority).reversed())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,6 +791,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
request.setTask_id(dto.getExt_task_uuid());
|
request.setTask_id(dto.getExt_task_uuid());
|
||||||
request.setTask_code(dto.getTask_code());
|
request.setTask_code(dto.getTask_code());
|
||||||
request.setTask_status(dto.getTask_status());
|
request.setTask_status(dto.getTask_status());
|
||||||
|
request.setVehicle_code(dto.getVehicle_code());
|
||||||
|
request.setCar_no("");
|
||||||
request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode());
|
request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode());
|
||||||
request.setRequest_medthod_name(RequestMethodEnum.feedback_task_status.getName());
|
request.setRequest_medthod_name(RequestMethodEnum.feedback_task_status.getName());
|
||||||
acstowmsService.apply(request);
|
acstowmsService.apply(request);
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ import { get, selectDriverCodeList } from '@/api/acs/device/driverConfig'
|
|||||||
import { getDicts } from '@/api/system/dict'
|
import { getDicts } from '@/api/system/dict'
|
||||||
import standard_inspect_site from './driver/standard_inspect_site'
|
import standard_inspect_site from './driver/standard_inspect_site'
|
||||||
import standard_ordinary_site from './driver/standard_ordinary_site'
|
import standard_ordinary_site from './driver/standard_ordinary_site'
|
||||||
import lamp_three_color from './driver/lamp_three_color'
|
|
||||||
import standard_storage from '@/views/acs/device/driver/standard_storage'
|
import standard_storage from '@/views/acs/device/driver/standard_storage'
|
||||||
import standard_scanner from '@/views/acs/device/driver/standard_scanner'
|
import standard_scanner from '@/views/acs/device/driver/standard_scanner'
|
||||||
import standard_conveyor_control_with_scanner from '@/views/acs/device/driver/standard_conveyor_control_with_scanner'
|
import standard_conveyor_control_with_scanner from '@/views/acs/device/driver/standard_conveyor_control_with_scanner'
|
||||||
import standard_conveyor_control from '@/views/acs/device/driver/standard_conveyor_control'
|
import standard_conveyor_control from '@/views/acs/device/driver/standard_conveyor_control'
|
||||||
|
import lamp_three_color from '@/views/acs/device/driver/lamp_three_color'
|
||||||
import standard_conveyor_monitor from '@/views/acs/device/driver/standard_conveyor_monitor'
|
import standard_conveyor_monitor from '@/views/acs/device/driver/standard_conveyor_monitor'
|
||||||
import lnsh_mixing_mill from '@/views/acs/device/driver/lnsh/lnsh_mixing_mill'
|
import lnsh_mixing_mill from '@/views/acs/device/driver/lnsh/lnsh_mixing_mill'
|
||||||
import lnsh_press from '@/views/acs/device/driver/lnsh/lnsh_press'
|
import lnsh_press from '@/views/acs/device/driver/lnsh/lnsh_press'
|
||||||
|
|||||||
@@ -1,6 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--三色灯-->
|
<!--三色灯-->
|
||||||
<div>
|
<div>
|
||||||
|
<el-card class="box-card" shadow="never">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span class="role-span">扩展字段:</span>
|
||||||
|
</div>
|
||||||
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否清除车号" label-width="150px">
|
||||||
|
<el-select
|
||||||
|
v-model="form.is_clean"
|
||||||
|
placeholder="无"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.is_yes_not"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="颜色" label-width="150px">
|
||||||
|
<el-select
|
||||||
|
v-model="form.color"
|
||||||
|
placeholder="无"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in colorList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card" shadow="never">
|
<el-card class="box-card" shadow="never">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span class="role-span">设备协议:</span>
|
<span class="role-span">设备协议:</span>
|
||||||
@@ -13,6 +57,7 @@
|
|||||||
v-model="opc_id"
|
v-model="opc_id"
|
||||||
placeholder="无"
|
placeholder="无"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
@change="changeOpc"
|
@change="changeOpc"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -158,6 +203,7 @@ import deviceCrud from '@/api/acs/device/device'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LampThreeColor',
|
name: 'LampThreeColor',
|
||||||
|
dicts: ['is_yes_not'],
|
||||||
mixins: [crud],
|
mixins: [crud],
|
||||||
props: {
|
props: {
|
||||||
parentForm: {
|
parentForm: {
|
||||||
@@ -175,6 +221,10 @@ export default {
|
|||||||
opc_code: '',
|
opc_code: '',
|
||||||
configLoading: false,
|
configLoading: false,
|
||||||
dataOpcservers: [],
|
dataOpcservers: [],
|
||||||
|
colorList: [
|
||||||
|
{ 'label': '红色', 'value': '3' },
|
||||||
|
{ 'label': '绿色', 'value': '4' }
|
||||||
|
],
|
||||||
dataOpcPlcs: [],
|
dataOpcPlcs: [],
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
data1: [],
|
data1: [],
|
||||||
@@ -220,7 +270,7 @@ export default {
|
|||||||
this.data2 = data.ws
|
this.data2 = data.ws
|
||||||
this.sliceItem()
|
this.sliceItem()
|
||||||
})
|
})
|
||||||
selectPlcList().then(data => {
|
selectPlcList().then(data => {updateConfig
|
||||||
this.dataOpcPlcs = data
|
this.dataOpcPlcs = data
|
||||||
this.plc_id = this.$props.parentForm.opc_plc_id
|
this.plc_id = this.$props.parentForm.opc_plc_id
|
||||||
})
|
})
|
||||||
@@ -285,6 +335,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
test_read2() {
|
||||||
|
testRead(this.data2, this.opc_id).then(data => {
|
||||||
|
this.data2 = data
|
||||||
|
console.log(this.data2)
|
||||||
|
this.notify('操作成功!', 'success')
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
test_read1() {
|
test_read1() {
|
||||||
testRead(this.data1, this.opc_id).then(data => {
|
testRead(this.data1, this.opc_id).then(data => {
|
||||||
this.data1 = data
|
this.data1 = data
|
||||||
@@ -300,15 +359,6 @@ export default {
|
|||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
test_read2() {
|
|
||||||
testRead(this.data2, this.opc_id).then(data => {
|
|
||||||
this.data2 = data
|
|
||||||
console.log(this.data2)
|
|
||||||
this.notify('操作成功!', 'success')
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err.response.data.message)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -318,7 +368,7 @@ export default {
|
|||||||
parentForm.is_route = true
|
parentForm.is_route = true
|
||||||
parentForm.plc_id = this.plc_id
|
parentForm.plc_id = this.plc_id
|
||||||
parentForm.opc_id = this.opc_id
|
parentForm.opc_id = this.opc_id
|
||||||
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
updateConfig(parentForm, this.form, {}, this.data1, this.data2).then(res => {
|
||||||
this.notify('保存成功', 'success')
|
this.notify('保存成功', 'success')
|
||||||
this.configLoading = false
|
this.configLoading = false
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
for (int i = 0; i < array.size(); i++) {
|
for (int i = 0; i < array.size(); i++) {
|
||||||
JSONObject row = array.getJSONObject(i);
|
JSONObject row = array.getJSONObject(i);
|
||||||
String task_id = row.getString("task_id");
|
String task_id = row.getString("task_id");
|
||||||
|
String vehicle_code = row.getString("vehicle_code");
|
||||||
|
String car_no = row.getString("car_no");
|
||||||
RLock lock = redissonClient.getLock(task_id);
|
RLock lock = redissonClient.getLock(task_id);
|
||||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||||
try {
|
try {
|
||||||
@@ -75,6 +77,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
status = TaskStatus.EXECUTING;
|
status = TaskStatus.EXECUTING;
|
||||||
} else if ("2".equals(acs_task_status)) {
|
} else if ("2".equals(acs_task_status)) {
|
||||||
status = TaskStatus.FINISHED;
|
status = TaskStatus.FINISHED;
|
||||||
|
// 更新载具号
|
||||||
|
taskObj.setVehicle_code(vehicle_code);
|
||||||
|
taskObj.setCar_no(car_no);
|
||||||
|
iSchBaseTaskService.updateById(taskObj);
|
||||||
} else {
|
} else {
|
||||||
status = TaskStatus.CANCELED;
|
status = TaskStatus.CANCELED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class WmsToMesServiceImpl implements WmsToMesService {
|
|||||||
content.put("ArrivedLocation", task.getPoint_code2());
|
content.put("ArrivedLocation", task.getPoint_code2());
|
||||||
// 是否到达终点
|
// 是否到达终点
|
||||||
content.put("IsPlacedLocation", 1);
|
content.put("IsPlacedLocation", 1);
|
||||||
|
content.put("TuoPanCode", task.getVehicle_code());
|
||||||
result.put("content",content);
|
result.put("content",content);
|
||||||
|
|
||||||
// 通知mes任务完成
|
// 通知mes任务完成
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ public class SchBaseTask implements Serializable {
|
|||||||
private String update_name;
|
private String update_name;
|
||||||
|
|
||||||
|
|
||||||
|
private String is_vehicle;
|
||||||
|
|
||||||
|
|
||||||
private String update_time;
|
private String update_time;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String config_name;
|
private String config_name;
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ public class AcsTaskDto {
|
|||||||
*/
|
*/
|
||||||
private String direction;
|
private String direction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要载具
|
||||||
|
*/
|
||||||
|
private String Is_vehicle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扩展属性
|
* 扩展属性
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public class KABDMTask extends AbstractTask {
|
|||||||
task.setConfig_code(json.getString("task_type"));
|
task.setConfig_code(json.getString("task_type"));
|
||||||
task.setPoint_code1(json.getString("PickingLocation"));
|
task.setPoint_code1(json.getString("PickingLocation"));
|
||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
@@ -68,6 +69,7 @@ public class KABDMTask extends AbstractTask {
|
|||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class KDMABTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class KDMABTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MABCTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MABCTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MABDMTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MABDMTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MABGPTHJTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MABGPTHJTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MBZCPTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MBZCPTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MCDTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MCDTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MDDMTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MDDMTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MDMCPTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MDMCPTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MGPTHJABTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MGPTHJABTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class MGPTHJCPTask extends AbstractTask {
|
|||||||
task.setPoint_code2(json.getString("PlacedLocation"));
|
task.setPoint_code2(json.getString("PlacedLocation"));
|
||||||
task.setRequest_param(json.toString());
|
task.setRequest_param(json.toString());
|
||||||
task.setPriority(json.getString("Priority"));
|
task.setPriority(json.getString("Priority"));
|
||||||
|
task.setIs_vehicle(json.getString("IsPanCode"));
|
||||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
task.setCreate_time(DateUtil.now());
|
task.setCreate_time(DateUtil.now());
|
||||||
@@ -67,6 +68,7 @@ public class MGPTHJCPTask extends AbstractTask {
|
|||||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||||
acsTaskDto.setPriority(taskDao.getPriority());
|
acsTaskDto.setPriority(taskDao.getPriority());
|
||||||
|
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
|
||||||
acsTaskDto.setTask_type("1");
|
acsTaskDto.setTask_type("1");
|
||||||
|
|
||||||
return acsTaskDto;
|
return acsTaskDto;
|
||||||
|
|||||||
Reference in New Issue
Block a user