物资摆放修改

pro
郑明梁 2 years ago
parent 58e035ad03
commit 790c0d09ba

@ -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());

Loading…
Cancel
Save