|
@ -970,30 +970,30 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu |
|
|
JSONObject json = JSONObject.fromObject(entity); |
|
|
JSONObject json = JSONObject.fromObject(entity); |
|
|
wo.update(json); |
|
|
wo.update(json); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class); |
|
|
// DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
|
|
|
|
|
|
|
|
// 如果是无光电的设备 指令完成变更起点、终点状态
|
|
|
// 如果是无光电的设备 指令完成变更起点、终点状态
|
|
|
JSONObject jo = new JSONObject(); |
|
|
// JSONObject jo = new JSONObject();
|
|
|
jo.put("device_code", entity.getStart_device_code()); |
|
|
// jo.put("device_code", entity.getStart_device_code());
|
|
|
if (StrUtil.equals(entity.getMaterial(), "1")) { |
|
|
// if (StrUtil.equals(entity.getMaterial(), "1")) {
|
|
|
jo.put("hasGoodStatus", "1"); |
|
|
// jo.put("hasGoodStatus", "1");
|
|
|
} else if (!StrUtil.equals(entity.getMaterial(), "1") && !StrUtil.isEmpty(entity.getMaterial())) { |
|
|
// } else if (!StrUtil.equals(entity.getMaterial(), "1") && !StrUtil.isEmpty(entity.getMaterial())) {
|
|
|
jo.put("hasGoodStatus", "2"); |
|
|
// jo.put("hasGoodStatus", "2");
|
|
|
} else { |
|
|
// } else {
|
|
|
jo.put("hasGoodStatus", "0"); |
|
|
// jo.put("hasGoodStatus", "0");
|
|
|
} |
|
|
// }
|
|
|
jo.put("material_type", entity.getMaterial()); |
|
|
// jo.put("material_type", entity.getMaterial());
|
|
|
jo.put("batch", entity.getBatch()); |
|
|
// jo.put("batch", entity.getBatch());
|
|
|
jo.put("islock", "false"); |
|
|
// jo.put("islock", "false");
|
|
|
deviceService.changeDeviceStatus(jo); |
|
|
// deviceService.changeDeviceStatus(jo);
|
|
|
|
|
|
//
|
|
|
JSONObject jo1 = new JSONObject(); |
|
|
// JSONObject jo1 = new JSONObject();
|
|
|
jo1.put("device_code", entity.getNext_device_code()); |
|
|
// jo1.put("device_code", entity.getNext_device_code());
|
|
|
jo.put("hasGoodStatus", "0"); |
|
|
// jo.put("hasGoodStatus", "0");
|
|
|
jo.put("material_type", ""); |
|
|
// jo.put("material_type", "");
|
|
|
jo.put("batch", ""); |
|
|
// jo.put("batch", "");
|
|
|
jo1.put("islock", "false"); |
|
|
// jo1.put("islock", "false");
|
|
|
deviceService.changeDeviceStatus(jo1); |
|
|
// deviceService.changeDeviceStatus(jo1);
|
|
|
|
|
|
|
|
|
String instnextdevice = entity.getNext_device_code(); |
|
|
String instnextdevice = entity.getNext_device_code(); |
|
|
Device device = appService.findDeviceByCode(instnextdevice); |
|
|
Device device = appService.findDeviceByCode(instnextdevice); |
|
|