左边导航统计
This commit is contained in:
parent
725ab89e69
commit
ea517025f4
|
@ -16,6 +16,7 @@ import org.springblade.core.mp.support.Query;
|
|||
import org.springblade.core.tool.api.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
|
@ -103,7 +104,18 @@ public class DisasterInfoController {
|
|||
*/
|
||||
@GetMapping("/disasterStatistics")
|
||||
public R<List<GroupByUse>> getDisasterStatistics(String name) {
|
||||
return R.data(disasterInfoService.getDisasterStatistics(name));
|
||||
List<GroupByUse> groupByUseList = new ArrayList<>();
|
||||
if("searchSponsorOrganization".equals(name)){
|
||||
//发起机构方法 第三个左边栏
|
||||
groupByUseList = disasterInfoService.getLeft3Data();
|
||||
} else if ("searchResponseOrganization".equals(name)) {
|
||||
//发起机构方法 第四个左边栏
|
||||
groupByUseList = disasterInfoService.getLeft4Data();
|
||||
}else{
|
||||
groupByUseList = disasterInfoService.getDisasterStatistics(name);
|
||||
}
|
||||
|
||||
return R.data(groupByUseList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,5 +37,7 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
|||
|
||||
List<UserTenantVo> getAllUser();
|
||||
|
||||
List<GroupByUse> getLeftData();
|
||||
List<GroupByUse> getLeft3Data();
|
||||
|
||||
List<GroupByUse> getLeft4Data();
|
||||
}
|
||||
|
|
|
@ -84,10 +84,6 @@
|
|||
where d.respond_status=#{respondStatus}
|
||||
order by d.disaster_time desc
|
||||
</select>
|
||||
<select id="getLeftData" resultType="com.kening.vordm.vo.GroupByUse">
|
||||
select t.sponsor_organization as `name`, count(*) as cnt from disaster_info t GROUP BY t.sponsor_organization ORDER BY cnt desc LIMIT 3
|
||||
</select>
|
||||
|
||||
<select id="getAllUser" resultType="com.kening.vordm.vo.UserTenantVo">
|
||||
SELECT
|
||||
bu.organization AS organizationId,
|
||||
|
@ -97,5 +93,11 @@
|
|||
LEFT JOIN blade_tenant bt ON bt.id = bu.organization
|
||||
GROUP BY bu.organization
|
||||
</select>
|
||||
<select id="getLeft3Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||
select t.sponsor_organization as `name`, count(*) as cnt from disaster_info t GROUP BY t.sponsor_organization ORDER BY cnt desc LIMIT 3
|
||||
</select>
|
||||
<select id="getLeft4Data" resultType="com.kening.vordm.vo.GroupByUse">
|
||||
select t.response_organization as `name`, count(*) as cnt from guest_manage_disaster_ref t GROUP BY t.response_organization ORDER BY cnt desc LIMIT 3
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -43,5 +43,7 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
|||
|
||||
List<UserTenantVo> getAllUser();
|
||||
|
||||
List<GroupByUse> getLeftData();
|
||||
List<GroupByUse> getLeft3Data();
|
||||
|
||||
List<GroupByUse> getLeft4Data();
|
||||
}
|
||||
|
|
|
@ -94,8 +94,18 @@ implements DisasterInfoService {
|
|||
return this.baseMapper.getAllUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GroupByUse> getLeft3Data() {
|
||||
return this.baseMapper.getLeft3Data();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GroupByUse> getLeft4Data() {
|
||||
return this.baseMapper.getLeft4Data();
|
||||
}
|
||||
|
||||
public List<GroupByUse> getLeftData() {
|
||||
return this.baseMapper.getLeftData();
|
||||
return this.baseMapper.getLeft4Data();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue