Browse Source

Merge branch 'dev_grid_patrol' into dev_temp

# Conflicts:
#	epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
dev_shibei_match
sunyuchao 4 years ago
parent
commit
85e6ba55d2
  1. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  2. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  3. 131
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/StaffPatrolDetailDTO.java
  4. 121
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/StaffPatrolRecordDTO.java
  5. 54
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java
  6. 32
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java
  7. 40
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  8. 34
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolDetailDao.java
  9. 44
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
  10. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
  11. 101
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolDetailEntity.java
  12. 91
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolRecordEntity.java
  13. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  14. 33
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolDetailService.java
  15. 32
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolRecordService.java
  16. 52
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  17. 41
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolDetailServiceImpl.java
  18. 42
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StaffPatrolRecordServiceImpl.java
  19. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  20. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  21. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolDetailDao.xml
  22. 52
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
  23. 22
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
  24. 131
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolDetailDTO.java
  25. 121
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolRecordDTO.java
  26. 25
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/GridManagerListFormDTO.java
  27. 23
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/PatrolTrackFormDTO.java
  28. 26
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/RecordListFormDTO.java
  29. 52
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/GridManagerListResultDTO.java
  30. 26
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/PatrolTrackResultDTO.java
  31. 36
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/RecordListResultDTO.java
  32. 66
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/StaffPatrolDetailController.java
  33. 21
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/StaffPatrolRecordController.java
  34. 45
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolDetailDao.java
  35. 45
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolRecordDao.java
  36. 101
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolDetailEntity.java
  37. 91
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolRecordEntity.java
  38. 46
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolDetailService.java
  39. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolRecordService.java
  40. 77
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java
  41. 21
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolRecordServiceImpl.java
  42. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/user/StaffPatrolDetailDao.xml
  43. 19
      epmet-module/data-report/data-report-server/src/main/resources/mapper/user/StaffPatrolRecordDao.xml
  44. 7
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java
  45. 18
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CenterPointForm.java
  46. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/GridCenterPointForm.java
  47. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/EIDimController.java
  48. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/EIDimService.java
  49. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java
  50. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  51. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/EIDimServiceImpl.java
  52. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java
  53. 3
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java
  54. 2
      epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml
  55. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolDetailDao.java
  56. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java
  57. 101
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolDetailEntity.java
  58. 91
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolRecordEntity.java
  59. 32
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolDetailService.java
  60. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java
  61. 37
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolDetailServiceImpl.java
  62. 36
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java
  63. 29
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolDetailDao.xml
  64. 27
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml

10
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java

@ -166,6 +166,16 @@ public enum RequirePermissionEnum {
MORE_BADGE_MANAGE_EDIT("more_badge_manage_edit","更多:徽章:徽章管理:编辑","编辑徽章"),
MORE_BADGE_MANAGE_DELETE("more_badge_manage_delete","更多:徽章:徽章管理:删除","删除徽章"),
/**
* 更多-日志记录
*/
MORE_PATROL_RECORD_LIST("more_patrol_record_list","更多:日志记录:巡查记录:列表","巡查记录列表"),
/**
* 更多-系统
*/
MORE_SYSTEM_LOG_LIST("MORE_SYSTEM_LOG_LIST","更多:系统:系统日志:列表","系统日志列表"),
/**
* 项目立项
*/

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -818,4 +818,15 @@ public class DateUtils {
return date;
}
/**
* @Author sun
* @Description 获取当前日期几个自然月之前的日期yyyy-MM-dd HH:mm:ss
**/
public static String getBeforeMonthDate(int beforMonth){
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, - beforMonth);
Date date = c.getTime();
return DateUtils.format(date,DateUtils.DATE_TIME_PATTERN);
}
}

131
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/StaffPatrolDetailDTO.java

@ -0,0 +1,131 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dto.epmetuser;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 工作人员巡查记录明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Data
public class StaffPatrolDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* staff_patrol_record.ID
*/
private String staffPatrolRecId;
/**
* 前端给的序号
*/
private Integer serialNum;
/**
* 上传时间后台自动插入该时间
*/
private Date uploadTime;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 速度单位m/s开始和结束时默认0
*/
private String speed;
/**
* 位置的精确度
*/
private String accuracy;
/**
* 高度单位米
*/
private String altitude;
/**
* 垂直经度单位m
*/
private String verticalaccuracy;
/**
* 水平经度单位m
*/
private String horizontalaccuracy;
/**
* 地址暂时不用
*/
private String address;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

