Browse Source

rev 方向

master
汪菘 1 year ago
parent
commit
784b72c040
  1. BIN
      acs/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls
  2. 36
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 6
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java
  4. 1
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

BIN
acs/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls

Binary file not shown.

36
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -214,7 +214,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-机械手对接位 //标准版-机械手对接位
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) { if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver(); lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
lnshPalletizingManipulatorSiteDeviceDriver.writing(2); lnshPalletizingManipulatorSiteDeviceDriver.writing(3);
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0 if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0
&& lnshPalletizingManipulatorSiteDeviceDriver.getMove() != 0 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() != 0
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 1) && (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 1)
@ -247,7 +247,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-工位(交互模板) //标准版-工位(交互模板)
if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){ if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){
lnshStationDeviceDriver=(LnshStationDeviceDriver) device.getDeviceDriver(); lnshStationDeviceDriver=(LnshStationDeviceDriver) device.getDeviceDriver();
lnshStationDeviceDriver.writing(2); lnshStationDeviceDriver.writing(3);
if(lnshStationDeviceDriver.getMode()!=0 if(lnshStationDeviceDriver.getMode()!=0
&&lnshStationDeviceDriver.getMove() != 0 &&lnshStationDeviceDriver.getMove() != 0
&& (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 1) && (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 1)
@ -329,7 +329,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-下发条码输送线 //标准版-下发条码输送线
if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){ if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){
conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver(); conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
conveyorBarcodeDeviceDriver.writing(2); conveyorBarcodeDeviceDriver.writing(3);
if (conveyorBarcodeDeviceDriver.getMode() != 0 if (conveyorBarcodeDeviceDriver.getMode() != 0
&& conveyorBarcodeDeviceDriver.getMove() != 0 && conveyorBarcodeDeviceDriver.getMove() != 0
&& (conveyorBarcodeDeviceDriver.getIo_action() == 3 || conveyorBarcodeDeviceDriver.getIo_action() == 1) && (conveyorBarcodeDeviceDriver.getIo_action() == 3 || conveyorBarcodeDeviceDriver.getIo_action() == 1)
@ -362,7 +362,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-叠盘机 LnshFoldDiscSiteDeviceDriverl //标准版-叠盘机 LnshFoldDiscSiteDeviceDriverl
if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){ if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver(); lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
lnshFoldDiscSiteDeviceDriver.writing(2); lnshFoldDiscSiteDeviceDriver.writing(3);
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0 if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
&& lnshFoldDiscSiteDeviceDriver.getMove() != 0) { && lnshFoldDiscSiteDeviceDriver.getMove() != 0) {
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 1) // && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 1)
@ -452,7 +452,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-机械手对接位 //标准版-机械手对接位
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) { if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver(); lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
lnshPalletizingManipulatorSiteDeviceDriver.writing(2); lnshPalletizingManipulatorSiteDeviceDriver.writing(5);
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0 if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0
&& lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 2) && (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 2)
@ -482,7 +482,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-工位(交互模板) LnshStationDeviceDriver //标准版-工位(交互模板) LnshStationDeviceDriver
if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){ if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){
lnshStationDeviceDriver = (LnshStationDeviceDriver) device.getDeviceDriver(); lnshStationDeviceDriver = (LnshStationDeviceDriver) device.getDeviceDriver();
lnshStationDeviceDriver.writing(2); lnshStationDeviceDriver.writing(5);
if (lnshStationDeviceDriver.getMode() != 0 if (lnshStationDeviceDriver.getMode() != 0
&& lnshStationDeviceDriver.getMove() == 0 && lnshStationDeviceDriver.getMove() == 0
&& (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 2) && (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 2)
@ -558,7 +558,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-下发条码输送线 //标准版-下发条码输送线
if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){ if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){
conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver(); conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
conveyorBarcodeDeviceDriver.writing(2); conveyorBarcodeDeviceDriver.writing(5);
if (conveyorBarcodeDeviceDriver.getMode() != 0 if (conveyorBarcodeDeviceDriver.getMode() != 0
&& conveyorBarcodeDeviceDriver.getMove() != 0 && conveyorBarcodeDeviceDriver.getMove() != 0
&& (conveyorBarcodeDeviceDriver.getIo_action() == 3 || conveyorBarcodeDeviceDriver.getIo_action() == 2) && (conveyorBarcodeDeviceDriver.getIo_action() == 3 || conveyorBarcodeDeviceDriver.getIo_action() == 2)
@ -588,7 +588,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-叠盘机 //标准版-叠盘机
if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){ if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver(); lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
lnshFoldDiscSiteDeviceDriver.writing(2); lnshFoldDiscSiteDeviceDriver.writing(5);
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0 if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
&& lnshFoldDiscSiteDeviceDriver.getMove() != 0 && lnshFoldDiscSiteDeviceDriver.getMove() != 0
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 2) // && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 2)
@ -695,7 +695,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-机械手对接位 //标准版-机械手对接位
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) { if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver(); lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
lnshPalletizingManipulatorSiteDeviceDriver.writing(13); lnshPalletizingManipulatorSiteDeviceDriver.writing(4);
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0 if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0
&& lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 1 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3) && (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 1 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3)
@ -728,7 +728,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-工位(交互模板) //标准版-工位(交互模板)
if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){ if(device.getDeviceDriver() instanceof LnshStationDeviceDriver){
lnshStationDeviceDriver = (LnshStationDeviceDriver) device.getDeviceDriver(); lnshStationDeviceDriver = (LnshStationDeviceDriver) device.getDeviceDriver();
lnshStationDeviceDriver.writing(13); lnshStationDeviceDriver.writing(4);
if (lnshStationDeviceDriver.getMode() != 0 if (lnshStationDeviceDriver.getMode() != 0
&& lnshStationDeviceDriver.getMove() == 0 && lnshStationDeviceDriver.getMove() == 0
&& (lnshStationDeviceDriver.getIo_action() == 1 || lnshStationDeviceDriver.getIo_action() == 3) && (lnshStationDeviceDriver.getIo_action() == 1 || lnshStationDeviceDriver.getIo_action() == 3)
@ -761,7 +761,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-压制对接位 //标准版-压制对接位
if(device.getDeviceDriver() instanceof ConveyorPressStationDeviceDriver){ if(device.getDeviceDriver() instanceof ConveyorPressStationDeviceDriver){
conveyorPressStationDeviceDriver = (ConveyorPressStationDeviceDriver) device.getDeviceDriver(); conveyorPressStationDeviceDriver = (ConveyorPressStationDeviceDriver) device.getDeviceDriver();
conveyorPressStationDeviceDriver.writing(13); conveyorPressStationDeviceDriver.writing(4);
if (conveyorPressStationDeviceDriver.getMode() != 0 if (conveyorPressStationDeviceDriver.getMode() != 0
&& conveyorPressStationDeviceDriver.getMove() == 0 && conveyorPressStationDeviceDriver.getMove() == 0
&& (conveyorPressStationDeviceDriver.getIo_action() == 1 || conveyorPressStationDeviceDriver.getIo_action() == 3) && (conveyorPressStationDeviceDriver.getIo_action() == 1 || conveyorPressStationDeviceDriver.getIo_action() == 3)
@ -810,7 +810,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-下发条码输送线 //标准版-下发条码输送线
if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){ if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){
conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver(); conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver();
conveyorBarcodeDeviceDriver.writing(13); conveyorBarcodeDeviceDriver.writing(4);
if (conveyorBarcodeDeviceDriver.getMode() != 0 if (conveyorBarcodeDeviceDriver.getMode() != 0
&& conveyorBarcodeDeviceDriver.getMove() == 0 && conveyorBarcodeDeviceDriver.getMove() == 0
&& (conveyorBarcodeDeviceDriver.getIo_action() == 1 || conveyorBarcodeDeviceDriver.getIo_action() == 3) && (conveyorBarcodeDeviceDriver.getIo_action() == 1 || conveyorBarcodeDeviceDriver.getIo_action() == 3)
@ -843,7 +843,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//标准版-叠盘机 //标准版-叠盘机
if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){ if(device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver){
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver(); lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
lnshFoldDiscSiteDeviceDriver.writing(13); lnshFoldDiscSiteDeviceDriver.writing(4);
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0 if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
&& lnshFoldDiscSiteDeviceDriver.getMove() == 0 && lnshFoldDiscSiteDeviceDriver.getMove() == 0
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 1 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 3) // && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 1 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 3)
@ -940,7 +940,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 2 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3)) { && (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 2 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3)) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
lnshPalletizingManipulatorSiteDeviceDriver.writing(3); lnshPalletizingManipulatorSiteDeviceDriver.writing(5);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
lnshPalletizingManipulatorSiteDeviceDriver.setMessage(""); lnshPalletizingManipulatorSiteDeviceDriver.setMessage("");
flag = true; flag = true;
@ -969,7 +969,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
&& (lnshStationDeviceDriver.getIo_action() == 2 || lnshStationDeviceDriver.getIo_action() == 3)) { && (lnshStationDeviceDriver.getIo_action() == 2 || lnshStationDeviceDriver.getIo_action() == 3)) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
lnshStationDeviceDriver.writing(3); lnshStationDeviceDriver.writing(5);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
lnshStationDeviceDriver.setMessage(""); lnshStationDeviceDriver.setMessage("");
flag = true; flag = true;
@ -998,7 +998,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
&& (conveyorPressStationDeviceDriver.getIo_action() == 2 || conveyorPressStationDeviceDriver.getIo_action() == 3)) { && (conveyorPressStationDeviceDriver.getIo_action() == 2 || conveyorPressStationDeviceDriver.getIo_action() == 3)) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
conveyorPressStationDeviceDriver.writing(3); conveyorPressStationDeviceDriver.writing(5);
TaskDto task=taskService.findByCode(inst.getTask_code()); TaskDto task=taskService.findByCode(inst.getTask_code());
if(ObjectUtil.isNotEmpty(task)){ if(ObjectUtil.isNotEmpty(task)){
String direction=task.getDirection(); String direction=task.getDirection();
@ -1058,7 +1058,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
&& (conveyorBarcodeDeviceDriver.getIo_action() == 2 || conveyorBarcodeDeviceDriver.getIo_action() == 3)) { && (conveyorBarcodeDeviceDriver.getIo_action() == 2 || conveyorBarcodeDeviceDriver.getIo_action() == 3)) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
conveyorBarcodeDeviceDriver.writing(3); conveyorBarcodeDeviceDriver.writing(5);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
conveyorBarcodeDeviceDriver.setMessage(""); conveyorBarcodeDeviceDriver.setMessage("");
flag = true; flag = true;
@ -1088,7 +1088,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
) { ) {
inst.setExecute_status("6"); inst.setExecute_status("6");
instructionService.update(inst); instructionService.update(inst);
lnshFoldDiscSiteDeviceDriver.writing(3); lnshFoldDiscSiteDeviceDriver.writing(5);
data = AgvService.sendAgvOneModeInst(phase, index, 0); data = AgvService.sendAgvOneModeInst(phase, index, 0);
lnshFoldDiscSiteDeviceDriver.setMessage(""); lnshFoldDiscSiteDeviceDriver.setMessage("");
flag = true; flag = true;

6
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java

@ -708,10 +708,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))); lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) { if (resp.getCode() == 200) {
if(StrUtil.equals(resp.getIs_standing_finish(),"1")){
this.writing(200); this.writing(200);
this.writing("to_command",resp.getIs_standing_finish());
this.writing("to_mix_num",resp.getMix_num());
this.setRequireSucess(true); this.setRequireSucess(true);
}else {
this.writing(400);
}
} else { } else {
this.writing(400); this.writing(400);
message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求失败" + resp.getMessage();; message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求失败" + resp.getMessage();;

1
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -225,6 +225,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("remark", remark); jo.put("remark", remark);
jo.put("params", params); jo.put("params", params);
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type)); jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
jo.put("direction",direction);
// 如果是无光电的设备 指令完成变更起点、终点状态 // 如果是无光电的设备 指令完成变更起点、终点状态
JSONObject startjo = new JSONObject(); JSONObject startjo = new JSONObject();
startjo.put("device_code", start_device_code); startjo.put("device_code", start_device_code);

Loading…
Cancel
Save