Commit 9a49095a authored by lcl's avatar lcl

add api

parent 0742dbf3
...@@ -48,6 +48,14 @@ public class BusinessOverviewController extends BaseController { ...@@ -48,6 +48,14 @@ public class BusinessOverviewController extends BaseController {
return AjaxResult.success(baseService.typeAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(), status))); return AjaxResult.success(baseService.typeAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(), status)));
} }
/**
* 项目类别分析
*/
@GetMapping("/category/analyze/{status}")
public AjaxResult categoryAnalyze(@PathVariable Integer status) {
return AjaxResult.success(baseService.categoryAnalyze(new BusinessSearchDto(SecurityUtils.getUserId(), status)));
}
/** /**
* 公招项目地区统计 * 公招项目地区统计
* *
......
...@@ -16,6 +16,10 @@ public class BusinessAnalyzeVo implements Serializable { ...@@ -16,6 +16,10 @@ public class BusinessAnalyzeVo implements Serializable {
* 项目类型 * 项目类型
*/ */
private String projectType; private String projectType;
/**
* 项目类别
*/
private String projectCategory;
/** /**
* 资金来源 * 资金来源
*/ */
......
...@@ -116,4 +116,6 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo> { ...@@ -116,4 +116,6 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo> {
List<BusinessAnalyzeVo> selectTypeAnalyze(BusinessSearchDto dto); List<BusinessAnalyzeVo> selectTypeAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> selectCategoryAnalyze(BusinessSearchDto dto);
} }
...@@ -20,6 +20,8 @@ public interface IBusinessOverviewService { ...@@ -20,6 +20,8 @@ public interface IBusinessOverviewService {
List<BusinessAnalyzeVo> typeAnalyze(BusinessSearchDto dto); List<BusinessAnalyzeVo> typeAnalyze(BusinessSearchDto dto);
List<BusinessAnalyzeVo> categoryAnalyze(BusinessSearchDto dto);
AjaxResult countGroupByProvince(JSONObject object); AjaxResult countGroupByProvince(JSONObject object);
AjaxResult rangByMoney(JSONObject object); AjaxResult rangByMoney(JSONObject object);
......
...@@ -60,6 +60,12 @@ public class BusinessOverviewServiceImpl implements IBusinessOverviewService { ...@@ -60,6 +60,12 @@ public class BusinessOverviewServiceImpl implements IBusinessOverviewService {
return businessInfoMapper.selectTypeAnalyze(dto); return businessInfoMapper.selectTypeAnalyze(dto);
} }
@Override
@DataScope(userAlias = "u",deptAlias = "d")
public List<BusinessAnalyzeVo> categoryAnalyze(BusinessSearchDto dto) {
return businessInfoMapper.selectCategoryAnalyze(dto);
}
@Override @Override
public AjaxResult countGroupByProvince(JSONObject object) { public AjaxResult countGroupByProvince(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/marketAnalysis/project/countGroupByProvince", object); Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/marketAnalysis/project/countGroupByProvince", object);
......
...@@ -401,6 +401,17 @@ ...@@ -401,6 +401,17 @@
bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/> <include refid="businessSearchSql"/>
group by bi.project_type group by bi.project_type
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
</select>
<select id="selectCategoryAnalyze" resultType="com.dsk.system.domain.business.vo.BusinessAnalyzeVo">
select
bi.project_category,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
group by bi.project_category
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment