8 changed files with 243 additions and 36 deletions
			
			
		| @ -0,0 +1,43 @@ | |||
| /** | |||
|  * 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.screen; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.screen.dto.result.PublicPartiRankResultDTO; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| 
 | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-08-24 | |||
|  */ | |||
| @Mapper | |||
| public interface ScreenPublicPartiTotalDataDao{ | |||
|     /** | |||
|      * @Description 查询公众参与各类总数 | |||
|      * @param agencyId | |||
|      * @return | |||
|      * @author wangc | |||
|      * @date 2020.08.20 16:00 | |||
|      **/ | |||
|     List<PublicPartiRankResultDTO> selectPublicPartiTotal(@Param("agencyId") String agencyId); | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| <?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.screen.ScreenPublicPartiTotalDataDao"> | |||
| 
 | |||
|     <!-- 查询公众参与各类总数 --> | |||
|     <select id="selectPublicPartiTotal" resultType="com.epmet.screen.dto.result.PublicPartiRankResultDTO"> | |||
|         SELECT | |||
|             ORG_NAME AS NAME, | |||
|             REG_USER_TOTAL AS regNum, | |||
|             JOIN_USER_TOTAL AS joinNum, | |||
|             TOPIC_TOTAL AS topicNum, | |||
|             ISSUE_TOTAL AS issueNum, | |||
|             PROJECT_TOTAL AS projectNum | |||
|         FROM | |||
|                 screen_public_parti_total_data | |||
|         WHERE | |||
|                 DEL_FLAG = '0' | |||
|                 AND PARENT_ID =  #{agencyId} | |||
|          ORDER BY | |||
|          (REG_USER_TOTAL + JOIN_USER_TOTAL + TOPIC_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL) DESC, | |||
|                 REG_USER_TOTAL desc, | |||
|                 JOIN_USER_TOTAL desc, | |||
|                 TOPIC_TOTAL desc, | |||
|                 ISSUE_TOTAL desc, | |||
|                 PROJECT_TOTAL desc | |||
|     </select> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,34 @@ | |||
| /** | |||
|  * 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.dao.screen; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| 
 | |||
| /** | |||
|  * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-08-24 | |||
|  */ | |||
| @Mapper | |||
| public interface ScreenPublicPartiTotalDataDao extends BaseDao<ScreenPublicPartiTotalDataEntity> { | |||
| 
 | |||
| } | |||
| @ -0,0 +1,96 @@ | |||
| /** | |||
|  * 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.entity.screen; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| 
 | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| import java.util.Date; | |||
| 
 | |||
| /** | |||
|  * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-08-24 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("screen_public_parti_total_data") | |||
| public class ScreenPublicPartiTotalDataEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户Id | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 组织类别 agency:组织;网格:grid;部门:department; | |||
|      */ | |||
| 	private String orgType; | |||
| 
 | |||
|     /** | |||
|      * 组织Id 可以为网格,机关id | |||
|      */ | |||
| 	private String orgId; | |||
| 
 | |||
|     /** | |||
|      * 上级组织Id,如果是网格,传入网格所属组织id | |||
|      */ | |||
| 	private String parentId; | |||
| 
 | |||
|     /** | |||
|      * 组织名称,也可能是网格名称 | |||
|      */ | |||
| 	private String orgName; | |||
| 
 | |||
|     /** | |||
|      * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) | |||
|      */ | |||
| 	private String dataEndTime; | |||
| 
 | |||
|     /** | |||
|      * 话题总数 | |||
|      */ | |||
| 	private Integer topicTotal; | |||
| 
 | |||
|     /** | |||
|      * 议题总数 | |||
|      */ | |||
| 	private Integer issueTotal; | |||
| 
 | |||
|     /** | |||
|      * 项目总数 | |||
|      */ | |||
| 	private Integer projectTotal; | |||
| 
 | |||
|     /** | |||
|      * 注册人数 | |||
|      */ | |||
| 	private Integer regUserTotal; | |||
| 
 | |||
|     /** | |||
|      * 参与人数 | |||
|      */ | |||
| 	private Integer joinUserTotal; | |||
| 
 | |||
| } | |||
| @ -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.dao.ScreenPublicPartiTotalDataDao"> | |||
| 
 | |||
|     <resultMap type="com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity" id="screenPublicPartiTotalDataMap"> | |||
|         <result property="id" column="ID"/> | |||
|         <result property="customerId" column="CUSTOMER_ID"/> | |||
|         <result property="orgType" column="ORG_TYPE"/> | |||
|         <result property="orgId" column="ORG_ID"/> | |||
|         <result property="parentId" column="PARENT_ID"/> | |||
|         <result property="orgName" column="ORG_NAME"/> | |||
|         <result property="dataEndTime" column="DATA_END_TIME"/> | |||
|         <result property="topicTotal" column="TOPIC_TOTAL"/> | |||
|         <result property="issueTotal" column="ISSUE_TOTAL"/> | |||
|         <result property="projectTotal" column="PROJECT_TOTAL"/> | |||
|         <result property="regUserTotal" column="REG_USER_TOTAL"/> | |||
|         <result property="joinUserTotal" column="JOIN_USER_TOTAL"/> | |||
|         <result property="delFlag" column="DEL_FLAG"/> | |||
|         <result property="revision" column="REVISION"/> | |||
|         <result property="createdBy" column="CREATED_BY"/> | |||
|         <result property="createdTime" column="CREATED_TIME"/> | |||
|         <result property="updatedBy" column="UPDATED_BY"/> | |||
|         <result property="updatedTime" column="UPDATED_TIME"/> | |||
|     </resultMap> | |||
| 
 | |||
| 
 | |||
| </mapper> | |||
					Loading…
					
					
				
		Reference in new issue