Browse Source

Merge remote-tracking branch 'remotes/origin/dev_grid_user_work' into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
aa21130bf9
  1. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java
  2. 11
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  3. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  4. 10
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java
  5. 3
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java
  6. 4
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java
  7. 3
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java
  8. 8
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java
  9. 27
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.8__add_dict_data_pid.sql
  10. 13
      epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml
  11. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java
  12. 20
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictTreeResultDTO.java
  13. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  14. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/TreeStringNode.java
  15. 66
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolRoutineWorkFormDTO.java
  16. 38
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java
  17. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/PatrolRoutineWorkDao.java
  18. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/PatrolRoutineWorkTypeDao.java
  19. 90
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridUserWorkEntity.java
  20. 88
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkEntity.java
  21. 61
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkTypeEntity.java
  22. 37
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/PatrolRoutineWorkService.java
  23. 31
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/PatrolRoutineWorkTypeService.java
  24. 162
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java
  25. 36
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkTypeServiceImpl.java
  26. 35
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.20__user_routine_work.sql
  27. 27
      epmet-user/epmet-user-server/src/main/resources/mapper/PatrolRoutineWorkDao.xml
  28. 21
      epmet-user/epmet-user-server/src/main/resources/mapper/PatrolRoutineWorkTypeDao.xml

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java

@ -42,6 +42,8 @@ public class SysDictDataDTO implements Serializable {
private String dictValue;
private String dictPValue;
private String remark;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)

11
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java

@ -3,6 +3,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
@ -88,6 +89,16 @@ public interface EpmetAdminOpenFeignClient {
@PostMapping("/sys/dict/data/dictmap/{dictType}")
Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType);
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map < String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("/sys/dict/data/dictTree/{dictType}")
Result<List<DictTreeResultDTO>> dictTree(@PathVariable("dictType") String dictType);
@PostMapping("/sys/dict/data/dictlist")
Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO);
}

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
@ -49,6 +50,11 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictMap", dictType);
}
@Override
public Result<List<DictTreeResultDTO>> dictTree(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictTree", dictType);
}
@Override
public Result<List<DictListResultDTO>> dictList(DictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO);

10
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java

@ -10,6 +10,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
@ -150,6 +151,15 @@ public class SysDictDataController {
return new Result<List<DictListResultDTO>>().ok(sysDictDataService.dictList(formDTO.getDictType()));
}
/**
* @Description 字典数据查询通用接口
* @Author sun
*/
@PostMapping("dictTree/{dictType}")
public Result<List<DictTreeResultDTO>> dictListTree(@PathVariable("dictType") String dictType) {
return new Result<List<DictTreeResultDTO>>().ok(sysDictDataService.dictListTree(dictType));
}
/**
* 字典数据查询通用接口
* @Param dictType

3
epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java

@ -10,6 +10,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.entity.DictData;
import com.epmet.entity.SysDictDataEntity;
import org.apache.ibatis.annotations.Mapper;
@ -30,4 +31,6 @@ public interface SysDictDataDao extends BaseDao<SysDictDataEntity> {
List<DictData> getDictDataList();
List<DictListResultDTO> selectDictList(String dictType);
List<DictTreeResultDTO> selectDictData(String dictType);
}

4
epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java

@ -39,6 +39,10 @@ public class SysDictDataEntity extends BaseEntity {
* 字典值
*/
private String dictValue;
/**
* 父级字典值 顶级0
*/
private String dictPValue;
/**
* 备注
*/

3
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java

@ -10,6 +10,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysDictDataDTO;
@ -87,4 +88,6 @@ public interface SysDictDataService extends BaseService<SysDictDataEntity> {
Map<String, String> dictMap(String dictType);
List<DictTreeResultDTO> dictListTree(String dictType);
}

8
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java

