فهرست منبع

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz 3 سال پیش
والد
کامیت
354f945c8e

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranCarInfoController.java

@@ -64,7 +64,7 @@ public class TranCarInfoController {
         tranCarInfoService.deleteTranCar(example.getId());
     }
     /**
-     * APP反馈
+     * APP保存反馈
      * @param tranCarInfo
      * @return
      */

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranCarInfoService.java

@@ -40,7 +40,7 @@ public interface ITranCarInfoService extends IService<TranCarInfo> {
      */
     void deleteTranCar(String id);
     /**
-     * APP反馈
+     * APP保存反馈
      *
      * @param tranCarInfo
      */

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PaymentManagementServiceImpl.java

@@ -1083,7 +1083,7 @@ public class PaymentManagementServiceImpl extends ServiceImpl<PaymentManagementM
                 cell.setCellValue(editString(paymentManagement1.getIdentityAuthenticationInfo().getBankDeposit() + "-" +paymentManagement1.getIdentityAuthenticationInfo().getBankDepositBranch()));
                 cell.setCellStyle(styleDetail);
                 cell = rowx.createCell(19);
-                cell.setCellValue(DateUtil.formatDate(paymentManagement1.getCreateDate() != null ? paymentManagement1.getCreateDate()  : addDateOneDay(new Date()), DateUtils.DATE_FMT_YYYY_MM_DD));
+                cell.setCellValue(DateUtil.formatDate(paymentManagement1.getCreateDate() != null ? paymentManagement1.getCreateDate()  : new Date(), DateUtils.DATE_FMT_YYYY_MM_DD));
                 cell.setCellStyle(styleDetail);
                 rownum++;
             }

+ 1 - 232
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranCarInfoServiceImpl.java