121
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/StaffPatrolRecordDTO.java

@ -0,0 +1,121 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dto.epmetuser;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 工作人员巡查主记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Data
public class StaffPatrolRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户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;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

54
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java

@ -0,0 +1,54 @@
package com.epmet.dataaggre.dto.epmetuser.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Description 巡查-各人员巡查记录列表查询-接口入参
* @Auth sun
*/
@Data
public class StaffListFormDTO implements Serializable {
private static final long serialVersionUID = -3381286960911634231L;
/**
* 近1一个月传1 近3个月传3自然月分
*/
@NotNull(message = "最近时间不能为空", groups = StaffListFormDTO.Staff.class)
private Integer time;
/**
* 排序字段巡查总次数patrolTotal最近开始巡查时间latestPatrolledTime
*/
@NotBlank(message = "排序条件不能为空", groups = StaffListFormDTO.Staff.class)
private String sortCode;
/**
* 网格id集合为空则查询当前组织下所有网格数据
*/
private List<String> gridIds;
/**
* 工作人员姓名可空
*/
private String staffName;
/**
* 页码
* */
@Min(1)
private Integer pageNo;
/**
* 每页多少条
* */
private Integer pageSize = 20;
//token中用户Id
private String userId;
//起止巡查开始时间
private String patrolStartTime;
public interface Staff extends CustomerClientShowGroup {}
}

32
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java

@ -0,0 +1,32 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 巡查-各人员巡查记录列表查询-接口入参
* @Auth sun
*/
@Data
public class StaffListResultDTO implements Serializable {
private static final long serialVersionUID = 7129564173128153335L;
//工作人员所属网格id
private String gridId = "";
//工作人员所在网格名称,最多显示到网格的上两级
private String gridName = "";
//工作人员用户id
private String staffId = "";
//真名
private String staffName = "";
//最近巡查时间[最近一次进行中或已结束巡查的开始时间]
private String patrolStartTime = "";
//巡查总次数
private Integer patrolTotal = 0;
//性别0.未知,1男,2.女前端默认头像用
private String gender = "0";
//正在巡查中:patrolling;否则返回空字符串
private String status = "";
}

40
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java

@ -1,8 +1,24 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.datastats.form.SubAgencyFormDTO;
import com.epmet.dataaggre.dto.datastats.result.SubAgencyUserResultDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
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 2020/12/25 上午9:45
@ -10,4 +26,28 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("epmetuser")
public class EpmetUserController {
@Autowired
private EpmetUserService epmetUserService;
/**
* @Param formDTO
* @Description 001各人员巡查记录列表查询
* @author sun
*/
@PostMapping("stafflist")
public Result<List<StaffListResultDTO>> staffList(@LoginUser TokenDto tokenDto, @RequestBody StaffListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, StaffListFormDTO.Staff.class);
if (!"patrolTotal".equals(formDTO.getSortCode()) && !"latestPatrolledTime".equals(formDTO.getSortCode())) {
throw new RenException("参数错误,排序条件值错误");
}
if (formDTO.getTime() != 1 && formDTO.getTime() != 3) {
throw new RenException("参数错误,最近时间值不正确");
}
formDTO.setUserId(tokenDto.getUserId());
return new Result<List<StaffListResultDTO>>().ok(epmetUserService.staffList(formDTO));
}
}

34
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolDetailDao.java

@ -0,0 +1,34 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailEntity> {
}

44
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordEntity> {
/**
* @Description 按条件查询巡查业务数据
* @author sun
*/
List<StaffListResultDTO> selectPatrolList(StaffListFormDTO formDTO);
}

8
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<CustomerGridEntity> {
* @Description 根据组织Id查询当前组织下所有网格列表
**/
List<GridInfoResultDTO> selectGridListByAgencyId(@Param("agencyId") String agencyId);
/**
* @param staffId
* @Author sun
* @Description 查询工作人员所属组织下网格列表
**/
List<CustomerGridDTO> gridListByStaffId(@Param("staffId") String staffId);
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.entity.epmetuser;
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_detail")
public class StaffPatrolDetailEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* staff_patrol_record.ID
*/
private String staffPatrolRecId;
/**
* 前端给的序号
*/
private Integer serialNum;
/**
* 上传时间后台自动插入该时间
*/
private Date uploadTime;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 速度单位m/s开始和结束时默认0
*/
private String speed;
/**
* 位置的精确度
*/
private String accuracy;
/**
* 高度单位米
*/
private String altitude;
/**
* 垂直经度单位m
*/
private String verticalaccuracy;
/**
* 水平经度单位m
*/
private String horizontalaccuracy;
/**
* 地址暂时不用
*/
private String address;
}

91
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StaffPatrolRecordEntity.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.entity.epmetuser;
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;
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -1,5 +1,7 @@
package com.epmet.dataaggre.service.epmetuser;
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 java.util.List;
@ -26,4 +28,10 @@ public interface EpmetUserService {
*/
List<String> selectUserIdByCustomerId(List<String> userIds);
/**
* @Param formDTO
* @Description 001各人员巡查记录列表查询
* @author sun
*/
List<StaffListResultDTO> staffList(StaffListFormDTO formDTO);
}

33
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StaffPatrolDetailService.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailEntity> {
}

32
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordEntity> {
}

52
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<String> selectUserIdByCustomerId(List<String> userIds) {
return userBaseInfoDao.selectUserIdByCustomerId(userIds);
}
/**
* @Param formDTO
* @Description 001各人员巡查记录列表查询
* @author sun
*/
@Override
public List<StaffListResultDTO> staffList(StaffListFormDTO formDTO) {
List<StaffListResultDTO> resultList = new ArrayList<>();
//1.设置分页参数
int num = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(num);
//2.查询当前人员所属组织下网格列表数据,供后续使用
List<CustomerGridDTO> 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;
}
}

41
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailDao, StaffPatrolDetailEntity> implements StaffPatrolDetailService {
}

42
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordDao, StaffPatrolRecordEntity> implements StaffPatrolRecordService {
}

8
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<NextAreaCodeResultDTO> queryNextLevelAreaCodeList(NextAreaCodeFormDTO formDTO);
List<OrgInfoCommonDTO> queryNextOrgInfoDTO(String customerId, String orgId);
/**
* @param staffId
* @Author sun
* @Description 查询工作人员所属组织下网格列表
**/
List<CustomerGridDTO> gridListByStaffId(String staffId);
}

11
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<CustomerGridDTO> gridListByStaffId(String staffId) {
List<CustomerGridDTO> resultList = customerGridDao.gridListByStaffId(staffId);
return resultList;
}
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolDetailDao.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.epmetuser.StaffPatrolDetailDao">
</mapper>

