Commit 180162c0 by 赵剑炜

修改盘库

parent a46c29d5
......@@ -44,7 +44,7 @@ public class Warehouse implements Serializable {
private Long orgId;
@TableField("is_locked")
private Boolean isLocked;
private Integer isLocked;
@TableField("sum")
private Integer sum;
......
......@@ -318,6 +318,8 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
public Boolean Start(UploadInventoryReq req) {
String orderId=req.getOrderId();
BussinessInventory bi= this.getById(orderId);
Warehouse warehouse= warehouseService.getById(bi.getWarehouseId());
warehouse.setIsLocked(1);
if (bi.getInventoryState().equals("running"))
{
throw new ServiceException(InventoryExceptionEnum.ORDER_HAS_START);
......@@ -332,7 +334,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
BDList.add(bdInsert);
}
bussinessInventoryDetailService.saveBatch(BDList);
warehouseService.updateById(warehouse);
if (bi!=null)
{
bi.setInventoryState("running");
......@@ -433,7 +435,6 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
public Boolean UseOrFinished(UploadInventoryReq req) {
//更新之前先把库存表的epc备份
BussinessInventory BI= this.getById(req.getOrderId());
List<BussinessDetail> details;
List<WarehouseInventory> DeleteList;
List<WarehouseInventory> UpdateList;
List<BussinessDetail> BusinessDetail = bussinessInventoryDetailService.list(
......@@ -502,6 +503,11 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
BI.setUpdateTime(DateTimeUtil.getCurrentDateTime());
this.updateById(BI);
inventorySummaryService.updateBatchById(SumResult);
Warehouse warehouse= warehouseService.getById(BI.getWarehouseId());
warehouse.setIsLocked(0);
warehouseService.updateById(warehouse);
// }
// else if (req.getState().equals("1"))//回滚结果
// {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论