forked from rongchao/epmet-cloud-rizhao
6 changed files with 147 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @Description 市北数字社区-组织先进排行榜 查询结果dto |
|||
* @ClassName OrgRankDataResultDTO |
|||
* @Auth wangc |
|||
* @Date 2020-08-21 11:16 |
|||
*/ |
|||
@Data |
|||
public class OrgRankDataShibeiResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7874641768141936572L; |
|||
|
|||
private String orgId; |
|||
/** |
|||
* 名称 XXXX社区党委 |
|||
* */ |
|||
private String name; |
|||
|
|||
/** |
|||
* 党员数 |
|||
* */ |
|||
private BigDecimal score; |
|||
|
|||
/** |
|||
* 数据所属月份 |
|||
*/ |
|||
private String monthId; |
|||
} |
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screen; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AdvancedBranchRankFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.OrgRankDataShibeiResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 党建引领-组织排行榜 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-18 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenOrgRankDataShibeiDao { |
|||
|
|||
/** |
|||
* @return |
|||
* @Description 查询指定机关的所有直属网格月度数据 |
|||
* @author wangc |
|||
* @date 2020.08.21 13:58 |
|||
**/ |
|||
List<OrgRankDataShibeiResultDTO> selectGridRankList(AdvancedBranchRankFormDTO formDTO); |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenOrgRankDataShibeiDao"> |
|||
|
|||
<!-- 查询指定机关的直属网格月度数据 --> |
|||
<select id="selectGridRankList" resultType="com.epmet.evaluationindex.screen.dto.result.OrgRankDataShibeiResultDTO"> |
|||
SELECT |
|||
rankData.ORG_NAME AS NAME, |
|||
round(rankData.SCORE,1) score, |
|||
rankData.ORG_ID as orgId, |
|||
rankData.MONTH_ID |
|||
FROM |
|||
screen_org_rank_data_shibei rankData |
|||
LEFT JOIN screen_customer_agency agency |
|||
ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = 0 |
|||
WHERE |
|||
rankData.DEL_FLAG = '0' |
|||
AND rankData.ORG_TYPE = 'grid' |
|||
AND rankData.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') |
|||
AND rankData.MONTH_ID = #{monthId} |
|||
ORDER BY |
|||
rankData.SCORE DESC |
|||
LIMIT #{topNum} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue