opt:优化补空载具优先级
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
WHERE
|
||||
container_name IN (SELECT container_name FROM bst_ivt_packageinfoivt WHERE point_status = '3' AND ivt_status = '3')
|
||||
container_name IN (SELECT container_name FROM bst_ivt_packageinfoivt WHERE point_status = '3' AND ivt_status = '3' AND is_used ='1' )
|
||||
<if test="sale_order_name != null and sale_order_name != ''">
|
||||
AND sale_order_name LIKE CONCAT('%', #{sale_order_name}, '%')
|
||||
</if>
|
||||
|
||||
@@ -193,7 +193,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList;
|
||||
//请求来源
|
||||
if (!whereJson.containsKey("type")) {
|
||||
return Collections.emptyList();
|
||||
whereJson.put("type", PackageInfoIvtEnum.REQUEST_SOURCE.code("PC"));
|
||||
}
|
||||
if (whereJson.get("type").toString().equals(PackageInfoIvtEnum.REQUEST_SOURCE.code("PC"))) {
|
||||
//订单号
|
||||
@@ -273,7 +273,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
//检查是否存在已分配规格的子卷号
|
||||
List<PdmBiSubpackagerelation> isOutBox = packagerelationList.stream().filter(r -> r.getStatus().equals("0")).collect(Collectors.toList());
|
||||
if (isOutBox.size() > 0) {
|
||||
throw new BadRequestException("标记为黄色的子卷号已分配且对应的木箱已出库,请重新选择未分配木箱规格的子卷");
|
||||
throw new BadRequestException("标记为黄色的子卷号为已分配且对应的木箱已出库,请重新选择未分配木箱规格的子卷");
|
||||
}
|
||||
JSONArray jsonArray = whereJson.getJSONArray("tableMater");
|
||||
if (jsonArray == null || jsonArray.size() == 0) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
@@ -110,11 +109,16 @@ public class AutoSendVehicleToKzj {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (existTask.size() % 2 != 0) {
|
||||
//优先去待检区
|
||||
List<BstIvtPackageinfoivt> packageinfoivtList = packageinfoivtService.getBstIvtPackageinfoivts(PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位"), PackageInfoIvtEnum.IVT_STATUS.code("空"), null);
|
||||
if (packageinfoivtList.size() == 1) {
|
||||
pointCode1 = getPointCode(task, PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
||||
} else {
|
||||
pointCode1 = getPointCode(task, PackageInfoIvtEnum.TASK_TYPE.code("补空(管制区->空载具缓存位)"));
|
||||
if (existTask.size() % 2 != 0) {
|
||||
pointCode1 = getPointCode(task, PackageInfoIvtEnum.TASK_TYPE.code("补空(管制区->空载具缓存位)"));
|
||||
} else {
|
||||
//优先去待检区
|
||||
pointCode1 = getPointCode(task, PackageInfoIvtEnum.TASK_TYPE.code("补空(待检区->空载具缓存位)"));
|
||||
}
|
||||
}
|
||||
//去待检区或管制区搬运空载具
|
||||
if (pointCode1 != null) {
|
||||
|
||||
Reference in New Issue
Block a user