Commit 1e2b97bc by 赵剑炜

盘点单据修改

parent c9b14410
......@@ -12,6 +12,7 @@ public enum InventoryExceptionEnum implements IExceptionEnum {
BROKENNUM_BEYOND_STOCK(CommonConstant.DEFAULT_BIZ_ERROR_CODE,"审核中的数量已存在最大可报废数量,现提交失败"),
ORDER_NOT_EXIST(CommonConstant.DEFAULT_BIZ_ERROR_CODE,"盘点单据不存在"),
ORDER_HAS_START(CommonConstant.DEFAULT_BIZ_ERROR_CODE,"单据已经开始,请勿重复操作"),
RUNNINGORDER_EXIST(CommonConstant.DEFAULT_BIZ_ERROR_CODE,"已存在盘点单据"),
/**
* 装备不存在
*/
......
......@@ -316,8 +316,19 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
@Transactional(rollbackFor = Exception.class)
@Override
public Boolean Start(UploadInventoryReq req) {
String orderId=req.getOrderId();
BussinessInventory bi= this.getById(orderId);
BussinessInventory biexist=this.getOne(new LambdaQueryWrapper<BussinessInventory>()
.eq(BussinessInventory::getWarehouseId, bi.getWarehouseId())
.eq(BussinessInventory::getInventoryState,"running"));
if (biexist!=null)
{
throw new ServiceException(InventoryExceptionEnum.RUNNINGORDER_EXIST);
}
Warehouse warehouse= warehouseService.getById(bi.getWarehouseId());
warehouse.setIsLocked(1);
if (bi.getInventoryState().equals("running"))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论