修复了一些bug
This commit is contained in:
parent
d8531a429a
commit
93c3a48b35
|
@ -255,9 +255,9 @@ public class AchievementsController extends BaseController {
|
|||
|
||||
@ApiOperation("根据领域获取领域详情")
|
||||
@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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,7 +118,7 @@ public interface IAchievementsService {
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -592,7 +592,7 @@ public class AchievementsServiceImpl implements IAchievementsService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AchDetailVo getAreaDetail(String areaKey, String source) {
|
||||
public AchDetailVo getAreaDetail(String areaKey,String kyxmSum, String source) {
|
||||
AchDetailVo achDetailVo = new AchDetailVo();
|
||||
AchQueryVo achQueryVo = new AchQueryVo();
|
||||
achQueryVo.setAreaQuery(areaKey);
|
||||
|
|
|
@ -571,31 +571,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
z.name as "areaName",
|
||||
z.field_1 as "areaKey",
|
||||
z.remark as "remark",
|
||||
z.source as "source",
|
||||
sum(z.kyxm) as "kyxmSum",
|
||||
sum(z.ckrw) as "ckrwSum",
|
||||
sum(z.kfjs) as "kfjsSum",
|
||||
sum(z.xqcg) as "xqcgSum"
|
||||
from (
|
||||
select r.name,
|
||||
select
|
||||
r.name,
|
||||
r.field_1,
|
||||
r.remark,
|
||||
r.sorceType as "source",
|
||||
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 = 3 then tmp else 0 end as "kfjs",
|
||||
case when r.source = 4 then tmp else 0 end as "xqcg"
|
||||
from (
|
||||
select t.name,t.source,count(1) as "tmp",t.field_1,t.remark
|
||||
select
|
||||
t.name,t.source,count(1) as "tmp",t.field_1,t.remark,t.sorceType
|
||||
from (
|
||||
select c.name,a.source, a.field_1,c.remark
|
||||
select c.name,a.source, a.field_1,c.remark,"1" as sorceType
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
) z
|
||||
<where>
|
||||
|
@ -603,7 +607,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and z.field_1 = #{areaKey}
|
||||
</if>
|
||||
</where>
|
||||
group by z.name, z.field_1, z.remark
|
||||
group by z.name, z.field_1, z.remark, z.source
|
||||
</if>
|
||||
<if test='source=="1"'>
|
||||
select
|
||||
|
|
Loading…
Reference in New Issue