From c084ca825e14d14735a763169c335ebf3b076793 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 18:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=8F=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ScreenCollController.java | 45 ++++++++++++------- .../service/screen/ScreenCollService.java | 37 ++++++++------- .../screen/impl/ScreenCollServiceImpl.java | 45 +++++++------------ 3 files changed, 66 insertions(+), 61 deletions(-) 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 ae770d75fa..080ba5384b 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 @@ -54,7 +54,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("partylinkmassesdata") public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -69,7 +70,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("meetdata") public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -84,7 +86,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("orgrankdata") public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -99,7 +102,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("governrankdata") public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -114,7 +118,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("eventdata") public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -129,7 +134,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("difficultydata") public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -144,7 +150,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("cpcbasedata") public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -159,7 +166,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("indexdatamonthly") public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } // -- @@ -176,7 +184,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("indexdatayearly") public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -191,7 +200,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customerdept") public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -206,7 +216,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customergrid") public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -221,7 +232,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customeragency") public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -236,7 +248,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("usertotaldata") public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -251,7 +264,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("userjoin") public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -266,6 +280,7 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("pioneerdata") public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } } 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 4670c31fa1..8ee702178d 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 @@ -4,7 +4,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screencoll.form.*; import java.util.List; - +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ public interface ScreenCollService { /** @@ -31,7 +36,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyLinkMassesData(List formDTO, String customerId); + void insertPartyLinkMassesData(List formDTO, String customerId); /** * 7、基层党建-建设情况数据(支部、联建、志愿) @@ -44,7 +49,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyBranchData(List formDTO, String customerId); + void insertPartyBranchData(List formDTO, String customerId); /** * 6、党建引领-组织排行 @@ -57,7 +62,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertOrgRankData(List formDTO, String customerId); + void insertOrgRankData(List formDTO, String customerId); /** * 5、基层治理-治理能力数据 @@ -70,7 +75,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertGovernRankData(List formDTO, String customerId); + void insertGovernRankData(List formDTO, String customerId); /** * 4、事件数据 @@ -83,7 +88,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertEventData(List formDTO, String customerId); + void insertEventData(List formDTO, String customerId); /** * 3、难点赌点 @@ -96,7 +101,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertDifficultyData(List formDTO, String customerId); + void insertDifficultyData(List formDTO, String customerId); /** * 2、党员基本情况 @@ -109,7 +114,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCpcbaseData(List formDTO, String customerId); + void insertCpcbaseData(List formDTO, String customerId); /** * 1、指数_按月统计 @@ -122,7 +127,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataMonthly(List formDTO, String customerId); + void insertIndexDataMonthly(List formDTO, String customerId); /** * 17、指数_按年统计 @@ -135,7 +140,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataYearly(List formDTO, String customerId); + void insertIndexDataYearly(List formDTO, String customerId); /** * 16、部门信息上传 @@ -148,7 +153,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerDept(List formDTO, String customerId); + void insertCustomerDept(List formDTO, String customerId); /** * 15、网格信息上传 @@ -161,7 +166,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerGrid(List formDTO, String customerId); + void insertCustomerGrid(List formDTO, String customerId); /** * 14、组织层级 @@ -174,7 +179,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerAgency(List formDTO, String customerId); + void insertCustomerAgency(List formDTO, String customerId); /** * 12、中央区各类总数 @@ -187,7 +192,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserTotalData(List formDTO, String customerId); + void insertUserTotalData(List formDTO, String customerId); /** * 11、基层治理-公众参与 @@ -200,7 +205,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserJoin(List formDTO, String customerId); + void insertUserJoin(List formDTO, String customerId); /** * 10、党建引领-先锋模范数据 @@ -213,5 +218,5 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPioneerData(List formDTO, String customerId); + void insertPioneerData(List formDTO, String customerId); } 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 f96ece5527..899ebac605 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 @@ -91,7 +91,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyLinkMassesData(List formDTO, String customerId) { + public void insertPartyLinkMassesData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -101,12 +101,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyBranchData(List formDTO, String customerId) { + public void insertPartyBranchData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -119,12 +118,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertOrgRankData(List formDTO, String customerId) { + public void insertOrgRankData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -137,12 +135,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertGovernRankData(List formDTO, String customerId) { + public void insertGovernRankData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -155,12 +152,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertEventData(List formDTO, String customerId) { + public void insertEventData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); @@ -183,12 +179,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertDifficultyData(List formDTO, String customerId) { + public void insertDifficultyData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); @@ -196,12 +191,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCpcbaseData(List formDTO, String customerId) { + public void insertCpcbaseData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -211,12 +205,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexDataMonthly(List formDTO, String customerId) { + public void insertIndexDataMonthly(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -229,12 +222,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexDataYearly(List formDTO, String customerId) { + public void insertIndexDataYearly(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -246,12 +238,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerDept(List formDTO, String customerId) { + public void insertCustomerDept(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] deptIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -261,12 +252,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerGrid(List formDTO, String customerId) { + public void insertCustomerGrid(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] gridIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -276,12 +266,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerAgency(List formDTO, String customerId) { + public void insertCustomerAgency(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] agencyIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -291,12 +280,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserTotalData(List formDTO, String customerId) { + public void insertUserTotalData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -306,12 +294,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserJoin(List formDTO, String customerId) { + public void insertUserJoin(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -324,12 +311,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenUserJoinDao.batchInsertUserJoin(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertPioneerData(List formDTO, String customerId) { + public void insertPioneerData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] orgIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -339,6 +325,5 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); } - return new Result(); } }