|
@ -13,6 +13,7 @@ import com.ruoyi.erp.domain.ErpDevelopModifyorder; |
|
|
import com.ruoyi.erp.domain.ErpMaterial; |
|
|
import com.ruoyi.erp.domain.ErpMaterial; |
|
|
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper; |
|
|
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper; |
|
|
import com.ruoyi.erp.mapper.ErpMaterialMapper; |
|
|
import com.ruoyi.erp.mapper.ErpMaterialMapper; |
|
|
|
|
|
import com.ruoyi.purchase.domain.PurchaseOrder; |
|
|
import com.ruoyi.purchase.domain.PurchaseOrderChild; |
|
|
import com.ruoyi.purchase.domain.PurchaseOrderChild; |
|
|
import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper; |
|
|
import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper; |
|
|
import com.ruoyi.quality.domain.QualityOrder; |
|
|
import com.ruoyi.quality.domain.QualityOrder; |
|
@ -407,6 +408,14 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) { |
|
|
if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) { |
|
|
throw new BusinessException("更新入库单明细记录失败"); |
|
|
throw new BusinessException("更新入库单明细记录失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更新采购订单子表
|
|
|
|
|
|
int updatePurchaseOrderChildResult = updateTemporaryPurchaseOrderChild(warehouseStorageOrder); |
|
|
|
|
|
if (updatePurchaseOrderChildResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()){ |
|
|
|
|
|
throw new BusinessException("更新采购订单子表记录失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); |
|
|
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); |
|
|
if (updateResult <= 0) { |
|
|
if (updateResult <= 0) { |
|
|
throw new BusinessException("更新入库单主记录失败"); |
|
|
throw new BusinessException("更新入库单主记录失败"); |
|
@ -435,6 +444,26 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
return updateResult; |
|
|
return updateResult; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更新采购订单子表
|
|
|
|
|
|
private int updateTemporaryPurchaseOrderChild(WarehouseStorageOrder warehouseStorageOrder) { |
|
|
|
|
|
int result = 0; |
|
|
|
|
|
String purchaseOrderCode = warehouseStorageOrder.getRelatedOrderCode(); |
|
|
|
|
|
List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); |
|
|
|
|
|
if (CollectionUtils.isEmpty(warehouseStorageOrderDetailList)){ |
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (WarehouseStorageOrderDetail warehouseStorageOrderDetail : warehouseStorageOrderDetailList) { |
|
|
|
|
|
PurchaseOrderChild purchaseOrderChild = new PurchaseOrderChild(); |
|
|
|
|
|
purchaseOrderChild.setPurchaseOrderCode(purchaseOrderCode); |
|
|
|
|
|
purchaseOrderChild.setMaterialNo(warehouseStorageOrderDetail.getMaterialNo()); |
|
|
|
|
|
purchaseOrderChild = purchaseOrderChildMapper.selectPurchaseOrderChildByCodeAndNo(purchaseOrderChild); |
|
|
|
|
|
purchaseOrderChild.setTemporaryNum(warehouseStorageOrderDetail.getTemporaryQualifiedNum()); |
|
|
|
|
|
result += purchaseOrderChildMapper.updatePurchaseOrderChild(purchaseOrderChild); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 修改保存暂收-委外单(委外入库) |
|
|
* 修改保存暂收-委外单(委外入库) |
|
|
* */ |
|
|
* */ |
|
@ -1056,6 +1085,14 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) { |
|
|
if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) { |
|
|
throw new BusinessException("更新入库单明细记录失败"); |
|
|
throw new BusinessException("更新入库单明细记录失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更新采购订单子表
|
|
|
|
|
|
int updatePurchaseOrderChildResult = updateTemporaryPurchaseOrderChild(warehouseStorageOrder); |
|
|
|
|
|
if (updatePurchaseOrderChildResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()){ |
|
|
|
|
|
throw new BusinessException("更新采购订单子表记录失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); |
|
|
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); |
|
|
if (updateResult <= 0) { |
|
|
if (updateResult <= 0) { |
|
|
throw new BusinessException("更新入库单主记录失败"); |
|
|
throw new BusinessException("更新入库单主记录失败"); |
|
@ -1134,7 +1171,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
private int updateTemporaryPurchaseDetails(WarehouseStorageOrder warehouseStorageOrder) { |
|
|
private int updateTemporaryPurchaseDetails(WarehouseStorageOrder warehouseStorageOrder) { |
|
|
int updateResultDetails = 0; |
|
|
int updateResultDetails = 0; |
|
|
List<WarehouseStorageOrderDetail> details = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); |
|
|
List<WarehouseStorageOrderDetail> details = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); |
|
|
if (org.springframework.util.CollectionUtils.isEmpty(details)){ |
|
|
if (CollectionUtils.isEmpty(details)){ |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
for (WarehouseStorageOrderDetail detail : details) { |
|
|
for (WarehouseStorageOrderDetail detail : details) { |
|
|