新购逻辑修改
This commit is contained in:
parent
d75a7fbc24
commit
2e6c4d6a32
|
|
@ -358,13 +358,13 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 物资的新购批次判断,是否和Box标准箱内已存在的是同一批
|
// 物资的新购批次判断,是否和Box标准箱内已存在的是同一批
|
||||||
if (null == machineVo.getBuyTask()) {
|
// if (null == machineVo.getBuyTask()) {
|
||||||
return AjaxResult.error("物资未关联采购批次,请完善后重试!");
|
// return AjaxResult.error("物资未关联采购批次,请完善后重试!");
|
||||||
}
|
// }
|
||||||
String boxBindMaBuyTaskId = bmQrBoxMapper.getBoxBindMaBuyTaskByBoxId(bmQrBoxInfo.getBoxId());
|
// String boxBindMaBuyTaskId = bmQrBoxMapper.getBoxBindMaBuyTaskByBoxId(bmQrBoxInfo.getBoxId());
|
||||||
if (null != boxBindMaBuyTaskId && !Objects.equals(boxBindMaBuyTaskId, machineVo.getBuyTask())) {
|
// if (null != boxBindMaBuyTaskId && !Objects.equals(boxBindMaBuyTaskId, machineVo.getBuyTask())) {
|
||||||
return AjaxResult.error("该物资批次与标准箱已存在批次不匹配,请完善后重试!");
|
// return AjaxResult.error("该物资批次与标准箱已存在批次不匹配,请完善后重试!");
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 此物资未在其他标准型入过库,才可以绑定
|
// 此物资未在其他标准型入过库,才可以绑定
|
||||||
if (0 < bmQrBoxMapper.existsMaId(machineVo.getMaId())) {
|
if (0 < bmQrBoxMapper.existsMaId(machineVo.getMaId())) {
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,12 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
||||||
}
|
}
|
||||||
purchaseBindMapper.insert(purchaseDto);
|
purchaseBindMapper.insert(purchaseDto);
|
||||||
}
|
}
|
||||||
if (1 != purchaseStorageMapper.insertMachine(purchaseDto)) {
|
try {
|
||||||
return AjaxResult.error(1116,"插入maMachine时SQL执行失败!");
|
if (1 != purchaseStorageMapper.insertMachine(purchaseDto)) {
|
||||||
|
return AjaxResult.error(1116,"插入maMachine时SQL执行失败!");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error(1116,"插入maMachine时SQL执行失败!,检查编码是否重复");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 更新绑定数量,并刷新状态
|
// 更新绑定数量,并刷新状态
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue