From 80d70bc15571df05e033c6398d81ffc6cdd09723 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 28 Jun 2021 14:01:30 +0800 Subject: [PATCH] =?UTF-8?q?emm=20=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/AgencyTopicIssueFormDTO.java | 8 +- .../form/AgencyTopicStatusFormDTO.java | 8 +- .../dto/basereport/form/GridIssueFormDTO.java | 8 +- .../form/GridTopicIssueFormDTO.java | 8 +- .../form/GridTopicStatusFormDTO.java | 8 +- .../controller/BaseReportController.java | 45 ++- .../com/epmet/dao/stats/BaseReportDao.java | 86 +++++ .../com/epmet/service/BaseReportService.java | 16 +- .../service/impl/BaseReportServiceImpl.java | 71 +++- .../resources/mapper/stats/BaseReportDao.xml | 322 ++++++++++++++++++ 10 files changed, 533 insertions(+), 47 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java index 6de6fd913f..046b947bec 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicIssueFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.basereport.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.util.List; @@ -13,6 +15,8 @@ import java.util.List; public class AgencyTopicIssueFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface AgencyTopicIssueForm extends CustomerClientShowGroup{} + /** * 为true时需要删除历史数据 */ @@ -20,11 +24,11 @@ public class AgencyTopicIssueFormDTO implements Serializable { /** * 数据集合对象 */ + @NotEmpty(message = "数据集合对象不能为空",groups = AgencyTopicIssueForm.class) private List dataList; @Data - public class DataList implements Serializable { - private static final long serialVersionUID = 1L; + public static class DataList{ /** * 客户Id diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java index db7b9f4942..6bb5eac899 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/AgencyTopicStatusFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.basereport.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -14,6 +16,8 @@ import java.util.List; public class AgencyTopicStatusFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface AgencyTopicStatusForm extends CustomerClientShowGroup{} + /** * 为true时需要删除历史数据 */ @@ -21,11 +25,11 @@ public class AgencyTopicStatusFormDTO implements Serializable { /** * 数据集合对象 */ + @NotEmpty(message = "数据集合对象不能为空",groups = AgencyTopicStatusForm.class) private List dataList; @Data - public class DataList implements Serializable { - private static final long serialVersionUID = 1L; + public static class DataList { /** * 客户Id diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java index 5c6d2621a4..4fd03e434b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridIssueFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.basereport.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -14,6 +16,8 @@ import java.util.List; public class GridIssueFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface GridIssueForm extends CustomerClientShowGroup{} + /** * 为true时需要删除历史数据 */ @@ -21,11 +25,11 @@ public class GridIssueFormDTO implements Serializable { /** * 数据集合对象 */ + @NotEmpty(message = "数据集合对象不能为空",groups = GridIssueForm.class) private List dataList; @Data - public class DataList implements Serializable { - private static final long serialVersionUID = 1L; + public static class DataList{ /** * 客户ID diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java index a0f9b4eefd..bd40463640 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicIssueFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.basereport.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -14,6 +16,8 @@ import java.util.List; public class GridTopicIssueFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface GridTopicIssueForm extends CustomerClientShowGroup{} + /** * 为true时需要删除历史数据 */ @@ -21,11 +25,11 @@ public class GridTopicIssueFormDTO implements Serializable { /** * 数据集合对象 */ + @NotEmpty(message = "数据集合对象不能为空",groups = GridTopicIssueForm.class) private List dataList; @Data - public class DataList implements Serializable { - private static final long serialVersionUID = 1L; + public static class DataList{ /** * 客户Id diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java index 4e19bc1125..519ea28a37 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/GridTopicStatusFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.basereport.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -14,6 +16,8 @@ import java.util.List; public class GridTopicStatusFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface GridTopicStatusForm extends CustomerClientShowGroup{} + /** * 为true时需要删除历史数据 */ @@ -21,11 +25,11 @@ public class GridTopicStatusFormDTO implements Serializable { /** * 数据集合对象 */ + @NotEmpty(message = "数据集合对象不能为空",groups = GridTopicStatusForm.class) private List dataList; @Data - public class DataList implements Serializable { - private static final long serialVersionUID = 1L; + public static class DataList{ /** * 客户Id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java index 1db8161221..f8990a9a8f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/BaseReportController.java @@ -94,64 +94,75 @@ public class BaseReportController { } /** + * @Description 网格状态话题数据-008 * @Param formDTO - * @Description 网格状态话题数据 - * @author sun + * @author zxc + * @date 2021/6/25 3:09 下午 */ @PostMapping("gridtopicstatus") public Result gridTopicStatus(@RequestBody GridTopicStatusFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GridTopicStatusFormDTO.GridTopicStatusForm.class); baseReportService.gridTopicStatus(formDTO); return new Result(); } /** + * @Description 组织状态话题数据-007 * @Param formDTO - * @Description 组织状态话题数据 - * @author sun + * @author zxc + * @date 2021/6/25 3:09 下午 */ @PostMapping("agencytopicstatus") public Result agencyTopicStatus(@RequestBody AgencyTopicStatusFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AgencyTopicStatusFormDTO.AgencyTopicStatusForm.class); baseReportService.agencyTopicStatus(formDTO); return new Result(); } /** + * @Description 网格话题转议题数据-006 * @Param formDTO - * @Description 网格话题转议题数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:51 下午 */ @PostMapping("gridtopicissue") public Result gridTopicIssue(@RequestBody GridTopicIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GridTopicIssueFormDTO.GridTopicIssueForm.class); baseReportService.gridTopicIssue(formDTO); return new Result(); } /** + * @Description 组织话题转议题数据-005 * @Param formDTO - * @Description 组织话题转议题数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:50 下午 */ @PostMapping("agencytopicissue") public Result agencyTopicIssue(@RequestBody AgencyTopicIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AgencyTopicIssueFormDTO.AgencyTopicIssueForm.class); baseReportService.agencyTopicIssue(formDTO); return new Result(); } /** + * @Description 网格议题数据-004 * @Param formDTO - * @Description 网格议题数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:50 下午 */ @PostMapping("gridissue") public Result gridIssue(@RequestBody GridIssueFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GridIssueFormDTO.GridIssueForm.class); baseReportService.gridIssue(formDTO); return new Result(); } /** + * @Description 组织议题数据-003 * @Param formDTO - * @Description 组织议题数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:50 下午 */ @PostMapping("agencyissue") public Result agencyIssue(@RequestBody AgencyIssueFormDTO formDTO) { @@ -161,9 +172,10 @@ public class BaseReportController { } /** + * @Description 网格项目数据-002 * @Param formDTO - * @Description 网格项目数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:50 下午 */ @PostMapping("gridproject") public Result gridProject(@RequestBody GridProjectFormDTO formDTO) { @@ -173,9 +185,10 @@ public class BaseReportController { } /** + * @Description 组织项目数据-001 * @Param formDTO - * @Description 组织项目数据 - * @author sun + * @author zxc + * @date 2021/6/25 1:50 下午 */ @PostMapping("agencyproject") public Result agencyProject(@RequestBody AgencyProjectFormDTO formDTO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java index bb9b5a2c9d..66a80a58fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/BaseReportDao.java @@ -138,4 +138,90 @@ public interface BaseReportDao { * @date 2021/6/25 10:54 上午 */ void insertAgencyIssue(@Param("list")List dataList); + + /** + * @Description 删除网格议题数据 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/6/25 2:00 下午 + */ + int delGridIssue(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * @Description 新增网格议题数据 + * @Param dataList + * @author zxc + * @date 2021/6/25 2:00 下午 + */ + void insertGridIssue(@Param("list")List dataList); + + /** + * @Description 删除组织话题转议题数据 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/6/25 2:13 下午 + */ + int delAgencyTopicIssue(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * @Description 新增组织话题转议题数据 + * @Param dataList + * @author zxc + * @date 2021/6/25 2:14 下午 + */ + void insertAgencyTopicIssue(@Param("list")List dataList); + + /** + * @Description 删除网格话题转议题数据 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/6/25 2:41 下午 + */ + int delGridTopicIssue(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * @Description 新增网格话题转议题数据 + * @Param dataList + * @author zxc + * @date 2021/6/25 2:41 下午 + */ + void insertGridTopicIssue(@Param("list")List dataList); + + /** + * @Description 删除组织状态话题数据 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/6/25 3:17 下午 + */ + int delAgencyTopicStatus(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * @Description 增加组织状态话题数据 + * @Param dataList + * @author zxc + * @date 2021/6/25 3:18 下午 + */ + void insertAgencyTopicStatus(@Param("list")List dataList); + + /** + * @Description 删除网格状态话题数据 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/6/25 3:30 下午 + */ + int delGridTopicStatus(@Param("customerId") String customerId, @Param("dateId") String dateId); + + /** + * @Description 增加网格状态话题数据 + * @Param dataList + * @author zxc + * @date 2021/6/25 3:30 下午 + */ + void insertGridTopicStatus(@Param("list")List dataList); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java index b1bf097f58..50b5f3579d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/BaseReportService.java @@ -53,56 +53,56 @@ public interface BaseReportService { /** * @Param formDTO - * @Description 网格状态话题数据 + * @Description 网格状态话题数据-008 * @author sun */ void gridTopicStatus(GridTopicStatusFormDTO formDTO); /** * @Param formDTO - * @Description 组织状态话题数据 + * @Description 组织状态话题数据-007 * @author sun */ void agencyTopicStatus(AgencyTopicStatusFormDTO formDTO); /** * @Param formDTO - * @Description 网格话题转议题数据 + * @Description 网格话题转议题数据-006 * @author sun */ void gridTopicIssue(GridTopicIssueFormDTO formDTO); /** * @Param formDTO - * @Description 组织话题转议题数据 + * @Description 组织话题转议题数据-005 * @author sun */ void agencyTopicIssue(AgencyTopicIssueFormDTO formDTO); /** * @Param formDTO - * @Description 网格议题数据 + * @Description 网格议题数据-004 * @author sun */ void gridIssue(GridIssueFormDTO formDTO); /** * @Param formDTO - * @Description 组织议题数据 + * @Description 组织议题数据-003 * @author sun */ void agencyIssue(AgencyIssueFormDTO formDTO); /** * @Param formDTO - * @Description 网格项目数据 + * @Description 网格项目数据-002 * @author sun */ void gridProject(GridProjectFormDTO formDTO); /** * @Param formDTO - * @Description 组织项目数据 + * @Description 组织项目数据-001 * @author sun */ void agencyProject(AgencyProjectFormDTO formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java index db2753e51e..b00c8cace6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/BaseReportServiceImpl.java @@ -142,62 +142,107 @@ public class BaseReportServiceImpl implements BaseReportService { /** * @Param formDTO - * @Description 网格状态话题数据 + * @Description 网格状态话题数据-008 * @author sun */ @Override @Transactional(rollbackFor = Exception.class) public void gridTopicStatus(GridTopicStatusFormDTO formDTO) { - + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = baseReportDao.delGridTopicStatus(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); + } + List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseReportDao.insertGridTopicStatus(p); + }); } /** * @Param formDTO - * @Description 组织状态话题数据 + * @Description 组织状态话题数据-007 * @author sun */ @Override @Transactional(rollbackFor = Exception.class) public void agencyTopicStatus(AgencyTopicStatusFormDTO formDTO) { - + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = baseReportDao.delAgencyTopicStatus(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); + } + List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseReportDao.insertAgencyTopicStatus(p); + }); } /** * @Param formDTO - * @Description 网格话题转议题数据 + * @Description 网格话题转议题数据-006 * @author sun */ @Override @Transactional(rollbackFor = Exception.class) public void gridTopicIssue(GridTopicIssueFormDTO formDTO) { - + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = baseReportDao.delGridTopicIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); + } + List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseReportDao.insertGridTopicIssue(p); + }); } /** * @Param formDTO - * @Description 组织话题转议题数据 + * @Description 组织话题转议题数据-005 * @author sun */ @Override @Transactional(rollbackFor = Exception.class) public void agencyTopicIssue(AgencyTopicIssueFormDTO formDTO) { - + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = baseReportDao.delAgencyTopicIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); + } + List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseReportDao.insertAgencyTopicIssue(p); + }); } /** * @Param formDTO - * @Description 网格议题数据 + * @Description 网格议题数据-004 * @author sun */ @Override @Transactional(rollbackFor = Exception.class) public void gridIssue(GridIssueFormDTO formDTO) { - + if (formDTO.getIsFirst()) { + int deleteNum; + do { + deleteNum = baseReportDao.delGridIssue(formDTO.getDataList().get(NumConstant.ZERO).getCustomerId(), formDTO.getDataList().get(NumConstant.ZERO).getDateId()); + } while (deleteNum > NumConstant.ZERO); + } + List> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseReportDao.insertGridIssue(p); + }); } /** * @Param formDTO - * @Description 组织议题数据 + * @Description 组织议题数据-003 * @author sun */ @Override @@ -217,7 +262,7 @@ public class BaseReportServiceImpl implements BaseReportService { /** * @Param formDTO - * @Description 网格项目数据 + * @Description 网格项目数据-002 * @author sun */ @Override @@ -237,7 +282,7 @@ public class BaseReportServiceImpl implements BaseReportService { /** * @Param formDTO - * @Description 组织项目数据 + * @Description 组织项目数据-001 * @author sun */ @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml index 8f16d0462a..5bd8912385 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/BaseReportDao.xml @@ -606,4 +606,326 @@ ) + + + + INSERT INTO fact_issue_grid_daily + (ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + YEAR_ID, + QUARTER_ID, + MONTH_ID, + WEEK_ID, + DATE_ID, + ISSUE_INCR, + ISSUE_TOTAL, + SHIFT_PROJECT_INCR, + SHIFT_PROJECT_TOTAL, + SHIFT_PROJECT_PERCENT, + VOTING_INCR, + VOTING_TOTAL, + VOTING_PERCENT, + CLOSED_INCR, + CLOSED_RESOLVED_INCR, + CLOSED_UNRESOLVED_INCR, + CLOSED_TOTAL, + CLOSED_RESOLVED_TOTAL, + CLOSED_UNRESOLVED_TOTAL, + CLOSED_PERCENT, + CLOSED_RESOLVED_PERCENT, + CLOSED_UNRESOLVED_PERCENT, + CLOSED_CASE_INCR, + CLOSED_CASE_RESOLVED_INCR, + CLOSED_CASE_UNRESOLVED_INCR, + CLOSED_CASE_TOTAL, + CLOSED_CASE_RESOLVED_TOTAL, + CLOSED_CASE_UNRESOLVED_TOTAL, + CLOSED_CASE_RESOLVED_PERCENT, + CLOSED_CASE_UNRESOLVED_PERCENT, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + DEL_FLAG, + UPDATED_TIME) + VALUES + + ( + REPLACE(UUID(), '-', ''), + #{i.customerId}, + #{i.agencyId}, + #{i.gridId}, + #{i.yearId}, + #{i.quarterId}, + #{i.monthId}, + #{i.weekId}, + #{i.dateId}, + #{i.issueIncr}, + #{i.issueTotal}, + #{i.shiftProjectIncr}, + #{i.shiftProjectTotal}, + #{i.shiftProjectPercent}, + #{i.votingIncr}, + #{i.votingTotal}, + #{i.votingPercent}, + #{i.closedIncr}, + #{i.closedResolvedIncr}, + #{i.closedUnresolvedIncr}, + #{i.closedTotal}, + #{i.closedResolvedTotal}, + #{i.closedUnresolvedTotal}, + #{i.closedPercent}, + #{i.closedResolvedPercent}, + #{i.closedUnresolvedPercent}, + #{i.closedCaseIncr}, + #{i.closedCaseResolvedIncr}, + #{i.closedCaseUnresolvedIncr}, + #{i.closedCaseTotal}, + #{i.closedCaseResolvedTotal}, + #{i.closedCaseUnresolvedTotal}, + #{i.closedCaseResolvedPercent}, + #{i.closedCaseUnresolvedPercent}, + 0, + 'BASE_REPORT', + NOW(), + 'BASE_REPORT', + 0, + NOW() + ) + + + + + + DELETE FROM fact_issue_grid_daily + WHERE customer_id = #{customerId} + AND date_id = #{dateId} + LIMIT 1000 + + + + + DELETE FROM fact_topic_issue_agency_daily + WHERE customer_id = #{customerId} + AND date_id = #{dateId} + LIMIT 1000 + + + + + INSERT INTO fact_topic_issue_agency_daily + ( + ID, + CUSTOMER_ID, + PID, + AGENCY_ID, + DATE_ID, + WEEK_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ISSUE_TOTAL, + ISSUE_INCR, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + + ( + REPLACE(UUID(), '-', ''), + #{i.customerId}, + #{i.pid}, + #{i.agencyId}, + #{i.dateId}, + #{i.weekId}, + #{i.monthId}, + #{i.quarterId}, + #{i.yearId}, + #{i.issueTotal}, + #{i.issueIncr}, + 0, + 0, + 'BASE_REPORT', + NOW(), + 'BASE_REPORT', + NOW() + ) + + + + + + INSERT INTO fact_topic_issue_grid_daily + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + DATE_ID, + WEEK_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ISSUE_INCR, + ISSUE_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + + ( + REPLACE(UUID(), '-', ''), + #{i.customerId}, + #{i.agencyId}, + #{i.gridId}, + #{i.dateId}, + #{i.weekId}, + #{i.monthId}, + #{i.quarterId}, + #{i.yearId}, + #{i.issueIncr}, + #{i.issueTotal}, + 0, + 0, + 'BASE_REPORT', + NOW(), + 'BASE_REPORT', + NOW() + ) + + + + + + DELETE FROM fact_topic_issue_grid_daily + WHERE customer_id = #{customerId} + AND date_id = #{dateId} + LIMIT 1000 + + + + + DELETE FROM fact_topic_status_agency_daily + WHERE customer_id = #{customerId} + AND date_id = #{dateId} + LIMIT 1000 + + + + + INSERT INTO fact_topic_status_agency_daily + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PID, + DATE_ID, + WEEK_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + TOPIC_STATUS_ID, + TOPIC_COUNT, + TOPIC_PROPORTION, + TOPIC_INCREMENT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + + ( + REPLACE(UUID(), '-', ''), + #{i.customerId}, + #{i.agencyId}, + #{i.pid}, + #{i.dateId}, + #{i.weekId}, + #{i.monthId}, + #{i.quarterId}, + #{i.yearId}, + #{i.topicStatusId}, + #{i.topicCount}, + #{i.topicProportion}, + #{i.topicIncrement}, + 0, + 0, + 'BASE_REPORT', + NOW(), + 'BASE_REPORT', + NOW() + ) + + + + + + INSERT INTO fact_topic_status_grid_daily + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + DATE_ID, + WEEK_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + TOPIC_STATUS_ID, + TOPIC_COUNT, + TOPIC_PROPORTION, + TOPIC_INCREMENT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + + ( + REPLACE(UUID(), '-', ''), + #{i.customerId}, + #{i.agencyId}, + #{i.gridId}, + #{i.dateId}, + #{i.weekId}, + #{i.monthId}, + #{i.quarterId}, + #{i.yearId}, + #{i.topicStatusId}, + #{i.topicCount}, + #{i.topicProportion}, + #{i.topicIncrement}, + 0, + 0, + 'BASE_REPORT', + NOW(), + 'BASE_REPORT', + NOW() + ) + + + + + + DELETE FROM fact_topic_status_grid_daily + WHERE customer_id = #{customerId} + AND date_id = #{dateId} + LIMIT 1000 +