Browse Source

这个接口没法整

dev_shibei_match
yinzuomei 4 years ago
parent
commit
e48ba66433
  1. 10
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/CategoryAnalysisResultDTO.java
  2. 35
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

10
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/CategoryAnalysisResultDTO.java

@ -23,4 +23,14 @@ public class CategoryAnalysisResultDTO implements Serializable {
* 项目总数 * 项目总数
*/ */
private Integer projectTotal; private Integer projectTotal;
/**
* 数据更新至
*/
private String dateId;
/**
* 分类编码
*/
private String categoryCode;
} }

35
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -6,28 +6,31 @@
<select id="selectCategoryAnalysis" resultType="com.epmet.dto.result.screen.CategoryAnalysisResultDTO"> <select id="selectCategoryAnalysis" resultType="com.epmet.dto.result.screen.CategoryAnalysisResultDTO">
SELECT D.CATEGORY_NAME AS categoryName, SELECT D.CATEGORY_NAME AS categoryName,
M.PROJECT_TOTAL AS projectTotal M.PROJECT_TOTAL AS projectTotal,
m.DATE_ID as dateId,
m.CATEGORY_CODE as categoryCode
FROM screen_project_category_org_daily m FROM screen_project_category_org_daily m
left join customer_project_category_dict d left join customer_project_category_dict d
on(m.CATEGORY_CODE=D.CATEGORY_CODE on(m.CATEGORY_CODE=D.CATEGORY_CODE
AND D.DEL_FLAG='0' AND D.DEL_FLAG='0'
and d.CUSTOMER_ID=#{customerId}) and d.CUSTOMER_ID=#{customerId})
WHERE M.DEL_FLAG = '0' WHERE M.DEL_FLAG = '0'
AND M.ORG_ID = #{agencyId} AND M.ORG_ID = #{agencyId}
AND M.DATE_ID = ( and M.CUSTOMER_ID=#{customerId}
select AND M.DATE_ID = (
date_id select
from date_id
screen_project_category_org_daily from
where screen_project_category_org_daily
del_flag = '0' where
and ORG_ID = #{agencyId} del_flag = '0'
and CUSTOMER_ID=#{customerId} and ORG_ID = #{agencyId}
order by and CUSTOMER_ID=#{customerId}
date_id desc, order by
created_time desc date_id desc,
limit 1 created_time desc
) limit 1
)
ORDER BY M.PROJECT_TOTAL desc,D.CATEGORY_NAME asc ORDER BY M.PROJECT_TOTAL desc,D.CATEGORY_NAME asc
limit 20 limit 20
</select> </select>

Loading…
Cancel
Save