Browse Source

正极板对接位堆叠3层逻辑调整

master
psh 10 months ago
parent
commit
c728ceb800
  1. 20
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/cw_site/CwSiteDeviceDriver.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  3. 14
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java

20
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/cw_site/CwSiteDeviceDriver.java

@ -105,6 +105,8 @@ public class CwSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devic
private int instruction_require_time_out; private int instruction_require_time_out;
boolean requireSucess = false; boolean requireSucess = false;
boolean resultSucess = false;
private int instruction_finished_time_out; private int instruction_finished_time_out;
int branchProtocol = 0; int branchProtocol = 0;
@ -155,21 +157,25 @@ public class CwSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devic
this.writing(0); this.writing(0);
} }
} }
if (move != last_move && this.getDeviceCode().startsWith("ZJBDJW")) { if (move !=last_move||tier!=last_tier){
//点位数量变更后通知lms resultSucess=false;
}
if (tier != last_tier&&move!=0 && this.getDeviceCode().endsWith("0101")||this.getDeviceCode().endsWith("0201") &&!resultSucess) {
//高度数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest(); FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(move)); request.setState(String.valueOf(tier));
request.setDevice_code(this.getDeviceCode()); request.setDevice_code(this.getDeviceCode());
request.setType("2"); request.setType("2");
acsToWmsService.notify(request); acsToWmsService.notify(request);
} resultSucess=true;
if (tier != last_tier&&move!=0 && this.getDeviceCode().startsWith("ZJBDJW")) { }else if (move ==1 && this.getDeviceCode().startsWith("ZJBDJW") &&!resultSucess) {
//高度数量变更后通知lms //点位数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest(); FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(tier)); request.setState("3");
request.setDevice_code(this.getDeviceCode()); request.setDevice_code(this.getDeviceCode());
request.setType("2"); request.setType("2");
acsToWmsService.notify(request); acsToWmsService.notify(request);
resultSucess=true;
} }
if (error != last_error) { if (error != last_error) {
} }

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java

@ -176,9 +176,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
break; break;
case 2: case 2:
//正极板对接位反馈设备有无货 //正极板对接位反馈设备有无货
if("ZJBDJW0101".equals(device_code)||"ZJBDJW0201".equals(device_code)){
device_code=device_code.substring(0,device_code.length()-2); device_code=device_code.substring(0,device_code.length()-2);
}
pointMapper.updatePointVehicleQty(device_code,state); pointMapper.updatePointVehicleQty(device_code,state);
break; break;
default: default:

14
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java

@ -194,7 +194,9 @@ public class BPSLTask extends AbstractTask {
} }
startPointObj.setVehicle_code(vehicle_code.toString()); startPointObj.setVehicle_code(vehicle_code.toString());
} }
if (!startPointObj.getPoint_code().startsWith("ZJBDJW")) {
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1); startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1);
}
startPointObj.setIng_task_code(""); startPointObj.setIng_task_code("");
startPointObj.setUpdate_time(DateUtil.now()); startPointObj.setUpdate_time(DateUtil.now());
pointService.updateById(startPointObj); pointService.updateById(startPointObj);
@ -214,7 +216,9 @@ public class BPSLTask extends AbstractTask {
// 起点解锁 // 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) { if (ObjectUtil.isNotEmpty(startPointObj)) {
startPointObj.setIng_task_code(""); startPointObj.setIng_task_code("");
// startPointObj.setVehicle_qty(startPointObj.getVehicle_qty()+1); if (startPointObj.getPoint_code().startsWith("ZJBDJW")) {
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1);
}
pointService.update(endPointObj); pointService.update(endPointObj);
} }
taskObj.setRemark("任务取消"); taskObj.setRemark("任务取消");
@ -235,7 +239,7 @@ public class BPSLTask extends AbstractTask {
@Override @Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
//todo 重算最优点 //重算最优点
JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data()); JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data());
SchBasePoint point = this.findNextPoint(jsonObject,schBaseTask); SchBasePoint point = this.findNextPoint(jsonObject,schBaseTask);
//正极板现在不堆叠 //正极板现在不堆叠
@ -246,8 +250,10 @@ public class BPSLTask extends AbstractTask {
} }
//重算点位时把点位占用 //重算点位时把点位占用
point.setIng_task_code(schBaseTask.getTask_code()); point.setIng_task_code(schBaseTask.getTask_code());
// point.setVehicle_qty(point.getVehicle_qty() - 1); //如果是正极板对接位则直接减库存
// point.setVehicle_type(materialType); if ((point.getPoint_code().startsWith("ZJBDJW"))) {
point.setVehicle_qty(point.getVehicle_qty() - 1);
}
pointService.update(point); pointService.update(point);
} }
} }

Loading…
Cancel
Save