|
|
|
@ -6,17 +6,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
|
import com.glxp.api.dao.basic.BasicBussinessTypeDao;
|
|
|
|
|
import com.glxp.api.dao.basic.UdiProductDao;
|
|
|
|
|
import com.glxp.api.dao.inout.IoOrderDao;
|
|
|
|
|
import com.glxp.api.dao.inv.InvProductDetailDao;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvProductDetailEntity;
|
|
|
|
|
import com.glxp.api.req.inv.FilterInvProductDetailRequest;
|
|
|
|
|
import com.glxp.api.res.inv.InvProductDetailResponse;
|
|
|
|
|
import com.glxp.api.service.inv.InvProductDetailService;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
|
import com.glxp.api.util.udi.FilterUdiUtils;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
@ -34,6 +33,8 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
|
|
|
|
|
private BasicBussinessTypeDao bussinessTypeDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private IoOrderDao orderDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private UdiProductDao udiProductDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -113,14 +114,29 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setOrderInfo(InvProductDetailResponse response) {
|
|
|
|
|
//查询DI层级,根据DI层级设置数量取值
|
|
|
|
|
Integer packLevel = udiProductDao.selectPackLevel(response.getNameCode());
|
|
|
|
|
//设置出入库中文及出入库数量
|
|
|
|
|
if (response.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
response.setMainActionStr("出库");
|
|
|
|
|
response.setOutCount(response.getCount());
|
|
|
|
|
if (null != packLevel && packLevel != 1) {
|
|
|
|
|
//多级包装
|
|
|
|
|
if (response.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
response.setMainActionStr("出库");
|
|
|
|
|
response.setOutCount(response.getReCount());
|
|
|
|
|
} else {
|
|
|
|
|
response.setMainActionStr("入库");
|
|
|
|
|
response.setInCount(response.getReCount());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
response.setMainActionStr("入库");
|
|
|
|
|
response.setInCount(response.getCount());
|
|
|
|
|
//单层包装
|
|
|
|
|
if (response.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
response.setMainActionStr("出库");
|
|
|
|
|
response.setOutCount(response.getCount());
|
|
|
|
|
} else {
|
|
|
|
|
response.setMainActionStr("入库");
|
|
|
|
|
response.setInCount(response.getCount());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//设置单据类型名称
|
|
|
|
|
BasicBussinessTypeEntity busType = bussinessTypeDao.selectOne(new QueryWrapper<BasicBussinessTypeEntity>().select("name").eq("action", response.getAction()));
|
|
|
|
|
response.setActionName(busType.getName());
|
|
|
|
@ -137,7 +153,7 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
|
|
|
|
|
}
|
|
|
|
|
List<InvProductDetailEntity> datas =
|
|
|
|
|
invProductDetailDao.selectList(new QueryWrapper<InvProductDetailEntity>().eq("relId", relId).eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo)
|
|
|
|
|
.isNull(StrUtil.isEmpty(batchNo), "batchNo").eq(StrUtil.isNotEmpty(supId),"supId", supId).eq("deptCode", deptCode).eq("invCode", invCode).eq(StrUtil.isNotEmpty(invSpaceCode), "invSpaceCode", invSpaceCode));
|
|
|
|
|
.isNull(StrUtil.isEmpty(batchNo), "batchNo").eq(StrUtil.isNotEmpty(supId), "supId", supId).eq("deptCode", deptCode).eq("invCode", invCode).eq(StrUtil.isNotEmpty(invSpaceCode), "invSpaceCode", invSpaceCode));
|
|
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
|
if (CollUtil.isNotEmpty(datas)) {
|
|
|
|
|