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 @@ - + \ 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 + + \ 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 @@ + 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