Browse Source

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

# Conflicts:
#	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
#	epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
dev
jianjun 4 years ago
parent
commit
e003e6c325
  1. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java
  2. 4
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java
  3. 2
      epmet-auth/src/main/resources/bootstrap.yml
  4. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java
  5. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  6. 0
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/uv11__point_rule_sort.sql
  7. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BlockChainProjectController.java
  8. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java
  9. 1
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  10. 148
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridUserWorkDTO.java
  11. 49
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridUserWorkFormDTO.java
  12. 38
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridUserWorkController.java
  13. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  14. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridUserWorkDao.java
  15. 118
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GridUserWorkEntity.java
  16. 87
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridUserWorkService.java
  17. 119
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridUserWorkServiceImpl.java
  18. 7
      epmet-user/epmet-user-server/src/main/resources/mapper/GridUserWorkDao.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)

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;
/**
* 备注
*/

2
epmet-auth/src/main/resources/bootstrap.yml

@ -32,6 +32,8 @@ spring:
namespace: @nacos.discovery.namespace@
#不把自己注册到注册中心的地址
register-enabled: @nacos.register-enabled@
serviceListChangedListening:
enable: @nacos.service-list-changed-listening.enable@
config:
enabled: @nacos.config-enabled@
server-addr: @nacos.server-addr@

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

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml

@ -46,7 +46,7 @@
IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA,
CEILING(sum(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal,
IFNULL(avg(data.PLAT_JOIN_PARTY_RATIO),0) AS platJoinPartyRatio,
DATA_END_TIME as dataEndTime
data.DATA_END_TIME as dataEndTime
FROM
screen_pioneer_data data
LEFT JOIN

0
epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql → epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/uv11__point_rule_sort.sql

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BlockChainProjectController.java

@ -28,8 +28,8 @@ public class BlockChainProjectController {
*/
@PostMapping("create")
public Result blockChainCreateProject(@RequestBody BlockChainCreateProjectFormDTO input) {
ValidatorUtils.validateEntity(input);
blockChainProjectService.blockChainCreateProject(input);
//ValidatorUtils.validateEntity(input);
//blockChainProjectService.blockChainCreateProject(input);
return new Result();
}
@ -40,8 +40,8 @@ public class BlockChainProjectController {
*/
@PostMapping("process")
public Result blockChainProcessProject(@RequestBody BlockChainProcessProjectFormDTO input) {
ValidatorUtils.validateEntity(input);
blockChainProjectService.blockChainProcessProject(input);
//ValidatorUtils.validateEntity(input);
//blockChainProjectService.blockChainProcessProject(input);
return new Result();
}
}

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java

@ -36,6 +36,10 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
*/
public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) {
if (true) {
return;
}
// 1.项目主信息
BlockChainProjectFormDTO project = null;

1
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3150,4 +3150,3 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return simpleDateFormat.format(date);
}
}

148
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/GridUserWorkDTO.java

@ -0,0 +1,148 @@
/**
* 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-10-19
*/
@Data
public class GridUserWorkDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名称
*/
private String gridName;
/**
* 组织ID
*/
private String parentOrgId;
/**
* 组织名称
*/
private String orgName;
/**
* PIDS
*/
private String pids;
/**
* 网格编码
*/
private String gridCode;
/**
* 例行工作类型
01:重点巡查
0101:出租房巡查
0102:新增流动人口
0103:重点场所巡查
0104:宗教活动
0199:其他
02:特殊人群
0201:刑满释放人员
0202:社区矫正
0203:吸毒人员
0204:信访人员
*/
private String workType;
/**
* 例行工作类型名字
*/
private String workTypeName;
/**
* 发生日期 格式为YYYY-MM-DD
*/
private Date happenTime;
/**
* 基础信息主键
出租房巡查重点场所巡查刑满释放人员社区矫正吸毒人员信访人员重点青少年和精神障碍者必填
*/
private String baseInfoId;
/**
* 有无变动异常YN
*/
private String workResult;
/**
* 备注说明
*/
private String workContent;
/**
*
*/
private Integer delFlag;
/**
* 乐观锁
*/
private String revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

49
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridUserWorkFormDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* @Author zxc
* @DateTime 2021/10/19 10:41 上午
* @DESC
*/
@Data
public class GridUserWorkFormDTO implements Serializable {
private static final long serialVersionUID = -2328321123796674558L;
public interface GridUserWorkForm{}
@NotBlank(message = "网格ID不能为空",groups = GridUserWorkForm.class)
private String gridId;
@NotBlank(message = "例行工作类型不能为空",groups = GridUserWorkForm.class)
private String workType;
@NotBlank(message = "例行工作类型名字不能为空",groups = GridUserWorkForm.class)
private String workTypeName;
/**
* YN
*/
@NotBlank(message = "有无变动(异常)不能为空",groups = GridUserWorkForm.class)
private String workResult;
@NotNull(message = "发生时间不能为空",groups = GridUserWorkForm.class)
private Date happenTime;
/**
* 备注说明
*/
private String workContent;
/**
* 基础信息ID相关信息
*/
private String baseInfoId;
}

38
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridUserWorkController.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.GridUserWorkFormDTO;
import com.epmet.service.GridUserWorkService;
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("griduserwork")
public class GridUserWorkController {
@Autowired
private GridUserWorkService gridUserWorkService;
/**
* @Description 网格员例行工作
* @param formDTO
* @author zxc
* @date 2021/10/19 1:35 下午
*/
@NoRepeatSubmit
@PostMapping("griduserwork")
public Result gridUserWork(@RequestBody GridUserWorkFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GridUserWorkFormDTO.GridUserWorkForm.class);
gridUserWorkService.gridUserWork(formDTO);
return new Result();
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -144,7 +144,7 @@ public class IcResiUserController {
return templateName;
}
}
{
// 初始化上传目录
String home = System.getProperty("user.home");
@ -563,6 +563,7 @@ public class IcResiUserController {
}
}
/**
* 党员年龄范围统计
* @Param formDTO
@ -626,5 +627,4 @@ public class IcResiUserController {
IcResiUserBriefDTO r = icResiUserService.getResiBrief(resiUserId, customerId);
return new Result<IcResiUserBriefDTO>().ok(r);
}
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridUserWorkDao.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.GridUserWorkEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 网格员例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-19
*/
@Mapper
public interface GridUserWorkDao extends BaseDao<GridUserWorkEntity> {
}

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

@ -0,0 +1,118 @@
/**
* 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("grid_user_work")
public class GridUserWorkEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名称
*/
private String gridName;
/**
* 组织ID
*/
private String parentOrgId;
/**
* 组织名称
*/
private String orgName;
/**
* PIDS
*/
private String pids;
/**
* 网格编码
*/
private String gridCode;
/**
* 例行工作类型
01:重点巡查
0101:出租房巡查
0102:新增流动人口
0103:重点场所巡查
0104:宗教活动
0199:其他
02:特殊人群
0201:刑满释放人员
0202:社区矫正
0203:吸毒人员
0204:信访人员
*/
private String workType;
/**
* 例行工作类型名字
*/
private String workTypeName;
/**
* 发生日期 格式为YYYY-MM-DD
*/
private Date happenTime;
/**
* 基础信息主键
出租房巡查重点场所巡查刑满释放人员社区矫正吸毒人员信访人员重点青少年和精神障碍者必填
*/
private String baseInfoId;
/**
* 有无变动异常YN
*/
private String workResult;
/**
* 备注说明
*/
private String workContent;
}

