Browse Source

Merge remote-tracking branch 'origin/feature/bssb_screen' into feature/bssb_screen

feature/dangjian
wanggongfeng 3 years ago
parent
commit
466ae9a963
  1. 2
      esua-epdc/epdc-cloud-gateway-shibei
  2. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/CityCaseDevelopDTO.java
  3. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/CityCaseLawenforcementDTO.java
  4. 53
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemListByAddressResultDTO.java
  5. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
  6. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
  7. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
  8. 49
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  9. 20
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventEfficiencyServiceImpl.java
  10. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventStatServiceImpl.java
  11. 50
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  12. 55
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventEfficiencyDao.xml
  13. 6
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventStatDao.xml

2
esua-epdc/epdc-cloud-gateway-shibei

@ -1 +1 @@
Subproject commit 7a119df0841805e0a139b7416a2ee314ca371320
Subproject commit 4a4caf14c35de0d4678fd94d141da3661b549c1e

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/CityCaseDevelopDTO.java

@ -107,4 +107,9 @@ public class CityCaseDevelopDTO implements Serializable {
* 04 市级处置12345处置
*/
private String czbs;
/**
* 诉求编码
*/
private String sqbm;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/CityCaseLawenforcementDTO.java

@ -128,4 +128,9 @@ public class CityCaseLawenforcementDTO implements Serializable {
* 04 市级处置12345处置
*/
private String czbs;
/**
* 诉求编码
*/
private String sqbm;
}

53
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemListByAddressResultDTO.java

@ -0,0 +1,53 @@
/**
* 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.elink.esua.epdc.dto.item.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class ItemListByAddressResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 项目内容
*/
private String itemContent;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 离中心点千米数
*/
private String km;
}

10
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java

@ -444,5 +444,15 @@ public class ItemController {
return itemService.pushItemDifficulty(formDto);
}
/**
* 根据经纬度查询部门下附近项目数据
* @param params
* @return
*/
@GetMapping("getItemListByAddress")
public Result<List<ItemListByAddressResultDTO>> getItemListByAddress(@RequestParam Map<String, Object> params){
return new Result<List<ItemListByAddressResultDTO>>().ok(itemService.getItemListByAddress(params));
}
}

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java

@ -522,4 +522,6 @@ public interface ItemDao extends BaseDao<ItemEntity> {
List<ItemStatisListPageResultDTO> getItemStatisListPage(Map<String, Object> params);
void updateBatchBySerialNum(@Param("updateList") List<String> updateList);
List<ItemListByAddressResultDTO> getItemListByAddress(Map<String, Object> params);
}

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java

@ -661,5 +661,5 @@ public interface ItemService extends BaseService<ItemEntity> {
*/
Result pushItemDifficulty(AcceptItemDifficultyOutFormDTO formDto);
List<ItemListByAddressResultDTO> getItemListByAddress(Map<String, Object> params);
}

