Browse Source

修改

feature/zhy_updatepush
曲树通 5 years ago
parent
commit
5b9b63bffc
  1. 9
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenProjectDataController.java
  2. 41
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java
  3. 4
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenProjectDataDao.java
  4. 7
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java
  5. 4
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenProjectDataService.java
  6. 6
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java
  7. 21
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java
  8. 27
      epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java
  9. 16
      epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  10. 367
      epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenPublicDataDao.xml

9
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenProjectDataController.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.modules.screen.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.screen.form.ScreenJobFormDTO;
import com.elink.esua.epdc.dto.screen.form.ScreenProjectFormDTO;
import com.elink.esua.epdc.modules.screen.service.ScreenProjectDataService;
import org.springframework.beans.factory.annotation.Autowired;
@ -78,8 +79,8 @@ public class ScreenProjectDataController {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("quantity-grid-monthly")
private Result quantityGridMonthly(){
return screenProjectDataService.quantityGridMonthly();
private Result quantityGridMonthly(@RequestBody ScreenJobFormDTO formDto){
return screenProjectDataService.quantityGridMonthly(formDto.getYearMonth());
}
/**
@ -90,7 +91,7 @@ public class ScreenProjectDataController {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("quantity-org-monthly")
private Result quantityOrgMonthly(){
return screenProjectDataService.quantityOrgMonthly();
private Result quantityOrgMonthly(@RequestBody ScreenJobFormDTO formDto){
return screenProjectDataService.quantityOrgMonthly(formDto.getYearMonth());
}
}

41
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java

@ -1,9 +1,11 @@
package com.elink.esua.epdc.modules.screen.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.screen.form.ScreenJobFormDTO;
import com.elink.esua.epdc.modules.screen.service.ScreenPublicDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -57,22 +59,23 @@ public class ScreenPublicDataController {
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.screen.result.CpcbasedataDTO>
* @describe: 001基层党建-党员基本情况
* @author wk
* @date 2020/8/19 17:25
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.screen.result.CpcbasedataDTO>
*/
@PostMapping("cpcbasedata")
public Result cpcbasedata() {
return screenPublicDataService.cpcbasedata();
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @describe: 002党建引领-先锋模范数据
* @author wangtong
* @date 2020/8/20 18:02
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("pioneerdata")
public Result pioneerdata() {
@ -80,29 +83,33 @@ public class ScreenPublicDataController {
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @describe: 003党建引领-党员联系群众数据
* @author wangtong
* @date 2020/8/20 14:25
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("partylinkmassesdata")
public Result partylinkmassesdata() {
return screenPublicDataService.partylinkmassesdata();
}
/**
* 004党建引领-先进排行榜单-先进支部排行
*
* @Params:
* @Return: OrgrankdataResultDTO
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
@PostMapping("orgrankdata")
public Result orgrankdata() {
return screenPublicDataService.getOrgrankdata();
public Result orgrankdata(@RequestBody ScreenJobFormDTO formDto) {
return screenPublicDataService.getOrgrankdata(formDto.getYearMonth());
}
/**
* 005党建引领|基层治理-居民党员积分排行榜
*
* @Params:
* @Return: PartyuserrankdataResultDTO
* @Author: wk
@ -110,11 +117,13 @@ public class ScreenPublicDataController {
*/
@PostMapping("partyuserrankdata")
public Result partyuserrankdata() {
return screenPublicDataService.getPartyuserrankdata();
return screenPublicDataService.getPartyuserrankdata();
}
/**
* 006基层治理-难点赌点项目上报
* 006基层治理-难点赌点项目上报
*
* @Params:
* @Return: DifficultydataResultDTO
* @Author: wk
@ -124,46 +133,52 @@ public class ScreenPublicDataController {
public Result difficultydata() {
return screenPublicDataService.getDifficultydata();
}
/**
* 007基层治理-公众参与
*
* @Params:
* @Return: UserjoinResultDTO
* @Author: wanggongfeng
* @Date: 2020/08/20
*/
@PostMapping("userjoin")
public Result userjoin() {
return screenPublicDataService.getUserjoin();
public Result userjoin(@RequestBody ScreenJobFormDTO formDto) {
return screenPublicDataService.getUserjoin(formDto.getYearMonth());
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @describe: 008公众参与各类总数
* @author wangtong
* @date 2020/8/24 18:27
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("publicpartitotaldata")
public Result publicpartitotaldata() {
return screenPublicDataService.publicpartitotaldata();
}
/**
* 009基层治理-治理能力数据
*
* @Params:
* @Return: GovernrankdataResultDTO
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
@PostMapping("governrankdata")
public Result governrankdata() {
return screenPublicDataService.getGovernrankdata();
public Result governrankdata(@RequestBody ScreenJobFormDTO formDto) {
return screenPublicDataService.getGovernrankdata(formDto.getYearMonth());
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @describe: 010中央区各类总数
* @author wk
* @date 2020/8/21 10:32
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("usertotaldata")
public Result usertotaldata() {

4
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenProjectDataDao.java

@ -57,7 +57,7 @@ public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataResultDTO
* @params [lastMonth]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.QuantityGridMonthly>
*/
List<QuantityGridMonthly> selectQuantityGridMonthly(@Param("lastMonth") String lastMonth);
List<QuantityGridMonthly> selectQuantityGridMonthly(@Param("yearMonth") String yearMonth);
/**
* @describe: 事件/项目分析组织内月度数量统计
@ -66,5 +66,5 @@ public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataResultDTO
* @params [lastMonth]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.QuantityOrgMonthlyDTO>
*/
List<QuantityOrgMonthlyDTO> selectQuantityOrgMonthly(@Param("lastMonth") String lastMonth);
List<QuantityOrgMonthlyDTO> selectQuantityOrgMonthly(@Param("yearMonth") String yearMonth);
}

7
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java

@ -3,6 +3,7 @@ package com.elink.esua.epdc.modules.screen.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.screen.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -72,7 +73,7 @@ public interface ScreenPublicDataDao extends BaseDao<ScreenPublicDataResultDTO>
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
List<OrgrankdataResultDTO> getOrgrankdata();
List<OrgrankdataResultDTO> getOrgrankdata(@Param("yearMonth")String yearMonth);
/**
* 005党建引领|基层治理-居民党员积分排行榜
* @Params:
@ -97,7 +98,7 @@ public interface ScreenPublicDataDao extends BaseDao<ScreenPublicDataResultDTO>
* @Author: wanggongfeng
* @Date: 2020/08/20
*/
List<UserjoinResultDTO> getUserjoin();
List<UserjoinResultDTO> getUserjoin(@Param("yearMonth")String yearMonth);
/**
* @describe: 008公众参与各类总数
@ -114,7 +115,7 @@ public interface ScreenPublicDataDao extends BaseDao<ScreenPublicDataResultDTO>
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
List<GovernrankdataResultDTO> getGovernrankdata();
List<GovernrankdataResultDTO> getGovernrankdata(@Param("yearMonth")String yearMonth);
/**

4
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenProjectDataService.java

@ -56,7 +56,7 @@ public interface ScreenProjectDataService {
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result quantityGridMonthly();
Result quantityGridMonthly(String yearMonth);
/**
* @describe: 事件/项目分析组织内月度数量统计
@ -65,5 +65,5 @@ public interface ScreenProjectDataService {
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result quantityOrgMonthly();
Result quantityOrgMonthly(String yearMonth);
}

6
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java

@ -72,7 +72,7 @@ public interface ScreenPublicDataService {
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
Result getOrgrankdata();
Result getOrgrankdata(String yearMonth);
/**
* 005党建引领|基层治理-居民党员积分排行榜
@ -102,7 +102,7 @@ public interface ScreenPublicDataService {
* @Author: wanggongfeng
* @Date: 2020/08/20
*/
Result getUserjoin();
Result getUserjoin(String yearMonth);
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result
@ -121,7 +121,7 @@ public interface ScreenPublicDataService {
* @Author: wanggongfeng
* @Date: 2020/08/19
*/
Result getGovernrankdata();
Result getGovernrankdata(String yearMonth);
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result

21
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java

@ -3,6 +3,7 @@ package com.elink.esua.epdc.modules.screen.service.impl;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.utils.DateUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.screen.form.ScreenProjectFormDTO;
import com.elink.esua.epdc.dto.screen.result.*;
@ -10,9 +11,11 @@ import com.elink.esua.epdc.modules.screen.dao.ScreenProjectDataDao;
import com.elink.esua.epdc.modules.screen.service.ScreenProjectDataService;
import com.elink.esua.epdc.utils.EpmetUtils;
import com.elink.esua.epdc.utils.ScreenDataUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
@ -101,24 +104,26 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl<ScreenProjectD
}
@Override
public Result quantityGridMonthly() {
String lastMonth = ScreenDataUtils.getLastMonthDate();
public Result quantityGridMonthly(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
// 数据统计
List<QuantityGridMonthly> data = baseDao.selectQuantityGridMonthly(lastMonth);
List<QuantityGridMonthly> data = baseDao.selectQuantityGridMonthly(yearMonth);
// 数据格式化
String dataJson = ScreenDataUtils.getScreenDataMonthJson(data, null,true);
String dataJson = ScreenDataUtils.getScreenDataMonthJson(data, yearMonth,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_PROJECT_GRID_MONTHLY, dataJson);
return new Result();
}
@Override
public Result quantityOrgMonthly() {
String lastMonth = ScreenDataUtils.getLastMonthDate();
public Result quantityOrgMonthly(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
// 数据统计
List<QuantityOrgMonthlyDTO> data = baseDao.selectQuantityOrgMonthly(lastMonth);
List<QuantityOrgMonthlyDTO> data = baseDao.selectQuantityOrgMonthly(yearMonth);
// 数据格式化
String dataJson = ScreenDataUtils.getScreenDataMonthJson(data, null,true);
String dataJson = ScreenDataUtils.getScreenDataMonthJson(data, yearMonth,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_PROJECT_ORG_MONTHLY, dataJson);
return new Result();

27
epdc-cloud-analysis-pc/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java

@ -3,16 +3,19 @@ package com.elink.esua.epdc.modules.screen.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant;
import com.elink.esua.epdc.commons.tools.utils.DateUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.screen.result.*;
import com.elink.esua.epdc.modules.screen.dao.ScreenPublicDataDao;
import com.elink.esua.epdc.modules.screen.service.ScreenPublicDataService;
import com.elink.esua.epdc.utils.EpmetUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -122,13 +125,15 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl<ScreenPublicDat
* @Date: 2020/08/19
*/
@Override
public Result getOrgrankdata() {
List<OrgrankdataResultDTO> list = baseDao.getOrgrankdata();
public Result getOrgrankdata(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
List<OrgrankdataResultDTO> list = baseDao.getOrgrankdata(yearMonth);
// 将list转换为json格式
if(list != null && list.size()>0){
OrgrankdataDTO result = new OrgrankdataDTO();
result.setDataList(list);
result.setMonthId(list.get(0).getMonthId());
result.setMonthId(yearMonth);
String json = JSONObject.toJSONString(result);
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_ORG_RANK, json);
log.info(body);
@ -192,13 +197,15 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl<ScreenPublicDat
* @Date: 2020/08/20
*/
@Override
public Result getUserjoin() {
List<UserjoinResultDTO> list = baseDao.getUserjoin();
public Result getUserjoin(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
List<UserjoinResultDTO> list = baseDao.getUserjoin(yearMonth);
// 将list转换为json格式
if(list != null && list.size()>0) {
UserjoinDTO result = new UserjoinDTO();
result.setDataList(list);
result.setMonthId(list.get(0).getMonthId());
result.setMonthId(yearMonth);
String json = JSONObject.toJSONString(result);
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_USER_JOIN, json);
log.info(body);
@ -233,13 +240,15 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl<ScreenPublicDat
* @Date: 2020/08/19
*/
@Override
public Result getGovernrankdata() {
List<GovernrankdataResultDTO> list = baseDao.getGovernrankdata();
public Result getGovernrankdata(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
List<GovernrankdataResultDTO> list = baseDao.getGovernrankdata(yearMonth);
// 将list转换为json格式
if(list != null && list.size()>0){
GovernrankdataDTO result = new GovernrankdataDTO();
result.setDataList(list);
result.setMonthId(list.get(0).getMonthId());
result.setMonthId(yearMonth);
String json = JSONObject.toJSONString(result);
String body = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_GOVERN_RANK, json);
log.info(body);

16
epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -243,7 +243,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) = #{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
group by lin.EVENT_ID)li
group by li.GRID_ID)it on it.GRID_ID=sd.id
left join (select al.GRID_ID,
@ -253,7 +253,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;= #{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;= #{yearMonth}
group by lin.EVENT_ID)al
group by al.GRID_ID)li2 on li2.GRID_ID=sd.id
WHERE sd.`del_flag`= 0
@ -285,7 +285,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{yearMonth}
group by lin.EVENT_ID)li
group by li.GRID_ID)it on it.GRID_ID=sd.id
left join (select al.GRID_ID,
@ -295,7 +295,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{yearMonth}
group by lin.EVENT_ID)al
group by al.GRID_ID)li2 on li2.GRID_ID=sd.id
WHERE sd.`del_flag`= 0
@ -324,7 +324,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{yearMonth}
group by lin.EVENT_ID)li
group by li.GRID_ID)it on it.GRID_ID=sd.id
left join (select al.GRID_ID,
@ -334,7 +334,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{yearMonth}
group by lin.EVENT_ID)al
group by al.GRID_ID)li2 on li2.GRID_ID=sd.id
WHERE sd.`del_flag`= 0
@ -364,7 +364,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{yearMonth}
group by lin.EVENT_ID)li
group by li.GRID_ID)it on it.GRID_ID=sd.id
left join (select al.GRID_ID,
@ -374,7 +374,7 @@
from (select lin.*
from (select * from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item order by id) lin
where lin.DEL_FLAG=0
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{lastMonth}
AND date_format( lin.CREATED_TIME, '%Y-%m' ) &lt;=#{yearMonth}
group by lin.EVENT_ID)al
group by al.GRID_ID)li2 on li2.GRID_ID=sd.id
WHERE sd.`del_flag`= 0

367
epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenPublicDataDao.xml

@ -925,21 +925,21 @@ select gr.id as orgId,
IFNULL(t.projectTotal,0) as satisfactionRatioFm
from (
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
sd.PIDS allParentIds ,
sd.NAME orgName,
(SELECT count( * ) partyTotal FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1') partyTotal,
(SELECT count( * ) partyTotal FROM esua_epdc_user.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1') partyTotal,
(
select
count(*) groupTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_group ws
where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ),'%Y-%m' )
from esua_epdc_group.epdc_group ws
where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
) groupTotal,
(select count(*) topicTotal from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) ) topicTotal,
(select count(*) topicTotal from esua_epdc_group.epdc_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} ) topicTotal,
(
SELECT
count( t.a ) issueTotal
@ -949,10 +949,10 @@ select gr.id as orgId,
count(id) as a,
EVENT_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue mei
esua_epdc_events.epdc_issue mei
WHERE
mei.DEL_FLAG = '0'
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID
)t
@ -966,25 +966,25 @@ select gr.id as orgId,
count(id) as a,
EVENT_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item
esua_epdc_events.epdc_item item
WHERE
item.DEL_FLAG = '0'
AND date_format( item.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID
)t
) projectTotal,
(select count(*) itemCloseTotal from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.ITEM_STATE = 10 ) itemCloseTotal,
(select count(*) itemSatisfiedTotal from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 1 ) itemSatisfiedTotal,
(select count(*) itemVeryTotal from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 2 ) itemVeryTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
(select count(*) itemCloseTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 ) itemCloseTotal,
(select count(*) itemSatisfiedTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 ) itemSatisfiedTotal,
(select count(*) itemVeryTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 ) itemVeryTotal
from esua_epdc_admin.sys_dept sd
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
and sd.TYPE_KEY = 'district_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -998,12 +998,12 @@ select gr.id as orgId,
IFNULL(itemCloseCount.itemNum,0) itemCloseTotal,
IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal,
IFNULL(itemVeryCount.itemNum,0) itemVeryTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (
select sum(userNum.partyNum) partyNum , d2.PID DEPT_ID from (SELECT count( * ) partyNum, uu.DEPT_ID
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1'
GROUP BY uu.DEPT_ID) userNum left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = userNum.DEPT_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID group by d2.PID
FROM esua_epdc_user.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1'
GROUP BY uu.DEPT_ID) userNum left join esua_epdc_admin.sys_dept d1 on d1.ID = userNum.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID
) user on user.DEPT_ID = sd.ID
left join (
select
@ -1014,22 +1014,22 @@ select gr.id as orgId,
sum( info.STATE = 10 ) as num,
info.GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_group info
esua_epdc_group.epdc_group info
GROUP BY
info.GRID_ID
) daily
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept dept on dept.id = daily.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept dept2 on dept2.id = dept.PID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept parent on parent.id = dept2.PID and parent.type_key= 'street_party'
left join esua_epdc_admin.sys_dept dept on dept.id = daily.GRID_ID
left join esua_epdc_admin.sys_dept dept2 on dept2.id = dept.PID
left join esua_epdc_admin.sys_dept parent on parent.id = dept2.PID and parent.type_key= 'street_party'
where dept2.type_key = 'street_party' or parent.type_key= 'street_party'
GROUP BY IFNULL(parent.id,dept2.id)
) tto on tto.DEPT_ID = sd.ID
left join (
select sum(topn.topNum) topNum ,d2.PID DEPT_ID from
( select top.GRID_ID ,count(*) topNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_topic top where top.DEL_FLAG = '0'
and date_format(top.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) group by top.GRID_ID ) topn
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = topn.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
( select top.GRID_ID ,count(*) topNum from esua_epdc_group.epdc_topic top where top.DEL_FLAG = '0'
and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID ) topn
left join esua_epdc_admin.sys_dept d1 on d1.ID = topn.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) topCount on topCount.DEPT_ID = sd.ID
left join (
@ -1045,10 +1045,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue mei
esua_epdc_events.epdc_issue mei
WHERE
mei.DEL_FLAG = '0'
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1056,8 +1056,8 @@ select gr.id as orgId,
GROUP BY
t.GRID_ID
) issuegrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = issuegrid.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = issuegrid.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) issueCount on issueCount.DEPT_ID = sd.ID
left join (
@ -1073,10 +1073,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item
esua_epdc_events.epdc_item item
WHERE
item.DEL_FLAG = '0'
AND date_format( item.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1084,32 +1084,32 @@ select gr.id as orgId,
GROUP BY
t.GRID_ID
) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) itemCount on itemCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.ITEM_STATE = 10 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 1 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 2 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID
where sd.DEL_FLAG = '0'
@ -1117,8 +1117,8 @@ select gr.id as orgId,
and sd.TYPE_KEY = 'street_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1132,11 +1132,11 @@ select gr.id as orgId,
IFNULL(itemCloseCount.itemNum,0) itemCloseTotal,
IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal,
IFNULL(itemVeryCount.itemNum,0) itemVeryTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (
select sum(userNum.partyNum) partyNum ,d1.PID DEPT_ID from (SELECT count( * ) partyNum, uu.DEPT_ID
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1' GROUP BY uu.DEPT_ID) userNum
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = userNum.DEPT_ID group by d1.PID
FROM esua_epdc_user.epdc_user uu WHERE uu.DEL_FLAG = '0' AND uu.PARTY_FLAG = '1' GROUP BY uu.DEPT_ID) userNum
left join esua_epdc_admin.sys_dept d1 on d1.ID = userNum.DEPT_ID group by d1.PID
) user on user.DEPT_ID = sd.ID
left join (
select
@ -1147,20 +1147,20 @@ select gr.id as orgId,
sum( info.STATE = 10 ) as num,
info.GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_group info
esua_epdc_group.epdc_group info
GROUP BY
info.GRID_ID
) daily
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept dept on dept.id = daily.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept parent on parent.id = dept.PID and parent.type_key= 'community_party'
left join esua_epdc_admin.sys_dept dept on dept.id = daily.GRID_ID
left join esua_epdc_admin.sys_dept parent on parent.id = dept.PID and parent.type_key= 'community_party'
where dept.type_key = 'community_party' or parent.type_key= 'community_party'
GROUP BY IFNULL(parent.id,dept.id)
) tto on tto.DEPT_ID = sd.ID
left join (
select sum(topn.topNum) topNum ,d1.PID DEPT_ID from
( select top.GRID_ID ,count(*) topNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_topic top where top.DEL_FLAG = '0'
and date_format(top.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) group by top.GRID_ID ) topn
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = topn.GRID_ID group by d1.PID
( select top.GRID_ID ,count(*) topNum from esua_epdc_group.epdc_topic top where top.DEL_FLAG = '0'
and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID ) topn
left join esua_epdc_admin.sys_dept d1 on d1.ID = topn.GRID_ID group by d1.PID
) topCount on topCount.DEPT_ID = sd.ID
left join (
select sum(issuegrid.issueNum) issueNum ,d1.PID DEPT_ID from
@ -1175,10 +1175,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue mei
esua_epdc_events.epdc_issue mei
WHERE
mei.DEL_FLAG = '0'
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1186,7 +1186,7 @@ select gr.id as orgId,
GROUP BY
t.GRID_ID
) issuegrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = issuegrid.GRID_ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = issuegrid.GRID_ID
group by d1.PID
) issueCount on issueCount.DEPT_ID = sd.ID
left join (
@ -1203,10 +1203,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item
esua_epdc_events.epdc_item item
WHERE
item.DEL_FLAG = '0'
AND date_format( item.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1214,37 +1214,37 @@ select gr.id as orgId,
GROUP BY
t.GRID_ID
) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID
group by d1.PID
) itemCount on itemCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.ITEM_STATE = 10 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 1 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID
left join (
select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from
( select item.GRID_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 2 group by item.GRID_ID ) itemgrid
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0'
and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.GRID_ID ) itemgrid
left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID
) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'community_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'grid' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1258,17 +1258,17 @@ select gr.id as orgId,
IFNULL(itemCloseCount.itemNum,0) itemCloseTotal,
IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal,
IFNULL(itemVeryCount.itemNum,0) itemVeryTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
left join (select count(*) partyNum,uu.DEPT_ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user uu where uu.DEL_FLAG = '0' and uu.PARTY_FLAG = '1' group by uu.DEPT_ID) user on user.DEPT_ID = sd.ID
from esua_epdc_admin.sys_dept sd
left join (select count(*) partyNum,uu.DEPT_ID from esua_epdc_user.epdc_user uu where uu.DEL_FLAG = '0' and uu.PARTY_FLAG = '1' group by uu.DEPT_ID) user on user.DEPT_ID = sd.ID
left join (
select
count(*) as TIMES_TOTAL,
ws.GRID_ID as DEPT_ID
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_group ws
where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ),'%Y-%m' )
from esua_epdc_group.epdc_group ws
where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY ws.GRID_ID
) tto on tto.DEPT_ID = sd.ID
left join (select top.GRID_ID DEPT_ID ,count(*) topNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_group"/>.epdc_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) group by top.GRID_ID) topCount on topCount.DEPT_ID = sd.ID
left join (select top.GRID_ID DEPT_ID ,count(*) topNum from esua_epdc_group.epdc_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID) topCount on topCount.DEPT_ID = sd.ID
left join (
SELECT
count( t.a ) issueNum,
@ -1280,10 +1280,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue mei
esua_epdc_events.epdc_issue mei
WHERE
mei.DEL_FLAG = '0'
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1302,10 +1302,10 @@ select gr.id as orgId,
EVENT_ID,
GRID_ID
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item
esua_epdc_events.epdc_item item
WHERE
item.DEL_FLAG = '0'
AND date_format( item.CREATED_TIME, '%Y-%m' ) = date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY
EVENT_ID,
GRID_ID
@ -1313,13 +1313,13 @@ select gr.id as orgId,
GROUP BY
t.GRID_ID
) itemCount on itemCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.ITEM_STATE = 10 group by item.GRID_ID) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 1 group by item.GRID_ID) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' ) and item.EVALUATION_SCORE = 2 group by item.GRID_ID) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.GRID_ID) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.GRID_ID) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID
left join (select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.GRID_ID) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'grid_party'
) t
@ -1359,7 +1359,7 @@ select gr.id as orgId,
<select id="getDifficultydata" resultType="com.elink.esua.epdc.dto.screen.result.DifficultydataResultDTO">
SELECT
'grid' as orgType ,
ee.GRID orgId,
ee.GRID_ID orgId,
dd.PIDS allParentIds,
dd.PID parentId,
ee.GRID orgName,
@ -1376,7 +1376,8 @@ select gr.id as orgId,
(case ee.ITEM_STATE when 0 then '处理中' when 5 then '已关闭' when 10 then '已结案' end) as latestOperateDesc,
date_format( now( ), '%Y%m%d' ) dataEndTime,
IFNULL(ee.HANDLE_TOTAL,0) eventHandledCount,
dd.area_code as areaCode
dd.area_code as areaCode,
LEFT(ee.ITEM_CONTENT,50)eventTitle
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_analysis"/>.epdc_difficult_item ee
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept dd on dd.ID = ee.GRID_ID
@ -1386,7 +1387,7 @@ select gr.id as orgId,
AND dd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and ee.CREATED_TIME >= date_format( date_add( now( ), INTERVAL - 1 MONTH ), '%Y-%m-%d' )
and ee.DISTRIBUTE_TIME &lt;= date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m-%d' )
</select>
<!-- 007 -->
<select id="getUserjoin" resultType="com.elink.esua.epdc.dto.screen.result.UserjoinResultDTO">
@ -1408,8 +1409,8 @@ select gr.id as orgId,
from
(
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1419,7 +1420,7 @@ select gr.id as orgId,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
@ -1461,16 +1462,16 @@ select gr.id as orgId,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag
FROM
<include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_analysis"/>.epdc_user_behavior_log behavior
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = be.DEPT_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d3 on d2.PID = d3.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d3 on d2.PID = d3.ID
group by d3.PID
) behave on behave.DEPT_ID = sd.ID
left join (
@ -1481,26 +1482,26 @@ select gr.id as orgId,
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d3 on d2.PID = d3.ID group by d3.PID
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d3 on d2.PID = d3.ID group by d3.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'district_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1510,7 +1511,7 @@ select gr.id as orgId,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
@ -1551,15 +1552,15 @@ select gr.id as orgId,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_analysis"/>.epdc_user_behavior_log behavior
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = be.DEPT_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID group by d2.PID
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID
) behave on behave.DEPT_ID = sd.ID
left join (
select
@ -1569,25 +1570,25 @@ select gr.id as orgId,
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID group by d2.PID
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'street_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1597,7 +1598,7 @@ select gr.id as orgId,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNumber
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
@ -1633,14 +1634,14 @@ select gr.id as orgId,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_analysis"/>.epdc_user_behavior_log behavior
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = be.DEPT_ID group by d1.PID
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID group by d1.PID
) behave on behave.DEPT_ID = sd.ID
left join (
select
@ -1650,24 +1651,24 @@ select gr.id as orgId,
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = isuCount.DEPT_ID group by d1.PID
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID group by d1.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'community_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'grid' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -1677,7 +1678,7 @@ select gr.id as orgId,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join (SELECT
behaviorCount.DEPT_ID,
count( behaviorCount.voiceOpposeFlag + behaviorCount.voiceLikesFlag + behaviorCount.groupPublishFlag
@ -1705,11 +1706,11 @@ select gr.id as orgId,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_analysis"/>.epdc_user_behavior_log behavior
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user USER ON USER.ID = behavior.USER_ID
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID
AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_user"/>.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID
@ -1718,14 +1719,14 @@ select gr.id as orgId,
select
eisu.GRID_ID dept_ID,
count(*) issueNum
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'grid_party'
@ -2298,8 +2299,8 @@ union all
<!-- 009 -->
<select id="getGovernrankdata" resultType="com.elink.esua.epdc.dto.screen.result.GovernrankdataResultDTO">
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -2320,7 +2321,7 @@ union all
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join
(select
d3.PID DEPT_ID,
@ -2339,28 +2340,28 @@ union all
from (
SELECT *,
( SELECT CREATED_TIME FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
( SELECT CREATED_TIME FROM esua_epdc_events.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM esua_epdc_events.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
) mee
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = mee.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d3 on d2.PID = d3.ID
LEFT JOIN esua_epdc_events.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from esua_epdc_events.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = mee.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d3 on d2.PID = d3.ID
group by d3.PID
) rr on rr.DEPT_ID = sd.ID
where
sd.DEL_FLAG = '0'
and sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'district_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -2378,7 +2379,7 @@ union all
IFNULL(rr.governRatioFm,0) governRatioFm,
IFNULL(rr.satisfactionRatioFz,0) satisfactionRatioFz,
IFNULL(rr.satisfactionRatioFm,0) satisfactionRatioFm
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join
(select
d2.PID DEPT_ID,
@ -2396,28 +2397,28 @@ union all
count(mei.EVALUATION_SCORE is not null or null) as satisfactionRatioFm
from (
SELECT *,
( SELECT CREATED_TIME FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
( SELECT CREATED_TIME FROM esua_epdc_events.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM esua_epdc_events.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
) mee
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = mee.GRID_ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d2 on d1.PID = d2.ID
LEFT JOIN esua_epdc_events.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from esua_epdc_events.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = mee.GRID_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
group by d2.PID
) rr on rr.DEPT_ID = sd.ID
where
sd.DEL_FLAG = '0'
and sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'street_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -2435,7 +2436,7 @@ union all
IFNULL(rr.governRatioFm,0) governRatioFm,
IFNULL(rr.satisfactionRatioFz,0) satisfactionRatioFz,
IFNULL(rr.satisfactionRatioFm,0) satisfactionRatioFm
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join
(select
d1.PID DEPT_ID,
@ -2454,12 +2455,12 @@ union all
from (
SELECT *,
( SELECT CREATED_TIME FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
( SELECT CREATED_TIME FROM esua_epdc_events.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM esua_epdc_events.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
) mee
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d1 on d1.ID = mee.GRID_ID
LEFT JOIN esua_epdc_events.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from esua_epdc_events.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
left join esua_epdc_admin.sys_dept d1 on d1.ID = mee.GRID_ID
group by d1.PID
) rr on rr.DEPT_ID = sd.ID
@ -2467,15 +2468,15 @@ union all
sd.DEL_FLAG = '0'
and sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'community_party'
union all
select
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y' ) yearId,
date_format( date_add( now( ), INTERVAL - 1 DAY ), '%Y%m' ) monthId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
'grid' as orgType,
sd.ID orgId,
sd.PID parentId,
@ -2493,7 +2494,7 @@ union all
IFNULL(rr.governRatioFm,0) governRatioFm,
IFNULL(rr.satisfactionRatioFz,0) satisfactionRatioFz,
IFNULL(rr.satisfactionRatioFm,0) satisfactionRatioFm
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
from esua_epdc_admin.sys_dept sd
left join
(select
mee.GRID_ID DEPT_ID,
@ -2511,17 +2512,17 @@ union all
count(mei.EVALUATION_SCORE is not null or null) as satisfactionRatioFm
from (
SELECT *,
( SELECT CREATED_TIME FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = date_format(date_add( now( ), INTERVAL - 1 DAY ), '%Y-%m' )
( SELECT CREATED_TIME FROM esua_epdc_events.epdc_issue_handle WHERE DEL_FLAG = '0' AND STATE = '1' AND ISSUE_ID = issue.id ORDER BY CREATED_TIME DESC, id DESC LIMIT 1) AS HANDLE_CREATED_TIME
FROM esua_epdc_events.epdc_issue issue where issue.DEL_FLAG = '0' and date_format(issue.CREATED_TIME, '%Y-%m' ) = #{yearMonth}
) mee
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_events"/>.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
LEFT JOIN esua_epdc_events.epdc_item mei ON mee.id = mei.ISSUE_ID and mei.DEL_FLAG = '0'
left join (select count(*) as deptCount,ITEM_ID from esua_epdc_events.epdc_item_dept where DEL_FLAG = '0' group by ITEM_ID) ide on ide.ITEM_ID = mei.ID
GROUP BY mee.GRID_ID) rr on rr.DEPT_ID = sd.ID
where
sd.DEL_FLAG = '0'
and sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept_config` t
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'grid_party'
</select>

Loading…
Cancel
Save