|
|
|
@ -8,8 +8,10 @@ import com.op.common.core.context.SecurityContextHolder;
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.wms.domain.BaseProduct;
|
|
|
|
|
import com.op.wms.domain.BpProcureOrder;
|
|
|
|
|
import com.op.wms.domain.BpRawMaterialIn;
|
|
|
|
|
import com.op.wms.mapper.BaseProductMapper;
|
|
|
|
|
import com.op.wms.mapper.BpProcureOrderMapper;
|
|
|
|
|
import com.op.wms.mapper.BpRawMaterialInMapper;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -36,6 +38,8 @@ public class BpRawMaterialInDetailServiceImpl implements IBpRawMaterialInDetailS
|
|
|
|
|
private BaseProductMapper baseProductMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BpRawMaterialInMapper bpRawMaterialInMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private BpProcureOrderMapper bpProcureOrderMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询白坯原材料入库明细
|
|
|
|
@ -112,6 +116,22 @@ public class BpRawMaterialInDetailServiceImpl implements IBpRawMaterialInDetailS
|
|
|
|
|
bpRawMaterialIn.setAmountReal(bpRawMaterialIn.getAmountReal()+bpRawMaterialInDetail.getAmountReal());
|
|
|
|
|
bpRawMaterialInMapper.updateBpRawMaterialIn(bpRawMaterialIn);
|
|
|
|
|
}
|
|
|
|
|
//采购单减库存
|
|
|
|
|
// TODO: 2024-11-11 根据采购单号查询
|
|
|
|
|
BpProcureOrder bpProcureOrder = bpProcureOrderMapper.selectBpProcureOrderByProcureCode(bpRawMaterialInDetail.getUserDefined1());
|
|
|
|
|
if (bpProcureOrder==null){
|
|
|
|
|
reselt=2;
|
|
|
|
|
return reselt;
|
|
|
|
|
}else {
|
|
|
|
|
//采购单减数量
|
|
|
|
|
// BpProcureOrder bpProcureOrder1 = new BpProcureOrder();
|
|
|
|
|
// bpProcureOrder1.setProcureCode(bpRawMaterialInDetail.getUserDefined1());
|
|
|
|
|
// bpProcureOrder1.setMaterialName(bpRawMaterialInDetail.getMaterialName());
|
|
|
|
|
// BaseProduct baseProduct = baseProductMapper.selectBaseProductByProductName(bpRawMaterialInDetail.getMaterialName());
|
|
|
|
|
// bpProcureOrder1.setMaterialCode(baseProduct.getProductCode());
|
|
|
|
|
bpProcureOrder.setRealityNumber(bpRawMaterialInDetail.getAmountReal());
|
|
|
|
|
bpProcureOrderMapper.updateBpProcureOrder(bpProcureOrder);
|
|
|
|
|
}
|
|
|
|
|
return reselt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|