同一天相同物料才能放在同一排
This commit is contained in:
@@ -113,6 +113,7 @@ public class GHCMLTask extends AbstractTask {
|
|||||||
String requestParam = task.getRequest_param();
|
String requestParam = task.getRequest_param();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
||||||
jsonObject.put("material_id", ObjectUtil.isNotEmpty(groupInfo) ? groupInfo.getMaterial_id() : null);
|
jsonObject.put("material_id", ObjectUtil.isNotEmpty(groupInfo) ? groupInfo.getMaterial_id() : null);
|
||||||
|
jsonObject.put("pcsn",ObjectUtil.isNotEmpty(groupInfo) ? groupInfo.getPcsn() : null);
|
||||||
SchBasePoint point = findNextPoint(nextRegionStr, jsonObject);
|
SchBasePoint point = findNextPoint(nextRegionStr, jsonObject);
|
||||||
log.info("当前任务{}找到预计终点{}",task.getTask_id(),point.getPoint_code());
|
log.info("当前任务{}找到预计终点{}",task.getTask_id(),point.getPoint_code());
|
||||||
if (ObjectUtil.isEmpty(point)) {
|
if (ObjectUtil.isEmpty(point)) {
|
||||||
@@ -142,9 +143,10 @@ public class GHCMLTask extends AbstractTask {
|
|||||||
*/
|
*/
|
||||||
private SchBasePoint findNextPoint(List<String> nextRegionStr, JSONObject jsonObject) {
|
private SchBasePoint findNextPoint(List<String> nextRegionStr, JSONObject jsonObject) {
|
||||||
// 查找是否有相同物料的货位:
|
// 查找是否有相同物料的货位:
|
||||||
|
// 查找相同批次
|
||||||
// 最小排最小列,且列大于1(即不是等待位置,1不写死:使用子查询,寻找当排最小列序号的值)
|
// 最小排最小列,且列大于1(即不是等待位置,1不写死:使用子查询,寻找当排最小列序号的值)
|
||||||
// 多个数据选择一个:Limit 1, 还需要考虑任务数,尽量一排排满
|
// 多个数据选择一个:Limit 1, 还需要考虑任务数,尽量一排排满
|
||||||
SchBasePoint sameMaterialPoints = autoMapper.getZCSameMaterialPoint(nextRegionStr.get(0)
|
SchBasePoint sameMaterialPoints = autoMapper.getZCSameMaterialPoint(jsonObject.getString("pcsn")
|
||||||
, jsonObject.getString("material_id"));
|
, jsonObject.getString("material_id"));
|
||||||
if (ObjectUtil.isNotEmpty(sameMaterialPoints)) {
|
if (ObjectUtil.isNotEmpty(sameMaterialPoints)) {
|
||||||
// 找到相同物料。分配等待点。
|
// 找到相同物料。分配等待点。
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public interface AutoMapper {
|
|||||||
|
|
||||||
List<SchBasePoint> getGHSExitMaterialList();
|
List<SchBasePoint> getGHSExitMaterialList();
|
||||||
|
|
||||||
SchBasePoint getZCSameMaterialPoint(String regionCode, String materialId);
|
SchBasePoint getZCSameMaterialPoint(String pcsn, String materialId);
|
||||||
|
|
||||||
SchBasePoint getZCEmptyMaterialPoint(String regionCode, String materialId);
|
SchBasePoint getZCEmptyMaterialPoint(String regionCode, String materialId);
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
AND vg.group_bind_material_status = '2'
|
AND vg.group_bind_material_status = '2'
|
||||||
WHERE p.region_code = 'ZC'
|
WHERE p.region_code = 'ZC'
|
||||||
and vg.material_id=#{materialId}
|
and vg.material_id=#{materialId}
|
||||||
|
and RIGHT(vg.pcsn,8)=RIGHT(#{pcsn},8)
|
||||||
)
|
)
|
||||||
ORDER BY p.row_num, p.col_num
|
ORDER BY p.row_num, p.col_num
|
||||||
limit 1
|
limit 1
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ public class TBXMLTask extends AbstractTask {
|
|||||||
StringBuilder pcsn = new StringBuilder();
|
StringBuilder pcsn = new StringBuilder();
|
||||||
pcsn.append(orderObject.getPoint_code())
|
pcsn.append(orderObject.getPoint_code())
|
||||||
.append(orderObject.getMaterial_code())
|
.append(orderObject.getMaterial_code())
|
||||||
.append(orderObject.getTeam())
|
.append(ObjectUtil.isEmpty(orderObject.getTeam())?0:orderObject.getTeam())
|
||||||
.append(DateUtil.format(DateUtil.date(), "yyyyMMdd"));
|
.append(DateUtil.format(DateUtil.date(), "yyyyMMdd"));
|
||||||
groupEntity.setPcsn(pcsn.toString());
|
groupEntity.setPcsn(pcsn.toString());
|
||||||
groupEntity.setInstorage_time(DateUtil.now());
|
groupEntity.setInstorage_time(DateUtil.now());
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ public class TBXQKTask extends AbstractTask {
|
|||||||
.and(la -> la.isNull(SchBasePoint::getIng_task_code)
|
.and(la -> la.isNull(SchBasePoint::getIng_task_code)
|
||||||
.or()
|
.or()
|
||||||
.eq(SchBasePoint::getIng_task_code, ""))
|
.eq(SchBasePoint::getIng_task_code, ""))
|
||||||
|
.eq(SchBasePoint::getPoint_status,"2")
|
||||||
.eq(SchBasePoint::getBlock_num, "1")
|
.eq(SchBasePoint::getBlock_num, "1")
|
||||||
.eq(SchBasePoint::getIs_used, true);
|
.eq(SchBasePoint::getIs_used, true);
|
||||||
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
||||||
|
|||||||
@@ -2,7 +2,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