Browse Source

add:三色灯

master2
刘先源 1 month ago
parent
commit
8ed0d2c086
  1. 17
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/rest/XianGongAgvController.java
  2. 57
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/AgvWaitUtil.java
  3. 17
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java
  4. 85
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java
  5. 3
      acs2/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java
  6. 14
      acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java
  7. 20
      acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java
  8. 12
      acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/ItemProtocol.java
  9. 7
      acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/LampThreecolorDefinition.java
  10. 51
      acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/LampThreecolorDeviceDriver.java
  11. 2
      acs2/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  12. 4
      acs2/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  13. 3
      acs2/nladmin-system/src/main/java/org/nl/acs/opc/DeviceType.java
  14. 5
      acs2/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java
  15. 3
      acs2/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  16. 2
      acs2/nladmin-ui/src/views/acs/device/config.vue
  17. 72
      acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue
  18. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  19. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java
  20. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java
  21. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java
  22. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/KABDMTask.java
  23. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/KDMABTask.java
  24. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABCTask.java
  25. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABDMTask.java
  26. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABGPTHJTask.java
  27. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MBZCPTask.java
  28. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MCDTask.java
  29. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MDDMTask.java
  30. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MDMCPTask.java
  31. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MGPTHJABTask.java
  32. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MGPTHJCPTask.java

17
acs2/nladmin-system/src/main/java/org/nl/acs/agv/rest/XianGongAgvController.java

@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "仙工AGV")
@Slf4j
@SaIgnore
@RequestMapping("/api")
public class XianGongAgvController {
private final XianGongAgvService agvService;
@ -33,4 +34,20 @@ public class XianGongAgvController {
public ResponseEntity<JSONObject> xgAGVWaitPointRequest(@RequestBody JSONObject requestParam) {
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);
}
}

57
acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/AgvWaitUtil.java

