Browse Source

fix:个人信息更新修改

master
wang 5 days ago
parent
commit
acb02c7286
  1. 2
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/dao/ServiceApplicationsDao.java
  2. 16
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/service/ServiceApplicationsService.java
  3. 16
      yun-admin/src/main/resources/mapper/service/ServiceApplicationsMapper.xml

2
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/dao/ServiceApplicationsDao.java

@ -162,7 +162,7 @@ public interface ServiceApplicationsDao extends BaseMapper<ServiceApplicationsEn
List<LawyerActivityCountVO> getLawyerActivityDetail(@Param("userId") Long userId, @Param("queryForm") LawyerStatisticsQueryFormPage queryForm);
/**
* 查询律所列表分页
* 查询律所列表分页按活动总数排序
*/
List<FirmActivityCountVO> getFirmActivityCount(@Param("page") Page<?> page, @Param("queryForm") LawyerStatisticsQueryFormPage queryForm);

16
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/service/ServiceApplicationsService.java

@ -2226,7 +2226,7 @@ public class ServiceApplicationsService {
// 设置时间范围(根据季度参数设置)
setTimeRangeByQuarter(queryForm);
// 使用 SmartPageUtil 创建分页对象,查询律所列表
// 使用 SmartPageUtil 创建分页对象,查询律所列表(已按活动总数降序排序)
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
List<FirmActivityCountVO> firmList = serviceApplicationsDao.getFirmActivityCount(page, queryForm);
@ -2268,6 +2268,13 @@ public class ServiceApplicationsService {
lawyer.setActivityList(activityList);
lawyer.setTotalCount(lawyerTotalCount);
}
// 按律师的活动总次数降序排序
firmLawyers.sort((a, b) -> {
int countA = a.getTotalCount() != null ? a.getTotalCount() : 0;
int countB = b.getTotalCount() != null ? b.getTotalCount() : 0;
return Integer.compare(countB, countA);
});
}
firm.setLawyerList(firmLawyers);
@ -2304,13 +2311,6 @@ public class ServiceApplicationsService {
firm.setTotalCount(totalCount);
}
// 按服务总次数降序排序
firmList.sort((a, b) -> {
int countA = a.getTotalCount() != null ? a.getTotalCount() : 0;
int countB = b.getTotalCount() != null ? b.getTotalCount() : 0;
return Integer.compare(countB, countA);
});
return SmartPageUtil.convert2PageResult(page, firmList);
}

16
yun-admin/src/main/resources/mapper/service/ServiceApplicationsMapper.xml

@ -831,11 +831,12 @@
ORDER BY g.goods_id
</select>
<!-- 查询律所列表(分页) -->
<!-- 查询律所列表(分页,按活动总数排序-->
<select id="getFirmActivityCount" resultType="net.lab1024.sa.admin.module.service.domain.vo.FirmActivityCountVO">
SELECT DISTINCT
SELECT
d.department_id AS firmId,
d.department_name AS firmName
d.department_name AS firmName,
COUNT(tsa.application_id) AS totalCount
FROM t_service_applications tsa
LEFT JOIN t_department d ON tsa.firm_id = d.department_id
WHERE tsa.deleted_flag = 0
@ -843,7 +844,14 @@
<if test="queryForm.firmId != null and queryForm.firmId != ''">
AND tsa.firm_id = #{queryForm.firmId}
</if>
ORDER BY d.department_id
<if test="queryForm.startTime != null and queryForm.startTime != ''">
AND tsa.association_audit_time &gt;= #{queryForm.startTime}
</if>
<if test="queryForm.endTime != null and queryForm.endTime != ''">
AND tsa.association_audit_time &lt;= #{queryForm.endTime}
</if>
GROUP BY d.department_id, d.department_name
ORDER BY totalCount DESC
</select>
<!-- 查询指定律所下的所有律师 -->

Loading…
Cancel
Save