+ * 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..dfaff1bd06 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,15 @@ 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/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..000f2c2b49 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,26 @@
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.user.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..a8637bd720
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolRecordDao.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.datareport.dao.user;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.datareport.entity.user.StaffPatrolRecordEntity;
+import com.epmet.user.form.RecordListFormDTO;
+import com.epmet.user.result.RecordListResultDTO;
+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 巡查记录查询
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/6/7 5:29 下午
+ */
+ List recordList(RecordListFormDTO formDTO);
+
+}
\ 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.
+ *
+ * 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.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 {
+
+}
\ 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..61f5769af4
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.StaffPatrolRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Mapper
+public interface StaffPatrolRecordDao extends BaseDao {
+
+}
\ No newline at end of file
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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+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-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolDetailService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolDetailService.java
new file mode 100644
index 0000000000..ff79804e27
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolDetailService.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.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..ae347f87e7
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.StaffPatrolRecordEntity;
+
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+public interface StaffPatrolRecordService extends BaseService {
+
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolDetailServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolDetailServiceImpl.java
new file mode 100644
index 0000000000..591e95c093
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolDetailServiceImpl.java
@@ -0,0 +1,37 @@
+/**
+ * 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.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.StaffPatrolDetailDao;
+import com.epmet.entity.StaffPatrolDetailEntity;
+import com.epmet.service.StaffPatrolDetailService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作人员巡查记录明细
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Service
+public class StaffPatrolDetailServiceImpl extends BaseServiceImpl implements StaffPatrolDetailService {
+
+
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java
new file mode 100644
index 0000000000..aa6f7c5571
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * 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.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.StaffPatrolRecordDao;
+import com.epmet.entity.StaffPatrolRecordEntity;
+import com.epmet.service.StaffPatrolRecordService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 工作人员巡查主记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-06-07
+ */
+@Service
+public class StaffPatrolRecordServiceImpl extends BaseServiceImpl implements StaffPatrolRecordService {
+
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolDetailDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolDetailDao.xml
new file mode 100644
index 0000000000..235ad55597
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolDetailDao.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml
new file mode 100644
index 0000000000..c57b356e99
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file