@ -4,10 +4,12 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
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.log.service.DeviceExecuteLogService;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.modules.common.exception.BadRequestException;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +27,8 @@ public class AgvWaitUtil {
private DeviceAppService deviceAppService;
@Autowired
private DeviceExecuteLogService deviceExecuteLogService;
@Autowired
private TaskService taskService;
//取货前等待
public JSONObject waitInGet(String deviceCode) {
@ -36,9 +40,13 @@ public class AgvWaitUtil {
throw new BadRequestException("请求失败,未找到设备!");
}
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
if (driver.getMove() == 1) {
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线申请取货-1
driver.writing(1);
// 判断是否满足条件:action = 1(允许取货) && move = 1(有货)
if (driver.getMove() == 1 && driver.getAction() == 1) {
String message = "允许AGV取货。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
@ -71,8 +79,11 @@ public class AgvWaitUtil {
throw new BadRequestException("请求失败,未找到设备!");
}
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线取货完成-2
driver.writing(2);
if (driver.getMove() == 0) {
String message = "允许AGV取货后离开。";
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);
boolean flag = false;
@ -108,17 +119,26 @@ public class AgvWaitUtil {
throw new BadRequestException("请求失败,未找到设备!");
}
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
if (driver.getMove() == 0) {
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线申请放货-3
driver.writing(3);
// 判断是否满足条件:action = 2(允许放货) && move = 0(无货)
if (driver.getMove() == 0 && driver.getAction() == 2) {
String message = "允许AGV放货。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
flag = true;
if (taskDto.getIs_vehicle().equals("1")) {
// 获取当前母载具号
taskDto.setVehicle_code(driver.getBarcode());
taskService.update(taskDto);
}
} else {
String message = "光电信号有货,不允许放货!";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", "光电信号为:" + driver.getMove());
}
} else {
flag = true;
@ -146,15 +166,20 @@ public class AgvWaitUtil {
throw new BadRequestException("请求失败,未找到设备!");
}
if (device.getDeviceDriver() instanceof PhotoelectricDetectionDeviceDriver) {
PhotoelectricDetectionDeviceDriver driver = (PhotoelectricDetectionDeviceDriver) device.getDeviceDriver();
if (device.getDeviceDriver() instanceof StandardCoveyorControlDeviceDriver) {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线放货完成-4
driver.writing(4);
if (driver.getMove() == 1) {
String message = "允许AGV放货完成离开。";
String message = "允许AGV放货离开。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
flag = true;
} else {
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", "光电信号为:" + driver.getMove() + ",不允许AGV放货完成离开!");
String message = "光电信号有货,不允许AGV放货后离开。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
}
} else {
flag = true;

17
acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java

@ -1,6 +1,5 @@
package org.nl.acs.agv.server;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONObject;
import org.nl.acs.agv.server.dto.AgvDto;
import org.nl.acs.ext.UnifiedResponse;
@ -91,10 +90,9 @@ public interface XianGongAgvService {
* 占用互斥组
*
* @param reqParam
* @param <T>
* @return
*/
public <T> UnifiedResponse<T> getBlockGroup(JSONObject reqParam);
JSONObject getBlockGroup(JSONObject reqParam);
/**
* 查询互斥组状态
@ -110,10 +108,9 @@ public interface XianGongAgvService {
* 释放互斥组
*
* @param reqParam
* @param <T>
* @return
*/
public <T> UnifiedResponse<T> releaseBlockGroup(JSONObject reqParam);
JSONObject releaseBlockGroup(JSONObject reqParam);
/**
@ -167,4 +164,14 @@ public interface XianGongAgvService {
* @return
*/
public JSONObject xgAGVWaitPointRequest(JSONObject requestParam);
/**
* 下发运单急停
*
* @param requestParam
* @return
* @throws Exception
*/
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject requestParam);
}

85
acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java

@ -12,7 +12,9 @@ import org.nl.acs.agv.server.AgvWaitUtil;
import org.nl.acs.agv.server.XianGongAgvService;
import org.nl.acs.agv.server.dto.AgvDto;
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.lamp_three_color.LampThreecolorDeviceDriver;
import org.nl.acs.ext.UnifiedResponse;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.xg.XgHttpUtil;
@ -130,15 +132,78 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
}
@Override
public <T> UnifiedResponse<T> getBlockGroup(JSONObject reqParam) {
String path = "/getBlockGroup";
return xgHttpUtil.sendPostRequest(path, reqParam);
public JSONObject getBlockGroup(JSONObject reqParam) {
log.info("getBlockGroup收到AGV请求参数:{}", reqParam.toString());
// 需返回参数
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
public <T> UnifiedResponse<T> releaseBlockGroup(JSONObject reqParam) {
String path = "/releaseBlockGroup";
return xgHttpUtil.sendPostRequest(path, reqParam);
public JSONObject releaseBlockGroup(JSONObject reqParam) {
log.info("releaseBlockGroup收到AGV请求参数:{}", reqParam.toString());
// 需返回参数
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
@ -830,7 +895,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
if (address.contains("GET")) {
return agvWaitUtil.waitInGet(deviceCodeNow);
} else if (address.contains("PUT")) {
return agvWaitUtil.waitInPut(deviceCodeNow);
return agvWaitUtil.waitInPut(deviceCodeNow,task);
}
}
if (address.contains("OUT")) {
@ -849,6 +914,12 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
throw new BadRequestException("请求失败,IN OUT 站点错误!");
}
@Override
public <T> UnifiedResponse<T> sendOrderStopToXZ(JSONObject json) {
String path = "/gotoSitePause";
return xgHttpUtil.sendPostRequest(path, json);
}
/**
* 叉车运单动作块
*

3
acs2/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java

@ -15,7 +15,8 @@ public enum DriverTypeEnum {
XIANGONG_AGV_DEVICE_DRIVER(4, "xg_agv", "仙工AGV", "agv"),
RGV_DEVICE_DRIVER(5, "rgv_station", "RGV", "rgv"),
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;
//驱动编码

14
acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/ItemProtocol.java

@ -23,6 +23,7 @@ public class ItemProtocol {
public static String item_direction = "direction";
public static String item_operation_type = "operation_type";
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_target = "to_target";
@ -39,6 +40,10 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_heartbeat);
}
public String getBarcode() {
return this.getOpcStringValue(item_barcode);
}
public int getMode() {
return this.getOpcIntegerValue(item_mode);
}
@ -95,6 +100,15 @@ public class ItemProtocol {
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() {
ArrayList list = new ArrayList();

20
acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java

@ -79,6 +79,8 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
int mode = 0;
int error = 0;
int move = 0;
int action = 0;
String barcode = null;
int task = 0;
//出入库模式
int operation_type = 0;
@ -155,6 +157,8 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
error = this.itemProtocol.getError();
move = this.itemProtocol.getMove();
task = this.itemProtocol.getTask();
action = this.itemProtocol.getAction();
barcode = this.itemProtocol.getBarcode();
hasGoods = this.itemProtocol.getMove();
operation_type = this.itemProtocol.getOperation_type();
if (mode != last_mode) {
@ -169,7 +173,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
if (error != last_error) {
}
if (mode == 2 && move != 0 && task > 0) {
/* if (mode == 2 && move != 0 && task > 0) {
//inst_message
inst = instructionService.findByCodeFromCache(String.valueOf(task));
if (inst != null) {
@ -182,7 +186,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
instructionService.update(inst);
}
}
}
}*/
} catch (Exception var17) {
return;
}
@ -214,9 +218,6 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
break;
case 2:
//申请任务
if (!StrUtil.isBlank(material) && !StrUtil.isBlank(qty) && material.length() > 0 && qty.length() > 0 && !requireSucess) {
this.instruction_require(container);
}
break;
case 3:
@ -227,18 +228,9 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
break;
case 5:
//申请空盘
if (move == 0 && !requireSucess) {
apply_OutEmpty();
}
break;
case 6:
//申请入库
if (move != 0 && !applySucess) {
instruction_apply();
}
if (move != 0 && !requireSucess) {
apply_InEmpty();
}
break;
}

12
acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/ItemProtocol.java

@ -12,7 +12,9 @@ public class ItemProtocol {
public static String item_mode = "mode";
public static String item_action = "action";
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;
@ -25,6 +27,10 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_heartbeat);
}
public int getColor() {
return this.getOpcIntegerValue(item_color);
}
public int getMode() {
return this.getOpcIntegerValue(item_mode);
}
@ -57,14 +63,16 @@ public class ItemProtocol {
ArrayList list = new ArrayList();
list.add(new ItemDTO(item_heartbeat, "心跳", "DB51.B0"));
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_color, "颜色", "DB51.B5"));
return list;
}
public static List<ItemDTO> getWriteableItemDtos() {
ArrayList list = new ArrayList();
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;
}

7
acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/LampThreecolorDefinition.java

@ -55,12 +55,7 @@ public class LampThreecolorDefinition implements OpcDeviceDriverDefinition {
}
public static List<ItemDTO> getReadableItemDtos2() {
List<ItemDTO> list = new ArrayList();
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;
return ItemProtocol.getReadableItemDtos();
}
@Override

51
acs2/nladmin-system/src/main/java/org/nl/acs/device_driver/lamp_three_color/LampThreecolorDeviceDriver.java

@ -5,11 +5,13 @@ import lombok.Getter;
import lombok.Setter;
import lombok.RequiredArgsConstructor;
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.service.DeviceService;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
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.opc.Device;
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.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
/**
* 检测站点驱动
@ -50,6 +50,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
String devicecode;
int mode = 0;
int action = 0;
int heartbeat = 0;
int color = 0;
int error = 0;
int move = 0;
int task = 0;
@ -59,6 +61,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
int last_move = 0;
int last_task = 0;
String car_no = "";
boolean hasVehicle = false;
boolean isReady = false;
protected int instruction_num = 0;
@ -97,9 +101,11 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
String message = null;
String device_code = this.getDevice().getDevice_code();
heartbeat = this.itemProtocol.getHeartbeat();
mode = this.itemProtocol.getMode();
action = this.itemProtocol.getAction();
error = this.itemProtocol.getError();
color = this.itemProtocol.getColor();
if (mode != last_mode) {
}
if (action != last_action) {
@ -109,8 +115,22 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
last_action = action;
last_mode = mode;
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();
@ -150,10 +170,29 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
}
public synchronized void OpenOrClose(String type) {
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;
writing(Integer.parseInt(type));
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) {
writing(Integer.parseInt(type));
}
}

2
acs2/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -77,6 +77,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String task_type = task.getTask_type();
String remark = task.getRemark();
String params = task.getParams();
String is_vehicle = task.getIs_vehicle();
// 双工RGV任务 后工位任务
String start_point_code2 = task.getStart_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_type", vehicle_type);
jo.put("remark", remark);
jo.put("is_vehicle", is_vehicle);
jo.put("params", params);
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
jo.put("direction", direction);

4
acs2/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -457,7 +457,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
return;
}
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
/* LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
//变更三色灯状态
@ -469,7 +469,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) lamddevice.getDeviceDriver();
lampThreecolorDeviceDriver.writing(0);
}
}
}*/
}
@Override

3
acs2/nladmin-system/src/main/java/org/nl/acs/opc/DeviceType.java

@ -18,7 +18,8 @@ public enum DeviceType {
shadow("影子设备", 20),
other("其他设备", 14),
safetydoor("安全门", 17),
elevator("电梯", 21);
elevator("电梯", 21),
color("三色灯", 22);
private String description;
private int order;

5
acs2/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java

@ -282,4 +282,9 @@ public class TaskDto implements Serializable {
* 放货设备编号(覆膜机)
*/
private String put_device_code;
/**
* 是否需要载具
*/
private String is_vehicle;
}

3
acs2/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -493,6 +493,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
return this.tasks
.stream()
.filter(taskDto -> "0".equals(taskDto.getTask_status()))
.sorted(Comparator.comparing(TaskDto::getPriority).reversed())
.collect(Collectors.toList());
}
@ -790,6 +791,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
request.setTask_id(dto.getExt_task_uuid());
request.setTask_code(dto.getTask_code());
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_name(RequestMethodEnum.feedback_task_status.getName());
acstowmsService.apply(request);

2
acs2/nladmin-ui/src/views/acs/device/config.vue

@ -75,11 +75,11 @@ import { get, selectDriverCodeList } from '@/api/acs/device/driverConfig'
import { getDicts } from '@/api/system/dict'
import standard_inspect_site from './driver/standard_inspect_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_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 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 lnsh_mixing_mill from '@/views/acs/device/driver/lnsh/lnsh_mixing_mill'
import lnsh_press from '@/views/acs/device/driver/lnsh/lnsh_press'

72
acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue

@ -1,6 +1,50 @@
<template>
<!--三色灯-->
<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">
<div slot="header" class="clearfix">
<span class="role-span">设备协议</span>
@ -13,6 +57,7 @@
v-model="opc_id"
placeholder="无"
clearable
filterable
@change="changeOpc"
>
<el-option
@ -158,6 +203,7 @@ import deviceCrud from '@/api/acs/device/device'
export default {
name: 'LampThreeColor',
dicts: ['is_yes_not'],
mixins: [crud],
props: {
parentForm: {
@ -175,6 +221,10 @@ export default {
opc_code: '',
configLoading: false,
dataOpcservers: [],
colorList: [
{ 'label': '红色', 'value': '3' },
{ 'label': '绿色', 'value': '4' }
],
dataOpcPlcs: [],
deviceList: [],
data1: [],
@ -220,7 +270,7 @@ export default {
this.data2 = data.ws
this.sliceItem()
})
selectPlcList().then(data => {
selectPlcList().then(data => {updateConfig
this.dataOpcPlcs = data
this.plc_id = this.$props.parentForm.opc_plc_id
})
@ -285,25 +335,25 @@ export default {
}
})
},
test_read1() {
testRead(this.data1, this.opc_id).then(data => {
this.data1 = data
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_write1() {
testwrite(this.data2, this.opc_id).then(data => {
test_read1() {
testRead(this.data1, this.opc_id).then(data => {
this.data1 = data
this.notify('操作成功!', 'success')
}).catch(err => {
console.log(err.response.data.message)
})
},
test_read2() {
testRead(this.data2, this.opc_id).then(data => {
this.data2 = data
console.log(this.data2)
test_write1() {
testwrite(this.data2, this.opc_id).then(data => {
this.notify('操作成功!', 'success')
}).catch(err => {
console.log(err.response.data.message)
@ -318,7 +368,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_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.configLoading = false
}).catch(err => {

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -62,6 +62,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
for (int i = 0; i < array.size(); i++) {
JSONObject row = array.getJSONObject(i);
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);
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
@ -75,6 +77,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
status = TaskStatus.EXECUTING;
} else if ("2".equals(acs_task_status)) {
status = TaskStatus.FINISHED;
// 更新载具号
taskObj.setVehicle_code(vehicle_code);
taskObj.setCar_no(car_no);
iSchBaseTaskService.updateById(taskObj);
} else {
status = TaskStatus.CANCELED;
}

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java

@ -51,6 +51,7 @@ public class WmsToMesServiceImpl implements WmsToMesService {
content.put("ArrivedLocation", task.getPoint_code2());
// 是否到达终点
content.put("IsPlacedLocation", 1);
content.put("TuoPanCode", task.getVehicle_code());
result.put("content",content);
// 通知mes任务完成

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/dao/SchBaseTask.java

@ -119,6 +119,9 @@ public class SchBaseTask implements Serializable {
private String update_name;
private String is_vehicle;
private String update_time;
@TableField(exist = false)
private String config_name;

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AcsTaskDto.java

@ -120,6 +120,11 @@ public class AcsTaskDto {
*/
private String direction;
/**
* 是否需要载具
*/
private String Is_vehicle;
/**
* 扩展属性
*/

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/KABDMTask.java

@ -47,6 +47,7 @@ public class KABDMTask extends AbstractTask {
task.setConfig_code(json.getString("task_type"));
task.setPoint_code1(json.getString("PickingLocation"));
task.setPoint_code2(json.getString("PlacedLocation"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
@ -68,6 +69,7 @@ public class KABDMTask extends AbstractTask {
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setTask_type("1");
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
return acsTaskDto;
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/KDMABTask.java

@ -49,6 +49,7 @@ public class KDMABTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class KDMABTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABCTask.java

@ -49,6 +49,7 @@ public class MABCTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MABCTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABDMTask.java

@ -49,6 +49,7 @@ public class MABDMTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MABDMTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MABGPTHJTask.java

@ -49,6 +49,7 @@ public class MABGPTHJTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MABGPTHJTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MBZCPTask.java

@ -49,6 +49,7 @@ public class MBZCPTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MBZCPTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MCDTask.java

@ -49,6 +49,7 @@ public class MCDTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MCDTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MDDMTask.java

@ -49,6 +49,7 @@ public class MDDMTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MDDMTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MDMCPTask.java

@ -49,6 +49,7 @@ public class MDMCPTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MDMCPTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MGPTHJABTask.java

@ -49,6 +49,7 @@ public class MGPTHJABTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MGPTHJABTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/MGPTHJCPTask.java

@ -49,6 +49,7 @@ public class MGPTHJCPTask extends AbstractTask {
task.setPoint_code2(json.getString("PlacedLocation"));
task.setRequest_param(json.toString());
task.setPriority(json.getString("Priority"));
task.setIs_vehicle(json.getString("IsPanCode"));
task.setCreate_id(SecurityUtils.getCurrentUserId());
task.setCreate_name(SecurityUtils.getCurrentNickName());
task.setCreate_time(DateUtil.now());
@ -67,6 +68,7 @@ public class MGPTHJCPTask extends AbstractTask {
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
acsTaskDto.setPriority(taskDao.getPriority());
acsTaskDto.setIs_vehicle(taskDao.getIs_vehicle());
acsTaskDto.setTask_type("1");
return acsTaskDto;

Loading…
Cancel
Save