forked from rongchao/epmet-cloud-rizhao
15 changed files with 427 additions and 44 deletions
@ -0,0 +1,14 @@ |
|||||
|
package com.epmet.dao.issue; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IssueEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface StatsIssueDao extends BaseDao<IssueEntity> { |
||||
|
|
||||
|
List<IssueEntity> listAllEntities(); |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.epmet.dao.org; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.CustomerAgencyEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface StatsCustomerAgencyDao extends BaseDao<CustomerAgencyEntity> { |
||||
|
|
||||
|
List<CustomerAgencyEntity> listAllEntities(); |
||||
|
|
||||
|
} |
@ -0,0 +1,97 @@ |
|||||
|
/** |
||||
|
* 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; |
||||
|
|
||||
|
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-04-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("customer_agency") |
||||
|
public class CustomerAgencyEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织机构ID |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级组织机构ID(以英文:隔开) |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级名称,以-连接 |
||||
|
*/ |
||||
|
private String allParentName; |
||||
|
|
||||
|
/** |
||||
|
* 组织名称 |
||||
|
*/ |
||||
|
private String organizationName; |
||||
|
|
||||
|
/** |
||||
|
* 机关级别(社区级:community, |
||||
|
乡(镇、街道)级:street, |
||||
|
区县级: district, |
||||
|
市级: city |
||||
|
省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) |
||||
|
*/ |
||||
|
private String level; |
||||
|
|
||||
|
/** |
||||
|
* 地区编码 |
||||
|
*/ |
||||
|
private String areaCode; |
||||
|
|
||||
|
/** |
||||
|
* 总人数 |
||||
|
*/ |
||||
|
private Integer totalUser; |
||||
|
|
||||
|
/** |
||||
|
* 省份 |
||||
|
*/ |
||||
|
private String province; |
||||
|
|
||||
|
/** |
||||
|
* 城市 |
||||
|
*/ |
||||
|
private String city; |
||||
|
|
||||
|
/** |
||||
|
* 区县 |
||||
|
*/ |
||||
|
private String district; |
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
/** |
||||
|
* 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; |
||||
|
|
||||
|
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-05-11 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("issue") |
||||
|
public class IssueEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 议题状态 表决中:voting 已转项目:shift_project 已关闭:closed |
||||
|
*/ |
||||
|
private String issueStatus; |
||||
|
|
||||
|
/** |
||||
|
* 来源类型 eg:resi_topic |
||||
|
*/ |
||||
|
private String sourceType; |
||||
|
|
||||
|
/** |
||||
|
* 来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID) |
||||
|
*/ |
||||
|
private String sourceId; |
||||
|
|
||||
|
/** |
||||
|
* 关闭理由 【未关闭时可以为空】关闭话题时必填的理由,转项目后而且已经结案,这个字段不回写 |
||||
|
*/ |
||||
|
private String closeReason; |
||||
|
|
||||
|
/** |
||||
|
* 解决类型 【未关闭时可以为空】已解决resloved、未解决unresloved,对应在关闭议题时所选的checkbox,转项目后而且已经结案,这个字段不回写 |
||||
|
*/ |
||||
|
private String resolveType; |
||||
|
|
||||
|
/** |
||||
|
* 议题名称 最多20字 |
||||
|
*/ |
||||
|
private String issueTitle; |
||||
|
|
||||
|
/** |
||||
|
* 建议 建议 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID 居民端议题对应一个网格iId |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID 【数据权限-非必填】agencyId |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 表决截止日期 表决截止日期 |
||||
|
*/ |
||||
|
private Date votingDeadline; |
||||
|
|
||||
|
/** |
||||
|
* 表决发起日期(转议题日期) 表决发起日期(转议题日期) |
||||
|
*/ |
||||
|
private Date decidedTime; |
||||
|
|
||||
|
/** |
||||
|
* 转项目日期 转项目日期(服务间调用日期一致性) |
||||
|
*/ |
||||
|
private Date shiftedTime; |
||||
|
|
||||
|
/** |
||||
|
* 关闭日期 关闭日期 |
||||
|
*/ |
||||
|
private Date closedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.epmet.service.Issue; |
||||
|
|
||||
|
import com.epmet.entity.IssueEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface DemoIssueService { |
||||
|
|
||||
|
List<IssueEntity> listAllEntities(); |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.service.Issue.impl; |
||||
|
|
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.dao.issue.StatsIssueDao; |
||||
|
import com.epmet.entity.IssueEntity; |
||||
|
import com.epmet.service.Issue.DemoIssueService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@DataSource("govIssue") |
||||
|
public class DemoIssueServiceImpl implements DemoIssueService { |
||||
|
|
||||
|
@Autowired |
||||
|
private StatsIssueDao statsIssueDao; |
||||
|
|
||||
|
@Override |
||||
|
public List<IssueEntity> listAllEntities() { |
||||
|
return statsIssueDao.listAllEntities(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.epmet.service.org; |
||||
|
|
||||
|
import com.epmet.entity.CustomerAgencyEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface DemoGovOrgService { |
||||
|
List<CustomerAgencyEntity> listAllEntities(); |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.service.org.impl; |
||||
|
|
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.dao.org.StatsCustomerAgencyDao; |
||||
|
import com.epmet.entity.CustomerAgencyEntity; |
||||
|
import com.epmet.service.org.DemoGovOrgService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
@DataSource("govOrg") |
||||
|
public class DemoGovOrgServiceImpl implements DemoGovOrgService { |
||||
|
@Autowired |
||||
|
private StatsCustomerAgencyDao govOrgDao; |
||||
|
|
||||
|
@Override |
||||
|
public List<CustomerAgencyEntity> listAllEntities() { |
||||
|
return govOrgDao.listAllEntities(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
package com.epmet.service.stats; |
||||
|
|
||||
|
public interface StatsDemoService { |
||||
|
void demo(); |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.service.stats.impl; |
||||
|
|
||||
|
import com.epmet.entity.CustomerAgencyEntity; |
||||
|
import com.epmet.entity.IssueEntity; |
||||
|
import com.epmet.service.Issue.DemoIssueService; |
||||
|
import com.epmet.service.org.DemoGovOrgService; |
||||
|
import com.epmet.service.stats.StatsDemoService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 综合业务的service,不指定数据源,不加事务,因为不支持。。。 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class StatsDemoServiceImpl implements StatsDemoService { |
||||
|
|
||||
|
@Autowired |
||||
|
private DemoGovOrgService demoGovOrgService; |
||||
|
|
||||
|
@Autowired |
||||
|
private DemoIssueService demoIssueService; |
||||
|
|
||||
|
public void demo() { |
||||
|
List<CustomerAgencyEntity> agencies = demoGovOrgService.listAllEntities(); |
||||
|
List<IssueEntity> issues = demoIssueService.listAllEntities(); |
||||
|
System.out.println(666); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
<?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.org.StatsCustomerAgencyDao"> |
||||
|
|
||||
|
<!--<select id="listAll" resultType="com.epmet.dao.org.StatsCustomerAgencyDao"> |
||||
|
select * from customer_agency |
||||
|
</select>--> |
||||
|
|
||||
|
<select id="listAllEntities" resultType="com.epmet.entity.CustomerAgencyEntity"> |
||||
|
select * from customer_agency |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,8 @@ |
|||||
|
<?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.issue.StatsIssueDao"> |
||||
|
<select id="listAllEntities" resultType="com.epmet.entity.IssueEntity"> |
||||
|
select * from issue |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue