fix: 双层输送线搬运规则、点位复位问题、分拣包装下发覆膜机位置
This commit is contained in:
@@ -40,7 +40,6 @@ public class LogMessageConstant {
|
|||||||
public final static String COLOR_RESET = "\u001B[0m";
|
public final static String COLOR_RESET = "\u001B[0m";
|
||||||
/** 背景颜色:黄色 */
|
/** 背景颜色:黄色 */
|
||||||
public final static String BACKGROUND_YELLOW = "\u001B[43m";
|
public final static String BACKGROUND_YELLOW = "\u001B[43m";
|
||||||
|
|
||||||
/** 索引路径 */
|
/** 索引路径 */
|
||||||
public final static String INDEX_DIR = "E:\\lucene\\index";
|
public final static String INDEX_DIR = "E:\\lucene\\index";
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ public class FJQKTask extends AbstractTask {
|
|||||||
// todo: 未确认是否放在1还是2,目前规定四点任务空盘的载具编码是2
|
// todo: 未确认是否放在1还是2,目前规定四点任务空盘的载具编码是2
|
||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
task.setGroup_id(point.getGroup_id());
|
task.setGroup_id(point.getGroup_id());
|
||||||
|
task.setResponse_param(param.toJSONString());
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
// 父点位锁住
|
// 父点位锁住
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class GZYQLTask extends AbstractTask {
|
|||||||
*/
|
*/
|
||||||
private SchBasePoint findStartPoint(List<String> startRegionStr, JSONObject jsonObject) {
|
private SchBasePoint findStartPoint(List<String> startRegionStr, JSONObject jsonObject) {
|
||||||
// 无需工单
|
// 无需工单
|
||||||
// 默认认为缓存线有东西
|
// 如果一个有货一个没货,但是载具数量又是5的时候,就要不需要检测不能为5
|
||||||
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>();
|
||||||
lam.in(SchBasePoint::getRegion_code, startRegionStr)
|
lam.in(SchBasePoint::getRegion_code, startRegionStr)
|
||||||
.eq(SchBasePoint::getPoint_type, GeneralDefinition.EXIT) // 点位类型是缓存输送线出口
|
.eq(SchBasePoint::getPoint_type, GeneralDefinition.EXIT) // 点位类型是缓存输送线出口
|
||||||
@@ -140,9 +140,14 @@ public class GZYQLTask extends AbstractTask {
|
|||||||
.or()
|
.or()
|
||||||
.eq(SchBasePoint::getIng_task_code, ""))
|
.eq(SchBasePoint::getIng_task_code, ""))
|
||||||
.eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_VEHICLE.getCode())
|
.eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_VEHICLE.getCode())
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
.eq(SchBasePoint::getIs_used, true);
|
||||||
.ne(SchBasePoint::getVehicle_qty, 5)
|
List<SchBasePoint> list = pointService.list(lam);
|
||||||
.orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的
|
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);
|
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
||||||
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,8 +186,14 @@ public class YZSLTask extends AbstractTask {
|
|||||||
.and(la -> la.isNull(SchBasePoint::getIng_task_code) // 当前执行的任务为空或者NULL,有数据表示锁住
|
.and(la -> la.isNull(SchBasePoint::getIng_task_code) // 当前执行的任务为空或者NULL,有数据表示锁住
|
||||||
.or()
|
.or()
|
||||||
.eq(SchBasePoint::getIng_task_code, ""))
|
.eq(SchBasePoint::getIng_task_code, ""))
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
.eq(SchBasePoint::getIs_used, true);
|
||||||
.ne(SchBasePoint::getVehicle_qty, 5) // 载具数量不能等于5
|
// 如果一个有货一个没货,但是载具数量又是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);
|
.orderByDesc(SchBasePoint::getVehicle_qty);
|
||||||
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
||||||
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
||||||
|
|||||||
@@ -21,14 +21,15 @@ public class PointUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取状态名或者类型名
|
* 获取状态名或者类型名
|
||||||
|
*
|
||||||
* @param explain
|
* @param explain
|
||||||
* @param label
|
* @param label
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String getStatusOrTypeName(String explain, String label) {
|
public static String getStatusOrTypeName(String explain, String label) {
|
||||||
JSONObject statusArr = new JSONObject();
|
JSONObject statusArr = new JSONObject();
|
||||||
String[] split = explain.split(",");
|
String[] split = explain.split(",");
|
||||||
for ( int j = 0; j < split.length; j++) {
|
for (int j = 0; j < split.length; j++) {
|
||||||
String[] status = split[j].split("-");
|
String[] status = split[j].split("-");
|
||||||
statusArr.put(status[0], status[1]);
|
statusArr.put(status[0], status[1]);
|
||||||
}
|
}
|
||||||
@@ -38,6 +39,7 @@ public class PointUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空点位
|
* 清空点位
|
||||||
|
*
|
||||||
* @param point
|
* @param point
|
||||||
*/
|
*/
|
||||||
public static void clearPoint(SchBasePoint point) {
|
public static void clearPoint(SchBasePoint point) {
|
||||||
@@ -57,6 +59,7 @@ public class PointUtils {
|
|||||||
/**
|
/**
|
||||||
* 清空点位
|
* 清空点位
|
||||||
* 双层输送线特殊功能:上五下五
|
* 双层输送线特殊功能:上五下五
|
||||||
|
*
|
||||||
* @param point
|
* @param point
|
||||||
*/
|
*/
|
||||||
public static void clearPointAndRetainNum(SchBasePoint point) {
|
public static void clearPointAndRetainNum(SchBasePoint point) {
|
||||||
@@ -67,11 +70,10 @@ public class PointUtils {
|
|||||||
// 获取父点位
|
// 获取父点位
|
||||||
String parentPointCode = point.getParent_point_code();
|
String parentPointCode = point.getParent_point_code();
|
||||||
SchBasePoint basePoint = pointService.getById(parentPointCode);
|
SchBasePoint basePoint = pointService.getById(parentPointCode);
|
||||||
point.setPoint_status(PointStatusEnum.EMPTY_POINT.getCode());
|
|
||||||
point.setVehicle_type("");
|
point.setVehicle_type("");
|
||||||
point.setVehicle_code("");
|
point.setVehicle_code("");
|
||||||
point.setIng_task_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个托盘的时候就清空
|
if (basePoint.getVehicle_qty() == 5) { // 等到新的点执行第一托的时候,才判断另一个点满足5个托盘的时候就清空
|
||||||
basePoint.setVehicle_qty(0);
|
basePoint.setVehicle_qty(0);
|
||||||
basePoint.setUpdate_time(DateUtil.now());
|
basePoint.setUpdate_time(DateUtil.now());
|
||||||
@@ -81,18 +83,24 @@ public class PointUtils {
|
|||||||
pointService.updateById(point);
|
pointService.updateById(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 点位修改更新信息 **/
|
/**
|
||||||
|
* 点位修改更新信息
|
||||||
|
**/
|
||||||
public static void setUpdateByAcs(SchBasePoint pointObj) {
|
public static void setUpdateByAcs(SchBasePoint pointObj) {
|
||||||
pointObj.setUpdate_id(GeneralDefinition.ACS_ID);
|
pointObj.setUpdate_id(GeneralDefinition.ACS_ID);
|
||||||
pointObj.setUpdate_name(GeneralDefinition.ACS_NAME);
|
pointObj.setUpdate_name(GeneralDefinition.ACS_NAME);
|
||||||
pointObj.setUpdate_time(DateUtil.now());
|
pointObj.setUpdate_time(DateUtil.now());
|
||||||
}
|
}
|
||||||
/** 点位修改更新信息 **/
|
|
||||||
|
/**
|
||||||
|
* 点位修改更新信息
|
||||||
|
**/
|
||||||
public static void setUpdateByPC(SchBasePoint pointObj) {
|
public static void setUpdateByPC(SchBasePoint pointObj) {
|
||||||
pointObj.setUpdate_id(SecurityUtils.getCurrentUserId());
|
pointObj.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
pointObj.setUpdate_name(SecurityUtils.getCurrentNickName());
|
pointObj.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
pointObj.setUpdate_time(DateUtil.now());
|
pointObj.setUpdate_time(DateUtil.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setUpdateByType(SchBasePoint pointObj, TaskFinishedTypeEnum taskFinishedType) {
|
public static void setUpdateByType(SchBasePoint pointObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
if (taskFinishedType.equals(TaskFinishedTypeEnum.AUTO_ACS)) {
|
if (taskFinishedType.equals(TaskFinishedTypeEnum.AUTO_ACS)) {
|
||||||
setUpdateByAcs(pointObj);
|
setUpdateByAcs(pointObj);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user