+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto.screen;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 大屏-事件汇总统计
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2022-10-11
+ */
+@Data
+public class ScreenDeptEventStatDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 部门ID
+ */
+ private String deptId;
+
+ /**
+ * 部门名
+ */
+ private String deptName;
+
+ /**
+ * 上级ID
+ */
+ private String pid;
+
+ /**
+ * 所有上级ID
+ */
+ private String pids;
+
+ /**
+ * 部门级别
+ */
+ private String deptLevel;
+
+ /**
+ * 部门排序
+ */
+ private String deptSort;
+
+ /**
+ * 统计年份yyyy
+ */
+ private String statYear;
+
+ /**
+ * 统计月份yyyy-MM
+ */
+ private String statMonth;
+
+ /**
+ * 统计日期yyyy-MM-dd
+ */
+ private String statDate;
+
+ /**
+ * 事件总数
+ */
+ private Integer eventCount;
+
+ /**
+ * 事件增量
+ */
+ private Integer eventIncr;
+
+ /**
+ * 民生诉求总数
+ */
+ private Integer livelihoodCount;
+
+ /**
+ * 民生诉求增量
+ */
+ private Integer livelihoodIncr;
+
+ /**
+ * 发展诉求总数
+ */
+ private Integer developCount;
+
+ /**
+ * 发展诉求增量
+ */
+ private Integer developIncr;
+
+ /**
+ * 执法诉求总数
+ */
+ private Integer lawCount;
+
+ /**
+ * 执法诉求增量
+ */
+ private Integer lawIncr;
+
+ /**
+ * 结案总数
+ */
+ private Integer closedCount;
+
+ /**
+ * 结案增量
+ */
+ private Integer closedIncr;
+
+ /**
+ * 删除标识 0:未删除,1:删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/DataStatisticsFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/DataStatisticsFormDTO.java
new file mode 100644
index 000000000..891bb0984
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/DataStatisticsFormDTO.java
@@ -0,0 +1,19 @@
+package com.elink.esua.epdc.dto.screen.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 10:21
+ */
+@Data
+public class DataStatisticsFormDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+ private String statType;
+ private String statDate;
+ private String startDate;
+ private String endDate;
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/EventStatisticsFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/EventStatisticsFormDTO.java
new file mode 100644
index 000000000..86008015e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/form/EventStatisticsFormDTO.java
@@ -0,0 +1,26 @@
+package com.elink.esua.epdc.dto.screen.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 10:21
+ */
+@Data
+public class EventStatisticsFormDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+ /**
+ * 部门ID
+ */
+ private String deptId;
+ /**
+ * 统计类型 默认 1,本月 2,本年 3,自定义区间 4
+ */
+ private String statType;
+ private String statDate;
+ private String startDate;
+ private String endDate;
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/result/EventStatisticsResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/result/EventStatisticsResultDTO.java
new file mode 100644
index 000000000..e58b56d97
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/result/EventStatisticsResultDTO.java
@@ -0,0 +1,44 @@
+package com.elink.esua.epdc.dto.screen.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 10:21
+ */
+@Data
+public class EventStatisticsResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+ /**
+ * 部门ID
+ */
+ private String deptId;
+
+ /**
+ * 部门名称
+ */
+ private String deptName;
+
+ /**
+ * 事件总数
+ */
+ private Integer eventCount;
+
+ /**
+ * 民生诉求总数
+ */
+ private Integer livelihoodCount;
+
+ /**
+ * 发展诉求总数
+ */
+ private Integer developCount;
+
+ /**
+ * 执法诉求总数
+ */
+ private Integer lawCount;
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
index 9e642f524..bcfaff473 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
@@ -472,10 +472,11 @@ public class IssueServiceImpl extends BaseServiceImpl imp
itemEntity.setPeopleFlag("0");//民生诉求
//民生诉求所属网格对应的所属社区的市中心编码
Result result = adminFeignClient.getCompleteDept(issueEntity.getGridId());
- if(!result.success()){
+ if (!result.success()) {
throw new RenException(result.getMsg());
}
- itemEntity.setSerialNum(itemServiceImpl.getSerialNum("MS" + result.getData().getCommunityDisCenterZoningCode()));
+ String code = result.getData().getCommunityDisCenterZoningCode();
+ itemEntity.setSerialNum(itemServiceImpl.getSerialNum("MS" + code));
return itemEntity;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
index 4dfb8daba..c3125dd5d 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
@@ -349,6 +349,19 @@ public class ItemController {
return new Result>().ok(page);
}
+ /**
+ * @describe: 北尚诉求列表(不满意列表)
+ * @author wgf
+ * @date 2022/10/10 08:39
+ * @params [dto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ */
+ @GetMapping("getItemAppealPageUnsatisfactory")
+ public Result> getItemAppealPageUnsatisfactory(@RequestParam Map params){
+ PageData page = itemService.getItemAppealPageUnsatisfactory(params);
+ return new Result>().ok(page);
+ }
+
/**
* @describe: 北尚诉求详情
* @author wangtong
@@ -401,5 +414,16 @@ public class ItemController {
ValidatorUtils.validateEntity(formDto);
return itemService.pushItemProcess(formDto);
}
+
+ /**
+ * @describe: 数据统计页面-北上诉求列表
+ * 逻辑同方法 getItemAppealPage
+ */
+ @GetMapping("getItemStatisListPage")
+ public Result> getItemStatisListPage(@RequestParam Map params){
+ PageData page = itemService.getItemStatisListPage(params);
+ return new Result>().ok(page);
+ }
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/PushToCityGridController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/PushToCityGridController.java
index 3c4c29881..9f8308944 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/PushToCityGridController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/PushToCityGridController.java
@@ -6,8 +6,6 @@ import com.elink.esua.epdc.modules.item.service.PushToCityGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import javax.management.relation.RelationSupport;
-
@RestController
@RequestMapping("PushToCity")
public class PushToCityGridController {
@@ -52,7 +50,7 @@ public class PushToCityGridController {
*/
@PostMapping("AppealReporting")
public Result AppealReporting(String processId, String source){
- return pushToCityGridService.AppealReporting(processId, source);
+ return pushToCityGridService.appealReporting(processId, source);
}
/**
@@ -65,7 +63,7 @@ public class PushToCityGridController {
*/
@PostMapping("ReportRejection")
public Result ReportRejection(ItemHandleProcessDTO dto){
- return pushToCityGridService.ReportRejection(dto.getItemId());
+ return pushToCityGridService.reportRejection(dto.getItemId());
}
/**
@@ -78,6 +76,6 @@ public class PushToCityGridController {
*/
@PostMapping("AppealHandling")
public Result AppealHandling(@RequestBody ItemHandleProcessDTO dto){
- return pushToCityGridService.AppealHandling(dto);
+ return pushToCityGridService.appealHandling(dto);
}
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
index 009a7ac4e..a9f3dac03 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
@@ -18,16 +18,18 @@
package com.elink.esua.epdc.modules.item.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
-import com.elink.esua.epdc.dto.item.ItemHandleProcessDTO;
-import com.elink.esua.epdc.dto.item.form.*;
-import com.elink.esua.epdc.dto.result.KpiItemTimeLimitByDeptResultDTO;
-import com.elink.esua.epdc.dto.form.KpiMetaDataOfEventsFormDTO;
import com.elink.esua.epdc.dto.events.form.GroupFormDTO;
+import com.elink.esua.epdc.dto.events.form.ItemDailyStatisFormDTO;
+import com.elink.esua.epdc.dto.events.result.ItemDailyStatisResultDTO;
+import com.elink.esua.epdc.dto.form.KpiMetaDataOfEventsFormDTO;
import com.elink.esua.epdc.dto.item.ItemDTO;
+import com.elink.esua.epdc.dto.item.ItemHandleProcessDTO;
import com.elink.esua.epdc.dto.item.ItemPendingHandleDTO;
+import com.elink.esua.epdc.dto.item.form.*;
import com.elink.esua.epdc.dto.item.result.*;
import com.elink.esua.epdc.dto.result.KpiEvaluationAmountResultDTO;
import com.elink.esua.epdc.dto.result.KpiItemHandleAmountResultDTO;
+import com.elink.esua.epdc.dto.result.KpiItemTimeLimitByDeptResultDTO;
import com.elink.esua.epdc.modules.item.entity.ItemEntity;
import com.elink.esua.epdc.modules.item.entity.ItemHandleProcessEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -409,6 +411,15 @@ public interface ItemDao extends BaseDao {
*/
List getItemAppealPage(Map params);
+ /**
+ * @describe: 北尚诉求列表(不满意列表)
+ * @author wgf
+ * @date 2022/10/10 08:39
+ * @params [dto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ */
+ List getItemAppealPageUnsatisfactory(Map params);
+
/**
* @return com.elink.esua.epdc.dto.item.result.ItemAppealDetailResultDTO
* @describe: 北尚诉求详情
@@ -466,6 +477,9 @@ public interface ItemDao extends BaseDao {
*/
List listItemHandleDept();
+ ItemDailyStatisResultDTO itemDailyStatis(ItemDailyStatisFormDTO formDTO);
+
+
/**
* 类别分析
* @param formDTO
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
index 9656ebd2a..0555631cc 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
@@ -153,6 +153,10 @@ public class ItemEntity extends BaseEpdcEntity {
*/
private Double issueLongitude;
+ /**
+ * 满意度评价状态(0-不可评价,1-可评价)
+ */
+ private String evaluationState;
/**
* 满意度评价得分
*/
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
index 4c4b981a3..7994e781a 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
@@ -544,6 +544,15 @@ public interface ItemService extends BaseService {
*/
PageData getItemAppealPage(Map params);
+ /**
+ * @describe: 北尚诉求列表(不满意列表)
+ * @author wgf
+ * @date 2022/10/10 08:39
+ * @params [dto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ */
+ PageData getItemAppealPageUnsatisfactory(Map params);
+
/**
* @describe: 北尚诉求详情
* @author wangtong
@@ -610,6 +619,8 @@ public interface ItemService extends BaseService {
*/
String getSqid(String itemId);
+ PageData getItemStatisListPage(Map params);
+
/**
* 大屏-类别分析
* @param formDTO
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/PushToCityGridService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/PushToCityGridService.java
index 92bf8c61a..60646335c 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/PushToCityGridService.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/PushToCityGridService.java
@@ -107,7 +107,7 @@ public interface PushToCityGridService {
* @author LZN
* @date 2022/9/19 10:22
*/
- Result AppealReporting(String processId,String source);
+ Result appealReporting(String processId, String source);
/**
* 事件感知
@@ -127,7 +127,7 @@ public interface PushToCityGridService {
* @author LZN
* @date 2022/9/19 10:43
*/
- Result ReportRejection(String id);
+ Result reportRejection(String id);
/**
* 诉求处理
@@ -137,7 +137,7 @@ public interface PushToCityGridService {
* @author LZN
* @date 2022/9/19 11:01
*/
- Result AppealHandling(ItemHandleProcessDTO dto);
+ Result appealHandling(ItemHandleProcessDTO dto);
/**
* 2.8 诉求退件
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayServiceImpl.java
index b8cc42811..108ecbedc 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayServiceImpl.java
@@ -77,7 +77,7 @@ public class ItemFusingDelayServiceImpl extends BaseServiceImpl page(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
index f76bb8fe6..ffa01a64b 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
@@ -228,7 +228,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public PageData listOfItemsForPCEnd(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
@@ -280,7 +280,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public List listEqPc(ItemWorkListFormDTO formDTO) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (formDTO.getStreetId() != null && !"".equals(formDTO.getStreetId())) {
@@ -325,7 +325,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public PageData listOfItemsForPCReject(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
@@ -365,7 +365,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public List rejectListEqPc(ItemWorkListFormDTO formDTO) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (formDTO.getStreetId() != null && !"".equals(formDTO.getStreetId())) {
@@ -495,11 +495,11 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public Result submitLawItem(ItemLawSubmitDTO formDto) {
UserDetail userDetail = SecurityUser.getUser();
if (null == userDetail) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (!(StringUtils.isNotBlank(userDetail.getTypeKey())
&& OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(userDetail.getTypeKey()))) {
- throw new RuntimeException("请用街道账号进行上报");
+ throw new RenException("请用街道账号进行上报");
}
ItemEntity itemEntity = new ItemEntity();
/**
@@ -515,6 +515,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
itemEntity.setDistributeTime(new Date());
itemEntity.setGrid("执法诉求" + userDetail.getDeptName());
itemEntity.setGridId(userDetail.getDeptId());
+
itemEntity.setItemContent(formDto.getLawContent());
itemEntity.setItemVoice(formDto.getItemVoice());
itemEntity.setDuration(formDto.getDuration());
@@ -535,8 +536,18 @@ public class ItemServiceImpl extends BaseServiceImpl implem
if (!dtoResult.success()) {
throw new RenException(dtoResult.getMsg());
}
+
+ // 因为是街道账号,所以上级一定是市北区委
+ Long pids = dtoResult.getData().getPid();
+ String pnames = dtoResult.getData().getParentName();
+ itemEntity.setParentDeptIds(pids + "");
+ itemEntity.setParentDeptNames(pnames);
+ itemEntity.setAllDeptIds(pids + "," + userDetail.getDeptId());
+ itemEntity.setAllDeptNames(pnames + "-" + userDetail.getDeptName());
+
// 流水号
- itemEntity.setSerialNum(getSerialNum("ZF" + dtoResult.getData().getDisCenterZoningCode()));
+ String code = dtoResult.getData().getDisCenterZoningCode();
+ itemEntity.setSerialNum(getSerialNum("ZF" + code));
baseDao.insert(itemEntity);
//插入项目部门关联表
itemDeptService.savePeopleSubmitInfo(itemEntity);
@@ -1279,12 +1290,12 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public List listOfItemHandleProgressByMobile(String itemId) {
List list = baseDao.selectListOfItemHandleProgressByMobile(itemId);
// 处理多次拼接处理人信息问题
- for(ItemHandleProgressResultDTO dto : list){
+ for (ItemHandleProgressResultDTO dto : list) {
String advice = dto.getAdvice();
// 对包含【h_s】的数据进行重新组装
- if(advice.contains("h_s")){
- String hsStr = advice.substring(advice.indexOf("h_s"),advice.length());
- String adviceOld = advice.substring(0,advice.indexOf(" 办理人:"));
+ if (advice.contains("h_s") && advice.contains(" 办理人:")) {
+ String hsStr = advice.substring(advice.indexOf("h_s"), advice.length());
+ String adviceOld = advice.substring(0, advice.indexOf(" 办理人:"));
String adviceNew = adviceOld + hsStr;
dto.setAdvice(adviceNew);
}
@@ -1385,7 +1396,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
// 发送菜单消息-待处理项目-吹哨部门
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null);
// 网格吹哨,上报市平台
- pushToCityGridService.AppealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
+ pushToCityGridService.appealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
log.info("网格吹哨,上报市平台-结束");
// 上报网格化平台(社区吹哨)
} else if (ItemHandleCategoryEnum.HANDLE_REPORT.getValue() == dto.getHandleCategory()) {
@@ -1397,7 +1408,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
log.info("处理项目-上报网格化平台-if结束");
//社区吹哨,上报市平台
- pushToCityGridService.AppealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
+ pushToCityGridService.appealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
log.info("社区吹哨-上报市平台-结束");
// 结案申请
} else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue() == dto.getHandleCategory()) {
@@ -1458,11 +1469,11 @@ public class ItemServiceImpl extends BaseServiceImpl implem
longTreeSet.addAll(newDeptIds);
List deptIds = new ArrayList<>(longTreeSet);
- // 网格结案,社区结案,上报市平台
- pushToCityGridService.AppealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
+ // 网格结案申请,社区结案申请,上报市平台
+// pushToCityGridService.AppealReporting(handleProcessEntity.getId(), NumConstant.ZERO_STR);
// 发送菜单消息-待处理项目-吹哨部门
this.sendWhistlingDeptItemHandleMenuNotice(deptIds, null);
- pushToCityGridService.AppealHandling(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class));
+ pushToCityGridService.appealHandling(ConvertUtils.sourceToTarget(handleProcessEntity, ItemHandleProcessDTO.class));
log.info("处理项目-结案申请-if结束");
} else {
handleProcessEntity.setState(dto.getHandleCategory());
@@ -1911,7 +1922,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
ItemWorkListFormDTO formDTO = new ItemWorkListFormDTO();
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (formDTO.getStreetId() != null && !"".equals(formDTO.getStreetId())) {
@@ -2143,7 +2154,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
*/
private SendEventFormDto packageSendEventEntity(ItemEntity itemEntity, ItemHandleSubmitFormDTO dto) throws Exception {
SendEventFormDto sendDto = new SendEventFormDto();
- SendInputInfoFormDto formDto = new SendInputInfoFormDto();
+
//推送类别(事件上报)
sendDto.setSENDTYPE(CommonConstants.SEND_TYPE);
//上报
@@ -2165,7 +2176,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
//事件来源
sendDto.setSJLY(CommonConstants.PARTY_EVENT_SOURCE_ZF);
//备注
- sendDto.setBZXX(getItemLawNote(itemEntity.getId()));
+ sendDto.setBZXX(getItemLawNote(itemEntity.getId(), itemEntity.getSerialNum()));
}
//执法诉求和发展诉求gridId存的是街道id,需要单独查
Result streetResult = adminFeignClient.getSysDeptInfo(itemEntity.getGridId());
@@ -2191,9 +2202,9 @@ public class ItemServiceImpl extends BaseServiceImpl implem
}
//备注
log.info("上报网格化平台dto:" + dto);
- sendDto.setBZXX(dto.getHandleAdvice());
+ sendDto.setBZXX(dto.getHandleAdvice()+" 诉求编码:" + itemEntity.getSerialNum());
if (StringUtils.isNotBlank(dto.getHandleAdviceRemark())) {
- sendDto.setBZXX(sendDto.getBZXX() + "\n不予受理详细说明:" + dto.getHandleAdviceRemark());
+ sendDto.setBZXX(sendDto.getBZXX() + "\n不予受理详细说明:" + dto.getHandleAdviceRemark() + "\n诉求编码:" + itemEntity.getSerialNum());
}
Result deptResult = adminFeignClient.getDeptInfoCode(itemEntity.getGridId());
@@ -2305,7 +2316,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
}
//查询所对应的大类
CategoryEntity thirdCate = categoryDao.selectById(thirdId);
- if (null == thirdCate) {
+ if (null == thirdCate || StringUtils.isBlank(thirdCate.getEventCategoryCode())) {
sendDto.setSJLYU("21");
sendDto.setSJDL("2199");
return;
@@ -2344,13 +2355,14 @@ public class ItemServiceImpl extends BaseServiceImpl implem
return result;
}
- private String getItemLawNote(String itemId) {
+ private String getItemLawNote(String itemId, String serialNum) {
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq("item_id", itemId);
wrapper.eq("del_flag", "0");
ItemLawEntity itemLaw = itemLawDao.selectOne(wrapper);
String result = "主办单位:" + itemLaw.getHostUnit() + "\n\n"
- + "协办单位:" + itemLaw.getAssistUnit();
+ + "协办单位:" + itemLaw.getAssistUnit() + "\n\n"
+ + "诉求编码:" + serialNum;
return result;
}
@@ -2832,7 +2844,12 @@ public class ItemServiceImpl extends BaseServiceImpl implem
ItemGridPlatformHandleStatusEnum.HANDLE_YQSQ.getValue() == dto.getState() ||
ItemGridPlatformHandleStatusEnum.HANDLE_SQBJ.getValue() == dto.getState() ||
ItemGridPlatformHandleStatusEnum.HANDLE_XSSQ.getValue() == dto.getState()) {
- pushToCityGridService.AppealReporting(dto.getId(), NumConstant.ONE_STR);
+
+// pushToCityGridService.appealReporting(dto.getId(), NumConstant.ONE_STR);
+ }
+ // 网格化平台,处置完成
+ if (ItemGridPlatformHandleStatusEnum.HANDLE_CL.getValue() == dto.getState()) {
+ pushToCityGridService.appealHandling(dto);
}
}
@@ -3145,9 +3162,17 @@ public class ItemServiceImpl extends BaseServiceImpl implem
} else if (NumConstant.ONE_STR.equals(formDto.getPeopleFlag())) {
//执法诉求所属街道的市中心编码
Result dtoResult = adminFeignClient.getSysDeptInfo(entity.getGridId());
- if (!dtoResult.success()) {
+ if (dtoResult.success()) {
code = dtoResult.getData().getDisCenterZoningCode();
+ // 因为是街道账号,所以上级一定是市北区委
+ Long pids = dtoResult.getData().getPid();
+ String pnames = dtoResult.getData().getParentName();
+ entity.setParentDeptIds(pids + "");
+ entity.setParentDeptNames(pnames);
+ entity.setAllDeptIds(pids + "," + entity.getGridId());
+ entity.setAllDeptNames(pnames + "-" + entity.getGrid());
}
+
entity.setSerialNum(getSerialNum("FZ" + code));
}
baseDao.insert(entity);
@@ -3355,7 +3380,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public List unExportList(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
@@ -3395,7 +3420,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public List rejectUnexport(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
@@ -3471,6 +3496,23 @@ public class ItemServiceImpl extends BaseServiceImpl implem
}
+ @Override
+ public PageData getItemAppealPageUnsatisfactory(@RequestParam Map params) {
+ UserDetail user = SecurityUser.getUser();
+ //部门ID列表
+ List deptIdList = user.getDeptIdList();
+ params.put("deptIdList", null);
+ if (null != deptIdList && deptIdList.size() > 0) {
+ params.put("deptIdList", deptIdList);
+ }
+ IPage page = getPage(params);
+ List list = baseDao.getItemAppealPageUnsatisfactory(params);
+ Map map = listItemHandleDept();
+ list.forEach(item -> item.setItemHandleDeptId(map.get(item.getId())));
+ return new PageData<>(list, page.getTotal());
+
+ }
+
@Override
public Result getItemAppealDetail(String id) {
ItemAppealDetailResultDTO result = baseDao.getItemAppealDetail(id);
@@ -3503,7 +3545,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public PageData getExaminePage(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
params.put("deptId", user.getDeptId());
IPage page = getPage(params);
@@ -3518,7 +3560,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
formDTO.setDeptId(user.getDeptId());
List list = baseDao.getExaminePageEqPc(formDTO);
@@ -3530,7 +3572,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public Result examineCase(ExamineCaseFormDTO formDto) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
ItemHandleProcessEntity process = new ItemHandleProcessEntity();
@@ -3550,12 +3592,12 @@ public class ItemServiceImpl extends BaseServiceImpl implem
throw new RenException("审批标识有误");
}
itemHandleProcessDao.insert(process);
- //同意的时候,上报诉求处理
- if (NumConstant.ZERO_STR.equals(formDto.getCheckFlag())) {
- // 社区审批,上报市平台
- pushToCityGridService.AppealReporting(process.getId(), NumConstant.ZERO_STR);
- //pushToCityGridService.AppealHandling(ConvertUtils.sourceToTarget(process, ItemHandleProcessDTO.class));
- }
+// // 结案申请,同意的时候,上报诉求处理
+// if (NumConstant.ZERO_STR.equals(formDto.getCheckFlag())) {
+// // 社区审批,上报市平台
+//// pushToCityGridService.AppealReporting(process.getId(), NumConstant.ZERO_STR);
+// //pushToCityGridService.AppealHandling(ConvertUtils.sourceToTarget(process, ItemHandleProcessDTO.class));
+// }
if ("0".equals(formDto.getCheckFlag())) {
//发送结案申请至街道网格化平台
@@ -3643,7 +3685,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
public String getSerialNum(String prefix) {
String serialNum = prefix;
String dateStr = DateUtils.format(new Date(), DateUtils.DATE_TIME);
- serialNum = serialNum + dateStr + "-";
+ serialNum = serialNum + "-" + dateStr + "-";
String key = RedisKeys.getSerialNumKey(serialNum);
String numStr;
@@ -3724,6 +3766,8 @@ public class ItemServiceImpl extends BaseServiceImpl implem
itemHandleProcessDto.setGridPartyname("结案");
itemHandleProcessDto.setGridTaskcnname("区中心");
item.setItemState(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue());
+ // 可以进行评价了
+ item.setEvaluationState(NumConstant.ONE_STR);
updateById(item);
} else if ("1".equals(formDto.getState())) {
itemHandleProcessDto.setState(ItemGridPlatformHandleStatusEnum.HANDLE_BH.getValue());
@@ -3746,7 +3790,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem
if ("1".equals(formDto.getState())) {
// 上报驳回,上报市平台
log.info("上报驳回,上报市平台" + itemHandleProcessDto.getId());
- pushToCityGridService.ReportRejection(itemHandleProcessDto.getId());
+ pushToCityGridService.reportRejection(itemHandleProcessDto.getId());
} else if ("0".equals(formDto.getState())) {
// 诉求审核,上报市平台
pushToCityGridService.appealAudit(itemHandleProcessDto.getId());
@@ -3880,6 +3924,21 @@ public class ItemServiceImpl extends BaseServiceImpl implem
return "";
}
+ /**
+ * @describe: 数据统计页面-北上诉求列表
+ * 逻辑同方法 getItemAppealPage
+ */
+ @Override
+ public PageData getItemStatisListPage(@RequestParam Map params) {
+ UserDetail user = SecurityUser.getUser();
+ IPage page = getPage(params);
+ List list = baseDao.getItemAppealPage(params);
+ Map map = listItemHandleDept();
+ list.forEach(item -> item.setItemHandleDeptId(map.get(item.getId())));
+ return new PageData<>(list, page.getTotal());
+
+ }
+
@Override
public List categoryAnalysis(ScreenTotalFormDTO formDTO) {
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemTimeoutServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemTimeoutServiceImpl.java
index 1a1c9c36f..4880791cb 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemTimeoutServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemTimeoutServiceImpl.java
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant;
+import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
@@ -115,7 +116,7 @@ public class ItemTimeoutServiceImpl extends BaseServiceImpl listOfItemsForPCEnd(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
@@ -172,7 +173,7 @@ public class ItemTimeoutServiceImpl extends BaseServiceImpl itemOutExportList(Map params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
- throw new RuntimeException("获取用户信息失败");
+ throw new RenException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/PushToCityGridServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/PushToCityGridServiceImpl.java
index f72c7389f..c68647e28 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/PushToCityGridServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/PushToCityGridServiceImpl.java
@@ -439,7 +439,7 @@ public class PushToCityGridServiceImpl implements PushToCityGridService {
* @date 2022/9/19 10:22
*/
@Override
- public Result AppealReporting(String processId, String source) {
+ public Result appealReporting(String processId, String source) {
ItemHandleProcessToCityResultDTO item = itemHandleProcessDao.getAppealReporting(processId);
if (null == item) {
log.error("流程节点不存在");
@@ -528,7 +528,7 @@ public class PushToCityGridServiceImpl implements PushToCityGridService {
* @date 2022/9/19 10:44
*/
@Override
- public Result ReportRejection(String id) {
+ public Result reportRejection(String id) {
String ids = id; // ItemGridPlatformHandleStatusEnum.HANDLE_BH.getValue();
ItemHandleProcessToCityResultDTO item = itemHandleProcessDao.getReportRejection(ids);
if (null == item) {
@@ -587,7 +587,7 @@ public class PushToCityGridServiceImpl implements PushToCityGridService {
* @date 2022/9/19 11:02
*/
@Override
- public Result AppealHandling(ItemHandleProcessDTO processDTO) {
+ public Result appealHandling(ItemHandleProcessDTO processDTO) {
String id = processDTO.getId();
AppealHandlingToCityResultDTO item = itemHandleProcessDao.getAppealHandling(id, processDTO.getItemId());
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/.gitkeep b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenItemController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenItemController.java
new file mode 100644
index 000000000..4358e0b4c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenItemController.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.controller;
+
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.dto.events.form.ItemDailyStatisFormDTO;
+import com.elink.esua.epdc.dto.events.result.ItemDailyStatisResultDTO;
+import com.elink.esua.epdc.modules.screen.service.ScreenService;
+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;
+
+
+/**
+ * 项目统计相关接口
+ */
+@RestController
+@RequestMapping("itemstatis")
+public class ScreenItemController {
+
+ @Autowired
+ private ScreenService screenService;
+
+
+
+ /**
+ * 数据统计-各诉求不同状态数据
+ *
+ * @return
+ */
+ @PostMapping("itemdailystatis")
+ public Result itemDailyStatis(@RequestBody ItemDailyStatisFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, AddGroup.class);
+ return new Result().ok(screenService.itemDailyStatis(formDTO));
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventEfficiencyDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventEfficiencyDao.java
new file mode 100644
index 000000000..ccbf3cc4e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventEfficiencyDao.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventEfficiencyEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 大屏-事件结案数与效能评价统计
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2022-10-11
+ */
+@Mapper
+public interface ScreenDeptEventEfficiencyDao extends BaseDao {
+ /**
+ * 日统计
+ * @Param statDate
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:50
+ */
+ List getEventEfficiencyDaily(@Param("statDate") String statDate);
+
+ /**
+ * 月统计
+ * @Param statDate
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:50
+ */
+ List getEventEfficiencyMonthly(@Param("statDate") String statDate);
+
+ /**
+ * 年统计
+ * @Param statDate
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:50
+ */
+ List getEventEfficiencyYearly(@Param("statDate") String statDate);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventStatDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventStatDao.java
new file mode 100644
index 000000000..2b705dc58
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenDeptEventStatDao.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.screen.ScreenDeptEventStatDTO;
+import com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO;
+import com.elink.esua.epdc.dto.screen.result.EventStatisticsResultDTO;
+import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventStatEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 大屏-事件汇总统计
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2022-10-11
+ */
+@Mapper
+public interface ScreenDeptEventStatDao extends BaseDao {
+ /**
+ * 事件统计
+ *
+ * @Param statDate
+ * @Return {@link List< ScreenDeptEventStatDTO>}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 14:21
+ */
+ List getEventStat(@Param("statDate") String statDate);
+
+ /**
+ * 获取某天的统计结果
+ * @Param formDTO
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:31
+ */
+ List getEventStatByDay(EventStatisticsFormDTO formDTO);
+
+ /**
+ * 获取某个区间的统计结果,包括年,月,以及自定义区间
+ * @Param formDTO
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:32
+ */
+ List getEventStatByOther(EventStatisticsFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/entity/ScreenDeptEventEfficiencyEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/entity/ScreenDeptEventEfficiencyEntity.java
new file mode 100644
index 000000000..7a2c56cd7
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/entity/ScreenDeptEventEfficiencyEntity.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.screen.ScreenDeptEventStatDTO;
+import com.elink.esua.epdc.dto.screen.form.DataStatisticsFormDTO;
+import com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO;
+import com.elink.esua.epdc.dto.screen.result.EventStatisticsResultDTO;
+import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventStatEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 大屏-事件汇总统计
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2022-10-11
+ */
+public interface ScreenDeptEventStatService extends BaseService {
+
+ /**
+ * 大屏数据统计
+ *
+ * @Param formDTO
+ * @Return
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 10:24
+ */
+ void dataStatistics(DataStatisticsFormDTO formDTO);
+
+ /**
+ * 获取大屏数据
+ *
+ * @Param formDTO
+ * @Return {@link List}
+ * @Author zhaoqifeng
+ * @Date 2022/10/11 15:13
+ */
+ List getEventStat(EventStatisticsFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenService.java
new file mode 100644
index 000000000..a9abfa5b2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenService.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.service;
+
+import com.elink.esua.epdc.dto.events.form.ItemDailyStatisFormDTO;
+import com.elink.esua.epdc.dto.events.result.ItemDailyStatisResultDTO;
+
+/**
+ * 项目统计相关接口
+ */
+public interface ScreenService {
+
+ ItemDailyStatisResultDTO itemDailyStatis(ItemDailyStatisFormDTO formDTO);
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventEfficiencyServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventEfficiencyServiceImpl.java
new file mode 100644
index 000000000..204793f0f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventEfficiencyServiceImpl.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.dto.screen.ScreenDeptEventEfficiencyDTO;
+import com.elink.esua.epdc.modules.screen.dao.ScreenDeptEventEfficiencyDao;
+import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventEfficiencyEntity;
+import com.elink.esua.epdc.modules.screen.service.ScreenDeptEventEfficiencyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 大屏-事件结案数与效能评价统计
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2022-10-11
+ */
+@Service
+public class ScreenDeptEventEfficiencyServiceImpl extends BaseServiceImpl implements ScreenDeptEventEfficiencyService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ScreenDeptEventEfficiencyDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, ScreenDeptEventEfficiencyDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public ScreenDeptEventEfficiencyDTO get(String id) {
+ ScreenDeptEventEfficiencyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ScreenDeptEventEfficiencyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ScreenDeptEventEfficiencyDTO dto) {
+ ScreenDeptEventEfficiencyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenDeptEventEfficiencyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ScreenDeptEventEfficiencyDTO dto) {
+ ScreenDeptEventEfficiencyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenDeptEventEfficiencyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventStatServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventStatServiceImpl.java
new file mode 100644
index 000000000..c92c7f523
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenDeptEventStatServiceImpl.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.screen.service.impl;
+
+import com.elink.esua.epdc.dto.events.form.ItemDailyStatisFormDTO;
+import com.elink.esua.epdc.dto.events.result.ItemDailyStatisResultDTO;
+import com.elink.esua.epdc.modules.item.dao.ItemDao;
+import com.elink.esua.epdc.modules.screen.service.ScreenService;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * 项目统计相关接口
+ */
+@Service
+public class ScreenServiceImpl implements ScreenService {
+ @Autowired
+ private ItemDao itemDao;
+
+
+ /**
+ * 数据统计-统计各诉求不同状态数据
+ * 默认查询当前组织截止到昨天三大诉求的各状态数据
+ * @param formDTO
+ * @return
+ */
+ @Override
+ public ItemDailyStatisResultDTO itemDailyStatis(ItemDailyStatisFormDTO formDTO) {
+ ItemDailyStatisResultDTO resultDTO = new ItemDailyStatisResultDTO();
+ resultDTO.setDeptId(formDTO.getDeptId());
+ resultDTO.setPeopleFlag(formDTO.getPeopleFlag());
+ //1.入参时间有值的按时间查,没值的默认查截止到昨天的数据
+ if(StringUtils.isEmpty(formDTO.getStatDate())&&StringUtils.isEmpty(formDTO.getStatMonth())&&StringUtils.isEmpty(formDTO.getStatYear())){
+ DateTime dateTime = new DateTime(new Date());
+ Date d = dateTime.plusDays(-1).toDate();
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+ formDTO.setStatDate(df.format(d));
+ }
+ //2.按条件统计数据
+ resultDTO = itemDao.itemDailyStatis(formDTO);
+ return resultDTO;
+ }
+
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
index d98f4136b..36bd2d071 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
@@ -1739,6 +1739,9 @@
SELECT i.id,
i.NICK_NAME,
i.CREATED_TIME,
+ case when (getworkminute(i.CREATED_TIME,now()) / 60 > 8) then '1'
+ when (getworkminute(i.CREATED_TIME,now()) / 60 > 6 and getworkminute(i.CREATED_TIME,now()) / 60 <=8) then '2'
+ when (getworkminute(i.CREATED_TIME,now()) / 60 <= 6) then '3' else '' end as isRemind,
i.ITEM_STATE,
i.SERIAL_NUM,
i.GRID as gridName,
@@ -1765,8 +1768,7 @@
else ''
end as evaluationScoreName,
i.EVALUATION_CONTENT,
- i.EVALUATION_TIME,
- (case when (process.STATE = 1001 and HOUR( timediff( now(), i.CREATED_TIME) ) >= 24) then '1' else '' end) as isRemind
+ i.EVALUATION_TIME
FROM epdc_item i
left join (
select b.ID,b.ITEM_ID,b.CREATED_TIME,b.state
@@ -1826,8 +1828,121 @@
AND DATE_FORMAT( i.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
+
+
+
+ AND i.all_dept_ids LIKE concat('%', trim(#{deptId}), '%')
+
+
+ AND i.people_flag = #{peopleFlag}
+
+
+ AND DATE_FORMAT(i.created_time,'%Y-%m-%d') #{statDate}
+
+
+ AND DATE_FORMAT(i.created_time,'%Y-%m') = #{statMonth}
+
+
+ AND DATE_FORMAT(i.created_time,'%Y') = #{statYear}
+
order by i.CREATED_TIME desc
+
+
+
@@ -2037,6 +2152,62 @@
b.ITEM_ID
+
+