Browse Source

1.正极板对接位和堆叠位逻辑优化

2.正极板8个点位plc数量同步
master
psh 11 months ago
parent
commit
1bfb6c4b96
  1. 14
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/cw_site/CwSiteDeviceDriver.java
  2. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/feedBackTaskStatus/FeedBackTaskStatusRequest.java
  3. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  4. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
  5. 28
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java
  6. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.java
  7. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml

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

@ -155,6 +155,20 @@ public class CwSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devic
}
}
if (move != last_move) {
//点位数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(move));
request.setDevice_code(this.getDeviceCode());
request.setType("2");
acsToWmsService.notify();
}
if (tier != last_tier&&move!=0) {
//高度数量变更后通知lms
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setState(String.valueOf(tier));
request.setDevice_code(this.getDeviceCode());
request.setType("2");
acsToWmsService.notify();
}
if (error != last_error) {
}

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/feedBackTaskStatus/FeedBackTaskStatusRequest.java

@ -46,5 +46,10 @@ public class FeedBackTaskStatusRequest extends BaseRequest {
*/
private String material_type;
/**
* 层数
*/
private String tier;
}

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

@ -166,15 +166,20 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String requestNo = param.getString("requestNo");
log.info("notifyAcs - 请求参数 {}", param);
Integer type=param.getInteger("type");
String device_code = param.getString("device_code");
String state = param.getString("state");
switch(type) {
case 1:
//自动门反馈设备状态,将对应十个固化室工位的状态修改为传入状态
String device_code = param.getString("device_code");
String ghs_device_code="GHS"+device_code.substring(device_code.length()-2);
String state = param.getString("state");
pointMapper.updatePointStatus(ghs_device_code,state);
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:
break;

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

@ -116,7 +116,7 @@ public class BPSLTask extends AbstractTask {
String regionCode = "";
String materialType = extGroupData.getString("material_type");
if("1".equals(materialType)){
regionCode="ZJBDDW";
regionCode="ZJB";
}else if("2".equals(materialType)){
regionCode="HCQ2";
}else if ("3".equals(materialType)){

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

@ -90,9 +90,9 @@ public class KGHJRKTask extends AbstractTask {
task.setRemark("");
taskService.update(task);
//发起任务时先把点位占用,防止发起重复任务
point.setIng_task_code(task.getTask_code());
pointService.update(point);
// //发起任务时先把点位占用,防止发起重复任务
// point.setIng_task_code(task.getTask_code());
// pointService.update(point);
//下发
this.renotifyAcs(task);
@ -173,7 +173,10 @@ public class KGHJRKTask extends AbstractTask {
if (status.equals(TaskStatus.FINISHED)) { // 完成
// 终点解锁,库存增加
startPointObj.setIng_task_code("");
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty()+1);
//正极板对接位通过plc信号同步,任务完成不增加
if(!"ZJBKGHJDJW".equals(startPointObj.getRegion_code())) {
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1);
}
pointService.update(endPointObj);
// 任务完成
@ -204,6 +207,21 @@ public class KGHJRKTask extends AbstractTask {
@Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) {
//todo 重算最优点
//重新计算固化室放货点位
JSONObject extGroupData = JSONObject.parseObject(schBaseTask.getExt_group_data());
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1()));
SchBasePoint point = findNextPoint(startPoint, schBaseTask.getVehicle_type());
if("ZJBKGHJDJW".equals(point.getRegion_code())) {
schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1));
}else{
schBaseTask.setPoint_code2(point.getPoint_code());
if(ObjectUtil.isNotEmpty(point.getIng_task_code())&&!schBaseTask.getTask_code().equals(point.getIng_task_code())){
throw new BadRequestException("当前空架点位有任务,暂不反馈!");
}
//重算点位时把点位占用
point.setIng_task_code(schBaseTask.getTask_code());
pointService.update(point);
}
}
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.java

@ -19,4 +19,6 @@ public interface PointMapper {
void updateVehicleType(String device_code,String vehicle_type);
void updatePointType(String device_code,String point_type);
void updatePointVehicleQty(String device_code,String state);
}

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml

@ -34,4 +34,9 @@
update sch_base_point set point_type = #{point_type}
where point_code like CONCAT('%', #{device_code}, '%')
</update>
<update id="updatePointType">
update sch_base_point set vehicle_qty = #{state}
where point_code like CONCAT('%', #{device_code}, '%')
</update>
</mapper>

Loading…
Cancel
Save