rev:测试修改
This commit is contained in:
@@ -158,12 +158,23 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
public PdaResponse groupPlate(JSONObject whereJson) {
|
||||
// 校验载具
|
||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(whereJson.getString("storagevehicle_code"));
|
||||
// 校验此载具是否有入库状态的组盘信息
|
||||
boolean is_in = iMdPbGroupplateService.list(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, vehicleDao.getStoragevehicle_code())
|
||||
).stream()
|
||||
.anyMatch(row -> row.getStatus().equals(IOSEnum.GROUP_PLATE_STATUS.code("入库")));
|
||||
if (is_in) {
|
||||
throw new BadRequestException("当前载具已经入库,请检查数据!【"+whereJson.getString("storagevehicle_code")+"】");
|
||||
}
|
||||
|
||||
// 校验组盘记录
|
||||
GroupPlate groupDao = iMdPbGroupplateService.getById(whereJson.getString("group_id"));
|
||||
if (!groupDao.getStatus().equals(IOSEnum.GROUP_PLATE_STATUS.code("生成"))) {
|
||||
throw new BadRequestException("当前组盘记录不为生成状态!【"+whereJson.getString("group_id")+"】");
|
||||
throw new BadRequestException("当前信息已经组盘!【"+whereJson.getString("group_id")+"】");
|
||||
}
|
||||
// 校验组盘物料批次是否一样
|
||||
|
||||
// 校验组盘物料、批次、原单据号、原单据类型是否一样
|
||||
List<GroupPlate> plateDaoList = iMdPbGroupplateService.list(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("storagevehicle_code"))
|
||||
@@ -172,14 +183,16 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
if (ObjectUtil.isNotEmpty(plateDaoList)) {
|
||||
boolean is_like = plateDaoList.stream()
|
||||
.allMatch(row -> row.getMaterial_id().equals(groupDao.getMaterial_id()) &&
|
||||
row.getPcsn().equals(groupDao.getPcsn())
|
||||
row.getPcsn().equals(groupDao.getPcsn()) &&
|
||||
row.getExt_code().equals(groupDao.getExt_code()) &&
|
||||
row.getExt_type().equals(groupDao.getExt_type())
|
||||
);
|
||||
if (!is_like) {
|
||||
throw new BadRequestException("当前托盘所绑物料批次与当前组盘物料批次不一致!");
|
||||
throw new BadRequestException("当前托盘所绑物料批次或者源单据与当前组盘物料批次不一致!");
|
||||
}
|
||||
}
|
||||
|
||||
// 更新数据
|
||||
// 更新数据组盘数据
|
||||
groupDao.setStoragevehicle_code(vehicleDao.getStoragevehicle_code());
|
||||
groupDao.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("组盘"));
|
||||
iMdPbGroupplateService.updateById(groupDao);
|
||||
@@ -259,6 +272,9 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
jsonMst.put("detail_count", 1);
|
||||
jsonMst.put("bill_type", IOSEnum.BILL_TYPE.code("生产入库"));
|
||||
jsonMst.put("biz_date", DateUtil.now());
|
||||
jsonMst.put("source_id", plateDaoList.get(0).getExt_code());
|
||||
jsonMst.put("source_type", plateDaoList.get(0).getExt_type());
|
||||
|
||||
// 组织明细数据
|
||||
ArrayList<HashMap> tableData = new ArrayList<>();
|
||||
HashMap<String, String> dtl = new HashMap<>();
|
||||
|
||||
@@ -161,6 +161,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
io_mst.put("stor_name", stor_name);
|
||||
io_mst.put("detail_count", rows.size());
|
||||
io_mst.put("remark", whereJson.get("remark"));
|
||||
io_mst.put("source_id", whereJson.get("source_id"));
|
||||
io_mst.put("source_type", whereJson.get("source_type"));
|
||||
io_mst.put("bill_status", whereJson.get("bill_status"));
|
||||
io_mst.put("create_mode", IOSEnum.CREATE_MODE.code("PC产生"));
|
||||
io_mst.put("input_optid", currentUserId + "");
|
||||
|
||||
Reference in New Issue
Block a user