fix
This commit is contained in:
@@ -45,7 +45,7 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Data
|
@Data
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver , DeviceStageMonitor {
|
public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||||
@Autowired
|
@Autowired
|
||||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||||
@@ -133,7 +133,6 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
String message = null;
|
|
||||||
try {
|
try {
|
||||||
devicecode = this.getDeviceCode();
|
devicecode = this.getDeviceCode();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
@@ -326,7 +325,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
dto.setCreate_time(now);
|
dto.setCreate_time(now);
|
||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
||||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||||
|
|
||||||
wo.insert(json);
|
wo.insert(json);
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
|
|||||||
@@ -152,10 +152,15 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!this.requireSucess) {
|
if (!this.requireSucess) {
|
||||||
JSONObject param = new JSONObject();
|
int max_emptypalletnum = Integer.parseInt(this.getDevice().getExtraValue().get("max_emptypalletnum").toString());
|
||||||
param.put("device_code", this.device_code);
|
if (number == 0 || number == max_emptypalletnum) {
|
||||||
param.put("is_have", this.number == 0 ? 0 : 1);
|
JSONObject param = new JSONObject();
|
||||||
this.shipDeviceUpdate(param);
|
param.put("device_code", this.device_code);
|
||||||
|
param.put("is_have", this.number == 0 ? 0 : 1);
|
||||||
|
this.shipDeviceUpdate(param);
|
||||||
|
} else {
|
||||||
|
this.requireSucess = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user