opt:修改入库木箱获取方式

This commit is contained in:
2024-05-16 17:08:33 +08:00
parent 1971e6ced2
commit 5fbe891da9
5 changed files with 50 additions and 81 deletions

View File

@@ -201,27 +201,32 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
updateWrapper.set("box_group", maxBoxGroup); updateWrapper.set("box_group", maxBoxGroup);
updateWrapper.in("workorder_id", entityList); updateWrapper.in("workorder_id", entityList);
pdmBiSubpackagerelationMapper.update(null, updateWrapper); pdmBiSubpackagerelationMapper.update(null, updateWrapper);
//下发空木箱出库任务 //下发空木箱出库任务
JSONObject boxInfo = new JSONObject(); //outBox(entityList, boxType);
//todo 测试暂时默认ZXQ_1_1 //下发装箱区桁架任务
boxInfo.put("device_code", "ZXQ_1_1");
boxInfo.put("material_code", boxType);
boxInfo.put("num", entityList.size());
String boxSn = outBoxManageService.outBox(boxInfo);
if (StringUtils.isBlank(boxSn)) {
throw new BadRequestException("满轴缓存位 -> 待检区,木箱码不能为空!");
}
//更新子卷包装关系更新木箱号
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper1 = new UpdateWrapper<>();
updateWrapper1.set("package_box_sn", boxSn);
updateWrapper1.in("workorder_id", entityList);
pdmBiSubpackagerelationMapper.update(null, updateWrapper1);
transferToPacking(packagerelationList); transferToPacking(packagerelationList);
} catch (Exception e) { } catch (Exception e) {
throw new BadRequestException(e.getMessage()); throw new BadRequestException(e.getMessage());
} }
} }
private void outBox(List<String> entityList, String boxType) {
JSONObject boxInfo = new JSONObject();
//todo 测试暂时默认ZXQ_1_1
boxInfo.put("device_code", "ZXQ_1_1");
boxInfo.put("material_code", boxType);
boxInfo.put("num", entityList.size());
String boxSn = outBoxManageService.outBox(boxInfo);
if (StringUtils.isBlank(boxSn)) {
throw new BadRequestException("满轴缓存位 -> 待检区,木箱码不能为空!");
}
//更新子卷包装关系更新木箱号
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper1 = new UpdateWrapper<>();
updateWrapper1.set("package_box_sn", boxSn);
updateWrapper1.in("workorder_id", entityList);
pdmBiSubpackagerelationMapper.update(null, updateWrapper1);
}
private void transferToPacking(List<PdmBiSubpackagerelation> packagerelationList) { private void transferToPacking(List<PdmBiSubpackagerelation> packagerelationList) {
//创建子卷搬运到装箱区任务 //创建子卷搬运到装箱区任务
// List<BstIvtPackageinfoivt> zxqPointList = packageinfoivtService // List<BstIvtPackageinfoivt> zxqPointList = packageinfoivtService

View File

@@ -263,35 +263,26 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr"); WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
// 库区表 // 库区表
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr"); WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 参数类型转换 Map-> JSONObject // 参数类型转换 Map-> JSONObject
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(whereJson)); JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(whereJson));
// 分配明细集合 // 分配明细集合
ArrayList<HashMap> list = (ArrayList<HashMap>) whereJson.get("tableMater"); ArrayList<HashMap> list = (ArrayList<HashMap>) whereJson.get("tableMater");
// 类型转换linkenHashMap -> JSONObject // 类型转换linkenHashMap -> JSONObject
JSONObject jsonDis = list.stream() JSONObject jsonDis = list.stream()
.map(row -> JSONObject.parseObject(JSON.toJSONString(row))) .map(row -> JSONObject.parseObject(JSON.toJSONString(row)))
.collect(Collectors.toList()).get(0); .collect(Collectors.toList()).get(0);
// 判断当前木箱是否已经分配过货位 // 判断当前木箱是否已经分配过货位
StIvtIostorinvdis disDao = iStIvtIostorinvdisService.getById(jsonDis.getString("iostorinvdis_id")); StIvtIostorinvdis disDao = iStIvtIostorinvdisService.getById(jsonDis.getString("iostorinvdis_id"));
if (ObjectUtil.isNotEmpty(disDao.getStruct_id())) { if (ObjectUtil.isNotEmpty(disDao.getStruct_id())) {
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!"); throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
} }
// 主表实体类 // 主表实体类
StIvtIostorinv mstDao = this.getById(disDao.getIostorinv_id()); StIvtIostorinv mstDao = this.getById(disDao.getIostorinv_id());
// 用于锁定货位 // 用于锁定货位
JSONObject jsonLock = new JSONObject(); JSONObject jsonLock = new JSONObject();
ArrayList<String> paramLockList = new ArrayList<>(); ArrayList<String> paramLockList = new ArrayList<>();
// 仓位对象 // 仓位对象
JSONObject jsonAttr; JSONObject jsonAttr;
// 是否自动分配货位 // 是否自动分配货位
Boolean checked = jsonObject.getBoolean("checked"); Boolean checked = jsonObject.getBoolean("checked");
if (ObjectUtil.isNotEmpty(checked) && checked) { if (ObjectUtil.isNotEmpty(checked) && checked) {
@@ -301,11 +292,12 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
attrParam.put("sect_id", jsonObject.getString("sect_id")); attrParam.put("sect_id", jsonObject.getString("sect_id"));
attrParam.put("material_id", disDao.getMaterial_id()); attrParam.put("material_id", disDao.getMaterial_id());
attrParam.put("box_no", disDao.getBox_no()); attrParam.put("box_no", disDao.getBox_no());
// 查询木箱信息 BstIvtBoxinfo boxDao = getBstIvtBoxinfo(whereJson);
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( if (boxDao == null) {
new QueryWrapper<BstIvtBoxinfo>().lambda() throw new BadRequestException("未找到该木箱信息!");
.eq(BstIvtBoxinfo::getBox_no, disDao.getBox_no()) }
); jsonObject.put("box_no",boxDao.getBox_no());
jsonObject.put("vehicle_type",boxDao.getVehicle_type());
attrParam.put("vehicle_type", boxDao.getVehicle_type()); attrParam.put("vehicle_type", boxDao.getVehicle_type());
//根据木箱高度,判断入库仓位的高度 //根据木箱高度,判断入库仓位的高度
String height = ""; String height = "";
@@ -320,9 +312,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
height = "3"; height = "3";
} }
attrParam.put("height", height); attrParam.put("height", height);
JSONObject jsonSect = sectTab.query("sect_id = '" + jsonObject.getString("sect_id") + "'").uniqueResult(0); JSONObject jsonSect = sectTab.query("sect_id = '" + jsonObject.getString("sect_id") + "'").uniqueResult(0);
// 判断是否是虚拟区 // 判断是否是虚拟区
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) { if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
jsonAttr = attrTab.query("sect_id = '" + jsonObject.getString("sect_id") + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0); jsonAttr = attrTab.query("sect_id = '" + jsonObject.getString("sect_id") + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
@@ -333,25 +323,20 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
// 指定分配 // 指定分配
jsonAttr = attrTab.query("struct_id = '" + jsonDis.getString("struct_id") + "'").uniqueResult(0); jsonAttr = attrTab.query("struct_id = '" + jsonDis.getString("struct_id") + "'").uniqueResult(0);
} }
if (ObjectUtil.isEmpty(jsonAttr)) { if (ObjectUtil.isEmpty(jsonAttr)) {
throw new BadRequestException("没有可用仓位!"); throw new BadRequestException("没有可用仓位!");
} }
// 调用业务处理类锁定货位 // 调用业务处理类锁定货位
paramLockList.add(jsonAttr.getString("struct_code")); paramLockList.add(jsonAttr.getString("struct_code"));
jsonLock.put("inv_type", mstDao.getBill_type()); jsonLock.put("inv_type", mstDao.getBill_type());
jsonLock.put("inv_id", mstDao.getIostorinv_id()); jsonLock.put("inv_id", mstDao.getIostorinv_id());
jsonLock.put("inv_code", mstDao.getBill_code()); jsonLock.put("inv_code", mstDao.getBill_code());
jsonLock.put("lock_type", IOSEnum.LOCK_TYPE.code("入库锁")); jsonLock.put("lock_type", IOSEnum.LOCK_TYPE.code("入库锁"));
jsonLock.put("operate", IOSEnum.IO_TYPE.code("入库")); jsonLock.put("operate", IOSEnum.IO_TYPE.code("入库"));
inBussManageService.lockStruct(paramLockList, jsonLock); inBussManageService.lockStruct(paramLockList, jsonLock);
// 判断是否虚拟区 // 判断是否虚拟区
String work_status; String work_status;
Long task_id = null; Long task_id = null;
JSONObject jsonSect = sectTab.query("sect_id = '" + jsonAttr.getString("sect_id") + "'").uniqueResult(0); JSONObject jsonSect = sectTab.query("sect_id = '" + jsonAttr.getString("sect_id") + "'").uniqueResult(0);
if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) { if (jsonSect.getString("sect_type_attr").equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
// 虚拟区:执行状态为完成 // 虚拟区:执行状态为完成
@@ -360,7 +345,6 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
} else { } else {
work_status = IOSEnum.WORK_STATUS.code("未生成"); work_status = IOSEnum.WORK_STATUS.code("未生成");
} }
// 更新分配明细 // 更新分配明细
iStIvtIostorinvdisService.update( iStIvtIostorinvdisService.update(
new UpdateWrapper<StIvtIostorinvdis>().lambda() new UpdateWrapper<StIvtIostorinvdis>().lambda()
@@ -375,7 +359,6 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
.eq(StIvtIostorinvdis::getIostorinv_id, disDao.getIostorinv_id()) .eq(StIvtIostorinvdis::getIostorinv_id, disDao.getIostorinv_id())
.eq(StIvtIostorinvdis::getBox_no, disDao.getBox_no()) .eq(StIvtIostorinvdis::getBox_no, disDao.getBox_no())
); );
// 更新库存 // 更新库存
List<StIvtIostorinvdis> disDaoList = iStIvtIostorinvdisService.list( List<StIvtIostorinvdis> disDaoList = iStIvtIostorinvdisService.list(
new QueryWrapper<StIvtIostorinvdis>().lambda() new QueryWrapper<StIvtIostorinvdis>().lambda()
@@ -383,52 +366,35 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
.eq(StIvtIostorinvdis::getBox_no, disDao.getBox_no()) .eq(StIvtIostorinvdis::getBox_no, disDao.getBox_no())
); );
upateIvt(disDaoList, mstDao, IOSEnum.IVT_CHANGE.code("加待入")); upateIvt(disDaoList, mstDao, IOSEnum.IVT_CHANGE.code("加待入"));
// 更新明细状态 // 更新明细状态
iStIvtIostorinvdtlService.updateStatus(disDao.getIostorinvdtl_id()); iStIvtIostorinvdtlService.updateStatus(disDao.getIostorinvdtl_id());
// 更新主表状态 // 更新主表状态
StIvtIostorinv mst = updateMstStatus(disDao.getIostorinv_id()); StIvtIostorinv mst = updateMstStatus(disDao.getIostorinv_id());
mst.setDis_optid(Long.parseLong(SecurityUtils.getCurrentUserId())); mst.setDis_optid(Long.parseLong(SecurityUtils.getCurrentUserId()));
mst.setDis_optname(SecurityUtils.getCurrentNickName()); mst.setDis_optname(SecurityUtils.getCurrentNickName());
mst.setDis_time(DateUtil.now()); mst.setDis_time(DateUtil.now());
this.updateById(mst); this.updateById(mst);
// 判断是否自动下发任务 // 判断是否自动下发任务
if (jsonObject.getString("is_send").equals(IOSEnum.IS_NOTANDYES.code("")) && ObjectUtil.isNotEmpty(jsonObject.getString("is_send"))) { if (jsonObject.getString("is_send").equals(IOSEnum.IS_NOTANDYES.code("")) && ObjectUtil.isNotEmpty(jsonObject.getString("is_send"))) {
JSONObject jsonSend = new JSONObject(); JSONObject jsonSend = new JSONObject();
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.list( StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.list(
new QueryWrapper<StIvtIostorinvdtl>().lambda() new QueryWrapper<StIvtIostorinvdtl>().lambda()
.eq(StIvtIostorinvdtl::getIostorinv_id, mst.getIostorinv_id()) .eq(StIvtIostorinvdtl::getIostorinv_id, mst.getIostorinv_id())
).get(0); ).get(0);
List<LinkedHashMap> disList = iStIvtIostorinvdisService.list( List<LinkedHashMap> disList = iStIvtIostorinvdisService.list(
new QueryWrapper<StIvtIostorinvdis>().lambda() new QueryWrapper<StIvtIostorinvdis>().lambda()
.eq(StIvtIostorinvdis::getIostorinv_id, mst.getIostorinv_id()) .eq(StIvtIostorinvdis::getIostorinv_id, mst.getIostorinv_id())
).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class)) ).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class))
.collect(Collectors.toList()); .collect(Collectors.toList());
//查询木箱码
PdmBiSubpackagerelation pdmBiSubpackagerelation = ipdmBiSubpackagerelationService.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>()
.eq(PdmBiSubpackagerelation::getContainer_name, whereJson.get("material_barcode")));
// 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn())
);
if (boxDao == null) {
throw new BadRequestException("未找到该木箱信息!");
}
jsonSend.put("dtl_row", JSONObject.parseObject(JSON.toJSONString(dtlDao))); jsonSend.put("dtl_row", JSONObject.parseObject(JSON.toJSONString(dtlDao)));
jsonSend.put("tableMater", disList); jsonSend.put("tableMater", disList);
jsonSend.put("point_code", jsonObject.getString("point_code")); jsonSend.put("point_code", jsonObject.getString("point_code"));
jsonSend.put("stor_id", mst.getStor_id()); jsonSend.put("stor_id", mst.getStor_id());
//成品入库托盘类型 //成品入库托盘类型
jsonSend.put("vehicle_code", boxDao.getBox_no()); jsonSend.put("vehicle_code", jsonObject.getString("box_no"));
jsonSend.put("vehicle_code2", jsonObject.getString("vehicle_code")); jsonSend.put("vehicle_code2", jsonObject.getString("vehicle_code"));
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("containerType", boxDao.getVehicle_type()); param.put("containerType", jsonObject.getString("vehicle_type"));
jsonSend.put("request_param", param.toString()); jsonSend.put("request_param", param.toString());
String task_id1 = this.setPoint(jsonSend); String task_id1 = this.setPoint(jsonSend);
// 下发任务 // 下发任务
@@ -438,6 +404,18 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
} }
} }
private BstIvtBoxinfo getBstIvtBoxinfo(Map whereJson) {
//查询木箱码
PdmBiSubpackagerelation pdmBiSubpackagerelation = ipdmBiSubpackagerelationService.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>()
.eq(PdmBiSubpackagerelation::getContainer_name, whereJson.get("material_barcode")));
// 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn())
);
return boxDao;
}
@Override @Override
@Transactional @Transactional
public void unDivStruct(Map whereJson) { public void unDivStruct(Map whereJson) {

View File

@@ -85,14 +85,18 @@ public class InBoxManageServiceImpl implements InBoxManageService {
WQLObject schBasePointService = WQLObject.getWQLObject("sch_base_point"); WQLObject schBasePointService = WQLObject.getWQLObject("sch_base_point");
// 仓位表 // 仓位表
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr"); WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
String box_arr = whereJson.getString("box_no"); String box_arr = whereJson.getString("box_no");
// 查询木箱信息 // 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda() new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no")) .eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
); );
/* /*
* 找一个木箱区的一个仓位,生成任务并下发 * 找一个木箱区的一个仓位,生成任务并下发
*/ */
@@ -101,13 +105,10 @@ public class InBoxManageServiceImpl implements InBoxManageService {
IOSEnum.IS_NOTANDYES.code("否") + "' AND is_used = '" + IOSEnum.IS_NOTANDYES.code("否") + "' AND is_used = '" +
IOSEnum.IS_NOTANDYES.code("是") + "'") IOSEnum.IS_NOTANDYES.code("是") + "'")
.uniqueResult(0); .uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint)) { if (ObjectUtil.isEmpty(jsonPoint)) {
throw new BadRequestException("起始点位不存在或未启用!"); throw new BadRequestException("起始点位不存在或未启用!");
}*/ }*/
// 找一个木箱区空位 // 找一个木箱区空位
//根据木箱高度,判断入库仓位的高度 //根据木箱高度,判断入库仓位的高度
String height = ""; String height = "";
String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue(); String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue();
@@ -120,7 +121,6 @@ public class InBoxManageServiceImpl implements InBoxManageService {
} else { } else {
height = "3"; height = "3";
} }
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_MX01.getId()); jsonParam.put("sect_id", RegionTypeEnum.TWO_MX01.getId());
@@ -129,17 +129,12 @@ public class InBoxManageServiceImpl implements InBoxManageService {
jsonParam.put("box_high", boxDao.getBox_high()); jsonParam.put("box_high", boxDao.getBox_high());
jsonParam.put("vehicle_type", boxDao.getVehicle_type()); jsonParam.put("vehicle_type", boxDao.getVehicle_type());
jsonParam.put("height", height); jsonParam.put("height", height);
JSONObject jsonAttr = getStruct(jsonParam); JSONObject jsonAttr = getStruct(jsonParam);
if (ObjectUtil.isEmpty(jsonAttr)) { if (ObjectUtil.isEmpty(jsonAttr)) {
notInRowList.clear(); notInRowList.clear();
notInBlockList.clear(); notInBlockList.clear();
throw new BadRequestException("仓位不足!"); throw new BadRequestException("仓位不足!");
} }
// 生成任务 // 生成任务
JSONObject jsonTaskParam = new JSONObject(); JSONObject jsonTaskParam = new JSONObject();
jsonTaskParam.put("task_type", "010702"); jsonTaskParam.put("task_type", "010702");
@@ -150,16 +145,12 @@ public class InBoxManageServiceImpl implements InBoxManageService {
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("containerType", boxDao.getVehicle_type()); param.put("containerType", boxDao.getVehicle_type());
jsonTaskParam.put("request_param", param.toString()); jsonTaskParam.put("request_param", param.toString());
TwoInBoxTask taskBean = new TwoInBoxTask(); TwoInBoxTask taskBean = new TwoInBoxTask();
taskBean.createTask(jsonTaskParam); taskBean.createTask(jsonTaskParam);
taskBean.immediateNotifyAcs(null); taskBean.immediateNotifyAcs(null);
// 锁定终点 // 锁定终点
jsonAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("木箱入库锁")); jsonAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("木箱入库锁"));
attrTab.update(jsonAttr); attrTab.update(jsonAttr);
// 清空缓存 // 清空缓存
notInRowList.clear(); notInRowList.clear();
notInBlockList.clear(); notInBlockList.clear();

