fix:出库代码优化

This commit is contained in:
zhouz
2024-07-08 17:27:47 +08:00
parent 7ef201a891
commit 313b9182c0
3 changed files with 54 additions and 44 deletions

View File

@@ -61,6 +61,12 @@ public class TwoOutHeapTask extends AbstractAcsTask {
.dtl_type(String.valueOf(dtl_type)) .dtl_type(String.valueOf(dtl_type))
.remark(json.getString("remark")) .remark(json.getString("remark"))
.build(); .build();
if (json.getString("vehicle_code2").contains("A")) {
dto.setRoute_plan_code("two");
} else {
dto.setRoute_plan_code("normal");
}
resultList.add(dto); resultList.add(dto);
// 更新任务为下发 // 更新任务为下发

View File

@@ -2,6 +2,7 @@ package org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; 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;
@@ -257,10 +258,20 @@ public class LashManageServiceImpl implements LashManageService {
// TODO 贴标流程 // TODO 贴标流程
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
String vehicle_code = whereJson.getString("vehicle_code");
//查询托盘对应的载具号
JSONObject vehicle_ext = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_ext)) {
throw new BadRequestException("未查询到托盘对应的扩展属性");
}
String box_no = vehicle_ext.getString("pcsn");
if (StrUtil.isEmpty(box_no)){
throw new BadRequestException("未查询到托盘绑定了相关木箱!");
}
// 查询木箱信息 // 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda() new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("vehicle_code")) .eq(BstIvtBoxinfo::getBox_no, vehicle_ext.getString("box_no"))
); );
// 根据木箱料号查询木箱类型信息 // 根据木箱料号查询木箱类型信息

View File

@@ -1929,8 +1929,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@SneakyThrows @SneakyThrows
@@ -2093,7 +2091,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
log.info("applySendOutTwo输入参数---------------------------------------------" + whereJson.toString()); log.info("applySendOutTwo输入参数---------------------------------------------" + whereJson.toString());
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
try {
// 校验是否是二次分配 // 校验是否是二次分配
if (ObjectUtil.isEmpty(whereJson.getString("task_code"))) { if (ObjectUtil.isEmpty(whereJson.getString("task_code"))) {
// 第一次申请 // 第一次申请
@@ -2115,13 +2112,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
result.put("status", HttpStatus.OK.value()); result.put("status", HttpStatus.OK.value());
result.put("message", "下发成功!"); result.put("message", "下发成功!");
return result; return result;
} catch (Exception e) {
result.put("status", HttpStatus.BAD_REQUEST.value());
result.put("message", e.getMessage());
}
log.info("applySendOutTwo返回参数---------------------------------------------" + result.toString()); //log.info("applySendOutTwo返回参数---------------------------------------------" + result.toString());
return result; // return result;
} }
@Override @Override