|
|
@ -21,14 +21,15 @@ public class PointUtils { |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取状态名或者类型名 |
|
|
|
* |
|
|
|
* @param explain |
|
|
|
* @param label |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static String getStatusOrTypeName(String explain, String label) { |
|
|
|
JSONObject statusArr = new JSONObject(); |
|
|
|
String[] split = explain.split(","); |
|
|
|
for ( int j = 0; j < split.length; j++) { |
|
|
|
String[] split = explain.split(","); |
|
|
|
for (int j = 0; j < split.length; j++) { |
|
|
|
String[] status = split[j].split("-"); |
|
|
|
statusArr.put(status[0], status[1]); |
|
|
|
} |
|
|
@ -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); |
|
|
|