52
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao">
<select id="selectPatrolList" resultType="com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO">
SELECT
spr.grid AS "gridId",
spr.staff_id AS "staffId",
MAX(spr.patrol_start_time) AS "patrolStartTime",
COUNT(spr.staff_id) AS "patrolTotal",
(
select
`status`
from
staff_patrol_record
where
grid = spr.grid
and staff_id = spr.staff_id
order by
patrol_start_time desc
limit 1
) AS "status",
cs.real_name AS "staffName",
cs.gender AS "gender"
FROM
staff_patrol_record spr
LEFT JOIN customer_staff cs ON spr.staff_id = cs.user_id
WHERE
spr.del_flag = '0'
<if test='patrolStartTime != "" and patrolStartTime != null'>
AND spr.patrol_start_time <![CDATA[ >= ]]> #{patrolStartTime}
</if>
<if test='staffName != "" and staffName != null'>
AND cs.real_name LIKE CONCAT('%',#{staffName},'%')
</if>
<foreach collection="gridIds" item="gridId" open="AND( " separator=" OR " close=")">
spr.GRID = #{gridId}
</foreach>
GROUP BY
spr.grid, spr.staff_id
<if test='sortCode != "" and sortCode != null and sortCode == "patrolTotal" '>
ORDER BY COUNT(spr.staff_id) DESC
</if>
<if test='sortCode != "" and sortCode != null and sortCode == "latestPatrolledTime" '>
ORDER BY MAX(spr.patrol_start_time) DESC
</if>
LIMIT
#{pageNo}, #{pageSize}
</select>
</mapper>

22
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml

@ -52,4 +52,26 @@
AND pid = #{agencyId}
</select>
<select id="gridListByStaffId" resultType="com.epmet.dataaggre.dto.govorg.CustomerGridDTO">
SELECT
cg.id AS 'id',
IF (
ca.organization_name = '',
cg.grid_name,
CONCAT(ca.organization_name,'-',cg.grid_name)
) AS 'gridName'
FROM
customer_grid cg
INNER JOIN customer_agency ca ON cg.pid = ca.id
WHERE
cg.del_flag = '0'
AND ca.del_flag = '0'
AND cg.pid = (
select agency_id
from customer_staff_agency
where del_flag = '0'
AND user_id = #{staffId}
)
</select>
</mapper>

131
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 工作人员巡查记录明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Data
public class StaffPatrolDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* staff_patrol_record.ID
*/
private String staffPatrolRecId;
/**
* 前端给的序号
*/
private Integer serialNum;
/**
* 上传时间后台自动插入该时间
*/
private Date uploadTime;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 速度单位m/s开始和结束时默认0
*/
private String speed;
/**
* 位置的精确度
*/
private String accuracy;
/**
* 高度单位米
*/
private String altitude;
/**
* 垂直经度单位m
*/
private String verticalaccuracy;
/**
* 水平经度单位m
*/
private String horizontalaccuracy;
/**
* 地址暂时不用
*/
private String address;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

121
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/StaffPatrolRecordDTO.java

@ -0,0 +1,121 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 工作人员巡查主记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Data
public class StaffPatrolRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户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;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

25
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/GridManagerListFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.user.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/6/7 2:57 下午
* @DESC
*/
@Data
public class GridManagerListFormDTO implements Serializable {
private static final long serialVersionUID = -7624307754570242679L;
public interface GridManagerListForm{}
@NotBlank(message = "组织ID不能为空",groups = GridManagerListForm.class)
private String agencyId;
@NotBlank(message = "行政区域编码不能为空",groups = GridManagerListForm.class)
private String areaCode;
}

23
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/PatrolTrackFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.user.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;
}

26
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/form/RecordListFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.user.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;
}

52
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/GridManagerListResultDTO.java

@ -0,0 +1,52 @@
package com.epmet.user.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/6/7 2:57 下午
* @DESC
*/
@Data
public class GridManagerListResultDTO implements Serializable {
private static final long serialVersionUID = 3606724812822179356L;
/**
* 工作人员id
*/
private String staffId;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 网格ID
*/
private String gridId;
/**
* 正在巡查patrolling否则返回空字符串
*/
private String status;
/**
* 网格名称最多显示上两级
*/
private String gridName;
/**
* 姓名
*/
private String staffName;
}

26
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/PatrolTrackResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.user.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;
}

36
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/RecordListResultDTO.java

@ -0,0 +1,36 @@
package com.epmet.user.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;
}

66
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/StaffPatrolDetailController.java

@ -0,0 +1,66 @@
package com.epmet.datareport.controller.user;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.user.StaffPatrolDetailService;
import com.epmet.user.form.GridManagerListFormDTO;
import com.epmet.user.form.PatrolTrackFormDTO;
import com.epmet.user.form.RecordListFormDTO;
import com.epmet.user.result.GridManagerListResultDTO;
import com.epmet.user.result.PatrolTrackResultDTO;
import com.epmet.user.result.RecordListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 工作人员巡查记录明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@RestController
@RequestMapping("staffpatrol")
public class StaffPatrolDetailController {
@Autowired
private StaffPatrolDetailService staffPatrolService;
/**
* @Description 001网格员分布
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:06 下午
*/
@PostMapping("gridmanagerlist")
public Result<List<GridManagerListResultDTO>> gridManagerList(@RequestBody GridManagerListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GridManagerListFormDTO.GridManagerListForm.class);
return new Result<List<GridManagerListResultDTO>>().ok(staffPatrolService.gridManagerList(formDTO));
}
/**
* @Description 002查看巡查记录
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:25 下午
*/
@PostMapping("recordlist")
public Result<List<RecordListResultDTO>> recordList(@RequestBody RecordListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, RecordListFormDTO.RecordListForm.class);
return new Result<List<RecordListResultDTO>>().ok(staffPatrolService.recordList(formDTO));
}
/**
* @Description 003巡查轨迹
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:35 下午
*/
@PostMapping("patroltrack")
public Result<List<PatrolTrackResultDTO>> patrolTrack(@RequestBody PatrolTrackFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, PatrolTrackFormDTO.PatrolTrackForm.class);
return new Result<List<PatrolTrackResultDTO>>().ok(staffPatrolService.patrolTrack(formDTO));
}
}

