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. 26
      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) { 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) { 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 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"); String requestNo = param.getString("requestNo");
log.info("notifyAcs - 请求参数 {}", param); log.info("notifyAcs - 请求参数 {}", param);
Integer type=param.getInteger("type"); Integer type=param.getInteger("type");
String device_code = param.getString("device_code");
String state = param.getString("state");
switch(type) { switch(type) {
case 1: case 1:
//自动门反馈设备状态,将对应十个固化室工位的状态修改为传入状态 //自动门反馈设备状态,将对应十个固化室工位的状态修改为传入状态
String device_code = param.getString("device_code");
String ghs_device_code="GHS"+device_code.substring(device_code.length()-2); String ghs_device_code="GHS"+device_code.substring(device_code.length()-2);
String state = param.getString("state");
pointMapper.updatePointStatus(ghs_device_code,state); pointMapper.updatePointStatus(ghs_device_code,state);
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);
}
pointMapper.updatePointVehicleQty(device_code,state);
break; break;
default: default:
break; 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 regionCode = "";
String materialType = extGroupData.getString("material_type"); String materialType = extGroupData.getString("material_type");
if("1".equals(materialType)){ if("1".equals(materialType)){
regionCode="ZJBDDW"; regionCode="ZJB";
}else if("2".equals(materialType)){ }else if("2".equals(materialType)){
regionCode="HCQ2"; regionCode="HCQ2";
}else if ("3".equals(materialType)){ }else if ("3".equals(materialType)){

26
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(""); task.setRemark("");
taskService.update(task); taskService.update(task);
//发起任务时先把点位占用,防止发起重复任务 // //发起任务时先把点位占用,防止发起重复任务
point.setIng_task_code(task.getTask_code()); // point.setIng_task_code(task.getTask_code());
pointService.update(point); // pointService.update(point);
//下发 //下发
this.renotifyAcs(task); this.renotifyAcs(task);
@ -173,7 +173,10 @@ public class KGHJRKTask extends AbstractTask {
if (status.equals(TaskStatus.FINISHED)) { // 完成 if (status.equals(TaskStatus.FINISHED)) { // 完成
// 终点解锁,库存增加 // 终点解锁,库存增加
startPointObj.setIng_task_code(""); startPointObj.setIng_task_code("");
//正极板对接位通过plc信号同步,任务完成不增加
if(!"ZJBKGHJDJW".equals(startPointObj.getRegion_code())) {
startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1); startPointObj.setVehicle_qty(startPointObj.getVehicle_qty() + 1);
}
pointService.update(endPointObj); pointService.update(endPointObj);
// 任务完成 // 任务完成
@ -204,6 +207,21 @@ public class KGHJRKTask extends AbstractTask {
@Override @Override
protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { 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 updateVehicleType(String device_code,String vehicle_type);
void updatePointType(String device_code,String point_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} update sch_base_point set point_type = #{point_type}
where point_code like CONCAT('%', #{device_code}, '%') where point_code like CONCAT('%', #{device_code}, '%')
</update> </update>
<update id="updatePointType">
update sch_base_point set vehicle_qty = #{state}
where point_code like CONCAT('%', #{device_code}, '%')
</update>
</mapper> </mapper>

Loading…
Cancel
Save