|
|
|
@ -510,6 +510,9 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
InvPreInProductDetailEntity invPreInProductDetailEntity = invPreInProductDetailDao.selectOne(ew);
|
|
|
|
|
count = invPreInProductDetailEntity.getInCount();
|
|
|
|
|
if (invPreInProductDetailEntity == null) {
|
|
|
|
|
return "该产品库存不足!";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
count = invPreInProductDetailDao.getInventoryQuantity(bindInvSpaceRequest.getCode());
|
|
|
|
|
}
|
|
|
|
@ -535,6 +538,9 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("code", bindInvSpaceRequest.getCode());
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
InvPreProductDetailEntity invPreProductDetailEntity = invPreProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invPreProductDetailEntity == null) {
|
|
|
|
|
return "该产品库存不足!";
|
|
|
|
|
}
|
|
|
|
|
count = invPreProductDetailEntity.getInCount();
|
|
|
|
|
} else {
|
|
|
|
|
count = invPreProductDetailDao.getInventoryQuantity(bindInvSpaceRequest.getCode());
|
|
|
|
@ -562,6 +568,9 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("code", bindInvSpaceRequest.getCode());
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
InvProductDetailEntity invProductDetailEntity = invProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invProductDetailEntity == null) {
|
|
|
|
|
return "该产品库存不足!";
|
|
|
|
|
}
|
|
|
|
|
count = invProductDetailEntity.getInCount();
|
|
|
|
|
} else {
|
|
|
|
|
count = invProductDetailDao.getInventoryQuantity(bindInvSpaceRequest.getCode());
|
|
|
|
@ -729,7 +738,7 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
ew.last("limit 1");
|
|
|
|
|
invPreInProductDetailEntity = invPreInProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && (invPreInProductDetailEntity.getOutCount() == null || invPreInProductDetailEntity.getOutCount() == 0)
|
|
|
|
|
&& invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invPreInProductDetailDao.deleteById(invPreInProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
@ -767,7 +776,7 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
ew.last("limit 1");
|
|
|
|
|
invPreInProductDetailEntity = invPreInProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && invPreInProductDetailEntity.getOutCount() == 0
|
|
|
|
|
if (invPreInProductDetailEntity != null && invPreInProductDetailEntity.getInCount() == 0 && (invPreInProductDetailEntity.getOutCount() == null || invPreInProductDetailEntity.getOutCount() == 0)
|
|
|
|
|
&& invPreInProductDetailEntity.getCount() == 0 && invPreInProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invPreInProductDetailDao.deleteById(invPreInProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
@ -832,7 +841,7 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
ew.last("limit 1");
|
|
|
|
|
invPreProductDetailEntity = invPreProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invPreProductDetailEntity != null && invPreProductDetailEntity.getInCount() == 0 && invPreProductDetailEntity.getOutCount() == 0
|
|
|
|
|
if (invPreProductDetailEntity != null && invPreProductDetailEntity.getInCount() == 0 && (invPreProductDetailEntity.getOutCount() == null || invPreProductDetailEntity.getOutCount() == 0)
|
|
|
|
|
&& invPreProductDetailEntity.getCount() == 0 && invPreProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invPreProductDetailDao.deleteById(invPreProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
@ -900,7 +909,7 @@ public class InvPlaceServiceImpl implements InvPlaceService {
|
|
|
|
|
ew.eq("invSpaceCode", bindInvSpaceRequest.getInvSpaceCode());
|
|
|
|
|
ew.last("limit 1");
|
|
|
|
|
invProductDetailEntity = invProductDetailDao.selectOne(ew);
|
|
|
|
|
if (invProductDetailEntity != null && invProductDetailEntity.getInCount() == 0 && invProductDetailEntity.getOutCount() == 0
|
|
|
|
|
if (invProductDetailEntity != null && invProductDetailEntity.getInCount() == 0 && (invProductDetailEntity.getOutCount() == null || invProductDetailEntity.getOutCount() == 0)
|
|
|
|
|
&& invProductDetailEntity.getCount() == 0 && invProductDetailEntity.getReCount() == 0) {
|
|
|
|
|
invProductDetailDao.deleteById(invProductDetailEntity);
|
|
|
|
|
}
|
|
|
|
|