View File

@@ -71,7 +71,6 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
WQLObject schBasePointService = WQLObject.getWQLObject("sch_base_point"); WQLObject schBasePointService = WQLObject.getWQLObject("sch_base_point");
// 仓位表 // 仓位表
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr"); WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
whereJson.put("stor_id", IOSEnum.STOR_ID.code("二期")); whereJson.put("stor_id", IOSEnum.STOR_ID.code("二期"));
whereJson.put("sect_id", RegionTypeEnum.TWO_MX01.getId()); whereJson.put("sect_id", RegionTypeEnum.TWO_MX01.getId());
@@ -103,19 +102,15 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
JSONObject request_param = new JSONObject(); JSONObject request_param = new JSONObject();
request_param.put("containerType", jsonAttr.getString("storagevehicle_type")); request_param.put("containerType", jsonAttr.getString("storagevehicle_type"));
jsonTaskParam.put("request_param", request_param.toString()); jsonTaskParam.put("request_param", request_param.toString());
TwoOutBoxTask taskBean = new TwoOutBoxTask(); TwoOutBoxTask taskBean = new TwoOutBoxTask();
taskBean.createTask(jsonTaskParam); taskBean.createTask(jsonTaskParam);
taskBean.immediateNotifyAcs(null); taskBean.immediateNotifyAcs(null);
// 锁定起点 // 锁定起点
jsonAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("木箱出库锁")); jsonAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("木箱出库锁"));
attrTab.update(jsonAttr); attrTab.update(jsonAttr);
// 清空缓存 // 清空缓存
notOutRowList.clear(); notOutRowList.clear();
notOutBlockList.clear(); notOutBlockList.clear();
return jsonAttr.getString("storagevehicle_code"); return jsonAttr.getString("storagevehicle_code");
} }

View File

@@ -108,11 +108,11 @@ public abstract class AbstractAcsTask {
* *
*/ */
public JSONObject immediateNotifyAcs(String task_id) { public JSONObject immediateNotifyAcs(String task_id) {
List<AcsTaskDto> taskList = this.schedule(); // List<AcsTaskDto> taskList = this.schedule();
if (ObjectUtil.isNotEmpty(taskList)) { // if (ObjectUtil.isNotEmpty(taskList)) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList)); // JSONArray arr = JSONArray.parseArray(JSON.toJSONString(taskList));
return AcsUtil.notifyAcs("api/wms/task", arr); // return AcsUtil.notifyAcs("api/wms/task", arr);
} // }
return null; return null;
} }