21
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/StaffPatrolRecordController.java

@ -0,0 +1,21 @@
package com.epmet.datareport.controller.user;
import com.epmet.datareport.service.user.StaffPatrolRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 工作人员巡查主记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@RestController
@RequestMapping("staffpatrolrecord")
public class StaffPatrolRecordController {
@Autowired
private StaffPatrolRecordService staffPatrolRecordService;
}

45
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/StaffPatrolDetailDao.java

@ -0,0 +1,45 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailEntity> {
/**
* @Description 查询巡查轨迹
* @Param staffPatrolRecId
* @author zxc
* @date 2021/6/7 5:13 下午
*/
List<PatrolTrackResultDTO> selectPatrolTrack(@Param("staffPatrolRecId") String staffPatrolRecId);
}

45
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordEntity> {
/**
* @Description 巡查记录查询
* @Param formDTO
* @author zxc
* @date 2021/6/7 5:29 下午
*/
List<RecordListResultDTO> recordList(RecordListFormDTO formDTO);
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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_detail")
public class StaffPatrolDetailEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* staff_patrol_record.ID
*/
private String staffPatrolRecId;
/**
* 前端给的序号
*/
private Integer serialNum;
/**
* 上传时间后台自动插入该时间
*/
private Date uploadTime;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 速度单位m/s开始和结束时默认0
*/
private String speed;
/**
* 位置的精确度
*/
private String accuracy;
/**
* 高度单位米
*/
private String altitude;
/**
* 垂直经度单位m
*/
private String verticalaccuracy;
/**
* 水平经度单位m
*/
private String horizontalaccuracy;
/**
* 地址暂时不用
*/
private String address;
}

91
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/user/StaffPatrolRecordEntity.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

46
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/StaffPatrolDetailService.java

@ -0,0 +1,46 @@
package com.epmet.datareport.service.user;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.datareport.entity.user.StaffPatrolDetailEntity;
import com.epmet.user.form.GridManagerListFormDTO;
import com.epmet.user.form.PatrolTrackFormDTO;
import com.epmet.user.form.RecordListFormDTO;
import com.epmet.user.result.GridManagerListResultDTO;
import com.epmet.user.result.PatrolTrackResultDTO;
import com.epmet.user.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<GridManagerListResultDTO> gridManagerList(GridManagerListFormDTO formDTO);
/**
* @Description 002查看巡查记录
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:25 下午
*/
List<RecordListResultDTO> recordList(RecordListFormDTO formDTO);
/**
* @Description 003巡查轨迹
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:35 下午
*/
List<PatrolTrackResultDTO> patrolTrack(PatrolTrackFormDTO formDTO);
}

14
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<StaffPatrolRecordEntity> {
}

77
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java

@ -0,0 +1,77 @@
package com.epmet.datareport.service.user.impl;
import com.epmet.datareport.dao.user.StaffPatrolDetailDao;
import com.epmet.datareport.dao.user.StaffPatrolRecordDao;
import com.epmet.datareport.service.user.StaffPatrolDetailService;
import com.epmet.user.form.GridManagerListFormDTO;
import com.epmet.user.form.PatrolTrackFormDTO;
import com.epmet.user.form.RecordListFormDTO;
import com.epmet.user.result.GridManagerListResultDTO;
import com.epmet.user.result.PatrolTrackResultDTO;
import com.epmet.user.result.RecordListResultDTO;
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 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;
/**
* @Description 001网格员分布
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:06 下午
*/
@Override
public List<GridManagerListResultDTO> gridManagerList(GridManagerListFormDTO formDTO) {
return null;
}
/**
* @Description 002查看巡查记录
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:25 下午
*/
@Override
public List<RecordListResultDTO> recordList(RecordListFormDTO formDTO) {
List<RecordListResultDTO> result = staffPatrolRecordDao.recordList(formDTO);
if (!CollectionUtils.isEmpty(result)){
return result;
}
return new ArrayList<>();
}
/**
* @Description 003巡查轨迹
* @Param formDTO
* @author zxc
* @date 2021/6/7 3:35 下午
*/
@Override
public List<PatrolTrackResultDTO> patrolTrack(PatrolTrackFormDTO formDTO) {
List<PatrolTrackResultDTO> results = staffPatrolDetailDao.selectPatrolTrack(formDTO.getStaffPatrolRecId());
if (!CollectionUtils.isEmpty(results)){
return results;
}
return new ArrayList<>();
}
}

