diff --git a/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/DeptDTO.java b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/DeptDTO.java new file mode 100644 index 000000000..c5e1bfa15 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/DeptDTO.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 部门管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +public class DeptDTO implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + /** + * 上级ID + */ + private Long pid; + /** + * 所有上级ID,用逗号分开 + */ + private String pids; + /** + * 部门名称 + */ + private String name; + /** + * 排序 + */ + private Integer sort; + + /** + * 上级部门名称 + */ + private String parentName; + + /** + * 部门类型键值 + */ + private String typeKey; + + /** + * 部门编码 + */ + private String partyCode; + + /** + * 地址 + */ + private String address; + + /** + * 联系方式 + */ + private String mobile; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 所属地区码(所属组织地区码) + */ + private String areaCode; + + /**第三方编码 + */ + private String infoCode; + + /** + * 市中心区划编码 + */ + private String disCenterZoningCode; +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java index 4df5fcddb..4c12f0abb 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java @@ -346,7 +346,7 @@ public class SysDeptController { } /** - * @param [deptId] + * @param deptId * @return com.elink.esua.epdc.commons.tools.utils.Result * @describe: 获得部门类型 * @author wangtong @@ -513,4 +513,12 @@ public class SysDeptController { return new Result().ok(sysDeptService.getDept(formDTO)); } + @GetMapping("option/list") + @ApiOperation("下拉列表") + public Result> listOption(@RequestParam Map params) { + List list = sysDeptService.listDefault(params); + + return new Result>().ok(list); + } + } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java index ab465f76a..bd8b42260 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java @@ -34,6 +34,16 @@ public interface SysDeptService extends BaseService { List list(Map params); + /** + * 默认列表,无数据权限 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/10/11 14:46 + */ + List listDefault(Map params); + SysDeptDTO get(Long id); void save(SysDeptDTO dto); diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java index e14f6b962..f18e3ee6f 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java @@ -129,6 +129,13 @@ public class SysDeptServiceImpl extends BaseServiceImpl listDefault(Map params) { + List entityList = baseDao.getList(params); + + return ConvertUtils.sourceToTarget(entityList, DeptDTO.class); + } + @Override public List subList(String pid) { QueryWrapper wrapper = new QueryWrapper<>(); diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml index 7f70be9d2..a5332f21f 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml @@ -12,6 +12,12 @@ #{id} + + AND t1.pid = #{pid} + + + AND t1.type_key = #{typeKey} + order by t1.sort asc diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/ItemDailyStatisFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/ItemDailyStatisFormDTO.java new file mode 100644 index 000000000..6e9e4e960 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/ItemDailyStatisFormDTO.java @@ -0,0 +1,42 @@ +package com.elink.esua.epdc.dto.events.form; + +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class ItemDailyStatisFormDTO implements Serializable { + private static final long serialVersionUID = 3950470078846120789L; + + /** + * 网格、部门Id + */ + @NotBlank(message = "部门Id不能为空", groups = AddGroup.class) + private String deptId; + /** + * 诉求分类:0民生 1发展 2执法 + */ + private String peopleFlag; + /** + * 开始日期 yyyy-MM-dd + */ + private String startTime; + /** + * 结束日期 yyyy-MM-dd + */ + private String endTime; + /** + * 日维度 yyyy-MM-dd + */ + private String statDate; + /** + * 月维度 yyyy-MM + */ + private String statMonth; + /** + * 年维度 yyyy + */ + private String statYear; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/ItemDailyStatisResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/ItemDailyStatisResultDTO.java new file mode 100644 index 000000000..04654085f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/result/ItemDailyStatisResultDTO.java @@ -0,0 +1,47 @@ +package com.elink.esua.epdc.dto.events.result; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ItemDailyStatisResultDTO implements Serializable { + private static final long serialVersionUID = 1171586248033198322L; + /** + * 网格、部门Id + */ + private String deptId; + /** + * 诉求分类:0民生 1发展 2执法 + */ + private String peopleFlag; + /** + * 总数 + */ + private Integer total = 0; + /** + * 待处理总数 + */ + private Integer pendingTotal = 0; + /** + * 处理中总数 + */ + private Integer processingTotal = 0; + /** + * 已结案总数 + */ + private Integer closedTotal = 0; + /** + * 红灯事件数 + */ + private Integer redTotal = 0; + /** + * 黄灯事件数 + */ + private Integer yellowTotal = 0; + /** + * 绿灯事件数 + */ + private Integer greenTotal = 0; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java index c2de40a42..0a360513e 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java @@ -75,6 +75,11 @@ public class ItemPendingHandleDTO implements Serializable { */ private String isRemind; + /** + * 剩余小时数 + */ + private Integer remainTime; + /** * 头像 */ diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java index ccbfcdde6..bc79dfb5f 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemAppealPageResultDTO.java @@ -116,7 +116,8 @@ public class ItemAppealPageResultDTO implements Serializable { private String evaluationTime; /** - * 是否提醒社区处理(1:提示) + * 是否提醒社区处理(1:红灯,2黄灯,3绿灯) */ private String isRemind; + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/ScreenDeptEventEfficiencyDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/ScreenDeptEventEfficiencyDTO.java new file mode 100644 index 000000000..ceb52fe3d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/ScreenDeptEventEfficiencyDTO.java @@ -0,0 +1,131 @@ +/** + * 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.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 ScreenDeptEventEfficiencyDTO 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; + + /** + * 统计类型 年year,月month,日date + */ + private String statType; + + /** + * 统计日期根据STAT_TYPE分别 yyyy/yyyy-MM/yyyy-MM-dd + */ + private String statDate; + + /** + * 事件数 + */ + private Integer eventCount; + + /** + * 响应数 + */ + private Integer responseCount; + + /** + * 满意数 + */ + private Integer satisfiedCount; + + /** + * 结案数 + */ + private Integer closedCount; + + /** + * 删除标识 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/ScreenDeptEventStatDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/ScreenDeptEventStatDTO.java new file mode 100644 index 000000000..8aa2df9cd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/screen/ScreenDeptEventStatDTO.java @@ -0,0 +1,166 @@ +/** + * 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.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. + *

+ * 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.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 大屏-事件结案数与效能评价统计 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-10-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_dept_event_efficiency") +public class ScreenDeptEventEfficiencyEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门ID + */ + private String deptId; + + /** + * 部门名 + */ + private String deptName; + + /** + * 上级ID + */ + private String pid; + + /** + * 所有上级ID + */ + private String pids; + + /** + * 部门级别 + */ + private String deptLevel; + + /** + * 部门排序 + */ + private String deptSort; + + /** + * 统计类型 年3,月2,日1 + */ + private String statType; + + /** + * 统计日期根据STAT_TYPE分别 yyyy/yyyy-MM/yyyy-MM-dd + */ + private String statDate; + + /** + * 事件数 + */ + private Integer eventCount; + + /** + * 响应数 + */ + private Integer responseCount; + + /** + * 满意数 + */ + private Integer satisfiedCount; + + /** + * 结案数 + */ + private Integer closedCount; + +} \ 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/ScreenDeptEventStatEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/entity/ScreenDeptEventStatEntity.java new file mode 100644 index 000000000..9f55cd1b2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/entity/ScreenDeptEventStatEntity.java @@ -0,0 +1,136 @@ +/** + * 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.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 大屏-事件汇总统计 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-10-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_dept_event_stat") +public class ScreenDeptEventStatEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门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; + +} \ 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/ScreenDeptEventEfficiencyService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenDeptEventEfficiencyService.java new file mode 100644 index 000000000..eb5a9e68f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenDeptEventEfficiencyService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.screen.ScreenDeptEventEfficiencyDTO; +import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventEfficiencyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 大屏-事件结案数与效能评价统计 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-10-11 + */ +public interface ScreenDeptEventEfficiencyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-10-11 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-10-11 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenDeptEventEfficiencyDTO + * @author generator + * @date 2022-10-11 + */ + ScreenDeptEventEfficiencyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-10-11 + */ + void save(ScreenDeptEventEfficiencyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-10-11 + */ + void update(ScreenDeptEventEfficiencyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-10-11 + */ + void delete(String[] 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/ScreenDeptEventStatService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenDeptEventStatService.java new file mode 100644 index 000000000..9ef1be7f2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenDeptEventStatService.java @@ -0,0 +1,59 @@ +/** + * 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.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. + *

+ * 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.constant.NumConstant; +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.commons.tools.utils.DateUtils; +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.dao.ScreenDeptEventStatDao; +import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventStatEntity; +import com.elink.esua.epdc.modules.screen.service.ScreenDeptEventStatService; +import org.apache.commons.collections4.CollectionUtils; +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.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 大屏-事件汇总统计 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-10-11 + */ +@Service +public class ScreenDeptEventStatServiceImpl extends BaseServiceImpl implements ScreenDeptEventStatService { + + /** + * 数据统计 + * + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2022/10/11 10:24 + */ + @Override + public void dataStatistics(DataStatisticsFormDTO formDTO) { + String statDate; + String statMonth; + String statYear; + if (StringUtils.isBlank(formDTO.getStatDate())) { + statDate = DateUtils.format(new Date(), DateUtils.DATE_PATTERN); + statMonth = statDate.substring(0,7); + statYear = statDate.substring(0,4); + } else { + statDate = formDTO.getStatDate(); + statMonth = formDTO.getStatDate().substring(0,7); + statYear = formDTO.getStatDate().substring(0,4); + } + //统计总数 + List list = baseDao.getEventStat(null); + //统计日增量 + List incrList = baseDao.getEventStat(statDate); + Map map = new HashMap<>(); + if (CollectionUtils.isNotEmpty(incrList)) { + map = incrList.stream().collect(Collectors.toMap(ScreenDeptEventStatEntity::getDeptId, Function.identity(), (key1, key2) -> key2)); + } + if (CollectionUtils.isNotEmpty(list)) { + Map finalMap = map; + list.forEach(item -> { + item.setStatYear(statYear); + item.setStatMonth(statMonth); + item.setStatDate(statDate); + if (finalMap.containsKey(item.getDeptId())) { + ScreenDeptEventStatEntity incr = finalMap.get(item.getDeptId()); + item.setEventIncr(incr.getEventCount()); + item.setLivelihoodIncr(incr.getLivelihoodCount()); + item.setDevelopIncr(incr.getDevelopCount()); + item.setLawIncr(incr.getLawCount()); + } + }); + insertBatch(list); + } + + + } + + /** + * 获取大屏数据 + * + * @param formDTO + * @Param formDTO + * @Return {@link List< EventStatisticsResultDTO >} + * @Author zhaoqifeng + * @Date 2022/10/11 15:13 + */ + @Override + public List getEventStat(EventStatisticsFormDTO formDTO) { + List result; + if (NumConstant.ONE_STR.equals(formDTO.getStatType())) { + //日期为当前日期前一天 + formDTO.setStatDate(DateUtils.format(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN)); + result = baseDao.getEventStatByDay(formDTO); + } else if (NumConstant.TWO_STR.equals(formDTO.getStatType())) { + //日期为本月 + formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 7)); + result = baseDao.getEventStatByOther(formDTO); + } else if (NumConstant.THREE_STR.equals(formDTO.getStatType())) { + //日期为本年 + formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 4)); + result = baseDao.getEventStatByOther(formDTO); + } else { + //自定义区间 + result = baseDao.getEventStatByOther(formDTO); + } + + return result; + } +} \ 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/ScreenServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenServiceImpl.java new file mode 100644 index 000000000..8372f8c11 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenServiceImpl.java @@ -0,0 +1,65 @@ +/** + * 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.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 + + + SELECT a.id AS deptId, + a.`name` AS deptName, + a.pid, + a.pids, + '1' AS statType, + a.type_key AS deptLevel, + a.sort AS deptSort, + IFNULL(SUM(b.eventCount), 0) AS eventCount, + IFNULL(SUM(b.closedCount), 0) AS closedCount, + IFNULL(SUM(b.responseCount), 0) AS responseCount, + IFNULL(SUM(b.satisfiedCount), 0) AS satisfiedCount + FROM meta_sys_dept a + LEFT JOIN ( + SELECT ALL_DEPT_IDS, + 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 + FROM epdc_item a + LEFT JOIN ( + SELECT ITEM_ID, count(ID) AS 'processCount' + FROM epdc_item_handle_process + WHERE DEL_FLAG = '0' + GROUP BY ITEM_ID) b ON a.ID = b.ITEM_ID + WHERE DEL_FLAG = '0' + AND PEOPLE_FLAG is not null + + AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') <= #{statDate} + + GROUP BY ALL_DEPT_IDS + ) b ON b.ALL_DEPT_IDS LIKE CONCAT('%', a.id, '%') + WHERE a.del_flag = '0' + GROUP BY a.id + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventStatDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventStatDao.xml new file mode 100644 index 000000000..e3e01d470 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/screen/ScreenDeptEventStatDao.xml @@ -0,0 +1,84 @@ + + + + + + + + + \ No newline at end of file