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_seat8, "捆扎段占位8", "I29.4"));
list.add(new ItemDto(item_strapping_seat9, "捆扎段占位9", "I29.5")); 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, "捆扎段占位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_strapping_seat12, "捆扎段占位12", "I36.7"));
list.add(new ItemDto(item_a_error1_clear, "A侧摇杆出料异常复位", "DB214.X10.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")); 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_seat8, "捆扎段占位8", "I29.4"));
//list.add(new ItemDto(item_strapping_seat9, "捆扎段占位9", "I29.5")); //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, "捆扎段占位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_strapping_seat12, "捆扎段占位12", "I36.7"));
list.add(new ItemDto(item_a_error1_clear, "A侧摇杆出料异常复位", "DB214.X10.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")); 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 name = param.get("name");
String type = param.get("type"); String type = param.get("type");
String value = param.get("value"); String value = param.get("value");
Device device = deviceAppService.findDeviceByCode("PB01"); HailiangFlatDeviceDriver hailiangFlatDeviceDriver = deviceAppService.findDeviceDriver(HailiangFlatDeviceDriver.class).get(0);
HailiangFlatDeviceDriver hailiangFlatDeviceDriver; //Device device = deviceAppService.findDeviceByCode("PB01");
if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){ //HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver(); //if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
// hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
if (type.equals("1")){ if (type.equals("1")){
hailiangFlatDeviceDriver.writing(name,value); hailiangFlatDeviceDriver.writing(name,value);
}else if (type.equals("2")){ }else if (type.equals("2")){
@ -428,7 +429,7 @@ public class HandServiceImpl implements HandService {
} else { } else {
hailiangFlatDeviceDriver.writing(name,value); hailiangFlatDeviceDriver.writing(name,value);
} }
} // }
// 返回 // 返回
resultJSON.put("code", "1"); resultJSON.put("code", "1");
resultJSON.put("desc", "下发成功"); resultJSON.put("desc", "下发成功");
@ -437,11 +438,12 @@ public class HandServiceImpl implements HandService {
@Override @Override
public JSONObject queryDeviceInfo() { 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(); JSONObject resp = new JSONObject();
HailiangFlatDeviceDriver hailiangFlatDeviceDriver; //HailiangFlatDeviceDriver hailiangFlatDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){ //if (device.getDeviceDriver() instanceof HailiangFlatDeviceDriver){
hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver(); // hailiangFlatDeviceDriver = (HailiangFlatDeviceDriver) device.getDeviceDriver();
int is_auto = hailiangFlatDeviceDriver.getIs_auto(); int is_auto = hailiangFlatDeviceDriver.getIs_auto();
int is_running = hailiangFlatDeviceDriver.getIs_running(); int is_running = hailiangFlatDeviceDriver.getIs_running();
int mode = hailiangFlatDeviceDriver.getMode(); int mode = hailiangFlatDeviceDriver.getMode();
@ -595,9 +597,9 @@ public class HandServiceImpl implements HandService {
result.put("error_clear",error_clear); result.put("error_clear",error_clear);
resp.put("result",result); resp.put("result",result);
return resp; return resp;
} // }
resp.put("code","0"); // resp.put("code","0");
resp.put("desc","查询失败"); // resp.put("desc","查询失败");
return resp; // return resp;
} }
} }

Loading…
Cancel
Save