opt:备货区数据校验
This commit is contained in:
@@ -56,6 +56,8 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
|||||||
private MaterialbaseService materialbaseService;
|
private MaterialbaseService materialbaseService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPdmBiOrderbominfoService pdmBiOrderbominfoService;
|
private IPdmBiOrderbominfoService pdmBiOrderbominfoService;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtStockingivtService stockingivtService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<BstIvtStockingivt> queryAll(Map whereJson, PageQuery page) {
|
public IPage<BstIvtStockingivt> queryAll(Map whereJson, PageQuery page) {
|
||||||
@@ -157,7 +159,7 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
|||||||
String row_num = jsonObject.getString("row_num");
|
String row_num = jsonObject.getString("row_num");
|
||||||
String material_code = jsonObject.getString("material_code");
|
String material_code = jsonObject.getString("material_code");
|
||||||
String point_code = jsonObject.getString("point_code");
|
String point_code = jsonObject.getString("point_code");
|
||||||
|
Integer now_qty = jsonObject.getInteger("qty");
|
||||||
|
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
@@ -166,6 +168,20 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
|||||||
//1-绑定;2-清除
|
//1-绑定;2-清除
|
||||||
String type = jsonObject.getString("type");
|
String type = jsonObject.getString("type");
|
||||||
if (type.equals("1")) {
|
if (type.equals("1")) {
|
||||||
|
//校验数据
|
||||||
|
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(point_code, true);
|
||||||
|
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||||
|
throw new BadRequestException("点位 [" + point_code + "] 不存在或者已被禁用!");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(vehicle_code)) {
|
||||||
|
throw new BadRequestException("托盘信息不能为空!");
|
||||||
|
}
|
||||||
|
if(!vehicle_code.contains("GX")){
|
||||||
|
throw new BadRequestException("请扫描或输入正确的托盘码!");
|
||||||
|
}
|
||||||
|
if(now_qty<=0 || now_qty>5){
|
||||||
|
throw new BadRequestException("数量只允许输入1-5");
|
||||||
|
}
|
||||||
//
|
//
|
||||||
MaterialbaseDto mater = materialbaseService.findByCode(material_code);
|
MaterialbaseDto mater = materialbaseService.findByCode(material_code);
|
||||||
String material_name = mater.getMaterial_name();
|
String material_name = mater.getMaterial_name();
|
||||||
|
|||||||
Reference in New Issue
Block a user