Browse Source

更新

master
gengby 2 years ago
parent
commit
2ddc6df153
  1. 4
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java
  2. 28
      nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java

4
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_flat/ItemProtocol.java

@ -538,7 +538,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_strapping_seat8, "捆扎段占位8", "I29.4"));
list.add(new ItemDto(item_strapping_seat9, "捆扎段占位9", "I29.5"));
list.add(new ItemDto(item_strapping_seat10, "捆扎段占位10", "I29.6"));
list.add(new ItemDto(item_strapping_seat10, "捆扎段占位11", "I35.5"));
list.add(new ItemDto(item_strapping_seat11, "捆扎段占位11", "I35.5"));
list.add(new ItemDto(item_strapping_seat12, "捆扎段占位12", "I36.7"));
list.add(new ItemDto(item_a_error1_clear, "A侧摇杆出料异常复位", "DB214.X10.7"));
list.add(new ItemDto(item_b_error1_clear, "B侧摇杆出料异常复位", "DB234.X10.7"));
@ -617,7 +617,7 @@ public class ItemProtocol {
//list.add(new ItemDto(item_strapping_seat8, "捆扎段占位8", "I29.4"));
//list.add(new ItemDto(item_strapping_seat9, "捆扎段占位9", "I29.5"));
//list.add(new ItemDto(item_strapping_seat10, "捆扎段占位10", "I29.6"));
//list.add(new ItemDto(item_strapping_seat10, "捆扎段占位11", "I35.5"));
//list.add(new ItemDto(item_strapping_seat11, "捆扎段占位11", "I35.5"));
//list.add(new ItemDto(item_strapping_seat12, "捆扎段占位12", "I36.7"));
list.add(new ItemDto(item_a_error1_clear, "A侧摇杆出料异常复位", "DB214.X10.7"));
list.add(new ItemDto(item_b_error1_clear, "B侧摇杆出料异常复位", "DB234.X10.7"));

28
nladmin-system/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java

@ -411,10 +411,11 @@ public class HandServiceImpl implements HandService {
String name = param.get("name");
String type = param.get("type");
String value = param.get("value");
Device device = deviceAppService.findDeviceByCode("PB01");
HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
HailiangFlatDeviceDriver hailiangFlatDeviceDriver = deviceAppService.findDeviceDriver(HailiangFlatDeviceDriver.class).get(0);
//Device device = deviceAppService.findDeviceByCode("PB01");
//HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
//if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
// hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
if (type.equals("1")){
hailiangFlatDeviceDriver.writing(name,value);
}else if (type.equals("2")){
@ -428,7 +429,7 @@ public class HandServiceImpl implements HandService {
} else {
hailiangFlatDeviceDriver.writing(name,value);
}
}
// }
// 返回
resultJSON.put("code", "1");
resultJSON.put("desc", "下发成功");
@ -437,11 +438,12 @@ public class HandServiceImpl implements HandService {
@Override
public JSONObject queryDeviceInfo() {
Device device = deviceAppService.findDeviceByCode("PB01");
HailiangFlatDeviceDriver hailiangFlatDeviceDriver = deviceAppService.findDeviceDriver(HailiangFlatDeviceDriver.class).get(0);
//Device device = deviceAppService.findDeviceByCode("PB01");
JSONObject resp = new JSONObject();
HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
//HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
//if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
// hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
int is_auto = hailiangFlatDeviceDriver.getIs_auto();
int is_running = hailiangFlatDeviceDriver.getIs_running();
int mode = hailiangFlatDeviceDriver.getMode();
@ -595,9 +597,9 @@ public class HandServiceImpl implements HandService {
result.put("error_clear",error_clear);
resp.put("result",result);
return resp;
}
resp.put("code","0");
resp.put("desc","查询失败");
return resp;
// }
// resp.put("code","0");
// resp.put("desc","查询失败");
// return resp;
}
}

Loading…
Cancel
Save