|
|
|
@ -138,7 +138,20 @@ public class BaseInventoryServiceImpl implements IBaseInventoryService
|
|
|
|
int m=0,t=0;
|
|
|
|
int m=0,t=0;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (isbaseInventory!=null){
|
|
|
|
if (isbaseInventory!=null){
|
|
|
|
return AjaxResult.error("该轮胎已存在!");
|
|
|
|
//更改库存状态
|
|
|
|
|
|
|
|
baseInventory.setStatus("0");
|
|
|
|
|
|
|
|
baseInventory.setUpdateBy(baseInventory.getCreateBy());
|
|
|
|
|
|
|
|
baseInventory.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
//更新库存表出仓-在仓
|
|
|
|
|
|
|
|
baseInventoryMapper.updateBaseInventoryByEpc(baseInventory);
|
|
|
|
|
|
|
|
//插入库记录表
|
|
|
|
|
|
|
|
RecordWarehousing recordWarehousing = new RecordWarehousing();
|
|
|
|
|
|
|
|
recordWarehousing.setTyreRfid(baseInventory.getTyreRfid());
|
|
|
|
|
|
|
|
recordWarehousing.setType("0");
|
|
|
|
|
|
|
|
recordWarehousing.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
recordWarehousing.setCreateBy(baseInventory.getCreateBy());
|
|
|
|
|
|
|
|
recordWarehousingMapper.insertRecordWarehousing(recordWarehousing);
|
|
|
|
|
|
|
|
return AjaxResult.success("入库成功!");
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
//插入库存表以及基础信息表
|
|
|
|
//插入库存表以及基础信息表
|
|
|
|
baseInventory.setStatus("0");
|
|
|
|
baseInventory.setStatus("0");
|
|
|
|
@ -419,8 +432,9 @@ public class BaseInventoryServiceImpl implements IBaseInventoryService
|
|
|
|
recordWarehousing.setCreateBy(baseInventory.getCreateBy());
|
|
|
|
recordWarehousing.setCreateBy(baseInventory.getCreateBy());
|
|
|
|
int m = recordWarehousingMapper.insertRecordWarehousing(recordWarehousing);
|
|
|
|
int m = recordWarehousingMapper.insertRecordWarehousing(recordWarehousing);
|
|
|
|
//调拨出库要修改轮胎的所属部门
|
|
|
|
//调拨出库要修改轮胎的所属部门
|
|
|
|
int w = baseTyreMapper.updateBaseTyre(baseTyre);
|
|
|
|
baseTyre.setTyreEpc(baseInventory.getTyreRfid());
|
|
|
|
if (n>0&&m>0){
|
|
|
|
int w = baseTyreMapper.updateBaseTyreByEpc(baseTyre);
|
|
|
|
|
|
|
|
if (n>0&&m>0&&w>0){
|
|
|
|
return AjaxResult.success("出库成功!");
|
|
|
|
return AjaxResult.success("出库成功!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
|