|
@ -311,7 +311,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
throw new BusinessException("添加出库单信息失败"); |
|
|
throw new BusinessException("添加出库单信息失败"); |
|
|
} |
|
|
} |
|
|
//生成出库单详情相关信息
|
|
|
//生成出库单详情相关信息
|
|
|
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,mergeMakeorderPickDetails); |
|
|
generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,sysMakeorderPickDetails); |
|
|
return insertResult; |
|
|
return insertResult; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -343,13 +343,28 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//生成出库单详情相关信息
|
|
|
//生成出库单详情相关信息
|
|
|
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> mergeMakeorderPickDetails) { |
|
|
private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List<SysMakeorderPickDetail> sysMakeorderPickDetails) { |
|
|
|
|
|
|
|
|
for (SysMakeorderPickDetail sysMakeorderPickDetail : mergeMakeorderPickDetails) { |
|
|
for (SysMakeorderPickDetail sysMakeorderPickDetail : sysMakeorderPickDetails) { |
|
|
WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail(); |
|
|
WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail(); |
|
|
warehouseOutOrderDetail.setOutOrderCode(outOrderCode); |
|
|
warehouseOutOrderDetail.setOutOrderCode(outOrderCode); |
|
|
warehouseOutOrderDetail.setWarehouseOutStatus("4"); |
|
|
|
|
|
warehouseOutOrderDetail.setRelatedOrderCode(tempSysMakeorderPickVo.getMakeNo()); |
|
|
warehouseOutOrderDetail.setRelatedOrderCode(tempSysMakeorderPickVo.getMakeNo()); |
|
|
|
|
|
//物料相关信息
|
|
|
|
|
|
warehouseOutOrderDetail.setMaterialNo(sysMakeorderPickDetail.getMaterialNo()); |
|
|
|
|
|
//根据出库单号和关联单号以及物料号查找出库单详情数据
|
|
|
|
|
|
WarehouseOutOrderDetail tempWarehouseOutOrderDetail = outOrderDetailMapper.selectOutOrderDetailListByThreeCode(warehouseOutOrderDetail); |
|
|
|
|
|
if (tempWarehouseOutOrderDetail != null){ |
|
|
|
|
|
warehouseOutOrderDetail.setOutOrderDetailId(tempWarehouseOutOrderDetail.getOutOrderDetailId()); |
|
|
|
|
|
Integer applyOutOrderSum = (int) (sysMakeorderPickDetail.getPickNum()+tempWarehouseOutOrderDetail.getApplyOutOrderSum()); |
|
|
|
|
|
Integer makeNum = (int) (sysMakeorderPickDetail.getPickNum() + tempWarehouseOutOrderDetail.getMakeNum()); |
|
|
|
|
|
warehouseOutOrderDetail.setApplyOutOrderSum(applyOutOrderSum); |
|
|
|
|
|
warehouseOutOrderDetail.setMakeNum(makeNum); |
|
|
|
|
|
int updateWarehouseOutOrderDetailResult = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); |
|
|
|
|
|
if (updateWarehouseOutOrderDetailResult <= 0){ |
|
|
|
|
|
throw new BusinessException("更新出库单详情失败"); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
warehouseOutOrderDetail.setWarehouseOutStatus("4"); |
|
|
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo()); |
|
|
warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo()); |
|
|
//标明来源是生产订单
|
|
|
//标明来源是生产订单
|
|
|
warehouseOutOrderDetail.setWarehouseOrderType("1"); |
|
|
warehouseOutOrderDetail.setWarehouseOrderType("1"); |
|
@ -360,14 +375,13 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName()); |
|
|
warehouseOutOrderDetail.setCreateTime(new Date()); |
|
|
warehouseOutOrderDetail.setCreateTime(new Date()); |
|
|
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser()); |
|
|
warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser()); |
|
|
//物料相关信息
|
|
|
|
|
|
warehouseOutOrderDetail.setMaterialNo(sysMakeorderPickDetail.getMaterialNo()); |
|
|
|
|
|
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName()); |
|
|
warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName()); |
|
|
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe()); |
|
|
warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe()); |
|
|
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit()); |
|
|
warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit()); |
|
|
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand()); |
|
|
warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand()); |
|
|
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod()); |
|
|
warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod()); |
|
|
warehouseOutOrderDetail.setMakeNum(tempSysMakeorderPickVo.getMaterialSum()); |
|
|
//订单数量为本次领料数量
|
|
|
|
|
|
warehouseOutOrderDetail.setMakeNum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); |
|
|
//添加申请出库数量
|
|
|
//添加申请出库数量
|
|
|
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); |
|
|
warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); |
|
|
|
|
|
|
|
@ -384,6 +398,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private List<SysMakeorderPickDetail> getSysMakeorderPickDetails(SysMakeorderPickVo tempSysMakeorderPickVo) { |
|
|
private List<SysMakeorderPickDetail> getSysMakeorderPickDetails(SysMakeorderPickVo tempSysMakeorderPickVo) { |
|
|
SysMakeorderPickDetail tempMakeorderPickDetail = new SysMakeorderPickDetail(); |
|
|
SysMakeorderPickDetail tempMakeorderPickDetail = new SysMakeorderPickDetail(); |
|
|