From 1b690906699f3c320beb4b2319cb02bd712d510e Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Fri, 14 Feb 2020 11:54:29 +0800
Subject: [PATCH 01/21] =?UTF-8?q?=E7=96=AB=E6=83=85=E9=98=B2=E6=8E=A7?=
=?UTF-8?q?=E5=93=A8=E5=8D=A1=E8=A1=A8=20=E4=BB=A3=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../esua/epdc/dto/EpidemicSentryPostDTO.java | 116 ++++++++++++++++++
.../EpidemicSentryPostController.java | 94 ++++++++++++++
.../epidemic/dao/EpidemicSentryPostDao.java | 33 +++++
.../entity/EpidemicSentryPostEntity.java | 86 +++++++++++++
.../excel/EpidemicSentryPostExcel.java | 83 +++++++++++++
.../redis/EpidemicSentryPostRedis.java | 47 +++++++
.../service/EpidemicSentryPostService.java | 95 ++++++++++++++
.../impl/EpidemicSentryPostServiceImpl.java | 104 ++++++++++++++++
.../mapper/epidemic/EpidemicSentryPostDao.xml | 26 ++++
9 files changed, 684 insertions(+)
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/EpidemicSentryPostDTO.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/entity/EpidemicSentryPostEntity.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/excel/EpidemicSentryPostExcel.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/redis/EpidemicSentryPostRedis.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/EpidemicSentryPostDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/EpidemicSentryPostDTO.java
new file mode 100644
index 000000000..d8378be45
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/EpidemicSentryPostDTO.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Data
+public class EpidemicSentryPostDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 哨卡编码
+ */
+ private String sentryPostCode;
+
+ /**
+ * 哨卡名称
+ */
+ private String sentryPostName;
+
+ /**
+ * 第三方哨卡id
+ */
+ private String thirdSentryPostId;
+
+ /**
+ * 哨卡所在网格id
+ */
+ private String gridId;
+
+ /**
+ * 哨卡小程序码访问地址
+ */
+ private String maCodeUrl;
+
+ /**
+ * 父所有部门ID
+ */
+ private String parentDeptIds;
+
+ /**
+ * 父所有部门名称
+ */
+ private String parentDeptNames;
+
+ /**
+ * 所有部门ID
+ */
+ private String allDeptIds;
+
+ /**
+ * 所有部门名称
+ */
+ private String allDeptNames;
+
+ /**
+ * 删除标识 0:否,1:是
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
new file mode 100644
index 000000000..ad53ad567
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
+import com.elink.esua.epdc.modules.epidemic.excel.EpidemicSentryPostExcel;
+import com.elink.esua.epdc.modules.epidemic.service.EpidemicSentryPostService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@RestController
+@RequestMapping("epidemicsentrypost")
+public class EpidemicSentryPostController {
+
+ @Autowired
+ private EpidemicSentryPostService epidemicSentryPostService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = epidemicSentryPostService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ EpidemicSentryPostDTO data = epidemicSentryPostService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody EpidemicSentryPostDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ epidemicSentryPostService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody EpidemicSentryPostDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ epidemicSentryPostService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ epidemicSentryPostService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = epidemicSentryPostService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, EpidemicSentryPostExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
new file mode 100644
index 000000000..bc9dadf9c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Mapper
+public interface EpidemicSentryPostDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/entity/EpidemicSentryPostEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/entity/EpidemicSentryPostEntity.java
new file mode 100644
index 000000000..1a01ec8ef
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/entity/EpidemicSentryPostEntity.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_epidemic_sentry_post")
+public class EpidemicSentryPostEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 哨卡编码
+ */
+ private String sentryPostCode;
+
+ /**
+ * 哨卡名称
+ */
+ private String sentryPostName;
+
+ /**
+ * 第三方哨卡id
+ */
+ private String thirdSentryPostId;
+
+ /**
+ * 哨卡所在网格id
+ */
+ private String gridId;
+
+ /**
+ * 哨卡小程序码访问地址
+ */
+ private String maCodeUrl;
+
+ /**
+ * 父所有部门ID
+ */
+ private String parentDeptIds;
+
+ /**
+ * 父所有部门名称
+ */
+ private String parentDeptNames;
+
+ /**
+ * 所有部门ID
+ */
+ private String allDeptIds;
+
+ /**
+ * 所有部门名称
+ */
+ private String allDeptNames;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/excel/EpidemicSentryPostExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/excel/EpidemicSentryPostExcel.java
new file mode 100644
index 000000000..29d0cc5b2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/excel/EpidemicSentryPostExcel.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Data
+public class EpidemicSentryPostExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "哨卡编码")
+ private String sentryPostCode;
+
+ @Excel(name = "哨卡名称")
+ private String sentryPostName;
+
+ @Excel(name = "第三方哨卡id")
+ private String thirdSentryPostId;
+
+ @Excel(name = "哨卡所在网格id")
+ private String gridId;
+
+ @Excel(name = "哨卡小程序码访问地址")
+ private String maCodeUrl;
+
+ @Excel(name = "父所有部门ID")
+ private String parentDeptIds;
+
+ @Excel(name = "父所有部门名称")
+ private String parentDeptNames;
+
+ @Excel(name = "所有部门ID")
+ private String allDeptIds;
+
+ @Excel(name = "所有部门名称")
+ private String allDeptNames;
+
+ @Excel(name = "删除标识 0:否,1:是")
+ private String delFlag;
+
+ @Excel(name = "乐观锁")
+ private Integer revision;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "创建时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/redis/EpidemicSentryPostRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/redis/EpidemicSentryPostRedis.java
new file mode 100644
index 000000000..01089dcb1
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/redis/EpidemicSentryPostRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Component
+public class EpidemicSentryPostRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
new file mode 100644
index 000000000..d7c096a56
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
+import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 疫情防控哨卡表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+public interface EpidemicSentryPostService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-02-14
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-02-14
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return EpidemicSentryPostDTO
+ * @author generator
+ * @date 2020-02-14
+ */
+ EpidemicSentryPostDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-02-14
+ */
+ void save(EpidemicSentryPostDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-02-14
+ */
+ void update(EpidemicSentryPostDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-02-14
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
new file mode 100644
index 000000000..48274e71b
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.epidemic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.modules.epidemic.dao.EpidemicSentryPostDao;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
+import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+import com.elink.esua.epdc.modules.epidemic.redis.EpidemicSentryPostRedis;
+import com.elink.esua.epdc.modules.epidemic.service.EpidemicSentryPostService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-14
+ */
+@Service
+public class EpidemicSentryPostServiceImpl extends BaseServiceImpl implements EpidemicSentryPostService {
+
+ @Autowired
+ private EpidemicSentryPostRedis epidemicSentryPostRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, EpidemicSentryPostDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, EpidemicSentryPostDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public EpidemicSentryPostDTO get(String id) {
+ EpidemicSentryPostEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, EpidemicSentryPostDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(EpidemicSentryPostDTO dto) {
+ EpidemicSentryPostEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicSentryPostEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(EpidemicSentryPostDTO dto) {
+ EpidemicSentryPostEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicSentryPostEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
new file mode 100644
index 000000000..259cc266d
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 09bccd74513ddbf03a015f76671f6a6bbf0289ee Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Fri, 14 Feb 2020 11:59:16 +0800
Subject: [PATCH 02/21] =?UTF-8?q?=E7=96=AB=E6=83=85=E9=98=B2=E6=8E=A7?=
=?UTF-8?q?=E5=93=A8=E5=8D=A1=E8=A1=A8=20=E4=BB=A3=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E8=A1=A5=E5=85=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/epidemic/EpidemicSentryPostDao.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
index 259cc266d..cfbf43995 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
@@ -3,7 +3,7 @@
-
+
From ae6338e98ad5df934308a41a43e046464ea39443 Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Fri, 14 Feb 2020 16:42:58 +0800
Subject: [PATCH 03/21] =?UTF-8?q?=E5=93=A8=E5=8D=A1=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2(=E6=9C=AA=E7=BB=91=E5=AE=9A=E7=BD=91?=
=?UTF-8?q?=E6=A0=BCid=E7=9A=84)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/EpidemicSentryPostController.java | 13 +++++++++++++
.../epidemic/dao/EpidemicSentryPostDao.java | 11 +++++++++++
.../service/EpidemicSentryPostService.java | 9 +++++++++
.../impl/EpidemicSentryPostServiceImpl.java | 5 +++++
.../mapper/epidemic/EpidemicSentryPostDao.xml | 15 ++++++++++++++-
5 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index ad53ad567..14ad90d55 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -91,4 +91,17 @@ public class EpidemicSentryPostController {
ExcelUtils.exportExcelToTarget(response, null, list, EpidemicSentryPostExcel.class);
}
+ /**
+ * @Description: 哨卡名称查询(未绑定网格id的)
+ * @Param: [dto]
+ * @return: java.util.List
+ * @Author: zy
+ * @Date: 2020-02-14
+ */
+ @GetMapping("{selectListSentryPostName}")
+ public Result> selectListSentryPostName(@RequestBody EpidemicSentryPostDTO dto){
+ List data = epidemicSentryPostService.listSentryPostName(dto);
+ return new Result>().ok(data);
+ }
+
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
index bc9dadf9c..9f5df0375 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
@@ -18,9 +18,12 @@
package com.elink.esua.epdc.modules.epidemic.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
* 疫情防控哨卡表
*
@@ -30,4 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EpidemicSentryPostDao extends BaseDao {
+ /**
+ * @Description: 哨卡名称查询(未绑定网格id的)
+ * @Param: [dto]
+ * @return: java.util.List
+ * @Author: zy
+ * @Date: 2020-02-14
+ */
+ List selectListSentryPostName(EpidemicSentryPostDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index d7c096a56..41337d824 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -92,4 +92,13 @@ public interface EpidemicSentryPostService extends BaseService
+ * @Author: zy
+ * @Date: 2020-02-14
+ */
+ List listSentryPostName(EpidemicSentryPostDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 48274e71b..17eaaf785 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -101,4 +101,9 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl listSentryPostName(EpidemicSentryPostDTO dto) {
+ return baseDao.selectListSentryPostName(dto);
+ }
+
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
index cfbf43995..34a5c57ea 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
@@ -22,5 +22,18 @@
-
+
+ SELECT
+ p.sentry_post_name sentryPostName
+ FROM
+ epdc_epidemic_sentry_post p
+ WHERE
+ p.DEL_FLAG = 0
+ AND p.grid_id IS NULL
+
+ AND p.sentry_post_name = like concat('%', #{sentryPostName}, '%')
+
+ ORDER BY
+ p.CREATED_TIME desc
+
\ No newline at end of file
From 5854bf826cacd363bb18020df9c22a5bef72c8c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Fri, 14 Feb 2020 20:21:16 +0800
Subject: [PATCH 04/21] =?UTF-8?q?=E5=AF=BC=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../elink/esua/epdc/config/StreamUtils.java | 56 +++++++++++++++++++
.../EpidemicSentryPostController.java | 14 +++++
.../service/EpidemicSentryPostService.java | 11 ++++
.../impl/EpidemicSentryPostServiceImpl.java | 50 ++++++++++++++++-
4 files changed, 129 insertions(+), 2 deletions(-)
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/config/StreamUtils.java
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/config/StreamUtils.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/config/StreamUtils.java
new file mode 100644
index 000000000..1caef31ae
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/config/StreamUtils.java
@@ -0,0 +1,56 @@
+package com.elink.esua.epdc.config;
+
+import com.elink.esua.epdc.commons.tools.exception.RenException;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+
+/**
+ * 接收文件转化File
+ * Created by liuhongwei on 2019/6/21.
+ */
+public class StreamUtils {
+
+
+
+ public static File conversionFile(MultipartFile file){
+
+ File toFile =null;
+ InputStream ins = null;
+ try {
+ // 转化字节流
+ ins = file.getInputStream();
+ // 获取文件名字
+ toFile = new File(file.getOriginalFilename());
+ // 字节转化文件
+ inputStreamToFile(ins, toFile);
+ ins.close();
+ } catch (IOException e) {
+ new RenException(500,"文件转化失败");
+ }
+ return toFile;
+ }
+
+
+ /**
+ * 流转化
+ * @param ins file
+ * @return
+ * @author liuhongwei
+ * @date 2019/6/14 14:07
+ */
+ public static void inputStreamToFile(InputStream ins, File file) {
+ try {
+ OutputStream os = new FileOutputStream(file);
+ int bytesRead = 0;
+ byte[] buffer = new byte[8192];
+ while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
+ os.write(buffer, 0, bytesRead);
+ }
+ os.close();
+ ins.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index 14ad90d55..90f9e1f93 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -30,6 +30,7 @@ import com.elink.esua.epdc.modules.epidemic.excel.EpidemicSentryPostExcel;
import com.elink.esua.epdc.modules.epidemic.service.EpidemicSentryPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@@ -104,4 +105,17 @@ public class EpidemicSentryPostController {
return new Result>().ok(data);
}
+ /***
+ * 导入
+ * @param file
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/14 12:34
+ */
+ @PostMapping("importExcel")
+ public Result importExcel(@RequestParam("file") MultipartFile file) {
+ return epidemicSentryPostService.insertEpidemicList(file);
+ }
+
+
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index 41337d824..18586d1fe 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -19,8 +19,10 @@ package com.elink.esua.epdc.modules.epidemic.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
@@ -101,4 +103,13 @@ public interface EpidemicSentryPostService extends BaseService listSentryPostName(EpidemicSentryPostDTO dto);
+
+ /***
+ * 导入表格
+ * @param
+ * @return void
+ * @author qushutong
+ * @date 2020/2/14 12:38
+ */
+ Result insertEpidemicList(MultipartFile file);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 17eaaf785..67172a976 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -17,22 +17,32 @@
package com.elink.esua.epdc.modules.epidemic.service.impl;
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.config.StreamUtils;
import com.elink.esua.epdc.modules.epidemic.dao.EpidemicSentryPostDao;
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+import com.elink.esua.epdc.modules.epidemic.excel.EpidemicSentryPostExcel;
import com.elink.esua.epdc.modules.epidemic.redis.EpidemicSentryPostRedis;
import com.elink.esua.epdc.modules.epidemic.service.EpidemicSentryPostService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.File;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -65,8 +75,8 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl getWrapper(Map params){
- String id = (String)params.get(FieldConstant.ID_HUMP);
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@@ -106,4 +116,40 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl oldEntityList = baseDao.selectList(new QueryWrapper<>());
+ List epidemicExcelList = ExcelImportUtil.importExcel(f, EpidemicSentryPostExcel.class, importParams);
+ // third_sentry_post_id 已存在更新 不存在插入
+ List newEpidemicList = this.updataOrSaveExcel(epidemicExcelList, oldEntityList);
+ List epidemicList = ConvertUtils.sourceToTarget(newEpidemicList, EpidemicSentryPostEntity.class);
+ boolean b = insertBatch(epidemicList);
+ return new Result();
+ }
+
+ private List updataOrSaveExcel(List epidemicExcelList, List oldEntityList) {
+ List newEpidemicList = new ArrayList<>();
+ QueryWrapper wrapper;
+ for (EpidemicSentryPostExcel item : epidemicExcelList) {
+ if (StringUtils.isNotBlank(item.getThirdSentryPostId())) {
+ item.setThirdSentryPostId(item.getThirdSentryPostId().trim());
+ }
+ for (EpidemicSentryPostEntity oldItem : oldEntityList) {
+ if (StringUtils.isNotBlank(item.getThirdSentryPostId()) && item.getThirdSentryPostId().equals(oldItem.getThirdSentryPostId())) {
+ //三方哨卡Id相同时 更新
+ EpidemicSentryPostEntity epidemicSentryPostEntity = ConvertUtils.sourceToTarget(item, EpidemicSentryPostEntity.class);
+ wrapper = new QueryWrapper<>();
+ wrapper.eq("third_sentry_post_id", epidemicSentryPostEntity.getThirdSentryPostId());
+ update(epidemicSentryPostEntity, wrapper);
+ epidemicExcelList.remove(item);
+ }
+ }
+ }
+ newEpidemicList = ConvertUtils.sourceToTarget(epidemicExcelList, EpidemicSentryPostDTO.class);
+ return newEpidemicList;
+ }
+
}
\ No newline at end of file
From 74ea9417c0ab36cb2ad46b847d15d0c39f61af7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Fri, 14 Feb 2020 21:50:13 +0800
Subject: [PATCH 05/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/EpidemicSentryPostServiceImpl.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 67172a976..243402c8f 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -131,7 +131,8 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl updataOrSaveExcel(List epidemicExcelList, List oldEntityList) {
- List newEpidemicList = new ArrayList<>();
+ List newEpidemicList = new ArrayList<>();
+ newEpidemicList.addAll(epidemicExcelList);
QueryWrapper wrapper;
for (EpidemicSentryPostExcel item : epidemicExcelList) {
if (StringUtils.isNotBlank(item.getThirdSentryPostId())) {
@@ -144,12 +145,11 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl();
wrapper.eq("third_sentry_post_id", epidemicSentryPostEntity.getThirdSentryPostId());
update(epidemicSentryPostEntity, wrapper);
- epidemicExcelList.remove(item);
+ newEpidemicList.remove(item);
}
}
}
- newEpidemicList = ConvertUtils.sourceToTarget(epidemicExcelList, EpidemicSentryPostDTO.class);
- return newEpidemicList;
+ return ConvertUtils.sourceToTarget(newEpidemicList, EpidemicSentryPostDTO.class);
}
}
\ No newline at end of file
From a493b7061cf4f8734a9a77a1b30be125b4a0de6e Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Sat, 15 Feb 2020 11:09:01 +0800
Subject: [PATCH 06/21] =?UTF-8?q?=E5=93=A8=E5=8D=A1=E6=96=B0=E5=A2=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../EpidemicSentryPostController.java | 35 +++++++++++++++----
.../epidemic/dao/EpidemicSentryPostDao.java | 18 +++++++---
.../service/EpidemicSentryPostService.java | 17 +++++++--
.../impl/EpidemicSentryPostServiceImpl.java | 12 +++++--
.../mapper/epidemic/EpidemicSentryPostDao.xml | 13 ++++++-
5 files changed, 77 insertions(+), 18 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index 90f9e1f93..e67d7b14e 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -74,6 +74,13 @@ public class EpidemicSentryPostController {
public Result update(@RequestBody EpidemicSentryPostDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ String sentryPostCode = dto.getSentryPostCode().toUpperCase();
+ //编号是否重复判断
+ Integer data = epidemicSentryPostService.countSentryPostCode(sentryPostCode);
+ if (data > 0){
+ return new Result().error("哨卡编码编号重复");
+ }
+ dto.setSentryPostCode(sentryPostCode);
epidemicSentryPostService.update(dto);
return new Result();
}
@@ -93,16 +100,30 @@ public class EpidemicSentryPostController {
}
/**
- * @Description: 哨卡名称查询(未绑定网格id的)
- * @Param: [dto]
- * @return: java.util.List
+ * @Description: 哨卡名称查询(未绑定网格id的)
+ * @Param: []
+ * @return: com.elink.esua.epdc.commons.tools.utils.Result>>
* @Author: zy
* @Date: 2020-02-14
*/
- @GetMapping("{selectListSentryPostName}")
- public Result> selectListSentryPostName(@RequestBody EpidemicSentryPostDTO dto){
- List data = epidemicSentryPostService.listSentryPostName(dto);
- return new Result>().ok(data);
+ @GetMapping("selectListSentryPostName")
+ public Result>> selectListSentryPostName(){
+ List> data = epidemicSentryPostService.listSentryPostName();
+ return new Result>>().ok(data);
+ }
+
+
+ /**
+ * @Description: 查询哨卡名称是否重复
+ * @Param: [sentryPostCode]
+ * @return: java.lang.Integer
+ * @Author: zy
+ * @Date: 2020-02-15
+ */
+ @GetMapping("sentryPostCodeIsRepeat/{sentryPostCode}")
+ public Result sentryPostCodeIsRepeat(@PathVariable("sentryPostCode") String sentryPostCode){
+ Integer data = epidemicSentryPostService.countSentryPostCode(sentryPostCode);
+ return new Result().ok(data);
}
/***
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
index 9f5df0375..b721e3f83 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
@@ -23,6 +23,7 @@ import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
+import java.util.Map;
/**
* 疫情防控哨卡表
@@ -34,11 +35,20 @@ import java.util.List;
public interface EpidemicSentryPostDao extends BaseDao {
/**
- * @Description: 哨卡名称查询(未绑定网格id的)
- * @Param: [dto]
- * @return: java.util.List
+ * @Description: 哨卡名称查询(未绑定网格id的)
+ * @Param: []
+ * @return: com.elink.esua.epdc.commons.tools.utils.Result>>
* @Author: zy
* @Date: 2020-02-14
*/
- List selectListSentryPostName(EpidemicSentryPostDTO dto);
+ List> selectListSentryPostName();
+
+ /**
+ * @Description: 查询哨卡名称是否重复
+ * @Param: [sentryPostCode]
+ * @return: java.lang.Integer
+ * @Author: zy
+ * @Date: 2020-02-15
+ */
+ Integer selectCountSentryPostCode(String sentryPostCode);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index 18586d1fe..8662e015e 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -22,6 +22,8 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@@ -97,12 +99,21 @@ public interface EpidemicSentryPostService extends BaseService
+ * @Param: []
+ * @return: com.elink.esua.epdc.commons.tools.utils.Result>>
* @Author: zy
* @Date: 2020-02-14
*/
- List listSentryPostName(EpidemicSentryPostDTO dto);
+ List> listSentryPostName();
+
+ /**
+ * @Description: 查询哨卡名称是否重复
+ * @Param: [sentryPostCode]
+ * @return: java.lang.Integer
+ * @Author: zy
+ * @Date: 2020-02-15
+ */
+ Integer countSentryPostCode(String sentryPostCode);;
/***
* 导入表格
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 243402c8f..1b1b51b55 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -112,8 +112,15 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl listSentryPostName(EpidemicSentryPostDTO dto) {
- return baseDao.selectListSentryPostName(dto);
+ public List> listSentryPostName() {
+ return baseDao.selectListSentryPostName();
+ }
+
+ @Override
+ public Integer countSentryPostCode(String sentryPostCode) {
+ //字母转大写
+ sentryPostCode = sentryPostCode.toUpperCase();
+ return baseDao.selectCountSentryPostCode(sentryPostCode);
}
@@ -151,5 +158,4 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl
-
+
SELECT
+ p.ID id,
p.sentry_post_name sentryPostName
FROM
epdc_epidemic_sentry_post p
@@ -36,4 +37,14 @@
ORDER BY
p.CREATED_TIME desc
+
+
+ SELECT
+ count(1)
+ FROM
+ epdc_epidemic_sentry_post p
+ WHERE
+ p.DEL_FLAG = 0
+ AND p.sentry_post_code = #{sentryPostCode}
+
\ No newline at end of file
From 254bb3823fb3d372d473962e1df485850271e325 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Sat, 15 Feb 2020 11:49:28 +0800
Subject: [PATCH 07/21] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=9C=A8=E9=98=B2?=
=?UTF-8?q?=E7=96=AB=E5=93=A8=E5=8D=A1=E8=BF=9B=E8=A1=8C=E7=99=BB=E8=AE=B0?=
=?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B8=8A=E9=80=81=E6=95=B0=E6=8D=AE=E5=B9=B6?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E5=85=9A=E7=BE=A4=E7=B3=BB=E7=BB=9F=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epdc/controller/ApiCustomController.java | 13 +++
.../fallback/UserFeignClientFallback.java | 5 +
.../esua/epdc/service/CustomService.java | 10 ++
.../epdc/service/impl/CustomServiceImpl.java | 13 +++
.../esua/epdc/feign/AdminFeignClient.java | 2 +-
.../java/com/elink/esua/epdc/dto/UserDTO.java | 10 ++
.../esua/epdc/dto/epdc/UserCarInfoDTO.java | 81 ++++++++++++++
.../EpdcAppPidemicCompleteInfoFromDTO.java | 37 +++++++
.../controller/EpdcAppUserController.java | 12 ++
.../controller/UserCarInfoController.java | 94 ++++++++++++++++
.../elink/esua/epdc/dao/UserCarInfoDao.java | 33 ++++++
.../esua/epdc/entity/UserCarInfoEntity.java | 51 +++++++++
.../esua/epdc/excel/UserCarInfoExcel.java | 62 +++++++++++
.../esua/epdc/redis/UserCarInfoRedis.java | 47 ++++++++
.../esua/epdc/service/UserCarInfoService.java | 95 ++++++++++++++++
.../elink/esua/epdc/service/UserService.java | 11 ++
.../service/impl/UserCarInfoServiceImpl.java | 104 ++++++++++++++++++
.../epdc/service/impl/UserServiceImpl.java | 23 ++++
.../main/resources/mapper/UserCarInfoDao.xml | 19 ++++
19 files changed, 721 insertions(+), 1 deletion(-)
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/UserCarInfoDTO.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserCarInfoDao.xml
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
index 57ff781d0..927db0e81 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
@@ -3,6 +3,7 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.DeptOption;
+import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
import com.elink.esua.epdc.service.CustomService;
import com.elink.esua.epdc.service.MessageService;
@@ -61,4 +62,16 @@ public class ApiCustomController {
ValidatorUtils.validateEntity(formDTO);
return customService.report(formDTO);
}
+
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param completeInfoFromDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/15 10:53
+ */
+ @PostMapping("sentryPost/completeInfo")
+ public Result completeInfo(@RequestBody EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto){
+ return customService.createPidemicInfo(completeInfoFromDto);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
index 962b5f70b..868ba6117 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
@@ -159,4 +159,9 @@ public class UserFeignClientFallback implements UserFeignClient {
public Result queryUserDto(EpdcAppQueryUserInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "queryUserDto",formDTO);
}
+
+ @Override
+ public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "createPidemicInfo",formDTO);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
index dac29a359..1abcd88dd 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
@@ -2,6 +2,7 @@ package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
+import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
/**
@@ -27,4 +28,13 @@ public interface CustomService {
* @Date 2020/1/28 13:23
**/
Result report(EpiDemicReportFormDTO formDTO);
+
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param completeInfoFromDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/15 10:58
+ */
+ Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto);
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
index fda539882..aa120b3ff 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
@@ -4,9 +4,11 @@ import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
+import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.CustomFeignClient;
+import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.redis.AppUserRedis;
import com.elink.esua.epdc.service.CustomService;
import org.apache.commons.lang3.StringUtils;
@@ -28,6 +30,9 @@ public class CustomServiceImpl implements CustomService {
@Autowired
private AppUserRedis appUserRedis;
+ @Autowired
+ private UserFeignClient userFeignClient;
+
/**
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result
@@ -64,6 +69,8 @@ public class CustomServiceImpl implements CustomService {
return customFeignClient.report(formDTO);
}
+
+
/**
* @param mobile 手机号
* @param smsCode 用户输入的验证码
@@ -77,4 +84,10 @@ public class CustomServiceImpl implements CustomService {
throw new RenException("手机验证码错误");
}
}
+
+
+ @Override
+ public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
+ return userFeignClient.createPidemicInfo(completeInfoFromDto);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
index 7655e329c..b3681afde 100644
--- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
+++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
@@ -15,7 +15,7 @@ import java.util.List;
* @email yujintao@elink-cn.com
* @date 2019/9/5 14:44
*/
-@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class)
+@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class,url = "http://localhost:9092")
public interface AdminFeignClient {
/**
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserDTO.java
index 076cc8f66..f69f216a2 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserDTO.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserDTO.java
@@ -352,4 +352,14 @@ public class UserDTO implements Serializable {
* 所有部门名称
*/
private String allDeptNames;
+
+ /**
+ * 是否有车
+ */
+ private String rentFlag;
+
+ /**
+ * 是否租房
+ */
+ private String driverFlag;
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/UserCarInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/UserCarInfoDTO.java
new file mode 100644
index 000000000..43cad7dbc
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/UserCarInfoDTO.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto.epdc;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Data
+public class UserCarInfoDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 昵称
+ */
+ private String userId;
+
+ /**
+ * 手机号
+ */
+ private String carNumber;
+
+ /**
+ * 删除标记
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 注册时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
new file mode 100644
index 000000000..15831732c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
@@ -0,0 +1,37 @@
+package com.elink.esua.epdc.dto.epdc.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/2/15 10:49
+ * @Description: 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ */
+@Data
+public class EpdcAppPidemicCompleteInfoFromDTO implements Serializable {
+ private static final long serialVersionUID = -582216042705118851L;
+
+
+ /**
+ * postId : 79829
+ * name : AcIr6xcOZ0
+ * idcard : IYG4MnDCs1
+ * phone : OZQRjNMqXk
+ * habitationDetail : C5zuxTv9mx
+ * isRent : VlInKevtSy
+ * isDriver : zW3ek3AUpm
+ * carNum : 6oOeXKemVl
+ */
+
+ private String postId;
+ private String name;
+ private String idcard;
+ private String phone;
+ private String habitationDetail;
+ private String isRent;
+ private String isDriver;
+ private String carNum;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java
index 2550651a4..e60b1c027 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java
@@ -372,4 +372,16 @@ public class EpdcAppUserController {
public Result> queryGroupUsers(@RequestBody List gridIdList) {
return userService.listGridUserResultDTO(gridIdList);
}
+
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param formDTO
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author qushutong
+ * @date 2020/2/15 11:06
+ */
+ @PostMapping("sentryPost/completeInfo")
+ public Result> sentPidemicInfo(@RequestBody EpdcAppPidemicCompleteInfoFromDTO formDTO) {
+ return userService.createPidemicInfo(formDTO);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java
new file mode 100644
index 000000000..34358f25c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO;
+import com.elink.esua.epdc.excel.UserCarInfoExcel;
+import com.elink.esua.epdc.service.UserCarInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@RestController
+@RequestMapping("usercarinfo")
+public class UserCarInfoController {
+
+ @Autowired
+ private UserCarInfoService userCarInfoService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = userCarInfoService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ UserCarInfoDTO data = userCarInfoService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody UserCarInfoDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ userCarInfoService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody UserCarInfoDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ userCarInfoService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ userCarInfoService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = userCarInfoService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, UserCarInfoExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java
new file mode 100644
index 000000000..6cecfa184
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.entity.UserCarInfoEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Mapper
+public interface UserCarInfoDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java
new file mode 100644
index 000000000..d59419950
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_user_car_info")
+public class UserCarInfoEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 昵称
+ */
+ private String userId;
+
+ /**
+ * 手机号
+ */
+ private String carNumber;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java
new file mode 100644
index 000000000..f20c86c75
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Data
+public class UserCarInfoExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "昵称")
+ private String userId;
+
+ @Excel(name = "手机号")
+ private String carNumber;
+
+ @Excel(name = "删除标记")
+ private String delFlag;
+
+ @Excel(name = "乐观锁")
+ private Integer revision;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "注册时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java
new file mode 100644
index 000000000..4dd4a6b2f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Component
+public class UserCarInfoRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
new file mode 100644
index 000000000..431ae4b54
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO;
+import com.elink.esua.epdc.entity.UserCarInfoEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户车辆信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+public interface UserCarInfoService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-02-15
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-02-15
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return UserCarInfoDTO
+ * @author generator
+ * @date 2020-02-15
+ */
+ UserCarInfoDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-02-15
+ */
+ void save(UserCarInfoDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-02-15
+ */
+ void update(UserCarInfoDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-02-15
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
index 1df248fcc..280fd757d 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
@@ -267,4 +267,15 @@ public interface UserService extends BaseService {
* @Date 2019/12/19 15:03
**/
Result> listGridUserResultDTO(List gridIdList);
+
+
+
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param completeInfoFromDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/15 10:58
+ */
+ Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto);
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
new file mode 100644
index 000000000..2f2ec37fb
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.dao.UserCarInfoDao;
+import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO;
+import com.elink.esua.epdc.entity.UserCarInfoEntity;
+import com.elink.esua.epdc.redis.UserCarInfoRedis;
+import com.elink.esua.epdc.service.UserCarInfoService;
+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 qu qu@elink-cn.com
+ * @since v1.0.0 2020-02-15
+ */
+@Service
+public class UserCarInfoServiceImpl extends BaseServiceImpl implements UserCarInfoService {
+
+ @Autowired
+ private UserCarInfoRedis userCarInfoRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, UserCarInfoDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, UserCarInfoDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public UserCarInfoDTO get(String id) {
+ UserCarInfoEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, UserCarInfoDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(UserCarInfoDTO dto) {
+ UserCarInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserCarInfoEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(UserCarInfoDTO dto) {
+ UserCarInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserCarInfoEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
index e0a61a7ef..a278589c2 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
@@ -42,6 +42,7 @@ import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao;
import com.elink.esua.epdc.dao.UserDao;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.UserDTO;
+import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserRegistFormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
@@ -60,6 +61,7 @@ import com.elink.esua.epdc.enums.AppUserStatesEnum;
import com.elink.esua.epdc.enums.PartyMemberRegFlagEnum;
import com.elink.esua.epdc.exception.UserModuleErrorCode;
import com.elink.esua.epdc.feign.AdminFeignClient;
+import com.elink.esua.epdc.service.UserCarInfoService;
import com.elink.esua.epdc.service.UserGridRelationService;
import com.elink.esua.epdc.service.UserInvitationRecordService;
import com.elink.esua.epdc.service.UserService;
@@ -79,6 +81,9 @@ import java.util.*;
@Service
public class UserServiceImpl extends BaseServiceImpl implements UserService {
+ @Autowired
+ private UserCarInfoService userCarInfoService;
+
@Autowired
private PartyMembersDao partyMembersDao;
@@ -859,6 +864,7 @@ public class UserServiceImpl extends BaseServiceImpl implem
return new Result>().ok(baseDao.selectListGridUserResultDTO(gridIdList));
}
+
/**
* 根据微信信息查询用户
*
@@ -887,4 +893,21 @@ public class UserServiceImpl extends BaseServiceImpl implem
return ConvertUtils.sourceToTarget(userEntity, UserDTO.class);
}
+ @Override
+ public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
+ UserDTO userDTO =new UserDTO();
+ userDTO.setRealName(completeInfoFromDto.getName());
+ userDTO.setIdentityNo(completeInfoFromDto.getIdcard());
+ userDTO.setMobile(completeInfoFromDto.getPhone());
+ userDTO.setAddress(completeInfoFromDto.getHabitationDetail());
+ userDTO.setRentFlag(completeInfoFromDto.getIsRent());
+ userDTO.setDriverFlag(completeInfoFromDto.getIsDriver());
+ save(userDTO);
+ UserCarInfoDTO dto = new UserCarInfoDTO();
+ dto.setUserId(userDTO.getId());
+ dto.setCarNumber(completeInfoFromDto.getCarNum());
+ userCarInfoService.save(dto);
+
+ return new Result();
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserCarInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserCarInfoDao.xml
new file mode 100644
index 000000000..d67f0e94a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserCarInfoDao.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 554852b9c59012a3e8ea31f573146300ea699c45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Sat, 15 Feb 2020 12:56:49 +0800
Subject: [PATCH 08/21] =?UTF-8?q?=E6=BC=8F=E6=8F=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/elink/esua/epdc/feign/UserFeignClient.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
index b9854986c..843b81d72 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
@@ -326,4 +326,14 @@ public interface UserFeignClient {
**/
@PostMapping(value="app-user/epdc-app/user/queryUserDto", consumes = MediaType.APPLICATION_JSON_VALUE)
Result queryUserDto(EpdcAppQueryUserInfoFormDTO formDTO);
+
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param formDTO
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/15 11:02
+ */
+ @PostMapping(value = "app-user/epdc-app/user/sentryPost/completeInfo", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO formDTO);
}
From f9e9c19aab34eaf3f3f67913d641a84d5dbda3ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Sat, 15 Feb 2020 13:01:25 +0800
Subject: [PATCH 09/21] =?UTF-8?q?=E7=BA=A0=E6=AD=A3=E9=94=99=E8=AF=AF?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/elink/esua/epdc/feign/AdminFeignClient.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
index b3681afde..7655e329c 100644
--- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
+++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
@@ -15,7 +15,7 @@ import java.util.List;
* @email yujintao@elink-cn.com
* @date 2019/9/5 14:44
*/
-@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class,url = "http://localhost:9092")
+@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class)
public interface AdminFeignClient {
/**
From 3523a9889c0d674f11160c94c65658f1a5defedf Mon Sep 17 00:00:00 2001
From: songyunpeng
Date: Sat, 15 Feb 2020 13:27:10 +0800
Subject: [PATCH 10/21] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E7=A0=81=E5=86=85=E7=9A=84=E5=AD=97=E7=AC=A6=E4=B8=B2?=
=?UTF-8?q?=EF=BC=8C=E8=A7=A3=E6=9E=90=E6=9C=BA=E6=9E=84=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E5=92=8C=E7=AC=AC=E4=B8=89=E6=96=B9=E5=93=A8=E5=8D=A1id=20?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../result/EpdcSentryPostInfoResultDTO.java | 40 +++++++++++++++++
.../epdc/controller/ApiCustomController.java | 7 +++
.../esua/epdc/feign/CustomFeignClient.java | 8 ++++
.../fallback/CustomFeignClientFallback.java | 6 +++
.../esua/epdc/service/CustomService.java | 10 +++++
.../epdc/service/impl/CustomServiceImpl.java | 44 +++++++++++++++++++
.../EpidemicSentryPostController.java | 9 +++-
.../epidemic/dao/EpidemicSentryPostDao.java | 15 ++++---
.../service/EpidemicSentryPostService.java | 9 ++++
.../impl/EpidemicSentryPostServiceImpl.java | 5 +++
.../mapper/epidemic/EpidemicSentryPostDao.xml | 21 ++++++++-
11 files changed, 167 insertions(+), 7 deletions(-)
create mode 100644 esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
new file mode 100644
index 000000000..43adea0b8
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
@@ -0,0 +1,40 @@
+package com.elink.esua.epdc.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author songyunpeng
+ * @Description 根据小程序码内的字符串,解析机构名称和第三方哨卡id接口 返回结果集
+ * @create 2020-02-14
+ */
+@Data
+public class EpdcSentryPostInfoResultDTO implements Serializable {
+
+ /**
+ * 街道名
+ */
+ private String streetName;
+ /**
+ * 社区名
+ */
+ private String communityName;
+ /**
+ * 网格ID
+ */
+ private Integer gridId;
+ /**
+ * 网格名
+ */
+ private String gridName;
+ /**
+ * 哨卡名称
+ */
+ private String sentryPostName;
+ /**
+ * 第三方哨卡ID
+ */
+ private String thirdSentryPostId;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
index 927db0e81..945bef7e0 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
@@ -5,6 +5,7 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
+import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO;
import com.elink.esua.epdc.service.CustomService;
import com.elink.esua.epdc.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,6 +64,12 @@ public class ApiCustomController {
return customService.report(formDTO);
}
+ @GetMapping("sentryPost/getDeptInfoByMaCode")
+ public Result getDeptInfoByMaCode(String code) {
+ return customService.getDeptInfoByMaCode(code);
+ }
+
+
/***
* 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
* @param completeInfoFromDto
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
index 6e978b543..5521eac8b 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
@@ -2,10 +2,14 @@ package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
+import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO;
import com.elink.esua.epdc.feign.fallback.CustomFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
/**
@@ -24,4 +28,8 @@ public interface CustomFeignClient {
**/
@PostMapping(value = "custom/epidemic/report", consumes = MediaType.APPLICATION_JSON_VALUE)
Result report(EpiDemicReportFormDTO formDTO);
+
+ @GetMapping(value = "custom/epidemicSentryPost/getEpidemicSentryBySentryPostCode/{sentryPostCode}", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result getEpidemicSentryBySentryPostCode(@PathVariable("sentryPostCode") String sentryPostCode);
+
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
index ea4baba25..06353df79 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java
@@ -3,6 +3,7 @@ package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
import com.elink.esua.epdc.feign.CustomFeignClient;
import org.springframework.stereotype.Component;
@@ -19,4 +20,9 @@ public class CustomFeignClientFallback implements CustomFeignClient {
public Result report(EpiDemicReportFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "report", formDTO);
}
+
+ @Override
+ public Result getEpidemicSentryBySentryPostCode(String sentryPostCode) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getEpidemicSentryBySentryPostCode", sentryPostCode);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
index 1abcd88dd..edf26c7fe 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
@@ -4,6 +4,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
+import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO;
/**
* @Description 疫情管理
@@ -29,6 +30,15 @@ public interface CustomService {
**/
Result report(EpiDemicReportFormDTO formDTO);
+ /** 根据小程序码内的字符串,解析机构名称和第三方哨卡id
+ * @Description
+ * @Author songyunpeng
+ * @Date 2020/2/14
+ * @Param [maCode]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ **/
+ Result getDeptInfoByMaCode(String maCode);
+
/***
* 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
* @param completeInfoFromDto
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
index aa120b3ff..231301ac8 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
@@ -2,10 +2,13 @@ package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.CompleteDeptDTO;
import com.elink.esua.epdc.dto.DeptOption;
+import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO;
+import com.elink.esua.epdc.dto.result.EpdcSentryPostInfoResultDTO;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.CustomFeignClient;
import com.elink.esua.epdc.feign.UserFeignClient;
@@ -71,6 +74,7 @@ public class CustomServiceImpl implements CustomService {
+
/**
* @param mobile 手机号
* @param smsCode 用户输入的验证码
@@ -85,6 +89,46 @@ public class CustomServiceImpl implements CustomService {
}
}
+ @Override
+ public Result getDeptInfoByMaCode(String code) {
+ EpdcSentryPostInfoResultDTO epdcSentryPostInfoResultDTO = new EpdcSentryPostInfoResultDTO();
+ //代表是小程序段解析的字符串
+ if(code.indexOf(";")!=-1){
+ String[] macCode = code.split(";");
+ //拿取网格ID
+ String gridId = macCode[0].split("=")[1];
+ //拿取哨卡编码
+ String sentryPostCode = macCode[1].split("=")[1];
+ //拿取网格信息
+ CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(gridId);
+ epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
+ epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
+ epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
+ epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
+ //拿取哨卡信息
+ Result epidemicSentryResult = customFeignClient.getEpidemicSentryBySentryPostCode(sentryPostCode);
+ EpidemicSentryPostDTO epidemicSentryPostDTO = epidemicSentryResult.getData();
+ if(epidemicSentryPostDTO==null){
+ return new Result().error("哨卡信息为空");
+ }
+ epdcSentryPostInfoResultDTO.setSentryPostName(epidemicSentryPostDTO.getSentryPostName());
+ epdcSentryPostInfoResultDTO.setThirdSentryPostId(epidemicSentryPostDTO.getThirdSentryPostId());
+ }else{
+ //拿取网格信息
+ CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(code);
+ epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
+ epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
+ epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
+ epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
+ }
+ return new Result().ok(epdcSentryPostInfoResultDTO);
+ }
+
+ private CompleteDeptDTO getCompleteDeptDTOByGridId(String gridId){
+ Result adminResult = adminFeignClient.getCompleteDept(Long.parseLong(gridId));
+ return adminResult.getData();
+ }
+
@Override
public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index e67d7b14e..456a823d4 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -44,7 +44,7 @@ import java.util.Map;
* @since v1.0.0 2020-02-14
*/
@RestController
-@RequestMapping("epidemicsentrypost")
+@RequestMapping("epidemicSentryPost")
public class EpidemicSentryPostController {
@Autowired
@@ -99,6 +99,13 @@ public class EpidemicSentryPostController {
ExcelUtils.exportExcelToTarget(response, null, list, EpidemicSentryPostExcel.class);
}
+ @GetMapping("getEpidemicSentryBySentryPostCode/{sentryPostCode}")
+ public Result getEpidemicSentryBySentryPostCode(@PathVariable String sentryPostCode){
+ EpidemicSentryPostDTO data = epidemicSentryPostService.getEpidemicSentryBySentryPostCode(sentryPostCode);
+ return new Result().ok(data);
+ }
+
+
/**
* @Description: 哨卡名称查询(未绑定网格id的)
* @Param: []
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
index b721e3f83..bc0bb200b 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/dao/EpidemicSentryPostDao.java
@@ -22,6 +22,8 @@ import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
import java.util.List;
import java.util.Map;
@@ -33,14 +35,17 @@ import java.util.Map;
*/
@Mapper
public interface EpidemicSentryPostDao extends BaseDao {
-
- /**
+
+ EpidemicSentryPostEntity selectOneOfEpidemicSentryBySentryPostCode(String sentryPostCode);
+
+
+ /**
* @Description: 哨卡名称查询(未绑定网格id的)
* @Param: []
* @return: com.elink.esua.epdc.commons.tools.utils.Result>>
- * @Author: zy
- * @Date: 2020-02-14
- */
+ * @Author: zy
+ * @Date: 2020-02-14
+ */
List> selectListSentryPostName();
/**
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index 8662e015e..702bf56c7 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -97,6 +97,15 @@ public interface EpidemicSentryPostService extends BaseService> listSentryPostName() {
return baseDao.selectListSentryPostName();
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
index 447f1fc29..4f4198111 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
@@ -7,7 +7,7 @@
-
+
@@ -22,6 +22,25 @@
+
+ select
+ ID,
+ sentry_post_code,
+ sentry_post_name,
+ third_sentry_post_id,
+ grid_id,
+ ma_code_url,
+ PARENT_DEPT_IDS,
+ PARENT_DEPT_NAMES,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ from epdc_epidemic_sentry_post
+ where sentry_post_code = #{sentryPostCode}
+
SELECT
p.ID id,
From f010efcee60728311dbe68f457f4778dd7b1fa73 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Sat, 15 Feb 2020 14:09:09 +0800
Subject: [PATCH 11/21] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=93=A8=E5=8D=A1?=
=?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../esua/epdc/dto/form/CreateCodeFormDTO.java | 26 ++++
.../epdc-custom/epdc-custom-server/pom.xml | 25 ++++
.../EpidemicSentryPostController.java | 30 +++-
.../epidemic/feign/OssFeignClient.java | 31 +++++
.../fallback/OssFeignClientFallback.java | 22 +++
.../service/EpidemicSentryPostService.java | 22 ++-
.../impl/EpidemicSentryPostServiceImpl.java | 128 +++++++++++++++++-
.../src/main/resources/application.yml | 19 +++
8 files changed, 296 insertions(+), 7 deletions(-)
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/CreateCodeFormDTO.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/OssFeignClient.java
create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/fallback/OssFeignClientFallback.java
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/CreateCodeFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/CreateCodeFormDTO.java
new file mode 100644
index 000000000..fd50d318c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/CreateCodeFormDTO.java
@@ -0,0 +1,26 @@
+package com.elink.esua.epdc.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @program: esua-epdc-cloud
+ * @description: 生成小程序码
+ * @author: wangtong
+ * @create: 2020-02-14 17:38
+ **/
+@Data
+public class CreateCodeFormDTO implements Serializable {
+
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 哨卡id
+ */
+ private String postId;
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
index f10985631..4dcbc9200 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
@@ -63,6 +63,24 @@
orika-spring-boot-starter
1.8.0
+
+ com.esua.epdc
+ epdc-admin-client
+ 1.0.0
+ compile
+
+
+
+
+
+
+
+
+
+ com.esua.epdc
+ epdc-commons-tools-wx-ma
+ ${project.version}
+
@@ -133,6 +151,13 @@
6379
elink@888
+
+ wxdd8530c5f4926766
+ 5bf4fb813145431b3493a10aa7e041e9
+
+ wx29b074840ef4bfd9
+ 4adb1afccc69f205cdf5b521d74e2aca
+
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index 456a823d4..a5849939b 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -23,9 +23,10 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
-import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
+import com.elink.esua.epdc.dto.form.CreateCodeFormDTO;
import com.elink.esua.epdc.modules.epidemic.excel.EpidemicSentryPostExcel;
import com.elink.esua.epdc.modules.epidemic.service.EpidemicSentryPostService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -145,5 +146,32 @@ public class EpidemicSentryPostController {
return epidemicSentryPostService.insertEpidemicList(file);
}
+ /**
+ *生成哨卡单个小程序码
+ *
+ * @author wangtong
+ * @date 2020/2/14 17:46
+ * @param [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ */
+ @PostMapping("createCode")
+ public Result createCode(@RequestBody CreateCodeFormDTO formDto){
+ ValidatorUtils.validateEntity(formDto, new Class[0]);
+ return this.epidemicSentryPostService.CreateCodeFormDTO(formDto);
+ }
+
+ /**
+ *生成哨卡多个小程序码
+ *
+ * @author wangtong
+ * @date 2020/2/14 17:46
+ * @param [formDto]
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ */
+ @PostMapping("createCodes")
+ public Result createCodes(@RequestBody CreateCodeFormDTO formDto){
+ ValidatorUtils.validateEntity(formDto, new Class[0]);
+ return this.epidemicSentryPostService.CreateCodeFormDTOs(formDto);
+ }
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/OssFeignClient.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/OssFeignClient.java
new file mode 100644
index 000000000..ea678737a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/OssFeignClient.java
@@ -0,0 +1,31 @@
+package com.elink.esua.epdc.modules.epidemic.feign;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.UploadToOssDTO;
+import com.elink.esua.epdc.modules.epidemic.feign.fallback.OssFeignClientFallback;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PostMapping;
+
+
+/**
+ * @author work@yujt.net.cn
+ * @date 19/9/19 10:12
+ */
+@FeignClient(name = ServiceConstant.EPDC_OSS_SERVER, fallback = OssFeignClientFallback.class)
+public interface OssFeignClient {
+//,url = "http://127.0.0.1:9095"
+
+ /**
+ * File文件上传到文件服务器
+ *
+ * @param dto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author work@yujt.net.cn
+ * @date 2019/9/19 10:15
+ */
+ @PostMapping(value = "oss/file/uploadFile", consumes = MediaType.APPLICATION_JSON_VALUE)
+ Result uploadFile(UploadToOssDTO dto);
+
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/fallback/OssFeignClientFallback.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/fallback/OssFeignClientFallback.java
new file mode 100644
index 000000000..ac7f8779e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/feign/fallback/OssFeignClientFallback.java
@@ -0,0 +1,22 @@
+package com.elink.esua.epdc.modules.epidemic.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.UploadToOssDTO;
+import com.elink.esua.epdc.modules.epidemic.feign.OssFeignClient;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author work@yujt.net.cn
+ * @date 19/9/19 10:12
+ */
+@Component
+public class OssFeignClientFallback implements OssFeignClient {
+
+ @Override
+ public Result uploadFile(UploadToOssDTO dto) {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_OSS_SERVER, "uploadFile", dto.getFileName());
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index 702bf56c7..17be68cc5 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -21,9 +21,8 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.EpidemicSentryPostDTO;
+import com.elink.esua.epdc.dto.form.CreateCodeFormDTO;
import com.elink.esua.epdc.modules.epidemic.entity.EpidemicSentryPostEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@@ -132,4 +131,23 @@ public interface EpidemicSentryPostService extends BaseService page(Map params) {
IPage page = baseDao.selectPage(
@@ -163,4 +181,106 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(data);
+ List categoryEntityList = baseDao.selectList(wrapper);
+ if(categoryEntityList.size()==0 || categoryEntityList==null){
+ throw new RenException("根据网格id未查到哨卡信息!");
+ }
+ for(EpidemicSentryPostEntity entity : categoryEntityList){
+ String param = "G="+entity.getGridId()+";P="+entity.getSentryPostCode();
+ entity.setMaCodeUrl(this.createMaCode(param,MA_FRONT_PAGE_URL));
+// entity.setMaCodeUrl("testUrl222");
+ baseDao.updateById(entity);
+ }
+ return new Result().ok("批量生成小程序码成功。");
+ }
+
+ /**
+ * 创建微信小程序码,并上传到oss
+ *
+ * @param param 小程序码的参数
+ * @param pageUrl 小程序码的跳转链接
+ * @return java.lang.String 小程序码的下载抵制
+ * @author work@yujt.net.cn
+ * @date 2019/10/22 10:14
+ */
+ private String createMaCode(String param, String pageUrl) {
+ File wxaCodeUnlimit;
+ try {
+ wxaCodeUnlimit = wxMaServiceUtils.normalWxMaService().getQrcodeService()
+ .createWxaCodeUnlimit(param, pageUrl, 1280, true, null, false);
+ } catch (WxErrorException e) {
+ throw new RenException("请求微信接口失败");
+ }
+
+ UploadToOssDTO dto = new UploadToOssDTO();
+ dto.setFileByte(this.fileToByteArray(wxaCodeUnlimit));
+ dto.setFileName(wxaCodeUnlimit.getName());
+
+ Result ossResult = ossFeignClient.uploadFile(dto);
+ if (null == ossResult || !ossResult.success() || null == ossResult.getData()) {
+ throw new RenException("小程序码上传失败");
+ }
+ return ossResult.getData();
+ }
+
+ /**
+ * File文件转为byte[]
+ *
+ * @param file
+ * @return byte[]
+ * @author work@yujt.net.cn
+ * @date 2019/9/19 15:56
+ */
+ private byte[] fileToByteArray(File file) {
+ try {
+ //获取输入流
+ FileInputStream fis = new FileInputStream(file);
+ //新的 byte 数组输出流,缓冲区容量1024byte
+ ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
+ //缓存
+ byte[] b = new byte[1024];
+ int n;
+ while ((n = fis.read(b)) != NumConstant.ONE_NEG) {
+ bos.write(b, NumConstant.ZERO, n);
+ }
+ fis.close();
+ //改变为byte[]
+ byte[] data = bos.toByteArray();
+ bos.close();
+ return data;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
index a2323c50c..ce56ceb88 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
@@ -64,3 +64,22 @@ mybatis-plus:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
+
+wx:
+ ma:
+ configs:
+ - appid: @wx.ma.appId@
+ secret: @wx.ma.secret@
+ token: #微信小程序消息服务器配置的token
+ aesKey: #微信小程序消息服务器配置的EncodingAESKey
+ msgDataFormat: JSON
+ - appid: @work.wx.ma.appId@
+ secret: @work.wx.ma.secret@
+ token: #微信小程序消息服务器配置的token
+ aesKey: #微信小程序消息服务器配置的EncodingAESKey
+ msgDataFormat: JSON
+ appId:
+ # 普通居民端的appId
+ normal: @wx.ma.appId@
+ # 工作端的appId
+ work: @work.wx.ma.appId@
\ No newline at end of file
From 673dd379ff22d05af18955364b48e9a3e2a0a489 Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Sat, 15 Feb 2020 15:34:11 +0800
Subject: [PATCH 12/21] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=93=A8=E5=8D=A1?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epidemic/service/impl/EpidemicSentryPostServiceImpl.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 71c7102e7..6ad4a4f34 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -95,9 +95,13 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl getWrapper(Map params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
+ String gridId = (String) params.get(FieldConstant.GRID_ID_HUMP);
+ String sentryPostCode = (String) params.get("sentryPostCode");
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+ wrapper.eq(StringUtils.isNotBlank(gridId), "grid_id", gridId);
+ wrapper.like(StringUtils.isNotBlank(sentryPostCode), "sentry_post_code", sentryPostCode);
return wrapper;
}
From f8ec775cf543308db29d066bf68788bcd8a56503 Mon Sep 17 00:00:00 2001
From: liuchuang
Date: Sat, 15 Feb 2020 17:54:07 +0800
Subject: [PATCH 13/21] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epdc-module/epdc-custom/epdc-custom-server/pom.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
index 4dcbc9200..5d4784a1d 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
@@ -188,6 +188,13 @@
epdc
elink833066
+
+ wxdd8530c5f4926766
+ 5bf4fb813145431b3493a10aa7e041e9
+
+ wx29b074840ef4bfd9
+ 4adb1afccc69f205cdf5b521d74e2aca
+
true
47.104.224.45:8848
From f28669b4cf0b6253912051873a2f4537582791d9 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Sat, 15 Feb 2020 18:27:33 +0800
Subject: [PATCH 14/21] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E7=A0=81=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../EpidemicSentryPostController.java | 10 +++----
.../service/EpidemicSentryPostService.java | 4 +--
.../impl/EpidemicSentryPostServiceImpl.java | 27 +++++++++----------
3 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
index a5849939b..135c3fe62 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/controller/EpidemicSentryPostController.java
@@ -155,9 +155,8 @@ public class EpidemicSentryPostController {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("createCode")
- public Result createCode(@RequestBody CreateCodeFormDTO formDto){
- ValidatorUtils.validateEntity(formDto, new Class[0]);
- return this.epidemicSentryPostService.CreateCodeFormDTO(formDto);
+ public Result createPostsCode(@RequestBody CreateCodeFormDTO formDto){
+ return this.epidemicSentryPostService.createPostsCode(formDto);
}
/**
@@ -169,9 +168,8 @@ public class EpidemicSentryPostController {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("createCodes")
- public Result createCodes(@RequestBody CreateCodeFormDTO formDto){
- ValidatorUtils.validateEntity(formDto, new Class[0]);
- return this.epidemicSentryPostService.CreateCodeFormDTOs(formDto);
+ public Result createPostsCodes(@RequestBody CreateCodeFormDTO formDto){
+ return this.epidemicSentryPostService.createPostsCodes(formDto);
}
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
index 17be68cc5..a83d65916 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/EpidemicSentryPostService.java
@@ -140,7 +140,7 @@ public interface EpidemicSentryPostService extends BaseService wrapper = new QueryWrapper<>(data);
List categoryEntityList = baseDao.selectList(wrapper);
- if(categoryEntityList.size()==0 || categoryEntityList==null){
+ if (CollUtil.isEmpty(categoryEntityList)) {
throw new RenException("根据网格id未查到哨卡信息!");
}
- for(EpidemicSentryPostEntity entity : categoryEntityList){
- String param = "G="+entity.getGridId()+";P="+entity.getSentryPostCode();
- entity.setMaCodeUrl(this.createMaCode(param,MA_FRONT_PAGE_URL));
-// entity.setMaCodeUrl("testUrl222");
+ for (EpidemicSentryPostEntity entity : categoryEntityList) {
+ String param = "G=" + entity.getGridId() + ";P=" + entity.getSentryPostCode();
+ entity.setMaCodeUrl(this.createMaCode(param, MA_FRONT_PAGE_URL));
baseDao.updateById(entity);
}
return new Result().ok("批量生成小程序码成功。");
From a23db54e7e2ec8ee613d01abd39c24dd9962c543 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Sat, 15 Feb 2020 18:29:49 +0800
Subject: [PATCH 15/21] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E7=A0=81=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epidemic/service/impl/EpidemicSentryPostServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index e2fb2c8c9..0d212fc60 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -200,7 +200,7 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl
Date: Sat, 15 Feb 2020 18:45:12 +0800
Subject: [PATCH 16/21] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86=E4=B8=80?=
=?UTF-8?q?=E4=B8=8B=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epdc/service/impl/CustomServiceImpl.java | 223 +++++++++---------
.../impl/EpidemicSentryPostServiceImpl.java | 9 +-
2 files changed, 120 insertions(+), 112 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
index 231301ac8..fb51eb61d 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
@@ -1,5 +1,6 @@
package com.elink.esua.epdc.service.impl;
+import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.CompleteDeptDTO;
@@ -26,112 +27,118 @@ import org.springframework.stereotype.Service;
@Service
public class CustomServiceImpl implements CustomService {
- @Autowired
- private AdminFeignClient adminFeignClient;
- @Autowired
- private CustomFeignClient customFeignClient;
- @Autowired
- private AppUserRedis appUserRedis;
-
- @Autowired
- private UserFeignClient userFeignClient;
-
- /**
- * @param
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 获取所有组织机构信息
- * @Date 2020/1/28 13:31
- **/
- @Override
- public Result getDeptTree() {
- return adminFeignClient.getDeptTreeForEpiDemic();
- }
-
- /**
- * @param formDTO
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 疫情上报
- * @Date 2020/1/28 13:31
- **/
- @Override
- public Result report(EpiDemicReportFormDTO formDTO) {
- // 验证手机号
- this.checkSmsCode(formDTO.getMobile(), formDTO.getSmsCode());
- // 获取部门冗余信息
- if (null != formDTO.getDeptId()) {
- Result pidInfoResult = adminFeignClient.getParentAndAllDept(formDTO.getDeptId());
- if (pidInfoResult.success() && null != pidInfoResult.getData()) {
- formDTO.setParentDeptIds(pidInfoResult.getData().getParentDeptIds());
- formDTO.setParentDeptNames(pidInfoResult.getData().getParentDeptNames());
- formDTO.setAllDeptIds(pidInfoResult.getData().getAllDeptIds());
- formDTO.setAllDeptNames(pidInfoResult.getData().getAllDeptNames());
- }
- }
- return customFeignClient.report(formDTO);
- }
-
-
-
-
- /**
- * @param mobile 手机号
- * @param smsCode 用户输入的验证码
- * @Author yinzuomei
- * @Description 校验手机验证码
- * @Date 2020/1/28 13:50
- **/
- private void checkSmsCode(String mobile, String smsCode) {
- String redisSmsCode = appUserRedis.getSmsCode(mobile);
- if (StringUtils.isBlank(redisSmsCode) || !redisSmsCode.equals(smsCode)) {
- throw new RenException("手机验证码错误");
- }
- }
-
- @Override
- public Result getDeptInfoByMaCode(String code) {
- EpdcSentryPostInfoResultDTO epdcSentryPostInfoResultDTO = new EpdcSentryPostInfoResultDTO();
- //代表是小程序段解析的字符串
- if(code.indexOf(";")!=-1){
- String[] macCode = code.split(";");
- //拿取网格ID
- String gridId = macCode[0].split("=")[1];
- //拿取哨卡编码
- String sentryPostCode = macCode[1].split("=")[1];
- //拿取网格信息
- CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(gridId);
- epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
- epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
- epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
- epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
- //拿取哨卡信息
- Result epidemicSentryResult = customFeignClient.getEpidemicSentryBySentryPostCode(sentryPostCode);
- EpidemicSentryPostDTO epidemicSentryPostDTO = epidemicSentryResult.getData();
- if(epidemicSentryPostDTO==null){
- return new Result().error("哨卡信息为空");
- }
- epdcSentryPostInfoResultDTO.setSentryPostName(epidemicSentryPostDTO.getSentryPostName());
- epdcSentryPostInfoResultDTO.setThirdSentryPostId(epidemicSentryPostDTO.getThirdSentryPostId());
- }else{
- //拿取网格信息
- CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(code);
- epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
- epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
- epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
- epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
- }
- return new Result().ok(epdcSentryPostInfoResultDTO);
- }
-
- private CompleteDeptDTO getCompleteDeptDTOByGridId(String gridId){
- Result adminResult = adminFeignClient.getCompleteDept(Long.parseLong(gridId));
- return adminResult.getData();
- }
-
-
- @Override
- public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
- return userFeignClient.createPidemicInfo(completeInfoFromDto);
- }
+ @Autowired
+ private AdminFeignClient adminFeignClient;
+
+ @Autowired
+ private CustomFeignClient customFeignClient;
+
+ @Autowired
+ private AppUserRedis appUserRedis;
+
+ @Autowired
+ private UserFeignClient userFeignClient;
+
+ /**
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 获取所有组织机构信息
+ * @Date 2020/1/28 13:31
+ **/
+ @Override
+ public Result getDeptTree() {
+ return adminFeignClient.getDeptTreeForEpiDemic();
+ }
+
+ /**
+ * @param formDTO
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 疫情上报
+ * @Date 2020/1/28 13:31
+ **/
+ @Override
+ public Result report(EpiDemicReportFormDTO formDTO) {
+ // 验证手机号
+ this.checkSmsCode(formDTO.getMobile(), formDTO.getSmsCode());
+ // 获取部门冗余信息
+ if (null != formDTO.getDeptId()) {
+ Result pidInfoResult = adminFeignClient.getParentAndAllDept(formDTO.getDeptId());
+ if (pidInfoResult.success() && null != pidInfoResult.getData()) {
+ formDTO.setParentDeptIds(pidInfoResult.getData().getParentDeptIds());
+ formDTO.setParentDeptNames(pidInfoResult.getData().getParentDeptNames());
+ formDTO.setAllDeptIds(pidInfoResult.getData().getAllDeptIds());
+ formDTO.setAllDeptNames(pidInfoResult.getData().getAllDeptNames());
+ }
+ }
+ return customFeignClient.report(formDTO);
+ }
+
+
+ /**
+ * @param mobile 手机号
+ * @param smsCode 用户输入的验证码
+ * @Author yinzuomei
+ * @Description 校验手机验证码
+ * @Date 2020/1/28 13:50
+ **/
+ private void checkSmsCode(String mobile, String smsCode) {
+ String redisSmsCode = appUserRedis.getSmsCode(mobile);
+ if (StringUtils.isBlank(redisSmsCode) || !redisSmsCode.equals(smsCode)) {
+ throw new RenException("手机验证码错误");
+ }
+ }
+
+
+ @Override
+ public Result getDeptInfoByMaCode(String code) {
+ String combine = "-";
+ if (StringUtils.isBlank(code) || code.indexOf(combine) == NumConstant.ONE_NEG) {
+ return new Result().error("不是规范的哨卡小程序码");
+ }
+
+ EpdcSentryPostInfoResultDTO epdcSentryPostInfoResultDTO = new EpdcSentryPostInfoResultDTO();
+
+ String[] grididAndPostId = code.split(combine);
+ if (grididAndPostId.length < NumConstant.TWO) {
+ return new Result().error("哨卡小程序码信息异常");
+ }
+ // 网格id
+ String gridId = grididAndPostId[NumConstant.ZERO];
+ // 哨卡编码
+ String postCode = grididAndPostId[NumConstant.ONE];
+
+ //拿取网格信息
+ CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(gridId);
+ epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
+ epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
+ epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
+ epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
+
+ //拿取哨卡信息
+ Result epidemicSentryResult = customFeignClient.getEpidemicSentryBySentryPostCode(postCode);
+ if (!epidemicSentryResult.success() || null == epidemicSentryResult.getData()) {
+ return new Result().error("查询哨卡信息失败");
+ }
+ EpidemicSentryPostDTO epidemicSentryPostDTO = epidemicSentryResult.getData();
+ epdcSentryPostInfoResultDTO.setSentryPostName(epidemicSentryPostDTO.getSentryPostName());
+ epdcSentryPostInfoResultDTO.setThirdSentryPostId(epidemicSentryPostDTO.getThirdSentryPostId());
+
+ return new Result().ok(epdcSentryPostInfoResultDTO);
+ }
+
+ private CompleteDeptDTO getCompleteDeptDTOByGridId(String gridId) {
+ Result adminResult = adminFeignClient.getCompleteDept(Long.parseLong(gridId));
+ if (!adminResult.success() || null == adminResult.getData()) {
+ throw new RenException("查询网格信息失败");
+ }
+ return adminResult.getData();
+ }
+
+
+ @Override
+ public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
+ return userFeignClient.createPidemicInfo(completeInfoFromDto);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 0d212fc60..0627bde2f 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -137,10 +137,11 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl> listSentryPostName() {
+ public List> listSentryPostName() {
return baseDao.selectListSentryPostName();
}
@@ -200,7 +201,7 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl
Date: Sat, 15 Feb 2020 19:10:37 +0800
Subject: [PATCH 17/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BD=91=E6=A0=BCid?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java | 2 +-
.../com/elink/esua/epdc/service/impl/CustomServiceImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
index 43adea0b8..857a137bb 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSentryPostInfoResultDTO.java
@@ -23,7 +23,7 @@ public class EpdcSentryPostInfoResultDTO implements Serializable {
/**
* 网格ID
*/
- private Integer gridId;
+ private Long gridId;
/**
* 网格名
*/
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
index fb51eb61d..ac0c8efaa 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
@@ -113,7 +113,7 @@ public class CustomServiceImpl implements CustomService {
CompleteDeptDTO completeDept = getCompleteDeptDTOByGridId(gridId);
epdcSentryPostInfoResultDTO.setStreetName(completeDept.getStreet());
epdcSentryPostInfoResultDTO.setCommunityName(completeDept.getCommunity());
- epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId().intValue());
+ epdcSentryPostInfoResultDTO.setGridId(completeDept.getGridId());
epdcSentryPostInfoResultDTO.setGridName(completeDept.getGrid());
//拿取哨卡信息
From 8f91423c4d7390979deb52b04a93b5c442ffcf7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Sat, 15 Feb 2020 19:27:48 +0800
Subject: [PATCH 18/21] =?UTF-8?q?=E5=AE=8C=E5=96=84=EF=BC=88=E5=B1=85?=
=?UTF-8?q?=E6=B0=91=E5=9C=A8=E9=98=B2=E7=96=AB=E5=93=A8=E5=8D=A1=E8=BF=9B?=
=?UTF-8?q?=E8=A1=8C=E7=99=BB=E8=AE=B0=E6=97=B6=EF=BC=8C=E4=B8=8A=E9=80=81?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B9=B6=E5=AE=8C=E5=96=84=E5=85=9A=E7=BE=A4?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epdc/controller/ApiCustomController.java | 101 +++++++--------
.../esua/epdc/feign/UserFeignClient.java | 13 +-
.../esua/epdc/service/CustomService.java | 3 +-
.../epdc/service/impl/CustomServiceImpl.java | 115 +++++++++---------
.../EpdcAppPidemicCompleteInfoFromDTO.java | 12 +-
.../elink/esua/epdc/entity/UserEntity.java | 10 ++
.../esua/epdc/service/UserCarInfoService.java | 9 ++
.../service/impl/UserCarInfoServiceImpl.java | 8 ++
.../epdc/service/impl/UserServiceImpl.java | 27 ++--
9 files changed, 175 insertions(+), 123 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
index 945bef7e0..4b472d8f0 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCustomController.java
@@ -1,5 +1,7 @@
package com.elink.esua.epdc.controller;
+import com.elink.esua.epdc.common.token.dto.TokenDto;
+import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.DeptOption;
@@ -20,65 +22,64 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("custom/epidemic")
public class ApiCustomController {
- @Autowired
- private CustomService customService;
+ @Autowired
+ private CustomService customService;
- @Autowired
- private MessageService messageService;
+ @Autowired
+ private MessageService messageService;
- /**
- * @param
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 获取所有组织机构信息
- * @Date 2020/1/28 11:50
- **/
- @GetMapping("getDeptTree")
- public Result getDeptTree() {
- return customService.getDeptTree();
- }
+ /**
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 获取所有组织机构信息
+ * @Date 2020/1/28 11:50
+ **/
+ @GetMapping("getDeptTree")
+ public Result getDeptTree() {
+ return customService.getDeptTree();
+ }
- /**
- * @param mobile 手机号码
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 发送短信验证码
- * @Date 2020/1/28 11:55
- **/
- @GetMapping("sendCode")
- public Result sendCode(String mobile) {
- return messageService.sendSmsCode(mobile);
- }
+ /**
+ * @param mobile 手机号码
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 发送短信验证码
+ * @Date 2020/1/28 11:55
+ **/
+ @GetMapping("sendCode")
+ public Result sendCode(String mobile) {
+ return messageService.sendSmsCode(mobile);
+ }
- /**
- * @param formDTO
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 疫情上报
- * @Date 2020/1/28 13:23
- **/
- @PostMapping("report")
- public Result report(@RequestBody EpiDemicReportFormDTO formDTO) {
- ValidatorUtils.validateEntity(formDTO);
- return customService.report(formDTO);
- }
+ /**
+ * @param formDTO
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 疫情上报
+ * @Date 2020/1/28 13:23
+ **/
+ @PostMapping("report")
+ public Result report(@RequestBody EpiDemicReportFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ return customService.report(formDTO);
+ }
@GetMapping("sentryPost/getDeptInfoByMaCode")
public Result getDeptInfoByMaCode(String code) {
return customService.getDeptInfoByMaCode(code);
}
-
- /***
- * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
- * @param completeInfoFromDto
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @author qushutong
- * @date 2020/2/15 10:53
- */
- @PostMapping("sentryPost/completeInfo")
- public Result completeInfo(@RequestBody EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto){
- return customService.createPidemicInfo(completeInfoFromDto);
- }
+ /***
+ * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息
+ * @param completeInfoFromDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/2/15 10:53
+ */
+ @PostMapping("sentryPost/completeInfo")
+ public Result completeInfo(@RequestBody EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto, @LoginUser TokenDto userDetail) {
+ return customService.createPidemicInfo(completeInfoFromDto,userDetail);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
index 843b81d72..963b22a2b 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
@@ -186,7 +186,7 @@ public interface UserFeignClient {
* 获取网格长管理的网格列表
*
* @param userId
- * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
* @author work@yujt.net.cn
* @date 2019/10/23 13:34
*/
@@ -237,11 +237,10 @@ public interface UserFeignClient {
Result residentDetail(@PathVariable("userId") String userId);
/**
- *
* 获取用户最后一次切换的网格信息
*
- * @params [openId]
* @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @params [openId]
* @author liuchuang
* @since 2019/12/6 11:04
*/
@@ -289,7 +288,7 @@ public interface UserFeignClient {
/**
* @param formDTO
- * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
* @Author yinzuomei
* @Description 用户认证审核历史
* @Date 2019/11/22 13:17
@@ -305,12 +304,12 @@ public interface UserFeignClient {
* @Date 2019/11/22 14:22
**/
@PostMapping("app-user/epdc-app/usergrid/removeGrid")
- Result removeGrid(EpdcAppRemoveGridFormDTO formDto);
+ Result removeGrid(EpdcAppRemoveGridFormDTO formDto);
/**
* 获取邀请记录
*
- * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
* @author work@yujt.net.cn
* @date 2019/10/23 13:34
*/
@@ -324,7 +323,7 @@ public interface UserFeignClient {
* @Description 根据openId或者unionId查询用户信息
* @Date 2019/12/7 14:11
**/
- @PostMapping(value="app-user/epdc-app/user/queryUserDto", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @PostMapping(value = "app-user/epdc-app/user/queryUserDto", consumes = MediaType.APPLICATION_JSON_VALUE)
Result queryUserDto(EpdcAppQueryUserInfoFormDTO formDTO);
/***
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
index edf26c7fe..e7cd236af 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java
@@ -1,5 +1,6 @@
package com.elink.esua.epdc.service;
+import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppPidemicCompleteInfoFromDTO;
@@ -46,5 +47,5 @@ public interface CustomService {
* @author qushutong
* @date 2020/2/15 10:58
*/
- Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto);
+ Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto, TokenDto userDetail);
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
index ac0c8efaa..5ba059026 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java
@@ -1,6 +1,7 @@
package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
+import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.CompleteDeptDTO;
@@ -39,58 +40,6 @@ public class CustomServiceImpl implements CustomService {
@Autowired
private UserFeignClient userFeignClient;
- /**
- * @param
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 获取所有组织机构信息
- * @Date 2020/1/28 13:31
- **/
- @Override
- public Result getDeptTree() {
- return adminFeignClient.getDeptTreeForEpiDemic();
- }
-
- /**
- * @param formDTO
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @Author yinzuomei
- * @Description 疫情上报
- * @Date 2020/1/28 13:31
- **/
- @Override
- public Result report(EpiDemicReportFormDTO formDTO) {
- // 验证手机号
- this.checkSmsCode(formDTO.getMobile(), formDTO.getSmsCode());
- // 获取部门冗余信息
- if (null != formDTO.getDeptId()) {
- Result pidInfoResult = adminFeignClient.getParentAndAllDept(formDTO.getDeptId());
- if (pidInfoResult.success() && null != pidInfoResult.getData()) {
- formDTO.setParentDeptIds(pidInfoResult.getData().getParentDeptIds());
- formDTO.setParentDeptNames(pidInfoResult.getData().getParentDeptNames());
- formDTO.setAllDeptIds(pidInfoResult.getData().getAllDeptIds());
- formDTO.setAllDeptNames(pidInfoResult.getData().getAllDeptNames());
- }
- }
- return customFeignClient.report(formDTO);
- }
-
-
- /**
- * @param mobile 手机号
- * @param smsCode 用户输入的验证码
- * @Author yinzuomei
- * @Description 校验手机验证码
- * @Date 2020/1/28 13:50
- **/
- private void checkSmsCode(String mobile, String smsCode) {
- String redisSmsCode = appUserRedis.getSmsCode(mobile);
- if (StringUtils.isBlank(redisSmsCode) || !redisSmsCode.equals(smsCode)) {
- throw new RenException("手机验证码错误");
- }
- }
-
-
@Override
public Result getDeptInfoByMaCode(String code) {
String combine = "-";
@@ -137,8 +86,62 @@ public class CustomServiceImpl implements CustomService {
}
- @Override
- public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
- return userFeignClient.createPidemicInfo(completeInfoFromDto);
- }
+ /**
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 获取所有组织机构信息
+ * @Date 2020/1/28 13:31
+ **/
+ @Override
+ public Result getDeptTree() {
+ return adminFeignClient.getDeptTreeForEpiDemic();
+ }
+
+ /**
+ * @param formDTO
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 疫情上报
+ * @Date 2020/1/28 13:31
+ **/
+ @Override
+ public Result report(EpiDemicReportFormDTO formDTO) {
+ // 验证手机号
+ this.checkSmsCode(formDTO.getMobile(), formDTO.getSmsCode());
+ // 获取部门冗余信息
+ if (null != formDTO.getDeptId()) {
+ Result pidInfoResult = adminFeignClient.getParentAndAllDept(formDTO.getDeptId());
+ if (pidInfoResult.success() && null != pidInfoResult.getData()) {
+ formDTO.setParentDeptIds(pidInfoResult.getData().getParentDeptIds());
+ formDTO.setParentDeptNames(pidInfoResult.getData().getParentDeptNames());
+ formDTO.setAllDeptIds(pidInfoResult.getData().getAllDeptIds());
+ formDTO.setAllDeptNames(pidInfoResult.getData().getAllDeptNames());
+ }
+ }
+ return customFeignClient.report(formDTO);
+ }
+
+
+
+ /**
+ * @param mobile 手机号
+ * @param smsCode 用户输入的验证码
+ * @Author yinzuomei
+ * @Description 校验手机验证码
+ * @Date 2020/1/28 13:50
+ **/
+ private void checkSmsCode(String mobile, String smsCode) {
+ String redisSmsCode = appUserRedis.getSmsCode(mobile);
+ if (StringUtils.isBlank(redisSmsCode) || !redisSmsCode.equals(smsCode)) {
+ throw new RenException("手机验证码错误");
+ }
+ }
+
+
+ @Override
+ public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto, TokenDto userDetail) {
+ completeInfoFromDto.setUserId(userDetail.getUserId());
+ return userFeignClient.createPidemicInfo(completeInfoFromDto);
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
index 15831732c..792283966 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcAppPidemicCompleteInfoFromDTO.java
@@ -2,6 +2,7 @@ package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
+import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@@ -24,14 +25,23 @@ public class EpdcAppPidemicCompleteInfoFromDTO implements Serializable {
* isDriver : zW3ek3AUpm
* carNum : 6oOeXKemVl
*/
-
+ @NotBlank(message = "第三方哨卡ID")
private String postId;
+ @NotBlank(message = "姓名")
private String name;
+ @NotBlank(message = "身份证号")
private String idcard;
+ @NotBlank(message = "手机号")
private String phone;
+ @NotBlank(message = "居住地址")
private String habitationDetail;
+ @NotBlank(message = "是否租房")
private String isRent;
+ @NotBlank(message = "是否有车")
private String isDriver;
+ @NotBlank(message = "车牌号码")
private String carNum;
+ private String userId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java
index c1ae65855..d2e7f5da7 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserEntity.java
@@ -253,4 +253,14 @@ public class UserEntity extends BaseEpdcEntity {
* 所有部门名称
*/
private String allDeptNames;
+
+ /**
+ * 是否有车
+ */
+ private String rentFlag;
+
+ /**
+ * 是否租房
+ */
+ private String driverFlag;
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
index 431ae4b54..78e06a08a 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java
@@ -92,4 +92,13 @@ public interface UserCarInfoService extends BaseService {
* @date 2020-02-15
*/
void delete(String[] ids);
+
+ /***
+ * 根据carNumber
+ * @param carNumber
+ * @return com.elink.esua.epdc.dto.epdc.UserCarInfoDTO
+ * @author qushutong
+ * @date 2020/2/15 18:42
+ */
+ UserCarInfoDTO selectOneByCarNumber(String carNumber);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
index 2f2ec37fb..fb301bb6c 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java
@@ -101,4 +101,12 @@ public class UserCarInfoServiceImpl extends BaseServiceImpl implem
/**
* @param gridIdList
- * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
* @Author yinzuomei
* @Description 根据网格id查询网格下所有的用户
* @Date 2019/12/19 15:03
@@ -895,19 +895,30 @@ public class UserServiceImpl extends BaseServiceImpl implem
@Override
public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) {
- UserDTO userDTO =new UserDTO();
+ // 更新用户信息
+ UserEntity userEntity = selectById(completeInfoFromDto.getUserId());
+ UserDTO userDTO = ConvertUtils.sourceToTarget(userEntity, UserDTO.class);
userDTO.setRealName(completeInfoFromDto.getName());
userDTO.setIdentityNo(completeInfoFromDto.getIdcard());
userDTO.setMobile(completeInfoFromDto.getPhone());
userDTO.setAddress(completeInfoFromDto.getHabitationDetail());
userDTO.setRentFlag(completeInfoFromDto.getIsRent());
userDTO.setDriverFlag(completeInfoFromDto.getIsDriver());
- save(userDTO);
- UserCarInfoDTO dto = new UserCarInfoDTO();
- dto.setUserId(userDTO.getId());
- dto.setCarNumber(completeInfoFromDto.getCarNum());
- userCarInfoService.save(dto);
-
+ userDTO.setId(completeInfoFromDto.getUserId());
+ update(userDTO);
+ // 更新或存储用户车辆信息表
+ UserCarInfoDTO userCarInfoDTO = userCarInfoService.selectOneByCarNumber(completeInfoFromDto.getCarNum());
+ if (userCarInfoDTO == null) {
+ UserCarInfoDTO dto = new UserCarInfoDTO();
+ dto.setUserId(userDTO.getId());
+ dto.setCarNumber(completeInfoFromDto.getCarNum());
+ userCarInfoService.save(dto);
+ } else {
+ // 库里存的车牌号与该用户不相符
+ if (!userCarInfoDTO.getUserId().equals(userDTO.getId())) {
+ throw new RenException("保存失败,次车牌已被注册");
+ }
+ }
return new Result();
}
}
From 5c004c86720d82a3bb43116917d663ff8f01226c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com>
Date: Sun, 16 Feb 2020 10:38:26 +0800
Subject: [PATCH 19/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/elink/esua/epdc/service/impl/UserServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
index 15bd1b3e3..81db7e44a 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
@@ -916,7 +916,7 @@ public class UserServiceImpl extends BaseServiceImpl implem
} else {
// 库里存的车牌号与该用户不相符
if (!userCarInfoDTO.getUserId().equals(userDTO.getId())) {
- throw new RenException("保存失败,次车牌已被注册");
+ throw new RenException("保存失败,此车牌已被注册");
}
}
return new Result();
From a097581417027790b87ff359e597ab16d1e2e215 Mon Sep 17 00:00:00 2001
From: zhangyongzhangyong <2012005003@qq.coom>
Date: Sun, 16 Feb 2020 10:46:10 +0800
Subject: [PATCH 20/21] =?UTF-8?q?=E5=93=A8=E5=8D=A1=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=20sql=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/epidemic/EpidemicSentryPostDao.xml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
index 4f4198111..b05f2ab98 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/epidemic/EpidemicSentryPostDao.xml
@@ -50,9 +50,6 @@
WHERE
p.DEL_FLAG = 0
AND p.grid_id IS NULL
-
- AND p.sentry_post_name = like concat('%', #{sentryPostName}, '%')
-
ORDER BY
p.CREATED_TIME desc
From 7a1eef271181a6ffc0283f65df112a13d980c85d Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Sun, 16 Feb 2020 10:58:51 +0800
Subject: [PATCH 21/21] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E7=A0=81=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/EpidemicSentryPostServiceImpl.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
index 0627bde2f..5f4ef413e 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java
@@ -76,7 +76,7 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl page(Map params) {
@@ -201,6 +201,9 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl