瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

24282 2 年之前
父節點
當前提交
7ce962a7a4

+ 4 - 23
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountPaymentServiceImpl.java

@@ -22,7 +22,6 @@ import com.fjhx.account.service.account.AccountPaymentService;
 import com.fjhx.account.service.account.AccountRemainderService;
 import com.fjhx.account.service.account.AccountRunningWaterService;
 import com.fjhx.common.constant.SourceConstant;
-import com.fjhx.common.entity.corporation.po.Corporation;
 import com.fjhx.common.service.corporation.CorporationService;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.ruoyi.common.core.domain.BasePo;
@@ -68,28 +67,10 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
     public Page<AccountPaymentVo> getPage(AccountRequestFundsSelectDto dto) {
 
         QueryWrapper<Object> wrapper = Wrappers.query();
-        //付款状态
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getPaymentStatus()),"ap.status",dto.getPaymentStatus());
-        wrapper.like(ObjectUtil.isNotEmpty(dto.getKeyword()),"ap.payment_remark",dto.getKeyword());
-        wrapper.orderByDesc("ap.status","ap.payment_time","ap.create_time");
-        //归属公司
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getCorporationId()),"ap.corporation_id",dto.getCorporationId());
-        //归属部门
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getDepartmentId()),"ap.corporation_id",dto.getDepartmentId());
-        //申请人
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getCreateUser()),"ap.create_user",dto.getCreateUser());
-        //打款类型
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getType()),"ap.type",dto.getType());
-        //用款时间
-        wrapper.ge(ObjectUtil.isNotEmpty(dto.getBeginTime()),"ap.payment_time",dto.getBeginTime());
-        wrapper.le(ObjectUtil.isNotEmpty(dto.getEndTime()),"ap.payment_time",dto.getEndTime());
-        //币种
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getCurrency()),"ap.currency",dto.getCurrency());
-        //交易金额
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getStartAmount()),"ap.amount",dto.getStartAmount());
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getEndAmount()),"ap.amount",dto.getEndAmount());
-        //款项说明
-        wrapper.eq(ObjectUtil.isNotEmpty(dto.getPaymentRemark()),"ap.payment_remark",dto.getPaymentRemark());
+        wrapper.eq(ObjectUtil.isNotEmpty(dto.getPaymentStatus()), "ap.status", dto.getPaymentStatus());
+        wrapper.like(ObjectUtil.isNotEmpty(dto.getKeyword()), "ap.payment_remark", dto.getKeyword());
+        wrapper.orderByDesc("ap.status", "ap.create_time");
+
         Page<AccountPaymentVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
         List<AccountPaymentVo> records = page.getRecords();
         if (records.size() == 0) {

+ 1 - 16
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java

@@ -9,12 +9,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.account.entity.account.dto.AccountRequestFundsDto;
 import com.fjhx.account.entity.account.dto.AccountRequestFundsSelectDto;
-import com.fjhx.account.entity.account.po.AccountManagement;
 import com.fjhx.account.entity.account.po.AccountRequestFunds;
 import com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo;
 import com.fjhx.account.entity.account.vo.AccountRequestFundsVo;
 import com.fjhx.account.mapper.account.AccountRequestFundsMapper;
-import com.fjhx.account.service.account.AccountManagementService;
 import com.fjhx.account.service.account.AccountRequestFundsDetailService;
 import com.fjhx.account.service.account.AccountRequestFundsService;
 import com.fjhx.common.constant.SourceConstant;
@@ -22,10 +20,9 @@ import com.fjhx.common.entity.corporation.po.Corporation;
 import com.fjhx.common.service.corporation.CorporationService;
 import com.fjhx.flow.entity.flow.po.FlowExample;
 import com.fjhx.flow.service.flow.FlowExampleService;
-import com.obs.services.internal.ServiceException;
 import com.ruoyi.common.core.domain.BasePo;
 import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.utils.UserUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -60,9 +57,6 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
     @Autowired
     private FlowExampleService flowExampleService;
 
-    @Autowired
-    private AccountManagementService accountManagementService;
-
     /**
      * 查询请款列表
      *
@@ -77,8 +71,6 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
         wrapper.eq(ObjectUtil.isNotEmpty(dto.getPaymentStatus()), "ap.status", dto.getPaymentStatus());
         wrapper.like(ObjectUtil.isNotEmpty(dto.getKeyword()), "arf.payment_remarks", dto.getKeyword());
         wrapper.eq(ObjectUtil.isNotEmpty(dto.getWriteOffStatus()), "arf.write_off_status", dto.getWriteOffStatus());
-        //添加权限自己看自己
-        wrapper.eq("arf.create_user", SecurityUtils.getUserId());
         // 请款审批状态 按 审批中、已通过、未通过 排序
         wrapper.orderByAsc("case arf.status when 10 then 1 when 30 then 2 else 3 END");
         // 同状态按发起时间倒序排序
@@ -140,10 +132,6 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
 
         accountRequestFundsVo.setAccountRequestFundsDetailList(accountRequestFundsDetailVos);
 
-        //赋值账户名称
-        AccountManagement accountManagement = accountManagementService.getById(accountRequestFundsVo.getAccountManagementId());
-        accountRequestFundsVo.setAccountManagementName(accountManagement.getName());
-
         // 查询归属公司的名称
         Corporation corporation = corporationService.getById(accountRequestFundsVo.getCorporationId());
         if (ObjectUtil.isEmpty(corporation)) {
@@ -153,20 +141,17 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
 
         // 切换数据源
         DynamicDataSourceContextHolder.push(SourceConstant.BASE);
-
         // 查询部门名称信息
         SysDept sysDept = sysDeptService.getById(accountRequestFundsVo.getDepartmentId());
         if (ObjectUtil.isEmpty(sysDept)) {
             throw new ServiceException("没有找到归属部门信息");
         }
         accountRequestFundsVo.setDeptName(sysDept.getDeptName());
-
         // 赋值流程实例id
         FlowExample flowExample = flowExampleService.getOne(q -> q.eq(FlowExample::getBusinessId, accountRequestFunds.getId()));
         if (ObjectUtil.isNotEmpty(flowExample)) {
             accountRequestFundsVo.setFlowInfoId(flowExample.getId());
         }
-
         DynamicDataSourceContextHolder.poll();
 
         return accountRequestFundsVo;

+ 3 - 1
hx-purchase/src/main/java/com/fjhx/purchase/service/pay/impl/PayServiceImpl.java

@@ -3,7 +3,6 @@ package com.fjhx.purchase.service.pay.impl;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -30,6 +29,7 @@ import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.wrapper.IWrapper;
 import com.ruoyi.common.utils.wrapper.SqlField;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -37,6 +37,8 @@ import org.springframework.stereotype.Service;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
+
+
 /**
  * <p>
  * 采购付款 服务实现类