+ * 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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.LogOperationEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 操作日指标
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Mapper
+public interface LogOperationDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java
new file mode 100644
index 0000000000..3bbbb75841
--- /dev/null
+++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dataaggre.dao.epmetuser;
+
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolDetailEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Mapper
+public interface StaffPatrolDetailDao extends BaseDao {
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
new file mode 100644
index 0000000000..5c6cb03bdb
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
@@ -0,0 +1,44 @@
+/**
+ * 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.dataaggre.dao.epmetuser;
+
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
+import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Mapper
+public interface StaffPatrolRecordDao extends BaseDao {
+
+ /**
+ * @Description 按条件查询巡查业务数据
+ * @author sun
+ */
+ List selectPatrolList(StaffListFormDTO formDTO);
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
index 1da9910104..cc73cc2c1f 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
@@ -18,6 +18,7 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.result.GridInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO;
import com.epmet.dataaggre.entity.govorg.CustomerGridEntity;
@@ -54,4 +55,11 @@ public interface CustomerGridDao extends BaseDao {
* @Description 根据组织Id查询当前组织下所有网格列表
**/
List selectGridListByAgencyId(@Param("agencyId") String agencyId);
+
+ /**
+ * @param staffId
+ * @Author sun
+ * @Description 查询工作人员所属组织下网格列表
+ **/
+ List gridListByStaffId(@Param("staffId") String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolDetailEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolDetailEntity.java
new file mode 100644
index 0000000000..c74f88b459
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolDetailEntity.java
@@ -0,0 +1,101 @@
+/**
+ * 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.dataaggre.service.epmetuser;
+
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolDetailEntity;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolDetailService extends BaseService {
+
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolRecordService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolRecordService.java
new file mode 100644
index 0000000000..c2cfcdd450
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolRecordService.java
@@ -0,0 +1,32 @@
+/**
+ * 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.dataaggre.service.epmetuser;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolRecordEntity;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolRecordService extends BaseService {
+
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
index 2dac9b0ccd..301b3ff441 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
@@ -1,15 +1,25 @@
package com.epmet.dataaggre.service.epmetuser.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
+import com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao;
import com.epmet.dataaggre.dao.epmetuser.UserBaseInfoDao;
+import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
+import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO;
+import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
+import com.epmet.dataaggre.service.govorg.GovOrgService;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* @Author zxc
@@ -22,6 +32,10 @@ public class EpmetUserServiceImpl implements EpmetUserService {
@Autowired
private UserBaseInfoDao userBaseInfoDao;
+ @Autowired
+ private GovOrgService govOrgService;
+ @Autowired
+ private StaffPatrolRecordDao staffPatrolRecordDao;
/**
* @Description 根据UserIds查询
@@ -44,4 +58,40 @@ public class EpmetUserServiceImpl implements EpmetUserService {
public List selectUserIdByCustomerId(List userIds) {
return userBaseInfoDao.selectUserIdByCustomerId(userIds);
}
+
+ /**
+ * @Param formDTO
+ * @Description 001、各人员巡查记录列表查询
+ * @author sun
+ */
+ @Override
+ public List staffList(StaffListFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ //1.设置分页参数
+ int num = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
+ formDTO.setPageNo(num);
+
+ //2.查询当前人员所属组织下网格列表数据,供后续使用
+ List list = govOrgService.gridListByStaffId(formDTO.getUserId());
+ if (list.size() < NumConstant.ONE) {
+ return resultList;
+ }
+ //网格集合为空则查询当前人员所属组织下网格列表
+ if (CollectionUtils.isEmpty(formDTO.getGridIds())) {
+ formDTO.setGridIds(list.stream().map(CustomerGridDTO::getId).collect(Collectors.toList()));
+ }
+
+ //3.按条件查询巡查业务数据
+ formDTO.setPatrolStartTime(DateUtils.getBeforeMonthDate(formDTO.getTime()));
+ resultList = staffPatrolRecordDao.selectPatrolList(formDTO);
+ if (resultList.size() < NumConstant.ONE) {
+ return new ArrayList<>();
+ }
+
+ //4.封装数据并返回
+ resultList.forEach(re -> list.stream().filter(l -> re.getGridId().equals(l.getId())).forEach(s -> re.setGridName(s.getGridName())));
+ return resultList;
+ }
+
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolDetailServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolDetailServiceImpl.java
new file mode 100644
index 0000000000..fad170f41f
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolDetailServiceImpl.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.dataaggre.service.epmetuser.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dataaggre.constant.DataSourceConstant;
+import com.epmet.dataaggre.dao.epmetuser.StaffPatrolDetailDao;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolDetailEntity;
+import com.epmet.dataaggre.service.epmetuser.StaffPatrolDetailService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@DataSource(DataSourceConstant.EPMET_USER)
+@Slf4j
+@Service
+public class StaffPatrolDetailServiceImpl extends BaseServiceImpl implements StaffPatrolDetailService {
+
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolRecordServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolRecordServiceImpl.java
new file mode 100644
index 0000000000..f245db7138
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolRecordServiceImpl.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.dataaggre.service.epmetuser.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dataaggre.constant.DataSourceConstant;
+import com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao;
+import com.epmet.dataaggre.entity.epmetuser.StaffPatrolRecordEntity;
+import com.epmet.dataaggre.service.epmetuser.StaffPatrolRecordService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@DataSource(DataSourceConstant.EPMET_USER)
+@Slf4j
+@Service
+public class StaffPatrolRecordServiceImpl extends BaseServiceImpl implements StaffPatrolRecordService {
+
+
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
index 916044b1f3..c79837ec60 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
@@ -1,5 +1,6 @@
package com.epmet.dataaggre.service.govorg;
+import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.result.AgencyGridResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridInfoResultDTO;
@@ -48,4 +49,11 @@ public interface GovOrgService {
List queryNextLevelAreaCodeList(NextAreaCodeFormDTO formDTO);
List queryNextOrgInfoDTO(String customerId, String orgId);
+
+ /**
+ * @param staffId
+ * @Author sun
+ * @Description 查询工作人员所属组织下网格列表
+ **/
+ List gridListByStaffId(String staffId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
index ec45f0419f..e3c9752a00 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
@@ -9,6 +9,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.govorg.CustomerAgencyDao;
import com.epmet.dataaggre.dao.govorg.CustomerGridDao;
import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao;
+import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.result.AgencyGridResultDTO;
@@ -225,5 +226,16 @@ public class GovOrgServiceImpl implements GovOrgService {
System.out.println(JSON.toJSONString(allList, true));
}
+ /**
+ * @param staffId
+ * @Author sun
+ * @Description 查询工作人员所属组织下网格列表
+ **/
+ @Override
+ public List gridListByStaffId(String staffId) {
+ //网格名是拼接上两级组织名称
+ List resultList = customerGridDao.gridListByStaffId(staffId);
+ return resultList;
+ }
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
index fafc989776..fb5757da88 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
@@ -360,18 +360,18 @@
SELECT
orgId,
orgName,
- GROUP_COUNT,
- GROUP_RATIO,
- GROUP_MEMBER_COUNT,
- GROUP_MEMBER_RATIO,
- TOPIC_COUNT,
- TOPIC_RATIO,
- ISSUE_COUNT,
- ISSUE_RATIO,
- PROJECT_COUNT,
- PROJECT_RATIO,
- PROJECT_CLOSED_COUNT,
- PROJECT_CLOSED_RATIO
+ ifnull(GROUP_COUNT,0) AS GROUP_COUNT,
+ ifnull(GROUP_RATIO,0) AS GROUP_RATIO,
+ ifnull(GROUP_MEMBER_COUNT,0) AS GROUP_MEMBER_COUNT,
+ ifnull(GROUP_MEMBER_RATIO,0) AS GROUP_MEMBER_RATIO,
+ ifnull(TOPIC_COUNT,0) AS TOPIC_COUNT,
+ ifnull(TOPIC_RATIO,0) AS TOPIC_RATIO,
+ ifnull(ISSUE_COUNT,0) AS ISSUE_COUNT,
+ ifnull(ISSUE_RATIO,0) AS ISSUE_RATIO,
+ ifnull(PROJECT_COUNT,0) AS PROJECT_COUNT,
+ ifnull(PROJECT_RATIO,0) AS PROJECT_RATIO,
+ ifnull(PROJECT_CLOSED_COUNT,0) AS PROJECT_CLOSED_COUNT,
+ ifnull(PROJECT_CLOSED_RATIO,0) PROJECT_CLOSED_RATIO
FROM
(
SELECT
@@ -403,18 +403,18 @@
SELECT
orgId,
orgName,
- GROUP_COUNT,
- GROUP_RATIO,
- GROUP_MEMBER_COUNT,
- GROUP_MEMBER_RATIO,
- TOPIC_COUNT,
- TOPIC_RATIO,
- ISSUE_COUNT,
- ISSUE_RATIO,
- PROJECT_COUNT,
- PROJECT_RATIO,
- PROJECT_CLOSED_COUNT,
- PROJECT_CLOSED_RATIO
+ ifnull(GROUP_COUNT,0) AS GROUP_COUNT,
+ ifnull(GROUP_RATIO,0) AS GROUP_RATIO,
+ ifnull(GROUP_MEMBER_COUNT,0) AS GROUP_MEMBER_COUNT,
+ ifnull(GROUP_MEMBER_RATIO,0) AS GROUP_MEMBER_RATIO,
+ ifnull(TOPIC_COUNT,0) AS TOPIC_COUNT,
+ ifnull(TOPIC_RATIO,0) AS TOPIC_RATIO,
+ ifnull(ISSUE_COUNT,0) AS ISSUE_COUNT,
+ ifnull(ISSUE_RATIO,0) AS ISSUE_RATIO,
+ ifnull(PROJECT_COUNT,0) AS PROJECT_COUNT,
+ ifnull(PROJECT_RATIO,0) AS PROJECT_RATIO,
+ ifnull(PROJECT_CLOSED_COUNT,0) AS PROJECT_CLOSED_COUNT,
+ ifnull(PROJECT_CLOSED_RATIO,0) AS PROJECT_CLOSED_RATIO
FROM
(
SELECT
@@ -654,4 +654,4 @@
ORDER BY problem_resolved_count DESC
-
\ No newline at end of file
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolDetailDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolDetailDao.xml
new file mode 100644
index 0000000000..c06344967c
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolDetailDao.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
new file mode 100644
index 0000000000..a0f8a495e0
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
index 331246a2f5..3d00ea3cd4 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
@@ -52,4 +52,38 @@
AND pid = #{agencyId}
+
+
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolDetailDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolDetailDTO.java
new file mode 100644
index 0000000000..a5f33265d5
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolDetailDTO.java
@@ -0,0 +1,131 @@
+/**
+ * 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.datareport.dao.user;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.user.StaffPatrolDetailEntity;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+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-06-07
+ */
+@Mapper
+public interface StaffPatrolDetailDao extends BaseDao {
+
+ /**
+ * @Description 查询巡查轨迹
+ * @Param staffPatrolRecId
+ * @author zxc
+ * @date 2021/6/7 5:13 下午
+ */
+ List selectPatrolTrack(@Param("staffPatrolRecId") String staffPatrolRecId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolRecordDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolRecordDao.java
new file mode 100644
index 0000000000..19849b856b
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolRecordDao.java
@@ -0,0 +1,55 @@
+/**
+ * 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.user;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.user.StaffPatrolRecordEntity;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.user.result.GridManagerListResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+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-06-07
+ */
+@Mapper
+public interface StaffPatrolRecordDao extends BaseDao {
+
+ /**
+ * @Description 巡查记录查询
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 5:29 下午
+ */
+ List recordList(RecordListFormDTO formDTO);
+
+ /**
+ * @Description 查询经纬度
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 10:24 上午
+ */
+ List selectLL(@Param("userIds")List userIds);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolDetailEntity.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolDetailEntity.java
new file mode 100644
index 0000000000..fd00e1b58f
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolDetailEntity.java
@@ -0,0 +1,101 @@
+/**
+ * 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.user;
+
+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-06-07
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("staff_patrol_record")
+public class StaffPatrolRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 网格id
+ */
+ private String grid;
+
+ /**
+ * 网格所有上级id
+ */
+ private String gridPids;
+
+ /**
+ * 工作人员用户id
+ */
+ private String staffId;
+
+ /**
+ * 工作人员所属组织id=网格所属的组织id
+ */
+ private String agencyId;
+
+ /**
+ * 巡查开始时间
+ */
+ private Date patrolStartTime;
+
+ /**
+ * 巡查结束时间,前端传入
+ */
+ private Date patrolEndTime;
+
+ /**
+ * 实际结束时间=操作结束巡查的时间
+ */
+ private Date actrualEndTime;
+
+ /**
+ * 本次巡查总耗时,单位秒;结束巡查时写入
+ */
+ private Integer totalTime;
+
+ /**
+ * 正在巡查中:patrolling;结束:end
+ */
+ private String status;
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenOrgService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenOrgService.java
new file mode 100644
index 0000000000..3de2656f69
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenOrgService.java
@@ -0,0 +1,23 @@
+package com.epmet.datareport.service.evaluationindex.screen;
+
+import com.epmet.user.result.GridManagerListResultDTO;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/8 10:45 上午
+ * @DESC
+ */
+public interface ScreenOrgService {
+
+ /**
+ * @Description 查询组织下的所有网格
+ * @Param agencyId
+ * @Param areaCode
+ * @author zxc
+ * @date 2021/6/8 10:46 上午
+ */
+ List selectAllGrid(String agencyId,String areaCode);
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
index 4fc1974446..5510d056c5 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
@@ -147,7 +147,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
screenUserJoinDao.selectUserJoinDataByAreaCode(agencyInfo.getAreaCode(),monthId);
//保证获取公众参与概率数据的最大可能性
int time = NumConstant.TWELVE;
- while (null == latest && time > NumConstant.ONE) {
+ while ((null == latest || latest.getId() == null) && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
latest = CollectionUtils.isEmpty(subCustomers)||StringUtils.isBlank(agencyInfo.getAreaCode()) ?
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
index 54b0b797be..3173e1269e 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
@@ -164,7 +164,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO();
//生成近十二个月的横坐标数组
Map monthMap = dateUtils.getXpro();
- result.setXAxis(monthMap.values().stream().collect(Collectors.toList()));
+ result.setXAxis(new ArrayList<>(monthMap.values()));
List dataArray = new LinkedList<>();
List yearlyDataList =
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenOrgServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenOrgServiceImpl.java
new file mode 100644
index 0000000000..c387350d34
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenOrgServiceImpl.java
@@ -0,0 +1,44 @@
+package com.epmet.datareport.service.evaluationindex.screen.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
+import com.epmet.datareport.service.evaluationindex.screen.ScreenOrgService;
+import com.epmet.user.result.GridManagerListResultDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/8 10:45 上午
+ * @DESC
+ */
+@Service
+@Slf4j
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
+public class ScreenOrgServiceImpl implements ScreenOrgService {
+
+ @Autowired
+ private ScreenCustomerAgencyDao agencyDao;
+
+ /**
+ * @Description 查询组织下的所有网格
+ * @Param agencyId
+ * @Param areaCode
+ * @author zxc
+ * @date 2021/6/8 10:46 上午
+ */
+ @Override
+ public List selectAllGrid(String agencyId,String areaCode) {
+ List result = agencyDao.selectGrid(agencyId, areaCode);
+ if (!CollectionUtils.isEmpty(result)){
+ return result;
+ }
+ return new ArrayList<>();
+ }
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolDetailService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolDetailService.java
new file mode 100644
index 0000000000..98260990a3
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolDetailService.java
@@ -0,0 +1,44 @@
+package com.epmet.datareport.service.user;
+
+import com.epmet.user.form.GridManagerListFormDTO;
+import com.epmet.dto.form.PatrolTrackFormDTO;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.user.result.GridManagerListResultDTO;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+
+import java.util.List;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolDetailService{
+
+ /**
+ * @Description 001、网格员分布
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:06 下午
+ */
+ List gridManagerList(GridManagerListFormDTO formDTO);
+
+ /**
+ * @Description 002、查看巡查记录
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:25 下午
+ */
+ List recordList(RecordListFormDTO formDTO);
+
+ /**
+ * @Description 003、巡查轨迹
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:35 下午
+ */
+ List patrolTrack(PatrolTrackFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolRecordService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolRecordService.java
new file mode 100644
index 0000000000..e1d15008e5
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolRecordService.java
@@ -0,0 +1,14 @@
+package com.epmet.datareport.service.user;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.datareport.entity.user.StaffPatrolRecordEntity;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolRecordService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java
new file mode 100644
index 0000000000..fb205ff276
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java
@@ -0,0 +1,194 @@
+package com.epmet.datareport.service.user.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.datareport.constant.PatrolConstant;
+import com.epmet.datareport.dao.user.StaffPatrolDetailDao;
+import com.epmet.datareport.dao.user.StaffPatrolRecordDao;
+import com.epmet.datareport.service.evaluationindex.screen.ScreenOrgService;
+import com.epmet.datareport.service.user.StaffPatrolDetailService;
+import com.epmet.dto.result.GridStaffResultDTO;
+import com.epmet.dto.result.UserNameAndLLResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.feign.GovOrgOpenFeignClient;
+import com.epmet.user.form.GridManagerListFormDTO;
+import com.epmet.dto.form.PatrolTrackFormDTO;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.user.result.GridManagerListResultDTO;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Service
+@Slf4j
+public class StaffPatrolDetailServiceImpl implements StaffPatrolDetailService {
+
+ @Autowired
+ private StaffPatrolDetailDao staffPatrolDetailDao;
+
+ @Autowired
+ private StaffPatrolRecordDao staffPatrolRecordDao;
+
+ @Autowired
+ private ScreenOrgService screenOrgService;
+
+ @Autowired
+ private GovOrgOpenFeignClient govOrgOpenFeignClient;
+
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @Description 001、网格员分布
+ * 1.根据agencyId或者areaCode查询出网格
+ * 2.根据查出来的网格ID去查网格下边的人【人只要网格员】
+ * 3.根据userId查询巡查记录表
+ * 4.数据补全
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:06 下午
+ */
+ @Override
+ public List gridManagerList(GridManagerListFormDTO formDTO) {
+ List grids = new ArrayList<>();
+ if (StringUtils.isEmpty(formDTO.getAreaCode())){
+ // 根据agencyId查询网格
+ grids = screenOrgService.selectAllGrid(formDTO.getAgencyId(), null);
+ }else {
+ // 根据areaCode查询网格
+ grids = screenOrgService.selectAllGrid(null, formDTO.getAreaCode());
+ }
+ if (CollectionUtils.isEmpty(grids)){
+ return new ArrayList<>();
+ }
+ List gridIds = grids.stream().map(m -> m.getGridId()).collect(Collectors.toList());
+ // 查询网格下的网格员
+ Result> resultData = govOrgOpenFeignClient.selectGridStaffByGridIds(gridIds);
+ if(!resultData.success()){
+ throw new RenException("查询网格下的网格员失败【"+resultData.getMsg()+"】");
+ }
+ List data = resultData.getData();
+ if (CollectionUtils.isEmpty(data)){
+ return new ArrayList<>();
+ }
+ List result = ConvertUtils.sourceToTarget(data, GridManagerListResultDTO.class);
+ // 查询经纬度
+ Result selectll = epmetUserOpenFeignClient.selectll(result.stream().map(m -> m.getStaffId()).collect(Collectors.toList()));
+ if (!selectll.success()){
+ throw new RenException("查询经纬度和姓名失败【"+selectll.getMsg()+"】");
+ }
+ UserNameAndLLResultDTO llAndNameData = selectll.getData();
+ List finalGrids = grids;
+ result.forEach(r -> {
+ // 经纬度赋值 巡查状态赋值
+ if (!CollectionUtils.isEmpty(llAndNameData.getLl())) {
+ llAndNameData.getLl().forEach(l -> {
+ if (r.getStaffId().equals(l.getStaffId()) && r.getGridId().equals(l.getGridId())) {
+ r.setLatitude(l.getLatitude());
+ r.setLongitude(l.getLongitude());
+ r.setStatus(l.getStatus());
+ r.setLlStatus(true);
+ }
+ });
+ }
+ // 姓名赋值
+ if (!CollectionUtils.isEmpty(llAndNameData.getUserNames())){
+ llAndNameData.getUserNames().forEach(n -> {
+ if (r.getStaffId().equals(n.getUserId())){
+ r.setStaffName(n.getUserName());
+ }
+ });
+ }
+ finalGrids.forEach(g -> {
+ if (r.getGridId().equals(g.getGridId())){
+ r.setGridName(g.getGridName());
+ }
+ });
+ });
+ result.forEach(r -> {
+ if (!r.getLlStatus()){
+ finalGrids.forEach(g -> {
+ if (StringUtils.isNotBlank(g.getCenterMark())){
+ r.setLongitude(getLL(g.getCenterMark(),PatrolConstant.LONGITUDE));
+ r.setLatitude(getLL(g.getCenterMark(),PatrolConstant.LATITUDE));
+ }
+ });
+ }
+ });
+ return result;
+ }
+
+ /**
+ * @Description 根据中心点位截取经纬度
+ * @Param centMark
+ * @Param ll
+ * @author zxc
+ * @date 2021/6/9 2:08 下午
+ */
+ public String getLL(String centMark,String ll){
+ if (ll.equals(PatrolConstant.LONGITUDE)){
+ String longitude = centMark.substring(NumConstant.TWO, centMark.indexOf(","));
+ return longitude;
+ }else {
+ String s = centMark.substring(NumConstant.ZERO, centMark.indexOf(","));
+ String latitude = centMark.substring(s.length() + NumConstant.ONE, centMark.length() - NumConstant.TWO);
+ return latitude;
+ }
+ }
+
+ /**
+ * @Description 002、查看巡查记录
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:25 下午
+ */
+ @Override
+ public List recordList(RecordListFormDTO formDTO) {
+ Result> listResult = epmetUserOpenFeignClient.recordList(formDTO);
+ if (!listResult.success()){
+ throw new RenException("查询巡查记录失败【"+listResult.getMsg()+"】");
+ }
+ List result = listResult.getData();
+ if (!CollectionUtils.isEmpty(result)){
+ return result;
+ }
+ return new ArrayList<>();
+ }
+
+ /**
+ * @Description 003、巡查轨迹
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:35 下午
+ */
+ @Override
+ public List patrolTrack(PatrolTrackFormDTO formDTO) {
+ Result> result = epmetUserOpenFeignClient.patrolTrack(formDTO);
+ if (!result.success()){
+ throw new RenException("查询 巡查轨迹失败【"+result.getMsg()+"】");
+ }
+ List results = result.getData();
+ if (!CollectionUtils.isEmpty(results)){
+ return results;
+ }
+ return new ArrayList<>();
+ }
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolRecordServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolRecordServiceImpl.java
new file mode 100644
index 0000000000..35351b5746
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolRecordServiceImpl.java
@@ -0,0 +1,21 @@
+package com.epmet.datareport.service.user.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.datareport.dao.user.StaffPatrolRecordDao;
+import com.epmet.datareport.entity.user.StaffPatrolRecordEntity;
+import com.epmet.datareport.service.user.StaffPatrolRecordService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Service
+@Slf4j
+public class StaffPatrolRecordServiceImpl extends BaseServiceImpl implements StaffPatrolRecordService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
index 328bb2f753..4397b99fd6 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
@@ -320,4 +320,24 @@
+
+
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
index 15a410753b..26c21cd8b1 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
@@ -238,19 +238,9 @@
FROM
screen_index_data_monthly dm
INNER JOIN screen_org_rank_data rd ON dm.org_id = rd.org_id
-
-
-
- INNER JOIN screen_customer_grid org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.GRID_ID = dm.ORG_ID AND org.DEL_FLAG = '0'
-
-
- INNER JOIN screen_customer_agency org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.AGENCY_ID = dm.ORG_ID AND org.DEL_FLAG = '0'
-
-
- INNER JOIN screen_customer_dept org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.DEPT_ID = dm.ORG_ID AND org.DEL_FLAG = '0'
-
-
-
+
+ INNER JOIN screen_customer_grid org ON org.CUSTOMER_ID = dm.CUSTOMER_ID AND org.GRID_ID = dm.ORG_ID AND org.DEL_FLAG = '0'
+
AND dm.month_id = rd.month_id
WHERE
dm.del_flag = '0'
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
index 5af47f5590..de0473571e 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
@@ -28,6 +28,7 @@
SELECT
- AGENCY_ID,
- count( ID ) AS "sum",
- sum(IF( IS_OWNER_PARTY = 1, 1, 0 )) AS "count"
+ a.ID AS AGENCY_ID,
+ count( b.ID ) AS "sum",
+ sum( IF( IS_OWNER_PARTY = 1, 1, 0 )) AS "count"
FROM
- fact_origin_group_main_daily
- WHERE CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
- AND (GROUP_STATE = 'approved' OR GROUP_STATE = 'hidden')
+ dim_agency a
+ INNER JOIN
+ fact_origin_group_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
+ WHERE
+ b.CUSTOMER_ID = #{customerId}
+ AND b.DATE_ID <= #{dateId}
+ AND ( GROUP_STATE = 'approved' OR GROUP_STATE = 'hidden' )
GROUP BY
- AGENCY_ID
+ a.ID
SELECT
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
index c0fb2fb43c..bb5fc4b2e5 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
@@ -29,25 +29,33 @@
SELECT
- a.AGENCY_ID,
+ da.ID AS AGENCY_ID,
COUNT( DISTINCT MEMBER_ID ) AS "sum",
IFNULL( b.partyCount, 0 ) AS "count"
FROM
- fact_origin_group_member_daily a
- LEFT JOIN
- (SELECT
- AGENCY_ID,
- COUNT( DISTINCT MEMBER_ID ) AS partyCount
- FROM fact_origin_group_member_daily
- WHERE IS_PARTY = 1
- AND CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
- GROUP BY AGENCY_ID
- ) b ON a.AGENCY_ID = b.AGENCY_ID
- WHERE a.CUSTOMER_ID = #{customerId}
- AND a.DATE_ID <= #{dateId}
+ dim_agency da
+ INNER JOIN fact_origin_group_member_daily a ON a.PIDS LIKE CONCAT( '%', da.ID, '%' )
+ AND a.CUSTOMER_ID = #{customerId}
+ AND a.DATE_ID <= #{dateId}
+ LEFT JOIN (
+ SELECT
+ agency.ID AS AGENCY_ID,
+ COUNT( DISTINCT MEMBER_ID ) AS partyCount
+ FROM
+ dim_agency agency
+ INNER JOIN fact_origin_group_member_daily member ON member.PIDS LIKE CONCAT( '%', agency.ID, '%' )
+ AND member.IS_PARTY = 1
+ AND member.CUSTOMER_ID = #{customerId}
+ AND member.DATE_ID <= #{dateId}
+ WHERE
+ agency.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ agency.ID
+ ) b ON da.ID = b.AGENCY_ID
+ WHERE
+ da.CUSTOMER_ID = #{customerId}
GROUP BY
- a.AGENCY_ID
+ da.ID
SELECT
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
index a488706d0b..d5bbf0cc29 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
@@ -293,13 +293,18 @@
SELECT
- AGENCY_ID,
- COUNT(ID) AS "sum",
- SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
- FROM fact_origin_issue_main_daily
- WHERE CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
- GROUP BY AGENCY_ID
+ a.ID AS AGENCY_ID,
+ count( b.ID ) AS "sum",
+ sum( IF( IS_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ dim_agency a
+ INNER JOIN
+ fact_origin_issue_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
+ WHERE
+ b.CUSTOMER_ID = #{customerId}
+ AND b.DATE_ID <= #{dateId}
+ GROUP BY
+ a.ID
SELECT
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
index 9213e3c855..c9d6d8bfde 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
@@ -763,14 +763,19 @@
SELECT
- AGENCY_ID,
- COUNT(ID) AS "sum",
- SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
- FROM fact_origin_project_main_daily
- WHERE CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
+ a.ID AS AGENCY_ID,
+ count( b.ID ) AS "sum",
+ sum( IF( IS_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ dim_agency a
+ INNER JOIN
+ fact_origin_project_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
+ WHERE
+ b.CUSTOMER_ID = #{customerId}
+ AND b.DATE_ID <= #{dateId}
AND ORIGIN = 'issue'
- GROUP BY AGENCY_ID
+ GROUP BY
+ a.ID
SELECT
@@ -785,15 +790,20 @@
SELECT
- AGENCY_ID,
- COUNT(ID) AS "sum",
- SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
- FROM fact_origin_project_main_daily
- WHERE CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
+ a.ID AS AGENCY_ID,
+ count( b.ID ) AS "sum",
+ sum( IF( IS_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ dim_agency a
+ INNER JOIN
+ fact_origin_project_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
+ WHERE
+ b.CUSTOMER_ID = #{customerId}
+ AND b.DATE_ID <= #{dateId}
AND PROJECT_STATUS = 'closed'
AND ORIGIN = 'issue'
- GROUP BY AGENCY_ID
+ GROUP BY
+ a.ID
SELECT
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
index 59bc2006c0..2ee9f8afe1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
@@ -192,13 +192,18 @@
SELECT
- AGENCY_ID,
- COUNT(ID) as "sum",
- SUM(IF(CREATE_TOPIC_USER_IS_PARTY = 1 ,1, 0)) as "count"
- FROM fact_origin_topic_main_daily
- WHERE CUSTOMER_ID = #{customerId}
- AND DATE_ID <= #{dateId}
- GROUP BY AGENCY_ID
+ a.ID AS AGENCY_ID,
+ count( b.ID ) AS "sum",
+ sum( IF( CREATE_TOPIC_USER_IS_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ dim_agency a
+ INNER JOIN
+ fact_origin_topic_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
+ WHERE
+ b.CUSTOMER_ID = #{customerId}
+ AND b.DATE_ID <= #{dateId}
+ GROUP BY
+ a.ID
SELECT
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml
index 4e228f3fed..8b205de7ad 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenUserTotalDataDao.xml
@@ -75,6 +75,7 @@
TOPIC_TOTAL,
ISSUE_TOTAL,
PROJECT_TOTAL,
+ GRID_MEMBER_TOTAL,
DEL_FLAG,
REVISION,
CREATED_BY,
@@ -97,6 +98,7 @@
#{item.topicTotal},
#{item.issueTotal},
#{item.projectTotal},
+ #{item.gridMemberTotal},
0,
0,
'CRAWLER_ROBOT',
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
index 771a60ba32..cf3ce06acc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
@@ -126,6 +126,47 @@
and ca.CUSTOMER_ID=#{customerId}
+
+
+
+
+
+
+
+
+
+ SELECT
+ csg.GRID_ID AS orgId,
+ 'grid' AS orgType,
+ csg.USER_ID AS staffId
+ FROM
+ customer_staff_grid csg
+ WHERE
+ csg.DEL_FLAG = '0'
+ AND csg.CUSTOMER_ID = #{customerId}
+ ORDER BY
+ orgType asc,orgId ASC
+
+
+
+ select * from customer_agency ca
+ where ca.DEL_FLAG='0'
+ and ca.CUSTOMER_ID=#{customerId}
+
+
+
+ SELECT
+ distinct csa.USER_ID AS staffId
+ FROM customer_agency ca
+ left join customer_staff_agency csa
+ on(ca.id =csa.AGENCY_ID
+ and csa.DEL_FLAG='0')
+ WHERE
+ ca.DEL_FLAG = '0'
+ AND ca.CUSTOMER_ID = #{customerId}
+ and ca.pids like CONCAT(#{agencyId},'%')
+
+
select *
from customer_agency ca
@@ -150,4 +191,4 @@
AND cd.DEL_FLAG = '0'
)
-
\ No newline at end of file
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
index f30740e0ee..acb6c9feb3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
@@ -528,8 +528,46 @@
user_base_info
WHERE
del_flag = '0'
-
- user_id = #{project.linkName}
+
+ user_id = #{userId}
+
+
+
+
+
+ SELECT
+ count( 1 )
+ FROM
+ staff_role sr
+ WHERE
+ sr.DEL_FLAG = '0'
+ AND sr.CUSTOMER_ID = #{customerId}
+ AND sr.ROLE_ID IN (
+ SELECT
+ m.id AS roleId
+ FROM
+ gov_staff_role m
+ WHERE
+ m.DEL_FLAG = '0'
+ AND m.CUSTOMER_ID = #{customerId}
+ AND m.ROLE_KEY = 'grid_member'
+ )
+ AND sr.STAFF_ID in
+
+ #{staffId}
+
+
+
+ SELECT
+ USER_ID as ID,
+ REAL_NAME AS linkName,
+ MOBILE AS linkMobile
+ FROM
+ customer_staff
+ WHERE
+ del_flag = '0'
+
+ user_id = #{userId}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java
index f5ff55f74e..a8f8c7802d 100644
--- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java
@@ -1,5 +1,6 @@
package com.epmet.task;
+import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.StatsGroupService;
import org.slf4j.Logger;
@@ -28,7 +29,7 @@ public class StatsGroupAgencyDailyTask implements ITask {
if (result.success()){
logger.info("StatsGroupAgencyDailyTask定时任务执行成功");
}else {
- logger.error("StatsGroupAgencyDailyTask定时任务执行失败:" + result.getMsg());
+ logger.error("StatsGroupAgencyDailyTask定时任务执行失败:" , JSON.toJSONString(result));
}
}
}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml
index 20fc7cb138..aa0d5545ed 100644
--- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml
@@ -113,7 +113,7 @@ hystrix:
execution:
isolation:
thread:
- timeoutInMilliseconds: 60000 #缺省为1000
+ timeoutInMilliseconds: 90000 #缺省为1000
ribbon:
ReadTimeout: 300000
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
index 282dc7b711..bc71d2817a 100644
--- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
@@ -1,7 +1,7 @@
package com.epmet.constant;
/**
- * 系统消息类型
+ * 系统消息类型(可以理解为动作,约等于rocket mq中的tag)
*/
public interface SystemMessageType {
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java
index 4e8e7c954a..a6204e07ac 100644
--- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java
@@ -37,7 +37,7 @@ public class SendMqMsgUtil {
}
/**
- * desc: 发送小组成就消息,计算小组成就
+ * desc: 发送项目变动事件消息
*
* @param msgContent
* @return boolean
diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml
index 9cf8dfab0e..6cf052999a 100644
--- a/epmet-module/epmet-message/epmet-message-server/pom.xml
+++ b/epmet-module/epmet-message/epmet-message-server/pom.xml
@@ -125,6 +125,12 @@
epmet-commons-rocketmq2.0.0
+
+
+ com.epmet
+ epmet-auth-client
+ 2.0.0
+
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
index 2051ea1b96..2a97439d20 100644
--- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
@@ -1,6 +1,8 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
+import com.epmet.auth.constants.AuthOperationConstants;
+import com.epmet.auth.constants.AuthOperationEnum;
import com.epmet.commons.rocketmq.constants.TopicConstants;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
@@ -43,7 +45,7 @@ public class SystemMessageServiceImpl implements SystemMessageService {
//发送mq消息
try {
- Message meMessage = new Message(getTopicByMsgType(messageType), contentStr.getBytes(RemotingHelper.DEFAULT_CHARSET));
+ Message meMessage = new Message(getTopicByMsgType(messageType), messageType, contentStr.getBytes(RemotingHelper.DEFAULT_CHARSET));
rocketMQTemplate.getProducer().send(meMessage);
} catch (Exception e) {
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e);
@@ -70,6 +72,12 @@ public class SystemMessageServiceImpl implements SystemMessageService {
case SystemMessageType.GROUP_ACHIEVEMENT:
topic = TopicConstants.GROUP_ACHIEVEMENT;
break;
+ case AuthOperationConstants.LOGIN:
+ topic = TopicConstants.AUTH;
+ break;
+ case AuthOperationConstants.LOGOUT:
+ topic = TopicConstants.AUTH;
+ break;
}
return topic;
}
diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java
index 1e3563fb6d..d2a37797fa 100644
--- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java
+++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java
@@ -214,7 +214,7 @@ public class BizPointUserTotalDetailServiceImpl extends BaseServiceImpl {
//楼院小组显示昵称,支部小组显示姓名
if (("ordinary").equals(group.getData().getGroupType())) {
- item.setName(user.getNickname());
+ item.setName(StringUtils.isBlank(user.getNickname()) ? StrConstant.EPMETY_STR : user.getNickname());
} else {
item.setName(StrConstant.EPMETY_STR);
if (StringUtils.isNotBlank(user.getSurname())){
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
index 25afa314fa..09727f5e56 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
@@ -453,6 +453,9 @@ public class AccessServiceImpl implements AccessService {
}
CustomerAgencyDTO belongAgency = belongAgencyRst.getData();
+ if (belongAgency == null || belongAgency.getId() == null) {
+ throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,用户所属的组织信息不存在");
+ }
//Result agencyByStaffRst = govOrgFeignClient.getAgencyByStaff(staffId);
//if (!agencyByStaffRst.success()) {
@@ -467,11 +470,15 @@ public class AccessServiceImpl implements AccessService {
// 2.拿到当前所处机关单位信息
Result currAgencyRst = govOrgFeignClient.getAgencyById(currAgencyId);
- CustomerAgencyDTO currAgencyDto = currAgencyRst.getData();
- if (!currAgencyRst.success() || currAgencyDto == null) {
+ if (!currAgencyRst.success()) {
throw new RenException(String.format("根据当前机构id[%s]查询pids失败:%s", currAgencyId, currAgencyRst.getMsg()));
}
+ CustomerAgencyDTO currAgencyDto = currAgencyRst.getData();
+ if (currAgencyDto == null || currAgencyDto.getId() == null) {
+ throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,当前组织信息不存在");
+ }
+
// 获取机关单位中的角色
// 目前一个人只在一个单位下,所以不动态查询,如果后面需要一个人在多个单位,再改这里
//List roleDTOS = queryGovStaffRoles(staffId, belongAgency.getId());
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java
index 6e61017ed1..9236ff80a5 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java
@@ -503,15 +503,15 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl list){
- String result = "";
+ StringBuilder r = new StringBuilder();
if (!CollectionUtils.isEmpty(list)){
list.forEach(l -> {
- result.concat(l.getCategoryName()).concat(",");
+ r.append(l.getCategoryName()).append(",");
});
}
- if (StringUtils.isEmpty(result)){
- return result;
+ if (StringUtils.isEmpty(r.toString())){
+ return r.toString();
}
- return result.substring(NumConstant.ZERO,result.length()-NumConstant.ONE);
+ return r.toString().substring(NumConstant.ZERO,r.length()-NumConstant.ONE);
}
}
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
index 2c0cf4bb23..b1f1701e75 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
@@ -125,6 +125,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp
private IssueProjectTagDictService issueProjectTagDictService;
@Autowired
private IssueVoteDetailDao issueVoteDetailDao;
+ @Autowired
+ private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Value("${openapi.scan.server.url}")
@@ -1041,6 +1043,9 @@ public class IssueServiceImpl extends BaseServiceImpl imp
if(!resiGroupOpenFeignClient.sendEvent(eventParam).success()){
logger.warn("com.epmet.service.impl.IssueServiceImpl.shiftProjectV2,话题被转为项目积分事件发送失败,参数:{}", JSON.toJSONString(formDTO));
}
+
+ //8.记录日志
+ //SendMqMsgUtil.build().openFeignClient(messageOpenFeignClient).sendProjectChangedMqMsg();
}
/**
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
index 4a7b073b73..dca01a63f5 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
@@ -235,12 +235,13 @@
SELECT
#{l.projectId} AS projectId,
- CATEGORY_NAME
- FROM issue_project_category_dict
- WHERE DEL_FLAG = '0'
- AND IS_DISABLE = 'enable'
- AND CUSTOMER_ID = #{customerId}
- AND CATEGORY_CODE = #{l.categoryCode}
+ CONCAT(if(cd2.CATEGORY_CODE = '0','',CONCAT(cd2.CATEGORY_NAME,'-')),cd.CATEGORY_NAME) AS categoryName
+ FROM issue_project_category_dict cd
+ LEFT JOIN issue_project_category_dict cd2 ON cd2.CATEGORY_CODE = cd.PARENT_CATEGORY_CODE AND cd2.DEL_FLAG = '0' AND cd2.CUSTOMER_ID = #{customerId}
+ WHERE cd.DEL_FLAG = '0'
+ AND cd.IS_DISABLE = 'enable'
+ AND cd.CUSTOMER_ID = #{customerId}
+ AND cd.CATEGORY_CODE = #{l.categoryCode}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStaffResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStaffResultDTO.java
new file mode 100644
index 0000000000..d74af6d7f6
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStaffResultDTO.java
@@ -0,0 +1,21 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/8 3:23 下午
+ * @DESC
+ */
+@Data
+public class GridStaffResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -5910427385795368242L;
+
+ private String gridId;
+
+ private String staffId;
+
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
index 6cefd55a53..4e28d10dc1 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
@@ -333,4 +333,13 @@ public interface GovOrgOpenFeignClient {
**/
@PostMapping(value = "/gov/org/customeragency/getprocessorlist/{agencyId}")
Result getProcessorList(@PathVariable("agencyId") String agencyId);
+
+ /**
+ * @Description 查询网格下的网格员
+ * @Param gridIds
+ * @author zxc
+ * @date 2021/6/8 3:36 下午
+ */
+ @PostMapping("/gov/org/customerstaffgrid/gridstaff")
+ Result> selectGridStaffByGridIds(@RequestBody List gridIds);
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
index f34b6f53ae..4976297323 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
@@ -192,4 +192,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result getProcessorList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getProcessorList", agencyId);
}
+
+ @Override
+ public Result> selectGridStaffByGridIds(List gridIds) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectGridStaffByGridIds", gridIds);
+ }
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
index 72b6dabe25..53e6330d06 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
@@ -29,6 +29,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.service.CustomerStaffGridService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -119,4 +120,15 @@ public class CustomerStaffGridController {
ValidatorUtils.validateEntity(gridIdFormDTO);
return customerStaffGridService.getAllGridStaffs(gridIdFormDTO);
}
+
+ /**
+ * @Description 查询网格下的人
+ * @Param gridIds
+ * @author zxc
+ * @date 2021/6/8 3:36 下午
+ */
+ @PostMapping("gridstaff")
+ public Result> selectGridStaffByGridIds(@RequestBody List gridIds){
+ return new Result>().ok(customerStaffGridService.selectGridStaffByGridIds(gridIds));
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
index 54cad95662..d9ce1b0e61 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
@@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.LatestGridFormDTO;
+import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -97,4 +98,12 @@ public interface CustomerStaffGridDao extends BaseDao {
* @Description 查询人员在客户下参与的网格列表
*/
List selectStaffGridList(CustomerStaffGridDTO staffGridDTO);
+
+ /**
+ * @Description 查询网格下的人
+ * @Param gridIds
+ * @author zxc
+ * @date 2021/6/8 3:36 下午
+ */
+ List selectGridStaffByGridIds(@Param("gridIds") List gridIds);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
index 7813dd3b06..0cf4041cce 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
@@ -26,6 +26,7 @@ import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CommonStaffInfoResultDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import java.util.List;
@@ -117,4 +118,12 @@ public interface CustomerStaffGridService extends BaseService> getAllGridStaffs(CommonGridIdFormDTO gridIdFormDTO);
+
+ /**
+ * @Description 查询网格下的人
+ * @Param gridIds
+ * @author zxc
+ * @date 2021/6/8 3:36 下午
+ */
+ List selectGridStaffByGridIds(List gridIds);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
index 2eb0873cc8..ac8abc82fc 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
@@ -21,6 +21,7 @@ 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.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@@ -30,13 +31,16 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
+import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.CustomerStaffGridRedis;
import com.epmet.service.CustomerStaffGridService;
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 org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -56,6 +60,9 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl page(Map params) {
@@ -146,4 +153,32 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl selectGridStaffByGridIds(List gridIds) {
+ if (CollectionUtils.isEmpty(gridIds)){
+ return new ArrayList<>();
+ }
+ // 查询网格下所有的人
+ List gridStaff = baseDao.selectGridStaffByGridIds(gridIds);
+ if (CollectionUtils.isEmpty(gridStaff)){
+ return new ArrayList<>();
+ }
+ // 拿着网格下所有人去筛选网格员
+ Result> result = epmetUserOpenFeignClient.staffGridRole(gridStaff);
+ if (!result.success()){
+ throw new RenException("查询网格下的网格员失败【"+result.getMsg()+"】");
+ }
+ List data = result.getData();
+ if (CollectionUtils.isEmpty(data)){
+ return new ArrayList<>();
+ }
+ return data;
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
index d72d3cdd8a..a77dd1c449 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
@@ -3,6 +3,8 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.redis.RedisKeys;
+import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.*;
@@ -47,6 +49,8 @@ public class StaffServiceImpl implements StaffService {
private StaffTransferRecordService staffTransferRecordService;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Autowired
+ private RedisUtils redisUtils;
@Override
public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) {
@@ -255,6 +259,11 @@ public class StaffServiceImpl implements StaffService {
staffTransferRecordDTO.setAgencyId(fromDTO.getAgencyId());
staffTransferRecordDTO.setRemarks(fromDTO.getRemarks());
staffTransferRecordService.save(staffTransferRecordDTO);
+ //2021.6.7 添加逻辑-人员调动删除token sun start
+ //8.清除可能存在的工作人员登陆token
+ String key = RedisKeys.getCpUserKey("gov", "wxmp", fromDTO.getStaffId());
+ redisUtils.delete(key);
+ //2021.6.7 添加逻辑-人员调动删除token sun end
}
/**
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
index 7f1a8d3220..5e08a59b97 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
@@ -88,6 +88,20 @@
AND customer_id = #{customerId}
+
+
+ SELECT
+ USER_ID AS staffId,
+ GRID_ID
+ FROM customer_staff_grid
+ WHERE DEL_FLAG = '0'
+ AND (
+
+ GRID_ID = #{gridId}
+
+ )
+
+
insert into customer_staff_grid
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java
index 6ba33ec68a..4aeebf8c47 100644
--- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java
@@ -90,6 +90,21 @@ public class ProjectDTO implements Serializable {
*/
private String orgIdPath;
+ /**
+ * 定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
+ * */
+ private String locateAddress;
+
+ /**
+ * 定位经度
+ * */
+ private String locateLongitude;
+
+ /**
+ * 定位纬度
+ * */
+ private String locateDimension;
+
/**
* 删除标识:0.未删除 1.已删除
*/
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java
index c79613963f..d269a4aeaa 100644
--- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java
@@ -28,6 +28,12 @@ public class ProjectApprovalFormDTO implements Serializable {
@NotBlank(message = "内部备注不能为空",groups = {ProjectApprovalFormDTO.ApprovalCategory.class})
@Length(max=1000,message = "内部备注不能超过1000位",groups = {ProjectApprovalFormDTO.ApprovalCategory.class})
private String internalRemark;
+ //定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
+ private String locateAddress;
+ //定位经度
+ private String locateLongitude;
+ //定位纬度
+ private String locateDimension;
public interface ApprovalCategory extends CustomerClientShowGroup {}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java
index ebffaef4d7..1491ee95c6 100644
--- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java
@@ -73,6 +73,19 @@ public class ProjectDetailResultDTO implements Serializable {
*/
private List platformIds;
+ /**
+ * 定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
+ * */
+ private String locateAddress;
+ /**
+ * 定位经度
+ * */
+ private String locateLongitude;
+ /**
+ * 定位纬度
+ * */
+ private String locateDimension;
+
public ProjectDetailResultDTO() {
this.processable = false;
this.isSend = false;
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java
index 444eebee06..cbdd5c31e7 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java
@@ -83,4 +83,19 @@ public class ProjectEntity extends BaseEpmetEntity {
*/
private String orgIdPath;
+ /**
+ * 定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
+ * */
+ private String locateAddress;
+
+ /**
+ * 定位经度
+ * */
+ private String locateLongitude;
+
+ /**
+ * 定位纬度
+ * */
+ private String locateDimension;
+
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
index e9a3967717..f73740fd69 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
@@ -31,7 +31,9 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.IpUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.ProjectConstant;
@@ -73,7 +75,10 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
@@ -118,6 +123,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl page(Map params) {
@@ -388,8 +395,18 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl processStaff = epmetUserFeignClient.getCustomerStaffInfoByUserId(form);
+
+ ProjectEntity projectEntity = projectService.selectById(projectId);
+ return String.format("将项目\"%s\"吹哨给%s%s处理", projectEntity.getTitle(), departmentName, processStaff.getData().getRealName());
+ }
+
/**
* @Description 项目流转给流转工作人员推送消息
* @author sun
@@ -743,7 +775,16 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl getProjectByIssue(ShiftProjectsFromDTO fromDTO) {
List resultList = new ArrayList<>();
@@ -1011,6 +1069,9 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectTraceS
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
+ @Autowired
+ private LoginUserUtil loginUserUtil;
@Override
public List getPendProjectList(TokenDto tokenDto, ProjectListFromDTO fromDTO) {
@@ -359,6 +366,9 @@ public class ProjectTraceServiceImpl implements ProjectTraceS
projectEntity.setBackGround(formDTO.getBackGround());
projectEntity.setStatus(ProjectConstant.PENDING);
projectEntity.setOrgIdPath(loginUser.getOrgIdPath());
+ projectEntity.setLocateAddress(null == formDTO.getLocateAddress() ? "" : formDTO.getLocateAddress());
+ projectEntity.setLocateLongitude(null == formDTO.getLocateLongitude() ? "" : formDTO.getLocateLongitude());
+ projectEntity.setLocateDimension(null == formDTO.getLocateDimension() ? "" : formDTO.getLocateDimension());
projectService.insert(projectEntity);
//3-2.项目进展表新增第一个节点数据
@@ -506,7 +516,16 @@ public class ProjectTraceServiceImpl implements ProjectTraceS
}
//项目实时统计消息
- ProjectChangedMQMsg mqMsg = new ProjectChangedMQMsg(projectEntity.getCustomerId(), ProjectConstant.OPERATION_CREATED);
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ String mqMsgBrief = String.format("创建了\"%s\"的项目", formDTO.getTitle());
+ ProjectChangedMQMsg mqMsg = new ProjectChangedMQMsg(projectEntity.getCustomerId(), ProjectConstant.OPERATION_CREATED,
+ projectEntity.getId(),
+ formDTO.getUserId(),
+ new Date(),
+ mqMsgBrief,
+ IpUtils.getIpAddr(request),
+ loginUserUtil.getLoginUserApp(),
+ loginUserUtil.getLoginUserClient());
boolean msgResult = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendProjectChangedMqMsg(mqMsg);
if (!msgResult) {
log.error("项目实时统计消息发送失败");
diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql
new file mode 100644
index 0000000000..fd3b7ffcfa
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql
@@ -0,0 +1,24 @@
+ALTER TABLE `project`
+ADD COLUMN `LOCATE_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]' AFTER `ORG_ID_PATH`,
+ADD COLUMN `LOCATE_LONGITUDE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位经度' AFTER `LOCATE_ADDRESS`,
+ADD COLUMN `LOCATE_DIMENSION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位维度' AFTER `LOCATE_LONGITUDE`;
+
+
+
+UPDATE
+ project a,
+ (
+ SELECT
+ locate_address a,
+ locate_longitude b,
+ locate_dimension c,
+ issue_id d
+ FROM epmet_resi_group.resi_topic
+ ) b
+SET
+ a.locate_address = b.a,
+ a.locate_longitude = b.b,
+ a.locate_dimension = b.c
+WHERE
+ a.origin = 'issue'
+AND a.origin_id = b.d
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
index 166917e5d7..a83934841c 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
+++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
@@ -128,6 +128,9 @@
p.ORIGIN AS "origin",
p.ORIGIN_ID AS "originId",
p.STATUS AS "projectStatus",
+ p.locate_address AS "locateAddress",
+ p.locate_longitude AS "locateLongitude",
+ p.locate_dimension AS "locateDimension",
IFNULL(pp.PUBLIC_REPLY, '无') AS "publicReply",
IFNULL(pp.INTERNAL_REMARK, '无') AS "internalRemark"
FROM project p
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
index a29cfbd7ed..0f1fb12a0e 100644
--- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
@@ -191,7 +191,6 @@ public interface ResiGroupOpenFeignClient {
@PostMapping("resi/group/topic/sendevent")
Result sendEvent(@RequestBody TopicEventFormDTO param);
-
@GetMapping("resi/group/topic/querytopicinfobyissueid/{issueId}")
Result queryTopicInfoByIssueId(@PathVariable("issueId")String issueId);
@@ -271,8 +270,6 @@ public interface ResiGroupOpenFeignClient {
@PostMapping("/resi/group/topic/allmessages")
Result> allMessages(@RequestBody AllMessagesFormDTO formDTO);
- /**
-
/**
* @Description 查询话题信息
* @Param issueIds
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
index b49820bec8..eb8751a79a 100644
--- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
@@ -223,12 +223,12 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
}
@Override
- public Result> getTopicInfos(List issueIds) {
- return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getTopicInfos", issueIds);
+ public Result> listTopicDetailsByIds(TopicDetailBatchFormDTO input) {
+ return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "listTopicDetailsByIds", input);
}
@Override
- public Result> listTopicDetailsByIds(TopicDetailBatchFormDTO input) {
- return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "listTopicDetailsByIds", input);
+ public Result> getTopicInfos(List issueIds) {
+ return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getTopicInfos", issueIds);
}
}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
index 6bb5d1a9f8..4f25fd2803 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
@@ -532,5 +532,4 @@ public class ResiTopicController {
return new Result>().ok(topicDetails);
}
-
}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
index 7520074fdc..520f575a13 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
@@ -2825,32 +2825,6 @@ public class ResiTopicServiceImpl extends BaseServiceImpl getTopicInfos(List issueIds) {
- if (CollectionUtils.isEmpty(issueIds)){
- return new ArrayList<>();
- }
- List topicInfos = baseDao.getTopicInfos(issueIds);
- Result> gridNames = govOrgOpenFeignClient.getGridListByGridIds(topicInfos.stream().map(m -> m.getGridId()).collect(Collectors.toList()));
- if (!gridNames.success()){
- throw new RenException("查询网格Name失败");
- }
- topicInfos.forEach(t -> {
- gridNames.getData().forEach(g -> {
- if (t.getGridId().equals(g.getGridId())){
- t.setGridName(g.getGridName());
- }
- });
- });
- return topicInfos;
- }
-
@Override
public List listTopicDetailsByIds(List topicIdList) {
LambdaQueryWrapper qw = new LambdaQueryWrapper<>();
@@ -2885,6 +2859,32 @@ public class ResiTopicServiceImpl extends BaseServiceImpl a.getAttachmentUrl()).collect(Collectors.toList());
}
+ /**
+ * @Description 查询话题信息
+ * @Param issueIds
+ * @author zxc
+ * @date 2021/5/17 4:19 下午
+ */
+ @Override
+ public List getTopicInfos(List issueIds) {
+ if (CollectionUtils.isEmpty(issueIds)){
+ return new ArrayList<>();
+ }
+ List topicInfos = baseDao.getTopicInfos(issueIds);
+ Result> gridNames = govOrgOpenFeignClient.getGridListByGridIds(topicInfos.stream().map(m -> m.getGridId()).collect(Collectors.toList()));
+ if (!gridNames.success()){
+ throw new RenException("查询网格Name失败");
+ }
+ topicInfos.forEach(t -> {
+ gridNames.getData().forEach(g -> {
+ if (t.getGridId().equals(g.getGridId())){
+ t.setGridName(g.getGridName());
+ }
+ });
+ });
+ return topicInfos;
+ }
+
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffFormDTO.java
index 43acb11d1c..f5317723e6 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffFormDTO.java
@@ -4,6 +4,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
+import java.util.List;
/**
* @Description 根据手机号+客户id获取工作人员基本信息
@@ -13,9 +14,23 @@ import java.io.Serializable;
@Data
public class CustomerStaffFormDTO implements Serializable {
private static final long serialVersionUID = 7619815083427853431L;
- @NotBlank(message = "手机号不能为空")
+
+ // 根据手机号+客户id获取工作人员基本信息
+ public interface GetCustomerStaffInfo {}
+
+ @NotBlank(message = "手机号不能为空", groups = { GetCustomerStaffInfo.class })
private String mobile;
- @NotBlank(message = "客户id不能为空")
+ @NotBlank(message = "客户id不能为空", groups = { GetCustomerStaffInfo.class })
private String customerId;
+
+ /**
+ * 姓名
+ */
+ private String realName;
+
+ /**
+ * 用户id集合
+ */
+ private List userIds;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolTrackFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolTrackFormDTO.java
new file mode 100644
index 0000000000..6c0dfb8478
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolTrackFormDTO.java
@@ -0,0 +1,23 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/7 3:27 下午
+ * @DESC
+ */
+@Data
+public class PatrolTrackFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 5074643104620363029L;
+
+ public interface PatrolTrackForm{}
+
+ @NotBlank(message = "巡查记录ID不能为空",groups = PatrolTrackForm.class)
+ private String staffPatrolRecId;
+
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RecordListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RecordListFormDTO.java
new file mode 100644
index 0000000000..cfaf7a62c4
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RecordListFormDTO.java
@@ -0,0 +1,26 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/7 3:09 下午
+ * @DESC
+ */
+@Data
+public class RecordListFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1034587652692011650L;
+
+ public interface RecordListForm{}
+
+ @NotBlank(message = "staffId不能为空",groups = RecordListForm.class)
+ private String staffId;
+
+ @NotBlank(message = "网格ID不能为空",groups = RecordListForm.class)
+ private String gridId;
+
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridManagerUserListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridManagerUserListResultDTO.java
new file mode 100644
index 0000000000..8a8e51887b
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridManagerUserListResultDTO.java
@@ -0,0 +1,65 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/7 2:57 下午
+ * @DESC
+ */
+@Data
+public class GridManagerUserListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 3606766812822179356L;
+
+ /**
+ * 工作人员id
+ */
+ private String staffId;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 正在巡查:patrolling;否则返回空字符串
+ */
+ private String status;
+
+ /**
+ * 网格名称,最多显示上两级
+ */
+ private String gridName;
+
+ /**
+ * 姓名
+ */
+ private String staffName;
+
+ /**
+ * 中心点位
+ */
+ @JsonIgnore
+ private String centerMark;
+
+ /**
+ * 经纬度赋值状态
+ */
+ @JsonIgnore
+ private Boolean llStatus;
+
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUserResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUserResultDTO.java
new file mode 100644
index 0000000000..da70a707fe
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUserResultDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/8 4:30 下午
+ * @DESC
+ */
+@Data
+public class GridStaffUserResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 7715622585539953368L;
+
+ private String gridId;
+
+ private String staffId;
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PatrolTrackResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PatrolTrackResultDTO.java
new file mode 100644
index 0000000000..d20d951367
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PatrolTrackResultDTO.java
@@ -0,0 +1,26 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/7 3:29 下午
+ * @DESC
+ */
+@Data
+public class PatrolTrackResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 5147586435344204616L;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/RecordListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/RecordListResultDTO.java
new file mode 100644
index 0000000000..078586c69d
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/RecordListResultDTO.java
@@ -0,0 +1,36 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/7 3:14 下午
+ * @DESC
+ */
+@Data
+public class RecordListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -1021736989973649009L;
+
+ /**
+ * 巡查记录id
+ */
+ private String staffPatrolRecId;
+
+ /**
+ * 开始时间;yyyy-MM-dd HH:mm
+ */
+ private String patrolStartTime;
+
+ /**
+ * 结束时间;yyyy-MM-dd HH:mm
+ */
+ private String patrolEndTime;
+
+ /**
+ * 正在巡查:patrolling;已结束:end
+ */
+ private String status;
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameAndLLResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameAndLLResultDTO.java
new file mode 100644
index 0000000000..ac255b7c56
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameAndLLResultDTO.java
@@ -0,0 +1,33 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/9 11:12 上午
+ * @DESC
+ */
+@Data
+public class UserNameAndLLResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8997436689118596889L;
+
+ /**
+ * 用户名字
+ */
+ private List userNames;
+
+ /**
+ * 经纬度
+ */
+ private List ll;
+
+ public UserNameAndLLResultDTO() {
+ this.userNames = new ArrayList<>();
+ this.ll = new ArrayList<>();
+ }
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameResultDTO.java
new file mode 100644
index 0000000000..286fc17ea7
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserNameResultDTO.java
@@ -0,0 +1,19 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/9 11:12 上午
+ * @DESC
+ */
+@Data
+public class UserNameResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 5383959788021394553L;
+
+ private String userId;
+ private String userName;
+}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
index f85ba6d782..c9f1e56f01 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
@@ -21,7 +21,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:09
*/
-//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class, url = "localhost:8087")
+//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class, url = "http://127.0.0.1:8087")
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class)
public interface EpmetUserOpenFeignClient {
@@ -224,7 +224,7 @@ public interface EpmetUserOpenFeignClient {
* @Author sun
* @Description 根据客户ID、手机号查询政府端工作人员基本信息,校验用户是否存在
**/
- @GetMapping(value = "epmetuser/customerstaff/getCustsomerStaffByIdAndPhone")
+ @GetMapping(value = "/epmetuser/customerstaff/getCustsomerStaffByIdAndPhone")
Result> getCustsomerStaffByIdAndPhone(@RequestBody ThirdCustomerStaffFormDTO formDTO);
/**
@@ -530,4 +530,60 @@ public interface EpmetUserOpenFeignClient {
*/
@PostMapping("/epmetuser/badge/userbadges")
Result> userBadges(@RequestBody UserBadgesFormDTO formDTO);
+
+ /**
+ * 根据用户ID获取工作人员基本信息
+ *
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author zhaoqifeng
+ * @date 2020/4/22 10:05
+ **/
+ @PostMapping(value = "/epmetuser/customerstaff/getstaffinfobyuserid")
+ Result getCustomerStaffInfoByUserId(@RequestBody CustomerStaffDTO formDTO);
+
+ /**
+ * @Description 通用批量查询
+ * @return
+ * @author wxz
+ * @date 2021.06.08 10:54
+ */
+ @PostMapping(value = "/epmetuser/customerstaff/list")
+ Result> list(CustomerStaffFormDTO input);
+
+ /**
+ * @Description 查询网格员角色
+ * @Param forms
+ * @author zxc
+ * @date 2021/6/8 4:42 下午
+ */
+ @PostMapping("/epmetuser/staffrole/staffgridrole")
+ Result> staffGridRole(@RequestBody List forms);
+
+ /**
+ * @Description 查询经纬度
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 10:40 上午
+ */
+ @PostMapping("/epmetuser/staffpatrol/getll")
+ Result selectll(@RequestBody List userIds);
+
+ /**
+ * @Description 002、查看巡查记录
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:25 下午
+ */
+ @PostMapping("/epmetuser/staffpatrol/recordlist")
+ Result> recordList(@RequestBody RecordListFormDTO formDTO);
+
+ /**
+ * @Description 003、巡查轨迹
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:35 下午
+ */
+ @PostMapping("/epmetuser/staffpatrol/patroltrack")
+ Result> patrolTrack(@RequestBody PatrolTrackFormDTO formDTO);
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
index 518cca9cef..43671d4f6c 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
@@ -373,4 +373,35 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result> userBadges(UserBadgesFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "userBadges", formDTO);
}
+
+ @Override
+ public Result getCustomerStaffInfoByUserId(CustomerStaffDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustomerStaffInfoByUserId", formDTO);
+ }
+
+ @Override
+ public Result> list(CustomerStaffFormDTO input) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "list", input);
+ }
+
+ @Override
+ public Result> staffGridRole(List forms) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "staffGridRole", forms);
+ }
+
+ @Override
+ public Result selectll(List userIds) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectll", userIds);
+ }
+
+ @Override
+ public Result> recordList(RecordListFormDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "recordList", formDTO);
+ }
+
+ @Override
+ public Result> patrolTrack(PatrolTrackFormDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "patrolTrack", formDTO);
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
index e1eefc0a94..d488ecff59 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
@@ -20,6 +20,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@@ -32,10 +33,12 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerStaffExcel;
import com.epmet.service.CustomerStaffService;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;
@@ -53,6 +56,9 @@ public class CustomerStaffController {
@Autowired
private CustomerStaffService customerStaffService;
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+
@GetMapping("page")
public Result> page(@RequestParam Map params) {
PageData page = customerStaffService.page(params);
@@ -116,7 +122,7 @@ public class CustomerStaffController {
**/
@PostMapping(value = "getcustomerstaffinfo")
public Result getCustomerStaffInfo(@RequestBody CustomerStaffFormDTO formDTO) {
- ValidatorUtils.validateEntity(formDTO);
+ ValidatorUtils.validateEntity(formDTO, CustomerStaffFormDTO.GetCustomerStaffInfo.class);
return customerStaffService.getCustomerStaffInfo(formDTO);
}
@@ -410,4 +416,19 @@ public class CustomerStaffController {
return new Result().ok(customerStaffService.getStaffBasicInfo(fromDTO));
}
+ /**
+ * @Description 通用列表查询。可以指定customerId,如果指定了,则使用指定的,如果未指定,则使用当前登录用户的customerId
+ * @return
+ * @author wxz
+ * @date 2021.06.08 10:54
+ */
+ @PostMapping("list")
+ public Result> list(@RequestBody CustomerStaffFormDTO input) {
+ String customerId = StringUtils.isBlank(input.getCustomerId()) ? loginUserUtil.getLoginUserCustomerId() : input.getCustomerId();
+
+ List staffs = customerStaffService.list(customerId, input.getRealName(), input.getMobile(), input.getUserIds());
+ return new Result>().ok(staffs);
+ }
+
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java
new file mode 100644
index 0000000000..f0a0558c34
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java
@@ -0,0 +1,68 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.form.PatrolTrackFormDTO;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.dto.result.GridManagerUserListResultDTO;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+import com.epmet.dto.result.UserNameAndLLResultDTO;
+import com.epmet.service.StaffPatrolRecordService;
+import com.epmet.user.result.GridManagerListResultDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/6/9 10:32 上午
+ * @DESC
+ */
+@RestController
+@RequestMapping("staffpatrol")
+public class StaffPatrolController {
+
+ @Autowired
+ private StaffPatrolRecordService staffPatrolRecordService;
+
+ /**
+ * @Description 查询经纬度
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 10:40 上午
+ */
+ @PostMapping("getll")
+ public Result selectll(@RequestBody List userIds){
+ return new Result().ok(staffPatrolRecordService.selectLL(userIds));
+ }
+
+ /**
+ * @Description 002、查看巡查记录
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:25 下午
+ */
+ @PostMapping("recordlist")
+ public Result> recordList(@RequestBody RecordListFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, RecordListFormDTO.RecordListForm.class);
+ return new Result>().ok(staffPatrolRecordService.recordList(formDTO));
+ }
+
+ /**
+ * @Description 003、巡查轨迹
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 3:35 下午
+ */
+ @PostMapping("patroltrack")
+ public Result> patrolTrack(@RequestBody PatrolTrackFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, PatrolTrackFormDTO.PatrolTrackForm.class);
+ return new Result>().ok(staffPatrolRecordService.patrolTrack(formDTO));
+ }
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java
index 60b4d5400e..00d3cd154e 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java
@@ -10,11 +10,8 @@ import com.epmet.dto.form.CommonUserFormDTO;
import com.epmet.dto.form.CustomerRoleFormDTO;
import com.epmet.dto.form.RolesUsersListFormDTO;
import com.epmet.dto.form.StaffRoleFormDTO;
-import com.epmet.dto.result.CustomerStaffRoleResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.dto.form.*;
-import com.epmet.dto.result.CustomerStaffRoleListResultDTO;
-import com.epmet.dto.result.GovStaffRoleResultDTO;
-import com.epmet.dto.result.StaffRolesResultDTO;
import com.epmet.entity.GovStaffRoleEntity;
import com.epmet.service.GovStaffRoleService;
import com.epmet.service.StaffRoleService;
@@ -181,4 +178,15 @@ public class StaffRoleController {
staffRoleService.changeRoleOrg(formDTO);
return new Result();
}
+
+ /**
+ * @Description 查询网格员角色
+ * @Param forms
+ * @author zxc
+ * @date 2021/6/8 4:42 下午
+ */
+ @PostMapping("staffgridrole")
+ public Result> staffGridRole(@RequestBody List forms){
+ return new Result>().ok(staffRoleService.staffGridRole(forms));
+ }
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
index acffa2840e..e49790c0d4 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
@@ -197,4 +197,20 @@ public interface CustomerStaffDao extends BaseDao {
* @return
*/
BasicInfoResultDTO getStaffBasicInfo(StaffBasicInfoFromDTO fromDTO);
+
+ /**
+ * 通用列表查询
+ * @param customerId
+ * @param realName
+ * @return
+ */
+ List listDTOS(@Param("customerId") String customerId, @Param("realName") String realName, @Param("mobile") String mobile, @Param("userIds") List userIds);
+
+ /**
+ * @Description 查询用户名字
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 1:36 下午
+ */
+ List selectUserName(@Param("userIds")List userIds);
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolDetailDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolDetailDao.java
new file mode 100644
index 0000000000..2d7ed83136
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolDetailDao.java
@@ -0,0 +1,45 @@
+/**
+ * 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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+import com.epmet.entity.StaffPatrolDetailEntity;
+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-06-07
+ */
+@Mapper
+public interface StaffPatrolDetailDao extends BaseDao {
+
+ /**
+ * @Description 查询巡查轨迹
+ * @Param staffPatrolRecId
+ * @author zxc
+ * @date 2021/6/7 5:13 下午
+ */
+ List selectPatrolTrack(@Param("staffPatrolRecId") String staffPatrolRecId);
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java
new file mode 100644
index 0000000000..a476cfd3a5
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java
@@ -0,0 +1,55 @@
+/**
+ * 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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.dto.result.GridManagerUserListResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+import com.epmet.entity.StaffPatrolRecordEntity;
+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-06-07
+ */
+@Mapper
+public interface StaffPatrolRecordDao extends BaseDao {
+
+ /**
+ * @Description 查询经纬度
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 10:24 上午
+ */
+ List selectLL(@Param("userIds")List userIds);
+
+ /**
+ * @Description 巡查记录查询
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 5:29 下午
+ */
+ List recordList(RecordListFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java
index 3124fc68c7..6d10c5fe23 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java
@@ -24,10 +24,7 @@ import com.epmet.dto.StaffRoleDTO;
import com.epmet.dto.form.CommonUserFormDTO;
import com.epmet.dto.form.CustomerStaffRoleListFormDTO;
import com.epmet.dto.form.GetRoleKeyListFormDTO;
-import com.epmet.dto.result.CustomerStaffRoleListResultDTO;
-import com.epmet.dto.result.CustomerStaffRoleResultDTO;
-import com.epmet.dto.result.GovStaffRoleResultDTO;
-import com.epmet.dto.result.StaffRolesResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.entity.StaffRoleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -131,4 +128,12 @@ public interface StaffRoleDao extends BaseDao {
* @Description 工作端-查询用户角色key列表
**/
List selectStaffRoleKeyList(GetRoleKeyListFormDTO formDTO);
+
+ /**
+ * @Description 查询是网格员的人
+ * @Param forms
+ * @author zxc
+ * @date 2021/6/8 4:53 下午
+ */
+ List staffGridRole(@Param("forms") List forms);
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolDetailEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolDetailEntity.java
new file mode 100644
index 0000000000..fbc81edd1a
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolDetailEntity.java
@@ -0,0 +1,101 @@
+/**
+ * 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.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.StaffPatrolDetailEntity;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolDetailService extends BaseService {
+
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java
new file mode 100644
index 0000000000..9883d87bc9
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java
@@ -0,0 +1,63 @@
+/**
+ * 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;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dto.form.PatrolTrackFormDTO;
+import com.epmet.dto.form.RecordListFormDTO;
+import com.epmet.dto.result.PatrolTrackResultDTO;
+import com.epmet.dto.result.RecordListResultDTO;
+import com.epmet.dto.result.UserNameAndLLResultDTO;
+import com.epmet.entity.StaffPatrolRecordEntity;
+
+import java.util.List;
+
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolRecordService extends BaseService {
+
+ /**
+ * @Description 查询经纬度
+ * @Param userIds
+ * @author zxc
+ * @date 2021/6/9 10:40 上午
+ */
+ UserNameAndLLResultDTO selectLL(List