@ -13,9 +13,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.TreeUtils;
import com.epmet.dao.SysDictDataDao;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.entity.SysDictDataEntity;
@ -217,4 +219,10 @@ public class SysDictDataServiceImpl extends BaseServiceImpl<SysDictDataDao, SysD
return resultDTOList.stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel));
}
@Override
public List<DictTreeResultDTO> dictListTree(String dictType) {
List<DictTreeResultDTO> resultDTOList = baseDao.selectDictData(dictType);
return TreeUtils.buildTree(resultDTOList);
}
}

27
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.8__add_dict_data_pid.sql

@ -0,0 +1,27 @@
-- 添加pid (dict_p_value) 让字典支持 树形结构
ALTER TABLE `epmet_admin`.`sys_dict_data`
ADD COLUMN `dict_p_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '父级value项;默认为0' AFTER `dict_value`;
ALTER TABLE `epmet_admin`.`sys_dict_data`
MODIFY COLUMN `dict_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典值' AFTER `dict_label`;
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473150812296318978, 'patrol_work_type', '例行工作分类', '网格员巡查-例行工作事项分类', 13, 1067246875800000001, '2021-12-21 12:40:45', 12, '2021-12-21 17:37:12');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473151790785499137, 1473150812296318978, '重点巡查', '01', '0', '', 1, NULL, NULL, 1, '2021-12-21 14:17:14');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473175635001085953, 1473150812296318978, '出租房屋巡查', '0101', '01', '', 1, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473175848537296897, 1473150812296318978, '重点场所巡查', '0102', '01', '', 2, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473175904669667329, 1473150812296318978, '宗教活动', '0103', '01', '', 3, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473175977868660738, 1473150812296318978, '其他', '0199', '01', '', 99, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473151862784921602, 1473150812296318978, '特殊人群', '02', '0', '', 2, NULL, NULL, 1, '2021-12-21 14:17:24');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176029219524610, 1473150812296318978, '刑满释放人员', '0201', '02', '', 1, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176085809074178, 1473150812296318978, '社区矫正', '0202', '02', '', 2, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176129127845889, 1473150812296318978, '吸毒人员', '0203', '02', '', 3, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176201798356994, 1473150812296318978, '信访人员', '0204', '02', '', 4, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176249558896642, 1473150812296318978, '重点青少年', '0205', '02', '', 5, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176305758375937, 1473150812296318978, '精神障碍者', '0206', '02', '', 6, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473151924881592321, 1473150812296318978, '为民服务', '09', '0', '', 3, NULL, NULL, 1, '2021-12-21 14:20:06');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176393352220673, 1473150812296318978, '公共服务', '0901', '09', '', 1, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176479897489410, 1473150812296318978, '权益保障', '0902', '09', '', 2, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176534641545218, 1473150812296318978, '政策宣传', '0903', '09', '', 3, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176583006064641, 1473150812296318978, '便利服务', '0904', '09', '', 4, NULL, NULL, NULL, NULL);
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1473176670985785345, 1473150812296318978, '其他', '0999', '09', '', 99, NULL, NULL, NULL, NULL);

13
epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml

@ -19,5 +19,18 @@
ORDER BY
a.sort ASC
</select>
<select id="selectDictData" resultType="com.epmet.commons.tools.dto.result.DictTreeResultDTO">
SELECT
a.dict_value id,
a.dict_p_value pid,
a.dict_label name
FROM
sys_dict_data a
INNER JOIN sys_dict_type b ON a.dict_type_id = b.id
WHERE
b.dict_type = #{dictType}
ORDER BY
a.sort asc
</select>
</mapper>

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java

@ -14,4 +14,5 @@ public class DictListResultDTO implements Serializable {
private static final long serialVersionUID = 8618231166600518980L;
private String label;
private String value;
private List<DictListResultDTO> children;
}

