fix:出库强制确认插入包装关系记录表、NG卷接口修改
This commit is contained in:
@@ -221,7 +221,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
throw new BadRequestException("反馈内容有误," + jsonObject.toString());
|
||||
}
|
||||
if (!jsonObject.getBoolean("result")) {
|
||||
throw new BadRequestException("MES查询出当前子卷【" + whereJson.get("container_name") + "】检测结果不能通过,无法进行装箱,MES反馈内容为:【" + jsonObject.getString("rtdat") + "】");
|
||||
throw new BadRequestException("MES查询出当前子卷【" + whereJson.get("container_name") + "】检测结果不通过,无法进行装箱,MES反馈内容为:【" + jsonObject.getString("rtdat") + "】");
|
||||
}
|
||||
// if (ivtList.stream().noneMatch(r -> r.getPoint_status().equals(PackageInfoIvtEnum.POINT_STATUS.code("待检区")))) {
|
||||
// throw new BadRequestException("该子卷不在待检区,请检查!");
|
||||
|
||||
@@ -906,6 +906,9 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
throw new BadRequestException("此子卷不存在或不为入库状态:" + disDao.getPcsn());
|
||||
}
|
||||
|
||||
JSONObject out_sub = subRecordTab.query("container_name = '" + disDao.getPcsn() + "' AND status = '" + SUBEnum.STATUS.code("出库") + "' AND bill_code = '" + mstDao.getBill_code() + "'").uniqueResult(0);
|
||||
//存在任务正常完成,人工点击强制完成的情况
|
||||
if (ObjectUtil.isEmpty(out_sub)) {
|
||||
//插入包装关系出入库记录表
|
||||
jsonSub.put("bill_code", mstDao.getBill_code());
|
||||
jsonSub.put("bill_id", mstDao.getIostorinv_id());
|
||||
@@ -915,6 +918,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
jsonSub.put("record_id", cn.hutool.core.util.IdUtil.getSnowflake(1, 1).nextId());
|
||||
subRecordTab.insert(jsonSub);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 更新子卷包装关系
|
||||
@@ -1130,6 +1134,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 创建调拨入库单
|
||||
*
|
||||
* @param disDaoList:出库分配明细集合
|
||||
* @param mstDao: 出库单据对象
|
||||
*/
|
||||
@@ -1227,6 +1232,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 生成任务前处理
|
||||
*
|
||||
* @param disLikeList: 相同规格木箱、订单、物料的分配明细集合
|
||||
* @param iostorinv_id: 单据标识
|
||||
* @return List<JSONObject> 生成任务的集合
|
||||
@@ -1286,6 +1292,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 生成任务前处理
|
||||
*
|
||||
* @param disLikeList: 相同规格木箱、订单、物料的分配明细集合
|
||||
* @param iostorinv_id: 单据标识
|
||||
* @return List<JSONObject> 生成任务的集合
|
||||
@@ -1345,6 +1352,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 判断是否阻挡
|
||||
*
|
||||
* @param jsonAttr 要出库的仓位
|
||||
* @param attrRowList 相同规格所在排所有仓位
|
||||
* @param iostorinv_id 单据标识
|
||||
@@ -1484,6 +1492,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 判断是否阻挡
|
||||
*
|
||||
* @param jsonAttr 要出库的仓位
|
||||
* @param attrRowList 相同规格所在排所有仓位
|
||||
* @param iostorinv_id 单据标识
|
||||
@@ -1625,6 +1634,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 创建任务
|
||||
*
|
||||
* @param taskMangeList:仓位集合
|
||||
* @param disLikeList:分配明细集合
|
||||
* @param point_code : 终点
|
||||
@@ -1739,8 +1749,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
jsonTaskParam.put("table_fk", disDaoList.get(0).getIostorinv_id().toString());
|
||||
|
||||
if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("浅")) ||
|
||||
json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("无")))
|
||||
{
|
||||
json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("无"))) {
|
||||
jsonTaskParam.put("sort_seq", Integer.parseInt(IOSEnum.ZDEPTH_STRUCT.code("浅")));
|
||||
} else {
|
||||
jsonTaskParam.put("sort_seq", Integer.parseInt(IOSEnum.ZDEPTH_STRUCT.code("深")));
|
||||
@@ -1767,6 +1776,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 创建任务
|
||||
*
|
||||
* @param taskMangeList:仓位集合
|
||||
* @param disLikeList:分配明细集合
|
||||
* @param point_code : 终点
|
||||
@@ -1885,8 +1895,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
jsonTaskParam.put("table_fk", disDaoList.get(0).getIostorinv_id().toString());
|
||||
|
||||
if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("浅")) ||
|
||||
json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("无")))
|
||||
{
|
||||
json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("无"))) {
|
||||
jsonTaskParam.put("sort_seq", Integer.parseInt(IOSEnum.ZDEPTH_STRUCT.code("浅")));
|
||||
} else {
|
||||
jsonTaskParam.put("sort_seq", Integer.parseInt(IOSEnum.ZDEPTH_STRUCT.code("深")));
|
||||
@@ -1913,6 +1922,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 确定终点:根据仓位所在排确定终点
|
||||
*
|
||||
* @param structDao:仓位对象
|
||||
* @return 终点
|
||||
*/
|
||||
@@ -1926,6 +1936,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 更新异常货位
|
||||
*
|
||||
* @param disDaoList:所有分配明细集合
|
||||
*/
|
||||
private void UpdateExceptional(List<StIvtIostorinvdis> disDaoList) {
|
||||
@@ -1974,6 +1985,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 更新主表状态
|
||||
*
|
||||
* @param iostorinv_id 主表标识
|
||||
*/
|
||||
public void updateMstStatus(Long iostorinv_id) {
|
||||
@@ -2105,6 +2117,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 判断是否有异常货位 - 10
|
||||
*
|
||||
* @param disDaoList - 分配明细集合
|
||||
* @return 仓位
|
||||
*/
|
||||
@@ -2172,6 +2185,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
|
||||
/**
|
||||
* 出库下发任务前校验:校验木箱类型数据是否都已经维护
|
||||
*
|
||||
* @param iostorinv_id 主表id
|
||||
*/
|
||||
private void boxCheck(String iostorinv_id) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -1252,6 +1253,10 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
.body(String.valueOf(param))
|
||||
.timeout(time_out)//超时时间,毫秒
|
||||
.execute().body();
|
||||
resultMsg = resultMsg
|
||||
.replace("\\\"", "\"") // 移除字符串转义
|
||||
.replace("\"[", "[") // 修复数组开头
|
||||
.replace("]\"", "]"); // 修复数组结尾
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("GetChildWeightIsSamplePDA接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
@@ -1259,7 +1264,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
if ("E".equals(RTYPE)) {
|
||||
throw new BadRequestException(result.getString("RTMSG"));
|
||||
}
|
||||
JSONObject rtdat = result.getJSONObject("RTDAT");
|
||||
JSONObject rtdat = result.getJSONArray("RTDAT").getJSONObject(0);
|
||||
result.put("result", false);
|
||||
result.put("rtdat", rtdat);
|
||||
if (ObjectUtil.isNotEmpty(rtdat.getString("IsSampleTest")) && ObjectUtil.isNotEmpty(rtdat.getString("SampleCount")) && ObjectUtil.isNotEmpty(rtdat.getString("SampleTestResult"))) {
|
||||
|
||||
Reference in New Issue
Block a user