|
@@ -89,6 +89,8 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
|
|
|
@Autowired
|
|
|
private IContractManagementInfoService ContractManagementInfoService;
|
|
|
@Autowired
|
|
|
+ private IInOutWarehouseTaskService inOutWarehouseTaskService;
|
|
|
+ @Autowired
|
|
|
private IWarehouseInOutInfoService warehouseInOutInfoService;
|
|
|
@Autowired
|
|
|
private IWarehousingOrderService warehousingOrderService;
|
|
@@ -341,6 +343,23 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
|
|
|
warehouseInOutInfo.setInOutDate(new Date());
|
|
|
warehouseInOutInfo.setStatus("已提交");
|
|
|
warehouseInOutInfo.setPaymentId(paymentManagement.getId());
|
|
|
+ //更新出入库任务表已完成量
|
|
|
+ InOutWarehouseTask inOutWarehouseTask = inOutWarehouseTaskService.selectOne(new EntityWrapper<InOutWarehouseTask>()
|
|
|
+ .eq("in_out_task_no", warehouseInOutInfo.getInOutTaskNo()));
|
|
|
+ if (inOutWarehouseTask != null) {
|
|
|
+ //可超出重量
|
|
|
+ Float overNeight = 0.0f;
|
|
|
+ ContractManagementInfo contractManagementInfo = ContractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("comp_id", inOutWarehouseTask.getCompId())
|
|
|
+ .eq("contract_no", inOutWarehouseTask.getContractNo()));
|
|
|
+ overNeight = inOutWarehouseTask.getWeight() * (contractManagementInfo.getOverShort() / 100);
|
|
|
+ inOutWarehouseTask.setCompletedQuantity(inOutWarehouseTask.getCompletedQuantity() + warehouseInOutInfo.getNetWeight());
|
|
|
+ if (inOutWarehouseTask.getCompletedQuantity() > inOutWarehouseTask.getWeight() + overNeight) {
|
|
|
+ throw new YException(YExceptionEnum.TASK_WEIGHT_EXCEEDED_ERROR);
|
|
|
+ } else {
|
|
|
+ inOutWarehouseTaskService.updateById(inOutWarehouseTask);
|
|
|
+ }
|
|
|
+ }
|
|
|
CommonSysParameter commonSysParameter = iCommonSysParameterService.selectOne(new EntityWrapper<CommonSysParameter>().eq("const_id", "CON2").eq("const_value", paymentManagement1.getGoodsName()));
|
|
|
warehouseInOutInfo.setGoodsNameKey(commonSysParameter.getConstKey());
|
|
|
warehouseInOutInfo.setInOutFlag("2");
|