21
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<StaffPatrolRecordDao, StaffPatrolRecordEntity> implements StaffPatrolRecordService {
}

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/user/StaffPatrolDetailDao.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.user.StaffPatrolDetailDao">
<!-- 查询巡查轨迹 -->
<select id="selectPatrolTrack" resultType="com.epmet.user.result.PatrolTrackResultDTO">
SELECT
LATITUDE,
LONGITUDE
FROM
staff_patrol_detail
WHERE
STAFF_PATROL_REC_ID = #{staffPatrolRecId}
AND DEL_FLAG = 0
ORDER BY SERIAL_NUM
</select>
</mapper>

19
epmet-module/data-report/data-report-server/src/main/resources/mapper/user/StaffPatrolRecordDao.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.user.StaffPatrolRecordDao">
<!-- 巡查记录查询 -->
<select id="recordList" resultType="com.epmet.user.result.RecordListResultDTO">
SELECT
ID AS staffPatrolRecId,
DATE_FORMAT(PATROL_START_TIME,'%Y-%m-%d %H:%i:%s') AS patrolStartTime,
DATE_FORMAT(PATROL_END_TIME,'%Y-%m-%d %H:%i:%s') AS patrolEndTime,
`STATUS`
FROM staff_patrol_record
WHERE DEL_FLAG = 0
AND GRID_ID = #{gridId}
AND STAFF_ID = #{staffId}
ORDER BY CREATED_TIME DESC
</select>
</mapper>

7
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java

@ -55,6 +55,11 @@ public class ScreenProjectGridDailyDTO implements Serializable {
*/
private String gridId;
/**
* 网格id
*/
private String gridName;
/**
* 网格所属的组织id
*/
@ -149,4 +154,4 @@ public class ScreenProjectGridDailyDTO implements Serializable {
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
}
}
}

18
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CenterPointForm.java

