Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -3,6 +3,7 @@ package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.date.StopWatch;
|
import cn.hutool.core.date.StopWatch;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -20,6 +21,8 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||||
|
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||||
|
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||||
@@ -87,6 +90,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
@Resource
|
@Resource
|
||||||
private IPdmBiSlittingproductionplanService iPdmBiSlittingproductionplanService;
|
private IPdmBiSlittingproductionplanService iPdmBiSlittingproductionplanService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPdmBiOrderbominfoService iPdmBiOrderbominfoService;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DjqTask djqTask;
|
private DjqTask djqTask;
|
||||||
@@ -206,8 +212,11 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
r.setBox_group("0");
|
r.setBox_group("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 调用方法获取木箱料号:输入:子卷号、输出:木箱信息
|
// 调用方法获取木箱料号:输入:子卷号、输出:木箱信息
|
||||||
// r.setBox_type("441510009000470");
|
PdmBiOrderbominfo bomInfoDao = iPdmBiOrderbominfoService.getBiOrderbominfoByContainer(r.getContainer_name());
|
||||||
|
if (ObjectUtil.isNotEmpty(bomInfoDao)) {
|
||||||
|
r.setBox_type(bomInfoDao.getProductName());
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return pdmBiSubpackagerelationList;
|
return pdmBiSubpackagerelationList;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二期异常移库任务类
|
* 二期异常出库任务(木箱:浅货位阻挡)
|
||||||
* Created by Lxy on 2024/1/19.
|
* Created by Lxy on 2024/1/19.
|
||||||
*/
|
*/
|
||||||
public class TwoExcepionalMoveTask extends AbstractAcsTask {
|
public class TwoExcepionalMoveTask extends AbstractAcsTask {
|
||||||
@@ -85,37 +85,27 @@ public class TwoExcepionalMoveTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
map.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
map.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||||
|
|
||||||
// 更新起点仓位
|
if (jsonTask.getString("vehicle_code").equals(IOSEnum.IS_NOTANDYES.code("否"))){
|
||||||
JSONObject jsonAttr = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
// 更新起点仓位
|
||||||
jsonAttr.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
|
JSONObject jsonAttr = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||||
jsonAttr.put("storagevehicle_code","");
|
jsonAttr.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
|
||||||
attrTab.update(jsonAttr);
|
jsonAttr.put("storagevehicle_code","");
|
||||||
|
attrTab.update(jsonAttr);
|
||||||
|
|
||||||
// 更新终点仓位
|
// 生成对接位到异常口的任务
|
||||||
JSONObject jsonAttr1 = attrTab.query("struct_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
JSONObject param = new JSONObject();
|
||||||
jsonAttr1.put("lock_type",IOSEnum.LOCK_TYPE.code("其它"));
|
param.put("start_device_code", jsonTask.getString("point_code2"));
|
||||||
attrTab.update(jsonAttr1);
|
param.put("next_device_code", IOSEnum.EXCEP_OUT.code("异常出库口"));
|
||||||
|
param.put("task_type", "010712");
|
||||||
|
param.put("vehicle_code",IOSEnum.IS_NOTANDYES.code("是"));
|
||||||
|
createTask(param);
|
||||||
|
immediateNotifyAcs(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消
|
// 取消
|
||||||
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
|
throw new BadRequestException("异常任务不允许取消!");
|
||||||
if (taskObj.getIntValue("task_status") > Integer.valueOf(TaskStatusEnum.ISSUE.getCode())) {
|
|
||||||
throw new BadRequestException("任务已执行不能取消");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新任务表删除字段
|
|
||||||
map.put("is_delete", IOSEnum.IS_NOTANDYES.code("是"));
|
|
||||||
|
|
||||||
// 解锁起点仓位
|
|
||||||
JSONObject jsonAttr = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
|
||||||
jsonAttr.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
|
|
||||||
attrTab.update(jsonAttr);
|
|
||||||
|
|
||||||
// 解锁终点仓位
|
|
||||||
JSONObject jsonAttr1 = attrTab.query("struct_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
|
||||||
jsonAttr1.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
|
|
||||||
attrTab.update(jsonAttr1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put("update_optid", SecurityUtils.getCurrentUserId());
|
map.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
|
|||||||
@@ -9,19 +9,12 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
|
||||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
|
||||||
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvOutMapper;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
@@ -31,7 +24,6 @@ import org.nl.wms.sch.AcsTaskDto;
|
|||||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -62,6 +54,12 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMdpbBoxtypeService iMdpbBoxtypeService;
|
private IMdpbBoxtypeService iMdpbBoxtypeService;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 出入库主表mapper
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private StIvtIostorinvOutMapper stIvtIostorinvOutMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AcsTaskDto> addTask() {
|
public List<AcsTaskDto> addTask() {
|
||||||
/*
|
/*
|
||||||
@@ -116,11 +114,21 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interaction_json.put("bindingTimes", boxTypeDao.getLash_num_tow());
|
interaction_json.put("bindingTimes", boxTypeDao.getLash_num_tow());
|
||||||
// 是否二次捆扎
|
// 是否二次捆扎: 如果是返检或者反切的则不需要捆扎(找最近的木箱出库单据)
|
||||||
if (ObjectUtil.isEmpty(boxTypeDao.getNeed_lash_two())) {
|
if (ObjectUtil.isEmpty(boxTypeDao.getNeed_lash_two())) {
|
||||||
throw new BadRequestException("是否第二次捆扎不能为空!");
|
throw new BadRequestException("是否第二次捆扎不能为空!");
|
||||||
}
|
}
|
||||||
interaction_json.put("isBinding", boxTypeDao.getNeed_lash_two());
|
String isBinding = boxTypeDao.getNeed_lash_two();
|
||||||
|
|
||||||
|
JSONObject jsonMst = stIvtIostorinvOutMapper.queryBoxOutInfo(json.getString("vehicle_code"));
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonMst)) {
|
||||||
|
if (jsonMst.getString("bill_type").equals(IOSEnum.OUT_TYPE.code("改切出库"))
|
||||||
|
|| jsonMst.getString("bill_type").equals(IOSEnum.OUT_TYPE.code("返检出库"))) {
|
||||||
|
isBinding = IOSEnum.IS_NOTANDYES.code("否");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
interaction_json.put("isBinding", isBinding);
|
||||||
|
|
||||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
||||||
AcsTaskDto dto = AcsTaskDto.builder()
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
.ext_task_id(json.getString("task_id"))
|
.ext_task_id(json.getString("task_id"))
|
||||||
|
|||||||
@@ -112,16 +112,25 @@ public class TwoOutHeapTask extends AbstractAcsTask {
|
|||||||
jsonTask.put("update_time", DateUtil.now());
|
jsonTask.put("update_time", DateUtil.now());
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
|
|
||||||
// 下发桁架任务:捆扎
|
// 如果是异常出库口则不需要下发行架任务
|
||||||
JSONObject jsonParam = new JSONObject();
|
if (jsonTask.getString("point_code2").equals(IOSEnum.EXCEP_OUT.code("异常出库口"))) {
|
||||||
jsonParam.put("device_code", jsonTask.getString("point_code2"));
|
// 解绑托盘对应关系
|
||||||
jsonParam.put("vehicle_code", jsonTask.getString("vehicle_code"));
|
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||||
jsonParam.put("task_group_id", jsonTask.getString("task_group_id"));
|
JSONObject ext_jo = veExtTab.query("pcsn = '" + jsonTask.getString("vehicle_code") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(ext_jo)) {
|
||||||
LashManageServiceImpl bean1 = SpringContextHolder.getBean(LashManageServiceImpl.class);
|
ext_jo.put("pcsn", "");
|
||||||
bean1.createLashTask(jsonParam);
|
veExtTab.update(ext_jo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 下发桁架任务:捆扎
|
||||||
|
JSONObject jsonParam = new JSONObject();
|
||||||
|
jsonParam.put("device_code", jsonTask.getString("point_code2"));
|
||||||
|
jsonParam.put("vehicle_code", jsonTask.getString("vehicle_code"));
|
||||||
|
jsonParam.put("task_group_id", jsonTask.getString("task_group_id"));
|
||||||
|
|
||||||
|
LashManageServiceImpl bean1 = SpringContextHolder.getBean(LashManageServiceImpl.class);
|
||||||
|
bean1.createLashTask(jsonParam);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
|
|||||||
point1 = cutpointivtService.getPintByUpOrDownCode(pointCode2, false);
|
point1 = cutpointivtService.getPintByUpOrDownCode(pointCode2, false);
|
||||||
point2 = bcutpointivtService.getPintByTrussCode(pointCode1, false);
|
point2 = bcutpointivtService.getPintByTrussCode(pointCode1, false);
|
||||||
}
|
}
|
||||||
|
log.info("起点数据:{}", point1);
|
||||||
|
log.info("终点数据:{}", point2);
|
||||||
String tmpUpQzzNo = point1.getUp_qzzno();
|
String tmpUpQzzNo = point1.getUp_qzzno();
|
||||||
String tmpDownQzzNo = point1.getDown_qzzno();
|
String tmpDownQzzNo = point1.getDown_qzzno();
|
||||||
// 更新分切计划
|
// 更新分切计划
|
||||||
@@ -112,6 +114,7 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
|
|||||||
TaskUtils.updateOptMessageBySlitterPlan(p);
|
TaskUtils.updateOptMessageBySlitterPlan(p);
|
||||||
List<String> downQzzNos = Stream.of(tmpUpQzzNo, tmpDownQzzNo)
|
List<String> downQzzNos = Stream.of(tmpUpQzzNo, tmpDownQzzNo)
|
||||||
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
||||||
|
log.info("即将下卷的上下轴的气胀轴编码数据:{}", downQzzNos);
|
||||||
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getQzzno, downQzzNos));
|
.in(PdmBiSlittingproductionplan::getQzzno, downQzzNos));
|
||||||
// 上去的分切计划状态:04 -> 05
|
// 上去的分切计划状态:04 -> 05
|
||||||
@@ -119,6 +122,7 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
|
|||||||
p.setEnd_time("");
|
p.setEnd_time("");
|
||||||
List<String> upQzzNos = Stream.of(point2.getQzz_no1(), point2.getQzz_no2())
|
List<String> upQzzNos = Stream.of(point2.getQzz_no1(), point2.getQzz_no2())
|
||||||
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
||||||
|
log.info("即将上卷的气胀轴编码数据:{}", upQzzNos);
|
||||||
if (upQzzNos.size() > 0) {
|
if (upQzzNos.size() > 0) {
|
||||||
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
slittingproductionplanService.update(p, new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getQzzno, upQzzNos));
|
.in(PdmBiSlittingproductionplan::getQzzno, upQzzNos));
|
||||||
@@ -146,6 +150,10 @@ public class SlitterDownTrussTask extends AbstractAcsTask {
|
|||||||
StIvtCutpointivt point1 = cutpointivtService.getPintByUpOrDownCode(pointCode1, false);
|
StIvtCutpointivt point1 = cutpointivtService.getPintByUpOrDownCode(pointCode1, false);
|
||||||
String pointCode2 = task.getPoint_code2();
|
String pointCode2 = task.getPoint_code2();
|
||||||
BstIvtCutpointivt point2 = bcutpointivtService.getPintByTrussCode(pointCode2, false);
|
BstIvtCutpointivt point2 = bcutpointivtService.getPintByTrussCode(pointCode2, false);
|
||||||
|
if (ObjectUtil.isEmpty(point1)) {
|
||||||
|
point1 = cutpointivtService.getPintByUpOrDownCode(pointCode2, false);
|
||||||
|
point2 = bcutpointivtService.getPintByTrussCode(pointCode1, false);
|
||||||
|
}
|
||||||
String tmpUpQzzNo = point1.getUp_qzzno();
|
String tmpUpQzzNo = point1.getUp_qzzno();
|
||||||
String tmpDownQzzNo = point1.getDown_qzzno();
|
String tmpDownQzzNo = point1.getDown_qzzno();
|
||||||
// 更新分切计划
|
// 更新分切计划
|
||||||
|
|||||||
@@ -453,6 +453,7 @@ public class AutoCallAirShaftTask {
|
|||||||
* @param specification 代数(4、5)
|
* @param specification 代数(4、5)
|
||||||
*/
|
*/
|
||||||
private void makePullShaft(BstIvtShafttubeivt empty, String specification) {
|
private void makePullShaft(BstIvtShafttubeivt empty, String specification) {
|
||||||
|
log.info("不需要套轴,只做拔轴!");
|
||||||
List<BstIvtCutpointivt> notTaskPoints = bcutpointivtService.getAreaNotTaskPointByLocationAreaAndStatus(empty.getPoint_location());
|
List<BstIvtCutpointivt> notTaskPoints = bcutpointivtService.getAreaNotTaskPointByLocationAreaAndStatus(empty.getPoint_location());
|
||||||
if (notTaskPoints.size() == 0) {
|
if (notTaskPoints.size() == 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ public class AutoSendAirShaftAgvTask {
|
|||||||
// 获取分切计划
|
// 获取分切计划
|
||||||
List<String> collect = Stream.of(cutPoint.getQzz_no1(), cutPoint.getQzz_no2())
|
List<String> collect = Stream.of(cutPoint.getQzz_no1(), cutPoint.getQzz_no2())
|
||||||
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
||||||
|
if (collect.size() == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// 最多4条分切计划
|
// 最多4条分切计划
|
||||||
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getQzzno, collect)
|
.in(PdmBiSlittingproductionplan::getQzzno, collect)
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ public class AutoUpShaftTrussTask {
|
|||||||
// 获取下一组分切计划
|
// 获取下一组分切计划
|
||||||
List<String> qzzNos = Stream.of(newCutPoint.getQzz_no1(), newCutPoint.getQzz_no2())
|
List<String> qzzNos = Stream.of(newCutPoint.getQzz_no1(), newCutPoint.getQzz_no2())
|
||||||
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
.filter(value -> value != null && !value.isEmpty()).collect(Collectors.toList());
|
||||||
|
if (qzzNos.size() == 0) {
|
||||||
|
log.warn("{} - 气胀轴编码未找到,跳到下一个点位!", newCutPoint);
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<PdmBiSlittingproductionplan> nextPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
List<PdmBiSlittingproductionplan> nextPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getQzzno, qzzNos)
|
.in(PdmBiSlittingproductionplan::getQzzno, qzzNos)
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -497,7 +498,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
||||||
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
||||||
log.info("获取下一组分切计划:{}", timePlans);
|
log.info("获取下一组分切计划(可能存在脏数据):{}", timePlans);
|
||||||
// 寻找备好轴的对接点位
|
// 寻找备好轴的对接点位
|
||||||
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(device.getExt_code());
|
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(device.getExt_code());
|
||||||
// 任务参数
|
// 任务参数
|
||||||
@@ -562,8 +563,11 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
PdmBiSlittingproductionplan tmpPlan = timePlans.get(0);
|
PdmBiSlittingproductionplan tmpPlan = timePlans.get(0);
|
||||||
// hint: 以第一条为准,过滤和第一条同组同母卷的分切计划
|
// hint: 以第一条为准,过滤和第一条同组同母卷的分切计划
|
||||||
List<PdmBiSlittingproductionplan> nextPlans = timePlans.stream()
|
List<PdmBiSlittingproductionplan> nextPlans = timePlans.stream()
|
||||||
.filter(plan -> plan.getParent_container_name().equals(tmpPlan.getParent_container_name()) && plan.getSplit_group().equals(tmpPlan.getSplit_group()))
|
.filter(plan -> plan.getParent_container_name().equals(tmpPlan.getParent_container_name())
|
||||||
|
&& plan.getRestruct_container_name().equals(tmpPlan.getRestruct_container_name())
|
||||||
|
&& plan.getSplit_group().equals(tmpPlan.getSplit_group()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
log.info("获取下一趟分切计划数据:{}", nextPlans);
|
||||||
// 筛选上下轴各一条
|
// 筛选上下轴各一条
|
||||||
PdmBiSlittingproductionplan nextUpPlan = nextPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
|
PdmBiSlittingproductionplan nextUpPlan = nextPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||||
PdmBiSlittingproductionplan nextDownPlan = nextPlans.stream().filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
|
PdmBiSlittingproductionplan nextDownPlan = nextPlans.stream().filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||||
@@ -736,6 +740,9 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
plan = plans.stream().filter(p -> SlitterConstant.SLITTER_SUB_VOLUME_RIGHT.equals(p.getLeft_or_right())).findFirst().orElse(null);
|
plan = plans.stream().filter(p -> SlitterConstant.SLITTER_SUB_VOLUME_RIGHT.equals(p.getLeft_or_right())).findFirst().orElse(null);
|
||||||
} else {
|
} else {
|
||||||
plan = plans.stream().filter(p -> SlitterConstant.SLITTER_SUB_VOLUME_LEFT.equals(p.getLeft_or_right())).findFirst().orElse(null);
|
plan = plans.stream().filter(p -> SlitterConstant.SLITTER_SUB_VOLUME_LEFT.equals(p.getLeft_or_right())).findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(plan)) {
|
||||||
|
plan = plans.stream().filter(p -> SlitterConstant.SLITTER_SUB_VOLUME_RIGHT.equals(p.getLeft_or_right())).findFirst().orElse(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (plan == null) {
|
if (plan == null) {
|
||||||
log.error("设备{}, 找不到气胀轴编码{}对应的分切计划!参数:{}", deviceCode, qzzNo, param);
|
log.error("设备{}, 找不到气胀轴编码{}对应的分切计划!参数:{}", deviceCode, qzzNo, param);
|
||||||
@@ -744,6 +751,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
if (ObjectUtil.isEmpty(plan.getLevel())) {
|
if (ObjectUtil.isEmpty(plan.getLevel())) {
|
||||||
throw new BadRequestException("子卷[" + plan.getContainer_name() + "]对应的级别不能为空");
|
throw new BadRequestException("子卷[" + plan.getContainer_name() + "]对应的级别不能为空");
|
||||||
}
|
}
|
||||||
|
log.info("分切计划数据:{}", plan);
|
||||||
// plan.setLevel("4");
|
// plan.setLevel("4");
|
||||||
String point_type = "5".equals(plan.getLevel()) ? "5" : "4";
|
String point_type = "5".equals(plan.getLevel()) ? "5" : "4";
|
||||||
// 查找终点 确认是废箔还是成品: 根据分切计划的子卷等级来区分,5为报废
|
// 查找终点 确认是废箔还是成品: 根据分切计划的子卷等级来区分,5为报废
|
||||||
@@ -947,6 +955,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject acsActionFinishRequestToRelease(JSONObject param) {
|
public JSONObject acsActionFinishRequestToRelease(JSONObject param) {
|
||||||
|
log.info("ACS请求取货完成参数:{}", param);
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("status", HttpStatus.HTTP_OK);
|
result.put("status", HttpStatus.HTTP_OK);
|
||||||
result.put("message", "反馈取货成功!");
|
result.put("message", "反馈取货成功!");
|
||||||
@@ -1373,7 +1382,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
String area = deviceCode.getProduct_area();
|
String area = deviceCode.getProduct_area();
|
||||||
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
||||||
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
// hint: 获取到的分切可能是不同组的但具有一定时间顺序, 可能是以前的脏数据
|
||||||
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
||||||
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.eq(PdmBiSlittingproductionplan::getResource_name, deviceCode.getExt_code())
|
.eq(PdmBiSlittingproductionplan::getResource_name, deviceCode.getExt_code())
|
||||||
@@ -1389,7 +1398,14 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
} else {
|
} else {
|
||||||
// 找到该分切计划的点位
|
// 找到该分切计划的点位
|
||||||
BstIvtCutpointivt newCutPoint = cutPointList.get(0);
|
BstIvtCutpointivt newCutPoint = cutPointList.get(0);
|
||||||
String collect = timePlans.stream()
|
List<String> qzzNos = Stream.of(newCutPoint.getQzz_no1(), newCutPoint.getQzz_no2())
|
||||||
|
.filter(value -> value != null && !value.isEmpty())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<PdmBiSlittingproductionplan> nextPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
|
.in(PdmBiSlittingproductionplan::getQzzno, qzzNos)
|
||||||
|
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||||
|
.eq(PdmBiSlittingproductionplan::getIs_delete, "0"));
|
||||||
|
String collect = nextPlans.stream()
|
||||||
.map(PdmBiSlittingproductionplan::getContainer_name)
|
.map(PdmBiSlittingproductionplan::getContainer_name)
|
||||||
.filter(ObjectUtil::isNotEmpty)
|
.filter(ObjectUtil::isNotEmpty)
|
||||||
.collect(Collectors.joining(","));
|
.collect(Collectors.joining(","));
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public enum IOSEnum {
|
|||||||
"空托盘出库锁", "4", "空托盘入库锁", "5",
|
"空托盘出库锁", "4", "空托盘入库锁", "5",
|
||||||
"移出锁", "6", "移入锁", "7","木箱入库锁","8",
|
"移出锁", "6", "移入锁", "7","木箱入库锁","8",
|
||||||
"木箱出库锁","9","出库异常锁","10",
|
"木箱出库锁","9","出库异常锁","10",
|
||||||
"货位异常锁", "11","其它", "99"
|
"货位异常锁", "11","货位异常出库锁", "12","其它", "99"
|
||||||
)),
|
)),
|
||||||
|
|
||||||
//仓库id
|
//仓库id
|
||||||
@@ -115,6 +115,9 @@ public enum IOSEnum {
|
|||||||
|
|
||||||
// acs外部系统用户
|
// acs外部系统用户
|
||||||
EXT_ACS(MapOf.of("acs", "2","kc","康成")),
|
EXT_ACS(MapOf.of("acs", "2","kc","康成")),
|
||||||
|
|
||||||
|
// 异常出库口
|
||||||
|
EXCEP_OUT(MapOf.of("异常出库口", "CK2001")),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Map<String, String> code;
|
private Map<String, String> code;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper;
|
package org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
@@ -18,4 +19,10 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface StIvtIostorinvOutMapper extends BaseMapper<StIvtIostorinv> {
|
public interface StIvtIostorinvOutMapper extends BaseMapper<StIvtIostorinv> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据木箱号查找最近出库的木箱
|
||||||
|
* @param box_no: 木箱号
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject queryBoxOutInfo(String box_no);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvOutMapper">
|
<mapper namespace="org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvOutMapper">
|
||||||
|
<select id="queryBoxOutInfo" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
mst.bill_code,
|
||||||
|
mst.bill_type,
|
||||||
|
dis.box_no
|
||||||
|
FROM
|
||||||
|
st_ivt_iostorinvdis dis
|
||||||
|
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||||
|
WHERE
|
||||||
|
dis.box_no = #{box_no}
|
||||||
|
AND mst.io_type = '1'
|
||||||
|
AND mst.is_delete = '0'
|
||||||
|
ORDER BY mst.input_time DESC
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -411,6 +411,9 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
jsonParam.put("box_length", boxDao.getBox_length());
|
jsonParam.put("box_length", boxDao.getBox_length());
|
||||||
jsonParam.put("box_width", boxDao.getBox_width());
|
jsonParam.put("box_width", boxDao.getBox_width());
|
||||||
jsonParam.put("box_high", boxDao.getBox_high());
|
jsonParam.put("box_high", boxDao.getBox_high());
|
||||||
|
jsonParam.put("height", jsonAttr.getString("height"));
|
||||||
|
jsonParam.put("vehicle_type", jsonAttr.getString("storagevehicle_type"));
|
||||||
|
jsonParam.put("move_block_num", jsonAttr.getString("block_num"));
|
||||||
|
|
||||||
// 调用找货位方法
|
// 调用找货位方法
|
||||||
JSONObject jsonAttrNow = getStruct(jsonParam);
|
JSONObject jsonAttrNow = getStruct(jsonParam);
|
||||||
@@ -529,12 +532,25 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
* 判断是否有仓位
|
* 判断是否有仓位
|
||||||
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具
|
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具
|
||||||
*/
|
*/
|
||||||
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
String block_num = jsonParam.getString("move_block_num");
|
||||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
|
||||||
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
JSONArray structArray = new JSONArray();
|
||||||
"AND height = '" + jsonParam.getString("height") + "'" +
|
|
||||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
if (ObjectUtil.isEmpty(block_num)) {
|
||||||
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
|
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
||||||
|
"AND height = '" + jsonParam.getString("height") + "'" +
|
||||||
|
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
||||||
|
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
||||||
|
} else {
|
||||||
|
structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
|
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
||||||
|
"AND height = '" + jsonParam.getString("height") + "'" +
|
||||||
|
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
||||||
|
"AND sect_id = '" + jsonParam.getString("sect_id") + "' AND block_num = '"+block_num+"'").getResultJSONArray(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(structArray)) {
|
if (ObjectUtil.isEmpty(structArray)) {
|
||||||
notInRowList.clear();
|
notInRowList.clear();
|
||||||
@@ -543,7 +559,10 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 确定巷道:查看每个巷道最小木箱数的巷道,获取最小木箱数的巷道
|
// 确定巷道:查看每个巷道最小木箱数的巷道,获取最小木箱数的巷道
|
||||||
String block_num = getMinBlock(jsonParam);
|
// 不是移库则需要找新巷道
|
||||||
|
if (ObjectUtil.isEmpty(block_num)) {
|
||||||
|
block_num = getMinBlock(jsonParam);
|
||||||
|
}
|
||||||
|
|
||||||
// 确定排:查看每排的木箱数量,找到数量最小的那排
|
// 确定排:查看每排的木箱数量,找到数量最小的那排
|
||||||
jsonParam.put("block_num", block_num);
|
jsonParam.put("block_num", block_num);
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ public class InVehicleManageServiceImpl implements InVehicleManageService {
|
|||||||
JSONObject jsonParam = new JSONObject();
|
JSONObject jsonParam = new JSONObject();
|
||||||
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||||
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
||||||
jsonParam.put("vehicle_type", taskDao.getVehicle_type());
|
jsonParam.put("vehicle_type", jsonAttr.getString("storagevehicle_type"));
|
||||||
|
jsonParam.put("move_block_num", jsonAttr.getString("block_num"));
|
||||||
|
|
||||||
// 调用找货位方法
|
// 调用找货位方法
|
||||||
JSONObject jsonAttrNow = getStruct(jsonParam);
|
JSONObject jsonAttrNow = getStruct(jsonParam);
|
||||||
@@ -166,12 +167,24 @@ public class InVehicleManageServiceImpl implements InVehicleManageService {
|
|||||||
* 判断是否有仓位
|
* 判断是否有仓位
|
||||||
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具
|
* 判断条件:库区、仓库、是否启用、是否删除、未锁定、没有载具
|
||||||
*/
|
*/
|
||||||
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
String block_num = jsonParam.getString("move_block_num");
|
||||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
|
||||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
JSONArray structArray = new JSONArray();
|
||||||
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
if (ObjectUtil.isEmpty(block_num)) {
|
||||||
"AND height = '2'" +
|
structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
|
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
||||||
|
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
||||||
|
"AND height = '2'" +
|
||||||
|
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
|
||||||
|
} else {
|
||||||
|
structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
|
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
|
||||||
|
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
|
||||||
|
"AND height = '2'" +
|
||||||
|
"AND sect_id = '" + jsonParam.getString("sect_id") + "' AND block_num = '"+block_num+"'").getResultJSONArray(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(structArray)) {
|
if (ObjectUtil.isEmpty(structArray)) {
|
||||||
notInRowList.clear();
|
notInRowList.clear();
|
||||||
@@ -180,7 +193,10 @@ public class InVehicleManageServiceImpl implements InVehicleManageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 确定巷道:查看每个巷道最小托盘数的巷道,获取最小托盘数的想到
|
// 确定巷道:查看每个巷道最小托盘数的巷道,获取最小托盘数的想到
|
||||||
String block_num = getMinBlock(jsonParam);
|
// 不是移库则需要找新巷道
|
||||||
|
if (ObjectUtil.isEmpty(block_num)) {
|
||||||
|
block_num = getMinBlock(jsonParam);
|
||||||
|
}
|
||||||
|
|
||||||
// 确定排:查看每排的载具数量,找到数量最小的那排
|
// 确定排:查看每排的载具数量,找到数量最小的那排
|
||||||
jsonParam.put("block_num", block_num);
|
jsonParam.put("block_num", block_num);
|
||||||
|
|||||||
@@ -7,12 +7,8 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.hibernate.annotations.Source;
|
|
||||||
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
||||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
||||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
|
||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
|
||||||
import org.nl.b_lms.sch.task.dao.mapper.SchBaseTaskMapper;
|
|
||||||
import org.nl.b_lms.sch.tasks.TwoLashTask;
|
import org.nl.b_lms.sch.tasks.TwoLashTask;
|
||||||
import org.nl.b_lms.sch.tasks.TwoOutHeapTask;
|
import org.nl.b_lms.sch.tasks.TwoOutHeapTask;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
@@ -22,18 +18,20 @@ import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
|||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvOutMapper;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import java.util.ArrayList;
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,6 +71,11 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
*/
|
*/
|
||||||
private final IMdpbBoxtypeService iMdpbBoxtypeService;
|
private final IMdpbBoxtypeService iMdpbBoxtypeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出入库主表服务
|
||||||
|
*/
|
||||||
|
private final StIvtIostorinvOutMapper stIvtIostorinvOutMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void createLashTask(JSONObject whereJson) {
|
public void createLashTask(JSONObject whereJson) {
|
||||||
@@ -230,15 +233,20 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
Map<String, List<JSONObject>> groupPointMap = executeArr.stream()
|
Map<String, List<JSONObject>> groupPointMap = executeArr.stream()
|
||||||
.collect(Collectors.groupingBy(row -> row.getString("point_code2")));
|
.collect(Collectors.groupingBy(row -> row.getString("point_code2")));
|
||||||
|
|
||||||
// 终点
|
// 终点: 如果是异常口则直接生成到异常口的任务
|
||||||
String next_device_code = IOSEnum.OUT_HANGER.code("行架位1");
|
String next_device_code = IOSEnum.OUT_HANGER.code("行架位1");
|
||||||
|
|
||||||
List<JSONObject> heapOne = Optional.ofNullable(groupPointMap.get(IOSEnum.OUT_HANGER.code("行架位1"))).orElse(new ArrayList<>());
|
String TWO_EXCEP = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("TWO_EXCEP").getValue();
|
||||||
List<JSONObject> heapTwo = Optional.ofNullable(groupPointMap.get(IOSEnum.OUT_HANGER.code("行架位2"))).orElse(new ArrayList<>());
|
if (TWO_EXCEP.equals(IOSEnum.IS_NOTANDYES.code("是"))) {
|
||||||
|
next_device_code = IOSEnum.EXCEP_OUT.code("异常出库口");
|
||||||
|
} else {
|
||||||
|
List<JSONObject> heapOne = Optional.ofNullable(groupPointMap.get(IOSEnum.OUT_HANGER.code("行架位1"))).orElse(new ArrayList<>());
|
||||||
|
List<JSONObject> heapTwo = Optional.ofNullable(groupPointMap.get(IOSEnum.OUT_HANGER.code("行架位2"))).orElse(new ArrayList<>());
|
||||||
|
|
||||||
|
|
||||||
if (heapOne.size() > heapTwo.size()) {
|
if (heapOne.size() > heapTwo.size()) {
|
||||||
next_device_code = IOSEnum.OUT_HANGER.code("行架位2");
|
next_device_code = IOSEnum.OUT_HANGER.code("行架位2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询木箱对应的载具
|
// 查询木箱对应的载具
|
||||||
@@ -268,6 +276,8 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
public JSONObject applyTab(JSONObject whereJson) {
|
public JSONObject applyTab(JSONObject whereJson) {
|
||||||
// 载具扩展属性表
|
// 载具扩展属性表
|
||||||
WQLObject extTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
WQLObject extTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||||
|
// 任务表
|
||||||
|
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||||
|
|
||||||
// TODO 贴标流程
|
// TODO 贴标流程
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
@@ -299,11 +309,22 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
result.put("width", boxDao.getBox_width());
|
result.put("width", boxDao.getBox_width());
|
||||||
result.put("height", boxDao.getBox_high());
|
result.put("height", boxDao.getBox_high());
|
||||||
result.put("case", boxDao.getMaterial_code());
|
result.put("case", boxDao.getMaterial_code());
|
||||||
// 是否捆扎
|
|
||||||
|
// 是否捆扎: 如果是返检或者反切的则不需要捆扎(找最近的木箱出库单据)
|
||||||
if (ObjectUtil.isEmpty(boxTypeDao.getNeed_lash_one())) {
|
if (ObjectUtil.isEmpty(boxTypeDao.getNeed_lash_one())) {
|
||||||
throw new BadRequestException("第一次是否捆扎不能为空!");
|
throw new BadRequestException("第一次是否捆扎不能为空!");
|
||||||
}
|
}
|
||||||
result.put("isBinding", boxTypeDao.getNeed_lash_one());
|
String isBinding = boxTypeDao.getNeed_lash_one();
|
||||||
|
|
||||||
|
JSONObject jsonMst = stIvtIostorinvOutMapper.queryBoxOutInfo(boxDao.getBox_no());
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonMst)) {
|
||||||
|
if (jsonMst.getString("bill_type").equals(IOSEnum.OUT_TYPE.code("改切出库"))
|
||||||
|
|| jsonMst.getString("bill_type").equals(IOSEnum.OUT_TYPE.code("返检出库"))) {
|
||||||
|
isBinding = IOSEnum.IS_NOTANDYES.code("否");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.put("isBinding", isBinding);
|
||||||
// TODO 是否贴标
|
// TODO 是否贴标
|
||||||
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
||||||
// TODO 贴标模版
|
// TODO 贴标模版
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.nl.b_lms.sch.tasks.TwoMoveBoxTask;
|
|||||||
import org.nl.b_lms.sch.tasks.TwoOutBoxTask;
|
import org.nl.b_lms.sch.tasks.TwoOutBoxTask;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
@@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -61,6 +63,9 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IschBaseTaskService ischBaseTaskService;
|
private IschBaseTaskService ischBaseTaskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BstIvtBoxinfoMapper bstIvtBoxinfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String outBox(JSONObject whereJson) {
|
public String outBox(JSONObject whereJson) {
|
||||||
@@ -143,7 +148,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
attrTab.update(jsonAttr);
|
attrTab.update(jsonAttr);
|
||||||
|
|
||||||
// 重新分配货位
|
// 重新分配货位
|
||||||
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
BstIvtBoxinfo boxDao = bstIvtBoxinfoMapper.selectOne(
|
||||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
.eq(BstIvtBoxinfo::getBox_no, taskDao.getVehicle_code())
|
.eq(BstIvtBoxinfo::getBox_no, taskDao.getVehicle_code())
|
||||||
);
|
);
|
||||||
@@ -151,9 +156,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
JSONObject jsonParam = new JSONObject();
|
JSONObject jsonParam = new JSONObject();
|
||||||
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
jsonParam.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||||
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
jsonParam.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
||||||
jsonParam.put("box_length", boxDao.getBox_length());
|
jsonParam.put("material_code", boxDao.getMaterial_code());
|
||||||
jsonParam.put("box_width", boxDao.getBox_width());
|
|
||||||
jsonParam.put("box_high", boxDao.getBox_high());
|
|
||||||
jsonParam.put("num", boxDao.getNum());
|
jsonParam.put("num", boxDao.getNum());
|
||||||
|
|
||||||
// 调用找货位方法
|
// 调用找货位方法
|
||||||
@@ -194,26 +197,16 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
|
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询移入货位
|
|
||||||
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' AND block_num = '"+jsonAttrOrder.getString("block_num")+"' order by zdepth DESC")
|
|
||||||
.uniqueResult(0);
|
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonAttrMove)) {
|
|
||||||
throw new BadRequestException("仓库不足!");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 锁住仓位
|
// 锁住仓位
|
||||||
jsonAttrNow.put("lock_type", IOSEnum.LOCK_TYPE.code("其它"));
|
jsonAttrNow.put("lock_type", IOSEnum.LOCK_TYPE.code("货位异常出库锁"));
|
||||||
attrTab.update(jsonAttrNow);
|
attrTab.update(jsonAttrNow);
|
||||||
|
|
||||||
jsonAttrMove.put("lock_type", IOSEnum.LOCK_TYPE.code("其它"));
|
|
||||||
attrTab.update(jsonAttrMove);
|
|
||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject taskParam = new JSONObject();
|
JSONObject taskParam = new JSONObject();
|
||||||
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
||||||
taskParam.put("next_device_code", jsonAttrMove.getString("struct_code"));
|
taskParam.put("next_device_code", IOSEnum.OUT_POINT.code(jsonAttrNow.getString("row_num")));
|
||||||
taskParam.put("task_type", "010712");
|
taskParam.put("task_type", "010712");
|
||||||
|
taskParam.put("vehicle_code",IOSEnum.IS_NOTANDYES.code("否"));
|
||||||
|
|
||||||
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
||||||
String task_id = taskBean.createTask(taskParam);
|
String task_id = taskBean.createTask(taskParam);
|
||||||
@@ -518,15 +511,29 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
} else {
|
} else {
|
||||||
// 判断是否被锁定
|
// 判断是否被锁定
|
||||||
if (lowAttr.get(0).getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("未锁定"))) {
|
if (lowAttr.get(0).getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("未锁定"))) {
|
||||||
// 创建木箱移库单
|
// 判断浅货位木箱和深货位木箱是否相同规格
|
||||||
String task_group_id = createBoxMove(lowAttr.get(0));
|
boolean ifLike = ifLikeBox(json.getString("storagevehicle_code"), lowAttr.get(0).getString("storagevehicle_code"));
|
||||||
|
|
||||||
json.put("task_group_id", task_group_id);
|
if (ifLike) {
|
||||||
jsonAttr = json;
|
// 相同:出浅货位
|
||||||
break;
|
jsonAttr = lowAttr.get(0);
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
// 创建木箱移库单
|
||||||
|
String task_group_id = createBoxMove(lowAttr.get(0));
|
||||||
|
|
||||||
|
json.put("task_group_id", task_group_id);
|
||||||
|
jsonAttr = json;
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
jsonAttr = json;
|
// 判断是否是空木箱出库锁
|
||||||
break;
|
if (lowAttr.get(0).getString("lock_type").equals(IOSEnum.LOCK_TYPE.code("木箱出库锁"))) {
|
||||||
|
jsonAttr = json;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("浅"))) {
|
} else if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("浅"))) {
|
||||||
@@ -540,6 +547,32 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
return jsonAttr;
|
return jsonAttr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断深货位木箱和浅货位木箱规格是否一样
|
||||||
|
* @param deep_box 深货位木箱
|
||||||
|
* @param shallow_box 浅货位木箱
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private boolean ifLikeBox(String deep_box, String shallow_box) {
|
||||||
|
|
||||||
|
boolean flag = false;
|
||||||
|
BstIvtBoxinfo deepBoxDao = bstIvtBoxinfoMapper.selectOne(
|
||||||
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, deep_box)
|
||||||
|
);
|
||||||
|
|
||||||
|
BstIvtBoxinfo shallowBoxDao = bstIvtBoxinfoMapper.selectOne(
|
||||||
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, shallow_box)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (deepBoxDao.getMaterial_code().equals(shallowBoxDao.getMaterial_code())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建木箱移库任务
|
* 创建木箱移库任务
|
||||||
*
|
*
|
||||||
@@ -557,6 +590,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
paramIn.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
paramIn.put("sect_id", RegionTypeEnum.TWO_BZC01.getId());
|
||||||
paramIn.put("vehicle_type", jsonObject.getString("storagevehicle_type"));
|
paramIn.put("vehicle_type", jsonObject.getString("storagevehicle_type"));
|
||||||
paramIn.put("height", jsonObject.getString("height"));
|
paramIn.put("height", jsonObject.getString("height"));
|
||||||
|
paramIn.put("move_block_num", jsonObject.getString("block_num"));
|
||||||
|
|
||||||
InBoxManageServiceImpl bean = SpringContextHolder.getBean(InBoxManageServiceImpl.class);
|
InBoxManageServiceImpl bean = SpringContextHolder.getBean(InBoxManageServiceImpl.class);
|
||||||
JSONObject jsonAttr = bean.getStruct(paramIn);
|
JSONObject jsonAttr = bean.getStruct(paramIn);
|
||||||
|
|||||||
@@ -180,26 +180,16 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
|||||||
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
|
throw new BadRequestException("对应浅货位不存在或未启用!" + jsonTask.getString("point_code1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询移入货位
|
|
||||||
JSONObject jsonAttrMove = attrTab.query("sect_id = '" + jsonAttrOrder.getString("sect_id") + "' and struct_id <> '" + jsonAttrNow.getString("struct_id") + "' and lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' and IFNULL(storagevehicle_code,'') = '' AND is_used = '1' AND is_delete = '0' AND block_num = '"+jsonAttrOrder.getString("block_num")+"' order by zdepth DESC")
|
|
||||||
.uniqueResult(0);
|
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonAttrMove)) {
|
|
||||||
throw new BadRequestException("仓库不足!");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 锁住仓位
|
// 锁住仓位
|
||||||
jsonAttrMove.put("lock_type", IOSEnum.LOCK_TYPE.code("其它"));
|
jsonAttrNow.put("lock_type", IOSEnum.LOCK_TYPE.code("货位异常出库锁"));
|
||||||
attrTab.update(jsonAttrMove);
|
|
||||||
|
|
||||||
jsonAttrNow.put("lock_type", IOSEnum.LOCK_TYPE.code("其它"));
|
|
||||||
attrTab.update(jsonAttrNow);
|
attrTab.update(jsonAttrNow);
|
||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject taskParam = new JSONObject();
|
JSONObject taskParam = new JSONObject();
|
||||||
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
||||||
taskParam.put("next_device_code", jsonAttrMove.getString("struct_code"));
|
taskParam.put("next_device_code", IOSEnum.OUT_POINT.code(jsonAttrNow.getString("row_num")));
|
||||||
taskParam.put("task_type", "010712");
|
taskParam.put("task_type", "010712");
|
||||||
|
taskParam.put("vehicle_code",IOSEnum.IS_NOTANDYES.code("否"));
|
||||||
|
|
||||||
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
||||||
String task_id = taskBean.createTask(taskParam);
|
String task_id = taskBean.createTask(taskParam);
|
||||||
|
|||||||
@@ -2235,7 +2235,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!type.equals("3") && ObjectUtil.isEmpty(point_code)) {
|
if (!type.equals("3") && ObjectUtil.isEmpty(point_code)) {
|
||||||
throw new BadRequestException("点位为空!");
|
throw new BadRequestException("仓位为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
|||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl.*;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl.*;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBussManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBussManageService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||||
@@ -48,6 +49,9 @@ public class CheckOutBillController {
|
|||||||
|
|
||||||
private final SendOutManageServiceImpl sendOutManageService;
|
private final SendOutManageServiceImpl sendOutManageService;
|
||||||
|
|
||||||
|
private final OutBoxManageService outBoxManageService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Log("查询出库单")
|
@Log("查询出库单")
|
||||||
|
|
||||||
@@ -415,7 +419,7 @@ public class CheckOutBillController {
|
|||||||
@Log("木箱出库测试")
|
@Log("木箱出库测试")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> testOutBox(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> testOutBox(@RequestBody JSONObject whereJson) {
|
||||||
new OutBoxManageServiceImpl().outBox(whereJson);
|
outBoxManageService.outBox(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -504,6 +504,8 @@
|
|||||||
<el-table-column prop="split_breadth" label="子卷幅宽" :formatter="crud.formatNum3" />
|
<el-table-column prop="split_breadth" label="子卷幅宽" :formatter="crud.formatNum3" />
|
||||||
<el-table-column prop="split_height" label="子卷理论长度" width="100px" :formatter="crud.formatNum3" />
|
<el-table-column prop="split_height" label="子卷理论长度" width="100px" :formatter="crud.formatNum3" />
|
||||||
<el-table-column prop="split_weight" label="子卷理论重量" width="100px" :formatter="crud.formatNum3" />
|
<el-table-column prop="split_weight" label="子卷理论重量" width="100px" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column prop="weight" label="子卷重量" width="100px" :formatter="crud.formatNum3" />
|
||||||
|
<el-table-column prop="material_type" label="纸管重量" width="100px" :formatter="crud.formatNum3" />
|
||||||
<el-table-column prop="paper_tube_or_frp" label="管件类型" :formatter="formatTubeName" />
|
<el-table-column prop="paper_tube_or_frp" label="管件类型" :formatter="formatTubeName" />
|
||||||
<el-table-column prop="paper_tube_material" label="纸筒物料编码" min-width="140" show-overflow-tooltip />
|
<el-table-column prop="paper_tube_material" label="纸筒物料编码" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column prop="paper_tube_description" label="纸筒物料描述" width="120px" show-overflow-tooltip />
|
<el-table-column prop="paper_tube_description" label="纸筒物料描述" width="120px" show-overflow-tooltip />
|
||||||
|
|||||||
Reference in New Issue
Block a user