|
|
|
@ -119,6 +119,13 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
invPreInProductDetailDao.updateById(invPreInProductDetailEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果库存为空就删了该数据
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0
|
|
|
|
|
&& invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invPreInProductDetailDao.deleteById(invPreInProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ew.clear();
|
|
|
|
|
ew.eq("code", invPlaceOrderDetailEntity.getCode());
|
|
|
|
|
if (bindInvSpaceRequest.getType() == 3) {
|
|
|
|
@ -127,7 +134,7 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", invPlaceOrderDetailEntity.getInvSpaceCode());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//拆解出来的明细有就更新没有就添加
|
|
|
|
|
InvPreInProductDetailEntity invPreInProductDetailEntity1 = invPreInProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invPreInProductDetailEntity1 != null) {
|
|
|
|
|
invPreInProductDetailEntity1.setCount(invPreInProductDetailEntity1.getCount() + 1);
|
|
|
|
@ -182,6 +189,11 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
invPreInProductDetailEntity.setReCount(invPreInProductDetailEntity.getReCount() - reCount);
|
|
|
|
|
invPreProductDetailDao.updateById(invPreInProductDetailEntity);
|
|
|
|
|
|
|
|
|
|
//如果库存为空就删了该数据
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0
|
|
|
|
|
&& invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invPreProductDetailDao.deleteById(invPreInProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ew.clear();
|
|
|
|
|
ew.eq("code", invPlaceOrderDetailEntity.getCode());
|
|
|
|
@ -242,6 +254,11 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
invPreInProductDetailEntity.setReCount(invPreInProductDetailEntity.getReCount() - reCount);
|
|
|
|
|
invProductDetailDao.updateById(invPreInProductDetailEntity);
|
|
|
|
|
|
|
|
|
|
//如果库存为空就删了该数据
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0
|
|
|
|
|
&& invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invProductDetailDao.deleteById(invPreInProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ew.clear();
|
|
|
|
|
ew.eq("code", invPlaceOrderDetailEntity.getCode());
|
|
|
|
|