@ -0,0 +1,18 @@
package com.epmet.dto.screen.form;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* desc:修改组织中心点
* @author liujianjun
*/
@Data
public class CenterPointForm implements Serializable {
private static final long serialVersionUID = 6425114459278919896L;
private String title;
private List<Double> center = new ArrayList<>();
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/GridCenterPointForm.java

@ -0,0 +1,30 @@
package com.epmet.dto.screen.form;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* desc:修改组织中心点
* @author liujianjun
*/
@Data
public class GridCenterPointForm implements Serializable {
private static final long serialVersionUID = -6988009829971668860L;
private String customerId;
private List<CenterPointForm> centerDataList = new ArrayList<>();
/* @Data
public class CenterData implements Serializable{
private static final long serialVersionUID = 6425114459278919896L;
private String title;
private List<Double> center = new ArrayList<>();
}*/
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/EIDimController.java

@ -2,14 +2,18 @@ package com.epmet.controller;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screen.form.GridCenterPointForm;
import com.epmet.service.EIDimService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.Map;
/**
* epmet_evaluation_index库的维度controller
*/
@ -45,4 +49,14 @@ public class EIDimController {
return new Result();
}
/**
* desc 更新网格的中心点位
* @return
*/
@PostMapping("update/gridcenterpoint")
public Result upsertOrgCenterPoint(@RequestBody GridCenterPointForm param) {
Map<String,Integer> effectRow = eiDimService.updateCenterPointByName(param);
return new Result().ok(effectRow);
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/EIDimService.java

@ -1,7 +1,10 @@
package com.epmet.service;
import com.epmet.dto.screen.form.GridCenterPointForm;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* epmet_evaluation_index 维度的service
*/
@ -10,4 +13,14 @@ public interface EIDimService {
void initAgencies();
void initDepartments();
void initGrids();
/**
* desc: 更新中心点位
*
* @param param
* @return java.lang.Integer
* @author LiuJanJun
* @date 2021/6/7 3:52 下午
*/
Map<String,Integer> updateCenterPointByName(GridCenterPointForm param);
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java

@ -23,6 +23,7 @@ import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.*;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO;
import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.org.CustomerGridEntity;
@ -102,4 +103,8 @@ public interface ScreenCustomerGridService extends BaseService<ScreenCustomerGri
* @date 2021/3/23 下午4:02
*/
List<ScreenCustomerGridDTO> selectBelongGridInfo(String customerId,String level);
}
Integer updateCenterPointByName(String customerId, String title, List<Double> center);
List<ScreenProjectGridDailyDTO> selectGridInfoByCustomerId(String customerId);
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

@ -19,6 +19,8 @@ package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.DateUtils;
@ -29,6 +31,7 @@ import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.*;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO;
import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
@ -38,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@ -186,4 +190,20 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
public List<ScreenCustomerGridDTO> selectBelongGridInfo(String customerId, String level) {
return baseDao.selectBelongGridInfo(customerId, level);
}
}
@Override
public Integer updateCenterPointByName(String customerId, String title, List<Double> center) {
LambdaUpdateWrapper<ScreenCustomerGridEntity> tWrapper = new LambdaUpdateWrapper<>();
String val = center.toString();
List<String> array = new ArrayList<>(Collections.singleton(val));
tWrapper.eq(ScreenCustomerGridEntity::getCustomerId,customerId)
.likeRight(ScreenCustomerGridEntity::getGridName,title)
.set(ScreenCustomerGridEntity::getCenterMark, array.toString());
return baseDao.update(null,tWrapper);
}
@Override
public List<ScreenProjectGridDailyDTO> selectGridInfoByCustomerId(String customerId) {
return baseDao.selectGridInfoByCustomerId(customerId);
}
}

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/EIDimServiceImpl.java

@ -1,5 +1,7 @@
package com.epmet.service.impl;
import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.dto.screen.form.GridCenterPointForm;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
@ -16,10 +18,8 @@ import com.epmet.service.org.CustomerGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
@Service
public class EIDimServiceImpl implements EIDimService {
@ -130,6 +130,35 @@ public class EIDimServiceImpl implements EIDimService {
screenCustomerGridService.addAndUpdateGrids(grids2Add, grids2Update);
}
@Override
public Map<String,Integer> updateCenterPointByName(GridCenterPointForm param) {
//todo 怎么反向判断 左匹配
List<ScreenProjectGridDailyDTO> gridInfos = screenCustomerGridService.selectGridInfoByCustomerId(param.getCustomerId());
Map<String,Integer> result = new HashMap<>();
gridInfos.forEach(grid->{
//客户id 和组织id 都相等 且 名字 包含关系时才修改
if (grid.getCustomerId().equals(param.getCustomerId())){
AtomicInteger integer = new AtomicInteger(0);
param.getCenterDataList().forEach(o ->{
if (grid.getGridName().contains(o.getTitle())) {
Integer effectRow = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(), o.getTitle(), o.getCenter());
integer.addAndGet(effectRow);
}
result.put(grid.getGridId(),integer.intValue());
});
}
});
/*param.getCenterDataList().forEach(o ->{
Integer integer = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(),param.getAgencyId(), o.getTitle(), o.getCenter());
if (integer == 0 || integer > 1){
result.put(o.getTitle(),integer);
}
});*/
return result;
}
private List<CustomerGridEntity> listGrids2Update() {
ScreenCustomerGridEntity lastUpdateGrid = screenCustomerGridService.getLastUpdateGrid();
if (lastUpdateGrid != null) {

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java

@ -1,7 +1,6 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.convert.DateConverter;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.GroupConstant;
import com.epmet.dto.AgencySubTreeDto;
@ -11,7 +10,6 @@ import com.epmet.dto.group.form.GroupTotalFormDTO;
import com.epmet.dto.group.result.*;
import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.entity.group.ResiGroupEntity;
import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.entity.stats.DimGridEntity;
import com.epmet.entity.stats.FactGroupTotalAgencyDailyEntity;
@ -24,14 +22,12 @@ import com.epmet.service.stats.*;
import com.epmet.util.DimIdGenerator;
import com.epmet.util.ModuleConstant;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
@ -83,13 +79,12 @@ public class StatsGroupServiceImpl implements StatsGroupService {
Integer pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIds = new ArrayList<>();
if (StringUtils.isNotBlank(formDTO.getCustomerId())) {
customerIds.add(formDTO.getCustomerId());
} else {
customerIds = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
}
do {
if (StringUtils.isNotBlank(formDTO.getCustomerId())) {
customerIds.add(formDTO.getCustomerId());
} else {
customerIds = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
}
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(formDTO);
if (customerIds.size() != NumConstant.ZERO) {
customerIds.forEach(customerId -> {
@ -214,7 +209,7 @@ public class StatsGroupServiceImpl implements StatsGroupService {
}
});
});
Integer groupCount = approvedResult.stream().collect(Collectors.summingInt(AgencyGroupTotalCountResultDTO::getGridGroupCount));
Integer groupCount = approvedResult.stream().mapToInt(AgencyGroupTotalCountResultDTO::getGridGroupCount).sum();
agencyResult.setGroupTotalCount(groupCount);
// 3. 机关下所有组内人数和(不需要去重) 人员状态 != "removed"
List<AgencyGridGroupPeopleTotalResultDTO> peopleTotal = new ArrayList<>();
@ -226,7 +221,7 @@ public class StatsGroupServiceImpl implements StatsGroupService {
}
});
});
Integer groupPeopleCount = peopleTotal.stream().collect(Collectors.summingInt(AgencyGridGroupPeopleTotalResultDTO::getGridGroupPeopleTotal));
Integer groupPeopleCount = peopleTotal.stream().mapToInt(AgencyGridGroupPeopleTotalResultDTO::getGridGroupPeopleTotal).sum();
agencyResult.setGroupMemberTotalCount(groupPeopleCount);
// 4. 机关下小组平均人数
agencyResult.setGroupMemberAvgCount(

3
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));
}
}
}

