add 入库单bug修复
This commit is contained in:
@@ -342,6 +342,8 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
|||||||
ArrayList<String> paramLockList = new ArrayList<>();
|
ArrayList<String> paramLockList = new ArrayList<>();
|
||||||
// 仓位对象
|
// 仓位对象
|
||||||
StIvtStructattr stIvtStructattr = new StIvtStructattr();
|
StIvtStructattr stIvtStructattr = new StIvtStructattr();
|
||||||
|
|
||||||
|
List<StIvtStructattr> stIvtStructattrs = new ArrayList<>();
|
||||||
// 是否自动分配货位
|
// 是否自动分配货位
|
||||||
Boolean checked = jsonObject.getBoolean("checked");
|
Boolean checked = jsonObject.getBoolean("checked");
|
||||||
String height = "";
|
String height = "";
|
||||||
@@ -352,17 +354,17 @@ 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 = getBstIvtBoxinfo(whereJson);
|
||||||
if (boxDao == null) {
|
// if (boxDao == null) {
|
||||||
throw new BadRequestException("未找到该木箱信息!");
|
// throw new BadRequestException("未找到该木箱信息!");
|
||||||
}
|
// }
|
||||||
jsonObject.put("box_no", boxDao.getBox_no());
|
// jsonObject.put("box_no", boxDao.getBox_no());
|
||||||
jsonObject.put("vehicle_type", boxDao.getVehicle_type());
|
// jsonObject.put("vehicle_type", boxDao.getVehicle_type());
|
||||||
attrParam.put("vehicle_type", boxDao.getVehicle_type());
|
// attrParam.put("vehicle_type", boxDao.getVehicle_type());
|
||||||
//根据木箱高度,判断入库仓位的高度
|
//根据木箱高度,判断入库仓位的高度
|
||||||
String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue();
|
String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue();
|
||||||
String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue();
|
String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue();
|
||||||
String box_high = boxDao.getBox_high();
|
String box_high = "3";
|
||||||
if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) {
|
if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) {
|
||||||
height = "'1','2','3'";
|
height = "'1','2','3'";
|
||||||
} else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) {
|
} else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) {
|
||||||
@@ -375,8 +377,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
|||||||
// 判断是否是虚拟区
|
// 判断是否是虚拟区
|
||||||
if (stIvtSectattr.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
if (stIvtSectattr.getSect_type_attr().equals(IOSEnum.SECT_TYPE.code("虚拟区"))) {
|
||||||
|
|
||||||
stIvtStructattr = stIvtStructattrMapper.selectOne(new QueryWrapper<StIvtStructattr>().eq("sect_id", jsonObject.getString("sect_id")).eq("lock_type", "1").eq("is_delete", "0").apply("IFNULL(storagevehicle_code, '') = ''"));
|
stIvtStructattrs = stIvtStructattrMapper.selectList(new QueryWrapper<StIvtStructattr>().eq("sect_id", jsonObject.getString("sect_id")).eq("lock_type", "1").eq("is_delete", "0").apply("IFNULL(storagevehicle_code, '') = ''"));
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//TODO jsonAttr = inBussManageService.getOneStruct(attrParam);
|
//TODO jsonAttr = inBussManageService.getOneStruct(attrParam);
|
||||||
@@ -391,12 +392,13 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 指定分配
|
// 指定分配
|
||||||
stIvtStructattr = stIvtStructattrMapper.selectOne(new QueryWrapper<StIvtStructattr>().eq("struct_id", jsonDis.getString("struct_id")));
|
stIvtStructattrs = stIvtStructattrMapper.selectList(new QueryWrapper<StIvtStructattr>().eq("struct_id", jsonDis.getString("struct_id")));
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(stIvtStructattr)) {
|
if (stIvtStructattrs.isEmpty()) {
|
||||||
throw new BadRequestException("没有可用仓位!");
|
throw new BadRequestException("没有可用仓位!");
|
||||||
}
|
}
|
||||||
|
stIvtStructattr = stIvtStructattrs.get(0);
|
||||||
// 调用业务处理类锁定货位
|
// 调用业务处理类锁定货位
|
||||||
paramLockList.add(stIvtStructattr.getStruct_code());
|
paramLockList.add(stIvtStructattr.getStruct_code());
|
||||||
jsonLock.put("inv_type", mstDao.getBill_type());
|
jsonLock.put("inv_type", mstDao.getBill_type());
|
||||||
@@ -446,7 +448,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
|||||||
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 (ObjectUtil.isNotEmpty(jsonObject.getString("is_send"))&&jsonObject.getString("is_send").equals(IOSEnum.IS_NOTANDYES.code("是")) ) {
|
||||||
JSONObject jsonSend = new JSONObject();
|
JSONObject jsonSend = new JSONObject();
|
||||||
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.list(
|
StIvtIostorinvdtl dtlDao = iStIvtIostorinvdtlService.list(
|
||||||
new QueryWrapper<StIvtIostorinvdtl>().lambda()
|
new QueryWrapper<StIvtIostorinvdtl>().lambda()
|
||||||
|
|||||||
@@ -90,9 +90,7 @@ public class RawAssistIStorController {
|
|||||||
|
|
||||||
//@PreAuthorize("@el.check('structrelamaterial:edit')")
|
//@PreAuthorize("@el.check('structrelamaterial:edit')")
|
||||||
public ResponseEntity<Object> insertDtl(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> insertDtl(@RequestBody Map whereJson) {
|
||||||
if (whereJson.get("stor_id").toString().equals(IOSEnum.STOR_ID.code("二期"))) {
|
iStIvtIostorinvService.insertMst(whereJson);
|
||||||
iStIvtIostorinvService.insertMst(whereJson);
|
|
||||||
}
|
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,9 +102,7 @@ public class RawAssistIStorController {
|
|||||||
|
|
||||||
//@PreAuthorize("@el.check('sectattr:edit')")
|
//@PreAuthorize("@el.check('sectattr:edit')")
|
||||||
public ResponseEntity<Object> update(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> update(@RequestBody Map whereJson) {
|
||||||
if (whereJson.get("stor_id").toString().equals(IOSEnum.STOR_ID.code("二期"))) {
|
iStIvtIostorinvService.update(whereJson);
|
||||||
iStIvtIostorinvService.update(whereJson);
|
|
||||||
}
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,9 +111,7 @@ public class RawAssistIStorController {
|
|||||||
@Log("分配货位")
|
@Log("分配货位")
|
||||||
//@PreAuthorize("@el.check('materialtype:list')")
|
//@PreAuthorize("@el.check('materialtype:list')")
|
||||||
public ResponseEntity<Object> divStruct(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> divStruct(@RequestBody Map whereJson) {
|
||||||
if (whereJson.get("stor_id").toString().equals(IOSEnum.STOR_ID.code("二期"))) {
|
iStIvtIostorinvService.divStruct(whereJson);
|
||||||
iStIvtIostorinvService.divStruct(whereJson);
|
|
||||||
}
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user