Browse Source

fix: 双层输送线搬运规则、点位复位问题、分拣包装下发覆膜机位置

master
李永德 1 year ago
parent
commit
dd235191a9
  1. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java
  2. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java
  3. 13
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java
  4. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java
  5. 16
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java
  6. 2
      lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java

@ -40,7 +40,6 @@ public class LogMessageConstant {
public final static String COLOR_RESET = "\u001B[0m";
/** 背景颜色:黄色 */
public final static String BACKGROUND_YELLOW = "\u001B[43m";
/** 索引路径 */
public final static String INDEX_DIR = "E:\\lucene\\index";

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQKTask.java

@ -102,6 +102,7 @@ public class FJQKTask extends AbstractTask {
// todo: 未确认是否放在1还是2,目前规定四点任务空盘的载具编码是2
task.setRemark("");
task.setGroup_id(point.getGroup_id());
task.setResponse_param(param.toJSONString());
taskService.updateById(task);
// 父点位锁住

13
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java

@ -132,7 +132,7 @@ public class GZYQLTask extends AbstractTask {
*/
private SchBasePoint findStartPoint(List<String> startRegionStr, JSONObject jsonObject) {
// 无需工单
// 默认认为缓存线有东西
// 如果一个有货一个没货,但是载具数量又是5的时候,就要不需要检测不能为5
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>();
lam.in(SchBasePoint::getRegion_code, startRegionStr)
.eq(SchBasePoint::getPoint_type, GeneralDefinition.EXIT) // 点位类型是缓存输送线出口
@ -140,9 +140,14 @@ public class GZYQLTask extends AbstractTask {
.or()
.eq(SchBasePoint::getIng_task_code, ""))
.eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_VEHICLE.getCode())
.eq(SchBasePoint::getIs_used, true)
.ne(SchBasePoint::getVehicle_qty, 5)
.orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的
.eq(SchBasePoint::getIs_used, true);
List<SchBasePoint> list = pointService.list(lam);
boolean doDetection = true; // 如果只有一条符合的数据就不需要检验不符合5个托
if (list.size() == 1) {
doDetection = false;
}
// 默认认为缓存线有东西
lam.ne(doDetection, SchBasePoint::getVehicle_qty, 5).orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的
List<SchBasePoint> schBasePoints = pointService.list(lam);
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
}

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java

@ -186,8 +186,14 @@ public class YZSLTask extends AbstractTask {
.and(la -> la.isNull(SchBasePoint::getIng_task_code) // 当前执行的任务为空或者NULL,有数据表示锁住
.or()
.eq(SchBasePoint::getIng_task_code, ""))
.eq(SchBasePoint::getIs_used, true)
.ne(SchBasePoint::getVehicle_qty, 5) // 载具数量不能等于5
.eq(SchBasePoint::getIs_used, true);
// 如果一个有货一个没货,但是载具数量又是5的时候,就要不需要检测不能为5
List<SchBasePoint> list = pointService.list(lam);
boolean doDetection = true; // 如果只有一条符合的数据就不需要检验不符合5个托
if (list.size() == 1) {
doDetection = false;
}
lam.ne(doDetection, SchBasePoint::getVehicle_qty, 5) // 载具数量不能等于5
.orderByDesc(SchBasePoint::getVehicle_qty);
List<SchBasePoint> schBasePoints = pointService.list(lam);
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;

16
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/PointUtils.java

@ -21,6 +21,7 @@ public class PointUtils {
/**
* 获取状态名或者类型名
*
* @param explain
* @param label
* @return
@ -38,6 +39,7 @@ public class PointUtils {
/**
* 清空点位
*
* @param point
*/
public static void clearPoint(SchBasePoint point) {
@ -57,6 +59,7 @@ public class PointUtils {
/**
* 清空点位
* 双层输送线特殊功能上五下五
*
* @param point
*/
public static void clearPointAndRetainNum(SchBasePoint point) {
@ -67,11 +70,10 @@ public class PointUtils {
// 获取父点位
String parentPointCode = point.getParent_point_code();
SchBasePoint basePoint = pointService.getById(parentPointCode);
point.setPoint_status(PointStatusEnum.EMPTY_POINT.getCode());
point.setVehicle_type("");
point.setVehicle_code("");
point.setIng_task_code("");
point.setVehicle_qty(point.getVehicle_qty() + 1);
point.setVehicle_qty(point.getVehicle_qty() == 5 ? point.getVehicle_qty() : point.getVehicle_qty() + 1);
if (basePoint.getVehicle_qty() == 5) { // 等到新的点执行第一托的时候,才判断另一个点满足5个托盘的时候就清空
basePoint.setVehicle_qty(0);
basePoint.setUpdate_time(DateUtil.now());
@ -81,18 +83,24 @@ public class PointUtils {
pointService.updateById(point);
}
/** 点位修改更新信息 **/
/**
* 点位修改更新信息
**/
public static void setUpdateByAcs(SchBasePoint pointObj) {
pointObj.setUpdate_id(GeneralDefinition.ACS_ID);
pointObj.setUpdate_name(GeneralDefinition.ACS_NAME);
pointObj.setUpdate_time(DateUtil.now());
}
/** 点位修改更新信息 **/
/**
* 点位修改更新信息
**/
public static void setUpdateByPC(SchBasePoint pointObj) {
pointObj.setUpdate_id(SecurityUtils.getCurrentUserId());
pointObj.setUpdate_name(SecurityUtils.getCurrentNickName());
pointObj.setUpdate_time(DateUtil.now());
}
public static void setUpdateByType(SchBasePoint pointObj, TaskFinishedTypeEnum taskFinishedType) {
if (taskFinishedType.equals(TaskFinishedTypeEnum.AUTO_ACS)) {
setUpdateByAcs(pointObj);

2
lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml

@ -42,7 +42,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data:

Loading…
Cancel
Save