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;
boolean requireSucess = false;
boolean resultSucess = false;
private int instruction_finished_time_out;
int branchProtocol = 0;
@ -155,21 +157,25 @@ public class CwSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devic
this.writing(0);
}
}
if (move != last_move && this.getDeviceCode().startsWith("ZJBDJW")) {
//点位数量变更后通知lms
if (move !=last_move||tier!=last_tier){
resultSucess=false;
}
if (tier != last_tier&&move!=0 && this.getDeviceCode().endsWith("0101")||this.getDeviceCode().endsWith("0201") &&!resultSucess) {
//高度数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(move));
request.setState(String.valueOf(tier));
request.setDevice_code(this.getDeviceCode());
request.setType("2");
acsToWmsService.notify(request);
}
if (tier != last_tier&&move!=0 && this.getDeviceCode().startsWith("ZJBDJW")) {
//高度数量变更后通知lms
resultSucess=true;
}else if (move ==1 && this.getDeviceCode().startsWith("ZJBDJW") &&!resultSucess) {
//点位数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(tier));
request.setState("3");
request.setDevice_code(this.getDeviceCode());
request.setType("2");
acsToWmsService.notify(request);
resultSucess=true;
}
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;
case 2:
//正极板对接位反馈设备有无货
if("ZJBDJW0101".equals(device_code)||"ZJBDJW0201".equals(device_code)){
device_code=device_code.substring(0,device_code.length()-2);
}
pointMapper.updatePointVehicleQty(device_code,state);
break;
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());
}
if (!startPointObj.getPoint_code().startsWith("ZJBDJW")) {
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() - 1);
}
startPointObj.setIng_task_code("");
startPointObj.setUpdate_time(DateUtil.now());
pointService.updateById(startPointObj);
@ -214,7 +216,9 @@ public class BPSLTask extends AbstractTask {
// 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) {
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);
}
taskObj.setRemark("任务取消");
@ -235,7 +239,7 @@ public class BPSLTask extends AbstractTask {
@Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
//todo 重算最优点
//重算最优点
JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data());
SchBasePoint point = this.findNextPoint(jsonObject,schBaseTask);
//正极板现在不堆叠
@ -246,8 +250,10 @@ public class BPSLTask extends AbstractTask {
}
//重算点位时把点位占用
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);
}
}

Loading…
Cancel
Save