|
|
|
@ -67,13 +67,11 @@ public class BusinStockInvServiceImpl extends ServiceImpl<BusinStockInvMapper, B |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@DataScopeConsignor(consignorAlias = "si") |
|
|
|
|
|
|
|
public List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo) { |
|
|
|
public List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo) { |
|
|
|
return this.baseMapper.queryList(bo); |
|
|
|
return this.baseMapper.queryList(bo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@DataScopeConsignor(consignorAlias = "si") |
|
|
|
|
|
|
|
public List<BusinStockInvVo> queryListByGoodsGroup(BusinStockInvQueryBo bo) { |
|
|
|
public List<BusinStockInvVo> queryListByGoodsGroup(BusinStockInvQueryBo bo) { |
|
|
|
return this.baseMapper.queryListByGoodsGroup(bo); |
|
|
|
return this.baseMapper.queryListByGoodsGroup(bo); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -139,22 +137,26 @@ public class BusinStockInvServiceImpl extends ServiceImpl<BusinStockInvMapper, B |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设置为空货位 |
|
|
|
* 设置为空货位 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param locationId |
|
|
|
* @param invId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result<Boolean> setEmptyLocation(Long locationId) { |
|
|
|
public Result<Boolean> setEmptyLocation(Long invId) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 1.系统有保险杠或空托时,实际系统货位是空时,可清除 |
|
|
|
* 1.系统有保险杠或空托时,实际系统货位是空时,可清除 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
try { |
|
|
|
try { |
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryStrockByLocation(locationId); |
|
|
|
BusinStockInv businStockInv = this.getById(invId); |
|
|
|
|
|
|
|
businStockInv.setInvStatus(InvStatusEnum.end.getValue()); |
|
|
|
|
|
|
|
this.updateById(businStockInv); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryStrockByLocation(businStockInv.getLocationId()); |
|
|
|
if (sysStockDetails !=null && sysStockDetails.size()>0){ |
|
|
|
if (sysStockDetails !=null && sysStockDetails.size()>0){ |
|
|
|
sysStockDetails.removeAll(sysStockDetails); |
|
|
|
sysStockDetails.removeAll(sysStockDetails); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(locationId); |
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(businStockInv.getLocationId()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.empty.getValue()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.empty.getValue()); |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
|
|
|
|
|
|
|
|
@ -169,23 +171,27 @@ public class BusinStockInvServiceImpl extends ServiceImpl<BusinStockInvMapper, B |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设置为空托 |
|
|
|
* 设置为空托 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param locationId |
|
|
|
* @param invId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result<Boolean> setEmptyContainer(Long locationId) { |
|
|
|
public Result<Boolean> setEmptyContainer(Long invId) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 1.系统有保险杠或空托时,实际系统货位是空时,可清除 |
|
|
|
* 1.系统有保险杠或空托时,实际系统货位是空时,可清除 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
BusinStockInv businStockInv = this.getById(invId); |
|
|
|
|
|
|
|
businStockInv.setInvStatus(InvStatusEnum.end.getValue()); |
|
|
|
|
|
|
|
this.updateById(businStockInv); |
|
|
|
|
|
|
|
|
|
|
|
//更新货位状态为:空托
|
|
|
|
//更新货位状态为:空托
|
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(locationId); |
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(businStockInv.getLocationId()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.empty_container.getValue()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.empty_container.getValue()); |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
|
|
|
|
|
|
|
|
//删除库存明细表中的数据
|
|
|
|
//删除库存明细表中的数据
|
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryStrockByLocation(locationId); |
|
|
|
List<SysStockDetail> sysStockDetails = sysStockDetailService.queryStrockByLocation(businStockInv.getLocationId()); |
|
|
|
if (sysStockDetails !=null && sysStockDetails.size()>0){ |
|
|
|
if (sysStockDetails !=null && sysStockDetails.size()>0){ |
|
|
|
sysStockDetails.removeAll(sysStockDetails); |
|
|
|
sysStockDetails.removeAll(sysStockDetails); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -210,16 +216,19 @@ public class BusinStockInvServiceImpl extends ServiceImpl<BusinStockInvMapper, B |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 标记差异 |
|
|
|
* 标记差异 |
|
|
|
* @param locationId |
|
|
|
* @param invId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result<Boolean> flagAsDiff(Long locationId) { |
|
|
|
public Result<Boolean> flagAsDiff(Long invId) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 1.实际是有杠,但是系统无或是颜色车型不一样时,进行标记,标记后指定出库(地图上一键出库) |
|
|
|
* 1.实际是有杠,但是系统无或是颜色车型不一样时,进行标记,标记后指定出库(地图上一键出库) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(locationId); |
|
|
|
BusinStockInv businStockInv = this.getById(invId); |
|
|
|
|
|
|
|
businStockInv.setInvStatus(InvStatusEnum.end.getValue()); |
|
|
|
|
|
|
|
this.updateById(businStockInv); |
|
|
|
|
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(businStockInv.getLocationId()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.flag_diff.getValue()); |
|
|
|
baseLocation.setLocationStatus(LocationStatusEnum.flag_diff.getValue()); |
|
|
|
return iBaseLocationService.updateById(baseLocation)?Result.ok().msg("标记差异成功"):Result.err().msg("标记差异失败"); |
|
|
|
return iBaseLocationService.updateById(baseLocation)?Result.ok().msg("标记差异成功"):Result.err().msg("标记差异失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
|