2
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

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolDetailDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailEntity> {
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffPatrolRecordDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordEntity> {
}

101
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolDetailEntity.java

@ -0,0 +1,101 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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_detail")
public class StaffPatrolDetailEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* staff_patrol_record.ID
*/
private String staffPatrolRecId;
/**
* 前端给的序号
*/
private Integer serialNum;
/**
* 上传时间后台自动插入该时间
*/
private Date uploadTime;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 速度单位m/s开始和结束时默认0
*/
private String speed;
/**
* 位置的精确度
*/
private String accuracy;
/**
* 高度单位米
*/
private String altitude;
/**
* 垂直经度单位m
*/
private String verticalaccuracy;
/**
* 水平经度单位m
*/
private String horizontalaccuracy;
/**
* 地址暂时不用
*/
private String address;
}

91
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StaffPatrolRecordEntity.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

32
epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolDetailService.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailEntity> {
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffPatrolRecordService.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordEntity> {
}

37
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolDetailServiceImpl.java

@ -0,0 +1,37 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolDetailDao, StaffPatrolDetailEntity> implements StaffPatrolDetailService {
}

36
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffPatrolRecordServiceImpl.java

@ -0,0 +1,36 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<StaffPatrolRecordDao, StaffPatrolRecordEntity> implements StaffPatrolRecordService {
}

29
epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolDetailDao.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.StaffPatrolDetailDao">
<resultMap type="com.epmet.entity.StaffPatrolDetailEntity" id="staffPatrolDetailMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="staffPatrolRecId" column="STAFF_PATROL_REC_ID"/>
<result property="serialNum" column="SERIAL_NUM"/>
<result property="uploadTime" column="UPLOAD_TIME"/>
<result property="latitude" column="LATITUDE"/>
<result property="longitude" column="LONGITUDE"/>
<result property="speed" column="SPEED"/>
<result property="accuracy" column="ACCURACY"/>
<result property="altitude" column="ALTITUDE"/>
<result property="verticalaccuracy" column="VERTICALACCURACY"/>
<result property="horizontalaccuracy" column="HORIZONTALACCURACY"/>
<result property="address" column="ADDRESS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

27
epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.StaffPatrolRecordDao">
<resultMap type="com.epmet.entity.StaffPatrolRecordEntity" id="staffPatrolRecordMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="grid" column="GRID"/>
<result property="gridPids" column="GRID_PIDS"/>
<result property="staffId" column="STAFF_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="patrolStartTime" column="PATROL_START_TIME"/>
<result property="patrolEndTime" column="PATROL_END_TIME"/>
<result property="actrualEndTime" column="ACTRUAL_END_TIME"/>
<result property="totalTime" column="TOTAL_TIME"/>
<result property="status" column="STATUS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save