fix:入库新增高度要求

This commit is contained in:
zhouz
2024-05-15 20:26:02 +08:00
parent 8eb06a6dcc
commit 10f431ca71
4 changed files with 73 additions and 33 deletions

View File

@@ -39,6 +39,7 @@ import org.nl.modules.common.exception.BadRequestException;
import org.nl.common.utils.CodeUtil; import org.nl.common.utils.CodeUtil;
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.nl.system.service.param.ISysParamService;
import org.nl.wms.basedata.st.service.StorattrService; import org.nl.wms.basedata.st.service.StorattrService;
import org.nl.wms.basedata.st.service.dto.StorattrDto; import org.nl.wms.basedata.st.service.dto.StorattrDto;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl; import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
@@ -113,10 +114,14 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
*/ */
@Autowired @Autowired
private PointService pointService; private PointService pointService;
@Autowired
private ISysParamService iSysParamService;
@Resource @Resource
private IpdmBiSubpackagerelationService ipdmBiSubpackagerelationService; private IpdmBiSubpackagerelationService ipdmBiSubpackagerelationService;
@Override @Override
public Object pageQuery(Map query, Pageable pageQuery) { public Object pageQuery(Map query, Pageable pageQuery) {
Page<Object> page = PageHelper.startPage(pageQuery.getPageNumber() + 1, pageQuery.getPageSize()); Page<Object> page = PageHelper.startPage(pageQuery.getPageNumber() + 1, pageQuery.getPageSize());
@@ -296,6 +301,25 @@ 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 = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, disDao.getBox_no())
);
attrParam.put("vehicle_type", boxDao.getVehicle_type());
//根据木箱高度,判断入库仓位的高度
String height = "";
String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue();
String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue();
String box_high = boxDao.getBox_high();
if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) {
height = "1";
} else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) {
height = "2";
} else {
height = "3";
}
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);
@@ -695,6 +719,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
/** /**
* 更新主表状态 * 更新主表状态
*
* @param iostorinv_id 主表标识 * @param iostorinv_id 主表标识
*/ */
public StIvtIostorinv updateMstStatus(Long iostorinv_id) { public StIvtIostorinv updateMstStatus(Long iostorinv_id) {
@@ -759,6 +784,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
/** /**
* 完成单据:更新主表、明细表、分配明细表、更新库存、更新仓位、更新任务 * 完成单据:更新主表、明细表、分配明细表、更新库存、更新仓位、更新任务
*
* @param mstDao :主表实体类 * @param mstDao :主表实体类
*/ */
private void confirmMst(StIvtIostorinv mstDao) { private void confirmMst(StIvtIostorinv mstDao) {

View File

@@ -111,6 +111,8 @@ public class InBussManageServiceImpl implements InBussManageService {
JSONArray attrArry = attrTab.query("IFNULL(storagevehicle_code,'') = '' " + JSONArray attrArry = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.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 = '"+jsonObject.getString("stor_id")+"' " + "AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+jsonObject.getString("stor_id")+"' " +
"AND storagevehicle_type = '" + jsonObject.getString("vehicle_type") + "'" +
"AND height = '" + jsonObject.getString("height") + "'" +
"AND sect_id = '"+jsonObject.getString("sect_id")+"'").getResultJSONArray(0); "AND sect_id = '"+jsonObject.getString("sect_id")+"'").getResultJSONArray(0);
if (ObjectUtil.isEmpty(attrArry)) { if (ObjectUtil.isEmpty(attrArry)) {
@@ -127,6 +129,8 @@ public class InBussManageServiceImpl implements InBussManageService {
jsonSub.put("stor_id", jsonObject.getString("stor_id")); jsonSub.put("stor_id", jsonObject.getString("stor_id"));
jsonSub.put("sect_id", jsonObject.getString("sect_id")); jsonSub.put("sect_id", jsonObject.getString("sect_id"));
jsonSub.put("material_id", jsonObject.getString("material_id")); jsonSub.put("material_id", jsonObject.getString("material_id"));
jsonSub.put("vehicle_type", jsonObject.getString("vehicle_type"));
jsonSub.put("height", jsonObject.getString("height"));
String block_num = getMinBlock(jsonSub); String block_num = getMinBlock(jsonSub);
/* /*

View File

@@ -22,6 +22,8 @@
输入.box_length TYPEAS s_string 输入.box_length TYPEAS s_string
输入.box_width TYPEAS s_string 输入.box_width TYPEAS s_string
输入.box_high TYPEAS s_string 输入.box_high TYPEAS s_string
输入.vehicle_type TYPEAS s_string
输入.height TYPEAS s_string
输入.block_in TYPEAS f_string 输入.block_in TYPEAS f_string
输入.row_in TYPEAS f_string 输入.row_in TYPEAS f_string
输入.block_num TYPEAS s_string 输入.block_num TYPEAS s_string
@@ -64,6 +66,8 @@
AND IFNULL(attr.storagevehicle_code,'') = '' AND IFNULL(attr.storagevehicle_code,'') = ''
AND attr.stor_id = 输入.stor_id AND attr.stor_id = 输入.stor_id
AND attr.sect_id = 输入.sect_id AND attr.sect_id = 输入.sect_id
AND attr.height = 输入.height
AND attr.storagevehicle_type = 输入.vehicle_type
OPTION 输入.not_block <> "" OPTION 输入.not_block <> ""
attr.block_num NOT IN 输入.not_block attr.block_num NOT IN 输入.not_block
@@ -203,6 +207,8 @@
AND IFNULL(attr.storagevehicle_code,'') = '' AND IFNULL(attr.storagevehicle_code,'') = ''
AND attr.stor_id = 输入.stor_id AND attr.stor_id = 输入.stor_id
AND attr.sect_id = 输入.sect_id AND attr.sect_id = 输入.sect_id
AND attr.height = 输入.height
AND attr.storagevehicle_type = 输入.vehicle_type
OPTION 输入.block_num <> "" OPTION 输入.block_num <> ""
attr.block_num = 输入.block_num attr.block_num = 输入.block_num
@@ -229,6 +235,8 @@
AND attr.is_delete = '0' AND attr.is_delete = '0'
AND attr.stor_id = 输入.stor_id AND attr.stor_id = 输入.stor_id
AND attr.sect_id = 输入.sect_id AND attr.sect_id = 输入.sect_id
AND attr.height = 输入.height
AND attr.storagevehicle_type = 输入.vehicle_type
OPTION 输入.block_num <> "" OPTION 输入.block_num <> ""
attr.block_num = 输入.block_num attr.block_num = 输入.block_num

View File

@@ -330,7 +330,9 @@ public class RawFoilServiceImpl implements RawFoilService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public JSONObject needEmptyVehicle(JSONObject whereJson) { public JSONObject needEmptyVehicle(JSONObject whereJson) {
String point_code = whereJson.getString("point_code"); throw new BadRequestException("请点击呼叫按钮进行搬运!");
/*String point_code = whereJson.getString("point_code");
if (ObjectUtil.isEmpty(point_code)) { if (ObjectUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的点位不能为空!"); throw new BadRequestException("输入的点位不能为空!");
} }
@@ -352,10 +354,10 @@ public class RawFoilServiceImpl implements RawFoilService {
// 3.如果没找到则继续找下一节点 // 3.如果没找到则继续找下一节点
String start_pint_code = ""; String start_pint_code = "";
if (ObjectUtil.isEmpty(jsonIvt)) { if (ObjectUtil.isEmpty(jsonIvt)) {
/*String point_location = jsonSb.getString("point_location"); *//*String point_location = jsonSb.getString("point_location");
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1"); if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0"); if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*/ JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*//*
throw new BadRequestException("未查询到有空轴且母卷位置为空的点位!"); throw new BadRequestException("未查询到有空轴且母卷位置为空的点位!");
} else { } else {
start_pint_code = jsonIvt.getString("empty_point_code"); start_pint_code = jsonIvt.getString("empty_point_code");
@@ -373,7 +375,7 @@ public class RawFoilServiceImpl implements RawFoilService {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("message", "操作成功!"); jo.put("message", "操作成功!");
return jo; return jo;*/
} }
@Override @Override