11 changed files with 259 additions and 1 deletions
			
			
		@ -0,0 +1,23 @@ | 
				
			|||||
 | 
					package com.epmet.controller; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.service.StatsDemoService; | 
				
			||||
 | 
					import com.epmet.service.StatsProjectService; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.GetMapping; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.RestController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 数据统计-项目 | 
				
			||||
 | 
					 * @author sun | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@RequestMapping("statsProject") | 
				
			||||
 | 
					@RestController | 
				
			||||
 | 
					public class StatsProjectController { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private StatsProjectService statsProjectService; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,33 @@ | 
				
			|||||
 | 
					/** | 
				
			||||
 | 
					 * 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.project; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.mybatis.dao.BaseDao; | 
				
			||||
 | 
					import com.epmet.entity.project.ProjectEntity; | 
				
			||||
 | 
					import org.apache.ibatis.annotations.Mapper; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 项目表 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2020-05-11 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Mapper | 
				
			||||
 | 
					public interface ProjectDao extends BaseDao<ProjectEntity> { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,78 @@ | 
				
			|||||
 | 
					/** | 
				
			||||
 | 
					 * 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.project; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.baomidou.mybatisplus.annotation.TableName; | 
				
			||||
 | 
					import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					import lombok.EqualsAndHashCode; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 项目表 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2020-05-11 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					@EqualsAndHashCode(callSuper=false) | 
				
			||||
 | 
					@TableName("project") | 
				
			||||
 | 
					public class ProjectEntity extends BaseEpmetEntity { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						private static final long serialVersionUID = 1L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						/** | 
				
			||||
 | 
						 * 客户ID | 
				
			||||
 | 
						 */ | 
				
			||||
 | 
						private String customerId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     *  机关ID | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String agencyId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 来源:议题issue | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String origin; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 来源ID | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String originId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 项目标题 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String title; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 状态:待处理 pending,结案closed | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String status; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 结案状态:已解决 resolved,未解决 unresolved | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String closedStatus; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 所属机关 11:22:33(本机关以及上级所有机关ID) | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String orgIdPath; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,10 @@ | 
				
			|||||
 | 
					package com.epmet.service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 数据统计-项目 | 
				
			||||
 | 
					 * @author sun | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					public interface StatsProjectService { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,18 @@ | 
				
			|||||
 | 
					package com.epmet.service.impl; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.service.StatsProjectService; | 
				
			||||
 | 
					import com.epmet.service.project.ProjectService; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.stereotype.Service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 数据统计-项目(独立于任何具体数据源外层的service) | 
				
			||||
 | 
					 * @author sun | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Service | 
				
			||||
 | 
					public class StatsProjectServiceImpl implements StatsProjectService { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private ProjectService projectService; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,31 @@ | 
				
			|||||
 | 
					/** | 
				
			||||
 | 
					 * 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.service.project; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.mybatis.service.BaseService; | 
				
			||||
 | 
					import com.epmet.entity.project.ProjectEntity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 项目表 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2020-05-11 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					public interface ProjectService extends BaseService<ProjectEntity> { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,41 @@ | 
				
			|||||
 | 
					/** | 
				
			||||
 | 
					 * 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.service.project.impl; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.dynamic.datasource.annotation.DataSource; | 
				
			||||
 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			||||
 | 
					import com.epmet.constant.DataSourceConstant; | 
				
			||||
 | 
					import com.epmet.dao.project.ProjectDao; | 
				
			||||
 | 
					import com.epmet.entity.project.ProjectEntity; | 
				
			||||
 | 
					import com.epmet.service.project.ProjectService; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.stereotype.Service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 项目表 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2020-05-11 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Service | 
				
			||||
 | 
					@DataSource(DataSourceConstant.GOV_PROJECT) | 
				
			||||
 | 
					public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntity> implements ProjectService { | 
				
			||||
 | 
						@Autowired | 
				
			||||
 | 
						private ProjectDao projectDao; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					<?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.project.ProjectDao"> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					</mapper> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue