|
|
|
@ -6,6 +6,7 @@ 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.InvPreProductDetailDao;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
@ -37,6 +38,8 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic
|
|
|
|
|
private BasicBussinessTypeDao bussinessTypeDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private IoOrderDao orderDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private UdiProductDao udiProductDao;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int insert(InvPreProductDetailEntity invPreProductDetailEntity) {
|
|
|
|
@ -94,13 +97,27 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setOrderInfo(InvPreProductDetailResponse 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()));
|
|
|
|
|