|
|
|
@ -10,8 +10,10 @@ import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
|
import com.glxp.api.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.api.dao.auth.InvSpaceDao;
|
|
|
|
|
import com.glxp.api.dao.auth.InvWarehouseDao;
|
|
|
|
|
import com.glxp.api.dao.inv.*;
|
|
|
|
|
import com.glxp.api.entity.auth.InvSpace;
|
|
|
|
|
import com.glxp.api.entity.auth.InvWarehouseEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.*;
|
|
|
|
|
import com.glxp.api.req.inv.AddInvPlaceOrderRequest;
|
|
|
|
@ -60,6 +62,8 @@ public class InvPlaceOrderServiceImpl implements InvPlaceOrderService {
|
|
|
|
|
private InvPreProductDetailDao invPreProductDetailDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private InvPreInProductDetailDao invPreInProductDetailDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private InvSpaceDao invSpaceDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -129,6 +133,7 @@ public class InvPlaceOrderServiceImpl implements InvPlaceOrderService {
|
|
|
|
|
String produceDate = null;
|
|
|
|
|
String expireDate = null;
|
|
|
|
|
String serialNo = null;
|
|
|
|
|
InvSpace invSpace=invSpaceDao.selectOne(new QueryWrapper<InvSpace>().eq("code", bindInvSpaceRequest.getInvSpaceCode()));
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseDao.selectOne(new QueryWrapper<InvWarehouseEntity>().eq("code", bindInvSpaceRequest.getInvCode()));
|
|
|
|
|
if (invWarehouseEntity.getAdvanceType() == ConstantStatus.ACTION_TYPE_PREIN) {
|
|
|
|
|
QueryWrapper<InvPreInProductDetailEntity> ew = new QueryWrapper<>();
|
|
|
|
@ -189,7 +194,7 @@ public class InvPlaceOrderServiceImpl implements InvPlaceOrderService {
|
|
|
|
|
InvPlaceOrderEntity orderEntity = new InvPlaceOrderEntity();
|
|
|
|
|
orderEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
orderEntity.setRecordId(recordId);
|
|
|
|
|
orderEntity.setType(3);
|
|
|
|
|
orderEntity.setType(bindInvSpaceRequest.getType());
|
|
|
|
|
// orderEntity.setOrderId(addInvPlaceOrderRequest.getOrderId());
|
|
|
|
|
orderEntity.setCreateUser(userId);
|
|
|
|
|
orderEntity.setCreateTime(new Date());
|
|
|
|
@ -202,6 +207,8 @@ public class InvPlaceOrderServiceImpl implements InvPlaceOrderService {
|
|
|
|
|
invPlaceOrderDetailEntity.setRecordId(recordId);
|
|
|
|
|
invPlaceOrderDetailEntity.setBatchNo(batchNo);
|
|
|
|
|
invPlaceOrderDetailEntity.setRelId(relId + "");
|
|
|
|
|
invPlaceOrderDetailEntity.setTopInvCode(invSpace.getInvWarehouseCode());
|
|
|
|
|
invPlaceOrderDetailEntity.setTopInvSpaceCode(invSpace.getCode());
|
|
|
|
|
invPlaceOrderDetailEntity.setNameCode(nameCode);
|
|
|
|
|
invPlaceOrderDetailEntity.setExpireDate(expireDate);
|
|
|
|
|
invPlaceOrderDetailEntity.setProduceDate(produceDate);
|
|
|
|
|