add:增加不对接MES包装关系逻辑
This commit is contained in:
@@ -63,12 +63,13 @@ import java.util.stream.Collectors;
|
|||||||
@Log4j
|
@Log4j
|
||||||
public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpackagerelationMapper, PdmBiSubpackagerelation> implements IpdmBiSubpackagerelationService {
|
public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpackagerelationMapper, PdmBiSubpackagerelation> implements IpdmBiSubpackagerelationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IschBaseTaskService taskService;
|
||||||
@Resource
|
@Resource
|
||||||
private ZxqTask zxqTask;
|
private ZxqTask zxqTask;
|
||||||
@Resource
|
@Resource
|
||||||
private ZxDjwTask zxDjwTask;
|
private ZxDjwTask zxDjwTask;
|
||||||
@Resource
|
|
||||||
private IschBaseTaskService taskService;
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISysParamService iSysParamService;
|
private ISysParamService iSysParamService;
|
||||||
|
|
||||||
@@ -818,11 +819,11 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
boxInfo.put("device_code", deviceCode);
|
boxInfo.put("device_code", deviceCode);
|
||||||
boxInfo.put("material_code", boxType);
|
boxInfo.put("material_code", boxType);
|
||||||
boxInfo.put("num", workIdList.size());
|
boxInfo.put("num", workIdList.size());
|
||||||
//String boxSn = outBoxManageService.outBox(boxInfo);
|
String boxSn = outBoxManageService.outBox(boxInfo);
|
||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
System.out.println("木箱出库代码执行花费时间------------------------------------------------------------------------------------------*************************************************************************************************= totalTime = " + stopWatch.getTotalTimeMillis());
|
System.out.println("木箱出库代码执行花费时间------------------------------------------------------------------------------------------*************************************************************************************************= totalTime = " + stopWatch.getTotalTimeMillis());
|
||||||
log.info("木箱出库代码执行花费时间------------------------------------------------------------------------------------------*************************************************************************************************= totalTime = " + stopWatch.getTotalTimeMillis());
|
log.info("木箱出库代码执行花费时间------------------------------------------------------------------------------------------*************************************************************************************************= totalTime = " + stopWatch.getTotalTimeMillis());
|
||||||
String boxSn = "MX230118000013";
|
//String boxSn = "MX230118000013";
|
||||||
StopWatch stopWatch1 = new StopWatch();
|
StopWatch stopWatch1 = new StopWatch();
|
||||||
stopWatch1.start();
|
stopWatch1.start();
|
||||||
//更新及子卷包装状态已分配规格及木箱规格组
|
//更新及子卷包装状态已分配规格及木箱规格组
|
||||||
|
|||||||
@@ -232,6 +232,57 @@ public class ZxqTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public SchBaseTask createTaskReturnTask(JSONObject form) {
|
||||||
|
Assert.notNull(form, "请求参数不能为空");
|
||||||
|
String taskType = form.getString("task_type");
|
||||||
|
if (StrUtil.isBlank(taskType)) {
|
||||||
|
throw new BadRequestException("业务类型不能为空");
|
||||||
|
}
|
||||||
|
String vehicleCode = form.getString("vehicle_code");
|
||||||
|
if (StrUtil.isBlank(vehicleCode)) {
|
||||||
|
throw new BadRequestException("载具号不能为空");
|
||||||
|
}
|
||||||
|
String pointCode1 = form.getString("point_code1");
|
||||||
|
if (StrUtil.isBlank(pointCode1)) {
|
||||||
|
throw new BadRequestException("起点不能为空");
|
||||||
|
}
|
||||||
|
String pointCode2 = form.getString("point_code2");
|
||||||
|
// if (StrUtil.isBlank(pointCode2)) {
|
||||||
|
// throw new BadRequestException("下一点不能为空");
|
||||||
|
// }
|
||||||
|
//是否立即下发
|
||||||
|
boolean isSend = !StrUtil.isNotBlank(form.getString("is_send")) || BooleanUtil.toBoolean(form.getString("is_send"));
|
||||||
|
SchBaseTaskVO schBaseTaskVo = SchBaseTaskVO.builder()
|
||||||
|
.task_type(taskType)
|
||||||
|
.vehicle_code(vehicleCode)
|
||||||
|
.vehicle_code2(form.getString("vehicle_code2"))
|
||||||
|
.point_code1(pointCode1)
|
||||||
|
.point_code2(pointCode2)
|
||||||
|
.point_code3(form.getString("point_code3"))
|
||||||
|
.point_code4(form.getString("point_code4"))
|
||||||
|
.task_id(org.nl.common.utils.IdUtil.getStringId())
|
||||||
|
.task_code(org.nl.common.utils.IdUtil.getStringId())
|
||||||
|
.handle_class(THIS_CLASS)
|
||||||
|
.car_no(form.getString("car_no"))
|
||||||
|
.create_id(SecurityUtils.getCurrentUserId())
|
||||||
|
.create_name(SecurityUtils.getCurrentUsername())
|
||||||
|
.create_time(DateUtil.now())
|
||||||
|
.is_send(isSend ? "1" : "0")
|
||||||
|
.request_param(form.getString("request_param"))
|
||||||
|
.acs_task_type(StrUtil.isEmpty(form.getString("acs_task_type")) ? PackageInfoIvtEnum.ACS_TASK_TYPE.code("agv任务") : form.getString("acs_task_type"))
|
||||||
|
.task_status(StrUtil.isEmpty(form.getString("task_status")) ? TaskStatusEnum.START_AND_POINT.getCode() : form.getString("task_status"))
|
||||||
|
.product_area(StrUtil.isEmpty(form.getString("product_area")) ? "BLK" : form.getString("product_area"))
|
||||||
|
.build();
|
||||||
|
SchBaseTask task = new SchBaseTask();
|
||||||
|
BeanUtils.copyProperties(schBaseTaskVo, task);
|
||||||
|
taskService.save(task);
|
||||||
|
//如果目标点位没有空位先创建不下发
|
||||||
|
if (isSend) {
|
||||||
|
this.immediateNotifyAcs(null);
|
||||||
|
}
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String createTask(JSONObject form) {
|
public String createTask(JSONObject form) {
|
||||||
Assert.notNull(form, "请求参数不能为空");
|
Assert.notNull(form, "请求参数不能为空");
|
||||||
@@ -285,57 +336,6 @@ public class ZxqTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public SchBaseTask createTaskReturnTask(JSONObject form) {
|
|
||||||
Assert.notNull(form, "请求参数不能为空");
|
|
||||||
String taskType = form.getString("task_type");
|
|
||||||
if (StrUtil.isBlank(taskType)) {
|
|
||||||
throw new BadRequestException("业务类型不能为空");
|
|
||||||
}
|
|
||||||
String vehicleCode = form.getString("vehicle_code");
|
|
||||||
if (StrUtil.isBlank(vehicleCode)) {
|
|
||||||
throw new BadRequestException("载具号不能为空");
|
|
||||||
}
|
|
||||||
String pointCode1 = form.getString("point_code1");
|
|
||||||
if (StrUtil.isBlank(pointCode1)) {
|
|
||||||
throw new BadRequestException("起点不能为空");
|
|
||||||
}
|
|
||||||
String pointCode2 = form.getString("point_code2");
|
|
||||||
// if (StrUtil.isBlank(pointCode2)) {
|
|
||||||
// throw new BadRequestException("下一点不能为空");
|
|
||||||
// }
|
|
||||||
//是否立即下发
|
|
||||||
boolean isSend = !StrUtil.isNotBlank(form.getString("is_send")) || BooleanUtil.toBoolean(form.getString("is_send"));
|
|
||||||
SchBaseTaskVO schBaseTaskVo = SchBaseTaskVO.builder()
|
|
||||||
.task_type(taskType)
|
|
||||||
.vehicle_code(vehicleCode)
|
|
||||||
.vehicle_code2(form.getString("vehicle_code2"))
|
|
||||||
.point_code1(pointCode1)
|
|
||||||
.point_code2(pointCode2)
|
|
||||||
.point_code3(form.getString("point_code3"))
|
|
||||||
.point_code4(form.getString("point_code4"))
|
|
||||||
.task_id(org.nl.common.utils.IdUtil.getStringId())
|
|
||||||
.task_code(org.nl.common.utils.IdUtil.getStringId())
|
|
||||||
.handle_class(THIS_CLASS)
|
|
||||||
.car_no(form.getString("car_no"))
|
|
||||||
.create_id(SecurityUtils.getCurrentUserId())
|
|
||||||
.create_name(SecurityUtils.getCurrentUsername())
|
|
||||||
.create_time(DateUtil.now())
|
|
||||||
.is_send(isSend ? "1" : "0")
|
|
||||||
.request_param(form.getString("request_param"))
|
|
||||||
.acs_task_type(StrUtil.isEmpty(form.getString("acs_task_type")) ? PackageInfoIvtEnum.ACS_TASK_TYPE.code("agv任务") : form.getString("acs_task_type"))
|
|
||||||
.task_status(StrUtil.isEmpty(form.getString("task_status")) ? TaskStatusEnum.START_AND_POINT.getCode() : form.getString("task_status"))
|
|
||||||
.product_area(StrUtil.isEmpty(form.getString("product_area")) ? "BLK" : form.getString("product_area"))
|
|
||||||
.build();
|
|
||||||
SchBaseTask task = new SchBaseTask();
|
|
||||||
BeanUtils.copyProperties(schBaseTaskVo, task);
|
|
||||||
taskService.save(task);
|
|
||||||
//如果目标点位没有空位先创建不下发
|
|
||||||
if (isSend) {
|
|
||||||
this.immediateNotifyAcs(null);
|
|
||||||
}
|
|
||||||
return task;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void forceFinish(String taskId) {
|
public void forceFinish(String taskId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user