87
epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridUserWorkService.java

@ -0,0 +1,87 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GridUserWorkDTO;
import com.epmet.dto.form.GridUserWorkFormDTO;
import com.epmet.entity.GridUserWorkEntity;
import java.util.List;
import java.util.Map;
/**
* 网格员例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-19
*/
public interface GridUserWorkService extends BaseService<GridUserWorkEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GridUserWorkDTO>
* @author generator
* @date 2021-10-19
*/
PageData<GridUserWorkDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GridUserWorkDTO>
* @author generator
* @date 2021-10-19
*/
List<GridUserWorkDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GridUserWorkDTO
* @author generator
* @date 2021-10-19
*/
GridUserWorkDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-10-19
*/
void save(GridUserWorkDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-10-19
*/
void update(GridUserWorkDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-10-19
*/
void delete(String[] ids);
/**
* @Description 网格员例行工作
* @param formDTO
* @author zxc
* @date 2021/10/19 1:35 下午
*/
void gridUserWork(GridUserWorkFormDTO formDTO);
}

119
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridUserWorkServiceImpl.java

@ -0,0 +1,119 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.GridUserWorkDao;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.GridUserWorkDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.GridUserWorkFormDTO;
import com.epmet.entity.GridUserWorkEntity;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.GridUserWorkService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 网格员例行工作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-19
*/
@Service
public class GridUserWorkServiceImpl extends BaseServiceImpl<GridUserWorkDao, GridUserWorkEntity> implements GridUserWorkService {
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Override
public PageData<GridUserWorkDTO> page(Map<String, Object> params) {
IPage<GridUserWorkEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GridUserWorkDTO.class);
}
@Override
public List<GridUserWorkDTO> list(Map<String, Object> params) {
List<GridUserWorkEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GridUserWorkDTO.class);
}
private QueryWrapper<GridUserWorkEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GridUserWorkEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GridUserWorkDTO get(String id) {
GridUserWorkEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GridUserWorkDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GridUserWorkDTO dto) {
GridUserWorkEntity entity = ConvertUtils.sourceToTarget(dto, GridUserWorkEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GridUserWorkDTO dto) {
GridUserWorkEntity entity = ConvertUtils.sourceToTarget(dto, GridUserWorkEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 网格员例行工作
* @param formDTO
* @author zxc
* @date 2021/10/19 1:35 下午
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void gridUserWork(GridUserWorkFormDTO formDTO) {
GridUserWorkEntity entity = ConvertUtils.sourceToTarget(formDTO, GridUserWorkEntity.class);
CustomerGridFormDTO gridFormDTO = new CustomerGridFormDTO();
gridFormDTO.setGridId(formDTO.getGridId());
Result<CustomerGridDTO> gridBaseInfoData = govOrgOpenFeignClient.getGridBaseInfoByGridId(gridFormDTO);
if (!gridBaseInfoData.success()){
throw new RenException("查询网格基本信息失败......");
}
CustomerGridDTO gridBaseInfo = gridBaseInfoData.getData();
entity.setGridName(gridBaseInfo.getGridName());
// 暂时为 哈哈,后期缓存加上 gridCode在修改
entity.setGridCode("哈哈");
entity.setCustomerId(gridBaseInfo.getCustomerId());
entity.setParentOrgId(gridBaseInfo.getPid());
entity.setOrgName(gridBaseInfo.getAgencyName());
entity.setPids(gridBaseInfo.getPids());
baseDao.insert(entity);
}
}

7
epmet-user/epmet-user-server/src/main/resources/mapper/GridUserWorkDao.xml

@ -0,0 +1,7 @@
<?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.GridUserWorkDao">
</mapper>
Loading…
Cancel
Save