From 531a920e203d04fe7a95a43592851161a07453b7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 7 Sep 2020 11:01:22 +0800 Subject: [PATCH 001/150] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=A7=92=E8=89=B2=E8=AE=BE=E7=BD=AE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/CustomerFunctionRoleDTO.java | 96 ++++++++++++++++ .../CustomerFunctionRoleController.java | 94 ++++++++++++++++ .../epmet/dao/CustomerFunctionRoleDao.java | 33 ++++++ .../entity/CustomerFunctionRoleEntity.java | 66 +++++++++++ .../excel/CustomerFunctionRoleExcel.java | 71 ++++++++++++ .../redis/CustomerFunctionRoleRedis.java | 47 ++++++++ .../service/CustomerFunctionRoleService.java | 95 ++++++++++++++++ .../impl/CustomerFunctionRoleServiceImpl.java | 104 ++++++++++++++++++ .../V0.0.6__customer_function_role.sql | 15 +++ .../mapper/CustomerFunctionRoleDao.xml | 7 ++ 10 files changed, 628 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionRoleDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionRoleEntity.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionRoleExcel.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/CustomerFunctionRoleRedis.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionRoleDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionRoleDTO.java new file mode 100644 index 0000000000..548e8b9996 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFunctionRoleDTO.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Data +public class CustomerFunctionRoleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 功能ID(function.ID) + */ + private String functionId; + + /** + * 所属APP(工作端:gov、居民端:resi) + */ + private String fromApp; + + /** + * 角色Key值 + */ + private String roleKey; + + /** + * 角色名称 + */ + private String roleName; + + /** + * 删除标识: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/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java new file mode 100644 index 0000000000..ba383ff3ed --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java @@ -0,0 +1,94 @@ +/** + * 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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.excel.CustomerFunctionRoleExcel; +import com.epmet.service.CustomerFunctionRoleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@RestController +@RequestMapping("customerfunctionrole") +public class CustomerFunctionRoleController { + + @Autowired + private CustomerFunctionRoleService customerFunctionRoleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = customerFunctionRoleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + CustomerFunctionRoleDTO data = customerFunctionRoleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody CustomerFunctionRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + customerFunctionRoleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody CustomerFunctionRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + customerFunctionRoleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + customerFunctionRoleService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = customerFunctionRoleService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CustomerFunctionRoleExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java new file mode 100644 index 0000000000..a15beb7957 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.CustomerFunctionRoleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Mapper +public interface CustomerFunctionRoleDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionRoleEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionRoleEntity.java new file mode 100644 index 0000000000..65a0c7ffc3 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFunctionRoleEntity.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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_function_role") +public class CustomerFunctionRoleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 功能ID(function.ID) + */ + private String functionId; + + /** + * 所属APP(工作端:gov、居民端:resi) + */ + private String fromApp; + + /** + * 角色Key值 + */ + private String roleKey; + + /** + * 角色名称 + */ + private String roleName; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionRoleExcel.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionRoleExcel.java new file mode 100644 index 0000000000..78da1939dc --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/excel/CustomerFunctionRoleExcel.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Data +public class CustomerFunctionRoleExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id ") + private String customerId; + + @Excel(name = "功能ID(function.ID)") + private String functionId; + + @Excel(name = "所属APP(工作端:gov、居民端:resi)") + private String fromApp; + + @Excel(name = "角色Key值") + private String roleKey; + + @Excel(name = "角色名称") + private String roleName; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/CustomerFunctionRoleRedis.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/CustomerFunctionRoleRedis.java new file mode 100644 index 0000000000..3e81389629 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/redis/CustomerFunctionRoleRedis.java @@ -0,0 +1,47 @@ +/** + * 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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Component +public class CustomerFunctionRoleRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java new file mode 100644 index 0000000000..133471c432 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.entity.CustomerFunctionRoleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户定制功能角色列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +public interface CustomerFunctionRoleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-07 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-07 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CustomerFunctionRoleDTO + * @author generator + * @date 2020-09-07 + */ + CustomerFunctionRoleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-07 + */ + void save(CustomerFunctionRoleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-07 + */ + void update(CustomerFunctionRoleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-07 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java new file mode 100644 index 0000000000..58e981e00b --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.CustomerFunctionRoleDao; +import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.entity.CustomerFunctionRoleEntity; +import com.epmet.redis.CustomerFunctionRoleRedis; +import com.epmet.service.CustomerFunctionRoleService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-09-07 + */ +@Service +public class CustomerFunctionRoleServiceImpl extends BaseServiceImpl implements CustomerFunctionRoleService { + + @Autowired + private CustomerFunctionRoleRedis customerFunctionRoleRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CustomerFunctionRoleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CustomerFunctionRoleDTO.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 CustomerFunctionRoleDTO get(String id) { + CustomerFunctionRoleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerFunctionRoleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CustomerFunctionRoleDTO dto) { + CustomerFunctionRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerFunctionRoleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CustomerFunctionRoleDTO dto) { + CustomerFunctionRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerFunctionRoleEntity.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/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql new file mode 100644 index 0000000000..ca1b9d2be1 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql @@ -0,0 +1,15 @@ +CREATE TABLE `customer_function_role` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id ', + `FUNCTION_ID` varchar(64) NOT NULL COMMENT '功能ID(function.ID)', + `FROM_APP` varchar(32) NOT NULL COMMENT '所属APP(工作端:gov、居民端:resi)', + `ROLE_KEY` varchar(32) NOT NULL COMMENT '角色Key值', + `ROLE_NAME` varchar(32) NOT NULL COMMENT '角色名称', + `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户定制功能角色列表'; \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml new file mode 100644 index 0000000000..4c3242fb28 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From a7d133004f6fc4aa2099da911bed1f1b304db9fb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 7 Sep 2020 15:40:09 +0800 Subject: [PATCH 002/150] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=A7=92=E8=89=B2=E8=AE=BE=E7=BD=AE=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=EF=BC=9B=E5=B1=85=E6=B0=91=E7=AB=AF=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CustomerFunctionRoleListFormDTO.java | 29 +++++++++++ .../com/epmet/dto/form/RoleListFormDTO.java | 27 ++++++++++ .../form/SaveCustomerFunctionRoleFormDTO.java | 37 ++++++++++++++ .../CustomerFunctionRoleListResultDTO.java | 26 ++++++++++ .../CustomerFunctionRoleController.java | 29 +++++++++++ .../epmet/dao/CustomerFunctionRoleDao.java | 21 +++++++- .../service/CustomerFunctionRoleService.java | 19 +++++++ .../impl/CustomerFunctionRoleServiceImpl.java | 50 +++++++++++++++++++ .../mapper/CustomerFunctionRoleDao.xml | 17 +++++++ .../dto/result/ResiGovRoleListResultDTO.java | 46 +++++++++++++++++ .../dto/result/ResiGovRoleResultDTO.java | 44 ++++++++++++++++ .../controller/GovStaffRoleController.java | 17 +++++++ .../epmet/dao/GovStaffRoleTemplateDao.java | 7 +++ .../src/main/java/com/epmet/dao/RoleDao.java | 7 +++ .../epmet/service/GovStaffRoleService.java | 7 +++ .../service/impl/GovStaffRoleServiceImpl.java | 27 ++++++++++ .../mapper/GovStaffRoleTemplateDao.xml | 9 ++++ .../src/main/resources/mapper/RoleDao.xml | 8 +++ 18 files changed, 426 insertions(+), 1 deletion(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFunctionRoleListFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/RoleListFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SaveCustomerFunctionRoleFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionRoleListResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleListResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFunctionRoleListFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFunctionRoleListFormDTO.java new file mode 100644 index 0000000000..717e0d3c46 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFunctionRoleListFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 查询客户定制功能角色列表--接口入参 + * + * @author sun + */ +@Data +public class CustomerFunctionRoleListFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + @NotBlank(message = "客户Id不能为空", groups = {AddUserInternalGroup.class }) + private String customerId; + /** + * 定制功能ID + */ + @NotBlank(message = "功能ID不能为空", groups = {AddUserInternalGroup.class }) + private String functionId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/RoleListFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/RoleListFormDTO.java new file mode 100644 index 0000000000..e88bf9393f --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/RoleListFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 客户定制功能角色设置--接口入参 + * + * @author sun + */ +@Data +public class RoleListFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 角色Key + */ + @NotBlank(message = "角色key不能为空", groups = {AddUserInternalGroup.class }) + private String roleKey; + /** + * 角色名称 + */ + @NotBlank(message = "角色名称不能为空", groups = {AddUserInternalGroup.class }) + private String roleName; + public interface AddUserInternalGroup {} +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SaveCustomerFunctionRoleFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SaveCustomerFunctionRoleFormDTO.java new file mode 100644 index 0000000000..16a89de55e --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SaveCustomerFunctionRoleFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 客户定制功能角色设置--接口入参 + * + * @author sun + */ +@Data +public class SaveCustomerFunctionRoleFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + @NotBlank(message = "客户Id不能为空", groups = {AddUserInternalGroup.class }) + private String customerId; + /** + * 定制功能ID + */ + @NotBlank(message = "功能ID不能为空", groups = {AddUserInternalGroup.class }) + private String functionId; + /** + * 所属APP(工作端:gov、居民端:resi) + */ + @NotBlank(message = "所属App不能为空", groups = {AddUserInternalGroup.class }) + private String fromApp; + /** + * 角色信息集合 + */ + private List roleList; + public interface AddUserInternalGroup {} +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionRoleListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionRoleListResultDTO.java new file mode 100644 index 0000000000..cbb4db6fb8 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionRoleListResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result; + +import com.epmet.dto.form.RoleListFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 查询客户定制功能角色列表--接口返参 + * + * @author sun + */ +@Data +public class CustomerFunctionRoleListResultDTO implements Serializable { + private static final long serialVersionUID = 2971689193155710437L; + + /** + * 角色Key + */ + private String roleKey; + /** + * 角色名称 + */ + private String roleName; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java index ba383ff3ed..7ed5dc4b50 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionRoleController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,9 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.dto.form.CustomerFunctionRoleListFormDTO; +import com.epmet.dto.form.SaveCustomerFunctionRoleFormDTO; +import com.epmet.dto.result.CustomerFunctionRoleListResultDTO; import com.epmet.excel.CustomerFunctionRoleExcel; import com.epmet.service.CustomerFunctionRoleService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +96,28 @@ public class CustomerFunctionRoleController { ExcelUtils.exportExcelToTarget(response, null, list, CustomerFunctionRoleExcel.class); } + /** + * @param tokenDTO formDTO + * @return + * @author sun + * @Description 客户定制功能角色设置 + */ + @PostMapping("savecustomerfunctionrole") + public Result saveCustomerFunctionRole(@LoginUser TokenDto tokenDTO, @RequestBody SaveCustomerFunctionRoleFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, SaveCustomerFunctionRoleFormDTO.AddUserInternalGroup.class); + customerFunctionRoleService.saveCustomerFunctionRole(formDTO); + return new Result(); + } + + /** + * @param tokenDTO formDTO + * @return + * @author sun + * @Description 查询客户定制功能角色列表 + */ + @PostMapping("customerfunctionrolelist") + public Result> customerFunctionRoleList(@LoginUser TokenDto tokenDTO, @RequestBody CustomerFunctionRoleListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, CustomerFunctionRoleListFormDTO.AddUserInternalGroup.class); + return new Result>().ok(customerFunctionRoleService.customerFunctionRoleList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java index a15beb7957..4a1eb94497 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java @@ -18,8 +18,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.dto.form.CustomerFunctionRoleListFormDTO; +import com.epmet.dto.result.CustomerFunctionRoleListResultDTO; import com.epmet.entity.CustomerFunctionRoleEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 客户定制功能角色列表 @@ -29,5 +35,18 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CustomerFunctionRoleDao extends BaseDao { - + + /** + * @author sun + * @Description 根据客户Id删除客户功能角色信息 + */ + void delByCustomerId(@Param("customerId") String customerId); + + /** + * @param formDTO + * @return + * @author sun + * @Description 查询客户定制功能角色列表 + */ + List selectCustomerFunctionRoleList(CustomerFunctionRoleListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java index 133471c432..7b4d747d46 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionRoleService.java @@ -20,6 +20,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.dto.form.CustomerFunctionRoleListFormDTO; +import com.epmet.dto.form.SaveCustomerFunctionRoleFormDTO; +import com.epmet.dto.result.CustomerFunctionRoleListResultDTO; import com.epmet.entity.CustomerFunctionRoleEntity; import java.util.List; @@ -92,4 +95,20 @@ public interface CustomerFunctionRoleService extends BaseService customerFunctionRoleList(CustomerFunctionRoleListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java index 58e981e00b..4ebfaa9f5f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java @@ -20,11 +20,17 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.ErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.CustomerFunctionRoleDao; import com.epmet.dto.CustomerFunctionRoleDTO; +import com.epmet.dto.form.CustomerFunctionRoleListFormDTO; +import com.epmet.dto.form.RoleListFormDTO; +import com.epmet.dto.form.SaveCustomerFunctionRoleFormDTO; +import com.epmet.dto.result.CustomerFunctionRoleListResultDTO; import com.epmet.entity.CustomerFunctionRoleEntity; import com.epmet.redis.CustomerFunctionRoleRedis; import com.epmet.service.CustomerFunctionRoleService; @@ -33,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -101,4 +108,47 @@ public class CustomerFunctionRoleServiceImpl extends BaseServiceImpl listEntity = new ArrayList<>(); + //1.封装数据 + List roleList = formDTO.getRoleList(); + roleList.forEach(role->{ + CustomerFunctionRoleEntity entity = new CustomerFunctionRoleEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setFunctionId(formDTO.getFunctionId()); + entity.setFromApp(formDTO.getFromApp()); + entity.setRoleKey(role.getRoleKey()); + entity.setRoleName(role.getRoleName()); + listEntity.add(entity); + }); + + //2.先按客户Id执行删除操作 + baseDao.delByCustomerId(formDTO.getCustomerId()); + + //3.批量新增 + if(!insertBatch(listEntity)){ + throw new RenException("定制功能角色设置失败"); + } + + } + + /** + * @param formDTO + * @return + * @author sun + * @Description 查询客户定制功能角色列表 + */ + @Override + public List customerFunctionRoleList(CustomerFunctionRoleListFormDTO formDTO) { + //1.根据客户Id、功能Id查询客户定制功能设置的角色列表 + return baseDao.selectCustomerFunctionRoleList(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml index 4c3242fb28..fc36420736 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml @@ -3,5 +3,22 @@ + + + + DELETE + FROM customer_function_role + WHERE customer_id = #{customerId} + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleListResultDTO.java new file mode 100644 index 0000000000..5221f37c67 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleListResultDTO.java @@ -0,0 +1,46 @@ +/** + * 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.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + + +/** + * 获取居民端、工作端人员角色列表--接口返参 + * + * @author sun + */ +@Data +public class ResiGovRoleListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 居民端角色列表 + */ + private List resiRoleList; + + /** + * 工作端角色列表 + */ + private List govRoleList; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleResultDTO.java new file mode 100644 index 0000000000..49b05f0804 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiGovRoleResultDTO.java @@ -0,0 +1,44 @@ +/** + * 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.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 获取居民端、工作端人员角色列表--接口返参 + * + * @author sun + */ +@Data +public class ResiGovRoleResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 角色key + */ + private String roleKey; + /** + * 角色名称 + */ + private String roleName; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java index 38081f88cd..2411ec1079 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java @@ -1,11 +1,16 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.RoleDTO; import com.epmet.dto.form.GovStaffRoleFormDTO; +import com.epmet.dto.form.IssueInitiatorFormDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; +import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.ResiGovRoleListResultDTO; import com.epmet.entity.GovStaffRoleEntity; import com.epmet.service.GovStaffRoleService; import org.springframework.beans.factory.annotation.Autowired; @@ -59,4 +64,16 @@ public class GovStaffRoleController { return new Result>().ok(roleDTOS); } + + /** + * @param tokenDTO + * @return ResiGovRoleListResultDTO + * @author sun + * @Description 获取居民端、工作端人员角色列表 + */ + @PostMapping("resigovrolelist") + public Result resiGovRoleList(@LoginUser TokenDto tokenDTO){ + return new Result().ok(govStaffRoleService.resiGovRoleList()); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleTemplateDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleTemplateDao.java index 4622b81f79..62af0e097c 100755 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleTemplateDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GovStaffRoleTemplateDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.GovStaffRoleTemplateDTO; +import com.epmet.dto.result.ResiGovRoleResultDTO; import com.epmet.entity.GovStaffRoleTemplateEntity; import org.apache.ibatis.annotations.Mapper; @@ -38,4 +39,10 @@ public interface GovStaffRoleTemplateDao extends BaseDao listValidateRoles(); + + /** + * @author sun + * @Description 获取工作端角色列表 + */ + List selectGovRoleList(); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RoleDao.java index 398406a8cf..c8ceda37c5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RoleDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.RoleDTO; +import com.epmet.dto.result.ResiGovRoleResultDTO; import com.epmet.entity.RoleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -41,4 +42,10 @@ public interface RoleDao extends BaseDao { * @return RoleEntity */ RoleEntity selectRoleByKey(RoleEntity param); + + /** + * @author sun + * @Description 获取居民端角色列表 + */ + List selectResiRoleList(); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java index 1322bf06d1..d7347a597f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; +import com.epmet.dto.result.ResiGovRoleListResultDTO; import com.epmet.entity.GovStaffRoleEntity; import java.util.List; @@ -127,4 +128,10 @@ public interface GovStaffRoleService extends BaseService { List listRoleTemplates(); GovStaffRoleResultDTO getDTOById(String roleId); + + /** + * @author sun + * @Description 获取居民端、工作端人员角色列表 + */ + ResiGovRoleListResultDTO resiGovRoleList(); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java index 6da54b7c69..29f782b14a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java @@ -27,10 +27,13 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.GovStaffRoleDao; import com.epmet.dao.GovStaffRoleTemplateDao; +import com.epmet.dao.RoleDao; import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.form.InitDefaultOperationsFormDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; +import com.epmet.dto.result.ResiGovRoleListResultDTO; +import com.epmet.dto.result.ResiGovRoleResultDTO; import com.epmet.entity.GovStaffRoleEntity; import com.epmet.feign.GovAccessFeignClient; import com.epmet.redis.GovStaffRoleRedis; @@ -66,6 +69,9 @@ public class GovStaffRoleServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -181,4 +187,25 @@ public class GovStaffRoleServiceImpl extends BaseServiceImpl resiRoleList = roleDao.selectResiRoleList(); + + //2.查询工作端角色列表 + List govRoleList = govStaffRoleTemplateDao.selectGovRoleList(); + + //3.封装数据并返回 + resultDTO.setResiRoleList(resiRoleList); + resultDTO.setGovRoleList(govRoleList); + return resultDTO; + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleTemplateDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleTemplateDao.xml index 263d76beec..a06b408917 100755 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleTemplateDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleTemplateDao.xml @@ -23,5 +23,14 @@ WHERE DEL_FLAG = 0 + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RoleDao.xml index 2bc5147051..8fbf38a62a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RoleDao.xml @@ -27,4 +27,12 @@ and ROLE_KEY = #{roleKey} and DEL_FLAG = 0 + + \ No newline at end of file From 139f64cc7776a7b6dc47290df37317889d9e3cbd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Sep 2020 09:49:57 +0800 Subject: [PATCH 003/150] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/FunctionDetailFromDTO.java | 21 ++++ .../oper-customize-server/pom.xml | 6 + .../CustomerFunctionDetailController.java | 9 +- .../epmet/dao/CustomerFunctionRoleDao.java | 12 +- .../CustomerFunctionDetailService.java | 12 +- .../CustomerFunctionDetailServiceImpl.java | 113 +++++++++++++++--- .../impl/CustomerFunctionRoleServiceImpl.java | 4 +- .../mapper/CustomerFunctionRoleDao.xml | 15 +++ .../epmet/dto/form/GetRoleKeyListFormDTO.java | 28 +++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 7 ++ .../EpmetUserOpenFeignClientFallback.java | 5 + .../com/epmet/controller/RoleController.java | 14 +++ .../main/java/com/epmet/dao/StaffRoleDao.java | 9 ++ .../main/java/com/epmet/dao/UserRoleDao.java | 9 ++ .../java/com/epmet/service/RoleService.java | 9 ++ .../epmet/service/impl/RoleServiceImpl.java | 26 ++++ .../main/resources/mapper/StaffRoleDao.xml | 12 ++ .../src/main/resources/mapper/UserRoleDao.xml | 12 ++ 18 files changed, 301 insertions(+), 22 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetRoleKeyListFormDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java index ee133cd136..d8a8641ddb 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; /** * 查询客户定制功能列表-接口入参 @@ -25,6 +26,11 @@ public class FunctionDetailFromDTO implements Serializable { */ @NotBlank(message = "客户Id不能为空", groups = {AddUserShowGroup.class}) private String customerId; + /** + * 网格ID + */ + @NotBlank(message = "网格Id不能为空", groups = {AddUserShowGroup.class}) + private String gridId; /** * resi:居民端,work:工作端 @@ -32,4 +38,19 @@ public class FunctionDetailFromDTO implements Serializable { @NotBlank(message = "所属端不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class}) private String clientType; + /** + * token中userId + */ + private String userId; + + /** + * 所属端(居民端:resi 工作端:gov) + */ + private String fromApp; + + /** + * 用户角色key集合 + */ + private List roleKeyList; + } diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 1257fbf218..335c55ad66 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -64,6 +64,12 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java index 245d5018a2..76dff2a151 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -105,7 +106,9 @@ public class CustomerFunctionDetailController { @PostMapping("resifunctiondetaillist") public Result> resiFunctionDetail(@LoginUser TokenDto tokenDto, @RequestBody FunctionDetailFromDTO formDTO) { ValidatorUtils.validateEntity(formDTO, FunctionDetailFromDTO.AddUserShowGroup.class); - return new Result>().ok(customerFunctionDetailService.resiAndWorkFunctionDetail(formDTO)); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setFromApp(AppClientConstant.APP_RESI); + return new Result>().ok(customerFunctionDetailService.resiFunctionDetail(formDTO)); } /** @@ -118,7 +121,9 @@ public class CustomerFunctionDetailController { public Result> workFunctionDetail(@LoginUser TokenDto tokenDto, @RequestBody FunctionDetailFromDTO formDTO) { ValidatorUtils.validateEntity(formDTO, FunctionDetailFromDTO.AddUserInternalGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId()); - return new Result>().ok(customerFunctionDetailService.resiAndWorkFunctionDetail(formDTO)); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setFromApp(AppClientConstant.APP_GOV); + return new Result>().ok(customerFunctionDetailService.workFunctionDetail(formDTO)); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java index 4a1eb94497..5a00d7e20a 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionRoleDao.java @@ -20,6 +20,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.CustomerFunctionRoleDTO; import com.epmet.dto.form.CustomerFunctionRoleListFormDTO; +import com.epmet.dto.form.FunctionDetailFromDTO; +import com.epmet.dto.form.SaveCustomerFunctionRoleFormDTO; import com.epmet.dto.result.CustomerFunctionRoleListResultDTO; import com.epmet.entity.CustomerFunctionRoleEntity; import org.apache.ibatis.annotations.Mapper; @@ -40,7 +42,7 @@ public interface CustomerFunctionRoleDao extends BaseDao selectCustomerFunctionRoleList(CustomerFunctionRoleListFormDTO formDTO); + + /** + * @param formDTO + * @return + * @author sun + * @Description 根据用户拥有的角色查询客户的定制功能 + */ + List selectFunctionList(FunctionDetailFromDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java index d0561093e3..7571294f23 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java @@ -102,9 +102,17 @@ public interface CustomerFunctionDetailService extends BaseService resiAndWorkFunctionDetail(FunctionDetailFromDTO formDTO); + List resiFunctionDetail(FunctionDetailFromDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 工作端-根据所属端和客户Id查询客户定制功能列表 + **/ + List workFunctionDetail(FunctionDetailFromDTO formDTO); /** * 修改客户定制功能上下架 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index d57623db5d..895b1da73b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -28,10 +29,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.CustomerFunctionDao; -import com.epmet.dao.CustomerFunctionDetailDao; -import com.epmet.dao.FunctionCustomizedDao; -import com.epmet.dao.FunctionShoppingHistoryDao; +import com.epmet.dao.*; import com.epmet.dto.CustomerFunctionDetailDTO; import com.epmet.dto.FunctionCustomizedDTO; import com.epmet.dto.FunctionShoppingHistoryDTO; @@ -40,6 +38,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.CustomerFunctionDetailEntity; import com.epmet.entity.CustomerFunctionEntity; import com.epmet.entity.FunctionShoppingHistoryEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.redis.CustomerFunctionDetailRedis; import com.epmet.service.CustomerFunctionDetailService; import com.epmet.service.FunctionShoppingHistoryService; @@ -49,6 +48,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import rx.internal.util.LinkedArrayList; import java.util.*; import java.util.stream.Collectors; @@ -73,6 +73,10 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl page(Map params) { @@ -126,6 +130,58 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl resiFunctionDetail(FunctionDetailFromDTO formDTO) { + List restltList = new LinkedList<>(); + //1.根据客户Id和所属端查询客户定制功能列表数据 + logger.info(String.format("根据客户Id和所属端查询客户定制功能列表,对应客户Id->%s,所属端->%s", formDTO.getCustomerId(), formDTO.getClientType())); + List list = baseDao.selectFunctionDetailList(formDTO); + if (null != list && list.size() > NumConstant.ZERO) { + //1-1.设置自定义json数据(暂时为空) + try { + String join = String.join(",", new ArrayList<>()); + String customerParameter = java.net.URLEncoder.encode(join, "utf-8"); + list.forEach(l -> { + l.setCustomerParameter(customerParameter); + }); + } catch (Exception e) { + logger.error("CustomerFunctionDetailServiceImpl.resiAndWorkFunctionDetail->集合参数URLEncode失败"); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage()); + } + + //2.调用user服务,获取用户角色信息 + GetRoleKeyListFormDTO dto = new GetRoleKeyListFormDTO(); + dto.setUserId(formDTO.getUserId()); + dto.setGridId(formDTO.getGridId()); + dto.setFromApp(AppClientConstant.APP_RESI); + Result> result = epmetUserOpenFeignClient.getUserRoleKeyList(dto); + if (!result.success()) { + throw new RenException(result.getCode()); + } + formDTO.setRoleKeyList(result.getData()); + + //3.根据用户拥有的角色查询客户的定制功能 + List listFunctionIds = customerFunctionRoleDao.selectFunctionList(formDTO); + + //4.封装结果数据 + listFunctionIds.forEach(id -> { + list.forEach(l -> { + if (id.equals(l.getFunctionId())) { + restltList.add(l); + } + }); + }); + } + + return restltList; + } + /** * @param formDTO * @return @@ -133,21 +189,48 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl resiAndWorkFunctionDetail(FunctionDetailFromDTO formDTO) { - //根据客户Id和所属端查询客户定制功能列表数据 + public List workFunctionDetail(FunctionDetailFromDTO formDTO) { + List restltList = new LinkedList<>(); + //1.根据客户Id和所属端查询客户定制功能列表数据 logger.info(String.format("根据客户Id和所属端查询客户定制功能列表,对应客户Id->%s,所属端->%s", formDTO.getCustomerId(), formDTO.getClientType())); List list = baseDao.selectFunctionDetailList(formDTO); - try { - String join = String.join(",", new ArrayList<>()); - String customerParameter = java.net.URLEncoder.encode(join, "utf-8"); - list.forEach(l->{ - l.setCustomerParameter(customerParameter); + if (null != list && list.size() > NumConstant.ZERO) { + //1-1.设置自定义json数据(暂时为空) + try { + String join = String.join(",", new ArrayList<>()); + String customerParameter = java.net.URLEncoder.encode(join, "utf-8"); + list.forEach(l->{ + l.setCustomerParameter(customerParameter); + }); + } catch (Exception e) { + logger.error("CustomerFunctionDetailServiceImpl.resiAndWorkFunctionDetail->集合参数URLEncode失败"); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage()); + } + + //2.调用user服务,获取用户角色信息 + GetRoleKeyListFormDTO dto = new GetRoleKeyListFormDTO(); + dto.setUserId(formDTO.getUserId()); + dto.setFromApp(AppClientConstant.APP_GOV); + Result> result = epmetUserOpenFeignClient.getUserRoleKeyList(dto); + if (!result.success()) { + throw new RenException(result.getCode()); + } + formDTO.setRoleKeyList(result.getData()); + + //3.根据用户拥有的角色查询客户的定制功能 + List listFunctionIds = customerFunctionRoleDao.selectFunctionList(formDTO); + + //4.封装结果数据 + listFunctionIds.forEach(id -> { + list.forEach(l -> { + if (id.equals(l.getFunctionId())) { + restltList.add(l); + } + }); }); - } catch (Exception e) { - logger.error("CustomerFunctionDetailServiceImpl.resiAndWorkFunctionDetail->集合参数URLEncode失败"); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage()); } - return list; + + return restltList; } @Override diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java index 4ebfaa9f5f..f930ee6bdc 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionRoleServiceImpl.java @@ -129,8 +129,8 @@ public class CustomerFunctionRoleServiceImpl extends BaseServiceImpl + + DELETE FROM customer_function_role WHERE customer_id = #{customerId} + AND function_id = #{functionId} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetRoleKeyListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetRoleKeyListFormDTO.java new file mode 100644 index 0000000000..263b263a8f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetRoleKeyListFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 获取用户拥有的角色key集合-接口入参 + * @Author sun + */ +@Data +public class GetRoleKeyListFormDTO implements Serializable{ + private static final long serialVersionUID = -7994579456530273809L; + + /** + * 用户Id + * */ + private String userId; + /** + * 网格Id + * */ + private String gridId; + /** + * 所属端(居民端:resi 工作端:gov) + * */ + private String fromApp; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 4e3da40627..939bbd7b80 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -306,4 +306,11 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("epmetuser/staffrole/changeroleorg") Result changeRoleOrg(@RequestBody StaffRoleDTO formDTO); + + /** + * @Author sun + * @Description 居民端-查询用户角色key列表 + **/ + @PostMapping("epmetuser/role/getuserrolekeylist") + Result> getUserRoleKeyList(@RequestBody GetRoleKeyListFormDTO dto); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index a60c9611ae..2a6db644e7 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -205,4 +205,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result changeRoleOrg(StaffRoleDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "changeRoleOrg", formDTO); } + + @Override + public Result> getUserRoleKeyList(GetRoleKeyListFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserRoleKeyList", dto); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RoleController.java index e7c82100a6..98ec4c998f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RoleController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.RoleDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.excel.RoleExcel; import com.epmet.service.RoleService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +94,15 @@ public class RoleController { ExcelUtils.exportExcelToTarget(response, null, list, RoleExcel.class); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 居民端-查询用户角色key列表 + **/ + @PostMapping("getuserrolekeylist") + public Result> getUserRoleKeyList(@RequestBody GetRoleKeyListFormDTO formDTO) { + return new Result>().ok(roleService.getUserRoleKeyList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index dfc5407272..3124fc68c7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CustomerStaffRoleListFormDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.dto.result.CustomerStaffRoleListResultDTO; import com.epmet.dto.result.CustomerStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; @@ -122,4 +123,12 @@ public interface StaffRoleDao extends BaseDao { * @return void */ void updateStaffRoleOrgId(StaffRoleDTO dto); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 工作端-查询用户角色key列表 + **/ + List selectStaffRoleKeyList(GetRoleKeyListFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java index e91e0c8d46..3801f0fcf4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRoleDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserRoleDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.dto.form.UserRoleFormDTO; import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.entity.UserRoleEntity; @@ -63,4 +64,12 @@ public interface UserRoleDao extends BaseDao { * @Date 14:24 2020-07-23 **/ List getUserRoleInfoByUserId(@Param("userId") String userId); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 居民端-查询用户角色key列表 + **/ + List selectUserRoleKeyList(GetRoleKeyListFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RoleService.java index 72e055c4b1..21ac0465b0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RoleService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.RoleDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.entity.RoleEntity; import java.util.List; @@ -99,4 +100,12 @@ public interface RoleService extends BaseService { * @return RoleDTO */ RoleDTO getRoleByKey(RoleDTO role); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 居民端-查询用户角色key列表 + **/ + List getUserRoleKeyList(GetRoleKeyListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RoleServiceImpl.java index 8322ee7226..40b1e478ff 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RoleServiceImpl.java @@ -20,11 +20,15 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.RoleDao; +import com.epmet.dao.StaffRoleDao; +import com.epmet.dao.UserRoleDao; import com.epmet.dto.RoleDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.entity.RoleEntity; import com.epmet.redis.RoleRedis; import com.epmet.service.RoleService; @@ -33,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -48,6 +53,10 @@ public class RoleServiceImpl extends BaseServiceImpl implem @Autowired private RoleRedis roleRedis; + @Autowired + private UserRoleDao userRoleDao; + @Autowired + private StaffRoleDao staffRoleDao; @Override public PageData page(Map params) { @@ -106,4 +115,21 @@ public class RoleServiceImpl extends BaseServiceImpl implem RoleEntity entity = baseDao.selectRoleByKey(ConvertUtils.sourceToTarget(role, RoleEntity.class)); return ConvertUtils.sourceToTarget(entity, RoleDTO.class); } + + /** + * @param formDTO + * @return + * @Author sun + * @Description 居民端-查询用户角色key列表 + **/ + @Override + public List getUserRoleKeyList(GetRoleKeyListFormDTO formDTO) { + List list = new ArrayList<>(); + if(AppClientConstant.APP_RESI.equals(formDTO.getFromApp())){ + list = userRoleDao.selectUserRoleKeyList(formDTO); + }else if(AppClientConstant.APP_GOV.equals(formDTO.getFromApp())){ + list = staffRoleDao.selectStaffRoleKeyList(formDTO); + } + return list; + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml index aabdfd6d71..0b39b350b7 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml @@ -181,4 +181,16 @@ and sr.ROLE_ID = #{roleId} and sr.DEL_FLAG='0' + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml index 803fa40621..d7726d3b7b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml @@ -88,4 +88,16 @@ ur.USER_ID = #{userId} + + From d62a760ffcfe10fd45dff3eea79cfffea319ebaa Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Sep 2020 15:02:48 +0800 Subject: [PATCH 004/150] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4=E4=B8=BA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/FunctionDetailFromDTO.java | 7 +-- .../CustomerFunctionDetailController.java | 6 +- .../CustomerFunctionDetailService.java | 12 +--- .../CustomerFunctionDetailServiceImpl.java | 59 ++----------------- .../mapper/CustomerFunctionRoleDao.xml | 2 +- 5 files changed, 12 insertions(+), 74 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java index d8a8641ddb..dc8c61b904 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionDetailFromDTO.java @@ -33,7 +33,7 @@ public class FunctionDetailFromDTO implements Serializable { private String gridId; /** - * resi:居民端,work:工作端 + * resi:居民端,gov:工作端 */ @NotBlank(message = "所属端不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class}) private String clientType; @@ -43,11 +43,6 @@ public class FunctionDetailFromDTO implements Serializable { */ private String userId; - /** - * 所属端(居民端:resi 工作端:gov) - */ - private String fromApp; - /** * 用户角色key集合 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java index 76dff2a151..0778f3d989 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java @@ -107,8 +107,7 @@ public class CustomerFunctionDetailController { public Result> resiFunctionDetail(@LoginUser TokenDto tokenDto, @RequestBody FunctionDetailFromDTO formDTO) { ValidatorUtils.validateEntity(formDTO, FunctionDetailFromDTO.AddUserShowGroup.class); formDTO.setUserId(tokenDto.getUserId()); - formDTO.setFromApp(AppClientConstant.APP_RESI); - return new Result>().ok(customerFunctionDetailService.resiFunctionDetail(formDTO)); + return new Result>().ok(customerFunctionDetailService.resiAndWorkFunctionDetail(formDTO)); } /** @@ -122,8 +121,7 @@ public class CustomerFunctionDetailController { ValidatorUtils.validateEntity(formDTO, FunctionDetailFromDTO.AddUserInternalGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); - formDTO.setFromApp(AppClientConstant.APP_GOV); - return new Result>().ok(customerFunctionDetailService.workFunctionDetail(formDTO)); + return new Result>().ok(customerFunctionDetailService.resiAndWorkFunctionDetail(formDTO)); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java index 7571294f23..88c8e6d3bc 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java @@ -102,17 +102,9 @@ public interface CustomerFunctionDetailService extends BaseService resiFunctionDetail(FunctionDetailFromDTO formDTO); - - /** - * @param formDTO - * @return - * @Author sun - * @Description 工作端-根据所属端和客户Id查询客户定制功能列表 - **/ - List workFunctionDetail(FunctionDetailFromDTO formDTO); + List resiAndWorkFunctionDetail(FunctionDetailFromDTO formDTO); /** * 修改客户定制功能上下架 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index 895b1da73b..7c7b58411f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -137,7 +137,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl resiFunctionDetail(FunctionDetailFromDTO formDTO) { + public List resiAndWorkFunctionDetail(FunctionDetailFromDTO formDTO) { List restltList = new LinkedList<>(); //1.根据客户Id和所属端查询客户定制功能列表数据 logger.info(String.format("根据客户Id和所属端查询客户定制功能列表,对应客户Id->%s,所属端->%s", formDTO.getCustomerId(), formDTO.getClientType())); @@ -158,61 +158,14 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl> result = epmetUserOpenFeignClient.getUserRoleKeyList(dto); - if (!result.success()) { - throw new RenException(result.getCode()); - } - formDTO.setRoleKeyList(result.getData()); - - //3.根据用户拥有的角色查询客户的定制功能 - List listFunctionIds = customerFunctionRoleDao.selectFunctionList(formDTO); - - //4.封装结果数据 - listFunctionIds.forEach(id -> { - list.forEach(l -> { - if (id.equals(l.getFunctionId())) { - restltList.add(l); - } - }); - }); - } - - return restltList; - } - - /** - * @param formDTO - * @return - * @Author sun - * @Description 根据所属端和客户Id查询客户定制功能列表 - **/ - @Override - public List workFunctionDetail(FunctionDetailFromDTO formDTO) { - List restltList = new LinkedList<>(); - //1.根据客户Id和所属端查询客户定制功能列表数据 - logger.info(String.format("根据客户Id和所属端查询客户定制功能列表,对应客户Id->%s,所属端->%s", formDTO.getCustomerId(), formDTO.getClientType())); - List list = baseDao.selectFunctionDetailList(formDTO); - if (null != list && list.size() > NumConstant.ZERO) { - //1-1.设置自定义json数据(暂时为空) - try { - String join = String.join(",", new ArrayList<>()); - String customerParameter = java.net.URLEncoder.encode(join, "utf-8"); - list.forEach(l->{ - l.setCustomerParameter(customerParameter); - }); - } catch (Exception e) { - logger.error("CustomerFunctionDetailServiceImpl.resiAndWorkFunctionDetail->集合参数URLEncode失败"); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage()); + dto.setFromApp(formDTO.getClientType()); + //居民端需要传网格Id 热心居民的角色是在网格里的 + if(AppClientConstant.APP_RESI.equals(formDTO.getClientType())){ + dto.setGridId(formDTO.getGridId()); } - - //2.调用user服务,获取用户角色信息 - GetRoleKeyListFormDTO dto = new GetRoleKeyListFormDTO(); - dto.setUserId(formDTO.getUserId()); - dto.setFromApp(AppClientConstant.APP_GOV); Result> result = epmetUserOpenFeignClient.getUserRoleKeyList(dto); if (!result.success()) { + logger.error(String.format("调用user服务,获取用户角色信息失败,用户Id:%s ,所属端:%s", formDTO.getUserId(), formDTO.getClientType())); throw new RenException(result.getCode()); } formDTO.setRoleKeyList(result.getData()); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml index 55099f38f6..2789f2c2a4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionRoleDao.xml @@ -22,7 +22,7 @@ FROM customer_function_role WHERE del_flag = '0' AND customer_id = #{customerId} - AND from_app = #{fromApp} + AND from_app = #{clientType} role_key = #{roleKey} From c022bfa2ddc48a66f7deaed8959cf24678db74f2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Sep 2020 10:09:06 +0800 Subject: [PATCH 005/150] =?UTF-8?q?=E8=A7=A3=E5=86=B3sql=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tomer_function_role.sql => V0.0.7__customer_function_role.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/{V0.0.6__customer_function_role.sql => V0.0.7__customer_function_role.sql} (100%) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.7__customer_function_role.sql similarity index 100% rename from epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.6__customer_function_role.sql rename to epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.7__customer_function_role.sql From 178ea2f7b55d7f7e91caa59275647bbf908a3ac4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Sep 2020 14:13:35 +0800 Subject: [PATCH 006/150] =?UTF-8?q?=E5=B8=A6=E5=A5=87=E5=B3=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9:=E5=85=9A=E5=91=98=E8=87=AA=E5=8A=A8=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E5=A4=B1=E8=B4=A5=20=E8=AF=A6=E6=83=85=E4=B8=AD?= =?UTF-8?q?=E5=80=BC=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PartyMemberConfirmServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index 93aa5af28c..2004930351 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -477,9 +477,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService Result gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfo.getGridId()); String gridFullPath = ""; if (gridInfoResult.success() && null != gridInfoResult.getData()) { - gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(), - gridInfoResult.getData().getCommnuityName(), - gridInfoResult.getData().getGridName()); + gridFullPath = String.format("%s-%s-%s", null == gridInfoResult.getData().getStreetName() ? "" : gridInfoResult.getData().getStreetName(), + null == gridInfoResult.getData().getCommnuityName() ? "" : gridInfoResult.getData().getCommnuityName(), + null == gridInfoResult.getData().getGridName() ? "" : gridInfoResult.getData().getGridName()); gridFullPath = gridFullPath.replaceAll("--", "").trim(); } resultDTO.setGridFullPath(gridFullPath); From c2cca237b23aac40dd3d7c2d4826f76241e655c1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Sep 2020 14:53:17 +0800 Subject: [PATCH 007/150] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=20=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CustomerFunctionDetailServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index 7c7b58411f..dea866158b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -174,8 +174,8 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl listFunctionIds = customerFunctionRoleDao.selectFunctionList(formDTO); //4.封装结果数据 - listFunctionIds.forEach(id -> { - list.forEach(l -> { + list.forEach(l -> { + listFunctionIds.forEach(id -> { if (id.equals(l.getFunctionId())) { restltList.add(l); } From ba3ea2af65d55081ab70166cc4e9a657c0d2e05e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Sep 2020 17:40:42 +0800 Subject: [PATCH 008/150] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=20=E9=99=8C?= =?UTF-8?q?=E7=94=9F=E4=BA=BA=E6=97=A0=E4=BB=BB=E4=BD=95=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=9F=A5=E7=9C=8B=E5=AE=9A=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CustomerFunctionDetailServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index dea866158b..1473a18675 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -168,6 +168,10 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl Date: Thu, 10 Sep 2020 09:30:31 +0800 Subject: [PATCH 009/150] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=9A=84=E4=BA=8B=E5=AE=9E=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E9=9C=80=E8=B5=8B=E5=80=BC50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/DeptScoreServiceImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index dba7178f96..6dc176a887 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -106,12 +106,14 @@ public class DeptScoreServiceImpl extends BaseServiceImpl minAndMaxMap = factIndexGovrnAblityDeptMonthlyDao.selectExtremeValue(formDTO); @@ -203,15 +205,15 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap = new HashMap<>(); resultMap.put(entity.getDeptId(), new BigDecimal(NumConstant.FIFTY_STR)); this.saveDeptScoreEntity(formDTO, resultMap); - } + }*/ /** * @param indexList From 58834d9246b7a9dca25c9c12d6f3eca98b268ac8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 09:47:35 +0800 Subject: [PATCH 010/150] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9A=84=E4=BA=8B=E5=AE=9E=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E9=9C=80=E8=B5=8B=E5=80=BC50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 1db443914c..e9d7dbd51a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -136,11 +136,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (NumConstant.ZERO == total) { log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; - } else if (NumConstant.ONE == total) { + } + //只有一个网格的事实记录时无需处理以下代码注释 + /*else if (NumConstant.ONE == total) { //只有一个网格时 log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - } + }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); @@ -199,7 +201,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 只有一条事实记录时,分值默认赋50 * @Date 2020/9/2 14:35 **/ - private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + /*private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { List> resultMapList = new ArrayList<>(); HashMap resultMap = new HashMap<>(); String gridId =null; @@ -215,7 +217,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { // 保存中间表 saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); } - +*/ /** * @param calculateCommonFormDTO * @return java.util.Map @@ -479,11 +481,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (NumConstant.ZERO == total) { log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; - }else if (NumConstant.ONE == total) { + } + //只有一个网格的事实记录时无需处理以下代码注释 + /*else if (NumConstant.ONE == total) { //只有一个网格时 log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - } + }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); @@ -546,11 +550,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (NumConstant.ZERO == total) { log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; - }else if (NumConstant.ONE == total) { + } + //只有一个网格的事实记录时无需处理以下代码注释 + /*else if (NumConstant.ONE == total) { //只有一个网格时 log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); - } + }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); From 89ea820ecd90be3c4c7e5d9daa20066fa319963f Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 09:51:02 +0800 Subject: [PATCH 011/150] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=8F=92=E5=85=A5=20=E8=BF=98=E9=9C=80=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/GridCorreLationServiceImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index e9d7dbd51a..707a462ba0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -361,7 +361,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, isTotal); - gridScoreDao.insertBatches(gridScoreEntityList); + //批量插入 + List> partition = ListUtils.partition(gridScoreEntityList, 100); + partition.forEach(list -> { + gridScoreDao.insertBatches(list); + }); } } @@ -634,7 +638,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); - gridScoreDao.insertBatches(gridScoreEntityList); + //批量插入 + List> partition = ListUtils.partition(gridScoreEntityList, 100); + partition.forEach(list -> { + gridScoreDao.insertBatches(list); + }); } } From 5b42d296274eae4b1af86a7f195decc0fab5e170 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 10:03:01 +0800 Subject: [PATCH 012/150] =?UTF-8?q?=E5=BC=80=E5=90=AF=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndexCalculateController.java | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 003813df2b..e1e2c85d78 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -8,6 +8,8 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; import com.epmet.util.DimIdGenerator; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Date; +import java.util.concurrent.*; /** * 指标计算controller @@ -23,9 +26,16 @@ import java.util.Date; * @author liujianjun@elink-cn.com * @date 2020/8/24 14:38 */ +@Slf4j @RestController @RequestMapping("indexcalculate") public class IndexCalculateController { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("indexcalculate-pool-%d").build(); + ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + @Autowired private IndexCalculateService indexCalculateService; @@ -44,12 +54,15 @@ public class IndexCalculateController { @ExternalAppRequestAuth @PostMapping("all") public Result indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) { - formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); - Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); - if (aBoolean) { - return new Result().ok(true); - } - return new Result().error("指标计算失败"); + singleThreadPool.execute(() -> { + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + long start = System.currentTimeMillis(); + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean) { + log.error("全部指标计算完成,总耗时:{}秒", (System.currentTimeMillis() - start) / 1000); + } + }); + return new Result().ok(true); } @PostMapping("reAll") From e9710a261f57e1dea92a26cf240e6322b140beb3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 10:05:02 +0800 Subject: [PATCH 013/150] =?UTF-8?q?=E5=85=A8=E5=8C=BA=EF=BC=8C=E8=A1=97?= =?UTF-8?q?=E9=81=93=EF=BC=8C=E7=A4=BE=E5=8C=BA=E4=BF=AE=E6=94=B9=E4=BA=94?= =?UTF-8?q?=E7=BA=A7=E6=8C=87=E6=A0=87=E5=88=86=E6=95=B0=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/AgencyCalResultDTO.java | 20 +++++++++ .../dto/indexcal/CommunityCalResultDTO.java | 21 +++++++++ .../indexcal/AgencySubScoreDao.java | 3 +- .../IndexCalculateCommunityServiceImpl.java | 36 ++++++++++----- .../IndexCalculateDistrictServiceImpl.java | 45 ++++++++++++++----- .../impl/IndexCalculateStreetServiceImpl.java | 43 +++++++++++++----- .../indexcal/AgencySubScoreDao.xml | 6 +-- .../indexcal/CommunitySubScoreDao.xml | 4 +- 8 files changed, 135 insertions(+), 43 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java new file mode 100644 index 0000000000..0287801453 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyCalResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/9 5:52 下午 + */ +@Data +public class AgencyCalResultDTO implements Serializable { + + private static final long serialVersionUID = 2482954776048082386L; + + private List oneTwoLevel; + + private List fiveLevel; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java new file mode 100644 index 0000000000..f8325206c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CommunityCalResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.indexcal; + +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/9/10 9:19 上午 + */ +@Data +public class CommunityCalResultDTO implements Serializable { + + private static final long serialVersionUID = 2482954776048082386L; + + private List oneLevel; + + private List fiveLevel; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java index 959b5649c4..d6e8cc32c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java @@ -46,12 +46,11 @@ public interface AgencySubScoreDao extends BaseDao { /** * @param customerId * @param monthId - * @param indexCode * @Description 删除旧记录 * @author zxc * @date 2020/9/2 15:47 */ - void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType); + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); /** * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index d98981e803..70484fd74c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -9,10 +9,12 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao; +import com.epmet.dao.evaluationindex.indexcal.CommunitySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dto.indexcal.CommunityCalResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; import com.epmet.dto.screen.result.SubGridAvgResultDTO; @@ -63,6 +65,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni private CommunityScoreDao factIndexCommunityScoreDao; @Autowired private GridScoreDao factIndexGridScoreDao; + @Autowired + private CommunitySubScoreDao communitySubScoreDao; /** * @param customerId @@ -136,7 +140,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityPartyCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + communitySubScoreDao.deleteOldRecord(customerId,monthId); factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId); deleteAndInsert(result); return true; @@ -211,7 +216,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityGovernAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -285,7 +290,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.info("communityServiceAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); + CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -325,7 +330,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); result.add(score); }); - deleteAndInsert(result); + factIndexCommunityScoreDao.insertCommunityPartyRecord(result); return true; } @@ -372,15 +377,18 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } /** - * @param subAllGridList + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllGridList) { - if (!CollectionUtils.isEmpty(subAllGridList)) { - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + public void deleteAndInsert(CommunityCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneLevel())) { + factIndexCommunityScoreDao.insertCommunityPartyRecord(result.getOneLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + communitySubScoreDao.insertCommunityPartyRecord(result.getFiveLevel()); } } @@ -394,8 +402,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public CommunityCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,String allParentIndexCode, Map pid) { + CommunityCalResultDTO result = new CommunityCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO(); score.setCustomerId(customerId); @@ -429,11 +439,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneLevel(resultOne); + result.setFiveLevel(resultFive); return result; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 652958151d..4f6d07669b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.druid.util.StringUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -8,9 +9,11 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.dto.indexcal.AgencyCalResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; @@ -59,6 +62,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict private DeptScoreDao deptScoreDao; @Autowired private ScreenCustomerAgencyDao customerAgencyDao; + @Autowired + private AgencySubScoreDao agencySubScoreDao; /** * @Description 计算全区相关总分 @@ -157,8 +162,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); agencyScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); + agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); deleteAndInsert(result); return true; } @@ -225,7 +233,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -273,7 +283,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -314,7 +326,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); result.add(score); }); - deleteAndInsert(result); + if (!CollectionUtils.isEmpty(result)){ + agencyScoreDao.insertStreetRecord(result); + } return true; } @@ -334,15 +348,18 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } /** - * @param subAllDistrict + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllDistrict) { - if (!CollectionUtils.isEmpty(subAllDistrict)) { - agencyScoreDao.insertStreetRecord(subAllDistrict); + public void deleteAndInsert(AgencyCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneTwoLevel())){ + agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); } } @@ -356,8 +373,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public AgencyCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { + AgencyCalResultDTO result = new AgencyCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { AgencyScoreDTO score = new AgencyScoreDTO(); score.setCustomerId(customerId); @@ -393,11 +412,13 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneTwoLevel(resultOne); + result.setFiveLevel(resultFive); return result; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 8efe24bbed..1d9757041f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.druid.util.StringUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -8,10 +9,12 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao; import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dto.indexcal.AgencyCalResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; @@ -62,6 +65,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ private CommunityScoreDao communityScoreDao; @Autowired private AgencyScoreDao agencyScoreDao; + @Autowired + private AgencySubScoreDao agencySubScoreDao; /** * @Description 计算街道相关总分 @@ -160,7 +165,10 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.STREET_LEVEL); agencyScoreDao.deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); deleteAndInsert(result); return true; @@ -233,7 +241,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -305,7 +315,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - List result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); + log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); deleteAndInsert(result); return true; } @@ -346,7 +358,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); result.add(score); }); - deleteAndInsert(result); + agencyScoreDao.insertStreetRecord(result); return true; } @@ -366,15 +378,18 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } /** - * @param subAllCommunityList + * @param result * @Description 先删除记录,在插入 * @author zxc * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(List subAllCommunityList) { - if (!CollectionUtils.isEmpty(subAllCommunityList)) { - agencyScoreDao.insertStreetRecord(subAllCommunityList); + public void deleteAndInsert(AgencyCalResultDTO result) { + if (!CollectionUtils.isEmpty(result.getOneTwoLevel())) { + agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + } + if (!CollectionUtils.isEmpty(result.getFiveLevel())){ + agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); } } @@ -388,8 +403,10 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/9/2 2:37 下午 */ - public List getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { - List result = new ArrayList<>(); + public AgencyCalResultDTO getResultB(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode, String allParentIndexCode, Map pid) { + AgencyCalResultDTO result = new AgencyCalResultDTO(); + List resultOne = new ArrayList<>(); + List resultFive = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { AgencyScoreDTO score = new AgencyScoreDTO(); score.setCustomerId(customerId); @@ -425,11 +442,13 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ s.setParentAgencyId(parentAgency); } }); - result.add(s); + resultFive.add(s); }); } - result.add(score); + resultOne.add(score); }); + result.setOneTwoLevel(resultOne); + result.setFiveLevel(resultFive); return result; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml index 57bb0cd700..8858db0b55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml @@ -5,7 +5,7 @@ - INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -19,6 +19,7 @@ #{item.dataType}, #{item.score}, #{item.indexCode}, + #{item.allParentIndexCode}, #{item.delFlag}, #{item.revision}, #{item.createdBy}, @@ -33,12 +34,11 @@ DELETE FROM - fact_index_agency_score + fact_index_agency_sub_score WHERE del_flag = '0' AND customer_id = #{customerId} AND month_id = #{monthId} - AND index_code = #{indexCode} AND data_type = #{dataType} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml index 48b171c119..4aef48eb77 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml @@ -5,7 +5,7 @@ - INSERT INTO fact_index_community_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -33,7 +33,7 @@ DELETE FROM - fact_index_community_score + fact_index_community_sub_score WHERE del_flag = '0' AND customer_id = #{customerId} From 033416d123e40591d3f00b35d9d56b0390ff4dae Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 10:18:52 +0800 Subject: [PATCH 014/150] =?UTF-8?q?statical=E5=BC=80=E5=8F=91=E5=92=8C?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=A0=86=E5=86=85=E5=AD=98=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/deploy/docker-compose-dev.yml | 4 ++-- .../data-statistical-server/deploy/docker-compose-test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 36afabff51..fcc8b45448 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 600M \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml index 075a43a0af..29606a5d0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 600M \ No newline at end of file From 3a9113179aedb829897e6611c87ab87bd318d835 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 10 Sep 2020 10:55:48 +0800 Subject: [PATCH 015/150] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81=E9=80=A0=E6=88=90=E7=9A=84?= =?UTF-8?q?ErrorCode=E5=80=BC=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index b7844243d3..a61c25d8cf 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -77,6 +77,9 @@ public enum EpmetErrorCode { CANNOT_DISABLE_YOURSELF(8405,"您不能禁用自己"), NO_SET_GRID_COUNT(8406,"您还未设置创建网格数量上限,请联系管理员设置"), GRID_COUNT_UP(8407,"您的创建网格数量已到达上限,请联系管理员设置"), + EXIT_PEND_PROJECT(8408,"该工作人员有项目尚在处理,处理完毕方可操作"), + EXIT_PUBLISHED_ACTIVITY(8409,"该工作人员有活动尚在进行,等活动完成方可操作"), + CAN_NOT_SELF(8410,"无法对自己进行操作"), ALREADY_EVALUATE(8501,"您已评价"), ALREADY_VOTE(8502,"您已表态"), From 6fc76f98840d440b9b32a4db506a71e4ad2bb48c Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 10 Sep 2020 13:24:52 +0800 Subject: [PATCH 016/150] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=A0=B8=E9=94=80?= =?UTF-8?q?=E5=8A=A0=E5=85=A5customerId=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserPointTotalServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java index 2560755667..6bace14ee9 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java @@ -260,7 +260,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl Date: Thu, 10 Sep 2020 13:28:03 +0800 Subject: [PATCH 017/150] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97=20?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index f02185071f..88a58ff646 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -1,13 +1,24 @@ package com.epmet.constant; /** - * 描述一下 + * 指标计算 常量类 * * @author yinzuomei@elink-cn.com * @date 2020/8/27 15:20 */ public interface IndexCalConstant { + /** + * 批量插入 最大数据量 + */ + Integer INSERT_SIZE= 100; + /** + * 批量删除 一次删除50 + */ + Integer DELETE_SIZE=1000; + /** + * 分批计算,一次计算 10条 + */ Integer PAGE_SIZE = 10; String GRID_ID="GRID_ID"; @@ -35,6 +46,22 @@ public interface IndexCalConstant { String COMMUNITY_RELATE = "shequxiangguan"; + /** + * 网格相关:党建能力 + */ + String GRID_DJ_ALL_PARENT_INDEX_CODE="wanggexiangguan:dangjiannengli"; + /** + * 网格相关:治理能力 + */ + String GRID_ZL_ALL_PARENT_INDEX_CODE="wanggexiangguan:zhilinengli"; + /** + * 网格相关:服务能力 + */ + String GRID_FW_ALL_PARENT_INDEX_CODE="wanggexiangguan:fuwunengli"; + /** + * 区直部门:治理能力 + */ + String DEPT_ZL_ALL_PARENT_INDEX_CODE="quzhibumen:zhilinengli"; From b96eaef26b767ab8b69f44bbc0d6277e367f4cfd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:05:40 +0800 Subject: [PATCH 018/150] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=8F=92=E5=85=A5=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/DeptScoreDao.java | 34 ++-- .../indexcal/DeptSubScoreDao.java | 66 ++------ .../indexcal/GridScoreDao.java | 16 +- .../indexcal/GridSubScoreDao.java | 84 ++-------- .../indexcal/AgencySubScoreEntity.java | 2 +- .../indexcal/CpcSubScoreEntity.java | 2 +- .../indexcal/DeptSubScoreEntity.java | 7 +- .../indexcal/GridSubScoreEntity.java | 2 +- .../indexcal/GridCorreLationService.java | 3 +- .../indexcal/impl/DeptScoreServiceImpl.java | 98 ++++++++---- .../impl/GridCorreLationServiceImpl.java | 119 +++++++++++--- .../evaluationindex/indexcal/DeptScoreDao.xml | 50 +++--- .../indexcal/DeptSubScoreDao.xml | 71 ++------ .../evaluationindex/indexcal/GridScoreDao.xml | 50 +----- .../indexcal/GridSubScoreDao.xml | 151 ++---------------- 15 files changed, 279 insertions(+), 476 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index 4be461b59a..cbfa752bb0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -45,17 +45,6 @@ public interface DeptScoreDao extends BaseDao { **/ List selectListDeptScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - /** - * 批量插入 区直部门分值表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertDeptScoreData(@Param("list") List list, @Param("customerId")String customerId); - /** * 根据入参查询 区直部门分值表id * @param customerId @@ -79,12 +68,25 @@ public interface DeptScoreDao extends BaseDao { /** * @return int - * @param customerId - * @param monthId - * @param deptId + * @param customerId 客户id + * @param monthId 月id + * @param indexCode 不必填 + * @param deleteSize * @author yinzuomei - * @description + * @description 根据客户id+monthId,删除这个月某个指标所有的数据 一次至多删除50条 * @Date 2020/9/7 14:30 **/ - int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId")String monthId,@Param("deptId") String deptId); + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId")String monthId, + @Param("indexCode") String indexCode, + @Param("deleteSize") int deleteSize); + + /** + * @return int + * @param deptScoreEntityList + * @author yinzuomei + * @description 批量插入计算结果 + * @Date 2020/9/10 10:40 + **/ + int insertBatchEntity(@Param("list") List deptScoreEntityList); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java index e084506452..d0674e7fbd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java @@ -18,12 +18,11 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcal.DeptScoreDTO; -import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; -import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import javax.annotation.security.PermitAll; import java.util.List; /** @@ -33,60 +32,29 @@ import java.util.List; * @since v1.0.0 2020-09-02 */ @Mapper -public interface DeptSubScoreDao extends BaseDao { +public interface DeptSubScoreDao extends BaseDao { /** - * 根据入参查询 区直部门分值表 记录 - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListDeptScore(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * 批量插入 区直部门分值表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertDeptScoreData(@Param("list") List list, @Param("customerId") String customerId); - - /** - * 根据入参查询 区直部门分值表id - * - * @param customerId - * @param monthId - * @return java.lang.String - * @Author zhangyong - * @Date 10:43 2020-09-03 + * @param insertDeptSubList + * @return int + * @author yinzuomei + * @description 批量插入计算结果 五级指标分数值 + * @Date 2020/9/10 10:39 **/ - List selectListDeptId(@Param("customerId") String customerId, @Param("monthId") String monthId); - - - /** - * @param customerId - * @param monthId - * @param indexCode - * @Description 所有直属部门治理能力平均值 - * @author zxc - * @date 2020/9/4 10:53 上午 - */ - List selectGovernDeptScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); + int insertBatchEntity(@Param("list") List insertDeptSubList); /** * @param customerId * @param monthId - * @param deptId + * @param allParentIndexCode + * @param deleteSize 一次至多删除XX条记录 * @return int * @author yinzuomei - * @description - * @Date 2020/9/7 14:30 + * @description 批量删除 + * @Date 2020/9/10 12:28 **/ - int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("deptId") String deptId); + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("allParentIndexCode") String allParentIndexCode, + @Param("deleteSize") int deleteSize); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index b4db5f05f9..bd0ba82f7e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -40,7 +40,7 @@ public interface GridScoreDao extends BaseDao { * @param customerId * @param monthId * @param indexCode - * @param isTotal 1:总分;0不是 + * @param deleteNum * @return int * @author yinzuomei * @description @@ -49,7 +49,7 @@ public interface GridScoreDao extends BaseDao { int deleteByCusAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, - @Param("isTotal") String isTotal); + @Param("deleteNum") int deleteNum); /** * @return int @@ -58,7 +58,7 @@ public interface GridScoreDao extends BaseDao { * @description * @Date 2020/8/31 14:01 **/ - int insertBatches(List gridScoreEntityList); + int insertBatches(@Param("list")List gridScoreEntityList); /** * @return java.util.List @@ -98,15 +98,5 @@ public interface GridScoreDao extends BaseDao { **/ List selectListGridId(@Param("customerId")String customerId, @Param("monthId")String monthId); - /** - * 批量插入 网格相关分值表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertGridScoreData(@Param("list") List list,@Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java index e0cf724899..be9c55c66f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java @@ -18,11 +18,7 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.dto.screen.FactIndexGridScoreDTO; -import com.epmet.dto.screen.result.SubGridAvgResultDTO; -import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,80 +31,28 @@ import java.util.List; * @since v1.0.0 2020-08-31 */ @Mapper -public interface GridSubScoreDao extends BaseDao { +public interface GridSubScoreDao extends BaseDao { /** - * @param customerId - * @param monthId - * @param indexCode - * @param isTotal 1:总分;0不是 - * @return int - * @author yinzuomei - * @description - * @Date 2020/8/31 14:00 - **/ - int deleteByCusAndMonthId(@Param("customerId") String customerId, - @Param("monthId") String monthId, - @Param("indexCode") String indexCode, - @Param("isTotal") String isTotal); - - /** - * @param gridScoreEntityList + * @param gridSubScoreEntityList * @return int * @author yinzuomei * @description * @Date 2020/8/31 14:01 **/ - int insertBatches(List gridScoreEntityList); - - /** - * @param formDTO - * @return java.util.List - * @author yinzuomei - * @description - * @Date 2020/8/31 16:42 - **/ - List selectList(CalculateCommonFormDTO formDTO); + int insertBatches(@Param("list") List gridSubScoreEntityList); /** * @param customerId * @param monthId - * @Description 下属所有网格的平均值 - * @author zxc - * @date 2020/8/28 3:20 下午 - */ - List selectSubGridAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); - - /** - * 根据入参查询 网格相关分值记录 - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListGridScore(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * 根据入参查询 网格id - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListGridId(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * 批量插入 网格相关分值表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 + * @param allParentIndexCode + * @param deleteSize 一次至多删除XX条记录 + * @return int + * @author yinzuomei + * @description 批量删除 + * @Date 2020/9/10 13:36 **/ - void batchInsertGridScoreData(@Param("list") List list, @Param("customerId") String customerId); - + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("allParentIndexCode") String allParentIndexCode, + @Param("deleteSize") Integer deleteSize); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java index a3e18f4b4f..2f1d277b46 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_agency_score") +@TableName("fact_index_agency_sub_score") public class AgencySubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java index e69c222258..2183f77502 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_cpc_score") +@TableName("fact_index_cpc_sub_score") public class CpcSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java index 476f3c2568..db12edfeec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_dept_score") +@TableName("fact_index_dept_sub_score") public class DeptSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -67,11 +67,6 @@ public class DeptSubScoreEntity extends BaseEpmetEntity { */ private String monthId; - /** - * 1:总分;0不是;默认0 - */ - private String isTotal; - /** * 分值 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java index ad99f92586..01f40a5ddd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java @@ -32,7 +32,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = false) -@TableName("fact_index_sub_grid_score") +@TableName("fact_index_grid_sub_score") public class GridSubScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index a93697ce12..994f8818fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -3,6 +3,7 @@ package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; import java.math.BigDecimal; @@ -52,5 +53,5 @@ public interface GridCorreLationService { * @description 通用计算方法 * @Date 2020/9/3 16:07 **/ - HashMap calculate(Map> indexMap); + HashMap calculate(Map> indexMap); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 6dc176a887..d2feec5c47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -23,14 +23,17 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; @@ -43,9 +46,12 @@ import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexScoreVo; import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -81,6 +87,8 @@ public class DeptScoreServiceImpl extends BaseServiceImpl minAndMaxMap = factIndexGovrnAblityDeptMonthlyDao.selectExtremeValue(formDTO); if (CollectionUtils.isEmpty(minAndMaxMap)) { @@ -123,7 +123,10 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> indexMap = buildDeptCorrelationIndexInputVO(indexGroupDetailEntityList, minAndMaxMap); - //4、分批计算 + //4、先全部删除,后批量插入 + //quzhibumen:zhilinengli + deleteBeforeDataList(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.DEPT_ZL_ALL_PARENT_INDEX_CODE); + //5、分批计算 int pageNo = NumConstant.ONE; int pageSize = IndexCalConstant.PAGE_SIZE; //分页查询 要计算的原始数据 @@ -139,6 +142,38 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap = gridCorreLationService.calculate(indexMap); + HashMap resultMap = gridCorreLationService.calculate(indexMap); //保存中间表记录 this.saveDeptScoreEntity(formDTO,resultMap); } @@ -177,10 +212,12 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap) { + public void saveDeptScoreEntity(CalculateCommonFormDTO formDTO, HashMap resultMap) { String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); - resultMap.forEach((deptId, governAblityScore) -> { + List deptScoreEntityList=new ArrayList<>(); + List deptSubScoreEntityList=new ArrayList<>(); + resultMap.forEach((deptId, calculateResult) -> { DeptScoreEntity deptScoreEntity = new DeptScoreEntity(); deptScoreEntity.setCustomerId(formDTO.getCustomerId()); deptScoreEntity.setDeptId(deptId); @@ -195,26 +232,29 @@ public class DeptScoreServiceImpl extends BaseServiceImpl> partitionDeptSubScoreList = ListUtils.partition(deptSubScoreEntityList, IndexCalConstant.INSERT_SIZE); + for (List insertDeptSubList : partitionDeptSubScoreList) { + deptSubScoreDao.insertBatchEntity(insertDeptSubList); + } } - /** - * @param formDTO - * @return void - * @author yinzuomei - * @description 只有一个部门的事实记录时无需处理以下代码注释 - * @Date 2020/9/3 9:35 - **/ - /*private void handleOneGridScene(CalculateCommonFormDTO formDTO) { - FactIndexGovrnAblityDeptMonthlyEntity entity = factIndexGovrnAblityDeptMonthlyDao.selectOneRecord(formDTO.getCustomerId(), formDTO.getMonthId()); - HashMap resultMap = new HashMap<>(); - resultMap.put(entity.getDeptId(), new BigDecimal(NumConstant.FIFTY_STR)); - this.saveDeptScoreEntity(formDTO, resultMap); - }*/ - /** * @param indexList * @param minAndMaxMap diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 707a462ba0..1a3ba3a353 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -11,13 +11,16 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridSubScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; +import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridSubScoreEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; @@ -27,11 +30,9 @@ import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreConstants; -import com.epmet.support.normalizing.batch.BatchScoreCalculator; -import com.epmet.support.normalizing.batch.IndexInputVO; -import com.epmet.support.normalizing.batch.IndexOutputVO; -import com.epmet.support.normalizing.batch.SampleValue; +import com.epmet.support.normalizing.batch.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -69,6 +70,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private CpcScoreDao cpcScoreDao; @Autowired private GridScoreDao gridScoreDao; + @Autowired + private GridSubScoreDao gridSubScoreDao; /** @@ -154,7 +157,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -186,11 +189,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), + IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } /** @@ -318,6 +326,36 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } + /** + * @return void + * @param formDTO + * @param indexCode 当前计算的指标(党建能力,治理能力,服务能力) + * @param allParentIndexCode + * @author yinzuomei + * @description + * @Date 2020/9/10 13:58 + **/ + private void deleteBeforeDataList(CalculateCommonFormDTO formDTO,String indexCode,String allParentIndexCode) { + //先删除 + int masterDeleteNum; + do { + //一次删除50条 + masterDeleteNum = gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), + formDTO.getMonthId(), + indexCode, + IndexCalConstant.DELETE_SIZE); + } while (masterDeleteNum != NumConstant.ZERO); + //删除明细时,需要根据分组删,比方说当前计算的是网格相关-党建能力,主表需要删除indexCode=dangjiannengli的,明细需要删除网格相关:党建能力 下面所有的指标明细 + int detailDelteNum; + do { + detailDelteNum = gridSubScoreDao.deleteByDeptIdAndMonthId(formDTO.getCustomerId(), + formDTO.getMonthId(), + allParentIndexCode, + IndexCalConstant.DELETE_SIZE); + } while (detailDelteNum != NumConstant.ZERO); + log.info("delete fact_index_grid_score and fact_index_grid_sub_score complete"); + } + /** * @param formDTO 客户id 月份id: yyyyMM * @param resultMapList @@ -329,15 +367,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/30 22:50 **/ private void saveGridCorreLationResult(CalculateCommonFormDTO formDTO, - List> resultMapList, + List> resultMapList, String indexCode, + String allParentIndexCode, String isTotal) { - List gridScoreEntityList = new ArrayList<>(); String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); - for (HashMap resultMap : resultMapList) { - resultMap.forEach((gridId, partyAblityScore) -> { - log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); + //三大能力结果表 + List gridScoreEntityList = new ArrayList<>(); + //五级指标分值明细 + List gridSubScoreList = new ArrayList<>(); + for (HashMap resultMap : resultMapList) { + resultMap.forEach((gridId, calculateResult) -> { GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -355,18 +396,36 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); gridScoreEntity.setMonthId(formDTO.getMonthId()); - gridScoreEntity.setScore(partyAblityScore); + gridScoreEntity.setScore(calculateResult.getTotalScore()); + //新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开 + gridScoreEntity.setAllParentIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); gridScoreEntityList.add(gridScoreEntity); + for(IndexScoreVo detail:calculateResult.getDetails()){ + GridSubScoreEntity gridSubScoreEntity= ConvertUtils.sourceToTarget(gridScoreEntity, GridSubScoreEntity.class); + //重新赋值 + gridSubScoreEntity.setIndexCode(detail.getIndexCode()); + gridSubScoreEntity.setAllParentIndexCode(detail.getAllParentIndexCode()); + gridSubScoreEntity.setScore(detail.getScore()); + gridSubScoreList.add(gridSubScoreEntity); + } }); } + //后新增 if (!CollectionUtils.isEmpty(gridScoreEntityList)) { - gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, isTotal); //批量插入 - List> partition = ListUtils.partition(gridScoreEntityList, 100); + List> partition = ListUtils.partition(gridScoreEntityList, IndexCalConstant.INSERT_SIZE); partition.forEach(list -> { gridScoreDao.insertBatches(list); }); } + if (!CollectionUtils.isEmpty(gridSubScoreList)) { + //批量插入 + List> subPartition = ListUtils.partition(gridSubScoreList, IndexCalConstant.INSERT_SIZE); + subPartition.forEach(subList -> { + gridSubScoreDao.insertBatches(subList); + }); + } + log.info("insert fact_index_grid_score and fact_index_grid_sub_score complete"); } /** @@ -377,7 +436,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/30 21:40 **/ @Override - public HashMap calculate(Map> indexMap) { + public HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); @@ -387,7 +446,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); - HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + HashMap resultMap = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("计算的结果{}", resultMap); return resultMap; } @@ -503,7 +562,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -532,11 +591,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.GRID_ZL_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), + IndexCalConstant.GRID_ZL_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } @@ -572,7 +636,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } //指标集合 Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList = new ArrayList<>(); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -597,11 +661,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } }); }); - HashMap resultMap = calculate(indexMap); + HashMap resultMap = calculate(indexMap); resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.FU_WU_NENG_LI.getCode(), NumConstant.ZERO_STR); + deleteBeforeDataList(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.GRID_FW_ALL_PARENT_INDEX_CODE); + saveGridCorreLationResult(formDTO, + resultMapList, + IndexCodeEnum.FU_WU_NENG_LI.getCode(), + IndexCalConstant.GRID_FW_ALL_PARENT_INDEX_CODE, + NumConstant.ZERO_STR); } /** @@ -637,9 +706,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntityList.add(gridScoreEntity); } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { - gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); + gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, IndexCalConstant.DELETE_SIZE); //批量插入 - List> partition = ListUtils.partition(gridScoreEntityList, 100); + List> partition = ListUtils.partition(gridScoreEntityList, IndexCalConstant.INSERT_SIZE); partition.forEach(list -> { gridScoreDao.insertBatches(list); }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index 077c6a7430..d17f344e40 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -43,7 +43,31 @@ GROUP BY fidc.agency_id - + + + + + + delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + + and INDEX_CODE=#{indexCode} + + limit #{deleteSize} + + + + insert into fact_index_dept_score ( ID, @@ -56,7 +80,7 @@ IS_TOTAL, SCORE, INDEX_CODE, - + ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, @@ -72,12 +96,12 @@ #{item.agencyId}, #{item.quarterId}, #{item.yearId}, - #{item.monthId}, #{item.isTotal}, #{item.score}, #{item.indexCode}, - #{item.delFlag}, + #{item.allParentIndexCode}, + 0, 0, 'APP_USER', now(), @@ -86,22 +110,4 @@ ) - - - - - delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} - AND MONTH_ID = #{monthId} - and DEPT_ID=#{deptId} - diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml index f75bed424b..a20c5311e1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml @@ -2,47 +2,9 @@ - - - - - - - - insert into fact_index_dept_score + + + insert into fact_index_dept_sub_score ( ID, CUSTOMER_ID, @@ -53,7 +15,7 @@ MONTH_ID, SCORE, INDEX_CODE, - + ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, @@ -69,11 +31,11 @@ #{item.agencyId}, #{item.quarterId}, #{item.yearId}, - #{item.monthId}, #{item.score}, #{item.indexCode}, - #{item.delFlag}, + #{item.allParentIndexCode}, + 0, 0, 'APP_USER', now(), @@ -83,21 +45,12 @@ - - + - delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} - AND MONTH_ID = #{monthId} - and DEPT_ID=#{deptId} + delete from fact_index_dept_sub_score + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + and ALL_PARENT_INDEX_CODE=#{allParentIndexCode} + limit #{deleteSize} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index d42d063e35..b0970024c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -15,6 +15,7 @@ + @@ -31,9 +32,10 @@ CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND INDEX_CODE = #{indexCode} - and IS_TOTAL=#{isTotal} + limit #{deleteNum} + INSERT INTO `fact_index_grid_score` ( `ID`, @@ -47,6 +49,7 @@ `IS_TOTAL`, `SCORE`, `INDEX_CODE`, + ALL_PARENT_INDEX_CODE, `DEL_FLAG`, `REVISION`, `CREATED_BY`, @@ -68,6 +71,7 @@ #{item.isTotal}, #{item.score}, #{item.indexCode}, + #{item.allParentIndexCode}, 0, 0, 'APP_USER', @@ -156,50 +160,6 @@ ORDER BY GRID_ID - - insert into fact_index_grid_score - ( - ID, - CUSTOMER_ID, - GRID_ID, - AGENCY_ID, - ALL_PARENT_IDS, - QUARTER_ID, - YEAR_ID, - MONTH_ID, - IS_TOTAL, - SCORE, - INDEX_CODE, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.gridId}, - #{item.agencyId}, - #{item.allParentIds}, - #{item.quarterId}, - - #{item.yearId}, - #{item.monthId}, - #{item.isTotal}, - #{item.score}, - #{item.indexCode}, - #{item.delFlag}, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - SELECT - m.GRID_ID, - m.CUSTOMER_ID, - m.AGENCY_ID, - m.ALL_PARENT_IDS, - m.QUARTER_ID, - m.YEAR_ID, - m.MONTH_ID, - M.SCORE, - M.INDEX_CODE - FROM - fact_index_grid_score m - WHERE - m.DEL_FLAG = '0' - AND m.CUSTOMER_ID =#{customerId} - AND m.MONTH_ID =#{monthId} - - - - - - - - - - - insert into fact_index_grid_score - ( - ID, - CUSTOMER_ID, - GRID_ID, - AGENCY_ID, - ALL_PARENT_IDS, - QUARTER_ID, - YEAR_ID, - MONTH_ID, - SCORE, - INDEX_CODE, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.gridId}, - #{item.agencyId}, - #{item.allParentIds}, - #{item.quarterId}, - - #{item.yearId}, - #{item.monthId}, - #{item.score}, - #{item.indexCode}, - #{item.delFlag}, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - - + CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + AND ALL_PARENT_INDEX_CODE = #{allParentIndexCode} + limit #{deleteNum} + \ No newline at end of file From 1e0f2adc4e710b341a33b792d9b46739d18c834b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 14:11:29 +0800 Subject: [PATCH 019/150] =?UTF-8?q?=E6=97=A0=E7=94=A8sql=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencySubScoreDao.java | 51 -------- .../indexcal/CommunitySubScoreDao.java | 50 -------- .../indexcal/AgencySubScoreDao.xml | 115 ------------------ .../indexcal/CommunitySubScoreDao.xml | 113 ----------------- 4 files changed, 329 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java index d6e8cc32c9..906ef53470 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java @@ -52,55 +52,4 @@ public interface AgencySubScoreDao extends BaseDao { */ void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); - /** - * @param customerId - * @param monthId - * @Description 查询【fact_index_agency_score】相关信息 - * @author zxc - * @date 2020/9/1 9:41 上午 - */ - List selectAgencyScoreInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); - - /** - * @param customerId - * @param monthId - * @Description 区下级街道得分平均值 - * @author zxc - * @date 2020/8/31 1:51 下午 - */ - List selectAgencyScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType); - - - /** - * 根据入参查询 区/街道相关分数表 记录 - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListAgencyScore(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * 批量插入区/街道相关分数表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertAgencyScoreData(@Param("list") List list, @Param("customerId") String customerId); - - /** - * 根据入参查询 区/街道相关分数表id - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListAgencyId(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java index 9caf146b4d..a5d2717f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java @@ -52,54 +52,4 @@ public interface CommunitySubScoreDao extends BaseDao selectCommunityInfo(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * 根据入参查询 查询社区相关信息 - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListCommunityScore(@Param("customerId") String customerId, @Param("monthId") String monthId); - - /** - * @param customerId - * @param monthId - * @Description 街道下级所有社区得分平均值 - * @author zxc - * @date 2020/8/31 1:51 下午 - */ - List selectSubCommAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); - - /** - * 批量插入 社区相关分数表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertCommunityScoreData(@Param("list") List list, @Param("customerId") String customerId); - - /** - * 根据入参查询 查询社区id - * - * @param customerId - * @param monthId - * @return java.util.List - * @Author zhangyong - * @Date 10:43 2020-09-03 - **/ - List selectListCommunityId(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml index 8858db0b55..bc1c357ba1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml @@ -42,119 +42,4 @@ AND data_type = #{dataType} - - - - - - - - - insert into fact_index_agency_score - ( - ID, - CUSTOMER_ID, - - AGENCY_ID, - PARENT_AGENCY_ID, - YEAR_ID, - QUARTER_ID, - MONTH_ID, - DATA_TYPE, - SCORE, - INDEX_CODE, - - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.agencyId}, - #{item.parentAgencyId}, - - #{item.yearId}, - #{item.quarterId}, - #{item.monthId}, - #{item.dataType}, - #{item.score}, - #{item.indexCode}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml index 4aef48eb77..382031f5d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml @@ -40,117 +40,4 @@ AND month_id = #{monthId} - - - - - - - - - - insert into fact_index_community_score - ( - ID, - CUSTOMER_ID, - AGENCY_ID, - PARENT_AGENCY_ID, - YEAR_ID, - QUARTER_ID, - MONTH_ID, - SCORE, - INDEX_CODE, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.agencyId}, - #{item.parentAgencyId}, - #{item.yearId}, - #{item.quarterId}, - #{item.monthId}, - #{item.score}, - #{item.indexCode}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - From db4117f9b280cca412696fcaa51dcdaf7811098b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:23:21 +0800 Subject: [PATCH 020/150] pageSize=1000 --- .../src/main/java/com/epmet/constant/IndexCalConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 88a58ff646..a0596240e8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -19,7 +19,7 @@ public interface IndexCalConstant { /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 10; + Integer PAGE_SIZE = 1000; String GRID_ID="GRID_ID"; From 37a62af388a7264b8fed37dabb2c22f1c99e841d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 10 Sep 2020 14:30:30 +0800 Subject: [PATCH 021/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=20-=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=20-=20=E5=BE=85?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88(5-19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screencoll/form/KcActSummaryFormDTO.java | 42 ++ .../screencoll/form/KcActTrendFormDTO.java | 22 ++ .../form/KcCategorySummaryFormDTO.java | 52 +++ .../screencoll/form/KcGroupDetailFormDTO.java | 67 ++++ .../form/KcGroupSummaryFormDTO.java | 62 +++ .../form/KcGroupTopicTrendFormDTO.java | 42 ++ .../screencoll/form/KcHomePageFormDTO.java | 77 ++++ .../form/KcIssueSummaryFormDTO.java | 92 +++++ .../screencoll/form/KcIssueTrendFormDTO.java | 42 ++ .../form/KcNewsCategoryAnalysisFormDTO.java | 47 +++ .../screencoll/form/KcNewsHotRankFormDTO.java | 32 ++ .../screencoll/form/KcNewsSummaryFormDTO.java | 37 ++ .../screencoll/form/KcNewsTrendFormDTO.java | 27 ++ .../form/KcProjectSatisanalysisFormDTO.java | 52 +++ .../form/KcProjectSummaryFormDTO.java | 77 ++++ .../form/KcUserHeartRankFormDTO.java | 47 +++ .../screencoll/form/KcUserSummaryFormDTO.java | 93 +++++ .../form/KcVolunteerHeartRankFormDTO.java | 52 +++ .../form/KcVolunteerSummaryFormDTO.java | 77 ++++ .../controller/KcScreenCollController.java | 373 ++++++++++++++++++ .../screen/ScreenKcActSummaryDailyDao.java | 61 +++ .../screen/ScreenKcActTrendMonthlyDao.java | 61 +++ .../ScreenKcGroupDetailGridDailyDao.java | 61 +++ .../ScreenKcGroupSummaryGridDailyDao.java | 61 +++ .../ScreenKcIssueSummaryGridDailyDao.java | 61 +++ .../ScreenKcIssueTrendGridMonthlyDao.java | 61 +++ .../ScreenKcNewsCategoryAnalysisDao.java | 61 +++ .../screen/ScreenKcNewsRankDao.java | 59 +++ .../screen/ScreenKcNewsSummaryDailyDao.java | 61 +++ .../screen/ScreenKcNewsTrendMonthlyDao.java | 61 +++ .../ScreenKcPlatformSummaryDailyDao.java | 61 +++ .../ScreenKcProjectCategoryGridDailyDao.java | 61 +++ .../ScreenKcProjectSatisGridMonthlyDao.java | 61 +++ .../ScreenKcProjectSummaryGridDailyDao.java | 61 +++ .../ScreenKcTopicTrendGridMonthlyDao.java | 62 +++ .../ScreenKcUserHeatRankGridDailyDao.java | 33 ++ .../screen/ScreenKcUserSummaryDailyDao.java | 61 +++ .../ScreenKcUserTrendGridMonthlyDao.java | 61 +++ ...ScreenKcVolunteerHeatRankGridDailyDao.java | 59 +++ .../ScreenKcVolunteerSummaryDailyDao.java | 61 +++ .../screen/ScreenKcActSummaryDailyEntity.java | 76 ++++ .../screen/ScreenKcActTrendMonthlyEntity.java | 56 +++ .../ScreenKcGroupDetailGridDailyEntity.java | 101 +++++ .../ScreenKcGroupSummaryGridDailyEntity.java | 96 +++++ .../ScreenKcIssueSummaryGridDailyEntity.java | 126 ++++++ .../ScreenKcIssueTrendGridMonthlyEntity.java | 76 ++++ .../ScreenKcNewsCategoryAnalysisEntity.java | 81 ++++ .../screen/ScreenKcNewsRankEntity.java | 66 ++++ .../ScreenKcNewsSummaryDailyEntity.java | 71 ++++ .../ScreenKcNewsTrendMonthlyEntity.java | 61 +++ .../ScreenKcPlatformSummaryDailyEntity.java | 111 ++++++ ...creenKcProjectCategoryGridDailyEntity.java | 86 ++++ ...ScreenKcProjectSatisGridMonthlyEntity.java | 86 ++++ ...ScreenKcProjectSummaryGridDailyEntity.java | 111 ++++++ .../ScreenKcTopicTrendGridMonthlyEntity.java | 76 ++++ .../ScreenKcUserHeatRankGridDailyEntity.java | 96 +++++ .../ScreenKcUserSummaryDailyEntity.java | 126 ++++++ .../ScreenKcUserTrendGridMonthlyEntity.java | 81 ++++ ...eenKcVolunteerHeatRankGridDailyEntity.java | 86 ++++ .../ScreenKcVolunteerSummaryDailyEntity.java | 111 ++++++ .../screen/KcScreenCollService.java | 260 ++++++++++++ .../screen/impl/KcScreenCollServiceImpl.java | 367 +++++++++++++++++ .../screen/ScreenKcActSummaryDailyDao.xml | 68 ++++ .../screen/ScreenKcActTrendMonthlyDao.xml | 54 +++ .../ScreenKcGroupDetailGridDailyDao.xml | 83 ++++ .../ScreenKcGroupSummaryGridDailyDao.xml | 80 ++++ .../ScreenKcIssueSummaryGridDailyDao.xml | 97 +++++ .../ScreenKcIssueTrendGridMonthlyDao.xml | 70 ++++ .../ScreenKcNewsCategoryAnalysisDao.xml | 72 ++++ .../screen/ScreenKcNewsRankDao.xml | 62 +++ .../screen/ScreenKcNewsSummaryDailyDao.xml | 65 +++ .../screen/ScreenKcNewsTrendMonthlyDao.xml | 57 +++ .../ScreenKcPlatformSummaryDailyDao.xml | 87 ++++ .../ScreenKcProjectCategoryGridDailyDao.xml | 74 ++++ .../ScreenKcProjectSatisGridMonthlyDao.xml | 75 ++++ .../ScreenKcProjectSummaryGridDailyDao.xml | 91 +++++ .../ScreenKcTopicTrendGridMonthlyDao.xml | 69 ++++ .../ScreenKcUserHeatRankGridDailyDao.xml | 28 ++ .../screen/ScreenKcUserSummaryDailyDao.xml | 99 +++++ .../ScreenKcUserTrendGridMonthlyDao.xml | 72 ++++ .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 75 ++++ .../ScreenKcVolunteerSummaryDailyDao.xml | 91 +++++ 82 files changed, 6477 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java new file mode 100644 index 0000000000..a942ef7c96 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActSummaryFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 7、公益互助-活动各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcActSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + + /** + * 参与人次 + */ + private Integer partiUserCount; + + /** + * 发放积分 + */ + private Integer rewardPointCount; + + /** + * 公益时长单位分钟 + */ + private Integer heartTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java new file mode 100644 index 0000000000..26469e1ac4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcActTrendFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 8、公益互助-活动次数趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcActTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 活动数量(本月举行的活动) + */ + private Integer actCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java new file mode 100644 index 0000000000..495e3ac7f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 11、项目分析-按分类统计 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcCategorySummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 项目数量 + */ + private Integer projectCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java new file mode 100644 index 0000000000..8fc4130dbc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java @@ -0,0 +1,67 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 18、邻里党群-小组详情 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小组id + */ + private String groupId; + + /** + * 群名称 + */ + private String groupName; + + /** + * 群主名称 + */ + private String groupLeader; + + /** + * 群成员数 + */ + private Integer memberCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 转为议题的话题数 + */ + private Integer shifitIssueCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java new file mode 100644 index 0000000000..2018c4905d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupSummaryFormDTO.java @@ -0,0 +1,62 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 17、邻里党群-各类总数汇总 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 群成员总数 + */ + private Integer memberCount; + + /** + * 话题数量 + */ + private Integer topicCount; + + /** + * 话题参与量 + */ + private Integer partiCount; + + /** + * 话题转议题总数 + */ + private Integer shiftIssueCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java new file mode 100644 index 0000000000..1ad02ab91c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupTopicTrendFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 19、邻里党群-话题参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcGroupTopicTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java new file mode 100644 index 0000000000..b12c97bb54 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcHomePageFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 1、首页-平台各类总数上报 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcHomePageFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格总数 + */ + private Integer gridCount; + + /** + * 已开通网格总数 + */ + private Integer openedGridCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 用户总数 + */ + private Integer userCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 新闻数量 + */ + private Integer newsCount; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 公益活动数量 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer vounteerCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java new file mode 100644 index 0000000000..ae08d2330f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueSummaryFormDTO.java @@ -0,0 +1,92 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 2、议题分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcIssueSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java new file mode 100644 index 0000000000..3fe5df6075 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcIssueTrendFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 3、议题分析-参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcIssueTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java new file mode 100644 index 0000000000..ed16c44348 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsCategoryAnalysisFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 16、党建声音-新闻按类别统计 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsCategoryAnalysisFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 新闻的数量 + */ + private Integer newsCount; + + /** + * 阅读的数量 + */ + private Integer readCount; + + /** + * 点赞的数量 + */ + private Integer likeCount; + + /** + * 点踩的数量 + */ + private Integer disLikeCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java new file mode 100644 index 0000000000..035fbd4971 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsHotRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 15、党建声音-热度新闻排行 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsHotRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 新闻id + */ + private String newsId; + + /** + * 新闻标题 + */ + private String newsTitle; + + /** + * 新闻热点值 + */ + private Integer hotCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java new file mode 100644 index 0000000000..276244a9f1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsSummaryFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 13、党建声音-新闻各类总数汇总 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 文章总数 + */ + private Integer newsCount; + + /** + * 阅读量 + */ + private Integer readCount; + + /** + * 点赞量 + */ + private Integer likeCount; + + /** + * 评论量 + */ + private Integer commentCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java new file mode 100644 index 0000000000..6e6bdf9359 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 14、党建声音-新闻阅读参与趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcNewsTrendFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 参与数量 + */ + private Integer partiCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java new file mode 100644 index 0000000000..97843831e2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 12、项目分析-满意度分析 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcProjectSatisanalysisFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 非常满意项目总数 + */ + private Integer greatSatis; + + /** + * 满意项目总数 + */ + private Integer goodSatis; + + /** + * 不满意的项目总数 + */ + private Integer disSatis; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java new file mode 100644 index 0000000000..1b723b68d1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSummaryFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 10、项目分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcProjectSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 流转次数 + */ + private Integer moveCount; + + /** + * 已结案数量 + */ + private Integer closedCaseCount; + + /** + * 项目浏览数 + */ + private Integer projectViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 平均结案时间 单位分钟 ? + */ + private Integer avgClosedCaseTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java new file mode 100644 index 0000000000..d5a272c182 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserHeartRankFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 6、用户分析-用户趋势 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcUserHeartRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 本月内新增用户数量 + */ + private Integer regUserCount; + + /** + * 本月内新增党员数量 + */ + private Integer partyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java new file mode 100644 index 0000000000..cd9b0db555 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java @@ -0,0 +1,93 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 4、用户分析-各类总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcUserSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 浏览用户(首页的用户总数,原型上首页是叫注册用户) + */ + private Integer visitorCount; + + /** + * 注册用户=居民数量 + */ + private Integer regUserCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 小于20岁的党员总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的党员总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的党员总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的党员总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的党员总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的党员总人数 + */ + private Integer ageLevel6; + + /** + * 党员中男性总人数 + */ + private Integer malePartyUserCount; + + /** + * 党员中女性总人数 + */ + private Integer femalePartyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java new file mode 100644 index 0000000000..2509051e3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 5、公益互助-志愿者公益时长排名 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcVolunteerHeartRankFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java new file mode 100644 index 0000000000..ebfee5da52 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerSummaryFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 孔村 + * 9、公益互助-志愿者画像 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class KcVolunteerSummaryFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount; + + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java index 766db2294b..09d06df653 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java @@ -1,5 +1,14 @@ package com.epmet.controller; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.evaluationindex.screen.KcScreenCollService; +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; @@ -12,4 +21,368 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("kcscreencoll") public class KcScreenCollController { + + @Autowired + private KcScreenCollService kcScreenCollService; + + /** + * 1、首页-平台各类总数上报 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_platform_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("homepage/platformsummary") + public Result platFormSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertPlatFormSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 2、议题分析-各类总数 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_issue_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("issue/summary") + public Result issueSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertIssueSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 3、议题分析-参与趋势 + * 当isFirst为true时,customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table: screen_kc_issue_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("issue/trend") + public Result issueTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertIssueTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 4、用户分析-各类总数 + * 当isFirst为true时根据customerId+dateId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_user_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("user/summary") + public Result userSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertUserSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 5、公益互助-志愿者公益时长排名 + * 当isFirst为true时, 根据customerId清空当前客户下所有用户的信息,再插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_volunteer_heat_rank_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("volunteer/heartrank") + public Result volunteerHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertVolunteerHeartRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 6、用户分析-用户趋势 + * 当isFirst为true时,根据monthId+customerId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_user_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("user/userheartrank") + public Result userHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertUserHeartRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 7、公益互助-活动各类总数 + * 当isFirst为true时,根据customerId+dateId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_act_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/summary") + public Result actSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertActSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 8、公益互助-活动次数趋势 + * 当isFirst为true时,根据customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_act_trend_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/trend") + public Result actTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertActTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 9、公益互助-志愿者画像 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_volunteer_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("act/volunteersummary") + public Result volunteerSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertVolunteerSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 10、项目分析-各类总数 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/summary") + public Result projectSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertProjectSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 11、项目分析-按分类统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_category_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/categorysummary") + public Result categorySummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertCategorySummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 12、项目分析-满意度分析 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_project_satis_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("project/satisanalysis") + public Result projectSatisanalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertProjectSatisanalysis(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 13、党建声音-新闻各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_summary_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/summary") + public Result newsSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 14、党建声音-新闻阅读参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_trend_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/trend") + public Result newsTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 15、党建声音-热度新闻排行 + * 当isFirst为true时,根据 customerId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_rank + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/hotrank") + public Result newsHotRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsHotRank(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 16、党建声音-新闻按类别统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_news_category_analysis + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("news/categoryanalysis") + public Result newsCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertNewsCategoryAnalysis(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 17、邻里党群-各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_group_summary_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/summary") + public Result groupSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupSummary(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 18、邻里党群-小组详情 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_group_detail_grid_daily + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/detail") + public Result groupDetail(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupDetail(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 19、邻里党群-话题参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * table:screen_kc_topic_trend_grid_monthly + * + * @param externalAppRequestParam + * @param formDTO + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + @ExternalAppRequestAuth + @PostMapping("group/topictrend") + public Result groupTopicTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO formDTO) { + kcScreenCollService.insertGroupTopicTrend(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.java new file mode 100644 index 0000000000..72e45ad0f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActSummaryDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcActSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcActSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-活动各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcActSummaryDailyDao extends BaseDao { + + /** + * 根据customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteActSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertActSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.java new file mode 100644 index 0000000000..49d63fec9c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcActTrendMonthlyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcActTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcActTrendMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-活动(次数+时长)趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcActTrendMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteActTrend(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertActTrend (@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.java new file mode 100644 index 0000000000..c94d1a0f14 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupDetailFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcGroupDetailGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-小组详情(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcGroupDetailGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteGroupDetailGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertGroupDetailGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.java new file mode 100644 index 0000000000..6f457ec565 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcGroupSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-小组分析各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcGroupSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteGroupSummaryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertGroupSummaryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.java new file mode 100644 index 0000000000..6e905f0865 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcIssueSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcIssueSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcIssueSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.util.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteIssueSummaryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertIssueSummaryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.java new file mode 100644 index 0000000000..d6b2db2ef3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcIssueTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcIssueTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcIssueTrendGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteIssueTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertIssueTrendGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.java new file mode 100644 index 0000000000..48be92ba09 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsCategoryAnalysisFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsCategoryAnalysisEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻-按类别统计(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsCategoryAnalysisDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsCategoryAnalysis(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsCategoryAnalysis(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.java new file mode 100644 index 0000000000..842c6ea781 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsRankDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsHotRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsRankEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-热点新闻排行-(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsRankDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsRank(@Param("customerId") String customerId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsRank(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.java new file mode 100644 index 0000000000..ca4414aaf6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻-各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.java new file mode 100644 index 0000000000..26c018f6fb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcNewsTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcNewsTrendMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-新闻参与趋势-(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcNewsTrendMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteNewsTrend(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertNewsTrend(@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.java new file mode 100644 index 0000000000..7762c772bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcHomePageFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcPlatformSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-平台各汇总值(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcPlatformSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.util.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deletePlatFormSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertPlatFormSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.java new file mode 100644 index 0000000000..2f8e9236b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcCategorySummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectCategoryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目按分类统计上报总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectCategoryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteCategoryGrid(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertCategoryGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.java new file mode 100644 index 0000000000..c2bbdf98e8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcProjectSatisanalysisFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectSatisGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目满意度分析(customerId+monthId先删除记录,再插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectSatisGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+monthId,清空数据 + * + * @param customerId + * @param monthId 例: 202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteProjectSatisGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例: 202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertProjectSatisGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.java new file mode 100644 index 0000000000..aa89e45d2b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcProjectSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcProjectSummaryGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcProjectSummaryGridDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteProjectSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertProjectSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java new file mode 100644 index 0000000000..66e554a9dc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.java @@ -0,0 +1,62 @@ +/** + * 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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcGroupTopicTrendFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcTopicTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-话题参与趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcTopicTrendGridMonthlyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteTopicTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertTopicTrendGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java new file mode 100644 index 0000000000..58ed6bf539 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserHeatRankGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * KC-用户公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserHeatRankGridDailyDao extends BaseDao { + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.java new file mode 100644 index 0000000000..bfaa371bf8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserSummaryDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcUserSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-用户分析(先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteUserSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertUserSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.java new file mode 100644 index 0000000000..6c8e780788 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcUserHeartRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcUserTrendGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-用户趋势分析(根据monthId+customerId先删后增) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcUserTrendGridMonthlyDao extends BaseDao { + + /** + * 根据monthId+customerId先删后增 + * + * @param customerId + * @param monthId 例:202008 + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteUserTrendGrid(@Param("customerId") String customerId, + @Param("monthId") String monthId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param monthId 例:202008 + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertUserTrendGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("monthId")String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.java new file mode 100644 index 0000000000..3e0de5f451 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcVolunteerHeartRankFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcVolunteerHeatRankGridDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-志愿者公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcVolunteerHeatRankGridDailyDao extends BaseDao { + + /** + * 按照customerId,清空数据 + * + * @param customerId + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteVolunteerHeatRankGrid(@Param("customerId") String customerId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertVolunteerHeatRankGrid(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.java new file mode 100644 index 0000000000..ae2d38d3e5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.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.epmet.dao.evaluationindex.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.KcVolunteerSummaryFormDTO; +import com.epmet.entity.evaluationindex.screen.ScreenKcVolunteerSummaryDailyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * KC-志愿者汇总(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Mapper +public interface ScreenKcVolunteerSummaryDailyDao extends BaseDao { + + /** + * 按照customerId+dateId,清空数据 + * + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return java.lang.Integer + * @Author zhangyong + * @Date 16:14 2020-09-09 + **/ + Integer deleteVolunteerSummary(@Param("customerId") String customerId, + @Param("dateId") String dateId); + + /** + * 批量插入 + * + * @param list + * @param customerId + * @param dateId 日期Id, 数据更新至:yyyyMMdd + * @return void + * @Author zhangyong + * @Date 16:17 2020-09-09 + **/ + void batchInsertVolunteerSummary(@Param("list") List list, @Param("customerId")String customerId, + @Param("dateId")String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java new file mode 100644 index 0000000000..1cda08cfa7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActSummaryDailyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-活动各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_act_summary_daily") +public class ScreenKcActSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + + /** + * 参与人次 + */ + private Integer partiUserCount; + + /** + * 发放积分 + */ + private Integer rewardPointCount; + + /** + * 公益时长单位分钟 + */ + private Integer heartTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.java new file mode 100644 index 0000000000..86c991a114 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcActTrendMonthlyEntity.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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-活动(次数+时长)趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_act_trend_monthly") +public class ScreenKcActTrendMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 活动数量(本月举行的活动) + */ + private Integer actCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.java new file mode 100644 index 0000000000..8247c51d97 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupDetailGridDailyEntity.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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-小组详情(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_group_detail_grid_daily") +public class ScreenKcGroupDetailGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小组id + */ + private String groupId; + + /** + * 群名称 + */ + private String groupName; + + /** + * 群主名称 + */ + private String groupLeader; + + /** + * 群成员数 + */ + private Integer memberCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 转为议题的话题数 + */ + private Integer shifitIssueCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java new file mode 100644 index 0000000000..8f29a2829e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcGroupSummaryGridDailyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-小组分析各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_group_summary_grid_daily") +public class ScreenKcGroupSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 群成员总数 + */ + private Integer memberCount; + + /** + * 话题数量 + */ + private Integer topicCount; + + /** + * 话题参与量 + */ + private Integer partiCount; + + /** + * 话题转议题总数 + */ + private Integer shiftIssueCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java new file mode 100644 index 0000000000..2d22bf38b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueSummaryGridDailyEntity.java @@ -0,0 +1,126 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_issue_summary_grid_daily") +public class ScreenKcIssueSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..85f9cd9d2c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_issue_trend_grid_monthly") +public class ScreenKcIssueTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java new file mode 100644 index 0000000000..364a95575a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsCategoryAnalysisEntity.java @@ -0,0 +1,81 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻-按类别统计(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_category_analysis") +public class ScreenKcNewsCategoryAnalysisEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 新闻的数量 + */ + private Integer newsCount; + + /** + * 阅读的数量 + */ + private Integer readCount; + + /** + * 点赞的数量 + */ + private Integer likeCount; + + /** + * 点踩的数量 + */ + private Integer disLikeCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.java new file mode 100644 index 0000000000..5b41cfbe2f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsRankEntity.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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-热点新闻排行-(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_rank") +public class ScreenKcNewsRankEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 新闻id + */ + private String newsId; + + /** + * 新闻标题 + */ + private String newsTitle; + + /** + * 新闻热点值 + */ + private Integer hotCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java new file mode 100644 index 0000000000..d344db9ad2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsSummaryDailyEntity.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻-各类总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_summary_daily") +public class ScreenKcNewsSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 文章总数 + */ + private Integer newsCount; + + /** + * 阅读量 + */ + private Integer readCount; + + /** + * 点赞量 + */ + private Integer likeCount; + + /** + * 评论量 + */ + private Integer commentCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java new file mode 100644 index 0000000000..548d34f284 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-新闻参与趋势-(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_news_trend_monthly") +public class ScreenKcNewsTrendMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 参与数量 + */ + private Integer partiCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java new file mode 100644 index 0000000000..2f9c5343c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcPlatformSummaryDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-平台各汇总值(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_platform_summary_daily") +public class ScreenKcPlatformSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格总数 + */ + private Integer gridCount; + + /** + * 已开通网格数 + */ + private Integer openedGridCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 用户总数 + */ + private Integer userCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 社群总数 + */ + private Integer groupCount; + + /** + * 话题总数 + */ + private Integer topicCount; + + /** + * 新闻数量 + */ + private Integer newsCount; + + /** + * 阅读数量 + */ + private Integer readCount; + + /** + * 公益活动总数 + */ + private Integer actCount; + + /** + * 志愿者总数 + */ + private Integer volunteerCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java new file mode 100644 index 0000000000..3307b3dcfa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java @@ -0,0 +1,86 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目按分类统计上报总数(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_category_grid_daily") +public class ScreenKcProjectCategoryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 类别id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 项目数量 + */ + private Integer projectCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java new file mode 100644 index 0000000000..be5d16142e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyEntity.java @@ -0,0 +1,86 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目满意度分析(customerId+monthId先删除记录,再插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_satis_grid_monthly") +public class ScreenKcProjectSatisGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 非常满意项目总数 + */ + private Integer greatSatis; + + /** + * 满意项目总数 + */ + private Integer goodSatis; + + /** + * 不满意的项目总数 + */ + private Integer disSatis; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java new file mode 100644 index 0000000000..85a387c49b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectSummaryGridDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_project_summary_grid_daily") +public class ScreenKcProjectSummaryGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 项目总数 + */ + private Integer projectCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 流转次数 + */ + private Integer moveCount; + + /** + * 已结案数量 + */ + private Integer closedCaseCount; + + /** + * 项目浏览数 + */ + private Integer projectViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 平均结案时间 单位分钟 ? + */ + private Integer avgClosedCaseTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..0f0a5b4e6c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-话题参与趋势(先根据customerId+monthId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_topic_trend_grid_monthly") +public class ScreenKcTopicTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java new file mode 100644 index 0000000000..03f18a5709 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_heat_rank_grid_daily") +public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 1志愿者 0不是志愿者 + */ + private Integer volunteerFlag; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; + + /** + * 积分 + */ + private Integer points; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java new file mode 100644 index 0000000000..6c47a97487 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserSummaryDailyEntity.java @@ -0,0 +1,126 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户分析(先根据customerId+dateId删除,后插入) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_summary_daily") +public class ScreenKcUserSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 浏览用户(首页的用户总数,原型上首页是叫注册用户) + */ + private Integer visitorCount; + + /** + * 注册用户=居民数量 + */ + private Integer regUserCount; + + /** + * 党员用户 + */ + private Integer partyUserCount; + + /** + * 小于20岁的党员总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的党员总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的党员总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的党员总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的党员总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的党员总人数 + */ + private Integer ageLevel6; + + /** + * 党员中男性总人数 + */ + private Integer malePartyUserCount; + + /** + * 党员中女性总人数 + */ + private Integer femalePartyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java new file mode 100644 index 0000000000..70b51169da --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserTrendGridMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-用户趋势分析(根据monthId+customerId先删后增) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_user_trend_grid_monthly") +public class ScreenKcUserTrendGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 本月内新增用户数量 + */ + private Integer regUserCount; + + /** + * 本月内新增党员数量 + */ + private Integer partyUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java new file mode 100644 index 0000000000..73e7d8da06 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java @@ -0,0 +1,86 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-志愿者公益时长排名(先根据customerId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_volunteer_heat_rank_grid_daily") +public class ScreenKcVolunteerHeatRankGridDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 用户id + */ + private String userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 爱心时长 单位分钟 + */ + private Integer heartTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java new file mode 100644 index 0000000000..dc3f16f2c0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerSummaryDailyEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity.evaluationindex.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * KC-志愿者汇总(先根据customerId+dateId删除) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_kc_volunteer_summary_daily") +public class ScreenKcVolunteerSummaryDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount; + + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java new file mode 100644 index 0000000000..492a951156 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java @@ -0,0 +1,260 @@ +package com.epmet.service.evaluationindex.screen; + +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; + +/** + * 大屏数据采集api - kc + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface KcScreenCollService { + + /** + * 1、首页-平台各类总数上报 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 2、议题分析-各类总数 + * 当isFirst为true时,后台先按照customerId+dateId,清空数据,再插入。 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 3、议题分析-参与趋势 + * 当isFirst为true时,customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 4、用户分析-各类总数 + * 当isFirst为true时根据customerId+dateId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertUserSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 5、公益互助-志愿者公益时长排名 + * 当isFirst为true时根据customerId删除,后插入 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 6、用户分析-用户趋势 + * 当isFirst为true时,根据monthId+customerId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 7、公益互助-活动各类总数 + * 当isFirst为true时,根据customerId+dateId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertActSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 8、公益互助-活动次数趋势 + * 当isFirst为true时,根据customerId+monthId先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertActTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 9、公益互助-志愿者画像 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 10、项目分析-各类总数 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 11、项目分析-按分类统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 12、项目分析-满意度分析 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId); + + /** + * 13、党建声音-新闻各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 14、党建声音-新闻阅读参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId); + + /** + * 15、党建声音-热度新闻排行 + * 当isFirst为true时,根据 customerId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId); + + /** + * 16、党建声音-新闻按类别统计 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId); + + /** + * 17、邻里党群-各类总数汇总 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId); + + /** + * 18、邻里党群-小组详情 + * 当isFirst为true时,根据 customerId+dateId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId); + + /** + * 19、邻里党群-话题参与趋势 + * 当isFirst为true时,根据 customerId+monthId 先删后增 + * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false + * + * @param formDTO + * @param customerId + * @return void + * @Author zhangyong + * @Date 15:57 2020-09-09 + **/ + void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java new file mode 100644 index 0000000000..a7635d7aeb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java @@ -0,0 +1,367 @@ +/** + * 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.epmet.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.screen.*; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.evaluationindex.screen.KcScreenCollService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +/** + * 大屏数据采集 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class KcScreenCollServiceImpl implements KcScreenCollService { + + @Autowired + private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; + @Autowired + private ScreenKcIssueSummaryGridDailyDao screenKcIssueSummaryGridDailyDao; + @Autowired + private ScreenKcIssueTrendGridMonthlyDao screenKcIssueTrendGridMonthlyDao; + @Autowired + private ScreenKcUserSummaryDailyDao screenKcUserSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcUserTrendGridMonthlyDao screenKcUserTrendGridMonthlyDao; + @Autowired + private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; + @Autowired + private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; + @Autowired + private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; + @Autowired + private ScreenKcProjectSummaryGridDailyDao screenKcProjectSummaryGridDailyDao; + @Autowired + private ScreenKcProjectCategoryGridDailyDao screenKcProjectCategoryGridDailyDao; + @Autowired + private ScreenKcProjectSatisGridMonthlyDao screenKcProjectSatisGridMonthlyDao; + @Autowired + private ScreenKcNewsSummaryDailyDao screenKcNewsSummaryDailyDao; + @Autowired + private ScreenKcNewsTrendMonthlyDao screenKcNewsTrendMonthlyDao; + @Autowired + private ScreenKcNewsRankDao screenKcNewsRankDao; + @Autowired + private ScreenKcNewsCategoryAnalysisDao screenKcNewsCategoryAnalysisDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcPlatformSummaryDailyDao.deletePlatFormSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcPlatformSummaryDailyDao.batchInsertPlatFormSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcIssueSummaryGridDailyDao.deleteIssueSummaryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcIssueSummaryGridDailyDao.batchInsertIssueSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcIssueTrendGridMonthlyDao.deleteIssueTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcIssueTrendGridMonthlyDao.batchInsertIssueTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcUserSummaryDailyDao.deleteUserSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcUserSummaryDailyDao.batchInsertUserSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcVolunteerHeatRankGridDailyDao.deleteVolunteerHeatRankGrid(customerId); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcVolunteerHeatRankGridDailyDao.batchInsertVolunteerHeatRankGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcUserTrendGridMonthlyDao.deleteUserTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcUserTrendGridMonthlyDao.batchInsertUserTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertActSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcActSummaryDailyDao.deleteActSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcActSummaryDailyDao.batchInsertActSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertActTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcActTrendMonthlyDao.deleteActTrend(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcActTrendMonthlyDao.batchInsertActTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcVolunteerSummaryDailyDao.deleteVolunteerSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcVolunteerSummaryDailyDao.batchInsertVolunteerSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectSummaryGridDailyDao.deleteProjectSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectSummaryGridDailyDao.batchInsertProjectSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectCategoryGridDailyDao.deleteCategoryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectCategoryGridDailyDao.batchInsertCategoryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcProjectSatisGridMonthlyDao.deleteProjectSatisGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcProjectSatisGridMonthlyDao.batchInsertProjectSatisGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsSummaryDailyDao.deleteNewsSummary(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsSummaryDailyDao.batchInsertNewsSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsTrendMonthlyDao.deleteNewsTrend(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsTrendMonthlyDao.batchInsertNewsTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsRankDao.deleteNewsRank(customerId); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsRankDao.batchInsertNewsRank(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcNewsCategoryAnalysisDao.deleteNewsCategoryAnalysis(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcNewsCategoryAnalysisDao.batchInsertNewsCategoryAnalysis(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcGroupSummaryGridDailyDao.deleteGroupSummaryGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcGroupSummaryGridDailyDao.batchInsertGroupSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcGroupDetailGridDailyDao.deleteGroupDetailGrid(customerId, formDTO.getDateId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcGroupDetailGridDailyDao.batchInsertGroupDetailGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + } + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = screenKcTopicTrendGridMonthlyDao.deleteTopicTrendGrid(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + screenKcTopicTrendGridMonthlyDao.batchInsertTopicTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + } + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml new file mode 100644 index 0000000000..149c94e075 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_act_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_act_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + ACT_COUNT, + VOLUNTEER_COUNT, + PARTI_USER_COUNT, + REWARD_POINT_COUNT, + HEART_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.actCount}, + #{item.volunteerCount}, + #{item.partiUserCount}, + #{item.rewardPointCount}, + #{item.heartTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml new file mode 100644 index 0000000000..b8762aa572 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActTrendMonthlyDao.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + delete from screen_kc_act_trend_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_act_trend_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + ACT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.actCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml new file mode 100644 index 0000000000..e7cf3fa2cd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_group_detail_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_group_detail_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GROUP_ID, + GROUP_NAME, + GROUP_LEADER, + MEMBER_COUNT, + TOPIC_COUNT, + SHIFIT_ISSUE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.groupId}, + #{item.groupName}, + #{item.groupLeader}, + #{item.memberCount}, + #{item.topicCount}, + #{item.shifitIssueCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml new file mode 100644 index 0000000000..833ca38965 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_group_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_group_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GROUP_COUNT, + MEMBER_COUNT, + TOPIC_COUNT, + PARTI_COUNT, + SHIFT_ISSUE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.groupCount}, + #{item.memberCount}, + #{item.topicCount}, + #{item.partiCount}, + #{item.shiftIssueCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml new file mode 100644 index 0000000000..57055dfcba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_issue_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_issue_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REPORT_COUNT, + ISSUE_COUNT, + PENDING_COUNT, + REJECTED_COUNT, + PROCESSING_COUNT, + CLOSED_COUNT, + ISSUE_VIEW_COUNT, + VOTE_COUNT, + PASSED_COUNT, + SHIFT_TO_PROJECT_COUNT, + AVG_AUDIT_TIME, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.reportCount}, + #{item.issueCount}, + #{item.pendingCount}, + #{item.rejectedCount}, + #{item.processingCount}, + #{item.closedCount}, + #{item.issueViewCount}, + #{item.voteCount}, + #{item.passedCount}, + #{item.shiftToProjectCount}, + #{item.avgAuditTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..1957824176 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueTrendGridMonthlyDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_issue_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_issue_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REPORT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.reportCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml new file mode 100644 index 0000000000..38d1b6cda4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_category_analysis + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_news_category_analysis + ( + ID, + CUSTOMER_ID, + DATE_ID, + + CATEGORY_ID, + CATEGORY_NAME, + NEWS_COUNT, + READ_COUNT, + LIKE_COUNT, + DIS_LIKE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.categoryId}, + #{item.categoryName}, + #{item.newsCount}, + #{item.readCount}, + #{item.likeCount}, + #{item.disLikeCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml new file mode 100644 index 0000000000..08886ea7d2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsRankDao.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_rank + where CUSTOMER_ID = #{customerId} + limit 1000; + + + + insert into screen_kc_news_rank + ( + ID, + CUSTOMER_ID, + DATE_ID, + NEWS_ID, + NEWS_TITLE, + HOT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.newsId}, + #{item.newsTitle}, + #{item.hotCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml new file mode 100644 index 0000000000..9a29f845d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_news_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + NEWS_COUNT, + READ_COUNT, + LIKE_COUNT, + COMMENT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.newsCount}, + #{item.readCount}, + #{item.likeCount}, + #{item.commentCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml new file mode 100644 index 0000000000..5ec689ebc0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_news_trend_monthly + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_news_trend_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + READ_COUNT, + PARTI_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.readCount}, + #{item.partiCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml new file mode 100644 index 0000000000..ea2ca56f7d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_platform_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_platform_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + GRID_COUNT, + OPENED_GRID_COUNT, + ISSUE_COUNT, + PROJECT_COUNT, + USER_COUNT, + PARTY_USER_COUNT, + GROUP_COUNT, + TOPIC_COUNT, + NEWS_COUNT, + READ_COUNT, + ACT_COUNT, + VOLUNTEER_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridCount}, + #{item.openedGridCount}, + #{item.issueCount}, + #{item.projectCount}, + #{item.userCount}, + #{item.partyUserCount}, + #{item.groupCount}, + #{item.topicCount}, + #{item.newsCount}, + #{item.readCount}, + #{item.actCount}, + #{item.vounteerCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml new file mode 100644 index 0000000000..a285d083b3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_category_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_project_category_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + CATEGORY_ID, + CATEGORY_NAME, + PROJECT_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.categoryId}, + #{item.categoryName}, + #{item.projectCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml new file mode 100644 index 0000000000..1147f687d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_satis_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_project_satis_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + GREAT_SATIS, + GOOD_SATIS, + DIS_SATIS, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.greatSatis}, + #{item.goodSatis}, + #{item.disSatis}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml new file mode 100644 index 0000000000..614ffac3af --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_project_summary_grid_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_project_summary_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + PROJECT_COUNT, + PROCESSING_COUNT, + CLOSED_COUNT, + MOVE_COUNT, + CLOSED_CASE_COUNT, + PROJECT_VIEW_COUNT, + VOTE_COUNT, + AVG_CLOSED_CASE_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.projectCount}, + #{item.processingCount}, + #{item.closedCount}, + #{item.moveCount}, + #{item.closedCaseCount}, + #{item.projectViewCount}, + #{item.voteCount}, + #{item.avgClosedCaseTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..868d8b70ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcTopicTrendGridMonthlyDao.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_topic_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_topic_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + TOPIC_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.topicCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml new file mode 100644 index 0000000000..a8a3c2eff3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml new file mode 100644 index 0000000000..d1c0e9dea2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_user_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_user_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + VISITOR_COUNT, + REG_USER_COUNT, + PARTY_USER_COUNT, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + MALE_PARTY_USER_COUNT, + FEMALE_PARTY_USER_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.visitorCount}, + #{item.regUserCount}, + #{item.partyUserCount}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + #{item.malePartyUserCount}, + #{item.femalePartyUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..fda42e28ae --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserTrendGridMonthlyDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_user_trend_grid_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + limit 1000; + + + + insert into screen_kc_user_trend_grid_monthly + ( + ID, + CUSTOMER_ID, + MONTH_ID + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + REG_USER_COUNT, + PARTY_USER_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{monthId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.regUserCount}, + #{item.partyUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml new file mode 100644 index 0000000000..8edba81c44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_volunteer_heat_rank_grid_daily + where CUSTOMER_ID = #{customerId} + limit 1000; + + + + insert into screen_kc_volunteer_heat_rank_grid_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + USER_ID, + USER_NAME, + HEART_TIME, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.userId}, + #{item.userName}, + #{item.heartTime}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml new file mode 100644 index 0000000000..414ae85ecb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_kc_volunteer_summary_daily + where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + limit 1000; + + + + insert into screen_kc_volunteer_summary_daily + ( + ID, + CUSTOMER_ID, + DATE_ID, + + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + ALL_PARENT_IDS, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + MALE_COUNT, + FEMALE_COUNT, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.allParentIds}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + #{item.maleCount}, + #{item.femaleCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + From 710ba5f6bc1c9d568db1b7a7ffd637febdced54a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 10 Sep 2020 14:34:54 +0800 Subject: [PATCH 022/150] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8sql?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml | 2 +- .../mapper/evaluationindex/indexcal/DeptSubScoreDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index d17f344e40..e6dff25c3d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -91,7 +91,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, + #{item.customerId}, #{item.deptId}, #{item.agencyId}, #{item.quarterId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml index a20c5311e1..270477f93d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml @@ -26,7 +26,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, + #{item.customerId}, #{item.deptId}, #{item.agencyId}, #{item.quarterId}, From 6a26632af9ec5715e87b57b0f1f632ec82f48c56 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 10 Sep 2020 14:42:50 +0800 Subject: [PATCH 023/150] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=99=BB=E9=99=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=EF=BC=88?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=EF=BC=89,=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CustomerStaffServiceImpl.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 72f9c416b2..ec85e7b960 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -626,23 +626,25 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); - if (!customerInfo.success()) { - logger.error(String.format("获取根管理员信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); - } else { - if (null != customerInfo.getData()){ - CustomerListResultDTO resultDTO = new CustomerListResultDTO(); - resultDTO.setCustomerId(customerInfo.getData().getId()); - resultDTO.setCustomerName(customerInfo.getData().getCustomerName()); - listResultDTO.add(resultDTO); - } - } - } + if (null != roleKey){ + // 3.根据roleId + staff_id(即 userId) 查 staff_role表的主键id, 如果查到了,那这个userId就是 根管理员 + StaffRoleDTO staffRoleDTO = staffRoleDao.selectStaffRoleByStaffIdAndRoleId(staffDTO.getUserId(), roleKey.getId()); + if (null != staffRoleDTO){ + // 4.如果userID是根管理员的话,则根据customerId 去 customer表 查询 id、customer_name + customerDTO.setId(staffDTO.getCustomerId()); + Result customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); + if (!customerInfo.success()) { + logger.error(String.format("获取根管理员信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); + } else { + if (null != customerInfo.getData()){ + CustomerListResultDTO resultDTO = new CustomerListResultDTO(); + resultDTO.setCustomerId(customerInfo.getData().getId()); + resultDTO.setCustomerName(customerInfo.getData().getCustomerName()); + listResultDTO.add(resultDTO); + } + } + } + } } return new Result>().ok(listResultDTO); } From 6f5f48b8acd68102012e9dd4db78a685ed91a47e Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 14:58:16 +0800 Subject: [PATCH 024/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=9B=E5=85=88=E5=85=A8=E9=83=A8=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20=E5=9C=A8=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/CpcScoreDao.java | 2 +- .../indexcal/CpcSubScoreDao.java | 2 +- .../impl/CpcIndexCalculateServiceImpl.java | 65 +++++++++++++------ .../evaluationindex/indexcal/CpcScoreDao.xml | 14 ++-- .../indexcal/CpcSubScoreDao.xml | 10 +-- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index f4aac59361..a5469cbb79 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -78,7 +78,7 @@ public interface CpcScoreDao extends BaseDao { **/ BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId); - int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("deleteSize") Integer deleteSize, @Param("isTotal") String isTotal); List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java index 54226d0cc7..cb9b840d60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java @@ -79,7 +79,7 @@ public interface CpcSubScoreDao extends BaseDao { **/ BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId); - int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode, @Param("deleteSize") Integer deleteSize); List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 139353e83c..d7d1beb909 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.support.normalizing.batch.CalculateResult; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -36,7 +37,10 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Slf4j @@ -95,7 +99,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - totalEntity.setScore(new BigDecimal(0)); + totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); totalEntity.setAllParentIndexCode(indexGroupDetailEntity.getAllParentIndexCode()); cpcScoreTotalMap.put(userId, totalEntity); } @@ -105,7 +109,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(totalEntity.getScore().add(total)); } }); - deleteAndInsertBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + //删除总分 然后插入 + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); } /** @@ -140,10 +146,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param indexCode 指标code 非必填 * @param values */ - @Transactional(rollbackFor = Exception.class) - private void deleteAndInsertBatch(CalculateCommonFormDTO formDTO, Collection values, String indexCode) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); - cpcScoreDao.insertBatch(values); + public void insertCpcScoreBatch(CalculateCommonFormDTO formDTO, List values, String indexCode) { + if (CollectionUtils.isEmpty(values)) { + log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); + return; + } + List> partition = ListUtils.partition(values, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> cpcScoreDao.insertBatch(list)); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { @@ -161,9 +170,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } int pageNo = NumConstant.ONE; - int pageSize = NumConstant.ONE_THOUSAND; + int pageSize = IndexCalConstant.PAGE_SIZE; //分页查询 要计算的原始数据 List> list = null; + groupIndexDetailsMap.keySet().forEach(indexCode -> { + deleteOldData(formDTO, indexCode); + }); do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { @@ -178,6 +190,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } + @Transactional(rollbackFor = Exception.class) + public void deleteOldData(CalculateCommonFormDTO formDTO, String indexCode) { + int effectRow; + do { + effectRow = cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, IndexCalConstant.DELETE_SIZE, NumConstant.ZERO_STR); + } while (effectRow > NumConstant.ZERO); + effectRow = NumConstant.ZERO; + do { + //删除 党员相关:(参与议事等4级指标的 明细数据) + String allParentCode = IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode().concat(StrConstant.COLON).concat(indexCode); + effectRow = cpcSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), allParentCode, IndexCalConstant.DELETE_SIZE); + } while (effectRow > NumConstant.ZERO); + } + /** * desc:计算并保存中间结果 * @@ -213,7 +239,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setUserId(userId); cpcScoreEntity.setIsTotal(NumConstant.ZERO_STR); cpcScoreEntity.setMonthId(formDTO.getMonthId()); - cpcScoreEntity.setScore(new BigDecimal(0)); + cpcScoreEntity.setScore(new BigDecimal(NumConstant.ZERO)); cpcScoreEntity.setIndexCode(parentIndexCode); cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode()); scoreEntityMap.put(userId, cpcScoreEntity); @@ -243,7 +269,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param parentIndexCode * @param result */ - @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { List list = new ArrayList<>(); @@ -254,8 +279,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { CalculateResult score = entry.getValue(); CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score.getTotalScore()); - allParentIndexCode = score.getDetails().get(0).getAllParentIndexCode(); - cpcScoreEntity.setAllParentIndexCode(allParentIndexCode.substring(0, allParentIndexCode.lastIndexOf(StrConstant.COLON))); + allParentIndexCode = score.getDetails().get(NumConstant.ZERO).getAllParentIndexCode(); + cpcScoreEntity.setAllParentIndexCode(allParentIndexCode.substring(NumConstant.ZERO, allParentIndexCode.lastIndexOf(StrConstant.COLON))); list.add(cpcScoreEntity); CpcScoreEntity parent = ConvertUtils.sourceToTarget(cpcScoreEntity, CpcScoreEntity.class); score.getDetails().forEach(o -> { @@ -267,9 +292,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { }); } - System.out.println("value:" + JSON.toJSONString(list)); - this.deleteAndInsertBatch(formDTO, list, parentIndexCode); - this.deleteAndInsertSubBatch(formDTO, subList, allParentIndexCode); + this.insertCpcScoreBatch(formDTO, list, parentIndexCode); + this.insertCpcSubScoreBatch(formDTO, subList, allParentIndexCode); } /** @@ -279,10 +303,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @param subList * @param parentIndexCode 指标code 非必填 */ - @Transactional(rollbackFor = Exception.class) - public void deleteAndInsertSubBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { - cpcSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); - cpcSubScoreDao.insertBatch(subList); + public void insertCpcSubScoreBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { + if (CollectionUtils.isEmpty(subList)) { + log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); + return; + } + List> partition = ListUtils.partition(subList, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> cpcSubScoreDao.insertBatch(list)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 13c69b8957..7f6505b70a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -6,11 +6,15 @@ delete from fact_index_cpc_score where - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - and MONTH_ID = #{monthId,jdbcType=VARCHAR} - - and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + AND IS_TOTAL = #{isTotal,jdbcType=VARCHAR} + + and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + + limit #{deleteSize,jdbcType=INTEGER} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml index b1e069bab2..eb6e291f37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml @@ -6,10 +6,12 @@ delete from fact_index_cpc_sub_score where - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - and MONTH_ID = #{monthId,jdbcType=VARCHAR} - and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR} - + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + and MONTH_ID = #{monthId,jdbcType=VARCHAR} + and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR} + + limit #{deleteSize,jdbcType=INTEGER} + From 3687272c2cb2e229f694a9157b980fc83df1b6be Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Sep 2020 15:13:24 +0800 Subject: [PATCH 025/150] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=20?= =?UTF-8?q?=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencyScoreDao.java | 2 +- .../indexcal/AgencySubScoreDao.java | 2 +- .../indexcal/CommunityScoreDao.java | 2 +- .../indexcal/CommunitySubScoreDao.java | 2 +- .../IndexCalculateCommunityServiceImpl.java | 34 +++++++++++++--- .../IndexCalculateDistrictServiceImpl.java | 40 +++++++++++++++---- .../impl/IndexCalculateStreetServiceImpl.java | 40 +++++++++++++++---- .../indexcal/AgencyScoreDao.xml | 1 + .../indexcal/AgencySubScoreDao.xml | 1 + .../indexcal/CommunityScoreDao.xml | 1 + .../indexcal/CommunitySubScoreDao.xml | 1 + 11 files changed, 100 insertions(+), 26 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index d97a697f7b..fa9ae610f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -51,7 +51,7 @@ public interface AgencyScoreDao extends BaseDao { * @author zxc * @date 2020/9/2 15:47 */ - void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType); + Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType,@Param("delNum")Integer delNum); /** * @Description 查询【fact_index_agency_score】相关信息 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java index 906ef53470..970b671a7f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java @@ -50,6 +50,6 @@ public interface AgencySubScoreDao extends BaseDao { * @author zxc * @date 2020/9/2 15:47 */ - void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType); + Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType,@Param("delNum")Integer delNum); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index ab1439481e..4df07097d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -50,7 +50,7 @@ public interface CommunityScoreDao extends BaseDao o.getScore()).collect(Collectors.toList())); - Integer indexEnd = NumConstant.TEN; - List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd); + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); subPartyAvgList.forEach(party -> { List index1SampleValues = new ArrayList<>(); party.forEach(c -> { @@ -141,8 +140,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); - communitySubScoreDao.deleteOldRecord(customerId,monthId); - factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId); + deleteOldRecord(customerId,monthId); deleteAndInsert(result); return true; } @@ -385,13 +383,37 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Transactional(rollbackFor = Exception.class) public void deleteAndInsert(CommunityCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneLevel())) { - factIndexCommunityScoreDao.insertCommunityPartyRecord(result.getOneLevel()); + List> partition = ListUtils.partition(result.getOneLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + factIndexCommunityScoreDao.insertCommunityPartyRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - communitySubScoreDao.insertCommunityPartyRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + communitySubScoreDao.insertCommunityPartyRecord(p); + }); } } + /** + * @Description + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId){ + Integer num; + do { + num = factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = communitySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param scoreCountOfSampleId 指标计算结果 * @param customerId 客户ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 4f6d07669b..0440fd84fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -165,9 +165,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - agencyScoreDao.deleteOldRecord(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); - agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); - deleteAndInsert(result); + deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); + insertDetail(result); return true; } @@ -236,7 +235,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -286,7 +285,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -347,6 +346,25 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict return result; } + /** + * @Description + * @param customerId + * @param monthId + * @param dataType 数据类型 (街道:street,全区:district) + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId,String dataType){ + Integer num; + do { + num = agencyScoreDao.deleteOldRecord(customerId, monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = agencySubScoreDao.deleteOldRecord(customerId,monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param result * @Description 先删除记录,在插入 @@ -354,12 +372,18 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(AgencyCalResultDTO result) { + public void insertDetail(AgencyCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneTwoLevel())){ - agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + List> partition = ListUtils.partition(result.getOneTwoLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencyScoreDao.insertStreetRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencySubScoreDao.insertStreetRecord(p); + }); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 1d9757041f..d556a24894 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -168,9 +168,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetPartyAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - agencySubScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.STREET_LEVEL); - agencyScoreDao.deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); - deleteAndInsert(result); + deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); + insertDetail(result); return true; } @@ -244,7 +243,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -318,7 +317,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); - deleteAndInsert(result); + insertDetail(result); return true; } @@ -384,15 +383,40 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @date 2020/9/1 4:24 下午 */ @Transactional(rollbackFor = Exception.class) - public void deleteAndInsert(AgencyCalResultDTO result) { + public void insertDetail(AgencyCalResultDTO result) { if (!CollectionUtils.isEmpty(result.getOneTwoLevel())) { - agencyScoreDao.insertStreetRecord(result.getOneTwoLevel()); + List> partition = ListUtils.partition(result.getOneTwoLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencyScoreDao.insertStreetRecord(p); + }); } if (!CollectionUtils.isEmpty(result.getFiveLevel())){ - agencySubScoreDao.insertStreetRecord(result.getFiveLevel()); + List> partition = ListUtils.partition(result.getFiveLevel(), IndexCalConstant.INSERT_SIZE); + partition.forEach(p -> { + agencySubScoreDao.insertStreetRecord(p); + }); } } + /** + * @Description + * @param customerId + * @param monthId + * @param dataType 数据类型 (街道:street,全区:district) + * @author zxc + * @date 2020/9/10 2:50 下午 + */ + public void deleteOldRecord(String customerId,String monthId,String dataType){ + Integer num; + do { + num = agencyScoreDao.deleteOldRecord(customerId, monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (num != NumConstant.ZERO); + Integer subNum; + do { + subNum = agencySubScoreDao.deleteOldRecord(customerId,monthId,dataType,IndexCalConstant.DELETE_SIZE); + }while (subNum != NumConstant.ZERO); + } + /** * @param scoreCountOfSampleId 指标计算结果 * @param customerId 客户ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 45768cdde6..a0c7f2cdae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -41,6 +41,7 @@ AND customer_id = #{customerId} AND month_id = #{monthId} AND data_type = #{dataType} + LIMIT #{delNum} + SELECT + m.DEPT_ID, + m.CUSTOMER_ID, + m.AGENCY_ID, + m.QUARTER_ID, + m.YEAR_ID, + m.MONTH_ID, + m.IS_TOTAL, + M.SCORE, + M.INDEX_CODE + FROM + fact_index_dept_score m + WHERE + m.DEL_FLAG = '0' + AND m.IS_TOTAL='0' + AND m.CUSTOMER_ID =#{customerId} + AND m.MONTH_ID =#{monthId} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml index 270477f93d..21ca50b196 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml @@ -46,11 +46,13 @@ - + delete from fact_index_dept_sub_score where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} and ALL_PARENT_INDEX_CODE=#{allParentIndexCode} - limit #{deleteSize} + + limit #{deleteSize} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index b0970024c6..9fd9adbb43 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -24,7 +24,7 @@ - + DELETE FROM fact_index_grid_score @@ -32,7 +32,9 @@ CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND INDEX_CODE = #{indexCode} - limit #{deleteNum} + + limit #{deleteSize} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml index 85f66f9009..7111976b9d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml @@ -49,7 +49,7 @@ - + DELETE FROM fact_index_grid_sub_score @@ -57,6 +57,8 @@ CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND ALL_PARENT_INDEX_CODE = #{allParentIndexCode} - limit #{deleteSize} + + limit #{deleteSize} + \ No newline at end of file From de4c426f12c782a557635193748ed6964a71e30f Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 10 Sep 2020 19:59:35 +0800 Subject: [PATCH 037/150] =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateCommunityServiceImpl.java | 2 +- .../IndexCalculateDistrictServiceImpl.java | 19 ++++++++++++------- .../impl/IndexCalculateStreetServiceImpl.java | 6 +++--- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index a366daf0af..7673575b37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -240,7 +240,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridServiceAvg)) { log.error("查询社区下级所有网格服务能力得分平均值集合为空"); - return; + //todo return; } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 2545dc4da1..d11a1e7df2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -210,6 +210,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(deptScoreAvgList)) { log.error("查询所有直属部门治理能力平均值集合为空"); + //return; } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); @@ -280,11 +281,13 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); - log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); - AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); - insertDetail(result); + if (!CollectionUtils.isEmpty(indexInputVOS)) { + HashMap scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); + log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); + AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); + insertDetail(result); + } return true; } @@ -413,7 +416,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict score.setAllParentIndexCode(allParentIndexCode); score.setDataType(IndexCalConstant.DISTRICT_LEVEL); pid.forEach((agency, parentAgency) -> { - if (k.equals(agency)) { + //todo 确认 + if (k != null && k.equals(agency)) { score.setParentAgencyId(parentAgency); } }); @@ -431,7 +435,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict s.setAllParentIndexCode(streetScore.getAllParentIndexCode()); s.setDataType(IndexCalConstant.DISTRICT_LEVEL); pid.forEach((agency, parentAgency) -> { - if (k.equals(agency)) { + //todo 确认 + if (k != null && k.equals(agency)) { s.setParentAgencyId(parentAgency); } }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index d556a24894..08afc2a9f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -118,7 +118,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { log.error(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); - return; + //todo return; } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexEnd = NumConstant.TEN; @@ -193,7 +193,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.error("查询街道下属所有社区治理能力汇总为空"); - return; + //todo return; }else if (subGridGovernAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -268,7 +268,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommServiceAvg)) { log.error("查询街道下属社区服务能力得分平均值为空"); - return; + //todo return; } else if (subCommServiceAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); From 43de268037bd23be5959b264d879024d7b94423e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 08:57:34 +0800 Subject: [PATCH 038/150] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/impl/DeptScoreServiceImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 027a7efe27..439cfa155a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -34,8 +34,6 @@ import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao; import com.epmet.dto.indexcal.*; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; -import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; -import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.eum.IndexCodeEnum; From 91650898d424791d1cc098374124a22c4304d9dc Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 11 Sep 2020 09:11:59 +0800 Subject: [PATCH 039/150] =?UTF-8?q?=E5=B8=82=E5=8C=97=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=EF=BC=8C=E5=85=9A=E5=91=98=E5=B9=B4=E9=BE=84=E5=88=86=E5=B8=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=B0=86=E4=BD=BF=E7=94=A8ParentId?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=94=B9=E6=88=90=E4=BD=BF=E7=94=A8OrgId?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=EF=BC=8C=E5=8F=AA=E6=9F=A5=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E6=9C=BA=E5=85=B3/=E7=BD=91=E6=A0=BC=E7=9A=84=E5=85=9A?= =?UTF-8?q?=E5=91=98=E5=B9=B4=E9=BE=84=E5=88=86=E5=B8=83=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml index fa89221e37..573c7501fa 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -15,7 +15,7 @@ screen_cpc_base_data WHERE DEL_FLAG = '0' - AND PARENT_ID = #{agencyId} + AND ORG_ID = #{agencyId} \ No newline at end of file From 3fc8b1d00d79a8c1f429f33fea3ceb8185b3e967 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 09:14:11 +0800 Subject: [PATCH 040/150] =?UTF-8?q?=E5=B8=82=E5=8C=97=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E5=85=A8=E9=83=A8=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E9=89=B4=E6=9D=83=E6=B3=A8=E8=A7=A3=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=B3=A8=E9=87=8A=E8=83=BD=E5=8A=9B=E5=80=BC?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 5 +++-- .../controller/screen/DistributionController.java | 11 ++++++----- .../controller/screen/GrassRootsGovernController.java | 11 ++++++----- .../screen/GrassrootsPartyDevController.java | 9 +++++---- .../datareport/controller/screen/IndexController.java | 11 ++++++----- .../controller/screen/PartyMemberLeadController.java | 11 ++++++----- .../controller/screen/ScreenProjectController.java | 3 ++- .../indexcal/impl/GridCorreLationServiceImpl.java | 5 +++-- 8 files changed, 37 insertions(+), 29 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index c6d6de4ce3..1828f19ac8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -35,7 +36,7 @@ public class AgencyController { * @author zxc * @date 2020/8/18 2:04 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("tree") public Result tree(HttpServletRequest request, ExternalAppRequestParam externalAppRequestParam){ String customerId = request.getHeader("CustomerId"); @@ -51,7 +52,7 @@ public class AgencyController { * @author zxc * @date 2020/8/18 2:33 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("compartment") public Result compartment(@RequestBody CompartmentFormDTO compartmentFormDTO){ ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentFormDTO.Compartment.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 248547cc4c..30f0f82584 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.DistributionService; @@ -32,7 +33,7 @@ public class DistributionController { * @author zxc * @date 2020/8/18 10:59 上午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("branch") public Result> branch(@RequestBody BranchFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); @@ -45,7 +46,7 @@ public class DistributionController { * @author zxc * @date 2020/8/18 11:10 上午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("user") public Result user(@RequestBody UserFormDTO userFormDTO){ ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class); @@ -58,7 +59,7 @@ public class DistributionController { * @author zxc * @date 2020/8/18 11:20 上午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("parymember") public Result parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){ ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class); @@ -71,7 +72,7 @@ public class DistributionController { * @author zxc * @date 2020/8/19 1:29 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("project") public Result> project(@RequestBody ProjectFormDTO projectFormDTO){ ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class); @@ -84,7 +85,7 @@ public class DistributionController { * @author zxc * @date 2020/8/19 1:52 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("topprofile") public Result topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){ ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java index 220fb0ca4a..1ee85baeb4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService; @@ -38,7 +39,7 @@ public class GrassRootsGovernController { * @author wangc * @date 2020.08.20 11:16 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("userpointrank") public Result userPointRank(@RequestBody AgencyAndNumFormDTO param){ ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); @@ -53,7 +54,7 @@ public class GrassRootsGovernController { * @author wangc * @date 2020.08.20 13:55 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("difficultprojects") public Result> difficultProject(@RequestBody AgencyNumTypeParamFormDTO param){ ValidatorUtils.validateEntity(param, AgencyNumTypeParamFormDTO.AgencyNumTypeParamGroup.class); @@ -68,7 +69,7 @@ public class GrassRootsGovernController { * @author wangc * @date 2020.08.20 14:37 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("publicpartiprofile") public Result publicPartiProfile(@RequestBody AgencyFormDTO param){ ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); @@ -83,7 +84,7 @@ public class GrassRootsGovernController { * @author wangc * @date 2020.08.20 15:32 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("publicpartirank") public Result> publicPartiRank(@RequestBody AgencyAndNumFormDTO param){ ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); @@ -98,7 +99,7 @@ public class GrassRootsGovernController { * @author wangc * @date 2020.08.20 17:46 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("governcapacityrank") public Result> governCapacityRank(@RequestBody AgencyAndNumFormDTO param){ ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java index 66b7555ac8..db7c83089f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; @@ -37,7 +38,7 @@ public class GrassrootsPartyDevController { * @author wangc * @date 2020.08.18 16:59 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("basicinfo") public Result baseInfo(@RequestBody ParymemberFormDTO param){ ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); @@ -52,7 +53,7 @@ public class GrassrootsPartyDevController { * @author wangc * @date 2020.08.18 17:54 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("ageinfo") public Result ageInfo(@RequestBody ParymemberFormDTO param){ ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); @@ -67,7 +68,7 @@ public class GrassrootsPartyDevController { * @author wangc * @date 2020.08.19 11:02 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("branchbuildtrend") public Result branchBuildTrend(@RequestBody BranchBuildTrendFormDTO param){ ValidatorUtils.validateEntity(param, BranchBuildTrendFormDTO.branchBuildTrendGroup.class); @@ -82,7 +83,7 @@ public class GrassrootsPartyDevController { * @author wangc * @date 2020.08.19 15:25 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("branchbuildrank") public Result branchBuildRank(@RequestBody BranchBuildRankFormDTO param){ ValidatorUtils.validateEntity(param, BranchBuildRankFormDTO.BranchBuildRankGroup.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index fea6239953..b2a6db2edf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.IndexService; @@ -35,7 +36,7 @@ public class IndexController { * @author zxc * @date 2020/8/19 2:53 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("yearaverageindex") public Result yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){ ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class); @@ -48,7 +49,7 @@ public class IndexController { * @author zxc * @date 2020/8/19 3:17 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("monthindexanalysis/piechart") public Result monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){ ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class); @@ -61,7 +62,7 @@ public class IndexController { * @author zxc * @date 2020/8/19 5:27 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("monthindexanalysis/barchart") public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){ ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); @@ -74,7 +75,7 @@ public class IndexController { * @author zxc * @date 2020/8/20 10:02 上午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("subagencyindexrank") public Result> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){ ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); @@ -89,7 +90,7 @@ public class IndexController { * @Author zhangyong * @Date 09:38 2020-09-08 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("dataclient/subagencyindexrank") public Result> anNingSubAgencyIndexRank(@RequestBody AnNingSubAgencyIndexRankFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AnNingSubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java index d3f4242013..5530fae8b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService; @@ -32,7 +33,7 @@ public class PartyMemberLeadController { * @author zxc * @date 2020/8/20 1:56 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("fineexample") public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){ ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class); @@ -45,7 +46,7 @@ public class PartyMemberLeadController { * @author zxc * @date 2020/8/20 2:35 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("contactmasslinechart") public Result contactMassLineChart(@RequestBody ContactMassLineChartFormDTO contactMassLineChartFormDTO){ ValidatorUtils.validateEntity(contactMassLineChartFormDTO, ContactMassLineChartFormDTO.ContactMassLineChart.class); @@ -58,7 +59,7 @@ public class PartyMemberLeadController { * @author zxc * @date 2020/8/20 3:19 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("volunteerservice") public Result volunteerService(@RequestBody VolunteerServiceFormDTO volunteerServiceFormDTO){ ValidatorUtils.validateEntity(volunteerServiceFormDTO, VolunteerServiceFormDTO.VolunteerService.class); @@ -73,7 +74,7 @@ public class PartyMemberLeadController { * @author wangc * @date 2020.08.21 11:05 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("advancedbranchrank") Result> advancedBranchRank(@RequestBody AgencyAndNumFormDTO param){ ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); @@ -88,7 +89,7 @@ public class PartyMemberLeadController { * @author wangc * @date 2020.08.21 14:22 **/ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("advancedpartymemberrank") Result> advancedPartymemberRank(@RequestBody AgencyAndNumFormDTO param){ ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index dc80b5178e..5417767ee6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; @@ -30,7 +31,7 @@ public class ScreenProjectController { * @author zxc * @date 2020/8/19 4:36 下午 */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("detail") public Result projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){ ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 710ebd735b..711d56c77f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -695,10 +695,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); gridScoreEntity.setScore(BigDecimal.ZERO); gridScoreEntity.setAllParentIndexCode(NumConstant.ZERO_STR); - if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { + /*if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; - } + }*/ + log.warn("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失"); for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { BigDecimal indexScore = gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); gridScoreEntity.setScore(gridScoreEntity.getScore().add(indexScore)); From bff80035881fb6ae789bf0a7971ec0f9bdaefe11 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 11 Sep 2020 09:15:39 +0800 Subject: [PATCH 041/150] =?UTF-8?q?gateway=E7=9A=84pom=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=86profile=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index e64e3f45c3..cef4109081 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -90,6 +90,8 @@ 8080 + dev + 0 192.168.1.130 @@ -206,6 +208,8 @@ 8080 + local + 0 192.168.1.130 @@ -322,6 +326,8 @@ 8080 + test + 0 r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com @@ -409,6 +415,8 @@ 8080 + prod + 0 r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com From 2444e10d078fb37ceb0cf666550d060f5f26f406 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 09:57:18 +0800 Subject: [PATCH 042/150] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E6=89=93=E5=8D=A1?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/resi/ResiActDetailResultDTO.java | 8 ++++++-- .../com/epmet/service/impl/ActInfoServiceImpl.java | 12 +++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java index 312d36843e..0f5033e02a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java @@ -139,9 +139,13 @@ public class ResiActDetailResultDTO implements Serializable { private Boolean isSignUp; /** - * 用户是否已报名该活动 true用户已报名;false用户未报名 + * 用户报名活动后,当前状态 + * --(已报名/待审核auditing, + * -- 审核通过passed, + * -- 未报名(审核不通过 或 取消报名)canceled, + * -- ) */ - private Boolean isRegistration; + private String isRegistration; /** * 打卡开始时间(yyyy-MM-dd HH:mm) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 9f3649d421..4f539675fb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -221,12 +221,18 @@ public class ActInfoServiceImpl extends BaseServiceImpl Date: Fri, 11 Sep 2020 09:57:26 +0800 Subject: [PATCH 043/150] =?UTF-8?q?=E5=A4=96=E9=83=A8=E5=BA=94=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E6=89=93=E5=BC=80token=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extappauth/aspect/ExternalAppRequestAuthAspect.java | 3 ++- .../epmet/utils/externalapp/ExtAppJwtAuthProcessor.java | 9 ++++----- .../epmet/utils/externalapp/ExtAppMD5AuthProcessor.java | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java b/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java index 82ffd68882..ec98b35d7b 100644 --- a/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java +++ b/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java @@ -63,7 +63,8 @@ public class ExternalAppRequestAuthAspect { throw new RenException("请求头中的token和appId不能为空"); } - logger.info("外部应用请求认证拦截Aspect执行,appId:{}, token:{}", appId, token); + logger.info("外部应用请求认证拦截Aspect执行,appId:{}, token:{}, ts:{}, customerId:{}, authType:{}", + appId, token, ts, customerId, authType); ExternalAppAuthFormDTO form = new ExternalAppAuthFormDTO(); form.setAppId(appId); diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java index 2ec771fd02..7330d1e3ae 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java @@ -45,11 +45,10 @@ public class ExtAppJwtAuthProcessor extends ExtAppAuthProcessor { return fillAuthResult(false, "access token不完整。", null); } - // TODO 暂时去掉时间差判断 - //if (!validTimeStamp(timestamp)) { - // logger.error("服务器存在时差过大,请求被拒绝"); - // return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null); - //} + if (!validTimeStamp(timestamp)) { + logger.error("extapp token已经超时,请求被拒绝"); + return fillAuthResult(false, "extapp token已经超时,请求被拒绝", null); + } if (!appId.equals(appIdIn)) { logger.error("AppId不对应,token外部的:{}, token内部解析出来的:{}", appId, appIdIn); diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java index 3954738758..b19e963f53 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java @@ -30,11 +30,10 @@ public class ExtAppMD5AuthProcessor extends ExtAppAuthProcessor { return fillAuthResult(false, "签名不匹配,认证失败", null); } - // TODO 暂时去掉时间差判断 - //if (!validTimeStamp(ts)) { - // logger.error("服务器存在时差过大,请求被拒绝"); - // return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null); - //} + if (!validTimeStamp(ts)) { + logger.error("extapp token已经超时,请求被拒绝"); + return fillAuthResult(false, "extapp token已经超时,请求被拒绝", null); + } return fillAuthResult(true, "签名匹配,认证成功", null); } From ecd133006e741caca05bf9bab6215f9559401e8d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 10:11:16 +0800 Subject: [PATCH 044/150] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/DeptScoreServiceImpl.java | 2 + .../impl/GridCorreLationServiceImpl.java | 113 +++++++----------- 2 files changed, 42 insertions(+), 73 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 439cfa155a..5856241cbb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -100,7 +100,9 @@ public class DeptScoreServiceImpl extends BaseServiceImpl dangJianNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), - IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), - IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - if (CollectionUtils.isEmpty(dangJianNengLiList)) { - log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); - } - calculateGridDangJian(formDTO, dangJianNengLiList); + calculateGridDangJian(formDTO); //2、计算网格相关-治理能力 - List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), - IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), - IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); - } - calculateGridZhiLi(formDTO, zhiLiNengLiList); + calculateGridZhiLi(formDTO); //3、计算网格相关-服务能力 - List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), - IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), - IndexCodeEnum.FU_WU_NENG_LI.getCode()); - if (CollectionUtils.isEmpty(fuWuNengLiList)) { - log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); - } - calculateGridFuWu(formDTO, fuWuNengLiList); + calculateGridFuWu(formDTO); //4、计算网格相关总分 - List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), - IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); - if (CollectionUtils.isEmpty(wgxgList)) { - log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【网格相关】指标权重信息不存在"); - } - calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); - - resultFlag = true; - return resultFlag; + calculateGridTotal(formDTO); + return true; } /** * @param formDTO - * @param indexList * @return void * @author yinzuomei * @description 计算网格相关-党建能力 * @Date 2020/8/26 16:47 **/ @Transactional(rollbackFor = Exception.class) - public void calculateGridDangJian(CalculateCommonFormDTO formDTO, List indexList) { + public void calculateGridDangJian(CalculateCommonFormDTO formDTO) { + List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(indexList)) { + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); + } //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } - //只有一个网格的事实记录时无需处理以下代码注释 - /*else if (NumConstant.ONE == total) { - //只有一个网格时 - log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); - this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); @@ -196,7 +166,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), - IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE, NumConstant.ZERO_STR); } @@ -368,7 +337,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private void saveGridCorreLationResult(CalculateCommonFormDTO formDTO, List> resultMapList, String indexCode, - String allParentIndexCode, String isTotal) { String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); @@ -442,8 +410,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); //如果想看每一个指标的分值调用下面的方法 - List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); - log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + /*List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp));*/ HashMap resultMap = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); log.info("计算的结果{}", resultMap); @@ -531,25 +499,25 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { /** * @param formDTO - * @param indexList * @return void * @author yinzuomei * @description 计算网格相关-治理能力 * @Date 2020/8/26 16:47 **/ - private void calculateGridZhiLi(CalculateCommonFormDTO formDTO, List indexList) { + private void calculateGridZhiLi(CalculateCommonFormDTO formDTO) { + List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(indexList)) { + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); + } //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } - //只有一个网格的事实记录时无需处理以下代码注释 - /*else if (NumConstant.ONE == total) { - //只有一个网格时 - log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); - this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); @@ -598,32 +566,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), - IndexCalConstant.GRID_ZL_ALL_PARENT_INDEX_CODE, NumConstant.ZERO_STR); } /** * @param formDTO - * @param indexList * @return void * @author yinzuomei * @description 计算网格相关-服务能力 * @Date 2020/8/26 16:48 **/ - private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { + private void calculateGridFuWu(CalculateCommonFormDTO formDTO) { + List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(indexList)) { + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); + } //查询总记录数 int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } - //只有一个网格的事实记录时无需处理以下代码注释 - /*else if (NumConstant.ONE == total) { - //只有一个网格时 - log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); - this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); - }*/ //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); @@ -668,19 +635,23 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.FU_WU_NENG_LI.getCode(), - IndexCalConstant.GRID_FW_ALL_PARENT_INDEX_CODE, NumConstant.ZERO_STR); } /** * @param formDTO - * @param indexList * @return void * @author yinzuomei * @description 计算网格相关总分 * @Date 2020/8/26 16:50 **/ - private void calculateGridTotal(CalculateCommonFormDTO formDTO, List indexList, String indexCode) { + private void calculateGridTotal(CalculateCommonFormDTO formDTO) { + List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); + if (CollectionUtils.isEmpty(indexList)) { + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关】指标权重信息不存在"); + } //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ @@ -692,13 +663,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); - gridScoreEntity.setIndexCode(indexCode); + gridScoreEntity.setIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); gridScoreEntity.setScore(BigDecimal.ZERO); gridScoreEntity.setAllParentIndexCode(NumConstant.ZERO_STR); - /*if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); - continue; - }*/ log.warn("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失"); for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { BigDecimal indexScore = gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); @@ -711,7 +678,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { do { effectRow =gridScoreDao.deleteBatches(formDTO.getCustomerId(), formDTO.getMonthId(), - indexCode, + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE); } while (effectRow > NumConstant.ZERO); //批量插入 From f151b5a43cbe4c7c58a678f8b3ec9bcfe72fa919 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 10:18:54 +0800 Subject: [PATCH 045/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndexCalculateController.java | 6 ++++-- .../indexcal/impl/IndexCalculateServiceImpl.java | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 887482d1a4..0acdf28890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -5,13 +5,13 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; import com.epmet.util.DimIdGenerator; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import com.sun.org.apache.xpath.internal.operations.Bool; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -77,7 +77,7 @@ public class IndexCalculateController { long start = System.currentTimeMillis(); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); if (aBoolean) { - log.error("全部指标计算完成,总耗时:{}秒", (System.currentTimeMillis() - start) / 1000); + log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); } redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), false); }); @@ -94,10 +94,12 @@ public class IndexCalculateController { @PostMapping("reAll") public Result calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { + long start = System.currentTimeMillis(); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); if (aBoolean) { return new Result().ok(true); } + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); return new Result().error("指标计算失败"); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 5ab74faadf..1a3f3c0e3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.dto.indexcal.CalculateCommonFormDTO; @@ -71,6 +72,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { Boolean flag = false; for (String customerId : customerIds) { CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); + long start = System.currentTimeMillis(); try { //计算党员相关的 try { @@ -81,8 +83,11 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { log.error("indexCalculate cpcIndexCalculate exception", e); throw new RenException("indexCalculate cpcIndexCalculate exception", e); } + //测试用 + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【党员相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); //计算网格 + start = System.currentTimeMillis(); try { flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); log.info("indexCalculate calculateGridCorreLation return result:{}", flag); @@ -90,37 +95,46 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { log.error("indexCalculate calculateGridCorreLation exception", e); throw new RenException("indexCalculate calculateGridCorreLation exception", e); } + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【网格相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); //计算社区 + start = System.currentTimeMillis(); try { flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); log.info("indexCalculate calCommunityAll return result:{}", flag); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【社区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); } catch (Exception e) { log.error("indexCalculate calCommunityAll exception", e); throw new RenException("indexCalculate calAll exception", e); } //计算街道 + start = System.currentTimeMillis(); try { flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); log.info("indexCalculate calStreetAll return result:{}", flag); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【街道相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); } catch (Exception e) { log.error("indexCalculate calStreetAll exception", e); throw new RenException("indexCalculate calStreetAll exception", e); } //计算区直属 + start = System.currentTimeMillis(); try { flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); log.info("indexCalculate calculateDeptCorreLation return result:{}", flag); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【区直部门】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); } catch (Exception e) { log.error("indexCalculate calculateDeptCorreLation exception", e); throw new RenException("indexCalculate calculateDeptCorreLation exception", e); } //计算全区 + start = System.currentTimeMillis(); try { indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); log.info("indexCalculate calDistrictAll return result:{}", flag); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【全区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); } catch (Exception e) { log.error("indexCalculate calDistrictAll exception", e); throw new RenException("indexCalculate calDistrictAll exception", e); @@ -131,8 +145,10 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算完毕后 将结果插入大屏相关数据表 if (flag) { + start = System.currentTimeMillis(); try { factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 分数插入到大屏显示库完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); } catch (Exception e) { log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); flag = false; From 37d782aa8da8317072d6df5ac77fc379cfdd743e Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 10:20:08 +0800 Subject: [PATCH 046/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/DataReportApplication.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java index 989bf71965..cee0ed9096 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java @@ -1,7 +1,5 @@ package com.epmet; -import com.epmet.commons.tools.enums.EnvEnum; -import com.epmet.commons.tools.utils.HttpClientManager; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @@ -15,6 +13,5 @@ import org.springframework.scheduling.annotation.EnableAsync; public class DataReportApplication { public static void main(String[] args) { SpringApplication.run(DataReportApplication.class, args); - HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() +" DataStatsApplication started!"); } } From bbbce2d6ce4870fa75ff5df15acf32e9b7211b2f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 10:46:28 +0800 Subject: [PATCH 047/150] =?UTF-8?q?=E8=81=94=E7=B3=BB=E7=BE=A4=E4=BC=97+?= =?UTF-8?q?=E5=8F=82=E4=B8=8E=E8=AE=AE=E4=BA=8B=20=20=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=B9=B3=E5=9D=87=E5=80=BC=EF=BC=8C=E5=8E=BB=E6=8E=89group=20b?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 7f6505b70a..4d253f3d76 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -55,8 +55,6 @@ AND m.MONTH_ID = #{monthId} AND m.GRID_ID = #{gridId} and m.INDEX_CODE='lianxiqunzhong' - GROUP BY - m.GRID_ID @@ -101,8 +99,6 @@ AND m.MONTH_ID = #{monthId} AND m.GRID_ID = #{gridId} and m.INDEX_CODE='canyuyishi' - GROUP BY - m.GRID_ID From 03581bc245848d597651e1374dfafadb6359dc53 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 11 Sep 2020 10:52:37 +0800 Subject: [PATCH 048/150] =?UTF-8?q?subAgencyIndexRank=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=BA=90=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/evaluationindex/screen/impl/IndexServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 4d23ca4bca..29fc46e738 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -181,6 +181,7 @@ public class IndexServiceImpl implements IndexService { return subAgencyIndexRankResultDTOS; } + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO) { List subAgencyIndexRankResultDTOS = new ArrayList<>(); From a600e8919ee6869109dc4a529ae0c40a36faa227 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 10:54:35 +0800 Subject: [PATCH 049/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/DingdingMsgSender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DingdingMsgSender.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DingdingMsgSender.java index 59016ccc88..d37ef464bd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DingdingMsgSender.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DingdingMsgSender.java @@ -38,7 +38,7 @@ public class DingdingMsgSender { /** * 默认10 */ - private static Integer maxQueueSize = 10; + private static Integer maxQueueSize = 8; /** * 有序队列 From 02fc5d30bcfcb69d0a748007021fd2b66bec6b17 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 11 Sep 2020 10:56:19 +0800 Subject: [PATCH 050/150] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=9A=84=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/dynamic/datasource/config/DynamicDataSource.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java index 0a9d9adf91..48512ed7af 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java @@ -24,9 +24,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { @Override protected Object determineCurrentLookupKey() { - String datasourceName = DynamicContextHolder.peek(); - logger.info("使用的数据源名称为:{}", datasourceName); - return datasourceName; + return DynamicContextHolder.peek(); } } From 453208d87a26b33eb3fd98320ec6eafe0eb2e15d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 13:35:33 +0800 Subject: [PATCH 051/150] =?UTF-8?q?=E5=AE=89=E5=AE=81e=E5=AE=B6=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=BA=94=E7=94=A8+=E5=A4=A7=E5=B1=8F=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.6__add_anningejia_screenandcaiji.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql new file mode 100644 index 0000000000..c34f8b6380 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql @@ -0,0 +1,5 @@ +INSERT INTO `external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('091a71fdc9e69b214bc32efb3508b4a7', '安宁e家大屏', '6c67e54f0ce4ba92a33f503082c92fc9', 'external', 0, 'APP_USER', '2020-09-11 13:14:20', 'APP_USER', '2020-09-11 13:14:20', 0); +INSERT INTO `epmet_common_service`.`external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('444c4fa4813bfe9414c0bb4609aea405', '安宁e家数据采集', '6c67e54f0ce4ba92a33f503082c92fc9', 'external', 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24', 0); + +INSERT INTO `external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('184ff0e132550cc2563df0fdf34a204f', '091a71fdc9e69b214bc32efb3508b4a7', '3b7e7a865d4042e79079f4973e3e27b9401c11964a41402999b94f0b472c32b5', 0, 0, 'APP_USER', '2020-09-11 13:14:20', 'APP_USER', '2020-09-11 13:14:20'); +INSERT INTO `epmet_common_service`.`external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('f5ea18989511fc3d24d6dccd72faea25', '444c4fa4813bfe9414c0bb4609aea405', 'cd6e8859fd594204a9a6e8c1d50180f9c3746530211649d490030cbdd833182f', 0, 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24'); \ No newline at end of file From 30f9665afb54724a4e2ec91a72bb27b0cd7969fb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 13:36:20 +0800 Subject: [PATCH 052/150] =?UTF-8?q?=E5=AE=89=E5=AE=81e=E5=AE=B6=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=BA=94=E7=94=A8+=E5=A4=A7=E5=B1=8F=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.6__add_anningejia_screenandcaiji.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql index c34f8b6380..388515832b 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.6__add_anningejia_screenandcaiji.sql @@ -1,5 +1,5 @@ INSERT INTO `external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('091a71fdc9e69b214bc32efb3508b4a7', '安宁e家大屏', '6c67e54f0ce4ba92a33f503082c92fc9', 'external', 0, 'APP_USER', '2020-09-11 13:14:20', 'APP_USER', '2020-09-11 13:14:20', 0); -INSERT INTO `epmet_common_service`.`external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('444c4fa4813bfe9414c0bb4609aea405', '安宁e家数据采集', '6c67e54f0ce4ba92a33f503082c92fc9', 'external', 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24', 0); +INSERT INTO `external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('444c4fa4813bfe9414c0bb4609aea405', '安宁e家数据采集', '6c67e54f0ce4ba92a33f503082c92fc9', 'external', 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24', 0); INSERT INTO `external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('184ff0e132550cc2563df0fdf34a204f', '091a71fdc9e69b214bc32efb3508b4a7', '3b7e7a865d4042e79079f4973e3e27b9401c11964a41402999b94f0b472c32b5', 0, 0, 'APP_USER', '2020-09-11 13:14:20', 'APP_USER', '2020-09-11 13:14:20'); -INSERT INTO `epmet_common_service`.`external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('f5ea18989511fc3d24d6dccd72faea25', '444c4fa4813bfe9414c0bb4609aea405', 'cd6e8859fd594204a9a6e8c1d50180f9c3746530211649d490030cbdd833182f', 0, 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24'); \ No newline at end of file +INSERT INTO `external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('f5ea18989511fc3d24d6dccd72faea25', '444c4fa4813bfe9414c0bb4609aea405', 'cd6e8859fd594204a9a6e8c1d50180f9c3746530211649d490030cbdd833182f', 0, 0, 'APP_USER', '2020-09-11 13:28:24', 'APP_USER', '2020-09-11 13:28:24'); \ No newline at end of file From e92c0fe1f31d528169d2806e6e9bff0781940d84 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 13:49:09 +0800 Subject: [PATCH 053/150] =?UTF-8?q?=E5=A2=9E=E5=A4=A7=E5=A0=86=E5=86=85?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/deploy/docker-compose-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 36afabff51..fcc8b45448 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 600M \ No newline at end of file From abdf6836745728a666bd0a7e2b5776b0d0675a1d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 13:53:46 +0800 Subject: [PATCH 054/150] =?UTF-8?q?5=E3=80=81=E4=B8=8B=E7=BA=A7=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E6=8C=87=E6=95=B0=E6=8E=92=E8=A1=8C=EF=BC=88=E7=9B=AE?= =?UTF-8?q?=E5=89=8D=E5=AE=89=E5=AE=81=E6=95=B0=E6=8D=AE=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=EF=BC=89,=20=E8=BF=94=E5=9B=9E=E5=80=BC=E5=A2=9E=E5=8A=A0=20or?= =?UTF-8?q?gId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnNingSubAgencyIndexRankResultDTO.java | 45 +++++++++++++++++++ .../controller/screen/IndexController.java | 16 +++---- .../screen/ScreenIndexDataMonthlyDao.java | 5 ++- .../screen/ScreenIndexDataYearlyDao.java | 6 +-- .../evaluationindex/screen/IndexService.java | 9 ++-- .../screen/impl/IndexServiceImpl.java | 4 +- .../screen/ScreenIndexDataMonthlyDao.xml | 6 ++- .../screen/ScreenIndexDataYearlyDao.xml | 6 ++- 8 files changed, 70 insertions(+), 27 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AnNingSubAgencyIndexRankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AnNingSubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AnNingSubAgencyIndexRankResultDTO.java new file mode 100644 index 0000000000..f93b98b16d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AnNingSubAgencyIndexRankResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zhangyong + * @DateTime 2020/09/11 9:58 上午 + */ +@Data +public class AnNingSubAgencyIndexRankResultDTO implements Serializable { + + private static final long serialVersionUID = -2767000156092731932L; + + /** + * 名称(组织或者网格名称,部门名称) + */ + private String name = ""; + + /** + * 总指数 + */ + private Double totalIndex = 0.0; + + /** + * 党建能力 + */ + private Double governAbility = 0.0; + + /** + * 治理能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; + + /** + * 组织id或者网格id + */ + private String orgId = ""; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index b2a6db2edf..fd3564c53b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -5,10 +5,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.IndexService; import com.epmet.evaluationindex.screen.dto.form.*; -import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; -import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; -import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; -import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -83,18 +80,17 @@ public class IndexController { } /** - * 5、下级部门指数排行(安宁数据段用) - * + * 5、下级部门指数排行(安宁数据段用) * @param formDTO - * @return com.epmet.commons.tools.utils.Result> + * @return com.epmet.commons.tools.utils.Result> * @Author zhangyong - * @Date 09:38 2020-09-08 + * @Date 13:39 2020-09-11 **/ @ExternalAppRequestAuth @PostMapping("dataclient/subagencyindexrank") - public Result> anNingSubAgencyIndexRank(@RequestBody AnNingSubAgencyIndexRankFormDTO formDTO){ + public Result> anNingSubAgencyIndexRank(@RequestBody AnNingSubAgencyIndexRankFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AnNingSubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); - return new Result>().ok(indexService.anNingSubAgencyIndexRank(formDTO)); + return new Result>().ok(indexService.anNingSubAgencyIndexRank(formDTO)); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 8f1e472b18..3128862ece 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; import com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult; import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; @@ -64,10 +65,10 @@ public interface ScreenIndexDataMonthlyDao{ * 5、下级部门指数排行(安宁数据段用) - 月(上一个月) * * @param formDTO - * @return com.epmet.commons.tools.utils.Result> + * @return java.util.List * @Author zhangyong * @Date 09:38 2020-09-08 **/ - List selectAnNingSubAgencyIndexMonthlyRank(AnNingSubAgencyIndexRankFormDTO formDTO); + List selectAnNingSubAgencyIndexMonthlyRank(AnNingSubAgencyIndexRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index eced6fc1ff..70f0f1b5a6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -18,7 +18,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; import com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -46,9 +46,9 @@ public interface ScreenIndexDataYearlyDao{ * 5、下级部门指数排行(安宁数据段用) - 年 * * @param formDTO - * @return com.epmet.commons.tools.utils.Result> + * @return java.util.List * @Author zhangyong * @Date 09:38 2020-09-08 **/ - List selectAnNingSubAgencyIndexYearlyRank(AnNingSubAgencyIndexRankFormDTO formDTO); + List selectAnNingSubAgencyIndexYearlyRank(AnNingSubAgencyIndexRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java index e2191e20ec..761d369b7a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java @@ -1,10 +1,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.evaluationindex.screen.dto.form.*; -import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; -import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; -import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; -import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; @@ -52,10 +49,10 @@ public interface IndexService { * 5、下级部门指数排行(安宁数据段用) * * @param formDTO - * @return com.epmet.commons.tools.utils.Result> + * @return java.util.List * @Author zhangyong * @Date 09:38 2020-09-08 **/ - List anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO); + List anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 29fc46e738..e3e6ce4a61 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -183,8 +183,8 @@ public class IndexServiceImpl implements IndexService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override - public List anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO) { - List subAgencyIndexRankResultDTOS = new ArrayList<>(); + public List anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO) { + List subAgencyIndexRankResultDTOS = new ArrayList<>(); if (ScreenConstant.YEAR_ID.equals(formDTO.getType())){ // 年 指数排行 subAgencyIndexRankResultDTOS = screenIndexDataYearlyDao.selectAnNingSubAgencyIndexYearlyRank(formDTO); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 7dcb6c526b..1487025e6b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -62,13 +62,15 @@ - SELECT org_name AS `NAME`, index_total AS totalIndex, govern_ablity AS governAbility, party_dev_ablity AS partyDevAbility, - service_ablity AS serviceAbility + service_ablity AS serviceAbility, + ORG_ID orgId FROM screen_index_data_monthly WHERE diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 60dc82b24b..1ecb5fef84 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -20,13 +20,15 @@ - SELECT org_name AS `NAME`, index_total AS totalIndex, govern_ablity AS governAbility, party_dev_ablity AS partyDevAbility, - service_ablity AS serviceAbility + service_ablity AS serviceAbility, + ORG_ID orgId FROM screen_index_data_yearly WHERE From f270088f18fd87cda1b1f070cf1624119884dbf6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 11 Sep 2020 14:00:37 +0800 Subject: [PATCH 055/150] =?UTF-8?q?data-report=20log=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0local=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/src/main/resources/logback-spring.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml index 793be083a1..1be215aa54 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml @@ -139,7 +139,7 @@ - + From b3c67750aa4fdc8474221d8f5ece7ed361206699 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 15:14:30 +0800 Subject: [PATCH 056/150] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=88=86=E6=89=B9?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=80=BB=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/CpcScoreDao.java | 2 +- .../impl/CpcIndexCalculateServiceImpl.java | 85 ++++++++++++------- .../src/main/resources/logback-spring.xml | 2 +- .../evaluationindex/indexcal/CpcScoreDao.xml | 2 + 4 files changed, 59 insertions(+), 32 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index a5469cbb79..c03786ecfe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -80,7 +80,7 @@ public interface CpcScoreDao extends BaseDao { int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("deleteSize") Integer deleteSize, @Param("isTotal") String isTotal); - List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode); + List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode, @Param("offset") int offset, @Param("pageSize") int pageSize); int insertBatch(@Param("list") Collection values); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 610b6c51aa..07c268be31 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -79,39 +79,64 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } Map cpcScoreTotalMap = new HashMap<>(); Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); + int pageNo = NumConstant.ONE; + int pageSize = IndexCalConstant.PAGE_SIZE; + List list = null; - //获取数据 - List list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - if (CollectionUtils.isEmpty(list)) { - log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); - throw new RenException("客户四级指标分值记录不存在"); - } - Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); - userGroupMap.forEach((userId, partScoreList) -> { - CpcScoreEntity totalEntity = null; - for (CpcScoreEntity part : partScoreList) { - IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); - if (indexGroupDetailEntity == null) { - log.error(" indexCode:{} 在指标明细中不存在", part.getIndexCode()); - continue; - } - if (totalEntity == null) { - totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); - totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); - totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); - cpcScoreTotalMap.put(userId, totalEntity); + Map preLastCpcScoreTotalMap = new HashMap<>(); + CpcScoreEntity currentLastCpcScore = null; + do { + //获取数据 + list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); + pageNo++; + if (CollectionUtils.isEmpty(list)) { + log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + } else { + //获取最后一条 + currentLastCpcScore = list.get(list.size() - 1); + if (preLastCpcScoreTotalMap.containsKey(currentLastCpcScore.getUserId())) { + cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); + preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); } - //自建群活跃度——议题转项目率 有阈值 >60%按60%算 - BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); - log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); - totalEntity.setScore(totalEntity.getScore().add(total)); + Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); + userGroupMap.forEach((userId, partScoreList) -> { + CpcScoreEntity totalEntity = null; + for (CpcScoreEntity part : partScoreList) { + IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); + if (indexGroupDetailEntity == null) { + log.error(" indexCode:{} 在指标明细中不存在", part.getIndexCode()); + continue; + } + if (totalEntity == null) { + totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); + totalEntity.setIsTotal(NumConstant.ONE_STR); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); + totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); + + if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { + preLastCpcScoreTotalMap.put(part.getUserId(), part); + } else { + cpcScoreTotalMap.put(userId, totalEntity); + } + } + //自建群活跃度——议题转项目率 有阈值 >60%按60%算 + BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); + totalEntity.setScore(totalEntity.getScore().add(total)); + } + }); } - }); - //删除总分 然后插入 - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); - insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + + //没查询到数据 就把上次的放进去 + if (list == null || list.size() < pageSize || !CollectionUtils.isEmpty(preLastCpcScoreTotalMap)) { + cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); + } + //删除总分 然后插入 + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + } while (!CollectionUtils.isEmpty(list)); + } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml index 8ad6400d13..99ae63af58 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml @@ -139,7 +139,7 @@ - + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 4d253f3d76..c6e0decab9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -40,6 +40,8 @@ and MONTH_ID = #{monthId,jdbcType=VARCHAR} and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR} AND IS_TOTAL = '0' + order by USER_ID + limit #{offset}, #{pageSize} From 9040792b81afc11f9edc75a76febbb1c60b7be30 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 11 Sep 2020 15:17:10 +0800 Subject: [PATCH 057/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9rediskey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/commons/tools/redis/RedisKeys.java | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index fc5c0c7a31..e1fa2fa2c7 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -303,7 +303,7 @@ public class RedisKeys { * @return */ public static String getIndexCodeFieldReKey() { - return rootPrefix.concat("data:index:indexcode:field"); + return rootPrefix.concat("stats:indexcal:indexcode:field"); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index d930651a68..b907c6525e 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -226,7 +226,7 @@ true - 8108 + 8109 local From 6acf9620606ca706c2b0b1b7cc4eaf7fa9fc7824 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 11 Sep 2020 15:29:45 +0800 Subject: [PATCH 058/150] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=88=E6=AD=A2?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/CalculateCommonFormDTO.java | 6 +++++ .../controller/IndexCalculateController.java | 26 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java index 187f69c960..cfdc9f2ec9 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.indexcal; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -13,6 +15,9 @@ import java.io.Serializable; @Data public class CalculateCommonFormDTO implements Serializable { private static final long serialVersionUID = -5689788391963427717L; + + public interface CancelCalculateGroup extends CustomerClientShowGroup {} + /** * 月份id: yyyyMM */ @@ -21,6 +26,7 @@ public class CalculateCommonFormDTO implements Serializable { /** * 客户id */ + @NotBlank(message = "客户id不能为空", groups = { CancelCalculateGroup.class }) private String customerId; public CalculateCommonFormDTO() { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 0acdf28890..596a1f17ad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -7,6 +7,7 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; @@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Date; +import java.util.HashMap; +import java.util.Map; import java.util.concurrent.*; /** @@ -52,6 +55,8 @@ public class IndexCalculateController { // 计算同步锁 private Object statsCalLock = new Object(); + private Map futureMap = new HashMap<>(); + /** * 按照客户计算所有指标(按照月份) * @@ -72,7 +77,7 @@ public class IndexCalculateController { log.error(String.format("该客户正在执行计算,请勿重复提交计算请求。", customerId)); return new Result().ok(false); } - singleThreadPool.execute(() -> { + Future future = singleThreadPool.submit(() -> { formDTO.setCustomerId(customerId); long start = System.currentTimeMillis(); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); @@ -80,7 +85,9 @@ public class IndexCalculateController { log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); } redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), false); + futureMap.remove(customerId); }); + futureMap.put(customerId, future); redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), true); } } else { @@ -92,6 +99,23 @@ public class IndexCalculateController { return new Result().ok(true); } + /** + * 终止计算 + * @param form + * @return + */ + @PostMapping("stopcalculate") + public Result stopcalculate(@RequestBody CalculateCommonFormDTO form) { + ValidatorUtils.validateEntity(form); + + String customerId = form.getCustomerId(); + Future future = this.futureMap.get(customerId); + if (future != null && !future.isCancelled()) { + future.cancel(true); + } + return new Result(); + } + @PostMapping("reAll") public Result calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { long start = System.currentTimeMillis(); From 7a405702bf58c0af37fdd023c4f9a199b1b89259 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 11 Sep 2020 15:59:28 +0800 Subject: [PATCH 059/150] =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=9A=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E4=B8=80=E7=BA=A7=E6=8C=87=E6=A0=87=E5=88=86=E5=80=BC?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=B8=8D=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/DeptScoreServiceImpl.java | 12 ++++++---- .../impl/GridCorreLationServiceImpl.java | 23 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 5856241cbb..b918968ce5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -120,7 +120,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl indexList = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.QU_ZHI_BU_MEN.getCode()); if (CollectionUtils.isEmpty(indexList)) { - log.warn("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.error("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【区直部门】下级指标权重信息不存在"); } //查询总记录数 List deptScoreDTOList = deptScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(deptScoreDTOList)){ - log.error("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); - throw new RenException("客户一级指标分值记录不存在"); + log.warn("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); +// throw new RenException("客户一级指标分值记录不存在"); + log.warn(String.format("customerId=%s,monthId=%s,fact_index_dept_score have not any fact record", formDTO.getCustomerId(), formDTO.getMonthId())); + return; } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List deotScoreEntityList = new ArrayList<>(); @@ -339,7 +341,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.warn("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -463,7 +463,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - log.error("index_code:{} not find field_name",index.getIndexCode()); + log.warn("index_code:{} not find field_name",index.getIndexCode()); continue; } // log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); @@ -509,7 +509,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(indexList)) { - log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.error("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } //查询总记录数 @@ -524,7 +524,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.warn("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -582,7 +582,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(indexList)) { - log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.error("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } //查询总记录数 @@ -597,7 +597,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.warn("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -623,7 +623,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - log.error("index_code:" + key + " not find field_name"); + log.warn("index_code:" + key + " not find field_name"); } }); }); @@ -649,14 +649,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(indexList)) { - log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.error("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); - throw new RenException("客户一级指标分值记录不存在"); + log.warn("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); +// throw new RenException("客户一级指标分值记录不存在"); + return; } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); From dae03d771fab3a074582f777fdb196871735b9f1 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 11 Sep 2020 16:20:16 +0800 Subject: [PATCH 060/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E4=B8=AD?= =?UTF-8?q?=E6=AD=A2=E8=AE=A1=E7=AE=97=EF=BC=8C=E5=81=9C=E6=AD=A2=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=EF=BC=8C=E7=A4=BA=E4=BE=8B=E9=94=80=E6=AF=81=E9=83=BD?= =?UTF-8?q?=E4=BC=9A=E6=B8=85=E7=A9=BAredis=E7=9A=84=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=20=E5=81=9C=E6=AD=A2=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=92=8C=E4=B8=AD=E6=AD=A2=E8=AE=A1=E7=AE=97=E8=BF=98=E8=A6=81?= =?UTF-8?q?=E6=B8=85=E7=A9=BAfutureMap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndexCalculateController.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 596a1f17ad..1a48df14d5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.PreDestroy; import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -57,6 +58,15 @@ public class IndexCalculateController { private Map futureMap = new HashMap<>(); + @PreDestroy + public void clearDataCalFlag() { + // 实例销毁之前,将正在本实例中执行计算的客户列表的计算状态清空 + futureMap.forEach((customerId, future) -> { + redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); + }); + } + + /** * 按照客户计算所有指标(按照月份) * @@ -69,6 +79,7 @@ public class IndexCalculateController { @PostMapping("all") public Result indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) { String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "epmettest"; Boolean executing = (Boolean) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(customerId)); if (executing == null || !executing) { synchronized (statsCalLock) { @@ -84,7 +95,7 @@ public class IndexCalculateController { if (aBoolean) { log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); } - redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), false); + redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); futureMap.remove(customerId); }); futureMap.put(customerId, future); @@ -104,6 +115,7 @@ public class IndexCalculateController { * @param form * @return */ + @ExternalAppRequestAuth @PostMapping("stopcalculate") public Result stopcalculate(@RequestBody CalculateCommonFormDTO form) { ValidatorUtils.validateEntity(form); @@ -112,6 +124,9 @@ public class IndexCalculateController { Future future = this.futureMap.get(customerId); if (future != null && !future.isCancelled()) { future.cancel(true); + redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); + futureMap.remove(customerId); + HttpClientManager.getInstance().sendAlarmMsg(String.format("数据统计服务-中止计算成功,customerId:%s", customerId)); } return new Result(); } From 8cedf69308d51eb316497e2b5c66048050c895a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Sep 2020 16:20:57 +0800 Subject: [PATCH 061/150] =?UTF-8?q?=E4=B8=89=E5=A4=A7=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E5=88=86=E6=95=B0=E5=92=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 4 +++- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 7673575b37..da6956d167 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -328,7 +328,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); result.add(score); }); - factIndexCommunityScoreDao.insertCommunityPartyRecord(result); + if (!CollectionUtils.isEmpty(result)){ + factIndexCommunityScoreDao.insertCommunityPartyRecord(result); + } return true; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 08afc2a9f3..1eb6a60a5b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -357,7 +357,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); result.add(score); }); - agencyScoreDao.insertStreetRecord(result); + if (!CollectionUtils.isEmpty(result)){ + agencyScoreDao.insertStreetRecord(result); + } return true; } From d8be8c10a4a5dfd00f628a09b017f580c04b9568 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 16:37:10 +0800 Subject: [PATCH 062/150] =?UTF-8?q?screen=5Fkc=5Fvolunteer=5Fheat=5Frank?= =?UTF-8?q?=5Fgrid=5Fdaily=20=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E3=80=90=E7=A7=AF=E5=88=86=E3=80=81=E5=BF=97=E6=84=BF=E8=80=85?= =?UTF-8?q?id=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screencoll/form/KcVolunteerHeartRankFormDTO.java | 10 ++++++++++ .../ScreenKcVolunteerHeatRankGridDailyEntity.java | 9 +++++++++ .../screen/ScreenKcVolunteerHeatRankGridDailyDao.xml | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java index 2509051e3d..d25d044750 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java @@ -49,4 +49,14 @@ public class KcVolunteerHeartRankFormDTO implements Serializable { * 爱心时长 单位分钟 */ private Integer heartTime; + + /** + * 积分09-11新增 + */ + private Integer points; + + /** + * 志愿者id 09-11新增 + */ + private String volunteerId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java index 73e7d8da06..a681c2bca0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java @@ -83,4 +83,13 @@ public class ScreenKcVolunteerHeatRankGridDailyEntity extends BaseEpmetEntity { */ private Integer heartTime; + /** + * 积分09-11新增 + */ + private Integer points; + + /** + * 志愿者id 09-11新增 + */ + private String volunteerId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml index 8edba81c44..dffc71ae0c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -14,6 +14,8 @@ + + @@ -42,6 +44,8 @@ USER_ID, USER_NAME, HEART_TIME, + POINTS, + VOLUNTEER_ID, DEL_FLAG, REVISION, @@ -62,6 +66,8 @@ #{item.userId}, #{item.userName}, #{item.heartTime}, + #{item.points}, + #{item.volunteerId}, 0, 0, 'APP_USER', From 5813c25ea45edfd362d1d83f56de701744a5e40a Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 17:15:47 +0800 Subject: [PATCH 063/150] =?UTF-8?q?=E5=AE=89=E5=AE=81=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=EF=BC=8C=E8=BF=94=E5=9B=9E2=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 8 ++++---- .../resources/mapper/screen/ScreenIndexDataYearlyDao.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 1487025e6b..07a389ed64 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -66,10 +66,10 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT org_name AS `NAME`, - index_total AS totalIndex, - govern_ablity AS governAbility, - party_dev_ablity AS partyDevAbility, - service_ablity AS serviceAbility, + ROUND(index_total, 2) AS totalIndex, + ROUND(govern_ablity, 2) AS governAbility, + ROUND(party_dev_ablity, 2) AS partyDevAbility, + ROUND(service_ablity, 2) AS serviceAbility, ORG_ID orgId FROM screen_index_data_monthly diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 1ecb5fef84..fab8926e41 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -24,10 +24,10 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT org_name AS `NAME`, - index_total AS totalIndex, - govern_ablity AS governAbility, - party_dev_ablity AS partyDevAbility, - service_ablity AS serviceAbility, + ROUND(index_total, 2) AS totalIndex, + ROUND(govern_ablity, 2) AS governAbility, + ROUND(party_dev_ablity, 2) AS partyDevAbility, + ROUND(service_ablity, 2) AS serviceAbility, ORG_ID orgId FROM screen_index_data_yearly From fb52eb0ec5bfed629f3efc01a8eb7b939b7d2933 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 17:47:40 +0800 Subject: [PATCH 064/150] =?UTF-8?q?=E5=AE=89=E5=AE=81=E6=8C=87=E6=95=B0=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E1=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 8 ++++---- .../resources/mapper/screen/ScreenIndexDataYearlyDao.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 07a389ed64..394753a941 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -66,10 +66,10 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT org_name AS `NAME`, - ROUND(index_total, 2) AS totalIndex, - ROUND(govern_ablity, 2) AS governAbility, - ROUND(party_dev_ablity, 2) AS partyDevAbility, - ROUND(service_ablity, 2) AS serviceAbility, + ROUND(index_total, 1) AS totalIndex, + ROUND(govern_ablity, 1) AS governAbility, + ROUND(party_dev_ablity, 1) AS partyDevAbility, + ROUND(service_ablity, 1) AS serviceAbility, ORG_ID orgId FROM screen_index_data_monthly diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index fab8926e41..2bda5e1ec7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -24,10 +24,10 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT org_name AS `NAME`, - ROUND(index_total, 2) AS totalIndex, - ROUND(govern_ablity, 2) AS governAbility, - ROUND(party_dev_ablity, 2) AS partyDevAbility, - ROUND(service_ablity, 2) AS serviceAbility, + ROUND(index_total, 1) AS totalIndex, + ROUND(govern_ablity, 1) AS governAbility, + ROUND(party_dev_ablity, 1) AS partyDevAbility, + ROUND(service_ablity, 1) AS serviceAbility, ORG_ID orgId FROM screen_index_data_yearly From 6e1fa0f0a677e2ffe4c27c2c05b335be7e52a437 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Sep 2020 17:52:15 +0800 Subject: [PATCH 065/150] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9=20=E5=A4=A7=E5=B1=8F=E6=8C=87?= =?UTF-8?q?=E6=95=B0=E6=9F=A5=E8=AF=A2=E5=85=AC=E7=94=A8API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenIndexDataMonthlyDao.xml | 22 +++++++++---------- .../screen/ScreenIndexDataYearlyDao.xml | 8 +++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 394753a941..58a41b9d5f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -6,9 +6,9 @@ SELECT month_id AS monthId, - service_ablity AS serviceAbility, - party_dev_ablity AS partyDevAbility, - govern_ablity AS governAbility, - index_total AS indexTotal + ROUND(service_ablity,1) AS serviceAbility, + ROUND(party_dev_ablity,1) AS partyDevAbility, + ROUND(govern_ablity,1) AS governAbility, + ROUND(index_total,1) AS indexTotal FROM screen_index_data_monthly WHERE @@ -47,10 +47,10 @@ SELECT - index_total AS yearAverageIndex, - service_ablity AS serviceAbility, - party_dev_ablity AS partyDevAbility, - govern_ablity AS governAbility + ROUND(index_total,1) AS yearAverageIndex, + ROUND(service_ablity,1) AS serviceAbility, + ROUND(party_dev_ablity,1) AS partyDevAbility, + ROUND(govern_ablity,1) AS governAbility FROM screen_index_data_yearly WHERE From eaa4ec544cd627d08e394521f637608bafe2454a Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 11 Sep 2020 18:24:13 +0800 Subject: [PATCH 066/150] =?UTF-8?q?=E5=B9=B4=E8=A1=A8=E5=B9=B3=E5=9D=87?= =?UTF-8?q?=E5=80=BC=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenIndexDataMonthlyDao.java | 15 ++++++++++++-- .../impl/FactIndexCollectServiceImpl.java | 4 +++- .../screen/ScreenIndexDataMonthlyDao.xml | 20 +++++++++++++++---- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 760e7abc5f..653b00f415 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -62,11 +62,22 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao * @Author zhangyong * @Date 15:51 2020-09-04 **/ List selectListIndexDataMonthlyByYear(@Param("customerId") String customerId, - @Param("yearId") String yearId, @Param("month") String month); + @Param("yearId") String yearId, @Param("monthCount") Integer monthCount); + + /** + * 统计 今年,汇总了几个月的 指数统计 + * @param customerId + * @param yearId + * @return java.lang.Integer + * @Author zhangyong + * @Date 18:04 2020-09-11 + **/ + Integer selectCountIndexDataMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index f466b98319..7014c4eb5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -733,7 +733,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Date 22:06 2020-09-04 **/ private void insertIndexDataYear(String monthId, String customerId){ - List monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), getMonthStr(monthId)); + // 查询今年,上报了几个月的指数统计 + Integer monthCount = screenIndexDataMonthlyDao.selectCountIndexDataMonthly(customerId, getYearStr(monthId)); + List monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), monthCount); if (monthlyFormList.size() > NumConstant.ZERO){ int deleteNum; do { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml index 11a990aa9c..976a652d63 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml @@ -64,10 +64,10 @@ ORG_ID orgId, PARENT_ID parentId, ORG_NAME orgName, - SUM(INDEX_TOTAL) / #{month} as indexTotal, - SUM(PARTY_DEV_ABLITY) / #{month} as partyDevAblity, - SUM(SERVICE_ABLITY) / #{month} as serviceAblity, - SUM(GOVERN_ABLITY) / #{month} as governAblity + SUM(INDEX_TOTAL) / #{monthCount} as indexTotal, + SUM(PARTY_DEV_ABLITY) / #{monthCount} as partyDevAblity, + SUM(SERVICE_ABLITY) / #{monthCount} as serviceAblity, + SUM(GOVERN_ABLITY) / #{monthCount} as governAblity FROM screen_index_data_monthly WHERE DEL_FLAG = '0' AND YEAR_ID = #{yearId} @@ -75,4 +75,16 @@ GROUP BY ORG_ID + From b7d937f966c62a50d2a7dd643ce2e656fde77ba4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 09:12:23 +0800 Subject: [PATCH 067/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.3__add_index_table.sql | 660 ++++++++++++++++++ 1 file changed, 660 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql new file mode 100644 index 0000000000..ccc953838e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql @@ -0,0 +1,660 @@ +/* + Navicat Premium Data Transfer + + Source Server : 亿联开发 + Source Server Type : MySQL + Source Server Version : 50728 + Source Host : 192.168.1.130:3306 + Source Schema : epmet_evaluation_index + + Target Server Type : MySQL + Target Server Version : 50728 + File Encoding : 65001 + + Date: 12/09/2020 09:10:38 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for fact_index_agency_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_agency_score`; +CREATE TABLE `fact_index_agency_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', + `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', + `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='区/街道相关分数表 '; + +-- ---------------------------- +-- Table structure for fact_index_agency_sub_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_agency_sub_score`; +CREATE TABLE `fact_index_agency_sub_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', + `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='区/街道相关分数表 '; + +-- ---------------------------- +-- Table structure for fact_index_community_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_community_score`; +CREATE TABLE `fact_index_community_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', + `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(1) NOT NULL, + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='社区相关分数表 '; + +-- ---------------------------- +-- Table structure for fact_index_community_sub_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_community_sub_score`; +CREATE TABLE `fact_index_community_sub_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', + `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(1) NOT NULL, + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='社区相关分数表 '; + +-- ---------------------------- +-- Table structure for fact_index_cpc_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_cpc_score`; +CREATE TABLE `fact_index_cpc_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `USER_ID` varchar(64) NOT NULL COMMENT '用户id', + `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是 默认0', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='党员相关分值'; + +-- ---------------------------- +-- Table structure for fact_index_cpc_sub_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_cpc_sub_score`; +CREATE TABLE `fact_index_cpc_sub_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `USER_ID` varchar(64) NOT NULL COMMENT '用户id', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='党员相关分值'; + +-- ---------------------------- +-- Table structure for fact_index_dept_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_dept_score`; +CREATE TABLE `fact_index_dept_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', + `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;区直部门:quzhibumen', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='区直部门分值表'; + +-- ---------------------------- +-- Table structure for fact_index_dept_sub_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_dept_sub_score`; +CREATE TABLE `fact_index_dept_sub_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', + `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='区直部门分值表'; + +-- ---------------------------- +-- Table structure for fact_index_govrn_ablity_dept_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_govrn_ablity_dept_monthly`; +CREATE TABLE `fact_index_govrn_ablity_dept_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '部门所属机关Id', + `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', + `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门被吹哨次数', + `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门办结项目数', + `RESP_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门项目响应度 所有被吹哨后的滞留时间除以项目数', + `HANDLE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门办结项目的处理效率', + `CLOSED_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门项目办结率', + `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目满意度', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-区直部门相关数据 '; + +-- ---------------------------- +-- Table structure for fact_index_govrn_ablity_grid_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_govrn_ablity_grid_monthly`; +CREATE TABLE `fact_index_govrn_ablity_grid_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属机关Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', + `ISSUE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总议题数', + `AVG_ISSUE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格人均议题数目', + `ISSUE_TO_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格议题转项目率', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总项目数', + `SELF_SOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格自治项目数 统计期网格自身内办结的项目数目', + `RESOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格办结项目数 统计期内办结的项目数目', + `TRANSFER_RIGHT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格吹哨部门准确率', + `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '网格内解决的项目的满意度', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-网格相关事实表 '; + +-- ---------------------------- +-- Table structure for fact_index_govrn_ablity_org_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_govrn_ablity_org_monthly`; +CREATE TABLE `fact_index_govrn_ablity_org_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id,如果是根级组织,此列为0', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', + `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', + `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '被吹哨次数', + `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '办结项目数', + `RESP_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '项目响应度 所有被吹哨后的滞留时间除以项目数', + `OVERDUE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '社区超期项目率,dataTyp=commnuity有值', + `CLOSED_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目率', + `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目满意度', + `HANDLE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '街道办结项目的处理效率, data_type=street时有值', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-街道及社区相关数据 '; + +-- ---------------------------- +-- Table structure for fact_index_grid_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_grid_score`; +CREATE TABLE `fact_index_grid_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='网格相关分值记录表'; + +-- ---------------------------- +-- Table structure for fact_index_grid_sub_score +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_grid_sub_score`; +CREATE TABLE `fact_index_grid_sub_score` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', + `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='网格相关分值记录表'; + +-- ---------------------------- +-- Table structure for fact_index_party_ablity_cpc_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_party_ablity_cpc_monthly`; +CREATE TABLE `fact_index_party_ablity_cpc_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', + `PARENT_ID` varchar(64) DEFAULT NULL COMMENT 'agency_id的上级组织Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '党员所属的网格Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id : yyyy', + `USER_ID` varchar(64) NOT NULL COMMENT '用户id', + `CREATE_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员提出的话题数', + `JOIN_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员参与话题数(支持,反对,评论,浏览)', + `SHIFT_ISSUE_COUNT` int(11) NOT NULL COMMENT '党员提出的话题转议题数', + `SHIFT_PROJECT_COUNT` int(11) NOT NULL COMMENT '党员提出的议题转项目数', + `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '参加三会一课次数', + `GROUP_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群群众人数', + `GROUP_ACTIVE_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃群众人数(08-24)', + `GROUP_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃度——话题数', + `TOPIC_TO_ISSUE_RATIO` decimal(10, 6) NOT NULL COMMENT '自建群活跃度——议题转项目率', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-党员相关的事实表 '; + +-- ---------------------------- +-- Table structure for fact_index_party_ablity_grid_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_party_ablity_grid_monthly`; +CREATE TABLE `fact_index_party_ablity_grid_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Idyyyy', + `USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众用户数', + `PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员用户数', + `ACTIVE_USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃群众用户数', + `ACTIVE_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃党员用户数', + `PARTY_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出话题数', + `USER_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出话题数', + `PARTY_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出的议题转项目数', + `USER_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出的议题转项目数', + `CREATE_GROUP_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '建群党员数(累计值) 去重', + `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格发文数', + `ISSUE_TO_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格议题转项目率', + `CREATE_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '组织三会一课次数', + `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '党员参加三会一课人次', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-网格相关事实表 '; + +-- ---------------------------- +-- Table structure for fact_index_party_ablity_org_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_party_ablity_org_monthly`; +CREATE TABLE `fact_index_party_ablity_org_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', + `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT 'XXX名义发文数', + `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型district :全区;community:社区;street:街道', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-街道及社区相关事实表 '; + +-- ---------------------------- +-- Table structure for fact_index_service_ablity_grid_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_service_ablity_grid_monthly`; +CREATE TABLE `fact_index_service_ablity_grid_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属组织Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id: yyyy', + `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活动组织次数 爱心活动', + `VOLUNTEER_RATIO` decimal(10, 6) NOT NULL COMMENT '网格志愿者占比', + `PARTY_VOLUNTEER_RATIO` decimal(10, 6) NOT NULL COMMENT '网格党员志愿者率', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='服务能力-网格相关事实表'; + +-- ---------------------------- +-- Table structure for fact_index_service_ablity_org_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `fact_index_service_ablity_org_monthly`; +CREATE TABLE `fact_index_service_ablity_org_monthly` +( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', + `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', + `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id:yyyy', + `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '社区/街道活动组织次数 爱心活动', + `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='服务能力-组织(街道|社区|全区)相关事实表 '; + +-- ---------------------------- +-- Table structure for index_code_field_re +-- ---------------------------- +DROP TABLE IF EXISTS `index_code_field_re`; +CREATE TABLE `index_code_field_re` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `INDEX_CODE` varchar(256) NOT NULL COMMENT '指标code', + `FIELD_ID` varchar(32) DEFAULT '' COMMENT '是否启用:启用:enable 禁用:disabled', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + UNIQUE KEY `unx_index_code` (`INDEX_CODE`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='指标code和原始数据对应的字段关系表'; + +-- ---------------------------- +-- Table structure for index_dict +-- ---------------------------- +DROP TABLE IF EXISTS `index_dict`; +CREATE TABLE `index_dict` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `INDEX_NAME` varchar(255) NOT NULL COMMENT '指标名', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', + `INDEX_DESC` varchar(1024) DEFAULT NULL COMMENT '指标描述', + `LEVEL` varchar(1) NOT NULL COMMENT '指标级别(1,2,3,4,5)', + `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='评价指标字典'; + +-- ---------------------------- +-- Table structure for index_group +-- ---------------------------- +DROP TABLE IF EXISTS `index_group`; +CREATE TABLE `index_group` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', + `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', + `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标分组'; + +-- ---------------------------- +-- Table structure for index_group_detail +-- ---------------------------- +DROP TABLE IF EXISTS `index_group_detail`; +CREATE TABLE `index_group_detail` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group.id', + `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', + `WEIGHT` decimal(5, 4) NOT NULL COMMENT '权重(同一组权重总和=1)', + `THRESHOLD` decimal(16, 4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', + `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标详情'; + +-- ---------------------------- +-- Table structure for index_group_detail_template +-- ---------------------------- +DROP TABLE IF EXISTS `index_group_detail_template`; +CREATE TABLE `index_group_detail_template` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group_template.id', + `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', + `WEIGHT` decimal(5, 4) NOT NULL COMMENT '权重(同一组权重总和=1)', + `THRESHOLD` decimal(16, 4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', + `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', + `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', + `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标详情'; + +-- ---------------------------- +-- Table structure for index_group_template +-- ---------------------------- +DROP TABLE IF EXISTS `index_group_template`; +CREATE TABLE `index_group_template` +( + `ID` varchar(64) NOT NULL COMMENT '主键id', + `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', + `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', + `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', + `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标分组'; + +SET FOREIGN_KEY_CHECKS = 1; From 62d097893fd370f2692db687eaeb4a649b446594 Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 12 Sep 2020 09:20:40 +0800 Subject: [PATCH 068/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9epmet-admin=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84jar=E5=90=8D=E7=A7=B0=EF=BC=8C=E7=94=B1app.ja?= =?UTF-8?q?r->epmet-admin.jar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-admin/epmet-admin-server/Dockerfile | 2 +- epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml | 2 +- epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml | 2 +- epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-admin/epmet-admin-server/Dockerfile b/epmet-admin/epmet-admin-server/Dockerfile index c0b3c72e27..63927bad16 100644 --- a/epmet-admin/epmet-admin-server/Dockerfile +++ b/epmet-admin/epmet-admin-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-admin.jar EXPOSE 8082 diff --git a/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml b/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml index 1b77c09bda..f86422e850 100644 --- a/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml +++ b/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml b/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml index e5d93e9ac3..e9d8d41470 100644 --- a/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml +++ b/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-admin.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml b/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml index 6ae49f3aa3..575e1267c8 100644 --- a/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml +++ b/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar" restart: "unless-stopped" deploy: resources: From a3657d869a147cbf1b27b6c28c25ea99de8b46e6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 09:41:33 +0800 Subject: [PATCH 069/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/epmet-common-service/common-service-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index a81498d9a8..b22388767b 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -178,7 +178,7 @@ --> 8103 - dev + test From 0b4a7ae413c4c4cff01ed53d690e961ca6b2112b Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 09:55:48 +0800 Subject: [PATCH 070/150] =?UTF-8?q?=E5=8A=A0=E5=BC=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/DeptScoreServiceImpl.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index b918968ce5..b133615512 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -17,7 +17,6 @@ package com.epmet.service.evaluationindex.indexcal.impl; -import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; @@ -31,7 +30,9 @@ import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao; -import com.epmet.dto.indexcal.*; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.DeotScore; +import com.epmet.dto.indexcal.DeptScoreDetailDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; @@ -260,7 +261,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl { if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 - String sampleValueStr =String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.DEPT_ID), new BigDecimal(sampleValueStr)); indexInputVO.getIndexValueVOs().add(currentGridIndexValue); @@ -270,8 +271,10 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap = gridCorreLationService.calculate(indexMap); - //保存中间表记录 - this.saveDeptScoreEntity(formDTO,resultMap); + if (!CollectionUtils.isEmpty(resultMap)) { + //保存中间表记录 + this.saveDeptScoreEntity(formDTO, resultMap); + } } /** From 117c54a5125638939272a9a8eea8e7b796d9e82a Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 12 Sep 2020 10:03:49 +0800 Subject: [PATCH 071/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E5=B0=86app.jar->xxx.jar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/Dockerfile | 2 +- epmet-auth/deploy/docker-compose-dev.yml | 2 +- epmet-auth/deploy/docker-compose-prod.yml | 2 +- epmet-auth/deploy/docker-compose-test.yml | 2 +- epmet-gateway/Dockerfile | 2 +- epmet-gateway/deploy/docker-compose-dev.yml | 2 +- epmet-gateway/deploy/docker-compose-prod.yml | 2 +- epmet-gateway/deploy/docker-compose-test.yml | 2 +- epmet-module/data-report/data-report-server/Dockerfile | 2 +- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- .../data-report-server/deploy/docker-compose-prod.yml | 2 +- .../data-report-server/deploy/docker-compose-test.yml | 2 +- .../data-statistical/data-statistical-server/Dockerfile | 2 +- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- .../data-statistical-server/deploy/docker-compose-prod.yml | 2 +- .../data-statistical-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile | 2 +- .../epmet-activiti-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-activiti-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-activiti-server/deploy/docker-compose-test.yml | 2 +- .../epmet-common-service/common-service-server/Dockerfile | 2 +- .../common-service-server/deploy/docker-compose-dev.yml | 2 +- .../common-service-server/deploy/docker-compose-prod.yml | 2 +- .../common-service-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-ext/epmet-ext-server/Dockerfile | 2 +- .../epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-ext/epmet-ext-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-heart/epmet-heart-server/Dockerfile | 2 +- .../epmet-heart-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-heart-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-heart-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-job/epmet-job-server/Dockerfile | 2 +- .../epmet-job/epmet-job-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-job/epmet-job-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-job/epmet-job-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-message/epmet-message-server/Dockerfile | 2 +- .../epmet-message-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-message-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-message-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-oss/epmet-oss-server/Dockerfile | 2 +- .../epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-point/epmet-point-server/Dockerfile | 2 +- .../epmet-point-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-point-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-point-server/deploy/docker-compose-test.yml | 2 +- epmet-module/epmet-third/epmet-third-server/Dockerfile | 2 +- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-access/gov-access-server/Dockerfile | 2 +- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- .../gov-access/gov-access-server/deploy/docker-compose-prod.yml | 2 +- .../gov-access/gov-access-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-grid/gov-grid-server/Dockerfile | 2 +- .../gov-grid/gov-grid-server/deploy/docker-compose-dev.yml | 2 +- .../gov-grid/gov-grid-server/deploy/docker-compose-prod.yml | 2 +- .../gov-grid/gov-grid-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-issue/gov-issue-server/Dockerfile | 2 +- .../gov-issue/gov-issue-server/deploy/docker-compose-dev.yml | 2 +- .../gov-issue/gov-issue-server/deploy/docker-compose-prod.yml | 2 +- .../gov-issue/gov-issue-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-mine/gov-mine-server/Dockerfile | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-dev.yml | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-prod.yml | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-org/gov-org-server/Dockerfile | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-prod.yml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-test.yml | 2 +- .../gov-project-server/deploy/docker-compose-dev.yml | 2 +- .../gov-project-server/deploy/docker-compose-prod.yml | 2 +- .../gov-project-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-voice/gov-voice-server/Dockerfile | 2 +- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- .../gov-voice/gov-voice-server/deploy/docker-compose-prod.yml | 2 +- .../gov-voice/gov-voice-server/deploy/docker-compose-test.yml | 2 +- epmet-module/oper-access/oper-access-server/Dockerfile | 2 +- .../oper-access-server/deploy/docker-compose-dev.yml | 2 +- .../oper-access-server/deploy/docker-compose-prod.yml | 2 +- .../oper-access-server/deploy/docker-compose-test.yml | 2 +- epmet-module/oper-crm/oper-crm-server/Dockerfile | 2 +- .../oper-crm/oper-crm-server/deploy/docker-compose-dev.yml | 2 +- .../oper-crm/oper-crm-server/deploy/docker-compose-prod.yml | 2 +- .../oper-crm/oper-crm-server/deploy/docker-compose-test.yml | 2 +- epmet-module/oper-customize/oper-customize-server/Dockerfile | 2 +- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- .../oper-customize-server/deploy/docker-compose-prod.yml | 2 +- .../oper-customize-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-group/resi-group-server/Dockerfile | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-dev.yml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-prod.yml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-guide/resi-guide-server/Dockerfile | 2 +- .../resi-guide/resi-guide-server/deploy/docker-compose-dev.yml | 2 +- .../resi-guide/resi-guide-server/deploy/docker-compose-prod.yml | 2 +- .../resi-guide/resi-guide-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-hall/resi-hall-server/Dockerfile | 2 +- .../resi-hall/resi-hall-server/deploy/docker-compose-dev.yml | 2 +- .../resi-hall/resi-hall-server/deploy/docker-compose-prod.yml | 2 +- .../resi-hall/resi-hall-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-home/resi-home-server/Dockerfile | 2 +- .../resi-home/resi-home-server/deploy/docker-compose-dev.yml | 2 +- .../resi-home/resi-home-server/deploy/docker-compose-prod.yml | 2 +- .../resi-home/resi-home-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-mine/resi-mine-server/Dockerfile | 2 +- .../resi-mine/resi-mine-server/deploy/docker-compose-dev.yml | 2 +- .../resi-mine/resi-mine-server/deploy/docker-compose-prod.yml | 2 +- .../resi-mine/resi-mine-server/deploy/docker-compose-test.yml | 2 +- .../resi-partymember/resi-partymember-server/Dockerfile | 2 +- .../resi-partymember-server/deploy/docker-compose-dev.yml | 2 +- .../resi-partymember-server/deploy/docker-compose-prod.yml | 2 +- .../resi-partymember-server/deploy/docker-compose-test.yml | 2 +- epmet-module/resi-voice/resi-voice-server/Dockerfile | 2 +- .../resi-voice/resi-voice-server/deploy/docker-compose-dev.yml | 2 +- .../resi-voice/resi-voice-server/deploy/docker-compose-prod.yml | 2 +- .../resi-voice/resi-voice-server/deploy/docker-compose-test.yml | 2 +- epmet-openapi/epmet-openapi-scan/Dockerfile | 2 +- epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml | 2 +- epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml | 2 +- epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml | 2 +- epmet-user/epmet-user-server/Dockerfile | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-test.yml | 2 +- 127 files changed, 127 insertions(+), 127 deletions(-) diff --git a/epmet-auth/Dockerfile b/epmet-auth/Dockerfile index c106eaf299..207ac66a19 100644 --- a/epmet-auth/Dockerfile +++ b/epmet-auth/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-auth.jar EXPOSE 8081 diff --git a/epmet-auth/deploy/docker-compose-dev.yml b/epmet-auth/deploy/docker-compose-dev.yml index f533348156..0ee4421f6f 100644 --- a/epmet-auth/deploy/docker-compose-dev.yml +++ b/epmet-auth/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-auth.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-auth/deploy/docker-compose-prod.yml b/epmet-auth/deploy/docker-compose-prod.yml index afffcf2474..b9387658c5 100644 --- a/epmet-auth/deploy/docker-compose-prod.yml +++ b/epmet-auth/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-auth.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-auth/deploy/docker-compose-test.yml b/epmet-auth/deploy/docker-compose-test.yml index bfc9acc44b..e4aab166ec 100644 --- a/epmet-auth/deploy/docker-compose-test.yml +++ b/epmet-auth/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./epmet-auth.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-gateway/Dockerfile b/epmet-gateway/Dockerfile index a237b2929f..fad72ba2ca 100644 --- a/epmet-gateway/Dockerfile +++ b/epmet-gateway/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-gateway.jar EXPOSE 8080 diff --git a/epmet-gateway/deploy/docker-compose-dev.yml b/epmet-gateway/deploy/docker-compose-dev.yml index 3329f89b6d..ad7aa38516 100644 --- a/epmet-gateway/deploy/docker-compose-dev.yml +++ b/epmet-gateway/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-gateway.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-gateway/deploy/docker-compose-prod.yml b/epmet-gateway/deploy/docker-compose-prod.yml index c5c27e870b..412df3aa53 100644 --- a/epmet-gateway/deploy/docker-compose-prod.yml +++ b/epmet-gateway/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-gateway.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-gateway/deploy/docker-compose-test.yml b/epmet-gateway/deploy/docker-compose-test.yml index 57a4913b0e..b0b7024f33 100644 --- a/epmet-gateway/deploy/docker-compose-test.yml +++ b/epmet-gateway/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-gateway.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-report/data-report-server/Dockerfile b/epmet-module/data-report/data-report-server/Dockerfile index 1f773a109f..abb03ca056 100644 --- a/epmet-module/data-report/data-report-server/Dockerfile +++ b/epmet-module/data-report/data-report-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./data-report.jar EXPOSE 8109 diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 2d85c451a1..8be97cd85a 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-report.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml index 8fdb335fda..360131c836 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./data-report.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml index 78d38da205..8917a4f9e9 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-report.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-statistical/data-statistical-server/Dockerfile b/epmet-module/data-statistical/data-statistical-server/Dockerfile index e592acbf38..074bc1d2de 100644 --- a/epmet-module/data-statistical/data-statistical-server/Dockerfile +++ b/epmet-module/data-statistical/data-statistical-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./data-stats.jar EXPOSE 8108 diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 36afabff51..7fca5294dc 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-stats.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index b62847d615..c090336d36 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./data-stats.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml index 075a43a0af..9db2c8177e 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-stats.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile b/epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile index a1d2ad6f1a..40a62488b2 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile +++ b/epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-activiti.jar EXPOSE 8086 diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml index 8c5dcd8823..d2925901c9 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-activiti.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml index ce9db6deb1..088bfeb2dd 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-activiti.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml index aea13ac662..74e66105f0 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-activiti.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-common-service/common-service-server/Dockerfile b/epmet-module/epmet-common-service/common-service-server/Dockerfile index 46b45ca2e0..fe3d1a6f63 100644 --- a/epmet-module/epmet-common-service/common-service-server/Dockerfile +++ b/epmet-module/epmet-common-service/common-service-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./common-service.jar EXPOSE 8103 diff --git a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml index 047408c5df..e575112640 100644 --- a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./common-service.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml index 1a43e02ffb..acc32b8306 100644 --- a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./common-service.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml index 80cb75cbb5..c3ed2186f6 100644 --- a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./common-service.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-ext/epmet-ext-server/Dockerfile b/epmet-module/epmet-ext/epmet-ext-server/Dockerfile index 2a18b4bf3a..d6734953ee 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/Dockerfile +++ b/epmet-module/epmet-ext/epmet-ext-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-ext.jar EXPOSE 8113 diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml index 392769e158..7792a04b31 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-ext.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml index 709b384c7a..bf71f1b198 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-ext.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-test.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-test.yml index 36c753627a..90c7053d1f 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-ext.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-heart/epmet-heart-server/Dockerfile b/epmet-module/epmet-heart/epmet-heart-server/Dockerfile index 696964e45a..94fd0f1809 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/Dockerfile +++ b/epmet-module/epmet-heart/epmet-heart-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-heart.jar EXPOSE 8090 diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index 4d32065b75..53e5098667 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-heart.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml index 297fb4a40f..df1de492cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-heart.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml index a5cef7fb1f..e259e170a4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-heart.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-job/epmet-job-server/Dockerfile b/epmet-module/epmet-job/epmet-job-server/Dockerfile index 890caf7ec9..283ed5f94b 100644 --- a/epmet-module/epmet-job/epmet-job-server/Dockerfile +++ b/epmet-module/epmet-job/epmet-job-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-job.jar EXPOSE 8084 diff --git a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml index eb9aa984f8..c9999c47d8 100644 --- a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-job.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-prod.yml index 4816a4cd30..7e5a917177 100644 --- a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-job.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-test.yml b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-test.yml index 5c02cae59e..a245199249 100644 --- a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-job.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-message/epmet-message-server/Dockerfile b/epmet-module/epmet-message/epmet-message-server/Dockerfile index 1a3aea849b..49f97b4c0e 100644 --- a/epmet-module/epmet-message/epmet-message-server/Dockerfile +++ b/epmet-module/epmet-message/epmet-message-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-message.jar EXPOSE 8085 diff --git a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml index 6edefa45a8..5ab5ecb83d 100644 --- a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-message.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml index 360d07d79e..67da25bdf4 100644 --- a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-message.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml index bbda7e873c..7630cefa81 100644 --- a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-message.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-oss/epmet-oss-server/Dockerfile b/epmet-module/epmet-oss/epmet-oss-server/Dockerfile index 678d2b3ff2..ca3830ee6c 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/Dockerfile +++ b/epmet-module/epmet-oss/epmet-oss-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-oss.jar EXPOSE 8083 diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml index 2a5fc11a89..2fa7b84b34 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml @@ -10,7 +10,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-oss.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml index dbb2282e8e..5fae8446ce 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-prod.yml @@ -10,7 +10,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-oss.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml index 4dc76991bb..3a7181f4a8 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml @@ -10,7 +10,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-oss.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-point/epmet-point-server/Dockerfile b/epmet-module/epmet-point/epmet-point-server/Dockerfile index 696964e45a..eccf5af01b 100644 --- a/epmet-module/epmet-point/epmet-point-server/Dockerfile +++ b/epmet-module/epmet-point/epmet-point-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-point.jar EXPOSE 8090 diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml index 615c0d0b94..f9c7734508 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-point.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml index 8fff39478d..9797b08b02 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-point.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml index 4a175b6c3f..a4cc8a4af1 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-point.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-third/epmet-third-server/Dockerfile b/epmet-module/epmet-third/epmet-third-server/Dockerfile index d0fef3d421..af31808436 100644 --- a/epmet-module/epmet-third/epmet-third-server/Dockerfile +++ b/epmet-module/epmet-third/epmet-third-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-third.jar EXPOSE 8110 diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index d9ab7469c0..c35cda57a7 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-third.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index 7d3cbbf9c4..89160aed2c 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-third.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index 9b72f3c260..13c5787cf7 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-third.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-access/gov-access-server/Dockerfile b/epmet-module/gov-access/gov-access-server/Dockerfile index 3ef453e6ca..660d423d2b 100644 --- a/epmet-module/gov-access/gov-access-server/Dockerfile +++ b/epmet-module/gov-access/gov-access-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-access.jar EXPOSE 8099 diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index 6f7c7fe6d8..75fbb038c9 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml index 72ebb1216f..ababaa4a99 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml index 2bbc8ec394..b7e4bcfdf0 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-grid/gov-grid-server/Dockerfile b/epmet-module/gov-grid/gov-grid-server/Dockerfile index def4428089..0151c7accb 100644 --- a/epmet-module/gov-grid/gov-grid-server/Dockerfile +++ b/epmet-module/gov-grid/gov-grid-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-grid.jar EXPOSE 8097 diff --git a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml index d3ff3abf31..f9e02900e6 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-grid.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml index f842a906c8..f595a8eb2a 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-grid.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml index dfc9a03899..e01844b7fb 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-grid.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-issue/gov-issue-server/Dockerfile b/epmet-module/gov-issue/gov-issue-server/Dockerfile index c3261f957f..b40bf4b24e 100644 --- a/epmet-module/gov-issue/gov-issue-server/Dockerfile +++ b/epmet-module/gov-issue/gov-issue-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-issue.jar EXPOSE 8101 diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml index 1195217951..1f112f1abb 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-issue.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml index dd8ce37dfa..a24f850367 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-issue.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml index fc86765bf1..731ed393a6 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-issue.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-mine/gov-mine-server/Dockerfile b/epmet-module/gov-mine/gov-mine-server/Dockerfile index 583d3041e9..61472572db 100644 --- a/epmet-module/gov-mine/gov-mine-server/Dockerfile +++ b/epmet-module/gov-mine/gov-mine-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-mine.jar EXPOSE 8098 diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml index 9fce06f6fd..3bc86de1dc 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml index 7c1d15c36f..fb5899dbc5 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml index 3e88d5d67c..265d79c930 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-org/gov-org-server/Dockerfile b/epmet-module/gov-org/gov-org-server/Dockerfile index b079f1ff77..57ac019c29 100644 --- a/epmet-module/gov-org/gov-org-server/Dockerfile +++ b/epmet-module/gov-org/gov-org-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-org.jar EXPOSE 8092 diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 4d59daef61..902ce5e8d0 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-org.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml index 9418cc9ef2..08aec5c665 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-org.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml index f2be2009e9..d8a3a119a0 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-org.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml index 405b05715e..1d61afd8af 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-project.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml index e7aae13868..218398a4da 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-project.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml index 3a8c39669b..d7bf5d6939 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-project.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-voice/gov-voice-server/Dockerfile b/epmet-module/gov-voice/gov-voice-server/Dockerfile index 915e6100bc..3f3ecf336d 100644 --- a/epmet-module/gov-voice/gov-voice-server/Dockerfile +++ b/epmet-module/gov-voice/gov-voice-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-voice.jar EXPOSE 8105 diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index a188027a21..b301615811 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-prod.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-prod.yml index 1821a379dc..edf7b68936 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml index f1de18f7ed..85cace2d57 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-access/oper-access-server/Dockerfile b/epmet-module/oper-access/oper-access-server/Dockerfile index 48f2a3dea5..eb72900e52 100644 --- a/epmet-module/oper-access/oper-access-server/Dockerfile +++ b/epmet-module/oper-access/oper-access-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./oper-access.jar EXPOSE 8093 diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml index 1c81fdec99..c2fe2f3963 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml index 6c6bd28509..94231275a1 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./oper-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-test.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-test.yml index 97fcbe7dbb..0ef28f8ed5 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-test.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-access.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-crm/oper-crm-server/Dockerfile b/epmet-module/oper-crm/oper-crm-server/Dockerfile index 696964e45a..98146177a2 100644 --- a/epmet-module/oper-crm/oper-crm-server/Dockerfile +++ b/epmet-module/oper-crm/oper-crm-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./oper-crm.jar EXPOSE 8090 diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml index 1bc90fa0c0..ae71928e4e 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-crm.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml index a75df6848f..4f9efd0f12 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./oper-crm.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml index a2ceb4d72e..f0c305d782 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-crm.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-customize/oper-customize-server/Dockerfile b/epmet-module/oper-customize/oper-customize-server/Dockerfile index 08eccce004..d9b10d355b 100644 --- a/epmet-module/oper-customize/oper-customize-server/Dockerfile +++ b/epmet-module/oper-customize/oper-customize-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./oper-customize.jar EXPOSE 8089 diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 91e39f33c5..b0df052225 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-customize.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml index 0b2cba4848..8a3c6771b2 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./oper-customize.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml index 459037c1e6..ff15600fc8 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./oper-customize.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-group/resi-group-server/Dockerfile b/epmet-module/resi-group/resi-group-server/Dockerfile index b4a767cfc8..b1fd9f6fab 100644 --- a/epmet-module/resi-group/resi-group-server/Dockerfile +++ b/epmet-module/resi-group/resi-group-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-group.jar EXPOSE 8095 diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml index 29a259a5d2..7a0d7418f8 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-group.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml index a4aecd5dbf..1ac691b016 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-group.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml index f88d341ad0..73a38f0279 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./resi-group.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-guide/resi-guide-server/Dockerfile b/epmet-module/resi-guide/resi-guide-server/Dockerfile index 10b908b3bf..b305936b9e 100644 --- a/epmet-module/resi-guide/resi-guide-server/Dockerfile +++ b/epmet-module/resi-guide/resi-guide-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-guide.jar EXPOSE 8091 diff --git a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml index f65e0d6954..902a0e4bb6 100644 --- a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-guide.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml index cfac504f95..9cadb53ff2 100644 --- a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-guide.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml index 2f769d6a98..c4a3d796f0 100644 --- a/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-guide.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-hall/resi-hall-server/Dockerfile b/epmet-module/resi-hall/resi-hall-server/Dockerfile index 59cacab9be..c1ec1e0ba0 100644 --- a/epmet-module/resi-hall/resi-hall-server/Dockerfile +++ b/epmet-module/resi-hall/resi-hall-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-hall.jar EXPOSE 8100 diff --git a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml index 4ded433cc3..b85358a70e 100644 --- a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-hall.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-prod.yml b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-prod.yml index 5effa21314..21b8308936 100644 --- a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-hall.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-test.yml b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-test.yml index 7727b4788c..6d675b03b8 100644 --- a/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-hall.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-home/resi-home-server/Dockerfile b/epmet-module/resi-home/resi-home-server/Dockerfile index 00ce6c09fe..2917a9be89 100644 --- a/epmet-module/resi-home/resi-home-server/Dockerfile +++ b/epmet-module/resi-home/resi-home-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-home.jar EXPOSE 8104 diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml index fa06f9f3c3..e0cdb9b16c 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-home.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-prod.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-prod.yml index e4dbbe5a60..50abf2bb7b 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-home.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml index 3374b39296..754c7d9398 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-home.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-mine/resi-mine-server/Dockerfile b/epmet-module/resi-mine/resi-mine-server/Dockerfile index 1278acc61a..5237c843ec 100644 --- a/epmet-module/resi-mine/resi-mine-server/Dockerfile +++ b/epmet-module/resi-mine/resi-mine-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-mine.jar EXPOSE 8094 diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml index 420beafcf5..57e2434372 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml index 3c154c7eec..3f125978dc 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml index f5643beb81..2fa05668ea 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-mine.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-partymember/resi-partymember-server/Dockerfile b/epmet-module/resi-partymember/resi-partymember-server/Dockerfile index 98190f2cd2..11a783524f 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/Dockerfile +++ b/epmet-module/resi-partymember/resi-partymember-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-partymember.jar EXPOSE 8096 diff --git a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml index 80b020b242..680f45f751 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-partymember.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml index 65ad6ccbc8..89ec555713 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-partymember.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-test.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-test.yml index 6770043a38..8ca40ddf75 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-partymember.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-voice/resi-voice-server/Dockerfile b/epmet-module/resi-voice/resi-voice-server/Dockerfile index ae49b60d2b..abb56beb1c 100644 --- a/epmet-module/resi-voice/resi-voice-server/Dockerfile +++ b/epmet-module/resi-voice/resi-voice-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./resi-voice.jar EXPOSE 8106 diff --git a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-dev.yml b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-dev.yml index 7a023873b2..b92e25f3c6 100644 --- a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./resi-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-prod.yml b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-prod.yml index a32d313f2d..6962aaca73 100644 --- a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./resi-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-test.yml b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-test.yml index 187294fb94..d37cc30473 100644 --- a/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-voice/resi-voice-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./resi-voice.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-openapi/epmet-openapi-scan/Dockerfile b/epmet-openapi/epmet-openapi-scan/Dockerfile index e619f718b9..972fb78535 100644 --- a/epmet-openapi/epmet-openapi-scan/Dockerfile +++ b/epmet-openapi/epmet-openapi-scan/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-openapi-scan.jar EXPOSE 8107 diff --git a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml index 1e20c49e26..7593b66a08 100644 --- a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml +++ b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-scan.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml index 693ba1cb4c..69873777e7 100644 --- a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml +++ b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-openapi-scan.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml index 4c9bbec505..37c53b9557 100644 --- a/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml +++ b/epmet-openapi/epmet-openapi-scan/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-scan.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-user/epmet-user-server/Dockerfile b/epmet-user/epmet-user-server/Dockerfile index 2495f36a46..a105a5bb0e 100644 --- a/epmet-user/epmet-user-server/Dockerfile +++ b/epmet-user/epmet-user-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./epmet-user.jar EXPOSE 8087 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index e1af81c0ce..0a8be8c147 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/dev:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-user.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index 183968322f..08e09c8b18 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-user.jar" restart: "unless-stopped" deploy: resources: diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index 0dfe4fac89..eb18d181c1 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -9,7 +9,7 @@ services: volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-user.jar" restart: "unless-stopped" deploy: resources: From 4c7fc33f49b79469c14d4b54669a1703fe9797cd Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 10:33:59 +0800 Subject: [PATCH 072/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deploy/docker-compose-prod.yml | 4 +- .../FactIndexPartyAblityCpcMonthlyDao.java | 7 +- .../impl/CpcIndexCalculateServiceImpl.java | 8 +- .../impl/IndexCalculateServiceImpl.java | 21 +- .../db/migration/V0.0.3__add_index_table.sql | 1347 +++++++++-------- .../FactIndexPartyAblityCpcMonthlyDao.xml | 4 +- 6 files changed, 705 insertions(+), 686 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index c090336d36..1d4ef09c3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -9,10 +9,10 @@ services: volumes: - "/opt/epmet-cloud-logs/prod:/logs" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./data-stats.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx1024m -jar ./data-stats.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 600M \ No newline at end of file + memory: 1100M \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index ffdc533581..824b7a04a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -19,7 +19,6 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataDetailFormDTO; -import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -46,7 +45,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, - @Param("customerId") String customerId); + @Param("customerId") String customerId); List> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize); - Map getExtremeValue(@Param("customerId") String customerId); + Map getExtremeValue(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 07c268be31..7c2f3dc367 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -90,7 +90,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); pageNo++; if (CollectionUtils.isEmpty(list)) { - log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); } else { //获取最后一条 currentLastCpcScore = list.get(list.size() - 1); @@ -182,7 +182,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private void calculatePartScore(CalculateCommonFormDTO formDTO) { //计算最大最小值 - Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); + Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); throw new RenException("指标原始数据记录不存在"); @@ -198,9 +198,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { int pageSize = IndexCalConstant.PAGE_SIZE; //分页查询 要计算的原始数据 List> list = null; - groupIndexDetailsMap.keySet().forEach(indexCode -> { - deleteOldData(formDTO, indexCode); - }); + groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode)); do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 1a3f3c0e3c..48b8b46e31 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.dto.indexcal.CalculateCommonFormDTO; @@ -78,30 +77,27 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { try { CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); flag = cpcIndexCalculateService.cpcIndexCalculate(param); - log.info("indexCalculate cpcIndexCalculate return result:{}", flag); + log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate cpcIndexCalculate exception", e); throw new RenException("indexCalculate cpcIndexCalculate exception", e); } //测试用 - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【党员相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); //计算网格 start = System.currentTimeMillis(); try { flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); - log.info("indexCalculate calculateGridCorreLation return result:{}", flag); + log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calculateGridCorreLation exception", e); throw new RenException("indexCalculate calculateGridCorreLation exception", e); } - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【网格相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); //计算社区 start = System.currentTimeMillis(); try { flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); - log.info("indexCalculate calCommunityAll return result:{}", flag); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【社区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calCommunityAll exception", e); throw new RenException("indexCalculate calAll exception", e); @@ -111,8 +107,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { start = System.currentTimeMillis(); try { flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); - log.info("indexCalculate calStreetAll return result:{}", flag); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【街道相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calStreetAll exception", e); throw new RenException("indexCalculate calStreetAll exception", e); @@ -122,8 +117,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { start = System.currentTimeMillis(); try { flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); - log.info("indexCalculate calculateDeptCorreLation return result:{}", flag); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【区直部门】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calculateDeptCorreLation exception", e); throw new RenException("indexCalculate calculateDeptCorreLation exception", e); @@ -133,8 +127,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { start = System.currentTimeMillis(); try { indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); - log.info("indexCalculate calDistrictAll return result:{}", flag); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【全区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); } catch (Exception e) { log.error("indexCalculate calDistrictAll exception", e); throw new RenException("indexCalculate calDistrictAll exception", e); @@ -148,7 +141,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { start = System.currentTimeMillis(); try { factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 分数插入到大屏显示库完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); } catch (Exception e) { log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); flag = false; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql index ccc953838e..6a6ca63849 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql @@ -1,660 +1,687 @@ -/* - Navicat Premium Data Transfer - - Source Server : 亿联开发 - Source Server Type : MySQL - Source Server Version : 50728 - Source Host : 192.168.1.130:3306 - Source Schema : epmet_evaluation_index - - Target Server Type : MySQL - Target Server Version : 50728 - File Encoding : 65001 - - Date: 12/09/2020 09:10:38 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for fact_index_agency_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_agency_score`; -CREATE TABLE `fact_index_agency_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', - `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', - `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='区/街道相关分数表 '; - --- ---------------------------- --- Table structure for fact_index_agency_sub_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_agency_sub_score`; -CREATE TABLE `fact_index_agency_sub_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', - `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='区/街道相关分数表 '; - --- ---------------------------- --- Table structure for fact_index_community_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_community_score`; -CREATE TABLE `fact_index_community_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', - `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(1) NOT NULL, - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='社区相关分数表 '; - --- ---------------------------- --- Table structure for fact_index_community_sub_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_community_sub_score`; -CREATE TABLE `fact_index_community_sub_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', - `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(1) NOT NULL, - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='社区相关分数表 '; - --- ---------------------------- --- Table structure for fact_index_cpc_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_cpc_score`; -CREATE TABLE `fact_index_cpc_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `USER_ID` varchar(64) NOT NULL COMMENT '用户id', - `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是 默认0', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='党员相关分值'; - --- ---------------------------- --- Table structure for fact_index_cpc_sub_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_cpc_sub_score`; -CREATE TABLE `fact_index_cpc_sub_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `USER_ID` varchar(64) NOT NULL COMMENT '用户id', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='党员相关分值'; - --- ---------------------------- --- Table structure for fact_index_dept_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_dept_score`; -CREATE TABLE `fact_index_dept_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', - `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;区直部门:quzhibumen', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='区直部门分值表'; - --- ---------------------------- --- Table structure for fact_index_dept_sub_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_dept_sub_score`; -CREATE TABLE `fact_index_dept_sub_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', - `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='区直部门分值表'; - --- ---------------------------- --- Table structure for fact_index_govrn_ablity_dept_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_govrn_ablity_dept_monthly`; -CREATE TABLE `fact_index_govrn_ablity_dept_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '部门所属机关Id', - `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', - `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门被吹哨次数', - `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门办结项目数', - `RESP_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门项目响应度 所有被吹哨后的滞留时间除以项目数', - `HANDLE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门办结项目的处理效率', - `CLOSED_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '区直部门项目办结率', - `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目满意度', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-区直部门相关数据 '; - --- ---------------------------- --- Table structure for fact_index_govrn_ablity_grid_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_govrn_ablity_grid_monthly`; -CREATE TABLE `fact_index_govrn_ablity_grid_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属机关Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', - `ISSUE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总议题数', - `AVG_ISSUE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格人均议题数目', - `ISSUE_TO_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格议题转项目率', - `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总项目数', - `SELF_SOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格自治项目数 统计期网格自身内办结的项目数目', - `RESOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格办结项目数 统计期内办结的项目数目', - `TRANSFER_RIGHT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格吹哨部门准确率', - `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '网格内解决的项目的满意度', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-网格相关事实表 '; - --- ---------------------------- --- Table structure for fact_index_govrn_ablity_org_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_govrn_ablity_org_monthly`; -CREATE TABLE `fact_index_govrn_ablity_org_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', - `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id,如果是根级组织,此列为0', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', - `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', - `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '被吹哨次数', - `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '办结项目数', - `RESP_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '项目响应度 所有被吹哨后的滞留时间除以项目数', - `OVERDUE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '社区超期项目率,dataTyp=commnuity有值', - `CLOSED_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目率', - `SATISFACTION_RATIO` decimal(10, 6) NOT NULL COMMENT '办结项目满意度', - `HANDLE_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '街道办结项目的处理效率, data_type=street时有值', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='治理能力-街道及社区相关数据 '; - --- ---------------------------- --- Table structure for fact_index_grid_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_grid_score`; -CREATE TABLE `fact_index_grid_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', - `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='网格相关分值记录表'; - --- ---------------------------- --- Table structure for fact_index_grid_sub_score --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_grid_sub_score`; -CREATE TABLE `fact_index_grid_sub_score` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', - `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', - `SCORE` decimal(10, 6) NOT NULL COMMENT '分值', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='网格相关分值记录表'; - --- ---------------------------- --- Table structure for fact_index_party_ablity_cpc_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_party_ablity_cpc_monthly`; -CREATE TABLE `fact_index_party_ablity_cpc_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', - `PARENT_ID` varchar(64) DEFAULT NULL COMMENT 'agency_id的上级组织Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '党员所属的网格Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id : yyyy', - `USER_ID` varchar(64) NOT NULL COMMENT '用户id', - `CREATE_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员提出的话题数', - `JOIN_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员参与话题数(支持,反对,评论,浏览)', - `SHIFT_ISSUE_COUNT` int(11) NOT NULL COMMENT '党员提出的话题转议题数', - `SHIFT_PROJECT_COUNT` int(11) NOT NULL COMMENT '党员提出的议题转项目数', - `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '参加三会一课次数', - `GROUP_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群群众人数', - `GROUP_ACTIVE_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃群众人数(08-24)', - `GROUP_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃度——话题数', - `TOPIC_TO_ISSUE_RATIO` decimal(10, 6) NOT NULL COMMENT '自建群活跃度——议题转项目率', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-党员相关的事实表 '; - --- ---------------------------- --- Table structure for fact_index_party_ablity_grid_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_party_ablity_grid_monthly`; -CREATE TABLE `fact_index_party_ablity_grid_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Idyyyy', - `USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众用户数', - `PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员用户数', - `ACTIVE_USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃群众用户数', - `ACTIVE_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃党员用户数', - `PARTY_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出话题数', - `USER_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出话题数', - `PARTY_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出的议题转项目数', - `USER_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出的议题转项目数', - `CREATE_GROUP_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '建群党员数(累计值) 去重', - `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格发文数', - `ISSUE_TO_PROJECT_RATIO` decimal(10, 6) NOT NULL COMMENT '网格议题转项目率', - `CREATE_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '组织三会一课次数', - `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '党员参加三会一课人次', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-网格相关事实表 '; - --- ---------------------------- --- Table structure for fact_index_party_ablity_org_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_party_ablity_org_monthly`; -CREATE TABLE `fact_index_party_ablity_org_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', - `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id', - `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', - `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT 'XXX名义发文数', - `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型district :全区;community:社区;street:街道', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='党建能力-街道及社区相关事实表 '; - --- ---------------------------- --- Table structure for fact_index_service_ablity_grid_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_service_ablity_grid_monthly`; -CREATE TABLE `fact_index_service_ablity_grid_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属组织Id', - `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id: yyyy', - `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活动组织次数 爱心活动', - `VOLUNTEER_RATIO` decimal(10, 6) NOT NULL COMMENT '网格志愿者占比', - `PARTY_VOLUNTEER_RATIO` decimal(10, 6) NOT NULL COMMENT '网格党员志愿者率', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='服务能力-网格相关事实表'; - --- ---------------------------- --- Table structure for fact_index_service_ablity_org_monthly --- ---------------------------- -DROP TABLE IF EXISTS `fact_index_service_ablity_org_monthly`; -CREATE TABLE `fact_index_service_ablity_org_monthly` -( - `ID` varchar(64) NOT NULL COMMENT 'ID 主键', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', - `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', - `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', - `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', - `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', - `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id:yyyy', - `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '社区/街道活动组织次数 爱心活动', - `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', - `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='服务能力-组织(街道|社区|全区)相关事实表 '; - --- ---------------------------- --- Table structure for index_code_field_re --- ---------------------------- -DROP TABLE IF EXISTS `index_code_field_re`; -CREATE TABLE `index_code_field_re` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `INDEX_CODE` varchar(256) NOT NULL COMMENT '指标code', - `FIELD_ID` varchar(32) DEFAULT '' COMMENT '是否启用:启用:enable 禁用:disabled', - `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE, - UNIQUE KEY `unx_index_code` (`INDEX_CODE`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='指标code和原始数据对应的字段关系表'; - --- ---------------------------- --- Table structure for index_dict --- ---------------------------- -DROP TABLE IF EXISTS `index_dict`; -CREATE TABLE `index_dict` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `INDEX_NAME` varchar(255) NOT NULL COMMENT '指标名', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', - `INDEX_DESC` varchar(1024) DEFAULT NULL COMMENT '指标描述', - `LEVEL` varchar(1) NOT NULL COMMENT '指标级别(1,2,3,4,5)', - `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='评价指标字典'; - --- ---------------------------- --- Table structure for index_group --- ---------------------------- -DROP TABLE IF EXISTS `index_group`; -CREATE TABLE `index_group` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', - `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', - `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', - `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标分组'; - --- ---------------------------- --- Table structure for index_group_detail --- ---------------------------- -DROP TABLE IF EXISTS `index_group_detail`; -CREATE TABLE `index_group_detail` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', - `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group.id', - `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', - `WEIGHT` decimal(5, 4) NOT NULL COMMENT '权重(同一组权重总和=1)', - `THRESHOLD` decimal(16, 4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', - `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标详情'; - --- ---------------------------- --- Table structure for index_group_detail_template --- ---------------------------- -DROP TABLE IF EXISTS `index_group_detail_template`; -CREATE TABLE `index_group_detail_template` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group_template.id', - `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', - `WEIGHT` decimal(5, 4) NOT NULL COMMENT '权重(同一组权重总和=1)', - `THRESHOLD` decimal(16, 4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', - `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', - `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', - `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标详情'; - --- ---------------------------- --- Table structure for index_group_template --- ---------------------------- -DROP TABLE IF EXISTS `index_group_template`; -CREATE TABLE `index_group_template` -( - `ID` varchar(64) NOT NULL COMMENT '主键id', - `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', - `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', - `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', - `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', - `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', - `REVISION` int(11) NOT NULL COMMENT '乐观锁', - `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', - `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', - `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='客户指标分组'; - -SET FOREIGN_KEY_CHECKS = 1; +# /* +# Navicat Premium Data Transfer +# +# Source Server : 亿联开发 +# Source Server Type : MySQL +# Source Server Version : 50728 +# Source Host : 192.168.1.130:3306 +# Source Schema : epmet_evaluation_index +# +# Target Server Type : MySQL +# Target Server Version : 50728 +# File Encoding : 65001 +# +# Date: 12/09/2020 09:10:38 +# */ +# +# SET NAMES utf8mb4; +# SET FOREIGN_KEY_CHECKS = 0; +# +# -- ---------------------------- +# -- Table structure for fact_index_agency_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_agency_score`; +# CREATE TABLE `fact_index_agency_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', +# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', +# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区/街道相关分数表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_agency_sub_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_agency_sub_score`; +# CREATE TABLE `fact_index_agency_sub_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)', +# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区/街道相关分数表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_community_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_community_score`; +# CREATE TABLE `fact_index_community_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', +# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(1) NOT NULL, +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='社区相关分数表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_community_sub_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_community_sub_score`; +# CREATE TABLE `fact_index_community_sub_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', +# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(1) NOT NULL, +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='社区相关分数表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_cpc_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_cpc_score`; +# CREATE TABLE `fact_index_cpc_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `USER_ID` varchar(64) NOT NULL COMMENT '用户id', +# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是 默认0', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党员相关分值'; +# +# -- ---------------------------- +# -- Table structure for fact_index_cpc_sub_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_cpc_sub_score`; +# CREATE TABLE `fact_index_cpc_sub_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `USER_ID` varchar(64) NOT NULL COMMENT '用户id', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党员相关分值'; +# +# -- ---------------------------- +# -- Table structure for fact_index_dept_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_dept_score`; +# CREATE TABLE `fact_index_dept_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', +# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;区直部门:quzhibumen', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区直部门分值表'; +# +# -- ---------------------------- +# -- Table structure for fact_index_dept_sub_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_dept_sub_score`; +# CREATE TABLE `fact_index_dept_sub_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', +# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区直部门分值表'; +# +# -- ---------------------------- +# -- Table structure for fact_index_govrn_ablity_dept_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_govrn_ablity_dept_monthly`; +# CREATE TABLE `fact_index_govrn_ablity_dept_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '部门所属机关Id', +# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', +# `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门被吹哨次数', +# `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门办结项目数', +# `RESP_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门项目响应度 所有被吹哨后的滞留时间除以项目数', +# `HANDLE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门办结项目的处理效率', +# `CLOSED_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门项目办结率', +# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目满意度', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-区直部门相关数据 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_govrn_ablity_grid_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_govrn_ablity_grid_monthly`; +# CREATE TABLE `fact_index_govrn_ablity_grid_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属机关Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', +# `ISSUE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总议题数', +# `AVG_ISSUE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格人均议题数目', +# `ISSUE_TO_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '网格议题转项目率', +# `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总项目数', +# `SELF_SOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格自治项目数 统计期网格自身内办结的项目数目', +# `RESOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格办结项目数 统计期内办结的项目数目', +# `TRANSFER_RIGHT_RATIO` decimal(10,6) NOT NULL COMMENT '网格吹哨部门准确率', +# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '网格内解决的项目的满意度', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-网格相关事实表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_govrn_ablity_org_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_govrn_ablity_org_monthly`; +# CREATE TABLE `fact_index_govrn_ablity_org_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', +# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id,如果是根级组织,此列为0', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy', +# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', +# `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '被吹哨次数', +# `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '办结项目数', +# `RESP_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '项目响应度 所有被吹哨后的滞留时间除以项目数', +# `OVERDUE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '社区超期项目率,dataTyp=commnuity有值', +# `CLOSED_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目率', +# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目满意度', +# `HANDLE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '街道办结项目的处理效率, data_type=street时有值', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-街道及社区相关数据 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_grid_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_grid_score`; +# CREATE TABLE `fact_index_grid_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', +# `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格相关分值记录表'; +# +# -- ---------------------------- +# -- Table structure for fact_index_grid_sub_score +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_grid_sub_score`; +# CREATE TABLE `fact_index_grid_sub_score` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id', +# `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM', +# `SCORE` decimal(10,6) NOT NULL COMMENT '分值', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格相关分值记录表'; +# +# -- ---------------------------- +# -- Table structure for fact_index_party_ablity_cpc_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_party_ablity_cpc_monthly`; +# CREATE TABLE `fact_index_party_ablity_cpc_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id', +# `PARENT_ID` varchar(64) DEFAULT NULL COMMENT 'agency_id的上级组织Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '党员所属的网格Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id : yyyy', +# `USER_ID` varchar(64) NOT NULL COMMENT '用户id', +# `CREATE_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员提出的话题数', +# `JOIN_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员参与话题数(支持,反对,评论,浏览)', +# `SHIFT_ISSUE_COUNT` int(11) NOT NULL COMMENT '党员提出的话题转议题数', +# `SHIFT_PROJECT_COUNT` int(11) NOT NULL COMMENT '党员提出的议题转项目数', +# `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '参加三会一课次数', +# `GROUP_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群群众人数', +# `GROUP_ACTIVE_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃群众人数(08-24)', +# `GROUP_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃度——话题数', +# `TOPIC_TO_ISSUE_RATIO` decimal(10,6) NOT NULL COMMENT '自建群活跃度——议题转项目率', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-党员相关的事实表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_party_ablity_grid_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_party_ablity_grid_monthly`; +# CREATE TABLE `fact_index_party_ablity_grid_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Idyyyy', +# `USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众用户数', +# `PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员用户数', +# `ACTIVE_USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃群众用户数', +# `ACTIVE_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃党员用户数', +# `PARTY_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出话题数', +# `USER_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出话题数', +# `PARTY_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出的议题转项目数', +# `USER_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出的议题转项目数', +# `CREATE_GROUP_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '建群党员数(累计值) 去重', +# `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格发文数', +# `ISSUE_TO_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '网格议题转项目率', +# `CREATE_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '组织三会一课次数', +# `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '党员参加三会一课人次', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-网格相关事实表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_party_ablity_org_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_party_ablity_org_monthly`; +# CREATE TABLE `fact_index_party_ablity_org_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id', +# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id', +# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', +# `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT 'XXX名义发文数', +# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型district :全区;community:社区;street:街道', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-街道及社区相关事实表 '; +# +# -- ---------------------------- +# -- Table structure for fact_index_service_ablity_grid_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_service_ablity_grid_monthly`; +# CREATE TABLE `fact_index_service_ablity_grid_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属组织Id', +# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id: yyyy', +# `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活动组织次数 爱心活动', +# `VOLUNTEER_RATIO` decimal(10,6) NOT NULL COMMENT '网格志愿者占比', +# `PARTY_VOLUNTEER_RATIO` decimal(10,6) NOT NULL COMMENT '网格党员志愿者率', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务能力-网格相关事实表'; +# +# -- ---------------------------- +# -- Table structure for fact_index_service_ablity_org_monthly +# -- ---------------------------- +# DROP TABLE IF EXISTS `fact_index_service_ablity_org_monthly`; +# CREATE TABLE `fact_index_service_ablity_org_monthly` ( +# `ID` varchar(64) NOT NULL COMMENT 'ID 主键', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', +# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', +# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', +# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM', +# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4', +# `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id:yyyy', +# `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '社区/街道活动组织次数 爱心活动', +# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道', +# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务能力-组织(街道|社区|全区)相关事实表 '; +# +# -- ---------------------------- +# -- Table structure for index_dict +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_dict`; +# CREATE TABLE `index_dict` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `INDEX_NAME` varchar(255) NOT NULL COMMENT '指标名', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', +# `INDEX_DESC` varchar(1024) DEFAULT NULL COMMENT '指标描述', +# `LEVEL` varchar(1) NOT NULL COMMENT '指标级别(1,2,3,4,5)', +# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评价指标字典'; +# +# -- ---------------------------- +# -- Table structure for index_group +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_group`; +# CREATE TABLE `index_group` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', +# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', +# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', +# `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标分组'; +# +# -- ---------------------------- +# -- Table structure for index_group_detail +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_group_detail`; +# CREATE TABLE `index_group_detail` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', +# `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group.id', +# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', +# `WEIGHT` decimal(5,4) NOT NULL COMMENT '权重(同一组权重总和=1)', +# `THRESHOLD` decimal(16,4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', +# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标详情'; +# +# -- ---------------------------- +# -- Table structure for index_group_detail_template +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_group_detail_template`; +# CREATE TABLE `index_group_detail_template` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group_template.id', +# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', +# `WEIGHT` decimal(5,4) NOT NULL COMMENT '权重(同一组权重总和=1)', +# `THRESHOLD` decimal(16,4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值', +# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开', +# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative', +# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标详情'; +# +# -- ---------------------------- +# -- Table structure for index_group_template +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_group_template`; +# CREATE TABLE `index_group_template` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id', +# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code', +# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled', +# `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0', +# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标分组'; +# +# -- ---------------------------- +# -- Table structure for index_code_field_re +# -- ---------------------------- +# DROP TABLE IF EXISTS `index_code_field_re`; +# CREATE TABLE `index_code_field_re` ( +# `ID` varchar(64) NOT NULL COMMENT '主键id', +# `INDEX_CODE` varchar(256) NOT NULL COMMENT '指标code', +# `FIELD_ID` varchar(32) DEFAULT '' COMMENT '是否启用:启用:enable 禁用:disabled', +# `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', +# `REVISION` int(11) NOT NULL COMMENT '乐观锁', +# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', +# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', +# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', +# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', +# PRIMARY KEY (`ID`) USING BTREE, +# UNIQUE KEY `unx_index_code` (`INDEX_CODE`) +# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标code和原始数据对应的字段关系表'; +# +# -- ---------------------------- +# -- Records of index_code_field_re +# -- ---------------------------- +# BEGIN; +# INSERT INTO `index_code_field_re` VALUES ('1', 'dangyuantichuhts', 'CREATE_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('10', 'wanggequnzhongyhs', 'USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('11', 'wanggedangyuanyhs', 'PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('12', 'wanggehuoyueqzyhs', 'ACTIVE_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('13', 'wanggehuoyuedyyhs', 'ACTIVE_PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('14', 'wanggedangyuanrjtchts', 'PARTY_AVG_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('15', 'wanggequnzhongrjtchts', 'USER_AVG_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('16', 'wanggedangyuanrjtcdytzxms', 'PARTY_AVG_SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('17', 'wanggequnzhongrjtcdytzxms', 'USER_AVG_SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('18', 'jianqundangyuans', 'CREATE_GROUP_PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('19', 'zuzhineidangydlxqznlkpfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('2', 'dangyuancanyuhtszcfdplll', 'JOIN_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('20', 'wanggedifawsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('21', 'wanggeyitizxml', 'ISSUE_TO_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('22', 'zuzhisanhykcs', 'CREATE_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('23', 'dangyuancanjiashykrc', 'JOIN_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13'); +# INSERT INTO `index_code_field_re` VALUES ('24', 'xiashusuoyouwgddjnlpjz', 'PARTY_ABLITY_SCORE', '0', 0, '', '0000-00-00 00:00:00', 'z', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('25', 'shequmingyifwsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('26', 'jiedaoxiashusysqdjnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('27', 'jiedaomingyifwsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('28', 'quxiajijieddjnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('29', 'qumingyifawsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('3', 'dangyuantichudhtzyts', 'SHIFT_ISSUE_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('30', 'zuzhineidangydcyysnlkpfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('31', 'wanggezongyitsm', 'ISSUE_TOTAL', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('32', 'wanggerenjunytsm', 'AVG_ISSUE_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('33', 'wanggezongxiangms', 'PROJECT_TOTAL', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('34', 'wanggezizhixms', 'SELF_SOLVE_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('35', 'wanggebanjiexms', 'RESOLVE_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('36', 'wanggechuishaobmzql', 'TRANSFER_RIGHT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('37', 'wanggeneijiejdxmdmyd', 'SATISFACTION_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45'); +# INSERT INTO `index_code_field_re` VALUES ('38', 'shequxiashusywgzlnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('39', 'shequbeichuiscs', 'TRANSFERED_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('4', 'dangyuantichudytzxms', 'SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('40', 'shequbanjiexms', 'CLOSED_PROJECT_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('41', 'shequxiangmuxyd', 'RESP_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('42', 'shequchaoqixml', 'OVERDUE_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('43', 'shequbanjiexml', 'CLOSED_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('44', 'shequbanjiexmmyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('45', 'jiedaoxiashusysqzlnlhz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('46', 'jiedaobeichuiscs', 'TRANSFERED_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('47', 'jiedaobanjiexms', 'CLOSED_PROJECT_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('48', 'jiedaoxiangmuxyd', 'RESP_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('49', 'jiedaobanjiexmdclxl', 'HANDLE_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('5', 'canjiasanhykcs', 'JOIN_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('50', 'jiedaoxiangmubjl', 'CLOSED_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('51', 'jiedaojixiangmumyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('52', 'quzhibumenbcscs', 'TRANSFERED_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('53', 'quzhibumenbjxms', 'CLOSED_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('54', 'quzhibumenxmxyd', 'RESP_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('55', 'quzhibumenbjxmdclxl', 'HANDLE_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('56', 'quzhibumenxmbjl', 'CLOSED_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('57', 'quzhibumenxmmyd', 'SATISFACTION_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31'); +# INSERT INTO `index_code_field_re` VALUES ('58', 'suoyoujiedaozlnlpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('59', 'suoyouzhizhubmzlnlpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('6', 'dangyuanzijianqqzrs', 'GROUP_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('60', 'wanggehuodongzzcs', 'ACTIVITY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06'); +# INSERT INTO `index_code_field_re` VALUES ('61', 'wanggezhiyuanzzb', 'VOLUNTEER_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06'); +# INSERT INTO `index_code_field_re` VALUES ('62', 'wanggedangyuanzyzl', 'PARTY_VOLUNTEER_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06'); +# INSERT INTO `index_code_field_re` VALUES ('63', 'shequxiajisywgfwnldfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('64', 'shequhuodongzzcs', 'ACTIVITY_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('65', 'jiedaoxiashusqfwnldfpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('66', 'jiedaohuodongzzcs', 'ACTIVITY_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('67', 'quxiazhujiedfwnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('68', 'jiedaojixiangmmyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '2020-09-04 17:50:33', 'zxc', '2020-09-04 17:50:39'); +# INSERT INTO `index_code_field_re` VALUES ('7', 'dangyuanzijianqhyqzrs', 'GROUP_ACTIVE_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('8', 'dangyuanzijianqhydhts', 'GROUP_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# INSERT INTO `index_code_field_re` VALUES ('9', 'zijianqunhuoydytzxml', 'TOPIC_TO_ISSUE_RATIO', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00'); +# COMMIT; +# +# SET FOREIGN_KEY_CHECKS = 1; +select 1; \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml index 8336f33e9a..443d22edfa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -93,7 +93,9 @@ FROM fact_index_party_ablity_cpc_monthly WHERE - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DEL_FLAG = '0' + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + AND MONTH_ID = #{monthId,jdbcType=VARCHAR} + AND DEL_FLAG = '0' SELECT AGENCY_ID agencyId, AGENCY_NAME agencyName, @@ -69,6 +69,7 @@ WHERE DEL_FLAG = '0' AND CUSTOMER_ID =#{customerId} + AND `LEVEL` = 'community' AND AGENCY_ID NOT IN @@ -98,4 +99,33 @@ del_flag = '0' AND agency_id = #{agencyId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml index 976a652d63..417ac18c3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml @@ -87,4 +87,10 @@ AND CUSTOMER_ID = #{customerId} ) monthCount + + + delete from screen_index_data_monthly + where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND ORG_TYPE = #{orgType} + limit 1000; + From 27b280a6e1151e9d746fd9d3d04018f3078d5038 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 12:31:57 +0800 Subject: [PATCH 074/150] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IndexCalculateController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 1a48df14d5..8459b99f50 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -135,10 +135,10 @@ public class IndexCalculateController { public Result calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { long start = System.currentTimeMillis(); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); if (aBoolean) { return new Result().ok(true); } - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); return new Result().error("指标计算失败"); } From 6a0b5385840fcdacc63cebe34bd63a511a310bb8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 12 Sep 2020 12:59:54 +0800 Subject: [PATCH 075/150] =?UTF-8?q?=E6=B3=A8=E9=87=8AindexCode=E8=BE=93?= =?UTF-8?q?=E5=87=BA=EF=BC=8C=E4=B9=8B=E5=89=8Dcommunity=E6=8B=BC=E9=94=99?= =?UTF-8?q?=E4=BA=86=E3=80=82=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AEscreen=5F?= =?UTF-8?q?customer=5Fagency=E5=B7=B2=E7=BB=8F=E6=94=B9=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java | 2 +- .../indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java | 2 +- .../indexcal/impl/GridCorreLationServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index c2eadf4dc7..dc91df6e08 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -71,7 +71,7 @@ public class OrgGovrnAbilityFormDTO implements Serializable { private BigDecimal satisfactionRatio; /** - * 社区超期项目率,dataTyp=commnuity有值 + * 社区超期项目率,dataTyp=community有值 */ private BigDecimal overdueProjectRatio; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index e23472c6a4..fe8ee990b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -98,7 +98,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private BigDecimal satisfactionRatio; /** - * 社区超期项目率,dataTyp=commnuity有值 + * 社区超期项目率,dataTyp=community有值 */ private BigDecimal overdueProjectRatio; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 204556a035..c907c8e36f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -140,7 +140,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - log.info("index_code :{}",key); +// log.info("index_code :{}",key); if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) // log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); From b53fd85ae98bbd5a7742fc5594dffde6c014e259 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 13:36:55 +0800 Subject: [PATCH 076/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E6=9D=83=E9=87=8D=20=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 15 +- .../screen/IndexGroupDetailDao.java | 2 + ...deFieldReRedis.java => IndexCalRedis.java} | 31 +++- .../impl/IndexCalculateServiceImpl.java | 164 ++++++++++-------- .../impl/IndexCodeFieldReServiceImpl.java | 8 +- .../screen/IndexGroupDetailService.java | 13 +- .../impl/IndexGroupDetailServiceImpl.java | 38 +++- .../screen/IndexGroupDetailDao.xml | 6 + .../stats/test/normalizing/DemoScoreCal.java | 2 + 9 files changed, 192 insertions(+), 87 deletions(-) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/{IndexCodeFieldReRedis.java => IndexCalRedis.java} (67%) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index e1fa2fa2c7..786067c3f0 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -295,25 +295,36 @@ public class RedisKeys { * @return */ public static String getExternalAppSecretKey(String appId) { - return String.format(rootPrefix+"externalapp:secret:%s",appId); + return String.format(rootPrefix + "externalapp:secret:%s", appId); } /** * 计算指标时获取指标code和fields关系缓存Key + * * @return */ public static String getIndexCodeFieldReKey() { return rootPrefix.concat("stats:indexcal:indexcode:field"); } + /** + * 计算指标时获取指标权重缓存Key + * + * @return + */ + public static String getIndexCodeWeightKey(String customerId) { + return rootPrefix.concat("stats:indexcal:indexcode:weight").concat(customerId); + } + /** * 客户统计的计算标记。 * 0:未在计算 * 1:正在计算 + * * @param customerId * @return */ public static String getCustomerStatsCalFlag(String customerId) { - return String.format(rootPrefix+"stats:calflag:%s", customerId); + return String.format(rootPrefix + "stats:calflag:%s", customerId); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 17e7a7eb82..d67b86e887 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -34,4 +34,6 @@ import java.util.List; public interface IndexGroupDetailDao extends BaseDao { List getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode); + + List getAllIndexWeightList(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCalRedis.java similarity index 67% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCalRedis.java index 8a99d62890..8e1c769d14 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCalRedis.java @@ -24,12 +24,13 @@ import org.springframework.data.redis.core.HashOperations; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; +import java.math.BigDecimal; import java.util.Map; import java.util.concurrent.TimeUnit; @Slf4j @Component -public class IndexCodeFieldReRedis { +public class IndexCalRedis { @Autowired private RedisTemplate redisTemplate; @@ -54,9 +55,37 @@ public class IndexCodeFieldReRedis { /** * desc:删除指标字段关系缓存 + * * @return */ public Boolean deleteIndexCodeFromRedis() { return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); } + + /** + * @Description 获取指标权重 + */ + public Map getIndexCodeWeightMap(String customerId) { + HashOperations hashOperations = redisTemplate.opsForHash(); + Map values = hashOperations.entries(RedisKeys.getIndexCodeWeightKey(customerId)); + return values; + } + + /** + * @Description 存入指标权重 + */ + public void setIndexCodeWeightMap(String customerId, Map records) { + HashOperations hashOperations = redisTemplate.opsForHash(); + hashOperations.putAll(RedisKeys.getIndexCodeWeightKey(customerId), records); + redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); + } + + /** + * desc:删除指标权重缓存 + * + * @return + */ + public Boolean deleteIndexCodeWeightFromRedis(String customerId) { + return redisTemplate.delete(RedisKeys.getIndexCodeWeightKey(customerId)); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 48b8b46e31..c4fef95f7b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -8,7 +8,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; -import com.epmet.redis.IndexCodeFieldReRedis; +import com.epmet.redis.IndexCalRedis; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import com.epmet.util.DimIdGenerator; @@ -36,7 +36,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { @Autowired private CpcIndexCalculateService cpcIndexCalculateService; @Autowired - private IndexCodeFieldReRedis indexCodeFieldReRedis; + private IndexCalRedis indexCalRedis; @Autowired private IndexCalculateCommunityService indexCalculateCommunityService; @Autowired @@ -70,90 +70,106 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { } Boolean flag = false; for (String customerId : customerIds) { - CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); - long start = System.currentTimeMillis(); + CalculateCommonFormDTO param = new CalculateCommonFormDTO(); + param.setCustomerId(customerId); + param.setMonthId(formDTO.getMonthId()); + flag = calulateCustomerIndexScore(param); + } + return flag; + } catch (Exception e) { + log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); + } finally { + //清除缓存 + indexCalRedis.deleteIndexCodeFromRedis(); + } + return false; + } + + private Boolean calulateCustomerIndexScore(CalculateCommonFormDTO formDTO) { + try { + String customerId = formDTO.getCustomerId(); + Boolean flag; + long start = System.currentTimeMillis(); + try { + //计算党员相关的 try { - //计算党员相关的 - try { - CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); - flag = cpcIndexCalculateService.cpcIndexCalculate(param); - log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate cpcIndexCalculate exception", e); - throw new RenException("indexCalculate cpcIndexCalculate exception", e); - } - //测试用 - //计算网格 - start = System.currentTimeMillis(); - try { - flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); - log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate calculateGridCorreLation exception", e); - throw new RenException("indexCalculate calculateGridCorreLation exception", e); - } - //计算社区 - start = System.currentTimeMillis(); - try { - flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); - log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate calCommunityAll exception", e); - throw new RenException("indexCalculate calAll exception", e); - } + flag = cpcIndexCalculateService.cpcIndexCalculate(formDTO); + log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate cpcIndexCalculate exception", e); + throw new RenException("indexCalculate cpcIndexCalculate exception", e); + } + //测试用 + + //计算网格 + start = System.currentTimeMillis(); + try { + flag = gridCorreLationService.calculateGridCorreLation(formDTO); + log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate calculateGridCorreLation exception", e); + throw new RenException("indexCalculate calculateGridCorreLation exception", e); + } + //计算社区 + start = System.currentTimeMillis(); + try { + flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); + log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate calCommunityAll exception", e); + throw new RenException("indexCalculate calAll exception", e); + } - //计算街道 - start = System.currentTimeMillis(); - try { - flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); - log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate calStreetAll exception", e); - throw new RenException("indexCalculate calStreetAll exception", e); - } + //计算街道 + start = System.currentTimeMillis(); + try { + flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId()); + log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate calStreetAll exception", e); + throw new RenException("indexCalculate calStreetAll exception", e); + } - //计算区直属 - start = System.currentTimeMillis(); - try { - flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); - log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate calculateDeptCorreLation exception", e); - throw new RenException("indexCalculate calculateDeptCorreLation exception", e); - } + //计算区直属 + start = System.currentTimeMillis(); + try { + flag = deptScoreService.calculateDeptCorreLation(formDTO); + log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate calculateDeptCorreLation exception", e); + throw new RenException("indexCalculate calculateDeptCorreLation exception", e); + } - //计算全区 - start = System.currentTimeMillis(); - try { - indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); - log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); - } catch (Exception e) { - log.error("indexCalculate calDistrictAll exception", e); - throw new RenException("indexCalculate calDistrictAll exception", e); - } - } catch (RenException e) { - flag = false; + //计算全区 + start = System.currentTimeMillis(); + try { + indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId()); + log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag); + } catch (Exception e) { + log.error("indexCalculate calDistrictAll exception", e); + throw new RenException("indexCalculate calDistrictAll exception", e); } + } catch (RenException e) { + flag = false; + } - //计算完毕后 将结果插入大屏相关数据表 - if (flag) { - start = System.currentTimeMillis(); - try { - factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); - log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); - } catch (Exception e) { - log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); - flag = false; - } + //计算完毕后 将结果插入大屏相关数据表 + if (flag) { + start = System.currentTimeMillis(); + try { + factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId()); + log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); + } catch (Exception e) { + log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e); + flag = false; } } return flag; } catch (Exception e) { - log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); + log.error("calulateCustomerIndexScore exception", e); } finally { - //清除缓存 - indexCodeFieldReRedis.deleteIndexCodeFromRedis(); + indexCalRedis.deleteIndexCodeWeightFromRedis(formDTO.getCustomerId()); } return false; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCodeFieldReServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCodeFieldReServiceImpl.java index 3e89bee003..009dc1dc42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCodeFieldReServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCodeFieldReServiceImpl.java @@ -4,7 +4,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; -import com.epmet.redis.IndexCodeFieldReRedis; +import com.epmet.redis.IndexCalRedis; import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -25,18 +25,18 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { private IndexCodeFieldReDao indexCodeFieldReDao; @Autowired - private IndexCodeFieldReRedis indexCodeFieldReRedis; + private IndexCalRedis indexCalRedis; @Override public Map getIndexCodeFieldReMap() { - Map indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap(); + Map indexCodeFiledReMap = indexCalRedis.getIndexCodeFiledReMap(); if (CollectionUtils.isEmpty(indexCodeFiledReMap)) { List allData = indexCodeFieldReDao.getAllData(); if (CollectionUtils.isEmpty(allData)){ return new HashMap<>(); } indexCodeFiledReMap = allData.stream().collect(Collectors.toMap(IndexCodeFieldReEntity::getIndexCode, o -> o.getFieldId())); - indexCodeFieldReRedis.setIndexCodeFiledReMap(indexCodeFiledReMap); + indexCalRedis.setIndexCodeFiledReMap(indexCodeFiledReMap); } return indexCodeFiledReMap; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java index f202beca1b..eb77f2cf63 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import java.math.BigDecimal; import java.util.List; /** @@ -31,8 +32,18 @@ import java.util.List; public interface IndexGroupDetailService extends BaseService { /** * desc:根据all_parent_index_code 获取指标明细 + * * @param customerId * @param indexCode */ - List getDetailListByParentCode(String customerId,String... indexCode); + List getDetailListByParentCode(String customerId, String... indexCode); + + /** + * desc:根据all_parent_index_code 获取指标权重 + * 如果获取不到 返回-1 表明数据有误 + * + * @param customerId + * @param allPathIndexCode + */ + BigDecimal getWeightByAllPathIndexCode(String customerId, String allPathIndexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java index 7a8935bd02..26fb5b8cc2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java @@ -19,15 +19,23 @@ package com.epmet.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.redis.IndexCalRedis; import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 客户指标详情 @@ -35,20 +43,40 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-19 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { - + @Autowired + private IndexCalRedis indexCalRedis; @Override - public List getDetailListByParentCode(String customerId,String... indexCode) { - if (indexCode == null || indexCode.length == 0){ + public List getDetailListByParentCode(String customerId, String... indexCode) { + if (indexCode == null || indexCode.length == 0) { throw new RenException("参数错误"); } StringBuilder sb = new StringBuilder(); - for (String code:indexCode){ + for (String code : indexCode) { sb.append(code).append(StrConstant.COLON); } - return baseDao.getDetailListByParentCode(customerId,sb.deleteCharAt(sb.length()-1).toString()); + return baseDao.getDetailListByParentCode(customerId, sb.deleteCharAt(sb.length() - 1).toString()); } + + @Override + public BigDecimal getWeightByAllPathIndexCode(String customerId, String allPathIndexCode) { + Map indexCodeFiledReMap = indexCalRedis.getIndexCodeWeightMap(customerId); + if (CollectionUtils.isEmpty(indexCodeFiledReMap)) { + List allData = baseDao.getAllIndexWeightList(customerId); + if (CollectionUtils.isEmpty(allData)) { + log.warn("getAllIndexWeightList return empty"); + return null; + } + indexCodeFiledReMap = allData.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o.getWeight())); + indexCalRedis.setIndexCodeWeightMap(customerId, indexCodeFiledReMap); + } + BigDecimal weight = indexCodeFiledReMap.get(allPathIndexCode); + + return weight == null ? new BigDecimal(NumConstant.ONE_NEG) : weight; + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml index c2ab3e07c6..76bec7b257 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml @@ -12,4 +12,10 @@ CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' and ALL_PARENT_INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 57969c12e0..15e029b3e6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -1,5 +1,6 @@ package com.epmet.stats.test.normalizing; +import com.alibaba.fastjson.JSON; import com.epmet.support.normalizing.*; import com.epmet.support.normalizing.batch.*; import org.junit.Test; @@ -233,6 +234,7 @@ public class DemoScoreCal { List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + System.out.println("param:" + JSON.toJSONString(indexInputVOS)); HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); HashMap result2 = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); From 6421327229ab54e5d74bd84129773f813de0efe1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 13:41:43 +0800 Subject: [PATCH 077/150] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=99=A8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/support/normalizing/batch/BatchScoreCalculator.java | 2 +- .../com/epmet/support/normalizing/batch/IndexScoreVo.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 1ca86d8faf..c171f62300 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -67,7 +67,7 @@ public class BatchScoreCalculator { result.setDetails(new ArrayList<>()); scoreCountOfSamples.put(sampleId, result); } - IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score); + IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score, idx.getWeight()); result.getDetails().add(sampleScore); result.setTotalScore(result.getTotalScore().add(score).setScale(6, RoundingMode.HALF_UP)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java index 3b108999a1..dd971eadc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java @@ -26,6 +26,10 @@ public class IndexScoreVo implements Serializable { * 分值 */ private BigDecimal score; + /** + * 该指标的权重 + */ + private BigDecimal weight; } From 49bcf5d7870402aa316f870eb6d20e32e97f1c81 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 12 Sep 2020 13:49:49 +0800 Subject: [PATCH 078/150] =?UTF-8?q?fact=5Findex=5FXXX=5Fscore=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=87=8Dweight?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencyScoreDao.java | 11 --- .../indexcal/CommunityScoreDao.java | 13 +-- .../indexcal/CommunitySubScoreDao.java | 5 +- .../indexcal/AgencyScoreEntity.java | 4 + .../indexcal/AgencySubScoreEntity.java | 4 + .../indexcal/CpcScoreEntity.java | 5 ++ .../indexcal/CpcSubScoreEntity.java | 5 ++ .../indexcal/DeptScoreEntity.java | 4 + .../indexcal/DeptSubScoreEntity.java | 4 + .../FactIndexCommunitySubScoreEntity.java | 70 +++++++++++++++ .../indexcal/GridScoreEntity.java | 4 + .../indexcal/GridSubScoreEntity.java | 4 + .../screen/FactIndexCommunityScoreEntity.java | 90 ------------------- .../screen/ScreenIndexDataMonthlyEntity.java | 4 + .../indexcal/AgencyScoreDao.xml | 50 +---------- .../indexcal/AgencySubScoreDao.xml | 4 +- .../indexcal/CommunityScoreDao.xml | 46 +--------- .../indexcal/CommunitySubScoreDao.xml | 4 +- .../evaluationindex/indexcal/CpcScoreDao.xml | 2 + .../indexcal/CpcSubScoreDao.xml | 2 + .../evaluationindex/indexcal/DeptScoreDao.xml | 2 + .../indexcal/DeptSubScoreDao.xml | 2 + .../evaluationindex/indexcal/GridScoreDao.xml | 2 + .../indexcal/GridSubScoreDao.xml | 2 + .../screen/ScreenIndexDataMonthlyDao.xml | 2 + 25 files changed, 137 insertions(+), 208 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index fa9ae610f4..3046923a98 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -82,17 +82,6 @@ public interface AgencyScoreDao extends BaseDao { **/ List selectListAgencyScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - /** - * 批量插入区/街道相关分数表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertAgencyScoreData(@Param("list") List list, @Param("customerId")String customerId); - /** * 根据入参查询 区/街道相关分数表id * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index 4df07097d9..95d0f60e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -20,7 +20,7 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -79,17 +79,6 @@ public interface CommunityScoreDao extends BaseDao selectSubCommAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); - /** - * 批量插入 社区相关分数表 - * - * @param list - * @param customerId - * @return void - * @Author zhangyong - * @Date 11:11 2020-09-04 - **/ - void batchInsertCommunityScoreData(@Param("list") List list, @Param("customerId")String customerId); - /** * 根据入参查询 查询社区id * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java index 7107d29e8c..a8d5971cc7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java @@ -18,9 +18,8 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.FactIndexCommunitySubScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -33,7 +32,7 @@ import java.util.List; * @since v1.0.0 2020-08-31 */ @Mapper -public interface CommunitySubScoreDao extends BaseDao { +public interface CommunitySubScoreDao extends BaseDao { /** * @param lists diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java index 879018ac99..21847b47d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -87,4 +87,8 @@ public class AgencyScoreEntity extends BaseEpmetEntity { */ private String dataType; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java index 2f1d277b46..d5ca30dc0e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java @@ -87,4 +87,8 @@ public class AgencySubScoreEntity extends BaseEpmetEntity { */ private String dataType; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index 30eb9fb66a..ee1a68f8eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -87,4 +87,9 @@ public class CpcScoreEntity extends BaseEpmetEntity { * 是否是总分 1是0不是 */ private String isTotal; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java index 2183f77502..f1c79068a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java @@ -87,4 +87,9 @@ public class CpcSubScoreEntity extends BaseEpmetEntity { * 是否是总分 1是0不是 */ private String isTotal; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java index 7a5dcce754..41a5f19188 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -87,4 +87,8 @@ public class DeptScoreEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java index db12edfeec..191ffb0157 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java @@ -82,4 +82,8 @@ public class DeptSubScoreEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java new file mode 100644 index 0000000000..d8938d9018 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java @@ -0,0 +1,70 @@ +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 社区相关分数表-明细 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_community_sub_score") +public class FactIndexCommunitySubScoreEntity extends BaseEpmetEntity { + private static final long serialVersionUID = -7046354032669198828L; + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 社区上一级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan + */ + private String indexCode; + + /** + * 所有指标code拼接的字符串 冒号隔开 + */ + private String allParentIndexCode; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 2fc442c0be..6831a84e5c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -92,4 +92,8 @@ public class GridScoreEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java index 01f40a5ddd..3404fda77d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java @@ -92,4 +92,8 @@ public class GridSubScoreEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java deleted file mode 100644 index 5fee9d7cb3..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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.epmet.entity.evaluationindex.screen; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 社区相关分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-31 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("fact_index_community_score") -public class FactIndexCommunityScoreEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 组织id - */ - private String agencyId; - - /** - * 社区上一级组织id - */ - private String parentAgencyId; - - /** - * 年度ID: yyyy - */ - private String yearId; - - /** - * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - */ - private String quarterId; - - /** - * 月维度Id: yyyyMM - */ - private String monthId; - - /** - * 1:总分;0不是;默认0 - */ - private String isTotal; - - /** - * 分值 - */ - private BigDecimal score; - - /** - * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan - */ - private String indexCode; - - /** - * 所有指标code拼接的字符串 冒号隔开 - */ - private String allParentIndexCode; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index e8d16e858d..f5b124f54b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -92,4 +92,8 @@ public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity { */ private BigDecimal governAblity; + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index a0c7f2cdae..234461164f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -5,7 +5,8 @@ - INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, + WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -21,6 +22,7 @@ #{item.score}, #{item.indexCode}, #{item.allParentIndexCode}, + #{item.weight}, #{item.delFlag}, #{item.revision}, #{item.createdBy}, @@ -107,52 +109,6 @@ GROUP BY fics.parent_agency_id - - insert into fact_index_agency_score - ( - ID, - CUSTOMER_ID, - - AGENCY_ID, - PARENT_AGENCY_ID, - YEAR_ID, - QUARTER_ID, - MONTH_ID, - DATA_TYPE, - IS_TOTAL, - SCORE, - INDEX_CODE, - - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.agencyId}, - #{item.parentAgencyId}, - - #{item.yearId}, - #{item.quarterId}, - #{item.monthId}, - #{item.dataType}, - #{item.isTotal}, - #{item.score}, - #{item.indexCode}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - insert into fact_index_community_score - ( - ID, - CUSTOMER_ID, - AGENCY_ID, - PARENT_AGENCY_ID, - YEAR_ID, - QUARTER_ID, - MONTH_ID, - IS_TOTAL, - SCORE, - INDEX_CODE, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{customerId}, - #{item.agencyId}, - #{item.parentAgencyId}, - #{item.yearId}, - #{item.quarterId}, - - #{item.monthId}, - #{item.isTotal}, - #{item.score}, - #{item.indexCode}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - \ No newline at end of file + From 09e0f8fbeef7d21e3cc00b5348b40f32a1c770c4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 12 Sep 2020 15:09:31 +0800 Subject: [PATCH 083/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86/data/stats/kcscreencoll/pr?= =?UTF-8?q?oject/categorysummary=EF=BC=8C=E5=85=A5=E5=8F=82=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=80=E7=BA=A7=E7=B1=BB?= =?UTF-8?q?=E5=88=ABid=E4=B8=80=E7=BA=A7=E7=B1=BB=E5=88=AB=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java | 4 ++-- .../src/main/java/com/epmet/controller/DemoController.java | 4 ++-- .../screen/ScreenKcProjectCategoryGridDailyEntity.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java index 495e3ac7f7..045e515fe1 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java @@ -36,12 +36,12 @@ public class KcCategorySummaryFormDTO implements Serializable { private String allParentIds; /** - * 类别id + * 一级类别id */ private String categoryId; /** - * 分类名称 + * 一级分类名称 */ private String categoryName; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 59ed8ba771..360571a1e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -168,9 +168,9 @@ public class DemoController { // List gridScoreDTOList=gridScoreDao.selectList(formDTO); // return new Result>().ok(gridScoreDTOList); - cpcIndexCalculateService.cpcIndexCalculate(formDTO); +// cpcIndexCalculateService.cpcIndexCalculate(formDTO); gridCorreLationService.calculateGridCorreLation(formDTO); - deptScoreService.calculateDeptCorreLation(formDTO); +// deptScoreService.calculateDeptCorreLation(formDTO); return new Result(); } @DataSource(DataSourceConstant.EVALUATION_INDEX) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java index 3307b3dcfa..ba35584411 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java @@ -69,12 +69,12 @@ public class ScreenKcProjectCategoryGridDailyEntity extends BaseEpmetEntity { private String allParentIds; /** - * 类别id + * 一级类别id */ private String categoryId; /** - * 分类名称 + * 一级分类名称 */ private String categoryName; From 505aa8be1495d07ee0974f7eb4b34a945fa12c7f Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 15:12:44 +0800 Subject: [PATCH 084/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 3 +-- .../evaluationindex/indexcal/impl/DeptScoreServiceImpl.java | 2 +- .../indexcal/impl/GridCorreLationServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 2eacb84ef6..0de8be20fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -266,8 +266,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setScore(new BigDecimal(NumConstant.ZERO)); cpcScoreEntity.setIndexCode(parentIndexCode); cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode()); - String vallPath = value.getAllParentIndexCode().concat(StrConstant.COLON).concat(parentIndexCode); - BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), vallPath); + BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), value.getAllParentIndexCode()); cpcScoreEntity.setWeight(weight); scoreEntityMap.put(userId, cpcScoreEntity); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index fabd8d515e..9355c6f79e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -311,7 +311,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl { score.setScore(score.getScore().add(community.getScore())); score.setParentAgencyId(community.getParentAgencyId()); From 3d1e65180524630349200b3670e2237541c44964 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 12 Sep 2020 15:13:38 +0800 Subject: [PATCH 085/150] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9D=83=E9=87=8D=20?= =?UTF-8?q?=E5=80=BC=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 2f5c6cc136..50c8b349d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -710,6 +710,11 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Date 09:26 2020-09-04 **/ private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal weight, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){ + // 部门表的 组织类别,不齐,所以为了防止空指针,先赋值 0 + BigDecimal zero = new BigDecimal(NumConstant.ZERO); + monthlyFormDTO.setPartyDevWeight(zero); + monthlyFormDTO.setGovernAblityWeight(zero); + monthlyFormDTO.setServiceAblityWeight(zero); // 赋实际值 if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(IndexCode)){ // 党建能力 From b0d8c36023f71fd90829af6fbdc0fb05dfea0662 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 15:13:52 +0800 Subject: [PATCH 086/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index af5300940f..8ae71e38d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -322,8 +322,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict score.setDataType(IndexCalConstant.DISTRICT_LEVEL); score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); score.setAllParentIndexCode(NumConstant.ZERO_STR); - BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(customerId, score.getAllParentIndexCode().concat(StrConstant.COLON).concat(score.getIndexCode())); - score.setWeight(weight); + score.setWeight(new BigDecimal(NumConstant.ONE_NEG)); value.forEach(community -> { score.setScore(score.getScore().add(community.getScore())); score.setParentAgencyId(community.getParentAgencyId()); From b815c55569fd8cf6ae44d315429b460aa1efb37c Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 12 Sep 2020 15:16:10 +0800 Subject: [PATCH 087/150] =?UTF-8?q?=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 50c8b349d4..2f5c6cc136 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -710,11 +710,6 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Date 09:26 2020-09-04 **/ private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal weight, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){ - // 部门表的 组织类别,不齐,所以为了防止空指针,先赋值 0 - BigDecimal zero = new BigDecimal(NumConstant.ZERO); - monthlyFormDTO.setPartyDevWeight(zero); - monthlyFormDTO.setGovernAblityWeight(zero); - monthlyFormDTO.setServiceAblityWeight(zero); // 赋实际值 if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(IndexCode)){ // 党建能力 From c5e2a42abdc2f930bee8797bf62f32fe8eaf2ab9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Sep 2020 15:26:52 +0800 Subject: [PATCH 088/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/GridCorreLationServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index a09f37d2f4..83be351490 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -375,6 +375,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridSubScoreEntity.setIndexCode(detail.getIndexCode()); gridSubScoreEntity.setAllParentIndexCode(detail.getAllParentIndexCode()); gridSubScoreEntity.setScore(detail.getScore()); + gridSubScoreEntity.setWeight(detail.getWeight()); gridSubScoreList.add(gridSubScoreEntity); } }); From fac7c50e559153c23e779abc48afc78aaacea0fd Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 12 Sep 2020 15:39:30 +0800 Subject: [PATCH 089/150] =?UTF-8?q?=E9=83=A8=E9=97=A8=20=E6=9D=83=E9=87=8D?= =?UTF-8?q?=E5=80=BC=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 2f5c6cc136..aefae2b774 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -561,6 +561,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { for ( int i = 0; i < deptScore.getValue().size(); i++){ // 区直街道的总分 就是 治理能力 monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); + // 多余的权重,赋0 + monthlyFormDTO.setPartyDevWeight(deptScore.getValue().get(i).getWeight()); + monthlyFormDTO.setServiceAblityWeight(deptScore.getValue().get(i).getWeight()); // 赋值 治理能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), deptScore.getValue().get(i).getWeight(), From 7b95a70e4688cc97f6dfaf1d76eec442946a3aa4 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 12 Sep 2020 15:52:00 +0800 Subject: [PATCH 090/150] =?UTF-8?q?=E8=B5=8B=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java index 0427ff559c..4adf142a12 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -71,15 +72,15 @@ public class IndexDataMonthlyFormDTO implements Serializable { /** * 党建能力指数权重 */ - private BigDecimal partyDevWeight; + private BigDecimal partyDevWeight = new BigDecimal(NumConstant.ZERO); /** * 服务能力指数 权重 */ - private BigDecimal serviceAblityWeight; + private BigDecimal serviceAblityWeight = new BigDecimal(NumConstant.ZERO); /** * 治理能力分数,权重 */ - private BigDecimal governAblityWeight; + private BigDecimal governAblityWeight = new BigDecimal(NumConstant.ZERO); } From d82f6bfb577bcef64e707fe134501f5383b62715 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 12 Sep 2020 16:02:35 +0800 Subject: [PATCH 091/150] =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=9D=83=E9=87=8D?= =?UTF-8?q?=E5=80=BC=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index aefae2b774..ade95f1c5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -562,8 +562,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 区直街道的总分 就是 治理能力 monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); // 多余的权重,赋0 - monthlyFormDTO.setPartyDevWeight(deptScore.getValue().get(i).getWeight()); - monthlyFormDTO.setServiceAblityWeight(deptScore.getValue().get(i).getWeight()); + monthlyFormDTO.setPartyDevWeight(new BigDecimal(NumConstant.ZERO)); + monthlyFormDTO.setServiceAblityWeight(new BigDecimal(NumConstant.ZERO)); // 赋值 治理能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), deptScore.getValue().get(i).getWeight(), From 0bcdd40b7778592747d3dfb40b8a314c525e9ef0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Sun, 13 Sep 2020 14:25:53 +0800 Subject: [PATCH 092/150] =?UTF-8?q?sql=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/GovStaffRoleDao.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml index a9da37f9d9..c8bd19b151 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml @@ -82,8 +82,10 @@ gsr.del_flag = 0 AND sr.del_flag = 0 AND - - sr.staff_id = #{userId} - + ( + + sr.staff_id = #{userId} + + ) \ No newline at end of file From caee1c7eb3fb7a4f972dec507f13d0b866f2841b Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 14 Sep 2020 09:39:31 +0800 Subject: [PATCH 093/150] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=B9=B4=E9=BE=84?= =?UTF-8?q?=E5=88=86=E5=B8=83=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=B8=BANaN=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/GrassrootsPartyDevServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java index 619eba4625..73ebfc5c14 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -86,7 +86,11 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { - return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); + PartymemberAgeDistributionResultDTO ageInfo = screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); + if(null == ageInfo){ + ageInfo = new PartymemberAgeDistributionResultDTO(); + } + return ageInfo; } /** From 2c4b5c7dd1a2fbf08c8a6958e514c38d993ba495 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 14 Sep 2020 09:45:51 +0800 Subject: [PATCH 094/150] =?UTF-8?q?=E6=8C=87=E6=A0=87=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateCommunityServiceImpl.java | 60 +++++++++---------- .../IndexCalculateDistrictServiceImpl.java | 5 -- .../impl/IndexCalculateStreetServiceImpl.java | 6 -- 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 4821e0ee59..a1cd97e164 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -69,6 +69,33 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Autowired private CommunitySubScoreDao communitySubScoreDao; + /** + * @param customerId + * @param monthId + * @Description 计算社区相关总分 + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + public Boolean calCommunityAll(String customerId, String monthId) { + Boolean aBoolean = communityPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)) { + throw new RenException("calculate community-party-ability failure ......"); + } + Boolean bBoolean = communityGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)) { + throw new RenException("calculate community-govern-ability failure ......"); + } + Boolean cBoolean = communityServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)) { + throw new RenException("calculate community-service-ability failure ......"); + } + Boolean dBoolean = communityRelate(customerId, monthId); + if (!dBoolean.equals(true)) { + throw new RenException("calculate community-all insert failure ......"); + } + return true; + } + /** * @param customerId * @Description 社区名义发文数量计算【党建能力】 @@ -91,7 +118,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.error(IndexCalConstant.GRID_PARTY_AVG_NULL); - return; } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); @@ -112,7 +138,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.error(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); - return; } String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -166,7 +191,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.error("社区下级治理能力平均分集合为空"); - return; }else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -187,7 +211,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); - return; }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -241,7 +264,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridServiceAvg)) { log.error("查询社区下级所有网格服务能力得分平均值集合为空"); - //todo return; } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); @@ -261,7 +283,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); - return; }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -336,33 +357,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni return true; } - /** - * @param customerId - * @param monthId - * @Description 计算社区相关总分 - * @author zxc - * @date 2020/9/1 4:12 下午 - */ - public Boolean calCommunityAll(String customerId, String monthId) { - Boolean aBoolean = communityPartyCalculate(customerId, monthId);//党建能力 - if (!aBoolean.equals(true)) { - throw new RenException("calculate community-party-ability failure ......"); - } - Boolean bBoolean = communityGovernAbilityCalculate(customerId, monthId);// 治理能力 - if (!bBoolean.equals(true)) { - throw new RenException("calculate community-govern-ability failure ......"); - } - Boolean cBoolean = communityServiceAbilityCalculate(customerId, monthId);// 服务能力 - if (!cBoolean.equals(true)) { - throw new RenException("calculate community-service-ability failure ......"); - } - Boolean dBoolean = communityRelate(customerId, monthId); - if (!dBoolean.equals(true)) { - throw new RenException("calculate community-all insert failure ......"); - } - return true; - } - /** * @param list * @Description BigDecimal类型获取最大数和最小数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 8ae71e38d1..3143fdf4e3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -116,7 +116,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.error(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); - return; } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); @@ -137,7 +136,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.error(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); - return; } String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -191,7 +189,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(districtGovernAvgList)) { log.error("查询所有街道治理能力平均值集合为空"); - return; } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(districtGovernAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(districtGovernAvgList, IndexCalConstant.PAGE_SIZE); @@ -211,7 +208,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(deptScoreAvgList)) { log.error("查询所有直属部门治理能力平均值集合为空"); - //return; } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); @@ -261,7 +257,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(subStreetAvgList)) { log.error("查询区下属街道服务能力汇总平均值集合为空"); - return; } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subStreetAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subStreetAvgList, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 5fb28ac104..dfec8da308 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -119,7 +119,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { log.error(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); - //todo return; } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexEnd = NumConstant.TEN; @@ -141,7 +140,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId, IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(mapList)) { log.error(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); - return; } String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldName)) { @@ -194,7 +192,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.error("查询街道下属所有社区治理能力汇总为空"); - //todo return; }else if (subGridGovernAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -215,7 +212,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.error(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); - return; }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -269,7 +265,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommServiceAvg)) { log.error("查询街道下属社区服务能力得分平均值为空"); - //todo return; } else if (subCommServiceAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); @@ -289,7 +284,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.error(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); - return; }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { From d5b1c5a22559df7c44bb28119372ce8ee19d708b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 09:52:18 +0800 Subject: [PATCH 095/150] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BD=92=E4=B8=80?= =?UTF-8?q?=E7=AE=97=E6=B3=95=20=E8=BF=94=E5=9B=9E=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/normalizing/batch/BatchScoreCalculator.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index c171f62300..b0ee8fa0ad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -37,7 +37,7 @@ public class BatchScoreCalculator { } /** - * 执行计算,以样本的所有指标总得分及明细分数值 + * 执行计算,以样本的所有指标总得分(原始值)及明细分数(归一后的值 不乘以权重)值 * * @param indexInputVOS * @return @@ -56,7 +56,9 @@ public class BatchScoreCalculator { //遍历该指标下的每个数据 for (SampleValue vo : indexValueVOs) { String sampleId = vo.getSampleId(); - BigDecimal score = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold), weight).setScale(6, RoundingMode.HALF_UP); + //归一后的值 + BigDecimal normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + BigDecimal score = scoreCalculator.normalize(normalizeValue, weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId); if (result == null) { @@ -67,7 +69,7 @@ public class BatchScoreCalculator { result.setDetails(new ArrayList<>()); scoreCountOfSamples.put(sampleId, result); } - IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score, idx.getWeight()); + IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), normalizeValue, idx.getWeight()); result.getDetails().add(sampleScore); result.setTotalScore(result.getTotalScore().add(score).setScale(6, RoundingMode.HALF_UP)); } From 2595269922f85278caeedd0dd83160f7985eb98c Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 14 Sep 2020 09:58:27 +0800 Subject: [PATCH 096/150] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1-=E9=87=8D=E6=96=B0=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=89=80=E6=9C=89pendding=E4=B8=AD=E7=9A=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 10 +- .../com/epmet/constant/CalculateStatus.java | 13 +++ .../controller/IndexCalculateController.java | 110 ++++++++++++++---- .../com/epmet/model/CalculateFlagModel.java | 20 ++++ 4 files changed, 127 insertions(+), 26 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CalculateStatus.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/CalculateFlagModel.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index e1fa2fa2c7..ce57594ad2 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -314,6 +314,14 @@ public class RedisKeys { * @return */ public static String getCustomerStatsCalFlag(String customerId) { - return String.format(rootPrefix+"stats:calflag:%s", customerId); + return getCustomerStatsCalKeyPrefix().concat(":").concat(customerId); + } + + /** + * 获取计算标记的key前缀 + * @return + */ + public static String getCustomerStatsCalKeyPrefix() { + return rootPrefix.concat("stats:calflag"); } } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CalculateStatus.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CalculateStatus.java new file mode 100644 index 0000000000..f4425ee714 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CalculateStatus.java @@ -0,0 +1,13 @@ +package com.epmet.constant; + +/** + * 计算状态 + * calculating:正在计算中。有实例正在计算 + * pendding:计算暂停,说明计算过程中实例发生重启,等待重新计算 + */ +public interface CalculateStatus { + + String PENDDING = "pendding"; + String CALCULATING = "calculating"; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 8459b99f50..4cecf7f168 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -2,13 +2,16 @@ package com.epmet.controller; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.CalculateStatus; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.model.CalculateFlagModel; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; import com.epmet.util.DimIdGenerator; @@ -21,10 +24,14 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; +import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Date; import java.util.HashMap; import java.util.Map; +import java.util.Set; import java.util.concurrent.*; /** @@ -59,20 +66,41 @@ public class IndexCalculateController { private Map futureMap = new HashMap<>(); @PreDestroy - public void clearDataCalFlag() { - // 实例销毁之前,将正在本实例中执行计算的客户列表的计算状态清空 + public void saveCalStatus() { + // 实例销毁之前,将正在本实例中执行计算的客户列表的计算状态修改为pendding,等待其他实例重新计算 futureMap.forEach((customerId, future) -> { - redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); + CalculateFlagModel flag = (CalculateFlagModel) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(customerId)); + flag.setStatus(CalculateStatus.PENDDING); + redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), flag); + log.info("客户【%s】正在执行计算,实例发生重启,修改计算状态为:calculation->pendding", customerId); }); } + /** + * 处理暂停中的计算 + */ + @PostMapping("process-pendding-cals") + public void processPenddingCalculate() { + String keyPrefix = RedisKeys.getCustomerStatsCalKeyPrefix(); + Set calFlagKeys = redisUtils.keys(keyPrefix.concat("*")); + calFlagKeys.forEach(key -> { + CalculateFlagModel flag = (CalculateFlagModel) redisUtils.get(key); + if (flag != null && CalculateStatus.PENDDING.equals(flag.getStatus())) { + // 找到状态是pendding的key,执行计算 + CalculateCommonFormDTO form = new CalculateCommonFormDTO(); + form.setCustomerId(flag.getForm().getCustomerId()); + form.setMonthId(flag.getForm().getMonthId()); + indexCalculate(form); + } + }); + } /** * 按照客户计算所有指标(按照月份) * * @param formDTO * @return com.epmet.commons.tools.utils.Result - * @Author zhangyong + * @Author zhangyongç * @Date 10:52 2020-08-20 **/ @ExternalAppRequestAuth @@ -80,34 +108,66 @@ public class IndexCalculateController { public Result indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) { String customerId = externalAppRequestParam.getCustomerId(); //String customerId = "epmettest"; - Boolean executing = (Boolean) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(customerId)); - if (executing == null || !executing) { + formDTO.setCustomerId(customerId); + indexCalculate(formDTO); + return new Result().ok(true); + } + + /** + * 指标计算 + * @param formDTO + */ + private void indexCalculate(CalculateCommonFormDTO formDTO) { + CalculateFlagModel executeFlag = (CalculateFlagModel) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + if (executeFlag == null || !CalculateStatus.CALCULATING.equals(executeFlag.getStatus())) { + // 可以计算 synchronized (statsCalLock) { - Boolean executing2 = (Boolean) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(customerId)); - if (executing2 != null && executing2) { - log.error(String.format("该客户正在执行计算,请勿重复提交计算请求。", customerId)); - return new Result().ok(false); + CalculateFlagModel executingFlag2 = (CalculateFlagModel) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + if (executingFlag2 != null && CalculateStatus.CALCULATING.equals(executingFlag2.getStatus())) { + //log.error(String.format("客户【%s】正在执行计算,请勿重复提交计算请求。", customerId)); + throw new RenException(String.format("客户【%s】正在执行计算,请勿重复提交计算请求。", formDTO.getCustomerId())); } - Future future = singleThreadPool.submit(() -> { - formDTO.setCustomerId(customerId); - long start = System.currentTimeMillis(); - Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); - if (aBoolean) { - log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000); - } - redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); - futureMap.remove(customerId); - }); - futureMap.put(customerId, future); - redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), true); + // 提交异步计算 + submitCalculate(formDTO); } } else { - log.error(String.format("该客户正在执行计算,请勿重复提交计算请求。", customerId)); - return new Result().ok(false); + throw new RenException(String.format("客户【%s】正在执行计算,请勿重复提交计算请求。", formDTO.getCustomerId())); } + } + + /** + * 提交异步计算 + * @param formDTO + * @return + */ + private void submitCalculate(CalculateCommonFormDTO formDTO) { + Future future = singleThreadPool.submit(() -> { + long start = System.currentTimeMillis(); + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean) { + log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", formDTO.getCustomerId(), (System.currentTimeMillis() - start) / 1000); + } + redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + futureMap.remove(formDTO.getCustomerId()); - return new Result().ok(true); + //测试代码 + //try { + // Thread.sleep(20000l); + // System.out.println(System.currentTimeMillis()); + //} catch (InterruptedException e) { + // e.printStackTrace(); + //} + //redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + //futureMap.remove(formDTO.getCustomerId()); + }); + + futureMap.put(formDTO.getCustomerId(), future); + + CalculateFlagModel flag = new CalculateFlagModel(); + flag.setStatus(CalculateStatus.CALCULATING); + flag.setForm(formDTO); + redisUtils.set(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId()), flag); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/CalculateFlagModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/CalculateFlagModel.java new file mode 100644 index 0000000000..95d114ae16 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/CalculateFlagModel.java @@ -0,0 +1,20 @@ +package com.epmet.model; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import lombok.Data; + +@Data +public class CalculateFlagModel { + + /** + * 提交计算时候的参数 + */ + private CalculateCommonFormDTO form; + + /** + * 计算状态 + * CalculateStatus.java + */ + private String status; + +} From fd0ffe0a4cd11540a32b57e7f479db407ecb56a1 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 14 Sep 2020 10:02:15 +0800 Subject: [PATCH 097/150] =?UTF-8?q?=E6=8C=87=E6=95=B0=20-=20=E5=B9=B4?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E8=AE=A1=E7=AE=97=EF=BC=8C=E4=B9=98=E4=BB=A5?= =?UTF-8?q?=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenIndexDataMonthlyDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml index b699ec7d6b..f192c1373c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml @@ -71,9 +71,9 @@ PARENT_ID parentId, ORG_NAME orgName, SUM(INDEX_TOTAL) / #{monthCount} as indexTotal, - SUM(PARTY_DEV_ABLITY) / #{monthCount} as partyDevAblity, - SUM(SERVICE_ABLITY) / #{monthCount} as serviceAblity, - SUM(GOVERN_ABLITY) / #{monthCount} as governAblity + SUM(PARTY_DEV_ABLITY * PARTY_DEV_WEIGHT) / #{monthCount} as partyDevAblity, + SUM(SERVICE_ABLITY * SERVICE_ABLITY_WEIGHT) / #{monthCount} as serviceAblity, + SUM(GOVERN_ABLITY * GOVERN_ABLITY_WEIGHT) / #{monthCount} as governAblity FROM screen_index_data_monthly WHERE DEL_FLAG = '0' AND YEAR_ID = #{yearId} From 8f507bbd3551b40325d91ec0b6ab5187437d3637 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 10:24:51 +0800 Subject: [PATCH 098/150] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BD=92=E4=B8=80?= =?UTF-8?q?=E7=AE=97=E6=B3=95=20=E8=BF=94=E5=9B=9E=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/enums/EnvEnum.java | 1 + .../controller/IndexCalculateController.java | 8 ++-- .../batch/BatchScoreCalculator.java | 39 +------------------ .../stats/test/normalizing/DemoScoreCal.java | 9 +++++ 4 files changed, 15 insertions(+), 42 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java index 0c3f798318..ed782790e8 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java @@ -11,6 +11,7 @@ import org.springframework.core.env.Environment; * @date 2020-07-03 11:14 **/ public enum EnvEnum { + LOCAL("local", "本地环境"), DEV("dev", "开发环境"), TEST("test", "体验环境"), PROD("prod", "生产环境"), diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 4cecf7f168..b7499bd76f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; @@ -24,10 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; -import java.net.InetAddress; -import java.net.UnknownHostException; import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -186,7 +184,7 @@ public class IndexCalculateController { future.cancel(true); redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); futureMap.remove(customerId); - HttpClientManager.getInstance().sendAlarmMsg(String.format("数据统计服务-中止计算成功,customerId:%s", customerId)); + HttpClientManager.getInstance().sendAlarmMsg(String.format(EnvEnum.getCurrentEnv().getName() + "数据统计服务-中止计算成功,customerId:%s", customerId)); } return new Result(); } @@ -195,7 +193,7 @@ public class IndexCalculateController { public Result calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { long start = System.currentTimeMillis(); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); - HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); if (aBoolean) { return new Result().ok(true); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index b0ee8fa0ad..1e049b17c7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -57,8 +57,8 @@ public class BatchScoreCalculator { for (SampleValue vo : indexValueVOs) { String sampleId = vo.getSampleId(); //归一后的值 - BigDecimal normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); - BigDecimal score = scoreCalculator.normalize(normalizeValue, weight).setScale(6, RoundingMode.HALF_UP); + BigDecimal normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); + BigDecimal score = normalizeValue.multiply(weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId); if (result == null) { @@ -78,40 +78,6 @@ public class BatchScoreCalculator { return scoreCountOfSamples; } - /** - * 执行计算,以样本的所有指标总得分 - * - * @param indexInputVOS - * @return - */ - public HashMap getScoreCountOfSampleId(List indexInputVOS) { - - // 每个样本的总得分 - HashMap scoreCountOfSamples = new HashMap<>(); - - for (IndexInputVO idx : indexInputVOS) { - // 每个指标循环一次 - List indexValueVOs = idx.getIndexValueVOs(); - BigDecimal weight = idx.getWeight(); - ScoreCalculator scoreCalculator = idx.getScoreCalculator(); - BigDecimal threshold = idx.getThreshold(); - - for (SampleValue vo : indexValueVOs) { - String sampleId = vo.getSampleId(); - BigDecimal score = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold), weight); - if (scoreCountOfSamples.containsKey(sampleId)) { - BigDecimal newScore = scoreCountOfSamples.get(sampleId).add(score).setScale(6, RoundingMode.HALF_UP); - scoreCountOfSamples.put(sampleId, newScore); - } else { - score.setScale(6, RoundingMode.HALF_UP); - scoreCountOfSamples.put(sampleId, score); - } - } - } - - return scoreCountOfSamples; - } - /** * 获取最终样本值 * @@ -128,5 +94,4 @@ public class BatchScoreCalculator { return (bdRealValue.compareTo(threshold) < 0) || (bdRealValue.equals(threshold)) ? bdRealValue : threshold; - } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 15e029b3e6..37b70e5297 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -172,11 +172,20 @@ public class DemoScoreCal { BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + HashMap result2 = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + System.err.println("----------------1----------------"); result.forEach((key, value) -> { System.out.println(key.concat("的得分为:").concat(value.toString())); }); System.err.println("-----------------2---------------"); + + + System.err.println("----------------123123123123----------------"); + result2.forEach((key, value) -> { + System.out.println(key.concat("的得分为:").concat(value.toString())); + }); + System.err.println("-----------------2---------------"); } From 174358f68f6e952a1e4107e6b3dab95541a318b7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 10:25:16 +0800 Subject: [PATCH 099/150] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BD=92=E4=B8=80?= =?UTF-8?q?=E7=AE=97=E6=B3=95=20=E8=BF=94=E5=9B=9E=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/support/normalizing/batch/BatchScoreCalculator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 1e049b17c7..c439df6213 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -94,4 +94,5 @@ public class BatchScoreCalculator { return (bdRealValue.compareTo(threshold) < 0) || (bdRealValue.equals(threshold)) ? bdRealValue : threshold; + } } From 0243c686cb7a336842eb3a02bf54c3ef3d3ebc74 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 10:29:43 +0800 Subject: [PATCH 100/150] =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=8E=92=E9=99=A4=E6=9C=AC=E5=9C=B0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/aspect/CustomerApplicationRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java index 8e065c792a..4500453213 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java @@ -41,7 +41,7 @@ public class CustomerApplicationRunner implements ApplicationRunner { //发送启动成功消息 EnvEnum currentEnv = EnvEnum.getCurrentEnv(); logger.info(currentEnv); - if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode())) { + if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode()) && !EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())) { InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); String serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); From 406f3d20e98062d28d07653a196871617f915465 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 10:33:02 +0800 Subject: [PATCH 101/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/stats/test/normalizing/DemoScoreCal.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 37b70e5297..e3681eab55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -244,13 +244,8 @@ public class DemoScoreCal { BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); System.out.println("param:" + JSON.toJSONString(indexInputVOS)); - HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); HashMap result2 = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); - System.err.println("----------------1----------------"); - result.forEach((key, value) -> { - System.out.println(key.concat("的得分为:").concat(value.toString())); - }); System.err.println("-----------------2---------------"); System.err.println("----------------11111111----------------"); From b2d256764267fde2d689d00c6292664c1ffd59b6 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 14 Sep 2020 10:34:49 +0800 Subject: [PATCH 102/150] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IndexCalculateController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index b7499bd76f..b9491f1cf2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -78,7 +78,7 @@ public class IndexCalculateController { * 处理暂停中的计算 */ @PostMapping("process-pendding-cals") - public void processPenddingCalculate() { + public Result processPenddingCalculate() { String keyPrefix = RedisKeys.getCustomerStatsCalKeyPrefix(); Set calFlagKeys = redisUtils.keys(keyPrefix.concat("*")); calFlagKeys.forEach(key -> { @@ -91,6 +91,8 @@ public class IndexCalculateController { indexCalculate(form); } }); + + return new Result(); } /** From cbe689e1dfcbb89622adb587c1bbb0dace084a5f Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 10:42:16 +0800 Subject: [PATCH 103/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/stats/test/normalizing/DemoScoreCal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index e3681eab55..16549e9b47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -170,7 +170,7 @@ public class DemoScoreCal { List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + HashMap result = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); HashMap result2 = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); From 0d2e1c7cb637ce619c349da70f2c54df4aff54a1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 14 Sep 2020 10:47:25 +0800 Subject: [PATCH 104/150] =?UTF-8?q?/data/stats/kcscreencoll/news/trend=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=85=A5=E5=8F=82=E5=8E=BB=E6=8E=89readCount?= =?UTF-8?q?=EF=BC=8Cscreen=5Fkc=5Fnews=5Ftrend=5Fmonthly=E8=A1=A8=E5=8E=BB?= =?UTF-8?q?=E6=8E=89read=5Fcount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java | 5 ----- .../screen/ScreenKcNewsTrendMonthlyEntity.java | 5 ----- .../evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml | 3 --- 3 files changed, 13 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java index 6e6bdf9359..5d00324e55 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcNewsTrendFormDTO.java @@ -15,11 +15,6 @@ public class KcNewsTrendFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 阅读数量 - */ - private Integer readCount; - /** * 参与数量 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java index 548d34f284..d63a96ee08 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcNewsTrendMonthlyEntity.java @@ -48,11 +48,6 @@ public class ScreenKcNewsTrendMonthlyEntity extends BaseEpmetEntity { */ private String monthId; - /** - * 阅读数量 - */ - private Integer readCount; - /** * 参与数量 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml index 4caffe8fba..60bebaa7d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsTrendMonthlyDao.xml @@ -7,7 +7,6 @@ - @@ -29,7 +28,6 @@ ID, CUSTOMER_ID, MONTH_ID, - READ_COUNT, PARTI_COUNT, DEL_FLAG, REVISION, @@ -43,7 +41,6 @@ (SELECT REPLACE(UUID(), '-', '') AS id), #{customerId}, #{monthId}, - #{item.readCount}, #{item.partiCount}, 0, 0, From c60bf5607027e8668e3dd7a1039e427fba67a7e4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 14 Sep 2020 11:11:49 +0800 Subject: [PATCH 105/150] =?UTF-8?q?sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerStaffDao.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 48fd117891..4d88329d42 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -230,9 +230,11 @@ cs.del_flag = 0 AND cs.enable_flag = 'enable' AND - - cs.user_id = #{userId} - + ( + + cs.user_id = #{userId} + + ) From bfa0bca4766c800edb0737c24b606d1b8bd0c116 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 14 Sep 2020 13:54:05 +0800 Subject: [PATCH 106/150] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=9A=84=E7=BB=9F=E8=AE=A1=EF=BC=8C=E9=87=8D=E6=96=B0=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/DataStatisticalOpenFeignClient.java | 7 +++++ ...ataStatisticalOpenFeignClientFallBack.java | 5 ++++ .../DataStatsProcessPenddingCalService.java | 9 +++++++ ...ataStatsProcessPenddingCalServiceImpl.java | 19 ++++++++++++++ .../task/DataStatsProcessPenddingCalTask.java | 26 +++++++++++++++++++ 5 files changed, 66 insertions(+) create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 1f1c1b10fe..107bc8f478 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -173,4 +173,11 @@ public interface DataStatisticalOpenFeignClient { @PostMapping("/data/stats/statstopic/execute") Result execTopicStatistical(@RequestParam(value = "date",required = false) String date); + /** + * 处理暂停的计算 + * @return + */ + @PostMapping("/data/stats/indexcalculate/process-pendding-cals") + Result processPenddingCalculate(); + } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index d58fa69ec4..1c79cfc56b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -170,4 +170,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result execTopicStatistical(String date) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "execTopicStatistical",date); } + + @Override + public Result processPenddingCalculate() { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "processPenddingCalculate"); + } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java new file mode 100644 index 0000000000..9b5d049284 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java @@ -0,0 +1,9 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; + +public interface DataStatsProcessPenddingCalService { + + Result processPenddingCal(); + +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java new file mode 100644 index 0000000000..55381b40b0 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java @@ -0,0 +1,19 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.feign.DataStatisticalOpenFeignClient; +import com.epmet.service.DataStatsProcessPenddingCalService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class DataStatsProcessPenddingCalServiceImpl implements DataStatsProcessPenddingCalService { + + @Autowired + private DataStatisticalOpenFeignClient feignClient; + + @Override + public Result processPenddingCal() { + return feignClient.processPenddingCalculate(); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java new file mode 100644 index 0000000000..b02396846c --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java @@ -0,0 +1,26 @@ +package com.epmet.task; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.service.DataStatsProcessPenddingCalService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Slf4j +@Component("dataStatsProcessPenddingCalTask") +public class DataStatsProcessPenddingCalTask implements ITask { + + @Autowired + private DataStatsProcessPenddingCalService dataStatsProcessPenddingCalService; + + @Override + public void run(String params) { + log.debug("DataStatsProcessPenddingCalTask定时任务正在执行,参数为:{}", params); + Result result = dataStatsProcessPenddingCalService.processPenddingCal(); + if (result.success()){ + log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行成功"); + }else { + log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行失败:" + result.getMsg()); + } + } +} From 80c0e6c2d22007aa6c418eb31162a0990ff0fa6c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 14 Sep 2020 14:43:10 +0800 Subject: [PATCH 107/150] =?UTF-8?q?=E5=AD=94=E6=9D=91-=E9=A6=96=E9=A1=B5-?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=90=84=E7=B1=BB=E6=80=BB=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/SummaryResultDTO.java | 71 +++++++++++++++++++ .../controller/screen/KcScreenController.java | 22 ++++-- .../ScreenKcPlatformSummaryDailyDao.java | 7 ++ .../screen/KcScreenService.java | 9 +++ .../screen/impl/KcScreenServiceImpl.java | 14 ++++ .../ScreenKcPlatformSummaryDailyDao.xml | 24 +++++++ 6 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java new file mode 100644 index 0000000000..13457e175f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java @@ -0,0 +1,71 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 首页-平台各类总数 + * @Author sun + */ +@Data +public class SummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId = ""; + + /** + * 网格总数 + */ + private Integer gridCount = 0; + /** + * 已开通网格数 + */ + private Integer openedGridCount = 0; + /** + * 议题总数 + */ + private Integer issueCount = 0; + /** + * 项目总数 + */ + private Integer projectCount = 0; + /** + * 用户总数 + */ + private Integer userCount = 0; + /** + * 党员用户 + */ + private Integer partyUserCount = 0; + /** + * 社群总数 + */ + private Integer groupCount = 0; + /** + * 话题总数 + */ + private Integer topicCount = 0; + /** + * 新闻总数 + */ + private Integer newsCount = 0; + /** + * 阅读数量 + */ + private Integer readCount = 0; + /** + * 公益活动总数 + */ + private Integer actCount = 0; + /** + * 志愿者总数 + */ + private Integer volunteerCount = 0; + + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index eb28cd5270..3792593909 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -1,7 +1,12 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; +import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -19,12 +24,15 @@ public class KcScreenController { private KcScreenService kcScreenService; -// @ExternalAppRequestAuth -// @PostMapping("homepage/summary") -// public Result yearAverageIndex(){ -//// ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class); -//// return new Result().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO)); -// } + /** + * @param externalAppRequestParam + * @Description 首页-平台各类总数 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("homepage/summary") + public Result summary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.summary(externalAppRequestParam)); + } - // @RequestBody } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java index 04c0d5dec9..cfa086ebcf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -28,4 +29,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcPlatformSummaryDailyDao { + /** + * @param customerId + * @Description 首页-平台各类总数 + * @author sun + */ + SummaryResultDTO selectSummaryDaily(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index e079aefb42..22ee78e1ff 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,5 +1,8 @@ package com.epmet.datareport.service.evaluationindex.screen; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; + /** * 孔村大屏api * @@ -8,5 +11,11 @@ package com.epmet.datareport.service.evaluationindex.screen; */ public interface KcScreenService { + /** + * @param externalAppRequestParam + * @Description 首页-平台各类总数 + * @author sun + */ + SummaryResultDTO summary(ExternalAppRequestParam externalAppRequestParam); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index a7f656884b..17b445cac4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -1,9 +1,12 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; +import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,6 +22,17 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private DateUtils dateUtils; + @Autowired + private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; + /** + * @param externalAppRequestParam + * @Description 首页-平台各类总数 + * @author sun + */ + @Override + public SummaryResultDTO summary(ExternalAppRequestParam externalAppRequestParam) { + return screenKcPlatformSummaryDailyDao.selectSummaryDaily(externalAppRequestParam.getCustomerId()); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml index 1618b51341..c2b7789b5a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml @@ -3,5 +3,29 @@ + From 8c0e505c4cf3e70bfaf8d2161d2010d6a9784323 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 14 Sep 2020 14:53:31 +0800 Subject: [PATCH 108/150] =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ummaryResultDTO.java => HomepageSummaryResultDTO.java} | 2 +- .../datareport/controller/screen/KcScreenController.java | 8 +++++--- .../screenkc/ScreenKcPlatformSummaryDailyDao.java | 4 ++-- .../service/evaluationindex/screen/KcScreenService.java | 4 ++-- .../evaluationindex/screen/impl/KcScreenServiceImpl.java | 4 ++-- .../mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/{SummaryResultDTO.java => HomepageSummaryResultDTO.java} (94%) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HomepageSummaryResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HomepageSummaryResultDTO.java index 13457e175f..cbecba012c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SummaryResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HomepageSummaryResultDTO.java @@ -9,7 +9,7 @@ import java.io.Serializable; * @Author sun */ @Data -public class SummaryResultDTO implements Serializable { +public class HomepageSummaryResultDTO implements Serializable { private static final long serialVersionUID = 3860268744336541373L; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 3792593909..84ae37ba49 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; -import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -31,8 +31,10 @@ public class KcScreenController { */ @ExternalAppRequestAuth @PostMapping("homepage/summary") - public Result summary(ExternalAppRequestParam externalAppRequestParam){ - return new Result().ok(kcScreenService.summary(externalAppRequestParam)); + public Result homepageSummary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.homepageSummary(externalAppRequestParam)); } + + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java index cfa086ebcf..44ac5c506a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java @@ -17,7 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; -import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -34,5 +34,5 @@ public interface ScreenKcPlatformSummaryDailyDao { * @Description 首页-平台各类总数 * @author sun */ - SummaryResultDTO selectSummaryDaily(String customerId); + HomepageSummaryResultDTO selectSummaryDaily(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 22ee78e1ff..661d09bcbe 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,7 +1,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** * 孔村大屏api @@ -16,6 +16,6 @@ public interface KcScreenService { * @Description 首页-平台各类总数 * @author sun */ - SummaryResultDTO summary(ExternalAppRequestParam externalAppRequestParam); + HomepageSummaryResultDTO homepageSummary(ExternalAppRequestParam externalAppRequestParam); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 17b445cac4..7bc58b9cc5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -6,7 +6,7 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.result.SummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -31,7 +31,7 @@ public class KcScreenServiceImpl implements KcScreenService { * @author sun */ @Override - public SummaryResultDTO summary(ExternalAppRequestParam externalAppRequestParam) { + public HomepageSummaryResultDTO homepageSummary(ExternalAppRequestParam externalAppRequestParam) { return screenKcPlatformSummaryDailyDao.selectSummaryDaily(externalAppRequestParam.getCustomerId()); } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml index c2b7789b5a..1b2818d77c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml @@ -3,7 +3,7 @@ - SELECT date_id AS "dateId", grid_count AS "gridCount", From 650736038c03ff033069cc76ab51e84c97324d45 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 14 Sep 2020 15:18:36 +0800 Subject: [PATCH 109/150] =?UTF-8?q?=E4=B8=89=E5=A4=A7=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E4=B9=98=E4=B8=8A=E5=AF=B9=E5=BA=94=E6=9D=83=E9=87=8D=EF=BC=8C?= =?UTF-8?q?=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5=E6=8F=90=E5=87=BA=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/IndexServiceImpl.java | 55 ++++++++++++++++--- .../screen/ScreenIndexDataMonthlyDao.xml | 30 +++++----- .../screen/ScreenIndexDataYearlyDao.xml | 8 +-- 3 files changed, 67 insertions(+), 26 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index e3e6ce4a61..b0c9715031 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.Comparator; @@ -53,6 +54,10 @@ public class IndexServiceImpl implements IndexService { if (null == yearAverageIndexResultDTO){ return new YearAverageIndexResultDTO(); } + yearAverageIndexResultDTO.setPartyDevAbility(getRound(yearAverageIndexResultDTO.getPartyDevAbility())); + yearAverageIndexResultDTO.setGovernAbility(getRound(yearAverageIndexResultDTO.getGovernAbility())); + yearAverageIndexResultDTO.setServiceAbility(getRound(yearAverageIndexResultDTO.getServiceAbility())); + yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getYearAverageIndex())); return yearAverageIndexResultDTO; } @@ -66,19 +71,23 @@ public class IndexServiceImpl implements IndexService { @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { - MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); + MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); + if (null == pieChartDTO){ + return new MonthPieChartResultDTO(); + } + // 处理小数四舍五入 + pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility())); + pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility())); + pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility())); String monthId = dateUtils.getCurrentMonthId(); int time = NumConstant.TWELVE; //保证获取月度指数数据的最大可能性 - while(null == monthPieChartResultDTO && time > NumConstant.ONE){ + while(null == pieChartDTO && time > NumConstant.ONE){ time--; monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); - monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId); + pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId); } - if (null == monthPieChartResultDTO){ - return new MonthPieChartResultDTO(); - } - return monthPieChartResultDTO; + return pieChartDTO; } /** @@ -112,6 +121,13 @@ public class IndexServiceImpl implements IndexService { result.setTotalIndexData(totalIndexData); return result; } + // 处理小数四舍五入 + monthBarchartResults.forEach(barchart -> { + barchart.setPartyDevAbility(getRound(barchart.getPartyDevAbility())); + barchart.setGovernAbility(getRound(barchart.getGovernAbility())); + barchart.setServiceAbility(getRound(barchart.getServiceAbility())); + barchart.setIndexTotal(getRound(barchart.getIndexTotal())); + }); List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); //升序 当前月份在队尾 List _ymList = dateUtils.getXpro().keySet().stream().collect(Collectors.toList()); @@ -178,6 +194,13 @@ public class IndexServiceImpl implements IndexService { if (CollectionUtils.isEmpty(subAgencyIndexRankResultDTOS)){ return new ArrayList<>(); } + // 小数四舍五入 + subAgencyIndexRankResultDTOS.forEach(indexRank -> { + indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); + indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); + indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); + indexRank.setTotalIndex(getRound(indexRank.getTotalIndex())); + }); return subAgencyIndexRankResultDTOS; } @@ -191,7 +214,25 @@ public class IndexServiceImpl implements IndexService { } else if (ScreenConstant.MONTH_ID.equals(formDTO.getType())){ // 月(上一个月) 指数排行 subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectAnNingSubAgencyIndexMonthlyRank(formDTO); + subAgencyIndexRankResultDTOS.forEach(rank -> { + rank.setPartyDevAbility(getRound(rank.getPartyDevAbility())); + rank.setGovernAbility(getRound(rank.getGovernAbility())); + rank.setServiceAbility(getRound(rank.getServiceAbility())); + rank.setTotalIndex(getRound(rank.getTotalIndex())); + }); } return subAgencyIndexRankResultDTOS; } + + /** + * @Description 小数四舍五入 + * @param d + * @author zxc + * @date 2020/9/14 2:01 下午 + */ + public Double getRound(Double d){ + BigDecimal bigDecimal = new BigDecimal(d); + BigDecimal b = bigDecimal.setScale(NumConstant.ONE, BigDecimal.ROUND_HALF_UP); + return Double.valueOf(b.toString()); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 58a41b9d5f..0a040c2ccb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -6,9 +6,9 @@ SELECT month_id AS monthId, - ROUND(service_ablity,1) AS serviceAbility, - ROUND(party_dev_ablity,1) AS partyDevAbility, - ROUND(govern_ablity,1) AS governAbility, - ROUND(index_total,1) AS indexTotal + service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, + party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, + (service_ablity * SERVICE_ABLITY_WEIGHT + party_dev_ablity * PARTY_DEV_WEIGHT + govern_ablity * GOVERN_ABLITY_WEIGHT) AS indexTotal FROM screen_index_data_monthly WHERE @@ -47,10 +47,10 @@ SELECT - ROUND(index_total,1) AS yearAverageIndex, - ROUND(service_ablity,1) AS serviceAbility, - ROUND(party_dev_ablity,1) AS partyDevAbility, - ROUND(govern_ablity,1) AS governAbility + index_total AS yearAverageIndex, + service_ablity AS serviceAbility, + party_dev_ablity AS partyDevAbility, + govern_ablity AS governAbility FROM screen_index_data_yearly WHERE From 02a48a1965200963040b669d1ee02dde3760442c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 14 Sep 2020 18:02:41 +0800 Subject: [PATCH 110/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ActTrendMonthlyResultDTO.java | 26 ++++++++++ .../result/HeartActcounttrendResultDTO.java | 29 +++++++++++ .../dto/result/HeartSummaryResultDTO.java | 43 ++++++++++++++++ .../controller/screen/KcScreenController.java | 22 +++++++++ .../screenkc/ScreenKcActTrendMonthlyDao.java | 9 ++++ ...ScreenKcVolunteerHeatRankGridDailyDao.java | 7 +++ .../screen/KcScreenService.java | 15 ++++++ .../screen/impl/KcScreenServiceImpl.java | 49 ++++++++++++++++++- .../screenkc/ScreenKcActTrendMonthlyDao.xml | 15 +++++- .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 17 +++++++ 10 files changed, 229 insertions(+), 3 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ActTrendMonthlyResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartActcounttrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartSummaryResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ActTrendMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ActTrendMonthlyResultDTO.java new file mode 100644 index 0000000000..80019a15c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ActTrendMonthlyResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-公益活动次数 + * @Author sun + */ +@Data +public class ActTrendMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 月id :yyyyMM + */ + private String monthId = ""; + + /** + * 活动数量(本月举行的活动) + */ + private Integer actCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartActcounttrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartActcounttrendResultDTO.java new file mode 100644 index 0000000000..4ebc3422d0 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartActcounttrendResultDTO.java @@ -0,0 +1,29 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; +import rx.internal.util.LinkedArrayList; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-公益活动次数 + * @Author sun + */ +@Data +public class HeartActcounttrendResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 横坐标 月份集合 + */ + private LinkedList xAxis; + + /** + * 活动次数 集合 + */ + private LinkedList actCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartSummaryResultDTO.java new file mode 100644 index 0000000000..a91482cebe --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartSummaryResultDTO.java @@ -0,0 +1,43 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-各类总数汇总 + * @Author sun + */ +@Data +public class HeartSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + private String dateId = ""; + + /** + * 活动次数 + */ + private Integer actCount = 0; + /** + * 志愿者总数 + */ + private Integer volunteerCount = 0; + /** + * 参与人次 + */ + private Integer partiUserCount = 0; + /** + * 发放积分 + */ + private Integer rewardPointCount = 0; + /** + * 公益时长 + */ + private Integer heartTime = 0; + + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 84ae37ba49..88a9a425bd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -4,6 +4,8 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; +import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -35,6 +37,26 @@ public class KcScreenController { return new Result().ok(kcScreenService.homepageSummary(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 公益互助-各类总数汇总 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/summary") + public Result heartSummary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.heartSummary(externalAppRequestParam)); + } + /** + * @param externalAppRequestParam + * @Description 公益互助-公益活动次数 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/actcounttrend") + public Result heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java index 052febf324..bb7cdaad84 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-活动(次数+时长)趋势(先根据customerId+monthId删除) * @@ -28,4 +31,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcActTrendMonthlyDao { + /** + * @param customerId + * @Description 按客户查询最近十二个月数据 + * @author sun + */ + List selectActTrendMonthly(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index 91bd730689..64ef74f376 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -28,4 +29,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcVolunteerHeatRankGridDailyDao { + /** + * @param customerId + * @Description 公益互助-各类总数汇总 + * @author sun + */ + HeartSummaryResultDTO selectHeartSummary(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 661d09bcbe..0e58cf7c08 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,6 +1,8 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** @@ -18,4 +20,17 @@ public interface KcScreenService { */ HomepageSummaryResultDTO homepageSummary(ExternalAppRequestParam externalAppRequestParam); + /** + * @param externalAppRequestParam + * @Description 公益互助-各类总数汇总 + * @author sun + */ + HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 公益互助-公益活动次数 + * @author sun + */ + HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 7bc58b9cc5..02b2c9c02d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -3,13 +3,21 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao; import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcVolunteerHeatRankGridDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; +import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.LinkedList; +import java.util.List; + /** * 孔村大屏api * @@ -24,10 +32,14 @@ public class KcScreenServiceImpl implements KcScreenService { private DateUtils dateUtils; @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; /** - * @param externalAppRequestParam - * @Description 首页-平台各类总数 + * @param externalAppRequestParam + * @Description 首页-平台各类总数 * @author sun */ @Override @@ -35,4 +47,37 @@ public class KcScreenServiceImpl implements KcScreenService { return screenKcPlatformSummaryDailyDao.selectSummaryDaily(externalAppRequestParam.getCustomerId()); } + /** + * @param externalAppRequestParam + * @Description 公益互助-各类总数汇总 + * @author sun + */ + @Override + public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { + return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); + } + + /** + * @param externalAppRequestParam + * @Description 公益互助-公益活动次数 + * @author sun + */ + @Override + public HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam) { + HeartActcounttrendResultDTO resultDTO = new HeartActcounttrendResultDTO(); + LinkedList xAxis = new LinkedList<>(); + LinkedList actCountDataList = new LinkedList<>(); + //1.按客户查询最近十二个月数据 + List list = screenKcActTrendMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId()); + //2.倒序遍历封装数据 + for (int i = list.size() - 1; i >= 0; i--) { + xAxis.add(list.get(i).getMonthId()); + actCountDataList.add(list.get(i).getActCount().toString()); + } + //3.封装数据并返回 + resultDTO.setXAxis(xAxis); + resultDTO.setActCountDataList(actCountDataList); + return resultDTO; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index 5978feed5a..55b9bca50a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -4,5 +4,18 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml index 4c6ff538f8..581f4a013e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -4,4 +4,21 @@ + From a7ebeffb70d81526bb59e42396275fd9877dee74 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 09:07:03 +0800 Subject: [PATCH 111/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=A4=96=E9=83=A8=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.7__add_kongcun_app.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.7__add_kongcun_app.sql diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.7__add_kongcun_app.sql b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.7__add_kongcun_app.sql new file mode 100644 index 0000000000..5114b07688 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.7__add_kongcun_app.sql @@ -0,0 +1,9 @@ +INSERT INTO `epmet_common_service`.`external_customer`(`ID`, `CUSTOMER_NAME`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2fe0065f70ca0e23ce4c26fca5f1d933', '大美孔村', 0, 0, 'APP_USER', '2020-09-15 09:00:57', 'APP_USER', '2020-09-15 09:00:57'); + + +INSERT INTO `epmet_common_service`.`external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('4733fda58aba5024b776f22f135350df', '孔村数据采集', '2fe0065f70ca0e23ce4c26fca5f1d933', 'external', 0, 'APP_USER', '2020-09-15 09:01:31', 'APP_USER', '2020-09-15 09:01:31', 0); +INSERT INTO `epmet_common_service`.`external_app`(`ID`, `APP_NAME`, `CUSTOMER_ID`, `CUSTOMER_TYPE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`, `DEL_FLAG`) VALUES ('5efcfb775125d656f39583b8110a3d7d', '孔村大屏', '2fe0065f70ca0e23ce4c26fca5f1d933', 'external', 0, 'APP_USER', '2020-09-15 09:01:39', 'APP_USER', '2020-09-15 09:01:39', 0); + + +INSERT INTO `epmet_common_service`.`external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('362d4fce3311f67edb40b0e5291d37eb', '5efcfb775125d656f39583b8110a3d7d', '657cd46d385a4c2ba6d9355aee24654ac3951deab7e6436e91201561b94969b5', 0, 0, 'APP_USER', '2020-09-15 09:01:39', 'APP_USER', '2020-09-15 09:01:39'); +INSERT INTO `epmet_common_service`.`external_app_secret`(`ID`, `APP_ID`, `SECRET`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7853487c79dab384b4c681d734d9eb3a', '4733fda58aba5024b776f22f135350df', '61224b4d747f4853b9551fe078b90b2355f72c3256a14bdb8faac4a4d7ed68a0', 0, 0, 'APP_USER', '2020-09-15 09:01:31', 'APP_USER', '2020-09-15 09:01:31'); From 8b3436d42985ed5f999fe48a5ec7e53b4a475fce Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 09:38:29 +0800 Subject: [PATCH 112/150] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=BA=90=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/dynamic/datasource/config/DynamicDataSource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java index 48512ed7af..c094c1fa69 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java @@ -24,7 +24,9 @@ public class DynamicDataSource extends AbstractRoutingDataSource { @Override protected Object determineCurrentLookupKey() { - return DynamicContextHolder.peek(); + String ds = DynamicContextHolder.peek(); + System.out.println("动态数据源:" + ds); + return ds; } } From 21f7d96164bfd6a786132234dc692f37965d67c1 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 09:39:11 +0800 Subject: [PATCH 113/150] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=BA=90=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/dynamic/datasource/config/DynamicDataSource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java index c094c1fa69..62939c595f 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java @@ -25,7 +25,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { @Override protected Object determineCurrentLookupKey() { String ds = DynamicContextHolder.peek(); - System.out.println("动态数据源:" + ds); + logger.info("动态数据源:{}" + ds); return ds; } From fea1a15f61f9b8e53bd235e4c50ff613a4a687d0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 10:27:07 +0800 Subject: [PATCH 114/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E5=85=AC=E7=9B=8A=E4=BA=92=E5=8A=A9=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HeartVolunteerrankFormDTO.java | 33 +++++++++++ .../dto/result/AgeDistributionResultDTO.java | 53 ++++++++++++++++++ .../result/GenderDistributionResultDTO.java | 26 +++++++++ .../HeartVolunteerportrayalResultDTO.java | 27 +++++++++ .../result/HeartVolunteerrankResultDTO.java | 37 ++++++++++++ .../controller/screen/KcScreenController.java | 33 ++++++++++- .../screenkc/ScreenKcActSummaryDailyDao.java | 8 +++ .../screenkc/ScreenKcActTrendMonthlyDao.java | 3 +- .../ScreenKcPlatformSummaryDailyDao.java | 3 +- ...ScreenKcVolunteerHeatRankGridDailyDao.java | 12 +++- .../ScreenKcVolunteerSummaryDailyDao.java | 8 +++ .../screen/KcScreenService.java | 21 ++++++- .../screen/impl/KcScreenServiceImpl.java | 56 ++++++++++++++++--- .../screenkc/ScreenKcActSummaryDailyDao.xml | 17 ++++++ .../screenkc/ScreenKcActTrendMonthlyDao.xml | 2 +- .../ScreenKcPlatformSummaryDailyDao.xml | 2 +- .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 20 +++---- .../ScreenKcVolunteerSummaryDailyDao.xml | 20 ++++++- 18 files changed, 347 insertions(+), 34 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java new file mode 100644 index 0000000000..cca3eb4f1b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名-接口入参 + * @Author sun + */ +@Data +public class HeartVolunteerrankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java new file mode 100644 index 0000000000..616d9207c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class AgeDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1 = 0; + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2 = 0; + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3 = 0; + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4 = 0; + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5 = 0; + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6 = 0; + /** + * 志愿者中男性总人数 + */ + @JsonIgnore + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + @JsonIgnore + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java new file mode 100644 index 0000000000..e36589103a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class GenderDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java new file mode 100644 index 0000000000..2bbcd82df1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class HeartVolunteerportrayalResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 个年龄段志愿者人数 + */ + private AgeDistributionResultDTO ageDistribution; + + /** + * 男、女志愿者人员 + */ + private GenderDistributionResultDTO genderDistribution; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java new file mode 100644 index 0000000000..03f962e110 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class HeartVolunteerrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 用户id + */ + private String userId = ""; + /** + * 用户名称 + */ + private String userName = ""; + /** + * 公益时长分钟 + */ + private Integer heartTime = 0; + /** + * 积分 + */ + private Integer points = 0; + /** + * 所属网格名称 + */ + private String gridName = ""; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 88a9a425bd..f945c8c43f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -3,15 +3,18 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; 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; +import java.util.List; + /** * 孔村大屏api * @@ -59,4 +62,28 @@ public class KcScreenController { return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerportrayal") + public Result heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.heartVolunteerportrayal(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerrank") + public Result> heartVolunteerrank(ExternalAppRequestParam externalAppRequestParam, @RequestBody HeartVolunteerrankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, HeartVolunteerrankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java index 8ed8b0f9d9..3de0da456c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-活动各类总数(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcActSummaryDailyDao { + /** + * @param customerId + * @Description 公益互助-各类总数汇总 + * @author sun + */ + HeartSummaryResultDTO selectHeartSummary(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java index bb7cdaad84..173bd2c936 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -36,5 +37,5 @@ public interface ScreenKcActTrendMonthlyDao { * @Description 按客户查询最近十二个月数据 * @author sun */ - List selectActTrendMonthly(String customerId); + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java index 44ac5c506a..9772805fff 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-平台各汇总值(先根据customerId+dateId删除) @@ -34,5 +35,5 @@ public interface ScreenKcPlatformSummaryDailyDao { * @Description 首页-平台各类总数 * @author sun */ - HomepageSummaryResultDTO selectSummaryDaily(String customerId); + HomepageSummaryResultDTO selectSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index 64ef74f376..cb57c5ef36 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-志愿者公益时长排名(先根据customerId删除) @@ -30,9 +35,10 @@ import org.apache.ibatis.annotations.Mapper; public interface ScreenKcVolunteerHeatRankGridDailyDao { /** - * @param customerId - * @Description 公益互助-各类总数汇总 + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 * @author sun */ - HeartSummaryResultDTO selectHeartSummary(String customerId); + List selectHeartVolunteerrankList(HeartVolunteerrankFormDTO formDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java index 38a06222dd..27990e8bc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.AgeDistributionResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-志愿者汇总(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcVolunteerSummaryDailyDao { + /** + * @param customerId + * @Description 根据客户Id查询最近日期志愿者统计数据 + * @author sun + */ + AgeDistributionResultDTO selectVolunteerSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 0e58cf7c08..448b032c21 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,9 +1,10 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; + +import java.util.List; /** * 孔村大屏api @@ -33,4 +34,18 @@ public interface KcScreenService { * @author sun */ HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 02b2c9c02d..e86c1d7353 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -2,16 +2,13 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcVolunteerHeatRankGridDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,9 +30,13 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired - private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; @Autowired private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; + @Autowired + private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; /** * @param externalAppRequestParam @@ -54,7 +55,7 @@ public class KcScreenServiceImpl implements KcScreenService { */ @Override public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { - return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); + return screenKcActSummaryDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); } /** @@ -80,4 +81,41 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @Override + public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam) { + HeartVolunteerportrayalResultDTO resultDTO = new HeartVolunteerportrayalResultDTO(); + GenderDistributionResultDTO genderDistribution = new GenderDistributionResultDTO(); + //1.根据客户Id查询最近日期志愿者统计数据 + AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(externalAppRequestParam.getCustomerId()); + //2.封装数据并返回 + if (null == ageDistribution) { + resultDTO.setAgeDistribution(new AgeDistributionResultDTO()); + resultDTO.setGenderDistribution(genderDistribution); + } else { + resultDTO.setAgeDistribution(ageDistribution); + genderDistribution.setMaleCount(ageDistribution.getMaleCount()); + genderDistribution.setFemaleCount(ageDistribution.getFemaleCount()); + resultDTO.setGenderDistribution(genderDistribution); + } + return resultDTO; + } + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @Override + public List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List list = screenKcVolunteerHeatRankGridDailyDao.selectHeartVolunteerrankList(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml index a2b108ceb9..14cba9ef1a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml @@ -3,5 +3,22 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index 55b9bca50a..a7062885ce 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -15,7 +15,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - month_id DESC + month_id DESC, created_time DESC LIMIT 12 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml index 1b2818d77c..5ef2a4780e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml @@ -24,7 +24,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC + date_id DESC, created_time DESC LIMIT 1 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml index 581f4a013e..527a33ce0a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -3,22 +3,20 @@ - - SELECT - date_id AS "dateId", - act_count AS "actCount", - volunteer_count AS "volunteerCount", - parti_user_count AS "partiUserCount", - reward_point_count AS "rewardPointCount", - heart_time AS "heartTime" + grid_name AS "gridName", + user_id AS "userId", + user_name AS "userName", + heart_time AS "heartTime", + points AS "points" FROM - screen_kc_act_summary_daily + screen_kc_volunteer_heat_rank_grid_daily WHERE del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC - LIMIT 1 + date_id DESC, created_time DESC + LIMIT #{pageNo}, #{pageSize} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml index 39f5781f95..62f94e5d1f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml @@ -3,5 +3,23 @@ - + From 07218d8e210c92be729a30fba295e97aaf62686e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 11:19:34 +0800 Subject: [PATCH 115/150] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/DemoDataStatsServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java | 4 +++- .../stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyYearlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentDailyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridDailyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedGridQuarterlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridYearlyServiceImpl.java | 3 +++ 13 files changed, 39 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java index 698a7c2881..e63a135590 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.DimYearDao; import com.epmet.entity.stats.DimYearEntity; import com.epmet.service.stats.DemoDataStatsService; @@ -14,6 +16,7 @@ import java.util.Date; * 默认为统计数据源,不需要手动指定 */ @Service +@DataSource(DataSourceConstant.STATS) public class DemoDataStatsServiceImpl implements DemoDataStatsService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java index 7eef72f9d7..2c267d7bc5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java @@ -17,12 +17,13 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyDailyDao; import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; -import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedAgencyDailyService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -41,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java index 85c51f9fdb..8ab508c5bc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao; import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; import com.epmet.service.stats.FactTagUsedAgencyMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java index ec83b4b9b6..9f80d9eeea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao; import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java index 32f24e5836..340bc6b5cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao; import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; import com.epmet.service.stats.FactTagUsedAgencyYearlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java index f88f1f330a..ef85d1742f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao; import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; import com.epmet.service.stats.FactTagUsedDepartmentDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java index e0411038be..81bea68cf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentMonthlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java index bb51750412..5b0abbbeec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java index 6614095001..fb66d73fe2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentYearlyService; @@ -38,6 +40,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java index 95081992f2..dc0411850b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridDailyDao; import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedGridDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl implements FactTagUsedGridDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java index 05dc9a8942..c62068bee9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridMonthlyDao; import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; import com.epmet.service.stats.FactTagUsedGridMonthlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java index 4e6bf21e2c..d4e34af163 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao; import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; import com.epmet.service.stats.FactTagUsedGridQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridQuarterlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java index 02c7902ec2..ec981e83ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridYearlyDao; import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; import com.epmet.service.stats.FactTagUsedGridYearlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridYearlyService { @Override From eee09a3a1beb81ab86026a169d3004c0e8d039af Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 12:15:33 +0800 Subject: [PATCH 116/150] =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/impl/DimAgencyServiceImpl.java | 1 + .../service/stats/impl/DimCustomerServiceImpl.java | 3 +++ .../service/stats/impl/DimDateServiceImpl.java | 12 ++++++++---- .../stats/impl/DimDepartmentServiceImpl.java | 3 +++ .../service/stats/impl/DimGridServiceImpl.java | 5 +++-- .../service/stats/impl/DimMonthServiceImpl.java | 8 ++++---- .../service/stats/impl/DimQuarterServiceImpl.java | 13 ++++++++----- .../service/stats/impl/DimWeekServiceImpl.java | 7 ++++--- .../service/stats/impl/DimYearServiceImpl.java | 7 ++++--- 9 files changed, 38 insertions(+), 21 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index d24fec3ee8..a6a257cb6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -55,6 +55,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimAgencyServiceImpl extends BaseServiceImpl implements DimAgencyService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java index 384c07c6da..cd5a1bad1d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java @@ -19,12 +19,14 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimCustomerDao; @@ -52,6 +54,7 @@ import java.util.Map; */ @Service @Slf4j +@DataSource(DataSourceConstant.STATS) public class DimCustomerServiceImpl extends BaseServiceImpl implements DimCustomerService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java index b754794b8a..9860f1937c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimDateDao; import com.epmet.dto.stats.DimDateDTO; import com.epmet.entity.stats.DimDateEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimDateService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; @@ -39,7 +39,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 日期维度表 @@ -48,6 +51,7 @@ import java.util.*; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimDateServiceImpl extends BaseServiceImpl implements DimDateService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java index 2c6fc13d8c..bbc261910c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java @@ -19,10 +19,12 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimDepartmentDao; @@ -50,6 +52,7 @@ import java.util.Map; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class DimDepartmentServiceImpl extends BaseServiceImpl implements DimDepartmentService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index cf1b8810ea..aa4091f60b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -19,12 +19,14 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimGridDao; import com.epmet.dao.stats.LastExecRecordDao; @@ -33,9 +35,7 @@ import com.epmet.dto.group.result.AgencyGridInfoResultDTO; import com.epmet.dto.group.result.SubAgencyIdResultDTO; import com.epmet.dto.stats.DimGridDTO; import com.epmet.entity.stats.DimGridEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimGridService; -import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,6 +53,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimGridServiceImpl extends BaseServiceImpl implements DimGridService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java index 30dd3e210d..4cc6e03fd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java @@ -19,23 +19,22 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimMonthDao; import com.epmet.dto.stats.DimMonthDTO; import com.epmet.entity.stats.DimMonthEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimMonthService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; import org.apache.commons.lang3.StringUtils; import org.joda.time.LocalDate; -import org.joda.time.LocalTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -52,6 +51,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimMonthServiceImpl extends BaseServiceImpl implements DimMonthService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java index a6e38147c3..5bad47d7f0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java @@ -19,21 +19,20 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimQuarterDao; import com.epmet.dto.stats.DimQuarterDTO; import com.epmet.entity.stats.DimQuarterEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimQuarterService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; -import com.sun.org.apache.xpath.internal.operations.Bool; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +40,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 季度维度表 @@ -50,6 +52,7 @@ import java.util.*; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimQuarterServiceImpl extends BaseServiceImpl implements DimQuarterService { private Logger logger = LoggerFactory.getLogger(getClass()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java index 67d733976f..26e5815422 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimWeekDao; import com.epmet.dto.stats.DimWeekDTO; import com.epmet.entity.stats.DimWeekEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimWeekService; import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; @@ -50,6 +50,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimWeekServiceImpl extends BaseServiceImpl implements DimWeekService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java index 1c51a6babe..a1ed3bd2f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimYearDao; import com.epmet.dto.stats.DimYearDTO; import com.epmet.entity.stats.DimYearEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimYearService; import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; @@ -50,6 +50,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimYearServiceImpl extends BaseServiceImpl implements DimYearService { @Autowired From 537fc4355d76ee90926f33cb863408ee935be01b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 13:22:23 +0800 Subject: [PATCH 117/150] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/impl/FactAgencyProjectDailyServiceImpl.java | 3 +++ .../impl/FactAgencyProjectMonthlyServiceImpl.java | 3 +++ .../FactArticlePublishedAgencyDailyServiceImpl.java | 3 +++ ...FactArticlePublishedDepartmentDailyServiceImpl.java | 3 +++ .../impl/FactArticlePublishedGridDailyServiceImpl.java | 3 +++ .../stats/impl/FactGridProjectDailyServiceImpl.java | 3 +++ .../stats/impl/FactGridProjectMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactGroupAgencyDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactGroupAgencyMonthlyServiceImpl.java | 5 ++++- .../stats/impl/FactGroupGridDailyServiceImpl.java | 10 ++++++---- .../stats/impl/FactIssueAgencyDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueAgencyMonthlyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueGridDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueGridMonthlyServiceImpl.java | 6 ++++-- .../impl/FactTagViewedAgencyDailyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyMonthlyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyQuarterlyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyYearlyServiceImpl.java | 3 +++ .../stats/impl/FactTagViewedGridDailyServiceImpl.java | 3 +++ .../impl/FactTagViewedGridMonthlyServiceImpl.java | 3 +++ .../impl/FactTagViewedGridQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagViewedGridYearlyServiceImpl.java | 3 +++ .../service/stats/impl/LastExecRecordServiceImpl.java | 6 ++++-- 23 files changed, 79 insertions(+), 17 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java index bbb1b39e44..ddf18955ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactAgencyProjectDailyDao; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; @@ -33,6 +35,7 @@ import java.util.List; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl implements FactAgencyProjectDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java index df869107f9..f96333f178 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactAgencyProjectMonthlyDao; import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; import com.epmet.service.stats.FactAgencyProjectMonthlyService; @@ -30,6 +32,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactAgencyProjectMonthlyServiceImpl extends BaseServiceImpl implements FactAgencyProjectMonthlyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java index 9068ca2bdb..c12d4b176f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java @@ -18,7 +18,9 @@ package com.epmet.service.stats.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedAgencyDailyDao; import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; @@ -37,6 +39,7 @@ import java.util.Collection; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedAgencyDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedAgencyDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java index 6f9e172dce..b21b0bb942 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedDepartmentDailyDao; import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService; @@ -35,6 +37,7 @@ import java.util.Collection; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedDepartmentDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java index c13a282916..9ad55d632f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedGridDailyDao; import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; import com.epmet.entity.stats.FactArticlePublishedGridDailyEntity; @@ -41,6 +43,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedGridDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedGridDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java index 1b54cd7686..d585bbfda7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGridProjectDailyDao; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; @@ -34,6 +36,7 @@ import java.util.List; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGridProjectDailyServiceImpl extends BaseServiceImpl implements FactGridProjectDailyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java index 1d026d2891..4677b1dfa5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGridProjectMonthlyDao; import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; import com.epmet.entity.stats.FactGridProjectMonthlyEntity; @@ -31,6 +33,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGridProjectMonthlyServiceImpl extends BaseServiceImpl implements FactGridProjectMonthlyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java index 30262fc6f7..21df7a0da4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupAgencyDailyDao; import com.epmet.dto.group.form.AgencyMonthlyFormDTO; import com.epmet.dto.group.result.AgencyGroupDailyResultDTO; @@ -32,7 +34,6 @@ import com.epmet.dto.stats.FactGroupAgencyDailyDTO; import com.epmet.entity.stats.FactGroupAgencyDailyEntity; import com.epmet.service.stats.FactGroupAgencyDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,6 +49,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupAgencyDailyServiceImpl extends BaseServiceImpl implements FactGroupAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java index a9ba8ff7ac..5411842a38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupAgencyMonthlyDao; import com.epmet.dto.group.form.AgencyMonthlyFormDTO; import com.epmet.dto.stats.FactGroupAgencyMonthlyDTO; @@ -44,6 +46,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactGroupAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java index 6556ba92b6..d59d82e1e0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java @@ -19,17 +19,18 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.group.result.GroupGridDailyResultDTO; -import com.epmet.dto.stats.FactGroupGridDailyDTO; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupGridDailyDao; +import com.epmet.dto.group.result.GroupGridDailyResultDTO; +import com.epmet.dto.stats.FactGroupGridDailyDTO; import com.epmet.entity.stats.FactGroupGridDailyEntity; import com.epmet.service.StatsGroupService; -import com.epmet.service.group.GroupDataService; import com.epmet.service.stats.FactGroupGridDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +48,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupGridDailyServiceImpl extends BaseServiceImpl implements FactGroupGridDailyService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java index e6007e90d2..7f8b199438 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueAgencyDailyDao; import com.epmet.dto.stats.FactIssueAgencyDailyDTO; import com.epmet.entity.stats.FactIssueAgencyDailyEntity; import com.epmet.service.stats.FactIssueAgencyDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueAgencyDailyServiceImpl extends BaseServiceImpl implements FactIssueAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java index 7215ecb179..2c3b7d46af 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueAgencyMonthlyDao; import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; import com.epmet.service.stats.FactIssueAgencyMonthlyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactIssueAgencyMonthlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java index 063e2ef8c5..e076194ef0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueGridDailyDao; import com.epmet.dto.stats.FactIssueGridDailyDTO; import com.epmet.entity.stats.FactIssueGridDailyEntity; import com.epmet.service.stats.FactIssueGridDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueGridDailyServiceImpl extends BaseServiceImpl implements FactIssueGridDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java index d3b0468011..97d6f29242 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueGridMonthlyDao; import com.epmet.dto.stats.FactIssueGridMonthlyDTO; import com.epmet.entity.stats.FactIssueGridMonthlyEntity; import com.epmet.service.stats.FactIssueGridMonthlyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueGridMonthlyServiceImpl extends BaseServiceImpl implements FactIssueGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java index 9e9500e96e..180be0459a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyDailyDao; import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; import com.epmet.service.stats.FactTagViewedAgencyDailyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java index 0b7f08a6ed..3a56ffddc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyMonthlyDao; import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; import com.epmet.service.stats.FactTagViewedAgencyMonthlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java index ba226febc9..6c69a4e92f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyQuarterlyDao; import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; import com.epmet.service.stats.FactTagViewedAgencyQuarterlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java index d5a0f0c123..3be2719703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyYearlyDao; import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; import com.epmet.service.stats.FactTagViewedAgencyYearlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java index 2f3d9c0781..c129d5f7f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridDailyDao; import com.epmet.entity.stats.FactTagViewedGridDailyEntity; import com.epmet.service.stats.FactTagViewedGridDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridDailyServiceImpl extends BaseServiceImpl implements FactTagViewedGridDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java index 59e0726914..771d6acb30 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridMonthlyDao; import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; import com.epmet.service.stats.FactTagViewedGridMonthlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java index 1671a6f4ef..e34601b5fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridQuarterlyDao; import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; import com.epmet.service.stats.FactTagViewedGridQuarterlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java index a7dd6a6242..00bcb8a245 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridYearlyDao; import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; import com.epmet.service.stats.FactTagViewedGridYearlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java index ba6e33d157..f37ac3b712 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java @@ -1,5 +1,7 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.dao.stats.LastExecRecordDao; import com.epmet.entity.stats.LastExecRecordEntity; @@ -7,13 +9,13 @@ import com.epmet.service.stats.LastExecRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; - @Service +@DataSource(DataSourceConstant.STATS) public class LastExecRecordServiceImpl implements LastExecRecordService { @Autowired private LastExecRecordDao lastExecRecordDao; + @Override public LastExecRecordEntity getLastExecRecord(String statsSubject) { return lastExecRecordDao.getLastExecRecord(statsSubject); } From 38ece9f7bf95e05dda7b8fb85bd9d07ca175da5e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 14:19:43 +0800 Subject: [PATCH 118/150] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8D=E8=AF=A5?= =?UTF-8?q?=E6=9C=89=E7=9A=84=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index a6a257cb6f..ee4c56db29 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -211,7 +211,6 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getAgencyListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ From d5ee8b7da8ad2c90b405a3bd761457c0df04e98c Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 14:31:38 +0800 Subject: [PATCH 119/150] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=AE=AE?= =?UTF-8?q?=E9=A2=98summary+=E8=AE=AE=E9=A2=98=E8=B6=8B=E5=8A=BF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../dto/result/issue/KcIssueSummary.java | 18 ++ .../result/issue/KcPartiTrendResultDTO.java | 16 ++ .../controller/screen/KcScreenController.java | 31 ++++ .../ScreenKcIssueSummaryGridDailyDao.java | 3 + .../ScreenKcIssueTrendGridMonthlyDao.java | 6 + .../ScreenKcIssueSummaryGridDailyDTO.java | 156 ++++++++++++++++++ .../ScreenKcIssueTrendGridMonthlyDTO.java | 106 ++++++++++++ .../screen/KcScreenService.java | 6 + .../screen/impl/KcScreenServiceImpl.java | 32 ++++ .../ScreenKcIssueSummaryGridDailyDao.xml | 8 + .../ScreenKcIssueTrendGridMonthlyDao.xml | 8 + .../ScreenKcIssueSummaryGridDailyDao.xml | 17 +- .../ScreenKcIssueTrendGridMonthlyDao.xml | 10 +- 14 files changed, 415 insertions(+), 4 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index 8e526e2a73..49dbbb94d5 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: epmet_dba password: EpmEt-dbA-UsEr #oracle配置 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java new file mode 100644 index 0000000000..9ae403b1c2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class KcIssueSummary { + + private String dateId; + private Integer reportCount; + private Integer issueCount; + private Integer pendingCount; + private Integer rejectedCount; + private Integer processingCount; + private Integer closedCount; + private Integer issueViewCount; + private Integer voteCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java new file mode 100644 index 0000000000..5b7db61bbb --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcPartiTrendResultDTO { + + private String monthId; + private Integer reportCount; + + private List xAxis = new ArrayList<>(); + private List reportCountDataList = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index f945c8c43f..46d86bb709 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -7,6 +7,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -61,6 +64,34 @@ public class KcScreenController { public Result heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){ return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * 议题分析-各类总数 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/summary") + public Result getIssueSummary(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcIssueSummary issueSummary = kcScreenService.getIssueSummary(customerId); + return new Result().ok(issueSummary); + } + + /** + * 参与趋势 + * @param externalAppRequestParam + * @return + */ + //@ExternalAppRequestAuth + @PostMapping("issue/partitrend") + public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) { + //String customerId = externalAppRequestParam.getCustomerId(); + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcPartiTrendResultDTO trendResultDTO = kcScreenService.getIssuePartiTrend(customerId); + return new Result().ok(trendResultDTO); + } + /** * @param externalAppRequestParam diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java index 2ec71f1d79..efc949d2fe 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.KcIssueSummary; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-议题分析(各类总数) @@ -28,4 +30,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueSummaryGridDailyDao { + KcIssueSummary getIssueSummary(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java index 37edac5861..fb9d9918ba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 @@ -28,4 +32,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueTrendGridMonthlyDao { + List getIssuePartiTrend(@Param("customerId") String customerId); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java new file mode 100644 index 0000000000..605b75cf34 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java @@ -0,0 +1,156 @@ +/** + * 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.epmet.datareport.dao.issue; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-14 + */ +@Data +public class ScreenKcIssueSummaryGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键(先根据customerId+dateId删除,后插入) + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; + + /** + * 删除标识 0未删除;1已删除 + */ + private String 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/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java new file mode 100644 index 0000000000..527aaa443c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java @@ -0,0 +1,106 @@ +/** + * 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.epmet.datareport.dao.issue; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-14 + */ +@Data +public class ScreenKcIssueTrendGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键(每天上报当前月),按照customerId+monthId先删除记录,再插入 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; + + /** + * 删除标识 0未删除;1已删除 + */ + private String 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/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 448b032c21..3dce8b8545 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -5,6 +5,9 @@ import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** * 孔村大屏api @@ -48,4 +51,7 @@ public interface KcScreenService { * @author sun */ List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); + KcIssueSummary getIssueSummary(String customerId); + + KcPartiTrendResultDTO getIssuePartiTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index e86c1d7353..94bc4dcd55 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -5,16 +5,24 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screenkc.*; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueSummaryGridDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridMonthlyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.LinkedList; import java.util.List; +import java.util.List; + /** * 孔村大屏api * @@ -27,6 +35,7 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private DateUtils dateUtils; + @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired @@ -38,6 +47,12 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcIssueSummaryGridDailyDao screenKcIssueSummaryGridDailyDao; + + @Autowired + private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -118,4 +133,21 @@ public class KcScreenServiceImpl implements KcScreenService { return list; } + @Override + public KcIssueSummary getIssueSummary(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueSummary(customerId); + } + + @Override + public KcPartiTrendResultDTO getIssuePartiTrend(String customerId) { + List trend = trendGridMonthlyDao.getIssuePartiTrend(customerId); + KcPartiTrendResultDTO result = new KcPartiTrendResultDTO(); + trend.stream().forEach(t -> { + String month = t.getMonthId().substring(4); + result.getXAxis().add(new Integer(month).toString().concat("月")); + result.getReportCountDataList().add(t.getReportCount()); + }); + return result; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml new file mode 100644 index 0000000000..607ea18a04 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..889b92ae59 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 98b91d3ee3..8dfcc4e8a4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -3,5 +3,20 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml index e9298902f1..731c8b8083 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml @@ -3,6 +3,12 @@ - - + From 1813d6afa44dfcd4a8e05ae1e5bcbba692276f9d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 14:36:58 +0800 Subject: [PATCH 120/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E9=87=87=E9=9B=86api?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screencoll/form/KcProjectSatisanalysisFormDTO.java | 6 +++--- .../com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java | 2 +- .../screen/ScreenKcProjectSatisGridMonthlyDao.xml | 6 +++--- .../evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java index 97843831e2..daccb603d2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java @@ -38,15 +38,15 @@ public class KcProjectSatisanalysisFormDTO implements Serializable { /** * 非常满意项目总数 */ - private Integer greatSatis; + private Integer greatSatisfaction; /** * 满意项目总数 */ - private Integer goodSatis; + private Integer goodSatisfaction; /** * 不满意的项目总数 */ - private Integer disSatis; + private Integer disSatisfaction; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java index cd9b0db555..79e7c0a448 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java @@ -48,7 +48,7 @@ public class KcUserSummaryFormDTO implements Serializable { /** * 党员用户 */ - private Integer partyUserCount; + private Integer partyCount; /** * 小于20岁的党员总人数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml index 1147f687d5..740caa71e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml @@ -59,9 +59,9 @@ #{item.gridName}, #{item.parentAgencyId}, #{item.allParentIds}, - #{item.greatSatis}, - #{item.goodSatis}, - #{item.disSatis}, + #{item.greatSatisfaction}, + #{item.goodSatisfaction}, + #{item.disSatisfaction}, 0, 0, 'APP_USER', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml index d1c0e9dea2..57bf0a99aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -77,7 +77,7 @@ #{item.allParentIds}, #{item.visitorCount}, #{item.regUserCount}, - #{item.partyUserCount}, + #{item.partyCount}, #{item.ageLevel1}, #{item.ageLevel2}, #{item.ageLevel3}, From 0d3f4a5f295afb3dd1b7f8787803e6370ba84be0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 14:59:06 +0800 Subject: [PATCH 121/150] =?UTF-8?q?18=E3=80=81=E9=82=BB=E9=87=8C=E5=85=9A?= =?UTF-8?q?=E7=BE=A4-=E5=B0=8F=E7=BB=84=E8=AF=A6=E6=83=85=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java | 3 ++- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java index 8fc4130dbc..5e29044533 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java @@ -63,5 +63,6 @@ public class KcGroupDetailFormDTO implements Serializable { /** * 转为议题的话题数 */ - private Integer shifitIssueCount; + private Integer shiftIssueCount; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index e7cf3fa2cd..a4df878b37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -70,7 +70,7 @@ #{item.groupLeader}, #{item.memberCount}, #{item.topicCount}, - #{item.shifitIssueCount}, + #{item.shiftIssueCount}, 0, 0, 'APP_USER', From f1b15209cd855cb1abd2496f437597f01a496aeb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:05:35 +0800 Subject: [PATCH 122/150] =?UTF-8?q?18=E3=80=81=E9=82=BB=E9=87=8C=E5=85=9A?= =?UTF-8?q?=E7=BE=A4-=E5=B0=8F=E7=BB=84=E8=AF=A6=E6=83=85=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenKcActSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml | 2 +- .../evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml | 2 +- .../screen/ScreenKcProjectCategoryGridDailyDao.xml | 2 +- .../screen/ScreenKcProjectSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml index 149c94e075..b7867b1098 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml @@ -22,7 +22,7 @@ delete from screen_kc_act_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index a4df878b37..c564c4ea3d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_kc_group_detail_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml index 833ca38965..380d1e540f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml @@ -26,7 +26,7 @@ delete from screen_kc_group_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml index 57055dfcba..741fd14534 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_issue_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml index 38d1b6cda4..64b3a8578a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml @@ -23,7 +23,7 @@ delete from screen_kc_news_category_analysis - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml index 9a29f845d8..f2cd35dd00 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml @@ -21,7 +21,7 @@ delete from screen_kc_news_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml index ea2ca56f7d..855456a973 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_platform_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml index a285d083b3..1a06d2959a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml @@ -24,7 +24,7 @@ delete from screen_kc_project_category_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml index 614ffac3af..cd19511251 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_project_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml index 57bf0a99aa..001b32e398 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_user_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml index 414ae85ecb..2e7de8203d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_volunteer_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; From 9d06f21dbb7c3d04fd2377b5125fa0d8af54047a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:34:47 +0800 Subject: [PATCH 123/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=EF=BC=9A=E5=88=A0?= =?UTF-8?q?=E9=99=A4screen=5Fkc=5Fuser=5Fheat=5Frank=5Fgrid=5Fdaily?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenKcUserHeatRankGridDailyDao.java | 31 ------ .../ScreenKcUserHeatRankGridDailyDao.xml | 7 -- .../ScreenKcUserHeatRankGridDailyDao.java | 33 ------- .../ScreenKcUserHeatRankGridDailyEntity.java | 96 ------------------- .../ScreenKcUserHeatRankGridDailyDao.xml | 28 ------ 5 files changed, 195 deletions(-) delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index dbd5ca3fc1..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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.epmet.datareport.dao.evaluationindex.screenkc; - -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao { - -} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml deleted file mode 100644 index 76f68580a1..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index 58ed6bf539..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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.epmet.dao.evaluationindex.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.evaluationindex.screen.ScreenKcUserHeatRankGridDailyEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao extends BaseDao { - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java deleted file mode 100644 index 03f18a5709..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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.epmet.entity.evaluationindex.screen; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_kc_user_heat_rank_grid_daily") -public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 数据更新至:yyyyMMdd - */ - private String dateId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格名称 - */ - private String gridName; - - /** - * 网格所属组织id - */ - private String parentAgencyId; - - /** - * 所有上级ID,用英文逗号分开 ? - */ - private String allParentIds; - - /** - * 用户id - */ - private String userId; - - /** - * 用户姓名 - */ - private String userName; - - /** - * 1志愿者 0不是志愿者 - */ - private Integer volunteerFlag; - - /** - * 爱心时长 单位分钟 - */ - private Integer heartTime; - - /** - * 积分 - */ - private Integer points; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml deleted file mode 100644 index a8a3c2eff3..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 8179fcfceec8ce29875e1afdbc18ac0297d6ebc6 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 15:35:50 +0800 Subject: [PATCH 124/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E9=82=BB=E9=87=8C=E5=85=9A=E7=BE=A4=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/GridNameGroupCountResultDTO.java | 26 ++++++ .../GroupGridgroupcountrankResultDTO.java | 28 ++++++ .../result/GroupPartitopictrendResultDTO.java | 28 ++++++ .../dto/result/GroupSummaryResultDTO.java | 48 ++++++++++ .../KcTopicTrendGridMonthlyResultDTO.java | 26 ++++++ .../controller/screen/KcScreenController.java | 35 ++++++++ .../ScreenKcGroupSummaryGridDailyDao.java | 18 ++++ .../ScreenKcTopicTrendGridMonthlyDao.java | 10 +++ ...ScreenKcVolunteerHeatRankGridDailyDao.java | 2 - .../screen/KcScreenService.java | 23 +++++ .../screen/impl/KcScreenServiceImpl.java | 89 +++++++++++++++++-- .../ScreenKcGroupSummaryGridDailyDao.xml | 53 +++++++++++ .../ScreenKcTopicTrendGridMonthlyDao.xml | 24 ++++- 13 files changed, 399 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java new file mode 100644 index 0000000000..0f870ea551 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GridNameGroupCountResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称 + */ + private String gridName = ""; + + /** + * 社群数量 + */ + private Integer groupCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java new file mode 100644 index 0000000000..fc9799ef03 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GroupGridgroupcountrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称集合 + */ + private LinkedList gridNameDataList; + + /** + * 社群数量集合 + */ + private LinkedList groupCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java new file mode 100644 index 0000000000..8eb7a406ae --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class GroupPartitopictrendResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 横坐标月份集合 + */ + private LinkedList xAxis; + + /** + * 话题数量 集合 + */ + private LinkedList actCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java new file mode 100644 index 0000000000..31325b7b60 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-各类总数汇总 + * @Author sun + */ +@Data +public class GroupSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + private String dateId = ""; + + /** + * 社群总数 + */ + private Integer groupCount = 0; + /** + * 群员总数 + */ + private Integer memberCount = 0; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 话题参与量 + */ + private Integer partiCount = 0; + /** + * 转化议题率,这个后端自己算 + */ + private String shiftIssueRatio = ""; + /** + * 话题转议题总数 + */ + @JsonIgnore + private Integer shiftIssueCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java new file mode 100644 index 0000000000..c7febe5772 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class KcTopicTrendGridMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 月id :yyyyMM + */ + private String monthId = ""; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount = 0; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 46d86bb709..ce5efe3dba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -117,4 +117,39 @@ public class KcScreenController { return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/summary") + public Result groupSummary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupSummary(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/partitopictrend") + public Result groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupPartitopictrend(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/gridgroupcountrank") + public Result groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); + } + + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java index 3b92aa4fa1..e6871db1b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java @@ -17,7 +17,12 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.GridNameGroupCountResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * KC-小组分析各类总数(先根据customerId+dateId删除) @@ -28,4 +33,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupSummaryGridDailyDao { + /** + * @param customerId + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO selectGroupSummaryDaily(@Param("customerId") String customerId); + + /** + * @param customerId + * @Description 按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + * @author sun + */ + LinkedList selectGridDailyList(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java index 8c8e181b0f..12ec47650b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.KcTopicTrendGridMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-话题参与趋势(先根据customerId+monthId删除) @@ -28,4 +32,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcTopicTrendGridMonthlyDao { + /** + * @param customerId + * @Description 按客户查询最近十二个月所有网格汇总数据 + * @author sun + */ + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index cb57c5ef36..d7646b243d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -18,10 +18,8 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 3dce8b8545..0cbb285c2a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -54,4 +54,27 @@ public interface KcScreenService { KcIssueSummary getIssueSummary(String customerId); KcPartiTrendResultDTO getIssuePartiTrend(String customerId); + + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 94bc4dcd55..54a8df17e1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -5,24 +5,19 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screenkc.*; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueSummaryGridDailyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridMonthlyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; import com.epmet.dto.result.issue.KcPartiTrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.text.NumberFormat; import java.util.LinkedList; import java.util.List; -import java.util.List; - /** * 孔村大屏api * @@ -53,6 +48,11 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -150,4 +150,77 @@ public class KcScreenServiceImpl implements KcScreenService { return result; } + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @Override + public GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam) { + //1.按客户查询最近一天各网格各项数据的汇总值 + GroupSummaryResultDTO resultDTO = screenKcGroupSummaryGridDailyDao.selectGroupSummaryDaily(externalAppRequestParam.getCustomerId()); + if (null == resultDTO) { + return new GroupSummaryResultDTO(); + } + + //2.计算转化议题率,保留两位小数 + if (resultDTO.getTopicCount() < NumConstant.ONE || resultDTO.getShiftIssueCount() < NumConstant.ONE) { + resultDTO.setShiftIssueRatio("0%"); + } else { + NumberFormat numberFormat = NumberFormat.getInstance(); + //设置精确到小数点后2位 + numberFormat.setMaximumFractionDigits(2); + String ratio = numberFormat.format((float) resultDTO.getShiftIssueCount() / (float) resultDTO.getTopicCount() * 100); + resultDTO.setShiftIssueRatio(ratio + "%"); + } + + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @Override + public GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam) { + GroupPartitopictrendResultDTO resultDTO = new GroupPartitopictrendResultDTO(); + LinkedList xAxis = new LinkedList<>(); + LinkedList actCountDataList = new LinkedList<>(); + //1.按客户查询最近十二个月所有网格汇总数据 + List list = screenKcTopicTrendGridMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId()); + //2.倒序遍历封装数据 + for (int i = list.size() - 1; i >= 0; i--) { + xAxis.add(list.get(i).getMonthId()); + actCountDataList.add(list.get(i).getTopicCount()); + } + //3.封装数据并返回 + resultDTO.setXAxis(xAxis); + resultDTO.setActCountDataList(actCountDataList); + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam) { + GroupGridgroupcountrankResultDTO resultDTO = new GroupGridgroupcountrankResultDTO(); + LinkedList gridNameDataList = new LinkedList<>(); + LinkedList groupCountDataList = new LinkedList<>(); + //1.按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + LinkedList list = screenKcGroupSummaryGridDailyDao.selectGridDailyList(externalAppRequestParam.getCustomerId()); + //2.封装数据 + list.forEach(l -> { + gridNameDataList.add(l.getGridName()); + groupCountDataList.add(l.getGroupCount()); + }); + resultDTO.setGridNameDataList(gridNameDataList); + resultDTO.setGroupCountDataList(groupCountDataList); + + return resultDTO; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml index 03bbdb55c2..d461ab19d2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml @@ -3,5 +3,58 @@ + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml index f6eb105077..5fed5bda9c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml @@ -4,5 +4,27 @@ - + From 1199124ccefd61a009a6f6d23fb35f228ea93097 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 15:42:30 +0800 Subject: [PATCH 125/150] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AD=94=E6=9D=91?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=A4=A7=E5=B1=8F=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/issue/IssueAvgAuditTimeDTO.java | 15 ++++++ .../result/issue/IssueEffectResultDTO.java | 11 +++++ .../result/issue/IssueGridTotalRankDTO.java | 18 ++++++++ .../controller/screen/KcScreenController.java | 46 +++++++++++++++++-- .../ScreenKcIssueSummaryGridDailyDao.java | 11 +++++ .../screen/KcScreenService.java | 10 +++- .../screen/impl/KcScreenServiceImpl.java | 28 +++++++++-- .../ScreenKcIssueSummaryGridDailyDao.xml | 40 +++++++++++++++- 8 files changed, 168 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java new file mode 100644 index 0000000000..9e1b9c346b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueAvgAuditTimeDTO { + + private String gridName; + private Integer avgAuditTime; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java new file mode 100644 index 0000000000..655df79505 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class IssueEffectResultDTO { + + private Double reportEffectiveRatio; + private Double conversionRatio; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java new file mode 100644 index 0000000000..0ddfcfbf80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueGridTotalRankDTO { + + private String gridId; + private String gridName; + private Integer issueCount; + + private List gridNameDataList = new ArrayList<>(); + private List issueCountDataList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 46d86bb709..1b605c16ba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -5,6 +5,7 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; @@ -83,15 +84,54 @@ public class KcScreenController { * @param externalAppRequestParam * @return */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("issue/partitrend") public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) { - //String customerId = externalAppRequestParam.getCustomerId(); - String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; KcPartiTrendResultDTO trendResultDTO = kcScreenService.getIssuePartiTrend(customerId); return new Result().ok(trendResultDTO); } + /** + * 按照议题总数排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/gridtotalrank") + public Result getIssueGridTotalRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueGridTotalRank(customerId)); + } + + /** + * 议题分析-审核效率排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/avgaudittimerank") + public Result getAvgAuditTimeRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getAvgAuditTimeRank(customerId)); + } + + /** + * 议题分析-审核效率 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/effective") + public Result getIssueEffective(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueEffective(customerId)); + } + /** * @param externalAppRequestParam diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java index efc949d2fe..8693d6b52e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java @@ -17,10 +17,15 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.IssueAvgAuditTimeDTO; +import com.epmet.dto.result.issue.IssueEffectResultDTO; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; import com.epmet.dto.result.issue.KcIssueSummary; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * KC-议题分析(各类总数) * @@ -31,4 +36,10 @@ import org.apache.ibatis.annotations.Param; public interface ScreenKcIssueSummaryGridDailyDao { KcIssueSummary getIssueSummary(@Param("customerId") String customerId); + + List getIssueGridTotalRank(@Param("customerId") String customerId); + + List getAvgAuditTimeRank(@Param("customerId") String customerId); + + IssueEffectResultDTO getIssueEffective(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 3dce8b8545..d9e391b3f1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,12 +1,12 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.dto.result.issue.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; -import com.epmet.dto.result.issue.KcIssueSummary; -import com.epmet.dto.result.issue.KcPartiTrendResultDTO; + import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** @@ -54,4 +54,10 @@ public interface KcScreenService { KcIssueSummary getIssueSummary(String customerId); KcPartiTrendResultDTO getIssuePartiTrend(String customerId); + + IssueGridTotalRankDTO getIssueGridTotalRank(String customerId); + + List getAvgAuditTimeRank(String customerId); + + IssueEffectResultDTO getIssueEffective(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 94bc4dcd55..41cd4dc4a5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -10,10 +10,9 @@ import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridM import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; +import com.epmet.dto.result.issue.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; -import com.epmet.dto.result.issue.KcIssueSummary; -import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,8 +20,6 @@ import org.springframework.stereotype.Service; import java.util.LinkedList; import java.util.List; -import java.util.List; - /** * 孔村大屏api * @@ -150,4 +147,27 @@ public class KcScreenServiceImpl implements KcScreenService { return result; } + @Override + public IssueGridTotalRankDTO getIssueGridTotalRank(String customerId) { + List issueGridTotals = screenKcIssueSummaryGridDailyDao.getIssueGridTotalRank(customerId); + + IssueGridTotalRankDTO resultDTO = new IssueGridTotalRankDTO(); + issueGridTotals.stream().forEach(igt -> { + resultDTO.getGridNameDataList().add(igt.getGridName()); + resultDTO.getIssueCountDataList().add(igt.getIssueCount()); + }); + + return resultDTO; + } + + @Override + public List getAvgAuditTimeRank(String customerId) { + return screenKcIssueSummaryGridDailyDao.getAvgAuditTimeRank(customerId); + } + + @Override + public IssueEffectResultDTO getIssueEffective(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueEffective(customerId); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 8dfcc4e8a4..1c12b7c53c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -15,8 +15,44 @@ sum(VOTE_COUNT) voteCount from screen_kc_issue_summary_grid_daily t1 inner join ( - select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id from screen_kc_issue_summary_grid_daily t21) t2 + select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id from screen_kc_issue_summary_grid_daily t21 where t21.CUSTOMER_ID=#{customerId}) t2 on (t1.CUSTOMER_ID = t2.customerId and t1.DATE_ID = t2.max_date_id) - where t1.CUSTOMER_ID = #{customerId} + + + + + + + From 5caa4850b8a4ca91dd3955a9cdd63593067a0792 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 15:48:21 +0800 Subject: [PATCH 126/150] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?@Autowired=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/KcScreenServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 0aa8b129e8..4a0da15f41 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -52,6 +52,12 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 From f374b582d7537dce786c53d9996918a650c5244e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:54:35 +0800 Subject: [PATCH 127/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=EF=BC=9Agroup/detail?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index c564c4ea3d..4dca3289ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_kc_group_detail_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} + where CUSTOMER_ID = #{customerId} limit 1000; From 4e60223a0dfdc1547656b194f0e33da7d2c3e203 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 16:27:41 +0800 Subject: [PATCH 128/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E9=82=BB=E9=87=8C=E5=85=9A=E7=BE=A4=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GroupTopicShiftIssueRatioRankFormDTO.java | 32 +++++++++++ .../dto/form/GroupUserCountRankFormDTO.java | 32 +++++++++++ .../dto/form/HeartVolunteerrankFormDTO.java | 5 +- ...roupTopicShiftIssueRatioRankResultDTO.java | 33 +++++++++++ .../result/GroupUserCountRankResultDTO.java | 33 +++++++++++ .../controller/screen/KcScreenController.java | 28 +++++++++ .../ScreenKcGroupDetailGridDailyDao.java | 19 +++++++ .../screen/KcScreenService.java | 15 +++++ .../screen/impl/KcScreenServiceImpl.java | 33 +++++++++++ .../screenkc/ScreenKcActTrendMonthlyDao.xml | 3 +- .../ScreenKcGroupDetailGridDailyDao.xml | 57 +++++++++++++++++++ 11 files changed, 285 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java new file mode 100644 index 0000000000..fc1a44996d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java new file mode 100644 index 0000000000..4b6c4a80ef --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupUserCountRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java index cca3eb4f1b..e4beb2b1cd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -1,11 +1,9 @@ package com.epmet.evaluationindex.screen.dto.form; -import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,6 +13,7 @@ import java.io.Serializable; @Data public class HeartVolunteerrankFormDTO implements Serializable { private static final long serialVersionUID = -2880432640584616651L; + public interface AddUserInternalGroup {} /** * 页码,从1开始 */ @@ -29,5 +28,5 @@ public class HeartVolunteerrankFormDTO implements Serializable { * 客户Id */ private String customerId; - public interface AddUserInternalGroup {} + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java new file mode 100644 index 0000000000..d1068120bf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java new file mode 100644 index 0000000000..d183b967c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupUserCountRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 群成员数 + */ + private Integer memberCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index fd239ba96a..dd23d63b0e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -6,6 +6,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; @@ -191,5 +193,31 @@ public class KcScreenController { return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/usercountrank") + public Result> groupUserCountRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupUserCountRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupUserCountRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupUserCountRank(formDTO)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/topicshiftissueratiorank") + public Result> groupTopicShiftIssueRatioRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupTopicShiftIssueRatioRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupTopicShiftIssueRatioRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupTopicShiftIssueRatioRank(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java index 8ab08ef8ce..23e6e5afbd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java @@ -17,8 +17,14 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupTopicShiftIssueRatioRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupUserCountRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-小组详情(先根据customerId+dateId删除) * @@ -28,4 +34,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupDetailGridDailyDao { + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按社群总数降序排列 + * @author sun + */ + List selectGroupUserCountRankList(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按话题总数降序排列 + * @author sun + */ + List selectGroupTopicShiftIssueRatioRankList(GroupTopicShiftIssueRatioRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index bd2c2d8105..3debd0a626 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -2,6 +2,8 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.dto.result.issue.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; @@ -83,4 +85,17 @@ public interface KcScreenService { */ GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + List groupUserCountRank(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 4a0da15f41..074221dd24 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -8,6 +8,8 @@ import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.dto.result.issue.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; @@ -58,6 +60,9 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -251,4 +256,32 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public List groupUserCountRank(GroupUserCountRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按社群总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupUserCountRankList(formDTO); + return list; + } + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @Override + public List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按话题总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupTopicShiftIssueRatioRankList(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index a7062885ce..47ae608fc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -4,8 +4,7 @@ - SELECT month_id AS "monthId", act_count AS "actCount" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml index 618e712bff..c0d3133d95 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml @@ -3,5 +3,62 @@ + + + From d1226a2d4b39a18405e7b175a1d5069697bfb485 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 17:15:18 +0800 Subject: [PATCH 129/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/constant/IndexCalConstant.java | 4 ++-- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 49057915f6..0cdc0e82ef 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -15,11 +15,11 @@ public interface IndexCalConstant { /** * 批量删除 一次删除50 */ - Integer DELETE_SIZE=1000; + Integer DELETE_SIZE = 1000; /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 1000; + Integer PAGE_SIZE = 800; String GRID_ID="GRID_ID"; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 0de8be20fc..de744b8553 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -84,7 +84,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { List list = null; Map preLastCpcScoreTotalMap = new HashMap<>(); + //当前最后一条记录 CpcScoreEntity currentLastCpcScore = null; + //当前第一条记录 + CpcScoreEntity currentFirstCpcScore = null; do { //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); @@ -94,8 +97,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } else { //获取最后一条 currentLastCpcScore = list.get(list.size() - 1); - if (preLastCpcScoreTotalMap.containsKey(currentLastCpcScore.getUserId())) { + //获取第一条 + currentFirstCpcScore = list.get(0); + if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); + preLastCpcScoreTotalMap.clear(); preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); } Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); From 0e5981c4f698d2cd50c197a094708d9cc1a00ca4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 17:40:58 +0800 Subject: [PATCH 130/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index de744b8553..387c85433b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -85,9 +85,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { Map preLastCpcScoreTotalMap = new HashMap<>(); //当前最后一条记录 - CpcScoreEntity currentLastCpcScore = null; + //CpcScoreEntity currentLastCpcScore = null; //当前第一条记录 - CpcScoreEntity currentFirstCpcScore = null; + //CpcScoreEntity currentFirstCpcScore = null; do { //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); @@ -96,14 +96,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); } else { //获取最后一条 - currentLastCpcScore = list.get(list.size() - 1); + //currentLastCpcScore = list.get(list.size() - 1); //获取第一条 - currentFirstCpcScore = list.get(0); - if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { + //currentFirstCpcScore = list.get(0); + /*if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); preLastCpcScoreTotalMap.clear(); preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); - } + }*/ Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); userGroupMap.forEach((userId, partScoreList) -> { CpcScoreEntity totalEntity = null; @@ -120,12 +120,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); totalEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG)); + cpcScoreTotalMap.put(userId, totalEntity); - if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { + /* if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { preLastCpcScoreTotalMap.put(part.getUserId(), part); } else { - cpcScoreTotalMap.put(userId, totalEntity); - } + }*/ } //自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); From 4d77a187086ea5ec3a98a3371c8072b0b9e01640 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 17:48:24 +0800 Subject: [PATCH 131/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/constant/IndexCalConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 0cdc0e82ef..819abb75c6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -19,7 +19,7 @@ public interface IndexCalConstant { /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 800; + Integer PAGE_SIZE = 900; String GRID_ID="GRID_ID"; From cce73f07e5831c02dfcb8cf50d5041dab1b1c37f Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 18:10:34 +0800 Subject: [PATCH 132/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 387c85433b..149cc45bd7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -77,7 +77,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【党员相关】指标权重信息不存在"); } - Map cpcScoreTotalMap = new HashMap<>(); Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); int pageNo = NumConstant.ONE; int pageSize = IndexCalConstant.PAGE_SIZE; @@ -89,6 +88,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //当前第一条记录 //CpcScoreEntity currentFirstCpcScore = null; do { + Map cpcScoreTotalMap = new HashMap<>(); //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); pageNo++; From aee7e9e1345d35047664a72a60e469e05c4348b8 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 18:22:17 +0800 Subject: [PATCH 133/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE-=E8=BF=98=E5=89=A9=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridProjectCountRankResultDTO.java | 12 ++++ .../project/GridProjectCountResultDTO.java | 14 ++++ .../ProjectAvgClosedTimeResultDTO.java | 9 +++ .../ProjectCategoryAnalysisResultDTO.java | 10 +++ .../result/project/ProjectSatisfaction.java | 23 +++++++ .../project/ProjectSummaryResultDTO.java | 17 +++++ .../epmet/controller/test/TestController.java | 19 ------ .../controller/screen/KcScreenController.java | 67 +++++++++++++++++++ .../ScreenKcProjectCategoryGridDailyDao.java | 4 ++ .../ScreenKcProjectSummaryGridDailyDao.java | 10 +++ .../screen/KcScreenService.java | 15 +++++ .../screen/impl/KcScreenServiceImpl.java | 43 +++++++++++- .../ScreenKcProjectCategoryGridDailyDao.xml | 15 +++++ .../ScreenKcProjectSummaryGridDailyDao.xml | 50 ++++++++++++++ .../controller/IndexCalculateController.java | 2 +- 15 files changed, 288 insertions(+), 22 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java new file mode 100644 index 0000000000..3e48b9798f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountRankResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class GridProjectCountRankResultDTO { + private List gridNameDataList = new ArrayList<>(); + private List projectCountDataList = new ArrayList<>(); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java new file mode 100644 index 0000000000..3f035afd94 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/GridProjectCountResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class GridProjectCountResultDTO { + + private String gridId; + private String gridName; + private Integer projectCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java new file mode 100644 index 0000000000..83ca38001d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectAvgClosedTimeResultDTO.java @@ -0,0 +1,9 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectAvgClosedTimeResultDTO { + private String gridName; + private Integer avgClosedCaseTime; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java new file mode 100644 index 0000000000..dd03a4c899 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectCategoryAnalysisResultDTO.java @@ -0,0 +1,10 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectCategoryAnalysisResultDTO { + private String categoryId; + private String categoryName; + private Integer projectCount; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java new file mode 100644 index 0000000000..03d1c9bded --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectSatisfaction { + + private List xAxis; + private List greatSatisDataList; + private List goodStatisDataList; + private List disStatisDataList; + + private String monthId; + private String monthName; + // 满意 + private Integer goodSatis; + // 非常满意 + private Integer greatSatis; + // 不满意 + private Integer disSatis; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java new file mode 100644 index 0000000000..f0b7ef4750 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSummaryResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class ProjectSummaryResultDTO { + + private String dateId; + private Integer projectCount; + private Integer processingCount; + private Integer closedCount; + private Integer moveCount; + private Integer closedCaseCount; + private Integer projectViewCount; + private Integer voteCount; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java deleted file mode 100644 index a16df89c2a..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/test/TestController.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.epmet.controller.test; - -import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.commons.tools.utils.Result; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("test") -public class TestController { - - @ExternalAppRequestAuth - @RequestMapping("/test") - public Result test(ExternalAppRequestParam externalAppRequestParam, String ext) { - return new Result().ok("调用成功,客户信息:"+externalAppRequestParam); - } - -} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index fd239ba96a..240fc02822 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.dto.result.project.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; @@ -191,5 +192,71 @@ public class KcScreenController { return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); } + /** + * 项目各类总数汇总 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/summary") + public Result getProjectSummary(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getProjectSummary(customerId)); + } + + /** + * 项目分析-网格下项目数量排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/gridcountrank") + public Result getProjectGridCountRank(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getGridProjectCountRank(customerId)); + } + + /** + * 项目分析-项目类别 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/categoryanalysis") + public Result> getProjectCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getProjectCategoryAnalysis(customerId)); + } + + /** + * 网格项目平均结案时间 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("project/avgclosedtimeanalysis") + public Result> getGridProjectAvgClosedTimeAnalysis(ExternalAppRequestParam externalAppRequestParam){ + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getGridProjectAvgClosedTimeAnalysis(customerId)); + } + + /** + * 项目分析-居民满意度 + * @param externalAppRequestParam + * @return + */ + //@ExternalAppRequestAuth + @PostMapping("project/statis") + public Result getProjectSatisfactionAnalyze(ExternalAppRequestParam externalAppRequestParam){ + String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + //String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getProjectSatisfactionAnalyze(customerId)); + } + + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java index a730e97577..c7b7a6b68d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectCategoryGridDailyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.ProjectCategoryAnalysisResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目按分类统计上报总数(先根据customerId+dateId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectCategoryGridDailyDao { + List listProjectCountGroupByCategory(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java index 2c50f1205c..9ce1afc8cf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSummaryGridDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.GridProjectCountResultDTO; +import com.epmet.dto.result.project.ProjectAvgClosedTimeResultDTO; +import com.epmet.dto.result.project.ProjectSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目分析(各类总数先根据customerId+dateId删除,后插入) * @@ -28,4 +33,9 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectSummaryGridDailyDao { + List getGridProjectCountRank(String customerId); + + ProjectSummaryResultDTO getProjectSummary(String customerId); + + List getGridProjectAvgClosedTimeAnalysis(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index bd2c2d8105..7814f94e98 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.dto.result.issue.*; +import com.epmet.dto.result.project.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; @@ -83,4 +84,18 @@ public interface KcScreenService { */ GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + /** + * 项目各类总数 + * @param customerId + * @return + */ + ProjectSummaryResultDTO getProjectSummary(String customerId); + + GridProjectCountRankResultDTO getGridProjectCountRank(String customerId); + + List getProjectCategoryAnalysis(String customerId); + + List getGridProjectAvgClosedTimeAnalysis(String customerId); + + ProjectSatisfaction getProjectSatisfactionAnalyze(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 4a0da15f41..7d1721ebe5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -8,13 +8,12 @@ import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.dto.result.issue.*; +import com.epmet.dto.result.project.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import com.epmet.dto.result.issue.KcIssueSummary; import com.epmet.dto.result.issue.KcPartiTrendResultDTO; -import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -58,6 +57,15 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + @Autowired + private ScreenKcProjectSummaryGridDailyDao projectSummaryGridDailyDao; + + @Autowired + private ScreenKcProjectSummaryGridDailyDao screenKcProjectSummaryGridDailyDao; + + @Autowired + private ScreenKcProjectCategoryGridDailyDao screenKcProjectCategoryGridDailyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -251,4 +259,35 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + @Override + public ProjectSummaryResultDTO getProjectSummary(String customerId) { + return projectSummaryGridDailyDao.getProjectSummary(customerId); + } + + @Override + public GridProjectCountRankResultDTO getGridProjectCountRank(String customerId) { + List gridCounts = screenKcProjectSummaryGridDailyDao.getGridProjectCountRank(customerId); + GridProjectCountRankResultDTO rankResult = new GridProjectCountRankResultDTO(); + gridCounts.stream().forEach(gc -> { + rankResult.getGridNameDataList().add(gc.getGridName()); + rankResult.getProjectCountDataList().add(gc.getProjectCount()); + }); + return rankResult; + } + + @Override + public List getProjectCategoryAnalysis(String customerId) { + return screenKcProjectCategoryGridDailyDao.listProjectCountGroupByCategory(customerId); + } + + @Override + public List getGridProjectAvgClosedTimeAnalysis(String customerId) { + return screenKcProjectSummaryGridDailyDao.getGridProjectAvgClosedTimeAnalysis(customerId); + } + + @Override + public ProjectSatisfaction getProjectSatisfactionAnalyze(String customerId) { + + return null; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml index 76241a4406..1f51a6da8b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectCategoryGridDailyDao.xml @@ -4,4 +4,19 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml index 183c0858e0..fff84de166 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml @@ -3,4 +3,54 @@ + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index b9491f1cf2..4d44af0d47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -175,7 +175,7 @@ public class IndexCalculateController { * @param form * @return */ - @ExternalAppRequestAuth + //@ExternalAppRequestAuth @PostMapping("stopcalculate") public Result stopcalculate(@RequestBody CalculateCommonFormDTO form) { ValidatorUtils.validateEntity(form); From c77b0495d972937e2e75e29b40c2fcd68564ee43 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 18:27:23 +0800 Subject: [PATCH 134/150] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E7=9A=84@Autowired?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/KcScreenServiceImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index cf008ac824..aa49430859 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -59,6 +59,18 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + + @Autowired + private ScreenKcProjectSummaryGridDailyDao screenKcProjectSummaryGridDailyDao; + + @Autowired + private ScreenKcProjectCategoryGridDailyDao screenKcProjectCategoryGridDailyDao; + + @Autowired + private ScreenKcProjectSummaryGridDailyDao projectSummaryGridDailyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 From 81ac10db52e1b84fee2bd132addefcba70cf2b1e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 19:32:21 +0800 Subject: [PATCH 135/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 149cc45bd7..3189c554dc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -41,6 +41,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @Slf4j @@ -82,28 +83,18 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { int pageSize = IndexCalConstant.PAGE_SIZE; List list = null; - Map preLastCpcScoreTotalMap = new HashMap<>(); - //当前最后一条记录 - //CpcScoreEntity currentLastCpcScore = null; - //当前第一条记录 - //CpcScoreEntity currentFirstCpcScore = null; + Map cpcScoreTotalMap = new HashMap<>(); + Map userTotalCount = new HashMap<>(); + //删除总分 然后插入 + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); do { - Map cpcScoreTotalMap = new HashMap<>(); + List result = new ArrayList<>(); //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); pageNo++; if (CollectionUtils.isEmpty(list)) { log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); } else { - //获取最后一条 - //currentLastCpcScore = list.get(list.size() - 1); - //获取第一条 - //currentFirstCpcScore = list.get(0); - /*if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { - cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); - preLastCpcScoreTotalMap.clear(); - preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); - }*/ Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); userGroupMap.forEach((userId, partScoreList) -> { CpcScoreEntity totalEntity = null; @@ -121,27 +112,26 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); totalEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG)); cpcScoreTotalMap.put(userId, totalEntity); - - /* if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { - preLastCpcScoreTotalMap.put(part.getUserId(), part); - } else { - }*/ } //自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + AtomicInteger atomicInteger = userTotalCount.get(part.getUserId()); + + if (atomicInteger == null) { + atomicInteger = new AtomicInteger(0); + userTotalCount.put(part.getUserId(), atomicInteger); + } + int totalCount = atomicInteger.addAndGet(1); + //todo 次代码限制了 党员的 4级指标的个数 看看是否还有更好的方式 + if (totalCount == 3) { + result.add(totalEntity); + } log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); totalEntity.setScore(totalEntity.getScore().add(total)); } }); } - - //没查询到数据 就把上次的放进去 - if (list == null || list.size() < pageSize || !CollectionUtils.isEmpty(preLastCpcScoreTotalMap)) { - cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); - } - //删除总分 然后插入 - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); - insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + insertCpcScoreBatch(formDTO, result, IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); } while (!CollectionUtils.isEmpty(list)); } @@ -180,7 +170,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ public void insertCpcScoreBatch(CalculateCommonFormDTO formDTO, List values, String indexCode) { if (CollectionUtils.isEmpty(values)) { - log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); + log.warn("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), indexCode); return; } List> partition = ListUtils.partition(values, IndexCalConstant.INSERT_SIZE); @@ -338,7 +328,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ public void insertCpcSubScoreBatch(CalculateCommonFormDTO formDTO, List subList, String parentIndexCode) { if (CollectionUtils.isEmpty(subList)) { - log.error("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); + log.warn("insertCpcScoreBatch要插入的数据为空,param:{},indexCode:{}", JSON.toJSONString(formDTO), parentIndexCode); return; } List> partition = ListUtils.partition(subList, IndexCalConstant.INSERT_SIZE); From 098c4d0e2e1beabc72f66c947a3c53deefb6e2ab Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 20:58:45 +0800 Subject: [PATCH 136/150] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=80=BB=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 3189c554dc..9410e15d83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -132,7 +132,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { }); } insertCpcScoreBatch(formDTO, result, IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - } while (!CollectionUtils.isEmpty(list)); + } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } From 3cb4d7e6e065b8c66f25475b3d4abe38c1cd6d08 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 16 Sep 2020 09:21:33 +0800 Subject: [PATCH 137/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=87=AA=E6=B5=8B=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 1 + .../ScreenKcTopicTrendGridMonthlyDao.xml | 2 +- .../ScreenKcVolunteerSummaryDailyDao.xml | 32 ++++++++++++------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index de94f499a2..323b2a7fca 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -442,6 +442,7 @@ epmet: urlWhiteList: - /data/report/test/test - /data/report/screen/** + - /data/report/screenkc/** - /epmetuser/customerstaff/customerlist swaggerUrls: diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml index 5fed5bda9c..60f288f628 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml @@ -16,7 +16,7 @@ del_flag = '0' and customer_id = #{customerId} and month_id = monthId - ) + ) "topicCount" FROM screen_kc_topic_trend_grid_monthly WHERE diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml index 62f94e5d1f..d6a88821a2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml @@ -5,21 +5,31 @@ From 823c3570f03f4d3d58ebdab74a8f8e957f49ec6b Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 16 Sep 2020 10:42:56 +0800 Subject: [PATCH 138/150] =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E7=BB=84=E7=BB=87/?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=8C=87=E6=95=B0=E6=8E=92=E8=A1=8C=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=20=20=20=E9=83=A8=E9=97=A8=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/datareport/controller/screen/IndexController.java | 2 +- .../dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java | 2 +- .../service/evaluationindex/screen/IndexService.java | 2 +- .../service/evaluationindex/screen/impl/IndexServiceImpl.java | 2 +- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index fd3564c53b..6da1ba9359 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -67,8 +67,8 @@ public class IndexController { } /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:02 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 3128862ece..cc6c9e9e2b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -54,8 +54,8 @@ public interface ScreenIndexDataMonthlyDao{ List selectMonthBarchart(@Param("agencyId")String agencyId); /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java index 761d369b7a..4ff9cf0fd4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java @@ -38,8 +38,8 @@ public interface IndexService { MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO); /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index b0c9715031..651fa7484f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -179,8 +179,8 @@ public class IndexServiceImpl implements IndexService { } /** - * @Description 4、下级部门指数排行 * @param subAgencyIndexRankFormDTO + * @Description 4、下级组织/部门指数排行 (不包含部门的数据) * @author zxc * @date 2020/8/20 10:04 上午 */ diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 0a040c2ccb..57c70a403c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -43,7 +43,7 @@ LIMIT 12 - + From c42e3b2377365e1cb881080de794503b49d0ee18 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 16 Sep 2020 11:02:40 +0800 Subject: [PATCH 139/150] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/IndexServiceImpl.java | 8 ++++---- .../resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 7 ++----- .../resources/mapper/screen/ScreenIndexDataYearlyDao.xml | 8 +++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 651fa7484f..d090a4c00f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -57,7 +57,7 @@ public class IndexServiceImpl implements IndexService { yearAverageIndexResultDTO.setPartyDevAbility(getRound(yearAverageIndexResultDTO.getPartyDevAbility())); yearAverageIndexResultDTO.setGovernAbility(getRound(yearAverageIndexResultDTO.getGovernAbility())); yearAverageIndexResultDTO.setServiceAbility(getRound(yearAverageIndexResultDTO.getServiceAbility())); - yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getYearAverageIndex())); + yearAverageIndexResultDTO.setYearAverageIndex(yearAverageIndexResultDTO.getPartyDevAbility() + yearAverageIndexResultDTO.getGovernAbility() + yearAverageIndexResultDTO.getServiceAbility()); return yearAverageIndexResultDTO; } @@ -126,7 +126,7 @@ public class IndexServiceImpl implements IndexService { barchart.setPartyDevAbility(getRound(barchart.getPartyDevAbility())); barchart.setGovernAbility(getRound(barchart.getGovernAbility())); barchart.setServiceAbility(getRound(barchart.getServiceAbility())); - barchart.setIndexTotal(getRound(barchart.getIndexTotal())); + barchart.setIndexTotal(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility()); }); List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); //升序 当前月份在队尾 @@ -199,7 +199,7 @@ public class IndexServiceImpl implements IndexService { indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); - indexRank.setTotalIndex(getRound(indexRank.getTotalIndex())); + indexRank.setTotalIndex(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility()); }); return subAgencyIndexRankResultDTOS; } @@ -218,7 +218,7 @@ public class IndexServiceImpl implements IndexService { rank.setPartyDevAbility(getRound(rank.getPartyDevAbility())); rank.setGovernAbility(getRound(rank.getGovernAbility())); rank.setServiceAbility(getRound(rank.getServiceAbility())); - rank.setTotalIndex(getRound(rank.getTotalIndex())); + rank.setTotalIndex(rank.getPartyDevAbility() + rank.getGovernAbility() + rank.getServiceAbility()); }); } return subAgencyIndexRankResultDTOS; diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 57c70a403c..7766b5eadb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -32,8 +32,7 @@ month_id AS monthId, service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, - (service_ablity * SERVICE_ABLITY_WEIGHT + party_dev_ablity * PARTY_DEV_WEIGHT + govern_ablity * GOVERN_ABLITY_WEIGHT) AS indexTotal + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility FROM screen_index_data_monthly WHERE @@ -47,7 +46,6 @@ SELECT - index_total AS yearAverageIndex, service_ablity AS serviceAbility, party_dev_ablity AS partyDevAbility, govern_ablity AS governAbility @@ -24,10 +23,9 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT org_name AS `NAME`, - ROUND(index_total, 1) AS totalIndex, - ROUND(govern_ablity, 1) AS governAbility, - ROUND(party_dev_ablity, 1) AS partyDevAbility, - ROUND(service_ablity, 1) AS serviceAbility, + govern_ablity AS governAbility, + party_dev_ablity AS partyDevAbility, + service_ablity AS serviceAbility, ORG_ID orgId FROM screen_index_data_yearly From cd217f203016f0941a993cf40670342c70fea20a Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 16 Sep 2020 13:01:16 +0800 Subject: [PATCH 140/150] =?UTF-8?q?=E5=B9=B3=E5=9D=87=E5=80=BC=E7=9A=84=20?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=20=E5=86=8D=E6=AC=A1=E5=BD=92?= =?UTF-8?q?=E4=B8=80=E8=AE=A1=E7=AE=97=E4=BA=86=20=E5=8F=AA=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E4=B9=98=E4=BB=A5=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/eum/IndexCodeEnum.java | 77 ++++++++++++------- .../impl/CpcIndexCalculateServiceImpl.java | 3 +- .../indexcal/impl/DeptScoreServiceImpl.java | 1 + .../impl/GridCorreLationServiceImpl.java | 1 + .../IndexCalculateCommunityServiceImpl.java | 12 +-- .../IndexCalculateDistrictServiceImpl.java | 10 +-- .../impl/IndexCalculateStreetServiceImpl.java | 12 +-- .../batch/BatchScoreCalculator.java | 8 +- .../normalizing/batch/IndexInputVO.java | 5 ++ .../stats/test/normalizing/DemoScoreCal.java | 28 +++---- 10 files changed, 98 insertions(+), 59 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index a49d1a1e13..04db895412 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -1,7 +1,5 @@ package com.epmet.eum; -import com.epmet.dto.indexcal.CalculateCommonFormDTO; - /** * 需要计算指标code枚举类 * @@ -9,43 +7,58 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; * @date 2020-08-26 11:14 **/ public enum IndexCodeEnum { - DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1), - WANG_GE_XIANG_GUAN("wanggexiangguan", "网格相关", 1), - SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1), - JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1), - QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1), - QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1), + DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1, false), + WANG_GE_XIANG_GUAN("wanggexiangguan", "网格相关", 1, false), + SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1, false), + JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1, false), + QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1, false), + QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1, false), + + DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2, false), + ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2, false), + FU_WU_NENG_LI("fuwunengli", "服务能力", 2, false), - DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2), - ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2), - FU_WU_NENG_LI("fuwunengli", "服务能力", 2), + CAN_YU_YI_SHI("canyuyishi", "参与议事", 4, false), + DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4, false), + LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4, false), - CAN_YU_YI_SHI("canyuyishi", "参与议事", 4), - DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), - LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), - ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), - ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), - XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), - SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), - SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), - JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ("jiedaoxiashusysqdjnlhzpjz","街道下属所有社区党建能力汇总(平均值)",5), - JIE_DAO_XIA_SHU_SYSQZLNLHZ("jiedaoxiashusysqzlnlhz","街道下属所有社区治理能力汇总 (平均值) ",5), - JIE_DAO_XIA_SHU_SQFWNLDFPYZ("jiedaoxiashusqfwnldfpjz","街道下属社区服务能力得分 (平均值) ",5), - QU_XIA_SHU_JIE_DFWNLHZPJZ("quxiashujiedfwnlhzpjz","区下属街道服务能力汇总(平均值)",5), - QU_XIA_JI_JIE_DDJNLHZPJZ("quxiajijieddjnlhzpjz","区下级街道党建能力汇总(平均值)",5), - SUO_YOU_JIE_DAO_ZLNLPJZ("suoyoujiedaozlnlpjz","所有街道治理能力(平均值)",5), - SUO_YOU_ZHI_SHU_BMZLNLPJZ("suoyouzhishubmzlnlpjz","所有直属部门治理能力(平均值)",5), + ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz", "组织内党员的联系群众能力考评分(平均值)", 5, true), + ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz", "组织内党员的参与议事能力考评分(平均值)", 5, true), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz", "下属所有网格的党建能力(平均值)", 5, true), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz", "社区下属所有网格治理能力汇总(平均值)", 5, true), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz", "社区下级所有网格服务能力得分(平均值) ", 5, true), + JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ("jiedaoxiashusysqdjnlhzpjz", "街道下属所有社区党建能力汇总(平均值)", 5, true), + JIE_DAO_XIA_SHU_SYSQZLNLHZ("jiedaoxiashusysqzlnlhz", "街道下属所有社区治理能力汇总 (平均值) ", 5, true), + JIE_DAO_XIA_SHU_SQFWNLDFPYZ("jiedaoxiashusqfwnldfpjz", "街道下属社区服务能力得分 (平均值) ", 5, true), + QU_XIA_SHU_JIE_DFWNLHZPJZ("quxiashujiedfwnlhzpjz", "区下属街道服务能力汇总(平均值)", 5, true), + QU_XIA_JI_JIE_DDJNLHZPJZ("quxiajijieddjnlhzpjz", "区下级街道党建能力汇总(平均值)", 5, true), + SUO_YOU_JIE_DAO_ZLNLPJZ("suoyoujiedaozlnlpjz", "所有街道治理能力(平均值)", 5, true), + SUO_YOU_ZHI_SHU_BMZLNLPJZ("suoyouzhishubmzlnlpjz", "所有直属部门治理能力(平均值)", 5, true), ; + /** + * code + */ private String code; + /** + * name + */ private String name; + /** + * 等级 + */ private Integer level; + /** + * 是否是平均值 + */ + private Boolean isAvgIndex; - IndexCodeEnum(String code, String name, Integer level) { + IndexCodeEnum(String code, String name, Integer level, Boolean isAvgIndex) { this.code = code; this.name = name; this.level = level; + this.isAvgIndex = isAvgIndex; } public static IndexCodeEnum getEnum(String code) { @@ -58,6 +71,16 @@ public enum IndexCodeEnum { return null; } + public static boolean isAvgIndex(String code) { + IndexCodeEnum[] values = IndexCodeEnum.values(); + for (IndexCodeEnum value : values) { + if (code != null && value.getCode().equals(code)) { + return value.isAvgIndex; + } + } + return false; + } + public String getCode() { return code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 9410e15d83..a10b4c9c65 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -375,7 +375,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), index.getAllParentIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); + + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), index.getAllParentIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), IndexCodeEnum.isAvgIndex(index.getIndexCode()), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 9355c6f79e..6266d20651 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -375,6 +375,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl implements Serializable { */ private BigDecimal weight; + /** + * 是否是分数 如果是分数 直接不用计算 乘以权重即可 + */ + private boolean isScore; + private ScoreCalculator scoreCalculator; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 16549e9b47..05a9360b47 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -76,8 +76,8 @@ public class DemoScoreCal { List> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -102,8 +102,8 @@ public class DemoScoreCal { List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -161,10 +161,10 @@ public class DemoScoreCal { // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), sc1); - IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), sc2); - IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), sc3); - IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), sc4); + IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), false, sc1); + IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), false, sc2); + IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), false, sc3); + IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), false, sc4); List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); @@ -234,10 +234,10 @@ public class DemoScoreCal { // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.3), sc1); - IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.2), sc2); - IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.2), sc3); - IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(0.6), new BigDecimal(0.3), sc4); + IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb1", index1SampleValues, new BigDecimal(-1), new BigDecimal("0.3"), false, sc1); + IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal("0.2"), false, sc2); + IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb3", index1SampleValues3, new BigDecimal(-1), new BigDecimal("0.2"), false, sc3); + IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb4", index1SampleValues4, new BigDecimal(0.6), new BigDecimal("0.3"), false, sc4); List indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); @@ -250,7 +250,9 @@ public class DemoScoreCal { System.err.println("----------------11111111----------------"); result2.forEach((key, value) -> { - System.out.println(key.concat("的得分为:").concat(value.toString())); + System.out.println(key.concat("的总得分为:") + value.getTotalScore()); + //System.out.println(JSON.toJSONString(indexInputVOS)); + value.getDetails().forEach(o -> System.out.println(JSON.toJSONString(o))); }); System.err.println("-----------------2222222222---------------"); } From e487bc7a9ca0714c8ab56acbc964f084e429361a Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 16 Sep 2020 13:07:37 +0800 Subject: [PATCH 141/150] =?UTF-8?q?=E9=83=A8=E7=BD=B2report=EF=BC=8Cstits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- .../data-statistical-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml index 360131c836..977c852354 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.36 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.37 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 42d424c219..6dd6fefbcb 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.36 + 0.3.37 data-report-server diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index 1d4ef09c3f..03f501aceb 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.48 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.49 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index d930651a68..a4aaa4ca34 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.48 + 0.3.49 data-statistical com.epmet From b4f7add54c5683ec239da87f0d20e08aefdee832 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 16 Sep 2020 13:42:36 +0800 Subject: [PATCH 142/150] =?UTF-8?q?sql=E8=A1=A5=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 7766b5eadb..a70ad180e5 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -67,7 +67,7 @@ org_name AS `NAME`, service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, ORG_ID orgId FROM screen_index_data_monthly From 8df31454450c7837fa5a66537a28b2854624da96 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 16 Sep 2020 14:49:14 +0800 Subject: [PATCH 143/150] =?UTF-8?q?=E4=B8=89=E5=A4=A7=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E6=B1=82=E5=92=8C=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/IndexServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index d090a4c00f..fe91800ffc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -57,7 +57,7 @@ public class IndexServiceImpl implements IndexService { yearAverageIndexResultDTO.setPartyDevAbility(getRound(yearAverageIndexResultDTO.getPartyDevAbility())); yearAverageIndexResultDTO.setGovernAbility(getRound(yearAverageIndexResultDTO.getGovernAbility())); yearAverageIndexResultDTO.setServiceAbility(getRound(yearAverageIndexResultDTO.getServiceAbility())); - yearAverageIndexResultDTO.setYearAverageIndex(yearAverageIndexResultDTO.getPartyDevAbility() + yearAverageIndexResultDTO.getGovernAbility() + yearAverageIndexResultDTO.getServiceAbility()); + yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getPartyDevAbility() + yearAverageIndexResultDTO.getGovernAbility() + yearAverageIndexResultDTO.getServiceAbility())); return yearAverageIndexResultDTO; } @@ -126,7 +126,7 @@ public class IndexServiceImpl implements IndexService { barchart.setPartyDevAbility(getRound(barchart.getPartyDevAbility())); barchart.setGovernAbility(getRound(barchart.getGovernAbility())); barchart.setServiceAbility(getRound(barchart.getServiceAbility())); - barchart.setIndexTotal(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility()); + barchart.setIndexTotal(getRound(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility())); }); List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); //升序 当前月份在队尾 @@ -199,7 +199,7 @@ public class IndexServiceImpl implements IndexService { indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); - indexRank.setTotalIndex(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility()); + indexRank.setTotalIndex(getRound(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility())); }); return subAgencyIndexRankResultDTOS; } @@ -218,7 +218,7 @@ public class IndexServiceImpl implements IndexService { rank.setPartyDevAbility(getRound(rank.getPartyDevAbility())); rank.setGovernAbility(getRound(rank.getGovernAbility())); rank.setServiceAbility(getRound(rank.getServiceAbility())); - rank.setTotalIndex(rank.getPartyDevAbility() + rank.getGovernAbility() + rank.getServiceAbility()); + rank.setTotalIndex(getRound(rank.getPartyDevAbility() + rank.getGovernAbility() + rank.getServiceAbility())); }); } return subAgencyIndexRankResultDTOS; From a84eed60c402d9a236c937b527896a43d493ba6a Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 16 Sep 2020 15:15:55 +0800 Subject: [PATCH 144/150] =?UTF-8?q?=E9=83=A8=E7=BD=B2report=EF=BC=8Cstits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/MonthPieChartResultDTO.java | 5 +++++ .../screen/impl/IndexServiceImpl.java | 20 +++++++++---------- .../screen/ScreenIndexDataMonthlyDao.xml | 3 ++- .../impl/CpcIndexCalculateServiceImpl.java | 5 ++++- .../externalapp/ExtAppJwtTokenUtils.java | 6 +++--- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java index 89ca2fd383..de0b16022b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java @@ -27,4 +27,9 @@ public class MonthPieChartResultDTO implements Serializable { * 治理能力 */ private Double governAbility = 0.0; + + /** + * 月份Id + */ + private String monthId; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index d090a4c00f..f6df6ad0d0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -71,22 +71,22 @@ public class IndexServiceImpl implements IndexService { @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { - MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); - if (null == pieChartDTO){ + MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), null); + String monthId = dateUtils.getCurrentMonthId(); + int time = NumConstant.TWELVE; + //保证获取月度指数数据的最大可能性 + while ((null == pieChartDTO || StringUtils.isBlank(pieChartDTO.getMonthId())) && time > NumConstant.ONE) { + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); + pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), monthId); + } + if (null == pieChartDTO) { return new MonthPieChartResultDTO(); } // 处理小数四舍五入 pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility())); pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility())); pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility())); - String monthId = dateUtils.getCurrentMonthId(); - int time = NumConstant.TWELVE; - //保证获取月度指数数据的最大可能性 - while(null == pieChartDTO && time > NumConstant.ONE){ - time--; - monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); - pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId); - } return pieChartDTO; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 7766b5eadb..ec371de783 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -8,7 +8,8 @@ SELECT service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, + MONTH_ID FROM screen_index_data_monthly WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index a10b4c9c65..9d9cfe5739 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -86,7 +86,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { Map cpcScoreTotalMap = new HashMap<>(); Map userTotalCount = new HashMap<>(); //删除总分 然后插入 - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + int effectRow; + do { + effectRow = cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR); + } while (effectRow > NumConstant.ZERO); do { List result = new ArrayList<>(); //获取数据 diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 2e49c80102..de4de9ed21 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,13 +75,13 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "2c448b7da527055fbeebb628f8d3dcb0"); - claim.put("customerId", "c1"); + claim.put("appId", "acc4ad66c82a7b46e741364b4c62dce2"); + claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1"); long ts = System.currentTimeMillis() - 1000 * 60 * 4; System.out.println("时间戳:" + ts); claim.put("ts", ts); - String abc = new ExtAppJwtTokenUtils().createToken(claim, "d4b73db4cf8e46ef99fa1f95149c2791ef2396fded114dd09e406cbce83fc88a"); + String abc = new ExtAppJwtTokenUtils().createToken(claim, "612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970"); System.out.println(abc); } From cbae166d00a043c4235b7235550cc9936cc9bc17 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 16 Sep 2020 16:24:34 +0800 Subject: [PATCH 145/150] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/issue/KcPartiTrendResultDTO.java | 34 ++++- .../result/project/ProjectSatisfaction.java | 23 --- .../project/ProjectSatisfactionResultDTO.java | 87 +++++++++++ .../result/project/UserSummaryResultDTO.java | 13 ++ .../result/user/KcUserPointRankResultDTO.java | 20 +++ .../result/user/KcUserPortrayalResultDTO.java | 29 ++++ .../dto/result/user/KcUserRankResultDTO.java | 19 +++ .../dto/result/user/KcUserTrendResultDTO.java | 63 ++++++++ .../ScreenKcCategoryNewsCountResultDTO.java | 12 ++ .../ScreenKcCategoryNewsRankResultDTO.java | 26 ++++ .../user/ScreenKcNewsHotRankResultDTO.java | 12 ++ .../user/ScreenKcNewsPartiTrendResultDTO.java | 37 +++++ .../user/ScreenKcNewsSummaryResultDTO.java | 14 ++ .../controller/screen/KcScreenController.java | 133 ++++++++++++++++- .../screen/ScreenPartyUserRankDataDao.java | 2 + .../ScreenKcNewsCategoryAnalysisDao.java | 6 + .../screenkc/ScreenKcNewsRankDao.java | 4 + .../screenkc/ScreenKcNewsSummaryDailyDao.java | 2 + .../screenkc/ScreenKcNewsTrendMonthlyDao.java | 4 + .../ScreenKcProjectSatisGridMonthlyDao.java | 4 + .../screenkc/ScreenKcUserSummaryDailyDao.java | 12 ++ .../ScreenKcUserTrendGridMonthlyDao.java | 4 + .../screen/KcScreenService.java | 23 ++- .../screen/impl/KcScreenServiceImpl.java | 137 +++++++++++++++++- .../screen/ScreenPartyUserRankDataDao.xml | 9 ++ .../ScreenKcIssueSummaryGridDailyDao.xml | 2 + .../ScreenKcNewsCategoryAnalysisDao.xml | 30 ++++ .../mapper/screenkc/ScreenKcNewsRankDao.xml | 16 +- .../screenkc/ScreenKcNewsSummaryDailyDao.xml | 18 ++- .../screenkc/ScreenKcNewsTrendMonthlyDao.xml | 11 +- .../ScreenKcProjectSatisGridMonthlyDao.xml | 17 ++- .../ScreenKcProjectSummaryGridDailyDao.xml | 1 + .../screenkc/ScreenKcUserSummaryDailyDao.xml | 56 +++++++ .../ScreenKcUserTrendGridMonthlyDao.xml | 13 +- 34 files changed, 848 insertions(+), 45 deletions(-) delete mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java index 5b7db61bbb..ee831f9761 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java @@ -1,11 +1,9 @@ package com.epmet.dto.result.issue; -import lombok.Data; import java.util.ArrayList; import java.util.List; -@Data public class KcPartiTrendResultDTO { private String monthId; @@ -13,4 +11,36 @@ public class KcPartiTrendResultDTO { private List xAxis = new ArrayList<>(); private List reportCountDataList = new ArrayList<>(); + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getReportCount() { + return reportCount; + } + + public void setReportCount(Integer reportCount) { + this.reportCount = reportCount; + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getReportCountDataList() { + return reportCountDataList; + } + + public void setReportCountDataList(List reportCountDataList) { + this.reportCountDataList = reportCountDataList; + } } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java deleted file mode 100644 index 03d1c9bded..0000000000 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfaction.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.epmet.dto.result.project; - -import lombok.Data; - -import java.util.List; - -@Data -public class ProjectSatisfaction { - - private List xAxis; - private List greatSatisDataList; - private List goodStatisDataList; - private List disStatisDataList; - - private String monthId; - private String monthName; - // 满意 - private Integer goodSatis; - // 非常满意 - private Integer greatSatis; - // 不满意 - private Integer disSatis; -} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java new file mode 100644 index 0000000000..717fc32c23 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/ProjectSatisfactionResultDTO.java @@ -0,0 +1,87 @@ +package com.epmet.dto.result.project; + +import java.util.ArrayList; +import java.util.List; + +/** + * xAxis 被lombok生成后是XAxis,与nei不符,所以使用手动生成getter/setter方法 + */ +public class ProjectSatisfactionResultDTO { + + private List xAxis = new ArrayList<>(); + private List greatSatisDataList = new ArrayList<>(); + private List goodSatisDataList = new ArrayList<>(); + private List disSatisDataList = new ArrayList<>(); + + private String monthId; + // 满意 + private Integer goodSatis; + // 非常满意 + private Integer greatSatis; + // 不满意 + private Integer disSatis; + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getGreatSatisDataList() { + return greatSatisDataList; + } + + public void setGreatSatisDataList(List greatSatisDataList) { + this.greatSatisDataList = greatSatisDataList; + } + + public List getGoodSatisDataList() { + return goodSatisDataList; + } + + public void setGoodSatisDataList(List goodSatisDataList) { + this.goodSatisDataList = goodSatisDataList; + } + + public List getDisSatisDataList() { + return disSatisDataList; + } + + public void setDisSatisDataList(List disSatisDataList) { + this.disSatisDataList = disSatisDataList; + } + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getGoodSatis() { + return goodSatis; + } + + public void setGoodSatis(Integer goodSatis) { + this.goodSatis = goodSatis; + } + + public Integer getGreatSatis() { + return greatSatis; + } + + public void setGreatSatis(Integer greatSatis) { + this.greatSatis = greatSatis; + } + + public Integer getDisSatis() { + return disSatis; + } + + public void setDisSatis(Integer disSatis) { + this.disSatis = disSatis; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java new file mode 100644 index 0000000000..926310a31d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/UserSummaryResultDTO.java @@ -0,0 +1,13 @@ +package com.epmet.dto.result.project; + +import lombok.Data; + +@Data +public class UserSummaryResultDTO { + + private String dateId; + private Integer vistorCount; + private Integer regUserCount; + private Integer partyUserCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java new file mode 100644 index 0000000000..51d156b993 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPointRankResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcUserPointRankResultDTO { + + private List userNameDataList = new ArrayList<>(); + private List pointsDataList = new ArrayList<>(); + + @Data + public static class KcUserPoint { + private String userId; + private String userName; + private Integer pointTotal; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java new file mode 100644 index 0000000000..c87ddbc2cd --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserPortrayalResultDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class KcUserPortrayalResultDTO { + + // 年龄分布 + private AgeDistribution ageDistribution; + // 性别分布 + private GenderDistribution genderDistribution; + + @Data + public static class AgeDistribution { + private Integer ageLevel1; + private Integer ageLevel2; + private Integer ageLevel3; + private Integer ageLevel4; + private Integer ageLevel5; + private Integer ageLevel6; + } + + @Data + public static class GenderDistribution { + private Integer malePartyUserCount; + private Integer femalePartyUserCount; + } + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java new file mode 100644 index 0000000000..f29c9e3124 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserRankResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcUserRankResultDTO { + + // 网格名称 + private String gridName; + // 浏览用户数 + private Integer viewUserCount; + + private List gridNameDataList = new ArrayList<>(); + private List totalUserDataList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java new file mode 100644 index 0000000000..5c2ef112d7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/KcUserTrendResultDTO.java @@ -0,0 +1,63 @@ +package com.epmet.dto.result.user; + +import java.util.ArrayList; +import java.util.List; + +public class KcUserTrendResultDTO { + + private String monthId; + private Integer regUserCount; + private Integer partyUserCount; + + private List xAxis = new ArrayList<>(); + private List userDataList = new ArrayList<>(); + private List partyUserDataList = new ArrayList<>(); + + public String getMonthId() { + return monthId; + } + + public void setMonthId(String monthId) { + this.monthId = monthId; + } + + public Integer getRegUserCount() { + return regUserCount; + } + + public void setRegUserCount(Integer regUserCount) { + this.regUserCount = regUserCount; + } + + public Integer getPartyUserCount() { + return partyUserCount; + } + + public void setPartyUserCount(Integer partyUserCount) { + this.partyUserCount = partyUserCount; + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getUserDataList() { + return userDataList; + } + + public void setUserDataList(List userDataList) { + this.userDataList = userDataList; + } + + public List getPartyUserDataList() { + return partyUserDataList; + } + + public void setPartyUserDataList(List partyUserDataList) { + this.partyUserDataList = partyUserDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java new file mode 100644 index 0000000000..09d2fb8584 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsCountResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcCategoryNewsCountResultDTO { + + private String categoryName; + private Integer newsCount; + private Integer partiCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java new file mode 100644 index 0000000000..1d2d60f98d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcCategoryNewsRankResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result.user; + +import java.util.ArrayList; +import java.util.List; + +public class ScreenKcCategoryNewsRankResultDTO { + + private List xAxis = new ArrayList<>(); + private List partiCountDataList = new ArrayList<>(); + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getPartiCountDataList() { + return partiCountDataList; + } + + public void setPartiCountDataList(List partiCountDataList) { + this.partiCountDataList = partiCountDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java new file mode 100644 index 0000000000..2fe7201164 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsHotRankResultDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcNewsHotRankResultDTO { + + private String newsId; + private String newsTitle; + private Integer hotCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java new file mode 100644 index 0000000000..c240f7da10 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsPartiTrendResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +public class ScreenKcNewsPartiTrendResultDTO { + + private List xAxis = new ArrayList<>(); + + private List partiCountDataList = new ArrayList<>(); + + @Data + public static class ScreenKcNewsPartyCount { + + private String monthId; + private Integer partiCount; + + } + + public List getxAxis() { + return xAxis; + } + + public void setxAxis(List xAxis) { + this.xAxis = xAxis; + } + + public List getPartiCountDataList() { + return partiCountDataList; + } + + public void setPartiCountDataList(List partiCountDataList) { + this.partiCountDataList = partiCountDataList; + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java new file mode 100644 index 0000000000..0cf7fab7cd --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/user/ScreenKcNewsSummaryResultDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result.user; + +import lombok.Data; + +@Data +public class ScreenKcNewsSummaryResultDTO { + + private String dateId; + private Integer newsCount; + private Integer readCount; + private Integer likeCount; + private Integer commentCount; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index d6d3c8bcbf..a3f03120df 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -4,9 +4,11 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.dto.result.issue.IssueGridTotalRankDTO; import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; @@ -123,7 +125,7 @@ public class KcScreenController { } /** - * 议题分析-审核效率 + * 议题分析-议题效率 * @param externalAppRequestParam * @return */ @@ -277,14 +279,133 @@ public class KcScreenController { * @param externalAppRequestParam * @return */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("project/statis") - public Result getProjectSatisfactionAnalyze(ExternalAppRequestParam externalAppRequestParam){ - String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; - //String customerId = externalAppRequestParam.getCustomerId(); - return new Result().ok(kcScreenService.getProjectSatisfactionAnalyze(customerId)); + public Result getProjectSatisfactionAnalyze(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getProjectSatisfactionAnalyze(customerId)); + } + + /** + * 用户-summary + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/summary") + public Result getUserSummary(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getUserSummary(customerId)); + } + + /** + * 用户量趋势 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/trend") + public Result getUserTrend(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserTrend(customerId)); + } + + /** + * 网格用户排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/griduserrank") + public Result getUserRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserRank(customerId)); + } + + /** + * 用户画像 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/userportrayal") + public Result getUserPortrayal(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserPortrayal(customerId)); + } + + /** + * 用户积分排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("user/pointsrank") + public Result getUserPointsRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getUserPointsRank(customerId)); } + /** + * 党建声音-各类总数 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/summary") + public Result getNewsSummary(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsSummary(customerId)); + } + + /** + * 新闻阅读参与趋势 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/partitrend") + public Result getNewsPartiTrend(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsPartiTrend(customerId)); + } + + /** + * 党建声音-分类的news数量 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/category") + public Result> getNewsCountGroupByCategory(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getNewsCountOfCategory(customerId)); + } + + /** + * 党建声音-分类的用户参与数排行 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/userparticategoryrank") + public Result getNewsPartiCategoryRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result().ok(kcScreenService.getNewsPartiCategoryRank(customerId)); + } + + /** + * 党建声音-热点新闻排行 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("news/hotrank") + public Result> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam){ + String customerId = externalAppRequestParam.getCustomerId(); + return new Result>().ok(kcScreenService.getNewsHotRank(customerId)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 2c4358ce15..bc15ca191f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.result.user.KcUserPointRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO; import com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO; import org.apache.ibatis.annotations.Mapper; @@ -51,4 +52,5 @@ public interface ScreenPartyUserRankDataDao{ **/ List selectPartymemberPointOrder(@Param("agencyId")String agencyId); + List listUserPoints(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java index 6a779fb248..ce34407ab0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsCategoryAnalysisDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcCategoryNewsCountResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-新闻-按类别统计(先根据customerId+dateId删除) * @@ -28,4 +31,7 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsCategoryAnalysisDao { + List getNewsCountOfCategory(String customerId); + + List listNewsPartiCategoryRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java index 6a03be5485..bf42d979df 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsRankDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsHotRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-热点新闻排行-(先根据customerId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsRankDao { + List getNewsHotRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java index ec9d49c5c2..16b215f5f2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsSummaryDailyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; /** @@ -28,4 +29,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsSummaryDailyDao { + ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java index c3d60f0b83..92422cf436 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcNewsTrendMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.ScreenKcNewsPartiTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-新闻参与趋势-(先根据customerId+monthId删除) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcNewsTrendMonthlyDao { + List getNewsPartiTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java index 324bc723c5..1a204bc242 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcProjectSatisGridMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.ProjectSatisfactionResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-项目满意度分析(customerId+monthId先删除记录,再插入) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcProjectSatisGridMonthlyDao { + List getProjectSatisfactionAnalyze(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java index ff33f78b39..40bb9f7ae3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserSummaryDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.project.UserSummaryResultDTO; +import com.epmet.dto.result.user.KcUserPortrayalResultDTO; +import com.epmet.dto.result.user.KcUserRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-用户分析(先根据customerId+dateId删除,后插入) * @@ -28,4 +33,11 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcUserSummaryDailyDao { + UserSummaryResultDTO getUserSummary(String customerId); + + List getUserRank(String customerId); + + KcUserPortrayalResultDTO.AgeDistribution getAgeDistribution(String customerId); + + KcUserPortrayalResultDTO.GenderDistribution getGenderDistribution(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java index 92bb3dce0f..c4010379cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserTrendGridMonthlyDao.java @@ -17,8 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.user.KcUserTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-用户趋势分析(根据monthId+customerId先删后增) * @@ -28,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcUserTrendGridMonthlyDao { + List getUserTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index bbce62b9c9..f17e492904 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -3,6 +3,7 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.dto.result.issue.*; import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; @@ -112,5 +113,25 @@ public interface KcScreenService { List getGridProjectAvgClosedTimeAnalysis(String customerId); - ProjectSatisfaction getProjectSatisfactionAnalyze(String customerId); + ProjectSatisfactionResultDTO getProjectSatisfactionAnalyze(String customerId); + + UserSummaryResultDTO getUserSummary(String customerId); + + KcUserTrendResultDTO getUserTrend(String customerId); + + KcUserRankResultDTO getUserRank(String customerId); + + KcUserPortrayalResultDTO getUserPortrayal(String customerId); + + KcUserPointRankResultDTO getUserPointsRank(String customerId); + + ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId); + + ScreenKcNewsPartiTrendResultDTO getNewsPartiTrend(String customerId); + + List getNewsCountOfCategory(String customerId); + + ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId); + + List getNewsHotRank(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index aa49430859..b300d5d4c8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -4,11 +4,13 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyUserRankDataDao; import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.dto.result.issue.*; import com.epmet.dto.result.project.*; +import com.epmet.dto.result.user.*; import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; @@ -71,6 +73,30 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcProjectSummaryGridDailyDao projectSummaryGridDailyDao; + @Autowired + private ScreenKcProjectSatisGridMonthlyDao projectSatisGridMonthlyDao; + + @Autowired + private ScreenKcUserSummaryDailyDao kcUserSummaryDailyDao; + + @Autowired + private ScreenKcUserTrendGridMonthlyDao userTrendGridMonthlyDao; + + @Autowired + private ScreenPartyUserRankDataDao partyUserRankDataDao; + + @Autowired + private ScreenKcNewsSummaryDailyDao screenKcNewsSummaryDailyDao; + + @Autowired + private ScreenKcNewsTrendMonthlyDao screenKcNewsTrendMonthlyDao; + + @Autowired + private ScreenKcNewsCategoryAnalysisDao screenKcNewsCategoryAnalysisDao; + + @Autowired + private ScreenKcNewsRankDao screenKcNewsRankDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -162,7 +188,7 @@ public class KcScreenServiceImpl implements KcScreenService { KcPartiTrendResultDTO result = new KcPartiTrendResultDTO(); trend.stream().forEach(t -> { String month = t.getMonthId().substring(4); - result.getXAxis().add(new Integer(month).toString().concat("月")); + result.getxAxis().add(new Integer(month).toString().concat("月")); result.getReportCountDataList().add(t.getReportCount()); }); return result; @@ -319,8 +345,113 @@ public class KcScreenServiceImpl implements KcScreenService { } @Override - public ProjectSatisfaction getProjectSatisfactionAnalyze(String customerId) { + public ProjectSatisfactionResultDTO getProjectSatisfactionAnalyze(String customerId) { + List pss = projectSatisGridMonthlyDao.getProjectSatisfactionAnalyze(customerId); + + ProjectSatisfactionResultDTO resultDTO = new ProjectSatisfactionResultDTO(); + pss.stream().forEach(ps -> { + String monthNo = ps.getMonthId().substring(4); + resultDTO.getxAxis().add(new Integer(monthNo).toString().concat("月")); + resultDTO.getGreatSatisDataList().add(ps.getGreatSatis()); + resultDTO.getGoodSatisDataList().add(ps.getGoodSatis()); + resultDTO.getDisSatisDataList().add(ps.getDisSatis()); + }); + return resultDTO; + } + + @Override + public UserSummaryResultDTO getUserSummary(String customerId) { + return kcUserSummaryDailyDao.getUserSummary(customerId); + } + + @Override + public KcUserTrendResultDTO getUserTrend(String customerId) { + List userSomeNums = userTrendGridMonthlyDao.getUserTrend(customerId); + KcUserTrendResultDTO trend = new KcUserTrendResultDTO(); + userSomeNums.stream().forEach(usm -> { + String monthStr = usm.getMonthId().substring(4); + trend.getxAxis().add(new Integer(monthStr).toString().concat("月")); + trend.getUserDataList().add(usm.getRegUserCount()); + trend.getPartyUserDataList().add(usm.getPartyUserCount()); + }); + + return trend; + } + + @Override + public KcUserRankResultDTO getUserRank(String customerId) { + List list = kcUserSummaryDailyDao.getUserRank(customerId); - return null; + KcUserRankResultDTO rank = new KcUserRankResultDTO(); + list.stream().forEach(i -> { + rank.getGridNameDataList().add(i.getGridName()); + rank.getTotalUserDataList().add(i.getViewUserCount()); + }); + + return rank; + } + + @Override + public KcUserPortrayalResultDTO getUserPortrayal(String customerId) { + KcUserPortrayalResultDTO.AgeDistribution ageDistribution = kcUserSummaryDailyDao.getAgeDistribution(customerId); + KcUserPortrayalResultDTO.GenderDistribution genderDistribution = kcUserSummaryDailyDao.getGenderDistribution(customerId); + + KcUserPortrayalResultDTO portrayal = new KcUserPortrayalResultDTO(); + portrayal.setAgeDistribution(ageDistribution); + portrayal.setGenderDistribution(genderDistribution); + + return portrayal; + } + + @Override + public KcUserPointRankResultDTO getUserPointsRank(String customerId) { + List userPoints = partyUserRankDataDao.listUserPoints(customerId); + KcUserPointRankResultDTO rank = new KcUserPointRankResultDTO(); + userPoints.stream().forEach(p -> { + rank.getUserNameDataList().add(p.getUserName()); + rank.getPointsDataList().add(p.getPointTotal()); + }); + return rank; + } + + @Override + public ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId) { + return screenKcNewsSummaryDailyDao.getNewsSummary(customerId); + } + + @Override + public ScreenKcNewsPartiTrendResultDTO getNewsPartiTrend(String customerId) { + List partyCounts = + screenKcNewsTrendMonthlyDao.getNewsPartiTrend(customerId); + + ScreenKcNewsPartiTrendResultDTO trend = new ScreenKcNewsPartiTrendResultDTO(); + partyCounts.stream().forEach(pc -> { + String monthId = pc.getMonthId(); + trend.getxAxis().add(new Integer(monthId.substring(4)).toString().concat("月")); + trend.getPartiCountDataList().add(pc.getPartiCount()); + }); + + return trend; + } + + @Override + public List getNewsCountOfCategory(String customerId) { + return screenKcNewsCategoryAnalysisDao.getNewsCountOfCategory(customerId); + } + + @Override + public ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId) { + List partiCounts = screenKcNewsCategoryAnalysisDao.listNewsPartiCategoryRank(customerId); + ScreenKcCategoryNewsRankResultDTO rank = new ScreenKcCategoryNewsRankResultDTO(); + partiCounts.stream().forEach(pc -> { + rank.getxAxis().add(pc.getCategoryName()); + rank.getPartiCountDataList().add(pc.getPartiCount()); + }); + return rank; + } + + @Override + public List getNewsHotRank(String customerId) { + return screenKcNewsRankDao.getNewsHotRank(customerId); } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 8d865b6341..983ced249a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -35,4 +35,13 @@ ORDER BY POINT_TOTAL DESC + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 1c12b7c53c..57c743144f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -31,6 +31,7 @@ where t21.CUSTOMER_ID = #{customerId}) latest on (isd.CUSTOMER_ID = latest.customerId and isd.DATE_ID = latest.max_date_id) order by isd.ISSUE_COUNT desc + limit 7 + select pcd.CATEGORY_ID categoryId, + pcd.CATEGORY_NAME categoryName, + pcd.NEWS_COUNT newsCount + from screen_kc_news_category_analysis pcd + inner join ( + select CUSTOMER_ID, max(DATE_ID) MAX_DATE_ID + from screen_kc_news_category_analysis + where CUSTOMER_ID = #{customerId} + and DEL_FLAG = 0 + ) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID) + where pcd.DEL_FLAG = 0 + order by pcd.NEWS_COUNT asc + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml index 49fb7817e0..ff51305086 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsRankDao.xml @@ -3,6 +3,18 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml index 715ce1f038..1094a408a4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsSummaryDailyDao.xml @@ -3,6 +3,20 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml index 71d977bd38..06d6826cbb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsTrendMonthlyDao.xml @@ -3,6 +3,13 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml index 0155931631..0727b6fbb2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSatisGridMonthlyDao.xml @@ -3,6 +3,19 @@ - - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml index fff84de166..7c79e5da1c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcProjectSummaryGridDailyDao.xml @@ -36,6 +36,7 @@ ) latest on (psd.CUSTOMER_ID = latest.CUSTOMER_ID and psd.DATE_ID = latest.MAX_DATE_ID) where DEL_FLAG = 0 order by psd.PROJECT_COUNT desc + limit 7 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml index 7ccf73a888..48e8bc1604 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml @@ -3,6 +3,62 @@ + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml index 39f0f5a0fc..f86c96af36 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserTrendGridMonthlyDao.xml @@ -3,6 +3,15 @@ - - + From 2af96ddbc119417f1741b75a0335c24e237213d0 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 16 Sep 2020 18:17:29 +0800 Subject: [PATCH 146/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=88=86?= =?UTF-8?q?=E9=A1=B5=20=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=9A=84=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/PageFormDTO.java | 9 +++++++++ .../controller/screen/KcScreenController.java | 17 +++++++++-------- .../evaluationindex/screen/KcScreenService.java | 4 ++-- .../screen/impl/KcScreenServiceImpl.java | 11 +++++++++-- .../screen/ScreenPartyUserRankDataDao.xml | 2 +- .../ScreenKcNewsCategoryAnalysisDao.xml | 2 +- .../screenkc/ScreenKcUserSummaryDailyDao.xml | 2 +- .../EpmetCommonServiceOpenFeignClient.java | 4 ++-- 8 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/PageFormDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/PageFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/PageFormDTO.java new file mode 100644 index 0000000000..c3da303f4d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/PageFormDTO.java @@ -0,0 +1,9 @@ +package com.epmet.dto; + +import lombok.Data; + +@Data +public class PageFormDTO { + private Integer pageNo = 1; + private Integer pageSize = 10; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index a3f03120df..db794ca26b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -4,9 +4,8 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcNewsSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; -import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.dto.PageFormDTO; import com.epmet.dto.result.project.*; import com.epmet.dto.result.user.*; import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; @@ -99,7 +98,7 @@ public class KcScreenController { } /** - * 按照议题总数排名 + * 按照议题数量排名 * @param externalAppRequestParam * @return */ @@ -312,7 +311,7 @@ public class KcScreenController { } /** - * 网格用户排名 + * 网格用户数量排名 * @param externalAppRequestParam * @return */ @@ -342,9 +341,10 @@ public class KcScreenController { */ @ExternalAppRequestAuth @PostMapping("user/pointsrank") - public Result getUserPointsRank(ExternalAppRequestParam externalAppRequestParam){ + public Result getUserPointsRank(ExternalAppRequestParam externalAppRequestParam, + @RequestBody PageFormDTO form) { String customerId = externalAppRequestParam.getCustomerId(); - return new Result().ok(kcScreenService.getUserPointsRank(customerId)); + return new Result().ok(kcScreenService.getUserPointsRank(customerId, form.getPageNo(), form.getPageSize())); } /** @@ -402,9 +402,10 @@ public class KcScreenController { */ @ExternalAppRequestAuth @PostMapping("news/hotrank") - public Result> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam){ + public Result> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam, + @RequestBody PageFormDTO form){ String customerId = externalAppRequestParam.getCustomerId(); - return new Result>().ok(kcScreenService.getNewsHotRank(customerId)); + return new Result>().ok(kcScreenService.getNewsHotRank(customerId, form.getPageNo(), form.getPageSize())); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index f17e492904..f40e8517ae 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -123,7 +123,7 @@ public interface KcScreenService { KcUserPortrayalResultDTO getUserPortrayal(String customerId); - KcUserPointRankResultDTO getUserPointsRank(String customerId); + KcUserPointRankResultDTO getUserPointsRank(String customerId, Integer pageNo, Integer pageSize); ScreenKcNewsSummaryResultDTO getNewsSummary(String customerId); @@ -133,5 +133,5 @@ public interface KcScreenService { ScreenKcCategoryNewsRankResultDTO getNewsPartiCategoryRank(String customerId); - List getNewsHotRank(String customerId); + List getNewsHotRank(String customerId, Integer pageNo, Integer pageSize); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index b300d5d4c8..661a43306a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -18,6 +18,7 @@ import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import com.epmet.dto.result.issue.KcIssueSummary; import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -404,7 +405,10 @@ public class KcScreenServiceImpl implements KcScreenService { } @Override - public KcUserPointRankResultDTO getUserPointsRank(String customerId) { + public KcUserPointRankResultDTO getUserPointsRank(String customerId, Integer pageNo, Integer pageSize) { + if (pageNo != null && pageSize != null) { + PageHelper.startPage(pageNo, pageSize); + } List userPoints = partyUserRankDataDao.listUserPoints(customerId); KcUserPointRankResultDTO rank = new KcUserPointRankResultDTO(); userPoints.stream().forEach(p -> { @@ -451,7 +455,10 @@ public class KcScreenServiceImpl implements KcScreenService { } @Override - public List getNewsHotRank(String customerId) { + public List getNewsHotRank(String customerId, Integer pageNo, Integer pageSize) { + if (pageNo != null && pageSize != null) { + PageHelper.startPage(pageNo, pageSize); + } return screenKcNewsRankDao.getNewsHotRank(customerId); } } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 983ced249a..9366bc90f7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -42,6 +42,6 @@ from screen_party_user_rank_data ur where ur.DEL_FLAG = 0 and ur.CUSTOMER_ID = #{customerId} - order by ur.POINT_TOTAL asc + order by ur.POINT_TOTAL desc \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml index da547c9ba0..a93bd0d439 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcNewsCategoryAnalysisDao.xml @@ -31,6 +31,6 @@ and DEL_FLAG = 0 ) latest on (pcd.CUSTOMER_ID = latest.CUSTOMER_ID and pcd.DATE_ID = latest.MAX_DATE_ID) where pcd.DEL_FLAG = 0 - order by convert(pcd.CATEGORY_NAME using gbk) + order by partiCount desc diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml index 48e8bc1604..5e27540bb9 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserSummaryDailyDao.xml @@ -28,7 +28,7 @@ where DEL_FLAG = 0 and CUSTOMER_ID = #{customerId} ) latest on (usd.DATE_ID = latest.MAX_DATE_ID and usd.CUSTOMER_ID = latest.CUSTOMER_ID) - order by viewUserCount asc + order by viewUserCount desc limit 7 diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index caa9bd6301..a3e26a5d80 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -19,8 +19,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 10:28 */ -@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) -//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") +//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) +@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") public interface EpmetCommonServiceOpenFeignClient { /** * @param formDTO From 70cba3bff2a895d3c412b8c4d9838a6b1bb3e160 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 17 Sep 2020 09:21:13 +0800 Subject: [PATCH 147/150] =?UTF-8?q?=E4=BF=AE=E6=94=B9kcscreen=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 323b2a7fca..9748b1ca26 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -442,7 +442,7 @@ epmet: urlWhiteList: - /data/report/test/test - /data/report/screen/** - - /data/report/screenkc/** + - /data/report/kcscreen/** - /epmetuser/customerstaff/customerlist swaggerUrls: From 88fccb65fd2d18bbb961c1c5ef39f9742058a664 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 17 Sep 2020 10:19:25 +0800 Subject: [PATCH 148/150] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84Feignclient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/EpmetCommonServiceOpenFeignClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index a3e26a5d80..caa9bd6301 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -19,8 +19,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 10:28 */ -//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) -@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") +@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) +//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://localhost:8103") public interface EpmetCommonServiceOpenFeignClient { /** * @param formDTO From 4fff0c0180da8c7bbe99542ab5c6fae4a8d65031 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 17 Sep 2020 13:57:02 +0800 Subject: [PATCH 149/150] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=80=BC=E6=9C=80=E5=B0=8F=E5=80=BC=E4=B8=80=E8=87=B4=20=20?= =?UTF-8?q?=E5=88=99=E4=BD=BF=E7=94=A8=E5=8F=8D=E6=AD=A3=E5=88=87=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E8=AE=A1=E7=AE=97=E5=88=86=E6=95=B0;2:=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AE=A1=E7=AE=97=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndexCalculateController.java | 51 +++++++++++-------- .../screen/ScreenCustomerAgencyDao.java | 35 ++++++++----- .../impl/CpcIndexCalculateServiceImpl.java | 4 +- .../impl/IndexCalculateServiceImpl.java | 9 ++++ .../batch/BatchScoreCalculator.java | 4 ++ .../screen/ScreenCustomerAgencyDao.xml | 5 ++ .../stats/test/normalizing/DemoScoreCal.java | 28 ++++++++++ .../stats/test/normalizing/MathUtilTest.java | 17 +++++++ 8 files changed, 118 insertions(+), 35 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/MathUtilTest.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 4d44af0d47..c6e24b6893 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -115,6 +115,7 @@ public class IndexCalculateController { /** * 指标计算 + * * @param formDTO */ private void indexCalculate(CalculateCommonFormDTO formDTO) { @@ -137,29 +138,34 @@ public class IndexCalculateController { /** * 提交异步计算 + * * @param formDTO * @return */ private void submitCalculate(CalculateCommonFormDTO formDTO) { Future future = singleThreadPool.submit(() -> { - long start = System.currentTimeMillis(); - Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); - if (aBoolean) { - log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", formDTO.getCustomerId(), (System.currentTimeMillis() - start) / 1000); - } + try { + long start = System.currentTimeMillis(); + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean) { + log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", formDTO.getCustomerId(), (System.currentTimeMillis() - start) / 1000); + } - redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); - futureMap.remove(formDTO.getCustomerId()); + redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + futureMap.remove(formDTO.getCustomerId()); - //测试代码 - //try { - // Thread.sleep(20000l); - // System.out.println(System.currentTimeMillis()); - //} catch (InterruptedException e) { - // e.printStackTrace(); - //} - //redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); - //futureMap.remove(formDTO.getCustomerId()); + //测试代码 + //try { + // Thread.sleep(20000l); + // System.out.println(System.currentTimeMillis()); + //} catch (InterruptedException e) { + // e.printStackTrace(); + //} + //redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(formDTO.getCustomerId())); + //futureMap.remove(formDTO.getCustomerId()); + } catch (Exception e) { + log.warn("submitCalculate exception", e); + } }); futureMap.put(formDTO.getCustomerId(), future); @@ -172,6 +178,7 @@ public class IndexCalculateController { /** * 终止计算 + * * @param form * @return */ @@ -194,10 +201,14 @@ public class IndexCalculateController { @PostMapping("reAll") public Result calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { long start = System.currentTimeMillis(); - Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); - HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); - if (aBoolean) { - return new Result().ok(true); + try { + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); + if (aBoolean) { + return new Result().ok(true); + } + } catch (Exception e) { + return new Result().error(e.getMessage()); } return new Result().error("指标计算失败"); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 56f6c9d5b4..04e5a0027d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -34,8 +34,8 @@ import java.util.List; @Mapper public interface ScreenCustomerAgencyDao extends BaseDao { /** - *14、组织层级 - * 1) 根据CUSTOMER_ID 进行查询,如果有数据,则先进行物理删除, 一次删除1000条 + * 14、组织层级 + * 1) 根据CUSTOMER_ID 进行查询,如果有数据,则先进行物理删除, 一次删除1000条 * * @param customerId * @return java.util.Integer @@ -46,24 +46,25 @@ public interface ScreenCustomerAgencyDao extends BaseDao list, @Param("customerId")String customerId); + void batchInsertCustomerAgency(@Param("list") List list, @Param("customerId") String customerId); /** * 返回当前客户下,未匹配到的 【社区级】 组织信息 - * @param customerId 客户id - * @param agencyIds 组织id集合 + * + * @param customerId 客户id + * @param agencyIds 组织id集合 * @return java.util.List * @Author zhangyong * @Date 14:38 2020-09-04 **/ - List selectListMismatcCommunityAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds); + List selectListMismatcCommunityAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds); /** * 根据客户id,查询区/街道 组织名称、id @@ -73,24 +74,32 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectListAgencyInfo(@Param("customerId")String customerId); + List selectListAgencyInfo(@Param("customerId") String customerId); /** - * @Description 根据agencyId查询上级组织Id * @param agencyId + * @Description 根据agencyId查询上级组织Id * @author zxc * @date 2020/9/8 3:36 下午 */ - String selectPid(@Param("agencyId")String agencyId); + String selectPid(@Param("agencyId") String agencyId); /** * 返回当前客户下,未匹配到的 【乡(镇、街道)级、区县级】 组织信息 - * @param customerId 客户id - * @param agencyIds 组织id集合 + * + * @param customerId 客户id + * @param agencyIds 组织id集合 * @return java.util.List * @Author zhangyong * @Date 14:38 2020-09-04 **/ - List selectListMismatcStreetAndDistrictAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds); + List selectListMismatcStreetAndDistrictAgencyInfo(@Param("customerId") String customerId, @Param("agencyIds") String[] agencyIds); + /** + * desc:获取客户的组织条数 + * + * @param customerId + * @return + */ + int selectCountByCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 9d9cfe5739..71359d8b32 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -75,8 +75,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标权重 List parentIndexDetails = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(parentIndexDetails)) { - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【党员相关】指标权重信息不存在"); + log.error("cpcIndexCalculate customerId:{} have not init index", formDTO.getCustomerId()); + throw new RenException("客户Id:" + formDTO.getCustomerId() + "【党员相关】指标权重信息不存在"); } Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); int pageNo = NumConstant.ONE; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index c4fef95f7b..a2703968ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.redis.IndexCalRedis; @@ -47,6 +48,8 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private DeptScoreService deptScoreService; @Autowired private FactIndexCollectService factIndexCollectService; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; @Override @@ -91,6 +94,12 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { Boolean flag; long start = System.currentTimeMillis(); try { + //校验是否含有组织数据 + int agencyCount = screenCustomerAgencyDao.selectCountByCustomerId(formDTO.getCustomerId()); + if (agencyCount < 1) { + log.info("客户id:{},组织结构数据缺失,请先上传后再计算", formDTO.getCustomerId()); + throw new RenException("组织结构数据缺失,请先上传后再计算"); + } //计算党员相关的 try { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index b8efe2a1ff..786ec50233 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -64,6 +64,10 @@ public class BatchScoreCalculator { } else { normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); } + //反正切函数 [-pi/2,pi/2] + if (idx.getScoreCalculator().getMaxValue().compareTo(idx.getScoreCalculator().getMinValue()) == 0) { + normalizeValue = new BigDecimal(Math.atan(new Double(vo.getSampleValue().toString())) / Math.PI * 100).setScale(6, RoundingMode.HALF_UP); + } BigDecimal score = normalizeValue.multiply(weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 7963aefd4c..49ce41b17c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -128,4 +128,9 @@ + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 05a9360b47..556e4a6029 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -257,5 +257,33 @@ public class DemoScoreCal { System.err.println("-----------------2222222222---------------"); } + @Test + public void testMath() { + // 每个指标需要单独的分支计算器,因为每个指标的最大最小值是不同的 + ScoreCalculator sc1 = new BigDecimalScoreCalculator(new BigDecimal(8), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + ScoreCalculator sc2 = new BigDecimalScoreCalculator(new BigDecimal(10), new BigDecimal(10), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + + List> index1SampleValues = Arrays.asList(new SampleValue<>("id1", 4), new SampleValue<>("id2", 1), new SampleValue<>("id3", 8)); + List> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); + + // 每个指标的信息,包括样本列表,权重,指标标记 + IndexInputVO index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc2); + + List indexInputVOS = Arrays.asList(index1VO, index2VO); + + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap result = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); + + System.err.println("--------------------------------"); + result.forEach((key, value) -> { + System.out.println(key.concat("的总得分为:") + value.getTotalScore()); + //System.out.println(JSON.toJSONString(indexInputVOS)); + value.getDetails().forEach(o -> System.out.println(JSON.toJSONString(o))); + }); + + System.err.println("--------------------------------"); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/MathUtilTest.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/MathUtilTest.java new file mode 100644 index 0000000000..bed5fc95b7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/MathUtilTest.java @@ -0,0 +1,17 @@ +package com.epmet.stats.test.normalizing; + +public class MathUtilTest { + public static void main(String[] args) { + double tan = Math.atan(4); + double tan2 = Math.atan(1); + double tan3 = Math.atan(8); + double tan4 = Math.atan(3); + + + System.out.println((tan / Math.PI)); + System.out.println((tan2 / Math.PI)); + System.out.println((tan3 / Math.PI)); + System.out.println((tan4 / Math.PI * 200)); + } + +} From 9c57792f98c3bd98da33fcc261a3a987ded33216 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 18 Sep 2020 10:29:52 +0800 Subject: [PATCH 150/150] =?UTF-8?q?=E5=B0=86app.jar=E6=94=B9=E6=88=90gov-p?= =?UTF-8?q?roject.jar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/gov-project/gov-project-server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/Dockerfile b/epmet-module/gov-project/gov-project-server/Dockerfile index 88b6575415..372d5097ca 100644 --- a/epmet-module/gov-project/gov-project-server/Dockerfile +++ b/epmet-module/gov-project/gov-project-server/Dockerfile @@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo 'Asia/Shanghai' > /etc/timezone -COPY ./target/*.jar ./app.jar +COPY ./target/*.jar ./gov-project.jar EXPOSE 8102