|
@@ -1100,6 +1100,47 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
stockSaleReceiptReportService.insert(stockSaleReceiptReport);
|
|
|
}
|
|
|
+ //退库派车情况
|
|
|
+ if (warehouseInOutInfo.getCarId()!=null) {
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setServiceCharge(20d);
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoService.selectById(warehouseInOutInfo.getCarId());
|
|
|
+ if (tranCarInfo != null) {
|
|
|
+ TranTaskInfo tranTaskInfo = tranTaskInfoService.selectById(tranCarInfo.getInfoId());
|
|
|
+ tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
|
|
|
+ tranSettlementReport.setStartAddress(tranTaskInfo.getSendWarehouse());
|
|
|
+ TranProcessInfo tranProcessInfo = tranProcessInfoService.selectById(tranCarInfo.getProcessId());
|
|
|
+ tranSettlementReport.setGrainPrice(tranProcessInfo.getGoodsValue());
|
|
|
+ //运输单价不为空
|
|
|
+ if (tranCarInfo.getTranPrice() != null) {
|
|
|
+ tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranCarInfo.getTranPrice()) * tranSettlementReport.getSettlementWeight()
|
|
|
+ - tranSettlementReport.getServiceCharge());
|
|
|
+ //税点
|
|
|
+ tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid() / 0.946 * 0.054);
|
|
|
+ //合计应付
|
|
|
+ tranSettlementReport.setTotalPayable(tranSettlementReport.getAmountActuallyPaid() + tranSettlementReport.getTaxPoint());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(String.valueOf(tranSettlementReport.getTotalPayable())));
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ tranSettlementReport.setSettlementPrice(Double.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setUnloadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setUnloadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
+ }
|
|
|
}
|
|
|
Wrapper wrapper = new EntityWrapper<TranCarInfo>()
|
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
@@ -1251,6 +1292,50 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
//临时库入库
|
|
|
else if ("2".equals(warehouseInOutInfo.getInOutFlag()) && "2".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
|
+ //临时库退库
|
|
|
+ if ("退库".equals(warehouseInOutInfo.getInOutType())){
|
|
|
+ //退库派车情况
|
|
|
+ if (warehouseInOutInfo.getCarId()!=null) {
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setServiceCharge(20d);
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoService.selectById(warehouseInOutInfo.getCarId());
|
|
|
+ if (tranCarInfo != null) {
|
|
|
+ TranTaskInfo tranTaskInfo = tranTaskInfoService.selectById(tranCarInfo.getInfoId());
|
|
|
+ tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
|
|
|
+ tranSettlementReport.setStartAddress(tranTaskInfo.getSendWarehouse());
|
|
|
+ TranProcessInfo tranProcessInfo = tranProcessInfoService.selectById(tranCarInfo.getProcessId());
|
|
|
+ tranSettlementReport.setGrainPrice(tranProcessInfo.getGoodsValue());
|
|
|
+ //运输单价不为空
|
|
|
+ if (tranCarInfo.getTranPrice() != null) {
|
|
|
+ tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranCarInfo.getTranPrice()) * tranSettlementReport.getSettlementWeight()
|
|
|
+ - tranSettlementReport.getServiceCharge());
|
|
|
+ //税点
|
|
|
+ tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid() / 0.946 * 0.054);
|
|
|
+ //合计应付
|
|
|
+ tranSettlementReport.setTotalPayable(tranSettlementReport.getAmountActuallyPaid() + tranSettlementReport.getTaxPoint());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(String.valueOf(tranSettlementReport.getTotalPayable())));
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ tranSettlementReport.setSettlementPrice(Double.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setUnloadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setUnloadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
+ }
|
|
|
+ }
|
|
|
//更新库存量
|
|
|
float original = 0f;
|
|
|
//判断是否有库
|
|
@@ -4014,6 +4099,47 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
stockSaleReceiptReportService.insert(stockSaleReceiptReport);
|
|
|
}
|
|
|
+ //退库派车情况
|
|
|
+ if (warehouseInOutInfo.getCarId()!=null) {
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setServiceCharge(20d);
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoService.selectById(warehouseInOutInfo.getCarId());
|
|
|
+ if (tranCarInfo != null) {
|
|
|
+ TranTaskInfo tranTaskInfo = tranTaskInfoService.selectById(tranCarInfo.getInfoId());
|
|
|
+ tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
|
|
|
+ tranSettlementReport.setStartAddress(tranTaskInfo.getSendWarehouse());
|
|
|
+ TranProcessInfo tranProcessInfo = tranProcessInfoService.selectById(tranCarInfo.getProcessId());
|
|
|
+ tranSettlementReport.setGrainPrice(tranProcessInfo.getGoodsValue());
|
|
|
+ //运输单价不为空
|
|
|
+ if (tranCarInfo.getTranPrice() != null) {
|
|
|
+ tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranCarInfo.getTranPrice()) * tranSettlementReport.getSettlementWeight()
|
|
|
+ - tranSettlementReport.getServiceCharge());
|
|
|
+ //税点
|
|
|
+ tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid() / 0.946 * 0.054);
|
|
|
+ //合计应付
|
|
|
+ tranSettlementReport.setTotalPayable(tranSettlementReport.getAmountActuallyPaid() + tranSettlementReport.getTaxPoint());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(String.valueOf(tranSettlementReport.getTotalPayable())));
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ tranSettlementReport.setSettlementPrice(Double.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setUnloadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setUnloadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
+ }
|
|
|
}
|
|
|
if (warehouseInOutInfo.getWeighingManagement() != null) {
|
|
|
//皮重检斤
|
|
@@ -4248,6 +4374,50 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
//临时库入库
|
|
|
else if ("2".equals(warehouseInOutInfo.getInOutFlag()) && "2".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
|
+ //临时库退库
|
|
|
+ if ("退库".equals(warehouseInOutInfo.getInOutType())){
|
|
|
+ //退库派车情况
|
|
|
+ if (warehouseInOutInfo.getCarId()!=null) {
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setTranCarNo(warehouseInOutInfo.getTranCarNo());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setServiceCharge(20d);
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoService.selectById(warehouseInOutInfo.getCarId());
|
|
|
+ if (tranCarInfo != null) {
|
|
|
+ TranTaskInfo tranTaskInfo = tranTaskInfoService.selectById(tranCarInfo.getInfoId());
|
|
|
+ tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
|
|
|
+ tranSettlementReport.setStartAddress(tranTaskInfo.getSendWarehouse());
|
|
|
+ TranProcessInfo tranProcessInfo = tranProcessInfoService.selectById(tranCarInfo.getProcessId());
|
|
|
+ tranSettlementReport.setGrainPrice(tranProcessInfo.getGoodsValue());
|
|
|
+ //运输单价不为空
|
|
|
+ if (tranCarInfo.getTranPrice() != null) {
|
|
|
+ tranSettlementReport.setAmountActuallyPaid(Double.valueOf(tranCarInfo.getTranPrice()) * tranSettlementReport.getSettlementWeight()
|
|
|
+ - tranSettlementReport.getServiceCharge());
|
|
|
+ //税点
|
|
|
+ tranSettlementReport.setTaxPoint(tranSettlementReport.getAmountActuallyPaid() / 0.946 * 0.054);
|
|
|
+ //合计应付
|
|
|
+ tranSettlementReport.setTotalPayable(tranSettlementReport.getAmountActuallyPaid() + tranSettlementReport.getTaxPoint());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(String.valueOf(tranSettlementReport.getTotalPayable())));
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ tranSettlementReport.setSettlementPrice(Double.valueOf(tranCarInfo.getTranPrice()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setUnloadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setUnloadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
+ }
|
|
|
+ }
|
|
|
//更新库存量
|
|
|
float original = 0f;
|
|
|
//判断是否有库
|