20
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictTreeResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.commons.tools.dto.result;
import com.epmet.commons.tools.utils.TreeStringNode;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 字典数据查询-接口返参
* @Author sun
*/
@Data
public class DictTreeResultDTO extends TreeStringNode<DictTreeResultDTO> implements Serializable {
private static final long serialVersionUID = 3772355047088964759L;
/**
* 上级ID
*/
private String pid;
private String name;
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java

@ -20,6 +20,7 @@ public enum DictTypeEnum {
USER_DEMAND_REPORT_TYPE("user_demand_report_type","居民需求上报类型",9),
USER_DEMAND_SERVICE_TYPE("user_demand_service_type","居民需求服务方类型",10),
AGE_GROUP("age_group", "年龄范围", 11),
PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13),
;
private final String code;

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/TreeStringNode.java

@ -8,6 +8,7 @@
package com.epmet.commons.tools.utils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;

66
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PatrolRoutineWorkFormDTO.java

@ -0,0 +1,66 @@
package com.epmet.dto.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/10/19 10:41 上午
* @DESC
*/
@Data
public class PatrolRoutineWorkFormDTO implements Serializable {
private static final long serialVersionUID = 3411355616849866888L;
public interface AddOrUpdateForm {
}
private String customerId;
@NotBlank(message = "网格ID不能为空", groups = AddOrUpdateForm.class)
private String gridId;
@NotBlank(message = "事项名称不能为空", groups = AddOrUpdateForm.class)
private String title;
@NotEmpty(message = "例行工作类型不能为空", groups = AddOrUpdateForm.class)
private List<String> workTypeList;
@Range(min = 0, max = 1, message = "有无变动(异常)格式错误", groups = AddOrUpdateForm.class)
@NotNull(message = "有无变动(异常)不能为空", groups = AddOrUpdateForm.class)
private Integer isNormal;
@JsonFormat(pattern = "yyyy-MM-dd")
@NotNull(message = "发生时间不能为空", groups = AddOrUpdateForm.class)
private String happenTime;
@NotBlank(message = "工作简介不能为空", groups = AddOrUpdateForm.class)
private String workContent;
@NotBlank(message = "工作地点不能为空", groups = AddOrUpdateForm.class)
private String address;
/**
* 基础信息ID相关信息暂时没有
*/
private String baseInfoId;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

38
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java

@ -0,0 +1,38 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.PatrolRoutineWorkFormDTO;
import com.epmet.service.PatrolRoutineWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-19
*/
@RestController
@RequestMapping("patrolroutinework")
public class PatrolRoutineWorkController {
@Autowired
private PatrolRoutineWorkService gridUserWorkService;
/**
* @Description 添加例行工作
* @param formDTO
* @author zxc
* @date 2021/10/19 1:35 下午
*/
@NoRepeatSubmit
@PostMapping("add")
public Result<Boolean> gridUserWork( @RequestBody PatrolRoutineWorkFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, PatrolRoutineWorkFormDTO.AddOrUpdateForm.class);
gridUserWorkService.add(formDTO);
return new Result().ok(true);
}
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/PatrolRoutineWorkDao.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.PatrolRoutineWorkEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
@Mapper
public interface PatrolRoutineWorkDao extends BaseDao<PatrolRoutineWorkEntity> {
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/PatrolRoutineWorkTypeDao.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.PatrolRoutineWorkTypeEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
@Mapper
public interface PatrolRoutineWorkTypeDao extends BaseDao<PatrolRoutineWorkTypeEntity> {
}

90
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridUserWorkEntity.java

@ -0,0 +1,90 @@
/**
* 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-10-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("patrol_routine_work")
public class GridUserWorkEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* gridId的PID
*/
private String pids;
/**
* 用户Id user.id 谁创建的
*/
private String userId;
/**
* 事项名称
*/
private String title;
/**
* 发生日期 格式为YYYY-MM-DD
*/
private Date happenTime;
/**
* 有无变动异常10
*/
private Integer isNormal;
/**
* 备注说明
*/
private String workContent;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

88
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkEntity.java

@ -0,0 +1,88 @@
/**
* 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;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("patrol_routine_work")
public class PatrolRoutineWorkEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 网格表Id(CUSTOMER_GRID.id)居民党员角色值为all热心居民角色对应的网格Id
*/
private String gridId;
/**
* 网格所有上级id
*/
private String pids;
/**
* 用户Id user.id
*/
private String userId;
/**
* 事项名称
*/
private String title;
/**
* 工作日期 格式为YYYY-MM-DD
*/
private String happenTime;
/**
* 有无变动异常10
*/
private Integer isNormal;
/**
* 工作内容
*/
private String workContent;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

61
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/PatrolRoutineWorkTypeEntity.java

@ -0,0 +1,61 @@
/**
* 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-12-21
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("patrol_routine_work_type")
public class PatrolRoutineWorkTypeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 例行工作Id
*/
private String routineWorkId;
/**
* 例行工作字典项值typepatrol_work_type
*/
private String workTypeCode;
/**
* 所有上级类别code组合
*/
private String allPCode;
}

37
epmet-user/epmet-user-server/src/main/java/com/epmet/service/PatrolRoutineWorkService.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;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.PatrolRoutineWorkFormDTO;
import com.epmet.entity.PatrolRoutineWorkEntity;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
public interface PatrolRoutineWorkService extends BaseService<PatrolRoutineWorkEntity> {
/**
* desc:添加例行工作
* @param formDTO
*/
void add(PatrolRoutineWorkFormDTO formDTO);
}

31
epmet-user/epmet-user-server/src/main/java/com/epmet/service/PatrolRoutineWorkTypeService.java

@ -0,0 +1,31 @@
/**
* 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.PatrolRoutineWorkTypeEntity;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
public interface PatrolRoutineWorkTypeService extends BaseService<PatrolRoutineWorkTypeEntity> {
}

162
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java

@ -0,0 +1,162 @@
/**
* 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.alibaba.fastjson.JSON;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.PatrolRoutineWorkDao;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.PatrolRoutineWorkFormDTO;
import com.epmet.entity.PatrolRoutineWorkEntity;
import com.epmet.entity.PatrolRoutineWorkTypeEntity;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.PatrolRoutineWorkService;
import com.epmet.service.PatrolRoutineWorkTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
@Slf4j
@Service
public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineWorkDao, PatrolRoutineWorkEntity> implements PatrolRoutineWorkService {
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Autowired
PatrolRoutineWorkTypeService patrolRoutineWorkTypeService;
/**
* @param formDTO
* @Description 网格员例行工作
* @author zxc
* @date 2021/10/19 1:35 下午
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void add(PatrolRoutineWorkFormDTO formDTO) {
PatrolRoutineWorkEntity entity = ConvertUtils.sourceToTarget(formDTO, PatrolRoutineWorkEntity.class);
CustomerGridFormDTO gridFormDTO = new CustomerGridFormDTO();
gridFormDTO.setGridId(formDTO.getGridId());
Result<CustomerGridDTO> gridBaseInfoData = govOrgOpenFeignClient.getGridBaseInfoByGridId(gridFormDTO);
if (!gridBaseInfoData.success()) {
throw new EpmetException("查询网格基本信息失败......");
}
CustomerGridDTO gridBaseInfo = gridBaseInfoData.getData();
entity.setPids(gridBaseInfo.getPids());
entity.setUserId(loginUserUtil.getLoginUserId());
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
//entity.setUserId("loginUserUtil.getLoginUserId()");
//entity.setCustomerId("loginUserUtil.getLoginUserCustomerId()");
baseDao.insert(entity);
Result<List<DictTreeResultDTO>> mapResult = adminOpenFeignClient.dictTree(DictTypeEnum.PATROL_WORK_TYPE.getCode());
if (mapResult == null || !mapResult.success() || CollectionUtils.isEmpty(mapResult.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "例行工作类型字典获取失败!");
}
List<DictTreeResultDTO> dictTree = mapResult.getData();
Map<String, StringBuilder> pidsMap = new HashMap<>();
dictTree.forEach(dto -> buildAllParentIdPath(pidsMap, dto));
List<PatrolRoutineWorkTypeEntity> workTypeList = new ArrayList<>();
formDTO.getWorkTypeList().forEach(code -> {
PatrolRoutineWorkTypeEntity typeEntity = new PatrolRoutineWorkTypeEntity();
typeEntity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
typeEntity.setRoutineWorkId(entity.getId());
typeEntity.setWorkTypeCode(code);
StringBuilder pids = pidsMap.get(code);
typeEntity.setAllPCode(pids.length() == 0 ? NumConstant.ZERO_STR : pids.toString());
workTypeList.add(typeEntity);
});
patrolRoutineWorkTypeService.insertBatch(workTypeList);
}
/**
* desc:递归遍历树形结构 构建pids 根节点pids 为空字符串
*
* @param result 构建的结果
* @param crurent
*/
private static void buildAllParentIdPath(Map<String, StringBuilder> result, DictTreeResultDTO crurent) {
String id = crurent.getId();
String pid = crurent.getPid();
StringBuilder pidsPath = new StringBuilder();
StringBuilder pidSb = result.get(pid);
if (pidSb == null) {
pidSb = new StringBuilder();
} else if (pidSb.indexOf(pid) == -1) {
if (pidSb.length() > 0) {
pidSb.append(StrConstant.COLON);
}
pidSb.append(pid);
}
pidsPath.append(pidSb);
result.put(id, pidsPath);
log.debug("id:" + id + " pids:" + pidsPath.toString());
List<DictTreeResultDTO> children = crurent.getChildren();
if (children != null) {
crurent.getChildren().forEach(item -> buildAllParentIdPath(result, item));
}
}
public static void main(String[] args) {
String str = "[{\"id\":\"01\",\"pid\":\"0\",\"children\":[{\"id\":\"0101\",\"pid\":\"01\",\"children\":[{\"id\":\"010101\",\"pid\":\"0101\",\"children\":[],\"name\":\"出租房屋巡查\"}],\"name\":\"出租房屋巡查\"},{\"id\":\"0102\",\"pid\":\"01\",\"children\":[],\"name\":\"重点场所巡查\"},{\"id\":\"0103\",\"pid\":\"01\",\"children\":[],\"name\":\"宗教活动\"},{\"id\":\"0199\",\"pid\":\"01\",\"children\":[],\"name\":\"其他\"}],\"name\":\"重点巡查\"},{\"id\":\"02\",\"pid\":\"0\",\"children\":[{\"id\":\"0201\",\"pid\":\"02\",\"children\":[],\"name\":\"刑满释放人员\"},{\"id\":\"0202\",\"pid\":\"02\",\"children\":[],\"name\":\"社区矫正\"},{\"id\":\"0203\",\"pid\":\"02\",\"children\":[],\"name\":\"吸毒人员\"},{\"id\":\"0204\",\"pid\":\"02\",\"children\":[],\"name\":\"信访人员\"},{\"id\":\"0205\",\"pid\":\"02\",\"children\":[],\"name\":\"重点青少年\"},{\"id\":\"0206\",\"pid\":\"02\",\"children\":[],\"name\":\"精神障碍者\"}],\"name\":\"特殊人群\"},{\"id\":\"09\",\"pid\":\"0\",\"children\":[{\"id\":\"0901\",\"pid\":\"09\",\"children\":[],\"name\":\"公共服务\"},{\"id\":\"0902\",\"pid\":\"09\",\"children\":[],\"name\":\"权益保障\"},{\"id\":\"0903\",\"pid\":\"09\",\"children\":[],\"name\":\"政策宣传\"},{\"id\":\"0904\",\"pid\":\"09\",\"children\":[],\"name\":\"便利服务\"},{\"id\":\"0999\",\"pid\":\"09\",\"children\":[],\"name\":\"其他\"}],\"name\":\"为民服务\"}]";
List<DictTreeResultDTO> dtos = JSON.parseArray(str, DictTreeResultDTO.class);
Map<String, StringBuilder> result = new HashMap<>();
dtos.forEach(dto -> {
buildAllParentIdPath(result, dto);
});
System.out.println(result.get("010101"));
System.out.println(JSON.toJSONString(result));
}
}

36
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkTypeServiceImpl.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.PatrolRoutineWorkTypeDao;
import com.epmet.entity.PatrolRoutineWorkTypeEntity;
import com.epmet.service.PatrolRoutineWorkTypeService;
import org.springframework.stereotype.Service;
/**
* 巡查例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-21
*/
@Service
public class PatrolRoutineWorkTypeServiceImpl extends BaseServiceImpl<PatrolRoutineWorkTypeDao, PatrolRoutineWorkTypeEntity> implements PatrolRoutineWorkTypeService {
}

35
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.20__user_routine_work.sql

@ -0,0 +1,35 @@
CREATE TABLE `patrol_routine_work` (
`ID` varchar(64) NOT NULL COMMENT '唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id',
`GRID_ID` varchar(64) NOT NULL COMMENT '网格表Id(CUSTOMER_GRID.id)【居民党员角色值为all,热心居民角色对应的网格Id】',
`PIDS` varchar(512) NOT NULL COMMENT '网格所有上级id',
`USER_ID` varchar(64) NOT NULL COMMENT '用户Id user.id',
`TITLE` varchar(128) NOT NULL COMMENT '事项名称',
`HAPPEN_TIME` varchar(32) NOT NULL COMMENT '工作日期 格式为“YYYY-MM-DD”',
`IS_NORMAL` tinyint(1) NOT NULL COMMENT '有无变动(异常)1:是、0:否',
`WORK_CONTENT` varchar(1024) NOT NULL COMMENT '工作内容',
`LONGITUDE` varchar(32) DEFAULT '' COMMENT '经度',
`LATITUDE` varchar(32) DEFAULT '' COMMENT '纬度',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='巡查例行工作';
CREATE TABLE `patrol_routine_work_type` (
`ID` varchar(64) NOT NULL COMMENT '唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id',
`ROUTINE_WORK_ID` varchar(64) NOT NULL COMMENT '例行工作Id',
`WORK_TYPE_CODE` varchar(32) NOT NULL COMMENT '例行工作字典项值;type:patrol_work_type',
`ALL_P_CODE` varchar(256) NOT NULL COMMENT '所有上级类别code组合',
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE,
KEY `idx_work_id` (`ROUTINE_WORK_ID`) USING BTREE COMMENT '主表id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='巡查例行工作分类';

27
epmet-user/epmet-user-server/src/main/resources/mapper/PatrolRoutineWorkDao.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.PatrolRoutineWorkDao">
<resultMap type="com.epmet.entity.PatrolRoutineWorkEntity" id="patrolRoutineWorkMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="pids" column="PIDS"/>
<result property="userId" column="USER_ID"/>
<result property="title" column="TITLE"/>
<result property="happenTime" column="HAPPEN_TIME"/>
<result property="isNormal" column="IS_NORMAL"/>
<result property="workContent" column="WORK_CONTENT"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<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>

21
epmet-user/epmet-user-server/src/main/resources/mapper/PatrolRoutineWorkTypeDao.xml

@ -0,0 +1,21 @@
<?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.PatrolRoutineWorkTypeDao">
<resultMap type="com.epmet.entity.PatrolRoutineWorkTypeEntity" id="patrolRoutineWorkTypeMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="routineWorkId" column="ROUTINE_WORK_ID"/>
<result property="workTypeCode" column="WORK_TYPE_CODE"/>
<result property="allPCode" column="ALL_P_CODE"/>
<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