psh 9 months ago
parent
commit
ffb578a198
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java
  2. 24
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java
  3. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/TBXBKJTask.java
  4. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml

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

@ -152,7 +152,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
try { try {
abstractTask.updateTaskStatus(taskObj.getTask_id(), status); abstractTask.updateTaskStatus(taskObj.getTask_id(), status);
} catch (Exception e) { } catch (Exception e) {
log.error("任务状态更新失败: {}{}", e,e.getMessage()); log.error("任务状态更新失败: {}", e.getMessage(),e);
return BaseResponse.responseError(requestNo, "任务:[" + taskId + "]状态更新失败," + message); return BaseResponse.responseError(requestNo, "任务:[" + taskId + "]状态更新失败," + message);
} }
return BaseResponse.responseOk(requestNo, "任务状态反馈成功!"); return BaseResponse.responseOk(requestNo, "任务状态反馈成功!");

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

@ -116,7 +116,7 @@ public class KGHJRKTask extends AbstractTask {
if ("A1".equals(startPoint.getWorkshop_code())) { if ("A1".equals(startPoint.getWorkshop_code())) {
//A1空架到HCQ1 //A1空架到HCQ1
regionCode = "HCQ7"; regionCode = "HCQ7";
regionCode2 ="HCQ1"; regionCode2 = "HCQ1";
if ("1".equals(vehicleType)) { if ("1".equals(vehicleType)) {
regionCode = "ZJBKGHJDJW"; regionCode = "ZJBKGHJDJW";
} }
@ -133,7 +133,9 @@ public class KGHJRKTask extends AbstractTask {
for (int i = schBasePointList.size() - 1; i >= 0; i--) { for (int i = schBasePointList.size() - 1; i >= 0; i--) {
SchBasePoint temp = schBasePointList.get(i); SchBasePoint temp = schBasePointList.get(i);
if (temp.getVehicle_qty() > 1 && if (temp.getVehicle_qty() > 1 &&
ObjectUtil.isEmpty(temp.getIng_task_code())) { //放货三拖一起放,只能到01位置
temp.getPoint_code().endsWith("01")
&& ObjectUtil.isEmpty(temp.getIng_task_code())) {
if (schBasePoint != null) { if (schBasePoint != null) {
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code());
} else { } else {
@ -143,12 +145,12 @@ public class KGHJRKTask extends AbstractTask {
} }
schBasePoint = temp; schBasePoint = temp;
} }
if(ObjectUtil.isEmpty(schBasePoint)){ if (ObjectUtil.isEmpty(schBasePoint)) {
schBasePointList = pointMapper.findPointByRegion(regionCode2, "1"); schBasePointList = pointMapper.findPointByRegion(regionCode2, "1");
for (int i = schBasePointList.size() - 1; i >= 0; i--) { for (int i = schBasePointList.size() - 1; i >= 0; i--) {
SchBasePoint temp = schBasePointList.get(i); SchBasePoint temp = schBasePointList.get(i);
//三拖一起放,如果不是01结尾直接跳过 //三拖一起放,如果不是01结尾直接跳过
if(!temp.getPoint_code().endsWith("01")){ if (!temp.getPoint_code().endsWith("01")) {
continue; continue;
} }
if (temp.getVehicle_qty() == 1 && if (temp.getVehicle_qty() == 1 &&
@ -191,10 +193,13 @@ public class KGHJRKTask extends AbstractTask {
} }
String startPoint = taskObj.getPoint_code1(); // 获取起点 String startPoint = taskObj.getPoint_code1(); // 获取起点
if (taskObj.getPoint_code2().startsWith("QHQ")) {
taskObj.setPoint_code2("HCQ" + taskObj.getPoint_code2().substring(3));
}
String endPoint = taskObj.getPoint_code2(); // 获取终点 String endPoint = taskObj.getPoint_code2(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint startPointObj = pointService.getById(startPoint);
if (endPoint.startsWith("ZJBDJW")) { if (endPoint.startsWith("ZJBDJW")) {
endPoint=endPoint.substring(0,endPoint.length()-2); endPoint = endPoint.substring(0, endPoint.length() - 2);
} }
SchBasePoint endPointObj = pointService.getById(endPoint); SchBasePoint endPointObj = pointService.getById(endPoint);
// 根据传来的类型去对任务进行操作 // 根据传来的类型去对任务进行操作
@ -207,16 +212,15 @@ public class KGHJRKTask extends AbstractTask {
endPointObj.setIng_task_code(""); endPointObj.setIng_task_code("");
endPointObj.setVehicle_qty(1); endPointObj.setVehicle_qty(1);
pointService.update(endPointObj); pointService.update(endPointObj);
if("HCQ7".equals(endPointObj.getRegion_code())){ endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "2");
endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"2");
endPointObj.setIng_task_code(""); endPointObj.setIng_task_code("");
endPointObj.setVehicle_qty(1); endPointObj.setVehicle_qty(1);
pointService.update(endPointObj); pointService.update(endPointObj);
endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"3"); endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "3");
endPointObj.setIng_task_code(""); endPointObj.setIng_task_code("");
endPointObj.setVehicle_qty(1); endPointObj.setVehicle_qty(1);
pointService.update(endPointObj); pointService.update(endPointObj);
}
// 任务完成 // 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); taskObj.setTask_status(TaskStatus.FINISHED.getCode());
@ -255,7 +259,7 @@ public class KGHJRKTask extends AbstractTask {
schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1)); schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1));
} else { } else {
//空架缓存区不需要该逻辑,左右都是同一套点位体系 //空架缓存区不需要该逻辑,左右都是同一套点位体系
if(!"HCQ7".equals(point.getRegion_code())) { if (!"HCQ7".equals(point.getRegion_code())) {
schBaseTask.setPoint_code2(point.getPoint_code().replace("HCQ", "QHQ")); schBaseTask.setPoint_code2(point.getPoint_code().replace("HCQ", "QHQ"));
} }
if (ObjectUtil.isNotEmpty(point.getIng_task_code()) && !schBaseTask.getTask_code().equals(point.getIng_task_code())) { if (ObjectUtil.isNotEmpty(point.getIng_task_code()) && !schBaseTask.getTask_code().equals(point.getIng_task_code())) {

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

@ -116,8 +116,8 @@ public class TBXBKJTask extends AbstractTask {
String regionCode2 = null; String regionCode2 = null;
if ("TBX1".equals(startPoint.getRegion_code())) { if ("TBX1".equals(startPoint.getRegion_code())) {
//TBX1找A区 //TBX1找A区
regionCode = "HCQ7"; regionCode = "HCQ1";
regionCode2 ="HCQ1"; regionCode2 ="HCQ7";
} else if ("TBX2".equals(startPoint.getRegion_code())) { } else if ("TBX2".equals(startPoint.getRegion_code())) {
//TBX2找B区 //TBX2找B区

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

@ -8,7 +8,7 @@
`sch_base_point` p `sch_base_point` p
WHERE p.region_code like CONCAT('%', #{regionCode}, '%') WHERE p.region_code like CONCAT('%', #{regionCode}, '%')
and p.point_status = #{point_status} and p.is_used = 1 and p.point_status = #{point_status} and p.is_used = 1
ORDER BY region_code ORDER BY point_code
</select> </select>
<select id="findPointByRegion2" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint"> <select id="findPointByRegion2" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
@ -18,7 +18,7 @@
`sch_base_point` p `sch_base_point` p
WHERE p.region_code like CONCAT('%', #{regionCode}, '%') WHERE p.region_code like CONCAT('%', #{regionCode}, '%')
and p.is_used = 1 and p.is_used = 1
ORDER BY region_code ORDER BY point_code
</select> </select>
<select id="findPointByParentPoint" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint"> <select id="findPointByParentPoint" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">

Loading…
Cancel
Save