Browse Source

更新

master
gengby 2 years ago
parent
commit
290acd9c90
  1. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java
  2. 50
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 8
      acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue

10
acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java

@ -43,9 +43,17 @@ public class StorageCellServiceImpl implements StorageCellService {
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String storage_code = MapUtil.getStr(whereJson, "storage_code"); String storage_code = MapUtil.getStr(whereJson, "storage_code");
String parent_storage_code = MapUtil.getStr(whereJson, "parent_storage_code");
String address = MapUtil.getStr(whereJson, "address");
String where = ""; String where = "";
if (StrUtil.isNotEmpty(storage_code)) { if (StrUtil.isNotEmpty(storage_code)) {
where = " and storage_code like '%" + storage_code + "%'"; where += " and storage_code like '%" + storage_code + "%'";
}
if (StrUtil.isNotEmpty(parent_storage_code)) {
where += " and parent_storage_code like '%" + parent_storage_code + "%'";
}
if (StrUtil.isNotEmpty(address)) {
where += " and address like '%" + address + "%'";
} }
WQLObject wo = WQLObject.getWQLObject("acs_storage_cell"); WQLObject wo = WQLObject.getWQLObject("acs_storage_cell");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1 = 1 " + where, "update_time desc"); ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1 = 1 " + where, "update_time desc");

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

@ -169,19 +169,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return; return;
} }
// if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); Object reqWms = device.getExtraValue().get("reqWms");
// standardOrdinarySiteDeviceDriver.setAgvphase(phase); if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){
// standardOrdinarySiteDeviceDriver.setIndex(index);
// standardOrdinarySiteDeviceDriver.setInst(inst);
// }
if (StrUtil.equals(inst.getStart_device_code(), device_code)) {
String instruction_type = inst.getInstruction_type();
if (StrUtil.equals(instruction_type, "3")
|| StrUtil.equals(instruction_type, "5")
|| StrUtil.equals(instruction_type, "9")
|| StrUtil.equals(instruction_type, "11")
|| StrUtil.equals(instruction_type, "13")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -201,9 +191,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs不需要请求wms取货申请,已反馈agv允许取货", inst.getInstruction_code());
} }
} }
//取货完毕 //取货完毕
@ -243,19 +230,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return; return;
} }
if (StrUtil.equals(inst.getStart_device_code(), device_code)) { if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){
Object reqWms = device.getExtraValue().get("reqWms");
String instruction_type = inst.getInstruction_type(); if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){
if (StrUtil.equals(instruction_type, "2")
|| StrUtil.equals(instruction_type, "3")
|| StrUtil.equals(instruction_type, "4")
|| StrUtil.equals(instruction_type, "5")
|| StrUtil.equals(instruction_type, "6")
|| StrUtil.equals(instruction_type, "8")
|| StrUtil.equals(instruction_type, "9")
|| StrUtil.equals(instruction_type, "10")
|| StrUtil.equals(instruction_type, "11")
|| StrUtil.equals(instruction_type, "13")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -275,9 +252,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code()); log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs不需要反馈wms取货完成,已反馈agv取货完成", inst.getInstruction_code());
} }
} }
//到达放货点 //到达放货点
@ -313,11 +287,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
log.info("未找到关联编号{}对应的指令", ikey); log.info("未找到关联编号{}对应的指令", ikey);
return; return;
} }
if (StrUtil.equals(inst.getNext_device_code(), device_code)) { if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver){
String instruction_type = inst.getInstruction_type(); Object reqWms = device.getExtraValue().get("reqWms");
if (StrUtil.equals(instruction_type, "2") if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")){
|| StrUtil.equals(instruction_type, "4")
|| StrUtil.equals(instruction_type, "8")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -337,12 +309,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code());
} }
} else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs不需要请求wms放货申请,已反馈agv允许放货", inst.getInstruction_code());
} }
} }
//放货完毕 //放货完毕
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x09) { } else if (phase == 0x09) {

8
acs/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue

@ -78,6 +78,11 @@
<el-switch v-model="form.wait" /> <el-switch v-model="form.wait" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="是否请求wms" label-width="150px">
<el-switch v-model="form.reqWms" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -173,7 +178,8 @@ export default {
is_release: true, is_release: true,
station_manager: true, station_manager: true,
auto_clean_task: true, auto_clean_task: true,
input_material: true input_material: true,
reqWms: true
}, },
rules: {} rules: {}
} }

Loading…
Cancel
Save