rev 更新日志
This commit is contained in:
@@ -8,6 +8,7 @@ import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
|
||||
@@ -117,28 +117,6 @@ public class DeviceController {
|
||||
public ResponseEntity<Object> selectList(@PathVariable String region) {
|
||||
return new ResponseEntity<>(deviceService.selectDeviceListByRegion(region), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/selectListOne")
|
||||
@Log("查询区域一设备")
|
||||
@ApiOperation("查询区域一设备")
|
||||
public ResponseEntity<Object> selectListOne() {
|
||||
return new ResponseEntity<>(deviceService.selectDeviceListOne(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/selectListTwo")
|
||||
@Log("查询区域二设备")
|
||||
@ApiOperation("查询区域二设备")
|
||||
public ResponseEntity<Object> selectListTwo() {
|
||||
return new ResponseEntity<>(deviceService.selectDeviceListTwo(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/selectListThree")
|
||||
@Log("查询区域三设备")
|
||||
@ApiOperation("查询区域三设备")
|
||||
public ResponseEntity<Object> selectListThree() {
|
||||
return new ResponseEntity<>(deviceService.selectDeviceListThree(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/type/{type}")
|
||||
@Log("根据设备类型查询已配置设备")
|
||||
@ApiOperation("根据类型查询设备")
|
||||
@@ -153,22 +131,6 @@ public class DeviceController {
|
||||
return new ResponseEntity<>(deviceService.selectDeviceDevicerInfo(status), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/callAgv")
|
||||
@Log("呼叫请求")
|
||||
@ApiOperation("呼叫请求")
|
||||
public ResponseEntity<Object> callAgv(@RequestBody JSONObject json) {
|
||||
deviceService.callAgv(json);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/addMaterial")
|
||||
@Log("添加物料信息")
|
||||
@ApiOperation("添加物料信息")
|
||||
public ResponseEntity<Object> addMaterial(@RequestBody JSONObject json) {
|
||||
deviceService.addMaterial(json);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/changeDeviceStatus")
|
||||
@Log("改变设备状态")
|
||||
@ApiOperation("改变设备状态")
|
||||
@@ -177,22 +139,6 @@ public class DeviceController {
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/changeFenceStatus")
|
||||
@Log("改变电子围栏状态")
|
||||
@ApiOperation("改变电子围栏状态")
|
||||
public ResponseEntity<Object> changeFenceStatus(@RequestBody JSONObject json) {
|
||||
deviceService.changeFenceStatus(json);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/responseAgv")
|
||||
@Log("响应请求")
|
||||
@ApiOperation("响应请求")
|
||||
public ResponseEntity<Object> responseAgv(@RequestBody JSONObject json) {
|
||||
deviceService.responseAgv(json);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/autoCreateTask")
|
||||
@Log("自动创建接任务")
|
||||
@ApiOperation("自动创建接任务")
|
||||
@@ -210,14 +156,6 @@ public class DeviceController {
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/cleanMaterial")
|
||||
@Log("清除设备物料信息")
|
||||
@ApiOperation("清除设备物料信息")
|
||||
public ResponseEntity<Object> cleanMaterial(@RequestBody JSONObject json) {
|
||||
deviceService.cleanMaterial(json);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@GetMapping("/selectDriverCodeList/{device_code}")
|
||||
@Log("下拉选设备驱动")
|
||||
@ApiOperation("下拉选设备驱动")
|
||||
|
||||
@@ -201,27 +201,6 @@ public interface DeviceService extends CommonService<Device> {
|
||||
*/
|
||||
JSONArray selectDeviceDevicerInfo(String status);
|
||||
|
||||
/**
|
||||
* 查询区域一设备
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
JSONArray selectDeviceListOne();
|
||||
|
||||
/**
|
||||
* 查询区域二设备
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
JSONArray selectDeviceListTwo();
|
||||
|
||||
/**
|
||||
* 查询区域三设备
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
JSONArray selectDeviceListThree();
|
||||
|
||||
/**
|
||||
* 更新驱动配置信息
|
||||
*
|
||||
@@ -236,34 +215,6 @@ public interface DeviceService extends CommonService<Device> {
|
||||
*/
|
||||
void changeDeviceStatus(JSONObject form);
|
||||
|
||||
/**
|
||||
* 改变电子围栏状态
|
||||
*
|
||||
* @param form
|
||||
*/
|
||||
void changeFenceStatus(JSONObject form);
|
||||
|
||||
/**
|
||||
* 呼叫请求
|
||||
*
|
||||
* @param form
|
||||
*/
|
||||
void callAgv(JSONObject form);
|
||||
|
||||
/**
|
||||
* 添加物料信息
|
||||
*
|
||||
* @param form
|
||||
*/
|
||||
void addMaterial(JSONObject form);
|
||||
|
||||
/**
|
||||
* 响应请求参数
|
||||
*
|
||||
* @param form
|
||||
*/
|
||||
void responseAgv(JSONObject form);
|
||||
|
||||
/**
|
||||
* 自动创建任务
|
||||
* @param json
|
||||
@@ -283,11 +234,6 @@ public interface DeviceService extends CommonService<Device> {
|
||||
*/
|
||||
void cleanTask(JSONObject json);
|
||||
|
||||
/**
|
||||
* 清理材料
|
||||
* @param json
|
||||
*/
|
||||
void cleanMaterial(JSONObject json);
|
||||
|
||||
/**
|
||||
* 根据设备标识查询设备驱动配置,如果未配置过,就从驱动配置定义找,否则从数据库里面找
|
||||
|
||||
@@ -565,179 +565,6 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray selectDeviceListOne() {
|
||||
//设备基础信息表【acs_device】
|
||||
List<Device> deviceList = new LambdaQueryChainWrapper<>(deviceMapper)
|
||||
.apply("is_delete= '0' AND is_active= '1' AND region = '1'")
|
||||
.orderByAsc(Device::getSeq_num)
|
||||
.list();
|
||||
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(deviceList));
|
||||
|
||||
//acs_device_extra
|
||||
JSONArray result = new JSONArray();
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject obj = arr.getJSONObject(i);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("device_id", obj.getString("device_id"));
|
||||
json.put("device_code", obj.getString("device_code"));
|
||||
json.put("checked", false);
|
||||
json.put("device_name", obj.getString("device_name"));
|
||||
Device device = deviceAppService.findDeviceByCode(obj.getString("device_code"));
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
json.put("quantity", standardOrdinarySiteDeviceDriver.getQty());
|
||||
json.put("material_type", standardOrdinarySiteDeviceDriver.getMaterial());
|
||||
json.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
|
||||
}
|
||||
List<DeviceExtra> deviceExtraList = new LambdaQueryChainWrapper<>(deviceExtraMapper)
|
||||
.eq(DeviceExtra::getDevice_id, obj.getString("device_id"))
|
||||
.list();
|
||||
JSONArray extraArr = JSONArray.parseArray(JSON.toJSONString(deviceExtraList));
|
||||
|
||||
for (int m = 0; m < extraArr.size(); m++) {
|
||||
JSONObject jsonObject = extraArr.getJSONObject(m);
|
||||
String extra_code = jsonObject.getString("extra_code");
|
||||
//定点作业:自动创建任务
|
||||
if ("auto_create_task".equals(extra_code)) {
|
||||
json.put("auto_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//呼叫
|
||||
if ("apply_task".equals(extra_code)) {
|
||||
json.put("apply_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//响应
|
||||
if ("manual_create_task".equals(extra_code)) {
|
||||
json.put("manual_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//清除
|
||||
if ("auto_clean_task".equals(extra_code)) {
|
||||
json.put("auto_clean_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
|
||||
}
|
||||
result.add(json);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray selectDeviceListTwo() {
|
||||
//设备基础信息表【acs_device】
|
||||
// JSONArray arr = WQLObject.getWQLObject("acs_device").query("is_delete= '0' AND is_active= '1' AND region = '2'", "seq_num").getResultJSONArray(0);
|
||||
List<Device> deviceList = new LambdaQueryChainWrapper<>(deviceMapper)
|
||||
.apply("is_delete= '0' AND is_active= '1' AND region = '2'")
|
||||
.orderByAsc(Device::getSeq_num)
|
||||
.list();
|
||||
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(deviceList));
|
||||
//acs_device_extra
|
||||
// WQLObject extraTab = WQLObject.getWQLObject("acs_device_extra");
|
||||
JSONArray result = new JSONArray();
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject obj = arr.getJSONObject(i);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("device_id", obj.getString("device_id"));
|
||||
json.put("checked", false);
|
||||
json.put("device_code", obj.getString("device_code"));
|
||||
json.put("device_name", obj.getString("device_name"));
|
||||
Device device = deviceAppService.findDeviceByCode(obj.getString("device_code"));
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
json.put("quantity", standardOrdinarySiteDeviceDriver.getQty());
|
||||
json.put("material_type", standardOrdinarySiteDeviceDriver.getMaterial());
|
||||
json.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
|
||||
}
|
||||
// JSONArray extraArr = extraTab.query("device_id = '" + obj.getString("device_id") + "'").getResultJSONArray(0);
|
||||
List<DeviceExtra> deviceExtraList = new LambdaQueryChainWrapper<>(deviceExtraMapper)
|
||||
.eq(DeviceExtra::getDevice_id, obj.getString("device_id"))
|
||||
.list();
|
||||
JSONArray extraArr = JSONArray.parseArray(JSON.toJSONString(deviceExtraList));
|
||||
for (int m = 0; m < extraArr.size(); m++) {
|
||||
JSONObject jsonObject = extraArr.getJSONObject(m);
|
||||
String extra_code = jsonObject.getString("extra_code");
|
||||
//定点作业:自动创建任务
|
||||
if ("auto_create_task".equals(extra_code)) {
|
||||
json.put("auto_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//呼叫
|
||||
if ("apply_task".equals(extra_code)) {
|
||||
json.put("apply_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//响应
|
||||
if ("manual_create_task".equals(extra_code)) {
|
||||
json.put("manual_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//清除
|
||||
if ("auto_clean_task".equals(extra_code)) {
|
||||
json.put("auto_clean_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
|
||||
}
|
||||
result.add(json);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray selectDeviceListThree() {
|
||||
//设备基础信息表【acs_device】
|
||||
// JSONArray arr = WQLObject.getWQLObject("acs_device").query("is_delete= '0' AND is_active= '1' AND region = '3'", "seq_num").getResultJSONArray(0);
|
||||
List<Device> deviceList = new LambdaQueryChainWrapper<>(deviceMapper)
|
||||
.apply("is_delete= '0' AND is_active= '1' AND region = '3'")
|
||||
.orderByAsc(Device::getSeq_num)
|
||||
.list();
|
||||
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(deviceList));
|
||||
//acs_device_extra
|
||||
// WQLObject extraTab = WQLObject.getWQLObject("acs_device_extra");
|
||||
JSONArray result = new JSONArray();
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject obj = arr.getJSONObject(i);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("device_id", obj.getString("device_id"));
|
||||
json.put("device_code", obj.getString("device_code"));
|
||||
json.put("checked", false);
|
||||
json.put("device_name", obj.getString("device_name"));
|
||||
Device device = deviceAppService.findDeviceByCode(obj.getString("device_code"));
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
json.put("quantity", standardOrdinarySiteDeviceDriver.getQty());
|
||||
json.put("material_type", standardOrdinarySiteDeviceDriver.getMaterial());
|
||||
json.put("remark", standardOrdinarySiteDeviceDriver.getRemark());
|
||||
}
|
||||
// JSONArray extraArr = extraTab.query("device_id = '" + obj.getString("device_id") + "'").getResultJSONArray(0);
|
||||
List<DeviceExtra> deviceExtraList = new LambdaQueryChainWrapper<>(deviceExtraMapper)
|
||||
.eq(DeviceExtra::getDevice_id, obj.getString("device_id"))
|
||||
.list();
|
||||
JSONArray extraArr = JSONArray.parseArray(JSON.toJSONString(deviceExtraList));
|
||||
for (int m = 0; m < extraArr.size(); m++) {
|
||||
JSONObject jsonObject = extraArr.getJSONObject(m);
|
||||
String extra_code = jsonObject.getString("extra_code");
|
||||
//定点作业:自动创建任务
|
||||
if ("auto_create_task".equals(extra_code)) {
|
||||
json.put("auto_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//呼叫
|
||||
if ("apply_task".equals(extra_code)) {
|
||||
json.put("apply_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//响应
|
||||
if ("manual_create_task".equals(extra_code)) {
|
||||
json.put("manual_create_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
//清除
|
||||
if ("auto_clean_task".equals(extra_code)) {
|
||||
json.put("auto_clean_task", jsonObject.getBoolean("extra_value"));
|
||||
}
|
||||
|
||||
}
|
||||
result.add(json);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray selectDeviceDevicerInfo(String status) {
|
||||
|
||||
@@ -1196,18 +1023,6 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeFenceStatus(JSONObject form) {
|
||||
String device_code = form.getString("device_code");
|
||||
String suspended = form.getString("suspended");
|
||||
if (StrUtil.isEmpty(suspended)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
|
||||
}
|
||||
|
||||
public String formatNum(int x) {
|
||||
if (x < 10) {
|
||||
return "0" + x;
|
||||
@@ -1215,89 +1030,6 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
return String.valueOf(x);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callAgv(JSONObject form) {
|
||||
String device_code = form.getString("device_code");
|
||||
//需要数量
|
||||
String quantity = form.getString("quantity");
|
||||
//物料类型
|
||||
String material_type = form.getString("material_type");
|
||||
String remark = form.getString("remark");
|
||||
if (StrUtil.isEmpty(quantity) || StrUtil.isEmpty(material_type)) {
|
||||
throw new BadRequestException(LangProcess.msg("error_checkNull", "quantity or material_type"));
|
||||
}
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardOrdinarySiteDeviceDriver.getBranchProtocol() == 2) {
|
||||
throw new BadRequestException(LangProcess.msg("device_checkStatus"));
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setBranchProtocol(2);
|
||||
standardOrdinarySiteDeviceDriver.setQty(quantity);
|
||||
standardOrdinarySiteDeviceDriver.setMaterial(material_type);
|
||||
standardOrdinarySiteDeviceDriver.setRemark(remark);
|
||||
}
|
||||
}
|
||||
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardInspectSiteDeviceDriver.setBranchProtocol(2);
|
||||
standardInspectSiteDeviceDriver.setQty(quantity);
|
||||
standardInspectSiteDeviceDriver.setMaterial(material_type);
|
||||
standardInspectSiteDeviceDriver.setRemark(remark);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMaterial(JSONObject form) {
|
||||
String device_code = form.getString("device_code");
|
||||
//需要数量
|
||||
String quantity = form.getString("quantity");
|
||||
//物料类型
|
||||
String material_type = form.getString("material_type");
|
||||
String remark = form.getString("remark");
|
||||
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
standardOrdinarySiteDeviceDriver.setQty(quantity);
|
||||
standardOrdinarySiteDeviceDriver.setMaterial(material_type);
|
||||
standardOrdinarySiteDeviceDriver.setRemark(remark);
|
||||
device.setMaterial_type(material_type);
|
||||
device.setQuantity(quantity);
|
||||
device.setRemark(remark);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void responseAgv(JSONObject form) {
|
||||
//起始设备
|
||||
String start_device_code = form.getString("start_device_code");
|
||||
//下一设备
|
||||
String next_device_code = form.getString("device_code");
|
||||
//需要数量
|
||||
String quantity = form.getString("qty");
|
||||
//物料类型
|
||||
String material_type = form.getString("material");
|
||||
//备注信息
|
||||
String remark = form.getString("remark");
|
||||
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) startDevice.getDeviceDriver();
|
||||
standardOrdinarySiteDeviceDriver.setBranchProtocol(3);
|
||||
standardOrdinarySiteDeviceDriver.setQty(quantity);
|
||||
standardOrdinarySiteDeviceDriver.setMaterial(material_type);
|
||||
standardOrdinarySiteDeviceDriver.setRemark(remark);
|
||||
standardOrdinarySiteDeviceDriver.setPurpose(next_device_code);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void autoCreateTask(JSONObject form) {
|
||||
//起始设备
|
||||
@@ -1340,30 +1072,6 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanMaterial(JSONObject json) {
|
||||
String device_code = json.getString("device_code");
|
||||
//需要数量
|
||||
String quantity = json.getString("quantity");
|
||||
//物料类型
|
||||
String material_type = json.getString("material_type");
|
||||
String remark = json.getString("remark");
|
||||
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
standardOrdinarySiteDeviceDriver.setHasGoods(0);
|
||||
standardOrdinarySiteDeviceDriver.setQty("");
|
||||
standardOrdinarySiteDeviceDriver.setMaterial("");
|
||||
standardOrdinarySiteDeviceDriver.setRemark("");
|
||||
JSONObject jsonjo = new JSONObject();
|
||||
jsonjo.put("device_code", device_code);
|
||||
jsonjo.put("hasGoodStatus", "0");
|
||||
changeDeviceStatus(jsonjo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryDriverConfigByDeviceId(String device_id, String driver_code) {
|
||||
final JSONObject extraObj = new JSONObject();
|
||||
|
||||
@@ -242,11 +242,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
// 更新指令状态
|
||||
updateInstruct();
|
||||
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
feedMessage = var17.getMessage();
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol));
|
||||
|
||||
} catch (Exception e) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
|
||||
if (mode == 0) {
|
||||
|
||||
@@ -33,8 +33,6 @@ public class DeviceExecuteLogServiceImpl implements DeviceExecuteLogService {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
MDC.remove("device_code_log");
|
||||
System.out.println("successNum:" + OpcUtl.successNum);
|
||||
System.out.println("errNum:" + OpcUtl.errNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user