修复了一些bug

This commit is contained in:
13036795865 2025-06-21 13:53:00 +08:00
parent d8531a429a
commit 93c3a48b35
4 changed files with 17 additions and 13 deletions

View File

@ -255,9 +255,9 @@ public class AchievementsController extends BaseController {
@ApiOperation("根据领域获取领域详情") @ApiOperation("根据领域获取领域详情")
@GetMapping("/getAreaDetail") @GetMapping("/getAreaDetail")
public AjaxResult getAreaDetail(String areaKey,String source) public AjaxResult getAreaDetail(String areaKey,String kyxmSum,String source)
{ {
return success(achievementsService.getAreaDetail(areaKey,source)); return success(achievementsService.getAreaDetail(areaKey,kyxmSum,source));
} }
/** /**

View File

@ -118,7 +118,7 @@ public interface IAchievementsService {
List<CompetitionResourceLibrary> getRelatedAchCompetitionOfExpert(Long id); List<CompetitionResourceLibrary> getRelatedAchCompetitionOfExpert(Long id);
AchDetailVo getAreaDetail(String areaKey, String source); AchDetailVo getAreaDetail(String areaKey,String kyxmSum, String source);
List<KeyValVo<String, Long>> get7DayAddExport(AchQueryVo achQueryVo); List<KeyValVo<String, Long>> get7DayAddExport(AchQueryVo achQueryVo);

View File

@ -592,7 +592,7 @@ public class AchievementsServiceImpl implements IAchievementsService {
} }
@Override @Override
public AchDetailVo getAreaDetail(String areaKey, String source) { public AchDetailVo getAreaDetail(String areaKey,String kyxmSum, String source) {
AchDetailVo achDetailVo = new AchDetailVo(); AchDetailVo achDetailVo = new AchDetailVo();
AchQueryVo achQueryVo = new AchQueryVo(); AchQueryVo achQueryVo = new AchQueryVo();
achQueryVo.setAreaQuery(areaKey); achQueryVo.setAreaQuery(areaKey);

View File

@ -571,31 +571,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
z.name as "areaName", z.name as "areaName",
z.field_1 as "areaKey", z.field_1 as "areaKey",
z.remark as "remark", z.remark as "remark",
z.source as "source",
sum(z.kyxm) as "kyxmSum", sum(z.kyxm) as "kyxmSum",
sum(z.ckrw) as "ckrwSum", sum(z.ckrw) as "ckrwSum",
sum(z.kfjs) as "kfjsSum", sum(z.kfjs) as "kfjsSum",
sum(z.xqcg) as "xqcgSum" sum(z.xqcg) as "xqcgSum"
from ( from (
select r.name, select
r.name,
r.field_1, r.field_1,
r.remark, r.remark,
r.sorceType as "source",
case when r.source = 1 then tmp else 0 end as "kyxm", case when r.source = 1 then tmp else 0 end as "kyxm",
case when r.source = 2 then tmp else 0 end as "ckrw", case when r.source = 2 then tmp else 0 end as "ckrw",
case when r.source = 3 then tmp else 0 end as "kfjs", case when r.source = 3 then tmp else 0 end as "kfjs",
case when r.source = 4 then tmp else 0 end as "xqcg" case when r.source = 4 then tmp else 0 end as "xqcg"
from ( from (
select t.name,t.source,count(1) as "tmp",t.field_1,t.remark select
from ( t.name,t.source,count(1) as "tmp",t.field_1,t.remark,t.sorceType
select c.name,a.source, a.field_1,c.remark from (
select c.name,a.source, a.field_1,c.remark,"1" as sorceType
from achievements a from achievements a
left join project_categories c on a.field_1 = c.id where a.source='1' left join project_categories c on a.field_1 = c.id where a.source='1' and c.name is not null
union all union all
select c.name, a.source, a.field_1, c.remark select c.name, a.source, a.field_1, c.remark,"2" as sorceType
from achievements a from achievements a
left join categories c on a.field_1 = c.id where a.source in ('2','3','4') left join categories c on a.field_1 = c.id where a.source in ('2','3','4') and c.name is not null
)t )t
where t.field_1 is not null and t.field_1 !="" where t.field_1 is not null and t.field_1 !=""
group by t.name, t.source, t.field_1, t.remark group by t.name, t.source, t.field_1, t.remark,t.sorceType
) r ) r
) z ) z
<where> <where>
@ -603,7 +607,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and z.field_1 = #{areaKey} and z.field_1 = #{areaKey}
</if> </if>
</where> </where>
group by z.name, z.field_1, z.remark group by z.name, z.field_1, z.remark, z.source
</if> </if>
<if test='source=="1"'> <if test='source=="1"'>
select select