@@ -217,243 +217,12 @@ public class TranCarInfoServiceImpl extends ServiceImpl<TranCarInfoMapper, TranC
     }
 
     /**
-     * APP反馈
+     * APP保存反馈
      * @param tranCarInfo
      * @return
      */
     @Override
     public String feedbackTranCar(TranCarInfo tranCarInfo) {
-        //提交
-        if ("1".equals(tranCarInfo.getFlag())){
-            //卸车反馈时状态改为已送达
-            if (tranCarInfo.getUnloadNetWeight() > 0) {
-                tranCarInfo.setStatusFlag(StatusEnum.DELIVERED.getFlag());
-                tranCarInfo.setStatus(StatusEnum.DELIVERED.getName());
-            }
-            //装车反馈
-            else {
-                tranCarInfo.setStatusFlag(StatusEnum.LOADED.getFlag());
-                tranCarInfo.setStatus(StatusEnum.LOADED.getName());
-                TranProcessInfo tranProcessInfo=tranProcessInfoService.selectById(tranCarInfo.getProcessId());
-                TranTaskInfo tranTaskInfo=tranTaskInfoService.selectById(tranCarInfo.getInfoId());
-                //汽运类型
-                if (tranCarInfo.getTranType().equals(NumberConstant.CONSTANT1)) {
-                    List<TranSettlementReport> tranSettlementReportList = tranSettlementReportService.selectList(new EntityWrapper<TranSettlementReport>()
-                            .eq("car_id", tranCarInfo.getId()));
-                    if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
-                        if (tranCarInfo.getUnloadNetWeight() > 0) {
-                            for (TranSettlementReport tranSettlementReport : tranSettlementReportList) {
-                                tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                                tranSettlementReport.setUnloadingWeight(tranCarInfo.getUnloadNetWeight());
-                                tranSettlementReport.setUnloadingImg(tranCarInfo.getUnloadPoundImg());
-                                //损耗
-                                tranSettlementReport.setLossWeight(tranCarInfo.getLoadNetWeight() - tranCarInfo.getUnloadNetWeight());
-                                //结算重量
-                                if ("0".equals(tranSettlementReport.getManualFlag())) {
-                                    //卸车不为空时,结算重量=装卸取小
-                                    tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight() > tranCarInfo.getUnloadNetWeight() ? tranCarInfo.getUnloadNetWeight() : tranCarInfo.getLoadNetWeight());
-                                }
-                                //扣款
-                                if (tranSettlementReport.getLossWeight() <= (tranCarInfo.getLoadNetWeight() / 1000)) {
-                                    tranSettlementReport.setDeductionAmount("0");
-                                    //应付=单价x结算重量-扣款
-                                    tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight());
-                                } else {
-                                    tranSettlementReport.setDeductionAmount(String.format("%.2f", (Float.valueOf(tranCarInfo.getLoadNetWeight() - tranCarInfo.getUnloadNetWeight()) - (tranCarInfo.getLoadNetWeight() / 1000)) * Float.valueOf(tranCarInfo.getTranPrice())));
-                                    //应付=单价x结算重量-扣款
-                                    tranSettlementReport.setAmountIngPayable(tranSettlementReport.getTransportPrice() * tranSettlementReport.getSettlementWeight() - Float.valueOf(tranSettlementReport.getDeductionAmount()));
-                                }
-                                tranSettlementReportService.updateById(tranSettlementReport);
-                            }
-                        }
-                    } else {
-                        //生成汽运报表
-                        TranSettlementReport tranSettlementReport = new TranSettlementReport();
-                        tranSettlementReport.setCompId(tranTaskInfo.getCompId());
-                        tranSettlementReport.setCarId(tranCarInfo.getId());
-                        tranSettlementReport.setId(IdGenerator.generateUUID());
-                        tranSettlementReport.setTranType("汽运");
-                        tranSettlementReport.setTranTypeKey("1");
-                        tranSettlementReport.setContractNo(tranTaskInfo.getContractNo());
-                        tranSettlementReport.setProcessNo(tranProcessInfo.getProcessNo());
-                        tranSettlementReport.setName(tranCarInfo.getDriver());
-                        tranSettlementReport.setPhone(tranCarInfo.getDriverPhone());
-                        tranSettlementReport.setCarNo(tranCarInfo.getCarNo());
-                        //查询账户信息
-                        List<DriverViewInfo> driverViewInfoList = driverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
-                                .eq("driver_name", tranCarInfo.getDriver())
-                                .eq("delete_flag", "0"));
-                        if (!CollectionUtils.isEmpty(driverViewInfoList)) {
-                            for (DriverViewInfo driverViewInfo : driverViewInfoList) {
-                                List<DriverPayeeInfo> driverPayeeInfoList = driverPayeeInfoService.selectList(new EntityWrapper<DriverPayeeInfo>()
-                                        .eq("driver_id", driverViewInfo.getId())
-                                        .eq("delete_flag", "0"));
-                                if (!CollectionUtils.isEmpty(driverPayeeInfoList)) {
-                                    //本次收款账户
-                                    tranSettlementReport.setCardNo(driverPayeeInfoList.get(0).getBankCard());
-                                }
-                            }
-                        }
-                        tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight());
-                        //应付
-                        tranSettlementReport.setAmountIngPayable(tranProcessInfo.getTranPrice() * tranSettlementReport.getSettlementWeight());
-                        //未付
-                        tranSettlementReport.setAmountNotPayable(tranProcessInfo.getTranPrice() * tranSettlementReport.getSettlementWeight());
-                        tranSettlementReport.setTranCarNo(tranCarInfo.getTranCarNo());
-                        tranSettlementReport.setLoadingWeight(tranCarInfo.getLoadNetWeight());
-                        tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                        tranSettlementReport.setTransportPrice(tranProcessInfo.getTranPrice());
-                        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());
-                        }
-                    }
-                }
-                //火运类型
-                else if (tranCarInfo.getTranType().equals(NumberConstant.CONSTANT2)) {
-                    List<TranSettlementReport> tranSettlementReportList = tranSettlementReportService.selectList(new EntityWrapper<TranSettlementReport>()
-                            .eq("car_id", tranCarInfo.getId()));
-                    if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
-                        if (tranCarInfo.getUnloadNetWeight() > 0) {
-                            for (TranSettlementReport tranSettlementReport : tranSettlementReportList) {
-                                tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                                tranSettlementReport.setUnloadingWeight(tranCarInfo.getUnloadNetWeight());
-                                tranSettlementReport.setUnloadingImg(tranCarInfo.getUnloadPoundImg());
-                                //损耗
-                                tranSettlementReport.setLossWeight(tranCarInfo.getLoadNetWeight() - tranCarInfo.getUnloadNetWeight());
-                                tranSettlementReportService.updateById(tranSettlementReport);
-                            }
-                        }
-                    } else {
-                        //生成火运报表
-                        TranSettlementReport tranSettlementReport = new TranSettlementReport();
-                        tranSettlementReport.setCompId(tranTaskInfo.getCompId());
-                        tranSettlementReport.setCarId(tranCarInfo.getId());
-                        tranSettlementReport.setId(IdGenerator.generateUUID());
-                        tranSettlementReport.setTranType("火运");
-                        tranSettlementReport.setTranTypeKey("2");
-                        tranSettlementReport.setContractNo(tranTaskInfo.getContractNo());
-                        tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
-                        tranSettlementReport.setProcessNo(tranProcessInfo.getProcessNo());
-                        tranSettlementReport.setBoxNo(tranCarInfo.getBoxNo());
-                        tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight());
-                        tranSettlementReport.setLoadingWeight(tranCarInfo.getLoadNetWeight());
-                        tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                        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());
-                        }
-                    }
-                }
-                //船运类型
-                else if (tranCarInfo.getTranType().equals(NumberConstant.CONSTANT3)) {
-                    List<TranSettlementReport> tranSettlementReportList = tranSettlementReportService.selectList(new EntityWrapper<TranSettlementReport>()
-                            .eq("car_id", tranCarInfo.getId()));
-                    if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
-                        if (tranCarInfo.getUnloadNetWeight() > 0) {
-                            for (TranSettlementReport tranSettlementReport : tranSettlementReportList) {
-                                tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                                tranSettlementReport.setUnloadingWeight(tranCarInfo.getUnloadNetWeight());
-                                tranSettlementReport.setUnloadingImg(tranCarInfo.getUnloadPoundImg());
-                                //损耗
-                                tranSettlementReport.setLossWeight(tranCarInfo.getLoadNetWeight() - tranCarInfo.getUnloadNetWeight());
-                                tranSettlementReportService.updateById(tranSettlementReport);
-                            }
-                        }
-                    } else {
-                        //生成船运报表
-                        TranSettlementReport tranSettlementReport = new TranSettlementReport();
-                        tranSettlementReport.setCompId(tranTaskInfo.getCompId());
-                        tranSettlementReport.setCarId(tranCarInfo.getId());
-                        tranSettlementReport.setId(IdGenerator.generateUUID());
-                        tranSettlementReport.setTranType("船运");
-                        tranSettlementReport.setTranTypeKey("3");
-                        tranSettlementReport.setTaskNo(tranTaskInfo.getTaskNo());
-                        tranSettlementReport.setProcessNo(tranProcessInfo.getProcessNo());
-                        if ("集装箱".equals(tranCarInfo.getShipType())){
-                            tranSettlementReport.setBoxNo(tranCarInfo.getCaseNo());
-                        }
-                        else{
-                            tranSettlementReport.setBoxNo(tranCarInfo.getBinNumber());
-                        }
-                        tranSettlementReport.setShipType(tranCarInfo.getShipType());
-                        tranSettlementReport.setContractNo(tranTaskInfo.getContractNo());
-                        tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight());
-                        tranSettlementReport.setTranCarNo(tranCarInfo.getTranCarNo());
-                        tranSettlementReport.setLoadingWeight(tranCarInfo.getLoadNetWeight());
-                        tranSettlementReport.setLoadingImg(tranCarInfo.getLoadPoundImg());
-                        tranSettlementReport.setTransportPrice(tranProcessInfo.getTranPrice());
-                        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());
-                        }
-                    }
-                }
-            }
-        }
         this.updateById(tranCarInfo);
         return tranCarInfo.getId();
     }

+ 5 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -787,7 +787,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
                 contractManagementInfo.setInOutType("销售出库");
                 //期货取点价,现货取单价
-                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                if (contractManagementInfo.getUnitContractPrice()!=null) {
+                    contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                }
                 temp.add(contractManagementInfo);
             }
             List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
@@ -834,7 +836,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
                 contractManagementInfo.setInOutType("采购入库");
                 //期货取点价,现货取单价
-                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
                 temp.add(contractManagementInfo);
             }
             List<InOutWarehouseTask> inOutWarehouseTaskList = iInOutWarehouseTaskService.selectList(new EntityWrapper<InOutWarehouseTask>()
@@ -928,7 +930,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
                 contractManagementInfo.setInOutType("采购入库");
                 //期货取点价,现货取单价
-                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice()!=null?contractManagementInfo.getPointPrice():Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
+                contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
                 temp.add(contractManagementInfo);
             }
             List<ContractManagementInfo> contractManagementInfoList1 = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PaymentManagementMapper.xml

@@ -108,6 +108,7 @@
         status_flag as statusFlag,
         update_date as updateDate,
         workflow_id as workflowId,
+        create_date as createDate,
         unit_deduction as unitDeduction
         FROM payment_management
         WHERE delete_flag = '0'