+ * 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.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.datareport.dao.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 工作日志资源字典表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-23
+ */
+@Mapper
+public interface ScreenCustomerWorkRecordDictDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
new file mode 100644
index 0000000000..8a0daa8f53
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.datareport.dao.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity;
+import com.epmet.plugins.result.WorkRecordSubRank;
+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-23
+ */
+@Mapper
+public interface ScreenWorkRecordOrgDailyDao extends BaseDao {
+ /**
+ * @param areaCode 当前组织对应的areaCode;
+ * @param dataType
+ * @param topRow
+ * @return com.epmet.plugins.result.WorkRecordRankResultDTO
+ * @author yinzuomei
+ * @description 5、【工作日志】本机及下级排名
+ * @Date 2021/2/23 23:37
+ **/
+ List selectSubList(@Param("areaCode") String areaCode,
+ @Param("dataType") String dataType,
+ @Param("topRow") Integer topRow,
+ @Param("dateId")String dateId);
+
+ String selectLatestDateId(String customerId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
new file mode 100644
index 0000000000..5146beb59e
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.datareport.dao.plugins;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 工作日志-组织按月统计(增量)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-23
+ */
+@Mapper
+public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java
new file mode 100644
index 0000000000..a4f5fa180a
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java
@@ -0,0 +1,93 @@
+/**
+ * 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.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.datareport.entity.plugins;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 工作日志-组织按日统计(累计值)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-23
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("screen_work_record_org_daily")
+public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 日期Id:yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 组织Idor网格id
+ */
+ private String orgId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 参与人数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人数
+ */
+ private Integer avgParticipateUserTotal;
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java
new file mode 100644
index 0000000000..c4f2bbb938
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java
@@ -0,0 +1,78 @@
+/**
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.datareport.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.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao;
+import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity;
+import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService;
+import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+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-23
+ */
+@Slf4j
+@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));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
new file mode 100644
index 0000000000..b6939226b7
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.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.
+ *
+ * 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.
+ *
+ * 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.ScreenWorkRecordCommonFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity;
+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-23
+ */
+@Mapper
+public interface ScreenWorkRecordOrgDailyDao extends BaseDao {
+
+ int deleteBatch(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ 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/ScreenWorkRecordOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
index ccf7baed54..16f4a763e7 100644
--- 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
@@ -18,7 +18,7 @@
package com.epmet.dao.plugins;
import com.epmet.commons.mybatis.dao.BaseDao;
-import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO;
import com.epmet.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -36,7 +36,7 @@ public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao list, @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/ScreenWorkRecordOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java
new file mode 100644
index 0000000000..148c742f91
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenWorkRecordOrgDailyEntity.java
@@ -0,0 +1,78 @@
+/**
+ * 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;
+
+/**
+ * 工作日志-组织按日统计(累计值)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-23
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("screen_work_record_org_daily")
+public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 日期Id:yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 组织Idor网格id
+ */
+ private String orgId;
+
+ /**
+ * 会议类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String meetingCode;
+
+ /**
+ * 随手记类型编码;对应screen_customer_work_record_dict的资源编码
+ */
+ private String typeCode;
+
+ /**
+ * 组织次数
+ */
+ private Integer organizeTotal;
+
+ /**
+ * 参与人数
+ */
+ private Integer participateUserTotal;
+
+ /**
+ * 平均参与人数
+ */
+ private Integer avgParticipateUserTotal;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java
new file mode 100644
index 0000000000..6edbb9ba92
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ *
+ * 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.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.dao.plugins.ScreenWorkRecordOrgDailyDao;
+import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO;
+import com.epmet.dto.screencoll.ScreenCollFormDTO;
+import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity;
+import com.epmet.service.plugins.ScreenWorkRecordOrgDailyService;
+import com.google.common.collect.Lists;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作日志-组织按日统计(累计值)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-02-23
+ */
+@Service
+public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl implements ScreenWorkRecordOrgDailyService {
+
+ @Override
+ public void collectOrgDaily(String customerId, ScreenCollFormDTO data) {
+ if(data.getIsFirst()){
+ int affectedRows = baseDao.deleteBatch(customerId,data.getDateId());
+ while(affectedRows > 0){
+ affectedRows = baseDao.deleteBatch(customerId,data.getDateId());
+ }
+ }
+ 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/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java
index a1264c91ae..20a5417105 100644
--- 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
@@ -17,30 +17,19 @@
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.ScreenWorkRecordOrgMonthlyDao;
-import com.epmet.dto.plugins.ScreenWorkRecordOrgMonthlyDTO;
+import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO;
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;
-
/**
* 工作日志-组织按月统计
*
@@ -50,60 +39,6 @@ import java.util.Map;
@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
@@ -115,7 +50,7 @@ public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl data) {
+ public void collect(String customerId, ScreenCollFormDTO data) {
if(data.getIsFirst()){
int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId());
while(affectedRows > 0){
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
new file mode 100644
index 0000000000..0fd68eddf4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ delete from screen_work_record_org_daily
+ where customer_id = #{customerId}
+ and DATE_ID = #{dateId}
+ limit 1000
+
+
+
+ INSERT INTO screen_work_record_org_daily
+ (
+ id,
+ customer_id,
+ DATE_ID,
+ org_id,
+ meeting_code,
+ type_code,
+ organize_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},
+ #{dateId},
+ #{item.orgId},
+ #{item.meetingCode},
+ #{item.typeCode},
+ #{item.organizeTotal},
+ #{item.participateUserTotal},
+ #{item.avgParticipateUserTotal},
+ '0',
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java
index 037af23936..a5496cecc4 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java
@@ -35,4 +35,5 @@ public interface AreaCodeDao extends BaseDao {
List selectAllArea();
+ AreaCodeDTO selectByCountyCode(String countyCode);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
index 051a431ddd..1360f92778 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
@@ -40,6 +40,7 @@ import com.epmet.entity.AreaCodeEntity;
import com.epmet.redis.AreaCodeRedis;
import com.epmet.service.AreaCodeChildService;
import com.epmet.service.AreaCodeService;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -55,6 +56,7 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-07
*/
+@Slf4j
@Service
public class AreaCodeServiceImpl extends BaseServiceImpl implements AreaCodeService {
@@ -568,6 +570,10 @@ public class AreaCodeServiceImpl extends BaseServiceImpl
- select * from area_code;
+ select * from area_code
+
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java
index 60b5654937..43f50a34c9 100644
--- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java
+++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java
@@ -1,5 +1,6 @@
package com.epmet.service.impl;
+import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
@@ -188,12 +189,13 @@ public class OpenUpServiceImpl implements OpenUpService {
}
//如果有子客户,根据area_code构造权限树
if (!CollectionUtils.isEmpty(crmResult.getData())) {
+ log.warn(String.format("当前客户id%s,子客户列表%s", formDTO.getCustomerId(), JSON.toJSONString(crmResult)));
Result dataStatResult=dataReportOpenFeignClient.queryStaffAgencyTree(formDTO.getAgencyId());
if (!dataStatResult.success() && null == dataStatResult) {
throw new RenException("调用data-stats服务的XXX接口异常"+dataStatResult.getInternalMsg());
}
StaffPermissionResultDTO resultDTO = new StaffPermissionResultDTO();
- resultDTO.setCustomerIds(Arrays.asList());
+ resultDTO.setCustomerIds(crmResult.getData());
resultDTO.setAgencyTree(ConvertUtils.sourceToTarget(dataStatResult.getData(), AgencyNodeDTO.class));
return resultDTO;
}