diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java
new file mode 100644
index 0000000000..9718304450
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.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.dto.plugins;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 工作日志资源字典表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+@Data
+public class ScreenCustomerWorkRecordDictDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键(客户每次上传,直接根据customerId全删全增)
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至日期eg:20200101
+ */
+ private String dateId;
+
+ /**
+ * 资源id
+ */
+ private String dictId;
+
+ /**
+ * 父资源ID;如果是一级分类pid=0
+ */
+ private String pid;
+
+ /**
+ * 资源类型
+ */
+ private String resourceType;
+
+ /**
+ * 资源编码
+ */
+ private String resourceCode;
+
+ /**
+ * 资源标签名
+ */
+ private String resourceLabel;
+
+ /**
+ * 显示标识:0否,1是
+ */
+ private String showFlag;
+
+ /**
+ * 排序
+ */
+ private Integer sort;
+
+ /**
+ * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中
+ */
+ private String dataType;
+
+ /**
+ * 当前资源属于几级,例如:1、2、3、4....
+ */
+ private Integer level;
+
+ /**
+ * 逻辑删除标识
+ */
+ 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java
new file mode 100644
index 0000000000..77e3d81cf6
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java
@@ -0,0 +1,121 @@
+/**
+ * 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.plugins;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 工作日志-网格按月统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+@Data
+public class ScreenWorkRecordGridMonthlyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID 主键
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 月份Id:yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 网格所属的组织id
+ */
+ private String agencyId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 当前组织参与的总次数
+ */
+ private Integer participateTotal;
+
+ /**
+ * 总的参与次数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人次
+ */
+ private Integer avgParticipateUserTotal;
+
+ /**
+ * 删除标识 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-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java
new file mode 100644
index 0000000000..140fdf97a3
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java
@@ -0,0 +1,121 @@
+/**
+ * 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.plugins;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 工作日志-组织按月统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+@Data
+public class ScreenWorkRecordOrgMonthlyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID 主键
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 月份Id:yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 组织Id
+ */
+ private String orgId;
+
+ /**
+ * 当前组织所属上级组织,如果是跟组织,此列为0
+ */
+ private String parentId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 当前组织参与的总次数
+ */
+ private Integer participateTotal;
+
+ /**
+ * 总的参与次数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人次
+ */
+ private Integer avgParticipateUserTotal;
+
+ /**
+ * 删除标识 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-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java
index 12c26d4210..a8d08bd080 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java
@@ -1,7 +1,20 @@
package com.epmet.controller.plugins;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.alibaba.fastjson.JSON;
+import com.epmet.commons.tools.exception.ValidateException;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO;
+import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO;
+import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService;
+import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService;
+import com.epmet.service.plugins.impl.ScreenWorkRecordOrgMonthlyServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
/**
* 工作日志数据采集
@@ -11,6 +24,74 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("plugins/workrecord")
+@Slf4j
public class WorkRecordColController {
- //todo
+
+ @Autowired
+ ScreenCustomerWorkRecordDictService dictService;
+ @Autowired
+ ScreenWorkRecordGridMonthlyService gridMonthlyService;
+ @Autowired
+ ScreenWorkRecordOrgMonthlyServiceImpl orgMonthlyService;
+
+ /**
+ * @Description 【工作日志】客户资源字典信息上传
+ *
+ * 按月上传工作日志统计数据时,同步调用此接口上传字典信息
+ * @param customerId
+ * @param data
+ * @return com.epmet.commons.tools.utils.Result
+ * @author wangc
+ * @date 2021.02.04 16:16
+ */
+ @PostMapping("resource-dict")
+ public Result resourceDict(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){
+ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) ||
+ StringUtils.isBlank(data.getDateId())) {
+ log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data));
+ throw new ValidateException("客户Id、上传数据列表、日期Id不可为空");
+ }
+ dictService.collect(customerId,data);
+ return new Result();
+ }
+
+ /**
+ * @Description 【工作日志】网格按月统计
+ * @param customerId
+ * @param data
+ * @return com.epmet.commons.tools.utils.Result
+ * @author wangc
+ * @date 2021.02.04 16:16
+ */
+ @PostMapping("grid-monthly")
+ public Result collectGrid(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){
+ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) ||
+ StringUtils.isBlank(data.getMonthId())) {
+ log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data));
+ throw new ValidateException("客户Id、上传数据列表、月份Id不可为空");
+ }
+ gridMonthlyService.collect(customerId,data);
+ return new Result();
+ }
+
+ /**
+ * @Description 【工作日志】组织按月统计
+ * @param customerId
+ * @param data
+ * @return com.epmet.commons.tools.utils.Result
+ * @author wangc
+ * @date 2021.02.04 16:16
+ */
+ @PostMapping("org-monthly")
+ public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){
+ if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) ||
+ StringUtils.isBlank(data.getMonthId())) {
+ log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data));
+ throw new ValidateException("客户Id、上传数据列表、月份Id不可为空");
+ }
+ orgMonthlyService.collect(customerId,data);
+ return new Result();
+ }
+
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java
new file mode 100644
index 0000000000..9a1cd92056
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenCustomerWorkRecordDictDao.java
@@ -0,0 +1,41 @@
+/**
+ * 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.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO;
+import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity;
+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 2021-02-04
+ */
+@Mapper
+public interface ScreenCustomerWorkRecordDictDao extends BaseDao {
+
+ int deleteBatch(@Param("customerId") String customerId);
+
+ void insertBatch(@Param("list") List list,@Param("customerId") String customerId,@Param("dateId") String dateId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java
new file mode 100644
index 0000000000..febf60d61a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordGridMonthlyDao.java
@@ -0,0 +1,41 @@
+/**
+ * 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.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity;
+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 2021-02-04
+ */
+@Mapper
+public interface ScreenWorkRecordGridMonthlyDao extends BaseDao {
+
+ int deleteBatch(@Param("customerId") String customerId,@Param("monthId") String monthId);
+
+ void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
new file mode 100644
index 0000000000..ccf7baed54
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
@@ -0,0 +1,42 @@
+/**
+ * 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.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
+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 2021-02-04
+ */
+@Mapper
+public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao {
+
+ int deleteBatch(@Param("customerId") String customerId, @Param("monthId") String monthId);
+
+ void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("monthId") String monthId);
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.java
new file mode 100644
index 0000000000..067a349205
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenCustomerWorkRecordDictEntity.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.plugins;
+
+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 2021-02-04
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("screen_customer_work_record_dict")
+public class ScreenCustomerWorkRecordDictEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至日期eg:20200101
+ */
+ private String dateId;
+
+ /**
+ * 资源id
+ */
+ private String dictId;
+
+ /**
+ * 父资源ID;如果是一级分类pid=0
+ */
+ private String pid;
+
+ /**
+ * 资源类型
+ */
+ private String resourceType;
+
+ /**
+ * 资源编码
+ */
+ private String resourceCode;
+
+ /**
+ * 资源标签名
+ */
+ private String resourceLabel;
+
+ /**
+ * 显示标识:0否,1是
+ */
+ private String showFlag;
+
+ /**
+ * 排序
+ */
+ private Integer sort;
+
+ /**
+ * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中
+ */
+ private String dataType;
+
+ /**
+ * 当前资源属于几级,例如:1、2、3、4....
+ */
+ private Integer level;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java
new file mode 100644
index 0000000000..47e993fbe8
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordGridMonthlyEntity.java
@@ -0,0 +1,91 @@
+/**
+ * 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.plugins;
+
+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 2021-02-04
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("screen_work_record_grid_monthly")
+public class ScreenWorkRecordGridMonthlyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 月份Id:yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 网格所属的组织id
+ */
+ private String agencyId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 当前组织参与的总次数
+ */
+ private Integer participateTotal;
+
+ /**
+ * 总的参与次数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人次
+ */
+ private Integer avgParticipateUserTotal;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java
new file mode 100644
index 0000000000..b87839daed
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java
@@ -0,0 +1,91 @@
+/**
+ * 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.plugins;
+
+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 2021-02-04
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("screen_work_record_org_monthly")
+public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 月份Id:yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 组织Id
+ */
+ private String orgId;
+
+ /**
+ * 当前组织所属上级组织,如果是跟组织,此列为0
+ */
+ private String parentId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 当前组织参与的总次数
+ */
+ private Integer participateTotal;
+
+ /**
+ * 总的参与次数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人次
+ */
+ private Integer avgParticipateUserTotal;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java
new file mode 100644
index 0000000000..6f5ac2573e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.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.service.plugins;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 工作日志资源字典表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+public interface ScreenCustomerWorkRecordDictService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2021-02-04
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2021-02-04
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return ScreenCustomerWorkRecordDictDTO
+ * @author generator
+ * @date 2021-02-04
+ */
+ ScreenCustomerWorkRecordDictDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void save(ScreenCustomerWorkRecordDictDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void update(ScreenCustomerWorkRecordDictDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void delete(String[] ids);
+
+ /**
+ * @Description 数据录入
+ * @param customerId
+ * @param data
+ * @return void
+ * @author wangc
+ * @date 2021.02.04 15:27
+ */
+ void collect(String customerId, ScreenCollFormDTO data);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.java
new file mode 100644
index 0000000000..45622e29fd
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordGridMonthlyService.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.service.plugins;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 工作日志-网格按月统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+public interface ScreenWorkRecordGridMonthlyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2021-02-04
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2021-02-04
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return ScreenWorkRecordGridMonthlyDTO
+ * @author generator
+ * @date 2021-02-04
+ */
+ ScreenWorkRecordGridMonthlyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void save(ScreenWorkRecordGridMonthlyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void update(ScreenWorkRecordGridMonthlyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void delete(String[] ids);
+
+ /**
+ * @Description 数据录入
+ * @param customerId
+ * @param data
+ * @return void
+ * @author wangc
+ * @date 2021.02.04 15:27
+ */
+ void collect(String customerId, ScreenCollFormDTO data);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java
new file mode 100644
index 0000000000..a9368a66bc
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.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.service.plugins;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 工作日志-组织按月统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-04
+ */
+public interface ScreenWorkRecordOrgMonthlyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2021-02-04
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2021-02-04
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return ScreenWorkRecordOrgMonthlyDTO
+ * @author generator
+ * @date 2021-02-04
+ */
+ ScreenWorkRecordOrgMonthlyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void save(ScreenWorkRecordOrgMonthlyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void update(ScreenWorkRecordOrgMonthlyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2021-02-04
+ */
+ void delete(String[] ids);
+
+ /**
+ * @Description 数据录入
+ * @param customerId
+ * @param data
+ * @return void
+ * @author wangc
+ * @date 2021.02.04 15:27
+ */
+ void collect(String customerId, ScreenCollFormDTO data);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java
new file mode 100644
index 0000000000..31a0cd49ee
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java
@@ -0,0 +1,122 @@
+/**
+ * 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.plugins.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.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.plugins.ScreenCustomerWorkRecordDictDao;
+import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenCustomerWorkRecordDictEntity;
+import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService;
+import com.google.common.collect.Lists;
+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 2021-02-04
+ */
+@Service
+public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl implements ScreenCustomerWorkRecordDictService {
+
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ScreenCustomerWorkRecordDictDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, ScreenCustomerWorkRecordDictDTO.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 ScreenCustomerWorkRecordDictDTO get(String id) {
+ ScreenCustomerWorkRecordDictEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ScreenCustomerWorkRecordDictDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ScreenCustomerWorkRecordDictDTO dto) {
+ ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ScreenCustomerWorkRecordDictDTO dto) {
+ ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Transactional(rollbackFor = Exception.class)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
+ @Override
+ public void collect(String customerId, ScreenCollFormDTO data) {
+ if(data.getIsFirst()){
+ int affectedRows = baseDao.deleteBatch(customerId);
+ while(affectedRows > 0){
+ affectedRows = baseDao.deleteBatch(customerId);
+ }
+ }
+ Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> {
+ baseDao.insertBatch(list,customerId,data.getDateId());
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.java
new file mode 100644
index 0000000000..424cdd9a2b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordGridMonthlyServiceImpl.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.service.plugins.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.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.dao.plugins.ScreenWorkRecordGridMonthlyDao;
+import com.epmet.dto.plugins.ScreenWorkRecordGridMonthlyDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordGridMonthlyEntity;
+import com.epmet.service.plugins.ScreenWorkRecordGridMonthlyService;
+import com.google.common.collect.Lists;
+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 2021-02-04
+ */
+@Service
+public class ScreenWorkRecordGridMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordGridMonthlyService {
+
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ScreenWorkRecordGridMonthlyDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordGridMonthlyDTO.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 ScreenWorkRecordGridMonthlyDTO get(String id) {
+ ScreenWorkRecordGridMonthlyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordGridMonthlyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ScreenWorkRecordGridMonthlyDTO dto) {
+ ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ScreenWorkRecordGridMonthlyDTO dto) {
+ ScreenWorkRecordGridMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordGridMonthlyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ /**
+ * @Description 数据录入
+ * @param customerId
+ * @param data
+ * @return void
+ * @author wangc
+ * @date 2021.02.04 15:27
+ */
+ @Override
+ public void collect(String customerId, ScreenCollFormDTO data) {
+ if(data.getIsFirst()){
+ int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId());
+ while(affectedRows > 0){
+ affectedRows = baseDao.deleteBatch(customerId,data.getMonthId());
+ }
+ }
+ Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> {
+ baseDao.insertBatch(list,customerId,data.getMonthId());
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java
new file mode 100644
index 0000000000..b28da6d953
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.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.service.plugins.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.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.dao.plugins.ScreenWorkRecordOrgMonthlyDao;
+import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
+import com.epmet.service.plugins.ScreenWorkRecordOrgMonthlyService;
+import com.google.common.collect.Lists;
+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 2021-02-04
+ */
+@Service
+public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgMonthlyService {
+
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.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 ScreenWorkRecordOrgMonthlyDTO get(String id) {
+ ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ScreenWorkRecordOrgMonthlyDTO dto) {
+ ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ScreenWorkRecordOrgMonthlyDTO dto) {
+ ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ /**
+ * @Description 数据录入
+ * @param customerId
+ * @param data
+ * @return void
+ * @author wangc
+ * @date 2021.02.04 15:27
+ */
+ @Override
+ public void collect(String customerId, ScreenCollFormDTO data) {
+ if(data.getIsFirst()){
+ int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId());
+ while(affectedRows > 0){
+ affectedRows = baseDao.deleteBatch(customerId,data.getMonthId());
+ }
+ }
+ Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> {
+ baseDao.insertBatch(list,customerId,data.getMonthId());
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml
new file mode 100644
index 0000000000..732a6c9c13
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO screen_customer_work_record_dict
+ (
+ id,
+ customer_id,
+ date_id,
+ dict_id,
+ pid,
+ resource_type,
+ resource_code,
+ resource_label,
+ show_flag,
+ sort,
+ data_type,
+ `level`,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+
+ #{customerId},
+
+ #{dateId},
+
+ #{item.dictId},
+
+ #{item.pid},
+
+ #{item.resourceType},
+
+ #{item.resourceCode},
+
+ #{item.resourceLabel},
+
+ #{item.showFlag},
+
+ #{item.closedTotal},
+
+ #{item.sort},
+
+ #{item.dataType},
+
+ #{item.level},
+
+ '0',
+
+ 0,
+
+ 'APP_USER',
+
+ now(),
+
+ 'APP_USER',
+
+ now()
+ )
+
+
+
+
+ delete from screen_customer_work_record_dict
+ where customer_id = #{customerId}
+ limit 1000
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml
new file mode 100644
index 0000000000..02ecd54811
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordGridMonthlyDao.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO screen_work_record_grid_monthly
+ (
+ id,
+ customer_id,
+ month_id,
+ grid_id,
+ agency_id,
+ meeting_code,
+ type_code,
+ organize_total,
+ participate_total,
+ participate_user_total,
+ avg_participate_user_total,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+
+ #{customerId},
+
+ #{monthId},
+
+ #{item.gridId},
+
+ #{item.agencyId},
+
+ #{item.meetingCode},
+
+ #{item.typeCode},
+
+ #{item.organizeTotal},
+
+ #{item.participateTotal},
+
+ #{item.participateUserTotal},
+
+ #{item.avgParticipateUserTotal},
+
+ '0',
+
+ 0,
+
+ 'APP_USER',
+
+ now(),
+
+ 'APP_USER',
+
+ now()
+ )
+
+
+
+
+ delete from screen_work_record_grid_monthly
+ where customer_id = #{customerId}
+ and month_id = #{monthId}
+ limit 1000
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml
new file mode 100644
index 0000000000..12a966d066
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO screen_work_record_org_monthly
+ (
+ id,
+ customer_id,
+ month_id,
+ org_id,
+ parent_id,
+ meeting_code,
+ type_code,
+ organize_total,
+ participate_total,
+ participate_user_total,
+ avg_participate_user_total,
+ del_flag,
+ revision,
+ created_by,
+ created_time,
+ updated_by,
+ updated_time
+ ) values
+
+ (
+ (SELECT REPLACE(UUID(), '-', '') AS id),
+
+ #{customerId},
+
+ #{monthId},
+
+ #{item.orgId},
+
+ #{item.parentId},
+
+ #{item.meetingCode},
+
+ #{item.typeCode},
+
+ #{item.organizeTotal},
+
+ #{item.participateTotal},
+
+ #{item.participateUserTotal},
+
+ #{item.avgParticipateUserTotal},
+
+ '0',
+
+ 0,
+
+ 'APP_USER',
+
+ now(),
+
+ 'APP_USER',
+
+ now()
+ )
+
+
+
+
+ delete from screen_work_record_org_monthly
+ where customer_id = #{customerId}
+ and month_id = #{monthId}
+ limit 1000
+
+
+
+
+
\ No newline at end of file