yzc 2 年 前
コミット
31f4cca826

+ 4 - 6
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java

@@ -20,9 +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.exception.ServiceException;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.utils.UserUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -141,23 +141,21 @@ 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();
-        //赋值流程id
-        FlowExample flowExample = flowExampleService.getOne(q -> q.eq(FlowExample::getBusinessId, accountRequestFunds.getId()));
-        if (ObjectUtil.isNotEmpty(flowExample)) {
-            accountRequestFundsVo.setFlowInfoId(flowExample.getId());
-        }
 
         return accountRequestFundsVo;
     }

+ 2 - 0
hx-account/src/main/resources/mapper/account/AccountRequestFundsDetailMapper.xml

@@ -37,5 +37,7 @@
                 LEFT JOIN bytesailing_sale.contract c ON arfd.contract_id = c.id
         WHERE
             arfd.account_request_funds_id = #{accountRequestFundsId}
+        GROUP BY
+            arfd.id
     </select>
 </mapper>