Merge branch 'refs/heads/b_lms' into master_merge
This commit is contained in:
@@ -402,9 +402,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
public void updateEntityList(JSONObject whereJson) {
|
||||
List<PdmBiSubpackagerelation> packagerelationList = JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class);
|
||||
List<PdmBiSubpackagerelation> isOutBox = packagerelationList.stream().filter(r -> r.getStatus().equals("0")).collect(Collectors.toList());
|
||||
// if (isOutBox.size() > 0) {
|
||||
// throw new BadRequestException("标记为黄色的子卷号已分配木箱,请重新选择未分配木箱的子卷");
|
||||
// }
|
||||
if (isOutBox.size() > 0) {
|
||||
throw new BadRequestException("标记为黄色的子卷号已分配木箱,请重新选择未分配木箱的子卷");
|
||||
}
|
||||
List<String> entityList = JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class).stream()
|
||||
.map(PdmBiSubpackagerelation::getWorkorder_id)
|
||||
.map(String::valueOf)
|
||||
@@ -481,8 +481,8 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
boxInfo.put("device_code", deviceCode);
|
||||
boxInfo.put("material_code", boxType);
|
||||
boxInfo.put("num", entityList.size());
|
||||
//String boxSn = outBoxManageService.outBox(boxInfo);
|
||||
String boxSn = "MX61401";
|
||||
String boxSn = outBoxManageService.outBox(boxInfo);
|
||||
//String boxSn = "MX61401";
|
||||
if (StringUtils.isBlank(boxSn)) {
|
||||
throw new BadRequestException("库位 -> 装箱对接位,木箱码不能为空!");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.nl.b_lms.sch.tasks.first_floor_area.auto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AutoSendDjqToZxqTwo {
|
||||
|
||||
@Resource
|
||||
private IbstIvtPackageinfoivtService packageinfoivtService;
|
||||
@Resource
|
||||
private ZxqTask zxqTask;
|
||||
@Resource
|
||||
private TaskQueueManager taskQueueManager;
|
||||
@Resource
|
||||
private TaskQueue taskQueue;
|
||||
//待检区->装箱区agv自动搬运任务
|
||||
public void run() {
|
||||
this.sendDjqToZxq();
|
||||
}
|
||||
|
||||
void sendDjqToZxq() {
|
||||
JSONObject toDjqTask =new JSONObject();
|
||||
//待检区有子卷且没有未完成任务
|
||||
List<BstIvtPackageinfoivt> djqPackageinfoivtList = packageinfoivtService.checkEndPointTask(PackageInfoIvtEnum.POINT_STATUS.code("待检区"), PackageInfoIvtEnum.IVT_STATUS.code("有子卷"), "1","");
|
||||
List<BstIvtPackageinfoivt> zxqPackageinfoivtList = packageinfoivtService.checkEndPointTask(PackageInfoIvtEnum.POINT_STATUS.code("装箱区"), PackageInfoIvtEnum.IVT_STATUS.code("空"), "2","");
|
||||
if (CollectionUtils.isNotEmpty(djqPackageinfoivtList)&&CollectionUtils.isNotEmpty(zxqPackageinfoivtList)) {
|
||||
toDjqTask.put("vehicle_code", djqPackageinfoivtList.get(0).getContainer_name());
|
||||
toDjqTask.put("point_code1", djqPackageinfoivtList.get(0).getPoint_code());
|
||||
toDjqTask.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("待检区->装箱区"));
|
||||
toDjqTask.put("point_code2", zxqPackageinfoivtList.get(0).getPoint_code());
|
||||
zxqTask.createTask(toDjqTask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user