|
@@ -2133,62 +2133,38 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
warehouseInOutInfo.setTranCarNo(tranCarNo);
|
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
|
tranCarInfoService.insert(tranCarInfo);
|
|
|
- //生成汽运报表
|
|
|
- TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
- tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
- tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
- tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
- if ("汽运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
- tranSettlementReport.setTranType("汽运");
|
|
|
- tranSettlementReport.setTranTypeKey("1");
|
|
|
- } else if ("火运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
- tranSettlementReport.setTranType("火运");
|
|
|
- tranSettlementReport.setTranTypeKey("2");
|
|
|
- } else {
|
|
|
- tranSettlementReport.setTranType("船运");
|
|
|
- tranSettlementReport.setTranTypeKey("3");
|
|
|
- }
|
|
|
- tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
- tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
- tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
- //运输单价不为空
|
|
|
- if (warehouseInOutInfo.getFreight()!=null){
|
|
|
- //应付
|
|
|
- tranSettlementReport.setAmountIngPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
- //未付
|
|
|
- tranSettlementReport.setAmountNotPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
- tranSettlementReport.setTransportPrice(Float.valueOf(warehouseInOutInfo.getFreight()));
|
|
|
- }
|
|
|
- tranSettlementReport.setLoadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
- tranSettlementReport.setLoadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
- tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
- tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
- tranSettlementReportService.insert(tranSettlementReport);
|
|
|
-// boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(tranSettlementReport.getWorkflowId());
|
|
|
-// // 不是退回的单子
|
|
|
-// if (isStartWorkflow) {
|
|
|
-// Workflow workflow = workflowService
|
|
|
-// .findLatestWorkflowByBusinessCodeByApp(tranSettlementReport.getCompId(), "TRANSPORTATION-SETTLEMENT-REPORT");
|
|
|
-// // 没配置审核流程,直接结束并处理信息
|
|
|
-// if (workflow == null) {
|
|
|
-// throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
|
|
|
-// }
|
|
|
-// // 开启审核流
|
|
|
-// else {
|
|
|
-//
|
|
|
-// // 设置状态 已提交审核
|
|
|
-// tranSettlementReport.setWorkflowId(workflow.getId());
|
|
|
-// tranSettlementReportService.updateById(tranSettlementReport);
|
|
|
-// workflowService.startInstance(workflow.getId(), tranSettlementReport.getId());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// // 退回的单子 再启用
|
|
|
-// else {
|
|
|
-//
|
|
|
-// tranSettlementReportService.updateById(tranSettlementReport);
|
|
|
-// workflowService.activateInstance(tranSettlementReport.getWorkflowId(), tranSettlementReport.getId());
|
|
|
-// }
|
|
|
}
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ if ("汽运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ } else if ("火运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
+ tranSettlementReport.setTranType("火运");
|
|
|
+ tranSettlementReport.setTranTypeKey("2");
|
|
|
+ } else {
|
|
|
+ tranSettlementReport.setTranType("船运");
|
|
|
+ tranSettlementReport.setTranTypeKey("3");
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ //运输单价不为空
|
|
|
+ if (warehouseInOutInfo.getFreight()!=null){
|
|
|
+ //应付
|
|
|
+ tranSettlementReport.setAmountIngPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(warehouseInOutInfo.getFreight()));
|
|
|
+ }
|
|
|
+ tranSettlementReport.setLoadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setLoadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
}
|
|
|
if (warehouseBaseInfo != null) {
|
|
|
//出库时打入成本
|
|
@@ -4328,38 +4304,39 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
warehouseInOutInfo.setTranCarNo(tranCarNo);
|
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
|
tranCarInfoService.insert(tranCarInfo);
|
|
|
- //生成汽运报表
|
|
|
- TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
- tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
- tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
- tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
- if ("汽运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
- tranSettlementReport.setTranType("汽运");
|
|
|
- tranSettlementReport.setTranTypeKey("1");
|
|
|
- } else if ("火运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
- tranSettlementReport.setTranType("火运");
|
|
|
- tranSettlementReport.setTranTypeKey("2");
|
|
|
- } else {
|
|
|
- tranSettlementReport.setTranType("船运");
|
|
|
- tranSettlementReport.setTranTypeKey("3");
|
|
|
- }
|
|
|
- tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
- tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
- tranSettlementReport.setStartAddress(warehouseInOutInfo.getWarehouseName());
|
|
|
- tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
- //运输单价不为空
|
|
|
- if (warehouseInOutInfo.getFreight()!=null){
|
|
|
- //应付
|
|
|
- tranSettlementReport.setAmountIngPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
- //未付
|
|
|
- tranSettlementReport.setAmountNotPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
- tranSettlementReport.setTransportPrice(Float.valueOf(warehouseInOutInfo.getFreight()));
|
|
|
- }
|
|
|
- tranSettlementReport.setLoadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
- tranSettlementReport.setLoadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
- tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
- tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
- tranSettlementReportService.insert(tranSettlementReport);
|
|
|
+ }
|
|
|
+ //生成汽运报表
|
|
|
+ TranSettlementReport tranSettlementReport = new TranSettlementReport();
|
|
|
+ tranSettlementReport.setCompId(warehouseBaseInfo.getCompId());
|
|
|
+ tranSettlementReport.setCarId(warehouseInOutInfo.getCarId());
|
|
|
+ tranSettlementReport.setId(IdGenerator.generateUUID());
|
|
|
+ if ("汽运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
+ tranSettlementReport.setTranType("汽运");
|
|
|
+ tranSettlementReport.setTranTypeKey("1");
|
|
|
+ } else if ("火运".equals(warehouseInOutInfo.getOutType())) {
|
|
|
+ tranSettlementReport.setTranType("火运");
|
|
|
+ tranSettlementReport.setTranTypeKey("2");
|
|
|
+ } else {
|
|
|
+ tranSettlementReport.setTranType("船运");
|
|
|
+ tranSettlementReport.setTranTypeKey("3");
|
|
|
+ }
|
|
|
+ tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
+ tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setStartAddress(warehouseInOutInfo.getWarehouseName());
|
|
|
+ tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ //运输单价不为空
|
|
|
+ if (warehouseInOutInfo.getFreight()!=null){
|
|
|
+ //应付
|
|
|
+ tranSettlementReport.setAmountIngPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
+ //未付
|
|
|
+ tranSettlementReport.setAmountNotPayable(Float.valueOf(warehouseInOutInfo.getFreight()) * tranSettlementReport.getSettlementWeight());
|
|
|
+ tranSettlementReport.setTransportPrice(Float.valueOf(warehouseInOutInfo.getFreight()));
|
|
|
+ }
|
|
|
+ tranSettlementReport.setLoadingImg(warehouseInOutInfo.getAddressUrl());
|
|
|
+ tranSettlementReport.setLoadingWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
+ tranSettlementReport.setStatusFlag(StatusEnum.PENDING_PAY.getFlag());
|
|
|
+ tranSettlementReport.setStatus(StatusEnum.PENDING_PAY.getName());
|
|
|
+ tranSettlementReportService.insert(tranSettlementReport);
|
|
|
// boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(tranSettlementReport.getWorkflowId());
|
|
|
// // 不是退回的单子
|
|
|
// if (isStartWorkflow) {
|
|
@@ -4384,7 +4361,6 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
// tranSettlementReportService.updateById(tranSettlementReport);
|
|
|
// workflowService.activateInstance(tranSettlementReport.getWorkflowId(), tranSettlementReport.getId());
|
|
|
// }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
if (warehouseInOutInfo.getWeighingManagement() != null) {
|