rev 清理无用代码

This commit is contained in:
2023-12-15 14:17:28 +08:00
parent b597bdebd0
commit 646722751b
24 changed files with 97 additions and 115 deletions

View File

@@ -161,6 +161,7 @@ public interface AgvService {
public JSONObject createOrederData(Instruction inst, String type); public JSONObject createOrederData(Instruction inst, String type);
public JSONArray createBlocksData(Instruction inst); public JSONArray createBlocksData(Instruction inst);
/** /**
* magic 全部暂停车辆 * magic 全部暂停车辆
*/ */

View File

@@ -659,7 +659,6 @@ public class AgvServiceImpl implements AgvService {
} }
@Override @Override
public HttpResponse queryXZAgvInstStatus(String instCode) { public HttpResponse queryXZAgvInstStatus(String instCode) {

View File

@@ -50,7 +50,6 @@ public class DeviceDbitemServiceImpl implements DeviceDbitemService {
} }
@Override @Override
@Transactional
public DeviceDbitemDto findById(String item_id) { public DeviceDbitemDto findById(String item_id) {
WQLObject wo = WQLObject.getWQLObject("acs_device_dbitem"); WQLObject wo = WQLObject.getWQLObject("acs_device_dbitem");
JSONObject json = wo.query("item_id ='" + item_id + "'").uniqueResult(0); JSONObject json = wo.query("item_id ='" + item_id + "'").uniqueResult(0);
@@ -61,12 +60,9 @@ public class DeviceDbitemServiceImpl implements DeviceDbitemService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void create(DeviceDbitemDto dto) { public void create(DeviceDbitemDto dto) {
//String currentUsername = SecurityUtils.getCurrentUsername();
String now = DateUtil.now(); String now = DateUtil.now();
dto.setDevice_id(IdUtil.simpleUUID()); dto.setDevice_id(IdUtil.simpleUUID());
//dto.setCreate_by(currentUsername);
//dto.setUpdate_by(currentUsername);
dto.setUpdate_time(now); dto.setUpdate_time(now);
dto.setCreate_time(now); dto.setCreate_time(now);

View File

@@ -856,6 +856,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
String remark = form.optString("remark"); String remark = form.optString("remark");
String vehicle_code = form.optString("vehicle_code"); String vehicle_code = form.optString("vehicle_code");
String islock = form.optString("islock"); String islock = form.optString("islock");
String source_device = form.optString("source_device");
if (device_code.indexOf(".") != -1) { if (device_code.indexOf(".") != -1) {
device_code = device_code.substring(0, device_code.indexOf(".")); device_code = device_code.substring(0, device_code.indexOf("."));
} }
@@ -887,6 +888,10 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
standardOrdinarySiteDeviceDriver.setHasGoods(Integer.parseInt(hasGoodStatus)); standardOrdinarySiteDeviceDriver.setHasGoods(Integer.parseInt(hasGoodStatus));
device.setHas_goods(Integer.parseInt(hasGoodStatus)); device.setHas_goods(Integer.parseInt(hasGoodStatus));
} }
//指令完成式判断是否需要记录物料来源
if (!StrUtil.isEmpty(source_device) && StrUtil.equals("true", String.valueOf(device.getExtraValue().get("source_device")))) {
standardOrdinarySiteDeviceDriver.setSource_device(source_device);
}
if (StrUtil.isNotEmpty(material_type)) { if (StrUtil.isNotEmpty(material_type)) {
standardOrdinarySiteDeviceDriver.setMaterial(material_type); standardOrdinarySiteDeviceDriver.setMaterial(material_type);
device.setMaterial_type(material_type); device.setMaterial_type(material_type);
@@ -919,6 +924,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
standardOrdinarySiteDeviceDriver.setIslock(Boolean.valueOf(islock)); standardOrdinarySiteDeviceDriver.setIslock(Boolean.valueOf(islock));
device.setIslock(islock); device.setIslock(islock);
} }
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint"); WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0); JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0);
if (!ObjectUtil.isEmpty(json)) { if (!ObjectUtil.isEmpty(json)) {
@@ -1008,8 +1014,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
JSONObject updatejson = JSONObject.fromObject(obj); JSONObject updatejson = JSONObject.fromObject(obj);
runpointwo.update(updatejson, "device_code = '" + device_code + "'"); runpointwo.update(updatejson, "device_code = '" + device_code + "'");
} }
} } else if (device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
else if (device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) device.getDeviceDriver(); standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) device.getDeviceDriver();
standardEmptyPalletSiteDeviceDriver.setContainer(vehicle_code); standardEmptyPalletSiteDeviceDriver.setContainer(vehicle_code);
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { } else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {

View File

@@ -3,22 +3,16 @@ package org.nl.acs.device_driver.electric_fence;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.nl.acs.agv.server.AgvService; import org.nl.acs.agv.server.AgvService;
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_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.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.task.service.TaskService;
import org.nl.utils.SpringContextHolder; import org.nl.utils.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.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@@ -7,32 +7,28 @@ import cn.hutool.core.util.StrUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.ObjectUtils;
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.RouteableDeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver;
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.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.instruction.service.dto.Instruction;
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.opc.DeviceAppServiceImpl; import org.nl.acs.opc.DeviceAppServiceImpl;
import org.nl.acs.opc.WcsConfig;
import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.route.service.dto.RouteLineDto;
import org.nl.acs.task.service.TaskService; 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.system.util.CodeUtil;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wql.core.bean.WQLObject;
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.*; import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* RGV驱动 * RGV驱动

View File

@@ -54,8 +54,6 @@ public class ItemProtocol {
public static String item_to_erroe = "to_temperature2"; public static String item_to_erroe = "to_temperature2";
private SparyTowerDeviceDriver driver; private SparyTowerDeviceDriver driver;
public ItemProtocol(SparyTowerDeviceDriver driver) { public ItemProtocol(SparyTowerDeviceDriver driver) {

View File

@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.annotation.Log; import org.nl.annotation.Log;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@@ -2,7 +2,6 @@ package org.nl.acs.ext.wms.service;
import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpResponse;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import java.util.Map; import java.util.Map;

View File

@@ -40,13 +40,11 @@ import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.route.service.dto.RouteLineDto; import org.nl.acs.route.service.dto.RouteLineDto;
import org.nl.acs.task.service.TaskService; 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.exception.WDKException;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wql.core.bean.WQLObject; import org.nl.wql.core.bean.WQLObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@@ -23,7 +23,6 @@ import org.nl.start.auto.initial.ApplicationAutoInitial;
import org.nl.utils.FileUtil; import org.nl.utils.FileUtil;
import org.nl.utils.SecurityUtils; import org.nl.utils.SecurityUtils;
import org.nl.wql.WQL; import org.nl.wql.WQL;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject; import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil; import org.nl.wql.util.WqlUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -29,10 +29,10 @@ import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipu
import org.nl.acs.device_driver.standard_manipulator_stacking_site.StandardManipulatorStackingSiteDeviceDriver; import org.nl.acs.device_driver.standard_manipulator_stacking_site.StandardManipulatorStackingSiteDeviceDriver;
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.standard_photoelectric_inspect_site.StandardPhotoelectricInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_photoelectric_inspect_site.StandardPhotoelectricInspectSiteDeviceDriver;
import org.nl.acs.device_driver.standard_rgv.StandardRGVDeviceDriver;
import org.nl.acs.device_driver.standard_scanner.StandardScannerDeviceDriver; import org.nl.acs.device_driver.standard_scanner.StandardScannerDeviceDriver;
import org.nl.acs.device_driver.weighing_site.WeighingSiteDeviceDriver; import org.nl.acs.device_driver.weighing_site.WeighingSiteDeviceDriver;
import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver; import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver;
import org.nl.acs.device_driver.standard_rgv.StandardRGVDeviceDriver;
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.opc.DeviceAppServiceImpl; import org.nl.acs.opc.DeviceAppServiceImpl;
@@ -964,8 +964,7 @@ public class StageActorServiceImpl implements StageActorService {
jo.put("isError", ykbkSpecialDeviceDriver.getIserror()); jo.put("isError", ykbkSpecialDeviceDriver.getIserror());
jo.put("container", ykbkSpecialDeviceDriver.getContainer()); jo.put("container", ykbkSpecialDeviceDriver.getContainer());
jo.put("message", ykbkSpecialDeviceDriver.getMessage()); jo.put("message", ykbkSpecialDeviceDriver.getMessage());
} } else if (device.getDeviceDriver() instanceof StandardPhotoelectricInspectSiteDeviceDriver) {
else if (device.getDeviceDriver() instanceof StandardPhotoelectricInspectSiteDeviceDriver) {
standardPhotoelectricInspectSiteDeviceDriver = (StandardPhotoelectricInspectSiteDeviceDriver) device.getDeviceDriver(); standardPhotoelectricInspectSiteDeviceDriver = (StandardPhotoelectricInspectSiteDeviceDriver) device.getDeviceDriver();
if (standardPhotoelectricInspectSiteDeviceDriver.getMode() == 0) { if (standardPhotoelectricInspectSiteDeviceDriver.getMode() == 0) {
mode = "未联机"; mode = "未联机";
@@ -992,8 +991,7 @@ public class StageActorServiceImpl implements StageActorService {
jo.put("isError", standardPhotoelectricInspectSiteDeviceDriver.getIserror()); jo.put("isError", standardPhotoelectricInspectSiteDeviceDriver.getIserror());
jo.put("container", standardPhotoelectricInspectSiteDeviceDriver.getContainer()); jo.put("container", standardPhotoelectricInspectSiteDeviceDriver.getContainer());
jo.put("message", standardPhotoelectricInspectSiteDeviceDriver.getMessage()); jo.put("message", standardPhotoelectricInspectSiteDeviceDriver.getMessage());
} } else if (device.getDeviceDriver() instanceof ElectricFenceDeviceDriver) {
else if (device.getDeviceDriver() instanceof ElectricFenceDeviceDriver) {
electricFenceDeviceDriver = (ElectricFenceDeviceDriver) device.getDeviceDriver(); electricFenceDeviceDriver = (ElectricFenceDeviceDriver) device.getDeviceDriver();
obj.put("device_name", electricFenceDeviceDriver.getDevice().getDevice_name()); obj.put("device_name", electricFenceDeviceDriver.getDevice().getDevice_name());
jo.put("isOnline", true); jo.put("isOnline", true);