Jelajahi Sumber

问题处理

yzc 2 tahun lalu
induk
melakukan
0a21f5ecfd

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

@@ -77,7 +77,10 @@ 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.orderByDesc("ap.status", "arf.payment_time", "arf.create_time");
+        // 请款审批状态 按 审批中、已通过、未通过 排序
+        wrapper.orderByAsc("case arf.status when 10 then 1 when 30 then 2 else 3 END");
+        // 同状态按发起时间倒序排序
+        wrapper.orderByDesc("arf.create_time");
         Page<AccountRequestFundsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
 
         List<AccountRequestFundsVo> records = page.getRecords();
@@ -163,11 +166,6 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
         }
 
         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

@@ -39,6 +39,8 @@
                 LEFT JOIN bytesailing_sale.contract c ON arfd.contract_id = c.id
         WHERE
             arfd.account_request_funds_id = #{accountRequestFundsId}
+        GROUP BY
+            arfd.id
     </select>
 
     <select id="getList" resultType="com.fjhx.account.entity.account.po.AccountRequestFundsDetail">