|
@@ -4051,6 +4051,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setStartAddress(warehouseInOutInfo.getWarehouseName());
|
|
|
tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
//运输单价不为空
|
|
|
if (tranProcessInfo.getTranPrice()!=null){
|
|
@@ -4190,60 +4191,61 @@ 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())));
|
|
|
- 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);
|
|
|
+ //生成汽运报表
|
|
|
+ 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())));
|
|
|
+ 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 {
|
|
|
|
|
|
- // 设置状态 已提交审核
|
|
|
- tranSettlementReport.setWorkflowId(workflow.getId());
|
|
|
tranSettlementReportService.updateById(tranSettlementReport);
|
|
|
- workflowService.startInstance(workflow.getId(), tranSettlementReport.getId());
|
|
|
+ workflowService.activateInstance(tranSettlementReport.getWorkflowId(), tranSettlementReport.getId());
|
|
|
}
|
|
|
}
|
|
|
- // 退回的单子 再启用
|
|
|
- else {
|
|
|
-
|
|
|
- tranSettlementReportService.updateById(tranSettlementReport);
|
|
|
- workflowService.activateInstance(tranSettlementReport.getWorkflowId(), tranSettlementReport.getId());
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
if (warehouseInOutInfo.getWeighingManagement() != null) {
|
|
@@ -4747,6 +4749,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
}
|
|
|
tranSettlementReport.setContractNo(warehouseInOutInfo.getContractNo());
|
|
|
tranSettlementReport.setCarNo(warehouseInOutInfo.getCarNo());
|
|
|
+ tranSettlementReport.setStartAddress(warehouseInOutInfo.getWarehouseName());
|
|
|
tranSettlementReport.setSettlementWeight(Float.valueOf(String.valueOf(warehouseInOutInfo.getNetWeight())));
|
|
|
//运输单价不为空
|
|
|
if (warehouseInOutInfo.getFreight()!=null){
|