49
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -102,6 +102,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.joda.time.DateTime;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -110,6 +111,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -654,6 +656,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
sqdjr.setSsjg(name);
sqdjr.setSsjgbm(code);
data.setSqdjr(sqdjr);
data.setSqbm(entity.getSerialNum());
List<ImgEntity> imageList = imgDao.selectListByRefeId(entity.getEventId() == null ? entity.getId() : entity.getEventId());
log.info("执法照片imageList:" + imageList);
//诉求照片
@ -1311,7 +1314,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
List<ItemHandleProgressResultDTO> list = baseDao.selectListOfItemHandleProgressByMobile(itemId);
// 处理多次拼接处理人信息问题
for (ItemHandleProgressResultDTO dto : list) {
String advice = dto.getAdvice();
String advice = dto.getAdvice() == null ? "" : dto.getAdvice();
// 对包含【h_s】的数据进行重新组装
if (advice.contains("h_s") && advice.contains(" 办理人:")) {
String hsStr = advice.substring(advice.indexOf("h_s"));
@ -1750,23 +1753,6 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return resultDto;
}
/**
* @param id 项目表主键
* @return boolean
* @Author yinzuomei
* @Description 校验项目是否已经上报网格化平台
* @Date 2019/12/27 10:52
**/
private boolean checkReport(String id) {
QueryWrapper<ItemGridPlatformEntity> wrapper = new QueryWrapper<>();
wrapper.eq("REFERENCE_ID", id);
List<ItemGridPlatformEntity> list = itemGridPlatformDao.selectList(wrapper);
if (list != null && list.size() > 0) {
return true;
}
return false;
}
private ItemGridPlatformEntity getReport(String id) {
return itemGridPlatformDao.getOneOfGridPlatformItemByReferenceId(id);
}
@ -3306,7 +3292,7 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
code = dtoResult.getData().getDisCenterZoningCode();
name = dtoResult.getData().getName();
}
data.setSqbm(entity.getSerialNum());
data.setSqssjg(code);
data.setSqssjgmc(name);
//组装企业数据
@ -3920,6 +3906,12 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
@Override
public PageData<ItemStatisListPageResultDTO> getItemStatisListPage(@RequestParam Map<String, Object> params) {
IPage<ItemStatisListPageResultDTO> page = getPage(params);
if (params.isEmpty() || (!params.containsKey("startTime") && !params.containsKey("endTime") && !params.containsKey("statMonth") && !params.containsKey("statYear"))) {
DateTime dateTime = new DateTime(new Date());
Date d = dateTime.plusDays(-1).toDate();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
params.put("statDate", df.format(d));
}
List<ItemStatisListPageResultDTO> list = baseDao.getItemStatisListPage(params);
return new PageData<>(list, page.getTotal());
@ -4005,17 +3997,17 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
List<String> updateList = new ArrayList<String>();
String returnMsgBody = "";
List<AcceptItemDifficultyFormDTO> itemList = formDto.getItemList();
for(int i = 0 ; i < itemList.size() ; i++){
for (int i = 0; i < itemList.size(); i++) {
AcceptItemDifficultyFormDTO acceptItemDifficultyFormDTO = itemList.get(i);
if("1".equals(acceptItemDifficultyFormDTO.getIsDifficulty())){
if ("1".equals(acceptItemDifficultyFormDTO.getIsDifficulty())) {
updateList.add(acceptItemDifficultyFormDTO.getSerialNum());
}
}
if(updateList.size() > 0){
if (updateList.size() > 0) {
try {
baseDao.updateBatchBySerialNum(updateList);
}catch (Exception e){
} catch (Exception e) {
logger.info(e);
// 保存接口调用日志
this.saveInterfaceLog("", InterfaceLogBusinessTypeEnum.ACCEPT_ITEM_PROCESS.getValue(),
@ -4031,5 +4023,16 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return new Result().ok("操作成功");
}
/**
* 根据经纬度查询部门下附近项目数据
*
* @param params
* @return
*/
@Override
public List<ItemListByAddressResultDTO> getItemListByAddress(Map<String, Object> params) {
return baseDao.getItemListByAddress(params);
}
}

20
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventEfficiencyServiceImpl.java

@ -79,7 +79,9 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen
BigDecimal satisfiedCount = new BigDecimal(item.getSatisfiedCount());
item.setClosedRatio(closedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setResponseRatio(responseCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
if (item.getClosedCount() != NumConstant.ZERO) {
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(closedCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
}
}
});
baseDao.deleteData(statDate);
@ -116,7 +118,9 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen
BigDecimal satisfiedCount = new BigDecimal(item.getSatisfiedCount());
item.setClosedRatio(closedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setResponseRatio(responseCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
if (item.getClosedCount() != NumConstant.ZERO) {
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(closedCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
}
}
});
baseDao.deleteData(statDate);
@ -153,7 +157,9 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen
BigDecimal satisfiedCount = new BigDecimal(item.getSatisfiedCount());
item.setClosedRatio(closedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setResponseRatio(responseCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(eventCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
if (item.getClosedCount() != NumConstant.ZERO) {
item.setSatisfiedRatio(satisfiedCount.multiply(hundred).divide(closedCount, NumConstant.SIX, RoundingMode.HALF_UP).stripTrailingZeros());
}
}
});
baseDao.deleteData(statDate);
@ -196,10 +202,14 @@ public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl<Screen
BigDecimal satisfiedCount = new BigDecimal(item.getSatisfiedCount());
String closedRatio = closedCount.multiply(hundred).divide(eventCount, NumConstant.ONE, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
String responseRatio = responseCount.multiply(hundred).divide(eventCount, NumConstant.ONE, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
String satisfiedRatio = satisfiedCount.multiply(hundred).divide(eventCount, NumConstant.ONE, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
item.setClosedRatio(closedRatio.concat("%"));
item.setResponseRatio(responseRatio.concat("%"));
item.setSatisfiedRatio(satisfiedRatio.concat("%"));
if (item.getClosedCount() != NumConstant.ZERO) {
String satisfiedRatio = satisfiedCount.multiply(hundred).divide(closedCount, NumConstant.ONE, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
item.setSatisfiedRatio(satisfiedRatio.concat("%"));
} else {
item.setSatisfiedRatio("0%");
}
} else {
item.setClosedRatio("0%");
item.setResponseRatio("0%");

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventStatServiceImpl.java

@ -207,7 +207,7 @@ public class ScreenDeptEventStatServiceImpl extends BaseServiceImpl<ScreenDeptEv
detail.add(eventDetail);
BarCategoryDetail closedDetail = new BarCategoryDetail();
closedDetail.setLegendName("结案数");
closedDetail.setCount(item.getEventCount());
closedDetail.setCount(item.getClosedCount());
detail.add(closedDetail);
dto.setDetail(detail);
return dto;

50
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -1279,7 +1279,8 @@
AND img.DEL_FLAG = '0'
WHERE
hp.DEL_FLAG = '0'
AND hp.ITEM_ID = #{itemId} UNION ALL
AND hp.ITEM_ID = #{itemId}
UNION ALL
SELECT
item.ID,
item.EVALUATION_TIME AS createdTime,
@ -1856,7 +1857,8 @@
) process on process.ITEM_ID = i.ID
where
i.DEL_FLAG='0'
and IS_PEOPLE = '1'
and i.IS_PEOPLE = '1'
and i.EVENT_ID IS NULL
<if test="appealType != null and appealType != ''">
and i.PEOPLE_FLAG = #{appealType}
</if>
@ -2224,8 +2226,14 @@
epdc_item a
LEFT JOIN (
select h.id,h.item_id,h.created_time,h.state
from epdc_item_handle_process h
where h.del_flag = '0'
<!-- 此处关联主表增加主表查询条件为了提升查询效率 -->
from epdc_item ei
inner join epdc_item_handle_process h on ei.id = h.item_id
where ei.is_people = '1'
and ei.del_flag = '0'
AND ei.event_id is NULL
AND ei.issue_id is NULL
and h.del_flag = '0'
and h.created_time = (
select max(created_time)
from epdc_item_handle_process
@ -2235,8 +2243,8 @@
GROUP BY h.item_id
)b ON a.id = b.item_id
WHERE
a.del_flag = '0'
AND a.is_people = '1'
a.is_people = '1'
AND a.del_flag = '0'
AND a.event_id is NULL
AND a.issue_id is NULL
<if test="deptId != null and deptId != ''">
@ -2458,6 +2466,36 @@
ORDER BY DATE_FORMAT(item.CREATED_TIME,'%Y-%m') asc
</select>
<select id="getItemListByAddress" resultType="com.elink.esua.epdc.dto.item.result.ItemListByAddressResultDTO">
SELECT
a.id id,
a.item_content itemContent,
a.issue_latitude latitude,
a.issue_longitude longitude,
round((st_distance_sphere(point(#{longitude}, #{latitude}), point(a.ISSUE_LONGITUDE, a.ISSUE_LATITUDE))) / 1000 ,1) as km
FROM
epdc_item a
INNER JOIN (
SELECT
b.id, b.item_id, b.created_time, b.state
FROM epdc_item_handle_process b
WHERE b.del_flag = '0'
AND b.created_time = (
SELECT max(created_time)
FROM epdc_item_handle_process
WHERE b.item_id = item_id AND del_flag = '0'
)
AND b.state = 1001
) process ON process.item_id = a.id
WHERE
a.del_flag = '0'
AND a.all_dept_ids LIKE concat('%', trim(#{deptId}), '%')
HAVING km <![CDATA[ <= ]]> 1
ORDER BY
a.created_time DESC,
a.all_dept_ids ASC
</select>
<update id="updateBatchBySerialNum">
UPDATE
epdc_item

55
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventEfficiencyDao.xml

@ -26,7 +26,7 @@
COUNT(ID) AS eventCount,
COUNT(CASE ITEM_STATE WHEN '10' THEN ID END) AS closedCount,
COUNT(CASE WHEN processCount > 1 THEN ID END) AS responseCount,
COUNT(CASE WHEN EVALUATION_SCORE > 0 THEN ID END) AS satisfiedCount
COUNT(CASE WHEN ITEM_STATE = '10' AND (EVALUATION_SCORE != 0 OR EVALUATION_SCORE > 0) THEN ID END) AS satisfiedCount
FROM epdc_item a
LEFT JOIN (
SELECT ITEM_ID, count(ID) AS 'processCount'
@ -35,6 +35,9 @@
GROUP BY ITEM_ID) b ON a.ID = b.ITEM_ID
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG is not null
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
<if test="statDate != null and statDate != ''">
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &lt;= #{statDate}
</if>
@ -64,7 +67,11 @@
THEN ID END) AS closedCount,
COUNT(CASE WHEN DATE_FORMAT(b.CREATED_TIME, '%Y-%m') = #{statDate} THEN ID END) AS responseCount,
COUNT(CASE
WHEN DATE_FORMAT(EVALUATION_TIME, '%Y-%m') = #{statDate} AND EVALUATION_SCORE > 0
WHEN ITEM_STATE = '10' AND
DATE_FORMAT(c.CREATED_TIME, '%Y-%m') = #{statDate} AND
(EVALUATION_SCORE != 0 OR
(DATE_FORMAT(EVALUATION_TIME, '%Y-%m') = #{statDate} AND
EVALUATION_SCORE > 0))
THEN ID END) AS satisfiedCount
FROM epdc_item a
LEFT JOIN (
@ -78,6 +85,9 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y-%m') = #{statDate}) a STRAIGHT_JOIN epdc_item_handle_process b
ON b.ITEM_ID = a.ID
AND b.DEL_FLAG = '0'
@ -97,12 +107,18 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y-%m') = #{statDate}) a
STRAIGHT_JOIN epdc_item_handle_process b ON b.ITEM_ID = a.ID AND b.DEL_FLAG = '0' AND b.STATE = '60'
) c ON a.ID = c.ITEM_ID
WHERE DEL_FLAG = '0'
AND DATE_FORMAT(a.CREATED_TIME, '%Y-%m') = #{statDate}
AND PEOPLE_FLAG is not null
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
GROUP BY ALL_DEPT_IDS
) b ON b.ALL_DEPT_IDS LIKE CONCAT('%', a.id, '%')
WHERE a.del_flag = '0'
@ -129,7 +145,11 @@
THEN ID END) AS closedCount,
COUNT(CASE WHEN DATE_FORMAT(b.CREATED_TIME, '%Y') = #{statDate} THEN ID END) AS responseCount,
COUNT(CASE
WHEN DATE_FORMAT(EVALUATION_TIME, '%Y') = #{statDate} AND EVALUATION_SCORE > 0
WHEN ITEM_STATE = '10' AND
DATE_FORMAT(c.CREATED_TIME, '%Y') = #{statDate} AND
(EVALUATION_SCORE != 0 OR
(DATE_FORMAT(EVALUATION_TIME, '%Y') = #{statDate} AND
EVALUATION_SCORE > 0))
THEN ID END) AS satisfiedCount
FROM epdc_item a
LEFT JOIN (
@ -143,6 +163,9 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y') = #{statDate}) a STRAIGHT_JOIN epdc_item_handle_process b
ON b.ITEM_ID = a.ID
AND b.DEL_FLAG = '0'
@ -162,12 +185,18 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y') = #{statDate}) a
STRAIGHT_JOIN epdc_item_handle_process b ON b.ITEM_ID = a.ID AND b.DEL_FLAG = '0' AND b.STATE = '60'
) c ON a.ID = c.ITEM_ID
WHERE DEL_FLAG = '0'
AND DATE_FORMAT(a.CREATED_TIME, '%Y') = #{statDate}
AND PEOPLE_FLAG is not null
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
GROUP BY ALL_DEPT_IDS
) b ON b.ALL_DEPT_IDS LIKE CONCAT('%', a.id, '%')
WHERE a.del_flag = '0'
@ -235,9 +264,14 @@
'%Y-%m-%d') &lt;= #{endDate}
THEN ID END) AS responseCount,
COUNT(CASE
WHEN DATE_FORMAT(EVALUATION_TIME, '%Y-%m-%d') &gt;= #{startDate} AND
DATE_FORMAT(EVALUATION_TIME,
'%Y-%m-%d') &lt;= #{endDate} AND EVALUATION_SCORE > 0
WHEN
ITEM_STATE = '10' AND
DATE_FORMAT(c.CREATED_TIME, '%Y-%m-%d') &gt;= #{startDate} AND
DATE_FORMAT(c.CREATED_TIME, '%Y-%m-%d') &lt;= #{endDate} AND
(EVALUATION_SCORE != 0 OR
(DATE_FORMAT(EVALUATION_TIME, '%Y-%m-%d') &gt;= #{startDate} AND
DATE_FORMAT(EVALUATION_TIME, '%Y-%m-%d') &lt;= #{endDate} AND
EVALUATION_SCORE > 0))
THEN ID END) AS satisfiedCount
FROM epdc_item a
LEFT JOIN (
@ -252,6 +286,9 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &gt;= #{startDate}
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &lt;= #{endDate}
) a
@ -272,6 +309,9 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &gt;= #{startDate}
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &lt;= #{endDate}) a
STRAIGHT_JOIN epdc_item_handle_process b ON b.ITEM_ID = a.ID AND b.DEL_FLAG = '0' AND b.STATE = '60'
@ -280,6 +320,9 @@
AND DATE_FORMAT(a.CREATED_TIME, '%Y-%m-%d') &gt;= #{startDate}
AND DATE_FORMAT(a.CREATED_TIME, '%Y-%m-%d') &lt;= #{endDate}
AND PEOPLE_FLAG is not null
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
GROUP BY ALL_DEPT_IDS
) b ON b.ALL_DEPT_IDS LIKE CONCAT('%', a.id, '%')
WHERE a.del_flag = '0'

6
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventStatDao.xml

@ -38,6 +38,9 @@
FROM epdc_item
WHERE DEL_FLAG = '0'
AND PEOPLE_FLAG IS NOT NULL
AND IS_PEOPLE = '1'
AND EVENT_ID is null
AND ISSUE_ID is null
<if test="type == 'all'">
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') &lt;= #{statDate}
</if>
@ -114,6 +117,9 @@
ON a.ID = b.ITEM_ID AND b.DEL_FLAG = '0' AND b.STATE = '60'
WHERE a.DEL_FLAG = '0'
AND a.PEOPLE_FLAG IS NOT NULL
AND a.IS_PEOPLE = '1'
AND a.EVENT_ID is null
AND a.ISSUE_ID is null
<if test="type == 'all'">
AND DATE_FORMAT(b.CREATED_TIME, '%Y-%m-%d') &lt;= #{statDate}
</if>

Loading…
Cancel
Save