Explorar o código

修改列表排序顺序

ljx %!s(int64=4) %!d(string=hai) anos
pai
achega
049af45c4a

+ 1 - 0
src/main/java/com/imed/costaccount/service/impl/AccountingProductServiceImpl.java

@@ -48,6 +48,7 @@ public class AccountingProductServiceImpl extends ServiceImpl<AccountingProductM
         List<Accounting> list = accountingMapper.selectList(
                 new LambdaQueryWrapper<Accounting>()
                         .eq(Accounting::getHospId, user.getHospId())
+                .orderByDesc(Accounting::getCreateTime)
         );
 
         if (CollUtil.isEmpty(list)) {

+ 1 - 0
src/main/java/com/imed/costaccount/service/impl/AccountingServiceImpl.java

@@ -40,6 +40,7 @@ public class AccountingServiceImpl extends ServiceImpl<AccountingMapper, Account
         List<Accounting> list = this.list(
                 new LambdaQueryWrapper<Accounting>()
                         .eq(Accounting::getHospId, user.getHospId())
+                .orderByDesc(Accounting::getCreateTime)
         );
         if (CollUtil.isEmpty(list)) {
             return Collections.emptyList();

+ 2 - 0
src/main/java/com/imed/costaccount/service/impl/ResponsibilityServiceImpl.java

@@ -47,6 +47,7 @@ public class ResponsibilityServiceImpl extends ServiceImpl<ResponsibilityMapper,
         List<Responsibility> list = this.list(
                 new LambdaQueryWrapper<Responsibility>()
                         .eq(Responsibility::getHospId, user.getHospId())
+                        .orderByDesc(Responsibility::getCreateTime)
         );
         if (CollUtil.isEmpty(list)) {
             return Collections.emptyList();
@@ -255,6 +256,7 @@ public class ResponsibilityServiceImpl extends ServiceImpl<ResponsibilityMapper,
                 new LambdaQueryWrapper<Responsibility>()
                         .eq(Responsibility::getHospId, user.getHospId())
                         .eq(Responsibility::getParentId, 0)
+                .orderByDesc(Responsibility::getCreateTime)
         );
         if (CollUtil.isEmpty(parentList)) {
             throw new CostException(ErrorCodeEnum.DATA_NOT_EXIST);