From 79bf69cfb859485b3b9454656c42e071d5c8c86d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 13:37:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=BC=95=E9=A2=86-=E5=BF=97?= =?UTF-8?q?=E6=84=BF=E6=B4=BB=E5=8A=A8=E6=9C=8D=E5=8A=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E5=88=A0=E9=99=A4=EF=BC=88=E8=A1=A8?= =?UTF-8?q?=E5=BA=9F=E5=BC=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/VoluntaryActivityDataFormDTO.java | 61 ------------- .../controller/ScreenCollController.java | 13 --- .../ScreenVoluntaryActivityDataDao.java | 62 ------------- .../ScreenVoluntaryActivityDataEntity.java | 86 ------------------- .../service/screen/ScreenCollService.java | 12 --- .../screen/impl/ScreenCollServiceImpl.java | 20 ----- .../screen/ScreenVoluntaryActivityDataDao.xml | 57 ------------ 7 files changed, 311 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java deleted file mode 100644 index 6746a60303..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java +++ /dev/null @@ -1,61 +0,0 @@ -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 VoluntaryActivityDataFormDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 客户id - */ - private String customerId; - - /** - * yyyy - */ - private String yearId; - - /** - * yyyyMM - */ - private String monthId; - - /** - * 组织类别 agency:组织;部门:department;网格:grid - */ - private String orgType; - - /** - * 组织Id 可以为网格,机关id - */ - private String orgId; - - /** - * 上级组织Id - */ - private String parentId; - - /** - * 组织名称 - */ - private String orgName; - - /** - * 组织活动次数 - */ - private Integer activetyCount; - - /** - * 活动参与人数 - */ - private Integer joinUserCount; -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java index 248bf39931..78230dd581 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -186,19 +186,6 @@ public class ScreenCollController { return screenCollService.insertCustomerAgency(formDTO); } - /** - * 13、党建引领-志愿活动服务数据 - * - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - @PostMapping("voluntaryactivitydata") - public Result voluntaryActivityData(@RequestBody List formDTO) { - return screenCollService.insertVoluntaryActivityData(formDTO); - } - /** * 12、中央区各类总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java deleted file mode 100644 index 13357e03c2..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java +++ /dev/null @@ -1,62 +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.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screencoll.form.VoluntaryActivityDataFormDTO; -import com.epmet.entity.screen.ScreenVoluntaryActivityDataEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 党建引领-志愿活动服务数据 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 - */ -@Mapper -public interface ScreenVoluntaryActivityDataDao extends BaseDao { - - /** - * 13、党建引领-志愿活动服务数据 - * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 - * - * @param customerId - * @param yearId - * @param monthId - * @param orgIds 组织Id集合 - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - void deleteVoluntaryActivityData(@Param("customerId") String customerId, - @Param("yearId") String yearId, - @Param("monthId") String monthId, - @Param("orgIds") String[] orgIds); - - /** - * 13、党建引领-志愿活动服务数据 - * 2) 在批量新增 - * - * @param list - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - void batchInsertVoluntaryActivityData(@Param("list") List list); -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java deleted file mode 100644 index cd11e5b43a..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java +++ /dev/null @@ -1,86 +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.screen; - -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-08-18 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_voluntary_activity_data") -public class ScreenVoluntaryActivityDataEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 年Id - */ - private String yearId; - - /** - * 月份Id - */ - private String monthId; - - /** - * 组织类别 agency:组织;部门:department;网格:grid - */ - private String orgType; - - /** - * 组织Id 可以为网格,机关id - */ - private String orgId; - - /** - * 上级组织Id - */ - private String parentId; - - /** - * 组织名称 - */ - private String orgName; - - /** - * 组织活动次数 - */ - private Integer activetyCount; - - /** - * 活动参与人数 - */ - private Integer joinUserCount; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java index dfd49c1e5c..7fbddb072f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java @@ -151,18 +151,6 @@ public interface ScreenCollService { **/ Result insertCustomerAgency(List formDTO); - /** - * 13、党建引领-志愿活动服务数据 - * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 - * 2) 在新增 - * - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - Result insertVoluntaryActivityData(List formDTO); - /** * 12、中央区各类总数 * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java index 00dbd2a516..339fa96305 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java @@ -65,8 +65,6 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Autowired private ScreenCustomerAgencyDao screenCustomerAgencyDao; @Autowired - private ScreenVoluntaryActivityDataDao screenVoluntaryActivityDataDao; - @Autowired private ScreenUserTotalDataDao screenUserTotalDataDao; @Autowired private ScreenUserJoinDao screenUserJoinDao; @@ -277,24 +275,6 @@ public class ScreenCollServiceImpl implements ScreenCollService { return new Result(); } - @Override - @Transactional(rollbackFor = Exception.class) - public Result insertVoluntaryActivityData(List formDTO) { - if (null != formDTO && formDTO.size() > NumConstant.ZERO){ - String[] orgIds = new String[formDTO.size()]; - for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - orgIds[i] = formDTO.get(i).getOrgId(); - } - screenVoluntaryActivityDataDao.deleteVoluntaryActivityData(formDTO.get(NumConstant.ZERO).getCustomerId(), - formDTO.get(NumConstant.ZERO).getYearId(), - formDTO.get(NumConstant.ZERO).getMonthId(), - orgIds); - - screenVoluntaryActivityDataDao.batchInsertVoluntaryActivityData(formDTO); - } - return new Result(); - } - @Override @Transactional(rollbackFor = Exception.class) public Result insertUserTotalData(List formDTO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml deleted file mode 100644 index dc2c2585a6..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - delete from screen_voluntary_activity_data - where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} - AND ORG_ID IN - - #{item} - - - - - insert into screen_voluntary_activity_data - ( - ID, - CUSTOMER_ID, - YEAR_ID, - MONTH_ID, - ORG_TYPE, - ORG_ID, - PARENT_ID, - ORG_NAME, - ACTIVETY_COUNT, - JOIN_USER_COUNT, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, - #{item.yearId}, - #{item.monthId}, - #{item.orgType}, - #{item.orgId}, - #{item.parentId}, - #{item.orgName}, - #{item.activetyCount}, - #{item.joinUserCount}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - -