From 5a3533dca3aae93119c953f97d6dd19aa8456fc8 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 27 Jun 2022 17:45:42 +0800 Subject: [PATCH 001/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E6=96=B0=E5=A2=9E=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcBuildingDTO.java | 17 +++- .../main/java/com/epmet/dto/IcHouseDTO.java | 6 +- .../java/com/epmet/dto/IcNeighborHoodDTO.java | 15 ++++ .../epmet/dto/IcOrganizationCodeInfoDTO.java | 44 ++++++++++ .../IcOrganizationCodeInfoController.java | 82 +++++++++++++++++ .../epmet/dao/IcOrganizationCodeInfoDao.java | 16 ++++ .../com/epmet/entity/IcBuildingEntity.java | 15 ++++ .../java/com/epmet/entity/IcHouseEntity.java | 5 ++ .../epmet/entity/IcNeighborHoodEntity.java | 15 ++++ .../entity/IcOrganizationCodeInfoEntity.java | 45 ++++++++++ .../excel/IcOrganizationCodeInfoExcel.java | 33 +++++++ .../redis/IcOrganizationCodeInfoRedis.java | 30 +++++++ .../IcOrganizationCodeInfoService.java | 78 +++++++++++++++++ .../IcOrganizationCodeInfoServiceImpl.java | 87 +++++++++++++++++++ .../mapper/IcOrganizationCodeInfoDao.xml | 15 ++++ 15 files changed, 501 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java index b72e68c723..52567226eb 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java @@ -141,4 +141,19 @@ public class IcBuildingDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file + /** + * 楼栋编码 + */ + private String coding; + + /** + * 楼栋系统编码 + */ + private String sysCoding; + + /** + * 实有人口数 + */ + private Integer realPerson; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java index 42163539ce..8f3918adb9 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java @@ -152,4 +152,8 @@ public class IcHouseDTO implements Serializable { */ private String remark; -} \ No newline at end of file + /** + * 房屋可编辑编码 + */ + private String coding; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java index 14bc28d43b..d50508c522 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java @@ -129,4 +129,19 @@ public class IcNeighborHoodDTO implements Serializable { */ private Date updatedTime; + /** + * 小区编码 + */ + private String coding; + + /** + * 小区系统编码 + */ + private String sysCoding; + + /** + * 实有楼栋数 + */ + private Integer realBuilding; + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java new file mode 100644 index 0000000000..edeca85503 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Data +public class IcOrganizationCodeInfoDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 社区id + */ + private String communityId; + + /** + * 该社区下最大的小区编码序列号 + */ + private String neighborMaxNum; + + /** + * 该社区下最大的楼栋编码序列号 + */ + private String buildingMaxNum; + + /** + * 该社区下最大的房屋编码序列号 + */ + private String houseMaxNum; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java new file mode 100644 index 0000000000..5e20a16ea3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java @@ -0,0 +1,82 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcOrganizationCodeInfoDTO; +import com.epmet.excel.IcOrganizationCodeInfoExcel; +import com.epmet.service.IcOrganizationCodeInfoService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@RestController +@RequestMapping("icOrganizationCodeInfo") +public class IcOrganizationCodeInfoController { + + @Autowired + private IcOrganizationCodeInfoService icOrganizationCodeInfoService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icOrganizationCodeInfoService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcOrganizationCodeInfoDTO data = icOrganizationCodeInfoService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcOrganizationCodeInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icOrganizationCodeInfoService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcOrganizationCodeInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icOrganizationCodeInfoService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icOrganizationCodeInfoService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icOrganizationCodeInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcOrganizationCodeInfoExcel.class); + } + + + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java new file mode 100644 index 0000000000..c3b0a92d80 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcOrganizationCodeInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Mapper +public interface IcOrganizationCodeInfoDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java index 1b0535f803..801267e2dd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java @@ -107,4 +107,19 @@ public class IcBuildingEntity extends BaseEpmetEntity { */ private String coordinatePosition; + /** + * 楼栋编码 + */ + private String coding; + + /** + * 楼栋系统编码 + */ + private String sysCoding; + + /** + * 实有人口数 + */ + private Integer realPerson; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java index a535667426..1568dee910 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java @@ -117,4 +117,9 @@ public class IcHouseEntity extends BaseEpmetEntity { */ private String houseCode; private String houseQrcodeUrl; + + /** + * 房屋可编辑编码 + */ + private String coding; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java index 8f83a0aba1..f96edb70bb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java @@ -101,4 +101,19 @@ public class IcNeighborHoodEntity extends BaseEpmetEntity { @TableField(exist = false) private String propertyName; + + /** + * 小区编码 + */ + private String coding; + + /** + * 小区系统编码 + */ + private String sysCoding; + + /** + * 实有楼栋数 + */ + private Integer realBuilding; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java new file mode 100644 index 0000000000..f4e9671a73 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java @@ -0,0 +1,45 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_organization_code_info") +public class IcOrganizationCodeInfoEntity{ + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 社区id + */ + private String communityId; + + /** + * 该社区下最大的小区编码序列号 + */ + private String neighborMaxNum; + + /** + * 该社区下最大的楼栋编码序列号 + */ + private String buildingMaxNum; + + /** + * 该社区下最大的房屋编码序列号 + */ + private String houseMaxNum; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java new file mode 100644 index 0000000000..3402ef797a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java @@ -0,0 +1,33 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Data +public class IcOrganizationCodeInfoExcel { + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "社区id") + private String communityId; + + @Excel(name = "该社区下最大的小区编码序列号") + private String neighborMaxNum; + + @Excel(name = "该社区下最大的楼栋编码序列号") + private String buildingMaxNum; + + @Excel(name = "该社区下最大的房屋编码序列号") + private String houseMaxNum; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java new file mode 100644 index 0000000000..50860d27ae --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java @@ -0,0 +1,30 @@ +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Component +public class IcOrganizationCodeInfoRedis { + @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/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java new file mode 100644 index 0000000000..e98db783b5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcOrganizationCodeInfoDTO; +import com.epmet.entity.IcOrganizationCodeInfoEntity; + +import java.util.List; +import java.util.Map; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +public interface IcOrganizationCodeInfoService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcOrganizationCodeInfoDTO + * @author generator + * @date 2022-06-27 + */ + IcOrganizationCodeInfoDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-27 + */ + void save(IcOrganizationCodeInfoDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-27 + */ + void update(IcOrganizationCodeInfoDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java new file mode 100644 index 0000000000..d6eba569b3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -0,0 +1,87 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcOrganizationCodeInfoDao; +import com.epmet.dto.IcOrganizationCodeInfoDTO; +import com.epmet.entity.IcOrganizationCodeInfoEntity; +import com.epmet.redis.IcOrganizationCodeInfoRedis; +import com.epmet.service.IcOrganizationCodeInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 小区/楼栋/房屋编码辅助表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-27 + */ +@Service +public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl implements IcOrganizationCodeInfoService { + + @Autowired + private IcOrganizationCodeInfoRedis icOrganizationCodeInfoRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcOrganizationCodeInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcOrganizationCodeInfoDTO.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 IcOrganizationCodeInfoDTO get(String id) { + IcOrganizationCodeInfoEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcOrganizationCodeInfoDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcOrganizationCodeInfoDTO dto) { + IcOrganizationCodeInfoEntity entity = ConvertUtils.sourceToTarget(dto, IcOrganizationCodeInfoEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcOrganizationCodeInfoDTO dto) { + IcOrganizationCodeInfoEntity entity = ConvertUtils.sourceToTarget(dto, IcOrganizationCodeInfoEntity.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/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml new file mode 100644 index 0000000000..b544ba7019 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file From fa6a99ce19c4cb70a2459625d890b9bdaafb111a Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 28 Jun 2022 09:41:24 +0800 Subject: [PATCH 002/122] =?UTF-8?q?=E9=80=9A=E7=94=A8controller=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HouseInformationController.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java new file mode 100644 index 0000000000..2c71e1f4df --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -0,0 +1,35 @@ +/** + * 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.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 双实信息相关 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@RestController +@RequestMapping("houseInformation") +public class HouseInformationController { + + +} From e95168c269bad365f5832aabb14cc33243b19c32 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jun 2022 14:21:46 +0800 Subject: [PATCH 003/122] =?UTF-8?q?=E9=A9=B3=E5=9B=9E=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserConfirmServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java index 794974e1eb..0ebe094de0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java @@ -336,6 +336,11 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl Date: Tue, 28 Jun 2022 15:37:07 +0800 Subject: [PATCH 004/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-flyway=E8=84=9A=E6=9C=AC=E5=8F=8A=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=AF=A6=E6=83=85=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HouseInformationController.java | 53 +++++++++++++++++++ .../com/epmet/service/IcBuildingService.java | 12 ++++- .../epmet/service/IcBuildingUnitService.java | 12 ++++- .../epmet/service/IcNeighborHoodService.java | 9 ++++ .../service/impl/IcBuildingServiceImpl.java | 8 ++- .../impl/IcBuildingUnitServiceImpl.java | 8 ++- .../impl/IcNeighborHoodServiceImpl.java | 5 ++ .../V0.0.31_add_ic_organization_code_info.sql | 18 +++++++ 8 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 2c71e1f4df..d70f5e9510 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -17,6 +17,16 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IcBuildingDTO; +import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.service.IcBuildingService; +import com.epmet.service.IcBuildingUnitService; +import com.epmet.service.IcNeighborHoodService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -31,5 +41,48 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("houseInformation") public class HouseInformationController { + @Autowired + private IcNeighborHoodService icNeighborHoodService; + @Autowired + private IcBuildingService icBuildingService; + + @Autowired + private IcBuildingUnitService icBuildingUnitService; + + /** + * @describe: 【双实录入】小区详情 + * @author wangtong + * @date 2022/6/28 10:48 + * @params [neighborhoodId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("neighborhoodDetail/{neighborhoodId}") + public Result neighborhoodDetail(@PathVariable("neighborhoodId") String neighborhoodId){ + return icNeighborHoodService.neighborhoodDetail(neighborhoodId); + } + + /** + * @describe: 【双实录入】楼栋详情 + * @author wangtong + * @date 2022/6/28 14:30 + * @params [buildingId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getBuildingDetail/{buildingId}") + public Result getBuildingDetail(@PathVariable("buildingId") String buildingId){ + return icBuildingService.getBuildingDetail(buildingId); + } + + /** + * @describe: 【双实录入】单元详情 + * @author wangtong + * @date 2022/6/28 15:00 + * @params [unitId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getUnitDetail/{unitId}") + public Result getUnitDetail(@PathVariable("unitId") String unitId){ + return icBuildingUnitService.getUnitDetail(unitId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java index 0822d4805b..038055aa6b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.entity.IcBuildingEntity; @@ -122,4 +123,13 @@ public interface IcBuildingService extends BaseService { * @date 2022/4/27 13:29 */ void updateBuilding(ImportGeneralDTO info); -} \ No newline at end of file + + /** + * @describe: 【双实录入】楼栋详情 + * @author wangtong + * @date 2022/6/28 14:30 + * @params [buildingId] + * @return com.epmet.commons.tools.utils.Result + */ + Result getBuildingDetail(String buildingId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java index 0d315539e6..69538e3950 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.entity.IcBuildingUnitEntity; @@ -112,4 +113,13 @@ public interface IcBuildingUnitService extends BaseService * @Date 2022/2/14 15:42 */ IcBuildingUnitDTO getUnitInfo(String buildingId, String unitName); -} \ No newline at end of file + + /** + * @describe: 【双实录入】单元详情 + * @author wangtong + * @date 2022/6/28 15:00 + * @params [unitId] + * @return com.epmet.commons.tools.utils.Result + */ + Result getUnitDetail(String unitId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java index 087ab03441..085c363819 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java @@ -172,4 +172,13 @@ public interface IcNeighborHoodService extends BaseService * @date 2022/4/27 10:33 */ void neighborHoodPropertyUpdate(List updateNeighborHoodAndManagement); + + /** + * @describe: 【双实录入】小区详情 + * @author wangtong + * @date 2022/6/28 15:04 + * @params [neighborhoodId] + * @return com.epmet.commons.tools.utils.Result + */ + Result neighborhoodDetail(String neighborhoodId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java index 351fc95306..610e6f984b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcBuildingDao; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.ImportGeneralDTO; @@ -166,4 +167,9 @@ public class IcBuildingServiceImpl extends BaseServiceImpl getBuildingDetail(String buildingId) { + return null; + } + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java index 2e800bbda5..2959397fdd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.entity.IcBuildingUnitEntity; @@ -154,4 +155,9 @@ public class IcBuildingUnitServiceImpl extends BaseServiceImpl getUnitDetail(String unitId) { + return null; + } + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index c54ea3a436..7c26b4a947 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -791,4 +791,9 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl neighborhoodDetail(String neighborhoodId) { + return new Result().ok(baseDao.selectById(neighborhoodId)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql new file mode 100644 index 0000000000..64e1a21381 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql @@ -0,0 +1,18 @@ +CREATE TABLE `ic_organization_code_info` ( + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `COMMUNITY_ID` varchar(64) NOT NULL COMMENT '社区id', + `NEIGHBOR_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的小区编码序列号', + `BUILDING_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的楼栋编码序列号', + `HOUSE_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的房屋编码序列号' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小区/楼栋/房屋编码辅助表'; + + +alter table ic_neighbor_hood add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '小区编码'; +alter table ic_neighbor_hood add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '小区系统编码'; +alter table ic_neighbor_hood add COLUMN `REAL_BUILDING` int(10) DEFAULT NULL COMMENT '实有楼栋'; + +alter table ic_building add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '楼栋编码'; +alter table ic_building add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '楼栋系统编码'; +alter table ic_building add COLUMN `REAL_PERSON` int(10) DEFAULT NULL COMMENT '实有人口'; + +alter table ic_neighbor_hood add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '房屋可编辑编码'; From c54f2e32569bd5f2b2d41f93d66f9e29ed3481ed Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 28 Jun 2022 15:49:22 +0800 Subject: [PATCH 005/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-flyway=E8=84=9A=E6=9C=AC=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n_code_info.sql => V0.0.31__add_ic_organization_code_info.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/{V0.0.31_add_ic_organization_code_info.sql => V0.0.31__add_ic_organization_code_info.sql} (100%) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql similarity index 100% rename from epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31_add_ic_organization_code_info.sql rename to epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql From dc993c8b2e510d6ba19ac1b70e95f98f904906ed Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 28 Jun 2022 16:06:51 +0800 Subject: [PATCH 006/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-flyway=E8=84=9A=E6=9C=AC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.31__add_ic_organization_code_info.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql index 64e1a21381..c55fc29940 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.31__add_ic_organization_code_info.sql @@ -15,4 +15,4 @@ alter table ic_building add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT ' alter table ic_building add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '楼栋系统编码'; alter table ic_building add COLUMN `REAL_PERSON` int(10) DEFAULT NULL COMMENT '实有人口'; -alter table ic_neighbor_hood add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '房屋可编辑编码'; +alter table ic_house add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '房屋可编辑编码'; From 103fa88d5260815c60d82099fec5da6120596078 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 28 Jun 2022 17:11:33 +0800 Subject: [PATCH 007/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E5=B0=8F=E5=8C=BA-=E6=A5=BC=E6=A0=8B-?= =?UTF-8?q?=E5=8D=95=E5=85=83=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/IcBulidingDetailDTO.java | 120 ++++++++++++++++++ .../HouseInformationController.java | 8 +- .../java/com/epmet/dao/IcBuildingDao.java | 8 ++ .../java/com/epmet/dao/IcBuildingUnitDao.java | 11 +- .../com/epmet/service/IcBuildingService.java | 3 +- .../epmet/service/IcBuildingUnitService.java | 3 +- .../service/impl/IcBuildingServiceImpl.java | 5 +- .../impl/IcBuildingUnitServiceImpl.java | 6 +- .../main/resources/mapper/IcBuildingDao.xml | 25 ++++ .../resources/mapper/IcBuildingUnitDao.xml | 25 +++- 10 files changed, 202 insertions(+), 12 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java new file mode 100644 index 0000000000..e1d16b92d6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java @@ -0,0 +1,120 @@ +/** + * 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.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + + +@Data +public class IcBulidingDetailDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + private String buildingId; + + /** + * 组织id + */ + private String agencyId; + + + /** + * 网格id + */ + private String gridId; + + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 楼栋名称 + */ + private String buildingName; + + /** + * 楼栋类型 + */ + private String type; + + + /** + * 排序 + */ + private BigDecimal sort; + + /** + * 总单元数 + */ + private Integer totalUnitNum; + + /** + * 总楼层总数 + */ + private Integer totalFloorNum; + + /** + * 总户数 + */ + private Integer totalHouseNum; + /** + * 坐标位置 + */ + + private String location; + + + /** + * 中心点位:经度 + */ + + private String longitude; + + /** + * 中心点位:纬度 + */ + + private String latitude; + + /** + * 楼长姓名 + */ + private String buildingLeaderName; + + /** + * 楼长电话 + */ + private String buildingLeaderMobile; + + + /** + * 楼栋编码 + */ + private String coding; + + /** + * 实有人口数 + */ + private Integer realPerson; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index d70f5e9510..44fde8e41f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -18,8 +18,8 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IcBuildingDTO; -import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.dto.result.HouseInfoResultDTO; +import com.epmet.dto.result.IcBulidingDetailDTO; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.service.IcBuildingService; import com.epmet.service.IcBuildingUnitService; @@ -70,7 +70,7 @@ public class HouseInformationController { * @return com.epmet.commons.tools.utils.Result */ @PostMapping("getBuildingDetail/{buildingId}") - public Result getBuildingDetail(@PathVariable("buildingId") String buildingId){ + public Result getBuildingDetail(@PathVariable("buildingId") String buildingId){ return icBuildingService.getBuildingDetail(buildingId); } @@ -82,7 +82,7 @@ public class HouseInformationController { * @return com.epmet.commons.tools.utils.Result */ @PostMapping("getUnitDetail/{unitId}") - public Result getUnitDetail(@PathVariable("unitId") String unitId){ + public Result getUnitDetail(@PathVariable("unitId") String unitId){ return icBuildingUnitService.getUnitDetail(unitId); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index 3fd205a48d..a996255750 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -196,4 +196,12 @@ public interface IcBuildingDao extends BaseDao { */ Integer selectUnitCount(@Param("buildingId")String buildingId); + /** + * @describe: 获取楼栋详情 + * @author wangtong + * @date 2022/6/28 16:16 + * @params [buildingId] + * @return com.epmet.dto.result.IcBulidingDetailDTO + */ + IcBulidingDetailDTO getBuildingDetail(@Param("buildingId") String buildingId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java index 147f25f7d2..ad5e8358a7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.HouseInfoResultDTO; import com.epmet.entity.IcBuildingUnitEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -50,4 +51,12 @@ public interface IcBuildingUnitDao extends BaseDao { */ void delUnit(@Param("ids")List ids); -} \ No newline at end of file + /** + * @describe: 获取单元详情 + * @author wangtong + * @date 2022/6/28 17:03 + * @params [unitId] + * @return com.epmet.dto.result.HouseInfoResultDTO + */ + HouseInfoResultDTO getUnitDetail(@Param("unitId") String unitId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java index 038055aa6b..cde64d4da0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.ImportGeneralDTO; +import com.epmet.dto.result.IcBulidingDetailDTO; import com.epmet.entity.IcBuildingEntity; import java.util.List; @@ -131,5 +132,5 @@ public interface IcBuildingService extends BaseService { * @params [buildingId] * @return com.epmet.commons.tools.utils.Result */ - Result getBuildingDetail(String buildingId); + Result getBuildingDetail(String buildingId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java index 69538e3950..da966fbf6e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.dto.result.HouseInfoResultDTO; import com.epmet.entity.IcBuildingUnitEntity; import java.util.List; @@ -121,5 +122,5 @@ public interface IcBuildingUnitService extends BaseService * @params [unitId] * @return com.epmet.commons.tools.utils.Result */ - Result getUnitDetail(String unitId); + Result getUnitDetail(String unitId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java index 610e6f984b..9059a84eda 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcBuildingDao; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.ImportGeneralDTO; +import com.epmet.dto.result.IcBulidingDetailDTO; import com.epmet.entity.IcBuildingEntity; import com.epmet.service.IcBuildingService; import lombok.extern.slf4j.Slf4j; @@ -168,8 +169,8 @@ public class IcBuildingServiceImpl extends BaseServiceImpl getBuildingDetail(String buildingId) { - return null; + public Result getBuildingDetail(String buildingId) { + return new Result().ok(baseDao.getBuildingDetail(buildingId)); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java index 2959397fdd..6b55f20cfd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java @@ -28,6 +28,8 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.dto.result.HouseInfoResultDTO; +import com.epmet.dto.result.IcBulidingDetailDTO; import com.epmet.entity.IcBuildingUnitEntity; import com.epmet.service.IcBuildingUnitService; import lombok.extern.slf4j.Slf4j; @@ -156,8 +158,8 @@ public class IcBuildingUnitServiceImpl extends BaseServiceImpl getUnitDetail(String unitId) { - return null; + public Result getUnitDetail(String unitId) { + return new Result().ok(baseDao.getUnitDetail(unitId)); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index 92c486f24a..c87edfccd5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -403,5 +403,30 @@ + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml index 09f334b42d..31b2e4873e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml @@ -17,6 +17,29 @@ + - \ No newline at end of file + From ab07de4b80baebe2635916ce5156028a122ff2e3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jun 2022 17:12:22 +0800 Subject: [PATCH 008/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HouseInformationFormDTO.java | 24 +++ .../dto/result/BuildingCountResultDTO.java | 22 +++ .../dto/result/BuildingListResultDTO.java | 25 +++ .../dto/result/CommunityCountResultDTO.java | 23 +++ .../dto/result/GridCountListResultDTO.java | 25 +++ .../dto/result/GridStatisticsResultDTO.java | 24 +++ .../epmet/dto/result/HomeListResultDTO.java | 22 +++ .../result/NeighborHoodCountResultDTO.java | 24 +++ .../dto/result/NeighborHoodListResultDTO.java | 25 +++ .../epmet/dto/result/UnitCountResultDTO.java | 17 ++ .../epmet/dto/result/UnitListResultDTO.java | 22 +++ .../HouseInformationController.java | 158 +++++++++++++++++- .../service/HouseInformationService.java | 112 +++++++++++++ .../impl/HouseInformationServiceImpl.java | 157 +++++++++++++++++ 14 files changed, 678 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java new file mode 100644 index 0000000000..3533225669 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:06 + */ +@Data +public class HouseInformationFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 2348447479132364176L; + private String staffId; + private String communityId; + private String gridId; + private String neighborHoodId; + private String buildingId; + private String unitId; + private String name; + private String sort; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java new file mode 100644 index 0000000000..69f3919b61 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:49 + */ +@NoArgsConstructor +@Data +public class BuildingCountResultDTO { + private String buildingId; + private String buildingType; + private Integer unitCount; + private Integer houseCount; + private Integer personCount; + private Integer unitRealCount; + private Integer houseRealCount; + private Integer personRealCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java new file mode 100644 index 0000000000..ed54d7b998 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:45 + */ +@NoArgsConstructor +@Data +public class BuildingListResultDTO implements Serializable { + private static final long serialVersionUID = -1423424057500044373L; + private String id; + private String name; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer differBuildingCount; + private Integer differHouseCount; + private Integer differPersonCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java new file mode 100644 index 0000000000..2d85e642ca --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:24 + */ +@NoArgsConstructor +@Data +public class CommunityCountResultDTO implements Serializable { + private static final long serialVersionUID = -1677303397440121269L; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java new file mode 100644 index 0000000000..9a5c6b368c --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:35 + */ +@NoArgsConstructor +@Data +public class GridCountListResultDTO implements Serializable { + private static final long serialVersionUID = -7938740461257344347L; + private String id; + private String name; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer differBuildingCount; + private Integer differHouseCount; + private Integer differPersonCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java new file mode 100644 index 0000000000..d1a74e8847 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:37 + */ +@NoArgsConstructor +@Data +public class GridStatisticsResultDTO implements Serializable { + + private static final long serialVersionUID = -2022337690871957027L; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java new file mode 100644 index 0000000000..be5a99c195 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 17:00 + */ +@NoArgsConstructor +@Data +public class HomeListResultDTO implements Serializable { + private static final long serialVersionUID = -1098032063828430218L; + private String id; + private String name; + private Double personCount; + private String houseType; + private String houseCode; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java new file mode 100644 index 0000000000..9c7d5cfcfd --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:41 + */ +@NoArgsConstructor +@Data +public class NeighborHoodCountResultDTO implements Serializable { + private static final long serialVersionUID = 4148009467129407023L; + private String neighborHoodId; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java new file mode 100644 index 0000000000..fa41ac49f8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:21 + */ +@NoArgsConstructor +@Data +public class NeighborHoodListResultDTO implements Serializable { + private static final long serialVersionUID = -5333918463141094854L; + private String id; + private String name; + private Integer buildingCount; + private Integer houseCount; + private Integer personCount; + private Integer differBuildingCount; + private Integer differHouseCount; + private Integer differPersonCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java new file mode 100644 index 0000000000..548e0c4ef6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:56 + */ +@NoArgsConstructor +@Data +public class UnitCountResultDTO { + private String unitId; + private Integer houseCount; + private Integer personCount; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java new file mode 100644 index 0000000000..3d6256a399 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 16:53 + */ +@NoArgsConstructor +@Data +public class UnitListResultDTO implements Serializable { + private static final long serialVersionUID = -8750897881106004416L; + private String id; + private String name; + private Double houseCount; + private Double personCount; + private Double differHouseCount; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 44fde8e41f..1197747f69 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -18,8 +18,8 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.result.HouseInfoResultDTO; -import com.epmet.dto.result.IcBulidingDetailDTO; +import com.epmet.dto.IcBuildingDTO; +import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.service.IcBuildingService; import com.epmet.service.IcBuildingUnitService; @@ -50,6 +50,9 @@ public class HouseInformationController { @Autowired private IcBuildingUnitService icBuildingUnitService; + @Resource + private HouseInformationService houseInformationService; + /** * @describe: 【双实录入】小区详情 * @author wangtong @@ -85,4 +88,155 @@ public class HouseInformationController { public Result getUnitDetail(@PathVariable("unitId") String unitId){ return icBuildingUnitService.getUnitDetail(unitId); } + + /** + * 【双实录入】社区录入数据统计 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/28 15:32 + */ + @PostMapping("getCommunityCount") + public Result getCommunityCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result().ok(houseInformationService.getCommunityCount(formDTO)); + } + + /** + * 【双实录入】社区-网格列表 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/28 15:42 + */ + @PostMapping("getGridList") + public Result> getGridList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(houseInformationService.getGridList(formDTO)); + } + + /** + * 【双实录入】网格录入数据统计 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/28 15:42 + */ + @PostMapping("getGridCount") + public Result getGridCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result().ok(houseInformationService.getGridCount(formDTO)); + } + + /** + * 【双实录入】网格-小区列表 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/28 16:23 + */ + @PostMapping("getNeighborHoodList") + public Result> getNeighborHoodList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(houseInformationService.getNeighborHoodList(formDTO)); + } + + /** + * 【双实录入】小区录入数据统计 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/28 16:44 + */ + @PostMapping("getNeighborHoodCount") + public Result getNeighborHoodCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result().ok(houseInformationService.getNeighborHoodCount(formDTO)); + } + + /** + * 【双实录入】小区-楼栋列表 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/28 16:47 + */ + @PostMapping("getBuildingList") + public Result> getBuildingList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(houseInformationService.getBuildingList(formDTO)); + } + + + /** + * 【双实录入】楼栋录入数据统计 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/28 16:51 + */ + @PostMapping("getBuildingCount") + public Result getBuildingCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result().ok(houseInformationService.getBuildingCount(formDTO)); + } + + /** + * 【双实录入】楼栋-单元列表 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/28 16:55 + */ + @PostMapping("getUnitList") + public Result> getUnitList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(houseInformationService.getUnitList(formDTO)); + } + + /** + * 【双实录入】单元录入数据统计 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/28 16:57 + */ + @PostMapping("getUnitCount") + public Result getUnitCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result().ok(houseInformationService.getUnitCount(formDTO)); + } + + /** + * 【双实录入】单元-房屋列表 + * + * @Param tokenDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/28 17:02 + */ + @PostMapping("getHouseList") + public Result> getHouseList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(houseInformationService.getHouseList(formDTO)); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java new file mode 100644 index 0000000000..ab49566845 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java @@ -0,0 +1,112 @@ +package com.epmet.service; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.form.HouseInformationFormDTO; +import com.epmet.dto.result.*; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:14 + */ +public interface HouseInformationService { + /** + * 【双实录入】社区录入数据统计 + * + * @Param formDTO + * @Return {@link CommunityCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 15:31 + */ + CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】社区-网格列表 + * + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 15:41 + */ + PageData getGridList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格录入数据统计 + * + * @Param formDTO + * @Return {@link GridStatisticsResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 15:41 + */ + GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格-小区列表 + * + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 16:24 + */ + PageData getNeighborHoodList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区录入数据统计 + * + * @Param formDTO + * @Return {@link NeighborHoodCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:43 + */ + NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区-楼栋列表 + * + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 16:47 + */ + PageData getBuildingList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋录入数据统计 + * + * @Param formDTO + * @Return {@link BuildingCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:50 + */ + BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋-单元列表 + * + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 16:54 + */ + PageData getUnitList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元录入数据统计 + * + * @Param formDTO + * @Return {@link UnitCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:57 + */ + UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元-房屋列表 + * + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 17:01 + */ + PageData getHouseList(HouseInformationFormDTO formDTO); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java new file mode 100644 index 0000000000..0a03a15f97 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -0,0 +1,157 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.form.HouseInformationFormDTO; +import com.epmet.dto.result.*; +import com.epmet.service.HouseInformationService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/28 15:14 + */ +@Slf4j +@Service +public class HouseInformationServiceImpl implements HouseInformationService { + /** + * 【双实录入】社区录入数据统计 + * + * @param formDTO + * @Param formDTO + * @Return {@link CommunityCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 15:31 + */ + @Override + public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】社区-网格列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData < GridCountListResultDTO >} + * @Author zhaoqifeng + * @Date 2022/6/28 15:41 + */ + @Override + public PageData getGridList(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】网格录入数据统计 + * + * @param formDTO + * @Param formDTO + * @Return {@link GridStatisticsResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 15:41 + */ + @Override + public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】网格-小区列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData< NeighborHoodListResultDTO >} + * @Author zhaoqifeng + * @Date 2022/6/28 16:24 + */ + @Override + public PageData getNeighborHoodList(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】小区录入数据统计 + * + * @param formDTO + * @Param formDTO + * @Return {@link NeighborHoodCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:43 + */ + @Override + public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】小区-楼栋列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 16:47 + */ + @Override + public PageData getBuildingList(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】楼栋录入数据统计 + * + * @param formDTO + * @Param formDTO + * @Return {@link BuildingCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:50 + */ + @Override + public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】楼栋-单元列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 16:54 + */ + @Override + public PageData getUnitList(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】单元录入数据统计 + * + * @param formDTO + * @Param formDTO + * @Return {@link UnitCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 16:57 + */ + @Override + public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) { + return null; + } + + /** + * 【双实录入】单元-房屋列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2022/6/28 17:01 + */ + @Override + public PageData getHouseList(HouseInformationFormDTO formDTO) { + return null; + } +} From 1d88cceed21778682a21788c6d000c78fa55eb97 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jun 2022 17:14:20 +0800 Subject: [PATCH 009/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HouseInformationController.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 1197747f69..13bf9edbe5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -17,18 +17,21 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IcBuildingDTO; -import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.dto.form.HouseInformationFormDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.service.HouseInformationService; import com.epmet.service.IcBuildingService; import com.epmet.service.IcBuildingUnitService; import com.epmet.service.IcNeighborHoodService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; /** From 3b92febe1580525059186954c8fc1641346f9c2b Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 29 Jun 2022 15:45:40 +0800 Subject: [PATCH 010/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E8=8E=B7=E5=8F=96=E5=B0=8F=E5=8C=BA-?= =?UTF-8?q?=E6=A5=BC=E6=A0=8B-=E6=88=BF=E5=B1=8B=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/OrganizationCodeResultDTO.java | 26 ++ .../dto/result/OrganizationCommunityDTO.java | 24 ++ .../HouseInformationController.java | 44 ++- .../java/com/epmet/dao/CustomerGridDao.java | 9 + .../java/com/epmet/dao/IcBuildingDao.java | 19 ++ .../java/com/epmet/dao/IcBuildingUnitDao.java | 19 ++ .../main/java/com/epmet/dao/IcHouseDao.java | 9 + .../java/com/epmet/dao/IcNeighborHoodDao.java | 19 ++ .../epmet/dao/IcOrganizationCodeInfoDao.java | 50 +++- .../epmet/entity/IcBuildingUnitEntity.java | 10 + .../entity/IcOrganizationCodeInfoEntity.java | 4 + .../IcOrganizationCodeInfoService.java | 40 ++- .../IcOrganizationCodeInfoServiceImpl.java | 262 +++++++++++++++++- ....0.32__alter_ic_organization_code_info.sql | 4 + .../main/resources/mapper/CustomerGridDao.xml | 8 + .../main/resources/mapper/IcBuildingDao.xml | 17 ++ .../resources/mapper/IcBuildingUnitDao.xml | 18 ++ .../src/main/resources/mapper/IcHouseDao.xml | 6 + .../resources/mapper/IcNeighborHoodDao.xml | 16 ++ .../mapper/IcOrganizationCodeInfoDao.xml | 32 ++- 20 files changed, 622 insertions(+), 14 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java new file mode 100644 index 0000000000..c370f5bbe3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description:小区-楼栋-房屋编码 + * @author: wangtong + * @create: 2022-06-29 09:51 + **/ +@Data +public class OrganizationCodeResultDTO implements Serializable { + + /** + * 可编辑的楼栋编码 + */ + private String coding; + + + /** + * 不可编辑的楼栋编码 + */ + private String sysCoding; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java new file mode 100644 index 0000000000..1933aeaa66 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-29 10:13 + **/ +@Data +public class OrganizationCommunityDTO implements Serializable { + + private String communityId; + + private String areaCode; + + private String coding; + + private String sysCoding; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 13bf9edbe5..ea9b6504a0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -24,10 +24,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcNeighborHoodEntity; -import com.epmet.service.HouseInformationService; -import com.epmet.service.IcBuildingService; -import com.epmet.service.IcBuildingUnitService; -import com.epmet.service.IcNeighborHoodService; +import com.epmet.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -56,6 +53,9 @@ public class HouseInformationController { @Resource private HouseInformationService houseInformationService; + @Autowired + private IcOrganizationCodeInfoService icOrganizationCodeInfoService; + /** * @describe: 【双实录入】小区详情 * @author wangtong @@ -242,4 +242,40 @@ public class HouseInformationController { formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getHouseList(formDTO)); } + + /** + * @describe: 【双实录入】获取小区编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, gridId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getNeighborHoodCoding/{gridId}") + public Result getNeighborHoodCoding(@LoginUser TokenDto tokenDTO, @PathVariable("gridId") String gridId) { + return icOrganizationCodeInfoService.getNeighborHoodCoding(tokenDTO.getCustomerId(),gridId); + } + + /** + * @describe: 【双实录入】获取楼栋编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, neighborhoodId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getBuildingCoding/{neighborhoodId}") + public Result getBuildingCoding(@LoginUser TokenDto tokenDTO, @PathVariable("neighborhoodId") String neighborhoodId) { + return icOrganizationCodeInfoService.getBuildingCoding(tokenDTO.getCustomerId(),neighborhoodId); + } + + /** + * @describe: 【双实录入】获取房屋编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, unitId] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getHouseCoding/{unitId}") + public Result getHouseCoding(@LoginUser TokenDto tokenDTO, @PathVariable("unitId") String unitId) { + return icOrganizationCodeInfoService.getHouseCoding(tokenDTO.getCustomerId(),unitId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 737e579fa5..1fb999e0f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -384,4 +384,13 @@ public interface CustomerGridDao extends BaseDao { int updateTotalUser(@Param("gridId") String gridId, @Param("incrCount") long incrCount); List getDelGridIdList(@Param("agencyId") String agencyId); + + /** + * @describe: 通过网格id获取社区行政编码 + * @author wangtong + * @date 2022/6/29 10:16 + * @params [gridId] + * @return com.epmet.dto.result.OrganizationCommunityDTO + */ + OrganizationCommunityDTO selectCommunityByGridId(@Param("gridId") String gridId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index a996255750..e38cfbbdda 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -204,4 +204,23 @@ public interface IcBuildingDao extends BaseDao { * @return com.epmet.dto.result.IcBulidingDetailDTO */ IcBulidingDetailDTO getBuildingDetail(@Param("buildingId") String buildingId); + + /** + * @describe: 查询社区id及楼栋编码 + * @author wangtong + * @date 2022/6/29 14:39 + * @params [buildingId] + * @return com.epmet.dto.result.OrganizationCommunityDTO + */ + OrganizationCommunityDTO selectCommunityByBuildingId(@Param("buildingId") String buildingId); + + /** + * @describe: 通过可编辑编码查询 + * @author wangtong + * @date 2022/6/29 14:57 + * @params [coding] + * @return com.epmet.entity.IcBuildingEntity + */ + IcBuildingEntity selectByCoding(@Param("coding") String coding); + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java index ad5e8358a7..09c40920ed 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.HouseInfoResultDTO; +import com.epmet.dto.result.OrganizationCommunityDTO; import com.epmet.entity.IcBuildingUnitEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -59,4 +60,22 @@ public interface IcBuildingUnitDao extends BaseDao { * @return com.epmet.dto.result.HouseInfoResultDTO */ HouseInfoResultDTO getUnitDetail(@Param("unitId") String unitId); + + /** + * @describe: 通过可编辑编码查询 + * @author wangtong + * @date 2022/6/29 14:59 + * @params [coding] + * @return com.epmet.entity.IcBuildingUnitEntity + */ + IcBuildingUnitEntity selectByCoding(@Param("coding") String coding); + + /** + * @describe: 查询社区id及单元编码 + * @author wangtong + * @date 2022/6/29 15:15 + * @params [buildingId] + * @return com.epmet.dto.result.OrganizationCommunityDTO + */ + OrganizationCommunityDTO selectCommunityByUnitId(@Param("unitId") String unitId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index 8efb45cf92..9779126809 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -172,4 +172,13 @@ public interface IcHouseDao extends BaseDao { * @return java.util.List */ List searchHouseZipList(IcHouseListFormDTO formDTO); + + /** + * @describe: 通过可编辑的编码查询 + * @author wangtong + * @date 2022/6/29 15:24 + * @params [coding] + * @return com.epmet.entity.IcHouseEntity + */ + IcHouseEntity selectByCoding(@Param("coding") String coding); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index ca929081cc..0bdd1d770f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.NeighborHoodAndManagementDTO; import com.epmet.dto.form.IcNeighborHoodListFormDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.dto.result.OrganizationCommunityDTO; import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.excel.IcNeighborHoodExcel; @@ -91,4 +92,22 @@ public interface IcNeighborHoodDao extends BaseDao { void updateOneNeighborHood(ImportGeneralDTO info); String getAreaCode(@Param("neighborHoodId")String neighborHoodId); + + /** + * @describe: 查询社区id及小区编码 + * @author wangtong + * @date 2022/6/29 13:35 + * @params [neighborhoodId] + * @return com.epmet.dto.result.OrganizationCommunityDTO + */ + OrganizationCommunityDTO selectCommunityByNeiId(@Param("neighborhoodId") String neighborhoodId); + + /** + * @describe: 通过可编辑的编码查询 + * @author wangtong + * @date 2022/6/29 14:08 + * @params [coding] + * @return com.epmet.entity.IcNeighborHoodEntity + */ + IcNeighborHoodEntity selectByCoding(@Param("coding") String coding); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java index c3b0a92d80..f2429582e2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java @@ -3,6 +3,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcOrganizationCodeInfoEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 小区/楼栋/房屋编码辅助表 @@ -12,5 +13,50 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcOrganizationCodeInfoDao extends BaseDao { - -} \ No newline at end of file + + /** + * @describe: 通过客户id和社区id查询 + * @author wangtong + * @date 2022/6/29 10:24 + * @params [customerId, communityId] + * @return com.epmet.entity.IcOrganizationCodeInfoEntity + */ + IcOrganizationCodeInfoEntity selectByCommunityIdAndCustomerId(@Param("customerId") String customerId, + @Param("communityId") String communityId); + + /** + * @describe: 根据客户id和社区id更新小区编号 + * @author wangtong + * @date 2022/6/29 10:53 + * @params [communEntity] + * @return void + */ + void updateNeiByCuIdAndCoId(IcOrganizationCodeInfoEntity communEntity); + + /** + * @describe: 根据客户id和社区id更新楼栋编号 + * @author wangtong + * @date 2022/6/29 14:51 + * @params [buildingEntity] + * @return void + */ + void updateBuildingByCuIdAndCoId(IcOrganizationCodeInfoEntity buildingEntity); + + /** + * @describe: 根据客户id和社区id更新单元编号 + * @author wangtong + * @date 2022/6/29 15:01 + * @params [unitEntity] + * @return void + */ + void updateUnitByCuIdAndCoId(IcOrganizationCodeInfoEntity unitEntity); + + /** + * @describe: 根据客户id和社区id更新房屋编号 + * @author wangtong + * @date 2022/6/29 15:25 + * @params [houseEntity] + * @return void + */ + void updateHouseByCuIdAndCoId(IcOrganizationCodeInfoEntity houseEntity); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java index bce611c47f..02124c90cc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java @@ -55,4 +55,14 @@ public class IcBuildingUnitEntity extends BaseEpmetEntity { */ private String unitName; + /** + * 楼栋编码 + */ + private String coding; + + /** + * 楼栋系统编码 + */ + private String sysCoding; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java index f4e9671a73..e8c4a6d939 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java @@ -37,6 +37,10 @@ public class IcOrganizationCodeInfoEntity{ */ private String buildingMaxNum; + /** + * 该社区下最大的单元编码序列号 + */ + private String unitMaxNum; /** * 该社区下最大的房屋编码序列号 */ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java index e98db783b5..c0e3bb5545 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java @@ -2,7 +2,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcOrganizationCodeInfoDTO; +import com.epmet.dto.result.OrganizationCodeResultDTO; import com.epmet.entity.IcOrganizationCodeInfoEntity; import java.util.List; @@ -75,4 +77,40 @@ public interface IcOrganizationCodeInfoService extends BaseService + */ + Result getNeighborHoodCoding(String customerId, String gridId); + + /** + * @describe: 【双实录入】获取楼栋编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, neighborhoodId] + * @return com.epmet.commons.tools.utils.Result + */ + Result getBuildingCoding(String customerId, String neighborhoodId); + + /** + * @describe: 【双实录入】获取单元编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, neighborhoodId] + * @return com.epmet.commons.tools.utils.Result + */ + Result getUnitCoding(String customerId, String buildingId); + + /** + * @describe: 【双实录入】获取房屋编码 + * @author wangtong + * @date 2022/6/29 9:59 + * @params [tokenDTO, unitId] + * @return com.epmet.commons.tools.utils.Result + */ + Result getHouseCoding(String customerId, String unitId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index d6eba569b3..8cbb9ebbe0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -3,12 +3,19 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.IcOrganizationCodeInfoDao; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.*; import com.epmet.dto.IcOrganizationCodeInfoDTO; -import com.epmet.entity.IcOrganizationCodeInfoEntity; +import com.epmet.dto.ImportGeneralDTO; +import com.epmet.dto.result.HouseInfoResultDTO; +import com.epmet.dto.result.OrganizationCodeResultDTO; +import com.epmet.dto.result.OrganizationCommunityDTO; +import com.epmet.entity.*; import com.epmet.redis.IcOrganizationCodeInfoRedis; import com.epmet.service.IcOrganizationCodeInfoService; import org.apache.commons.lang3.StringUtils; @@ -32,6 +39,21 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -48,8 +70,8 @@ public class IcOrganizationCodeInfoServiceImpl 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); @@ -84,4 +106,232 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl getNeighborHoodCoding(String customerId, String gridId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(gridId)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); + } + OrganizationCodeResultDTO result = new OrganizationCodeResultDTO(); + //获取社区id、行政编码 + OrganizationCommunityDTO communResult = customerGridDao.selectCommunityByGridId(gridId); + if (null == communResult || StringUtils.isBlank(communResult.getCommunityId())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关社区信息", "未查到相关社区信息"); + } + //查询该社区下是否存在数据 + IcOrganizationCodeInfoEntity communEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + if (null == communEntity) { + String neighborCode = getCompleteAreaCode(communResult.getAreaCode()) + "001"; + + result.setCoding(neighborCode); + result.setSysCoding(neighborCode); + //新增该社区辅助数据 + IcOrganizationCodeInfoEntity newEntity = new IcOrganizationCodeInfoEntity(); + newEntity.setCustomerId(customerId); + newEntity.setCommunityId(communResult.getCommunityId()); + newEntity.setNeighborMaxNum("001"); + baseDao.insert(newEntity); + } else { + Integer neighborMaxNum = Integer.valueOf(communEntity.getNeighborMaxNum()) + 1; + //验证可编辑的编码是否有重复 + String neiCode = communResult.getCoding() + getNewMaxIndex(3, neighborMaxNum); + IcNeighborHoodEntity isHaveCoding = icNeighborHoodDao.selectByCoding(neiCode); + while (null != isHaveCoding) { + neighborMaxNum++; + neiCode = communResult.getCoding() + getNewMaxIndex(3, neighborMaxNum); + isHaveCoding = icNeighborHoodDao.selectByCoding(neiCode); + } + //更新该社区下最大的小区编号 + communEntity.setNeighborMaxNum(getNewMaxIndex(3, neighborMaxNum)); + baseDao.updateNeiByCuIdAndCoId(communEntity); + + String neighborCode = getCompleteAreaCode(communResult.getAreaCode()) + getNewMaxIndex(3, neighborMaxNum); + result.setCoding(neiCode); + result.setSysCoding(neighborCode); + } + return new Result().ok(result); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result getBuildingCoding(String customerId, String neighborhoodId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(neighborhoodId)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); + } + //组装返回结果 + OrganizationCodeResultDTO result = new OrganizationCodeResultDTO(); + + IcNeighborHoodEntity neighborHood = icNeighborHoodDao.selectById(neighborhoodId); + if (null == neighborHood) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关小区信息", "未查到相关小区信息"); + } + //如果小区编码为空,先生成小区编码并更新 + if (StringUtils.isBlank(neighborHood.getSysCoding())) { + OrganizationCodeResultDTO org = getNeighborHoodCoding(customerId, neighborHood.getGridId()).getData(); + neighborHood.setCoding(org.getCoding()); + neighborHood.setSysCoding(org.getSysCoding()); + icNeighborHoodDao.updateById(neighborHood); + } + + //获取社区id、小区编码 + OrganizationCommunityDTO communResult = icNeighborHoodDao.selectCommunityByNeiId(neighborhoodId); + //查询该社区下是否存在楼栋数据 + IcOrganizationCodeInfoEntity buildingEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + if (StringUtils.isBlank(buildingEntity.getBuildingMaxNum())) { + result.setCoding(communResult.getCoding() + "001"); + result.setSysCoding(communResult.getSysCoding() + "001"); + //补充该社区的楼栋最大数 + buildingEntity.setBuildingMaxNum("001"); + } else { + Integer buildingMaxNum = Integer.valueOf(buildingEntity.getBuildingMaxNum()) + 1; + //验证可编辑的编码是否有重复 + String buildingCode = communResult.getCoding() + getNewMaxIndex(3, buildingMaxNum); + IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(buildingCode); + while (null != isHaveCoding) { + buildingMaxNum++; + buildingCode = communResult.getCoding() + getNewMaxIndex(3, buildingMaxNum); + isHaveCoding = icBuildingDao.selectByCoding(buildingCode); + } + result.setCoding(buildingCode); + result.setSysCoding(communResult.getSysCoding() + getNewMaxIndex(3, buildingMaxNum)); + + //更新该社区下最大的楼栋编号 + buildingEntity.setBuildingMaxNum(getNewMaxIndex(3, buildingMaxNum)); + } + baseDao.updateBuildingByCuIdAndCoId(buildingEntity); + return new Result().ok(result); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result getUnitCoding(String customerId, String buildingId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(buildingId)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); + } + //组装返回结果 + OrganizationCodeResultDTO result = new OrganizationCodeResultDTO(); + + IcBuildingEntity buildingEntity = icBuildingDao.selectById(buildingId); + if (null == buildingEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关楼栋信息", "未查到相关楼栋信息"); + } + //如果楼栋编码为空,先生成楼栋编码并更新 + if (StringUtils.isBlank(buildingEntity.getSysCoding())) { + ImportGeneralDTO neiInfo = icBuildingDao.selectBuildingById(buildingId); + OrganizationCodeResultDTO org = getBuildingCoding(customerId, neiInfo.getNeighborHoodId()).getData(); + buildingEntity.setCoding(org.getCoding()); + buildingEntity.setSysCoding(org.getSysCoding()); + icBuildingDao.updateById(buildingEntity); + } + + //获取社区id、楼栋编码 + OrganizationCommunityDTO communResult = icBuildingDao.selectCommunityByBuildingId(buildingId); + //查询该社区下是否存在单元数据 + IcOrganizationCodeInfoEntity unitEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + if (StringUtils.isBlank(unitEntity.getUnitMaxNum())) { + result.setCoding(communResult.getCoding() + "001"); + result.setSysCoding(communResult.getSysCoding() + "001"); + //补充该社区的单元最大数 + unitEntity.setUnitMaxNum("001"); + } else { + Integer unitMaxNum = Integer.valueOf(unitEntity.getUnitMaxNum()) + 1; + //验证可编辑的编码是否有重复 + String unitCode = communResult.getCoding() + getNewMaxIndex(2, unitMaxNum); + IcBuildingUnitEntity isHaveCoding = icBuildingUnitDao.selectByCoding(unitCode); + while (null != isHaveCoding) { + unitMaxNum++; + unitCode = communResult.getCoding() + getNewMaxIndex(2, unitMaxNum); + isHaveCoding = icBuildingUnitDao.selectByCoding(unitCode); + } + result.setCoding(unitCode); + result.setSysCoding(communResult.getSysCoding() + getNewMaxIndex(2, unitMaxNum)); + + //更新该社区下最大的单元编号 + unitEntity.setUnitMaxNum(getNewMaxIndex(2, unitMaxNum)); + } + baseDao.updateUnitByCuIdAndCoId(unitEntity); + return new Result().ok(result); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result getHouseCoding(String customerId, String unitId) { + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(unitId)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); + } + //组装返回结果 + OrganizationCodeResultDTO result = new OrganizationCodeResultDTO(); + + IcBuildingUnitEntity unitEntity = icBuildingUnitDao.selectById(unitId); + if (null == unitEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到相关单元信息", "未查到相关单元信息"); + } + //如果单元编码为空,先生成单元编码并更新 + if (StringUtils.isBlank(unitEntity.getSysCoding())) { + HouseInfoResultDTO buildingInfo = icBuildingUnitDao.getUnitDetail(unitId); + OrganizationCodeResultDTO org = getUnitCoding(customerId, buildingInfo.getBuildingId()).getData(); + unitEntity.setCoding(org.getCoding()); + unitEntity.setSysCoding(org.getSysCoding()); + icBuildingUnitDao.updateById(unitEntity); + } + + //获取社区id、单元编码 + OrganizationCommunityDTO communResult = icBuildingUnitDao.selectCommunityByUnitId(unitId); + //查询该社区下是否存在单元数据 + IcOrganizationCodeInfoEntity houseEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + if (StringUtils.isBlank(houseEntity.getUnitMaxNum())) { + result.setCoding(communResult.getCoding() + "001"); + //补充该社区的单元最大数 + houseEntity.setUnitMaxNum("001"); + } else { + Integer houseMaxNum = Integer.valueOf(houseEntity.getUnitMaxNum()) + 1; + //验证可编辑的编码是否有重复 + String houseCode = communResult.getCoding() + getNewMaxIndex(4, houseMaxNum); + IcHouseEntity isHaveCoding = icHouseDao.selectByCoding(houseCode); + while (null != isHaveCoding) { + houseMaxNum++; + houseCode = communResult.getCoding() + getNewMaxIndex(4, houseMaxNum); + isHaveCoding = icHouseDao.selectByCoding(houseCode); + } + result.setCoding(houseCode); + + //更新该社区下最大的房屋编号 + houseEntity.setUnitMaxNum(getNewMaxIndex(4, houseMaxNum)); + } + baseDao.updateHouseByCuIdAndCoId(houseEntity); + return new Result().ok(result); + } + + /** + * @return java.lang.String + * @describe: 把数字转换成maxLength位的字符串,不够的前面补0 + * @author wangtong + * @date 2022/6/29 10:30 + * @params [maxLength, maxIndex] + */ + private String getNewMaxIndex(Integer maxLength, Integer maxIndex) { + String result = maxIndex.toString(); + while (result.length() < maxLength) { + result = "0" + result; + } + return result; + } + + /** + * @return java.lang.String + * @describe: 补全行政编码,12位 + * @author wangtong + * @date 2022/6/29 10:34 + * @params [areaCode] + */ + private String getCompleteAreaCode(String areaCode) { + if (StringUtils.isBlank(areaCode)) { + areaCode = "0"; + } + while (areaCode.length() < 12) { + areaCode = areaCode + "0"; + } + return areaCode; + } + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql new file mode 100644 index 0000000000..aa87d01a3a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql @@ -0,0 +1,4 @@ +alter table ic_organization_code_info add COLUMN`UNIT_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的单元编码序列号'; + +alter table ic_building_unit add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '单元编码'; +alter table ic_building_unit add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '单元系统编码'; diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index e428bc42c6..c98c898f26 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -861,5 +861,13 @@ UPDATE customer_grid SET total_user = total_user+#{incrCount} where id = #{gridId} and del_flag = '0' + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index c87edfccd5..a7ffad3cd8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -428,5 +428,22 @@ WHERE b.DEL_FLAG = '0' AND b.ID = #{buildingId} + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml index 31b2e4873e..fe5a0ef73b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingUnitDao.xml @@ -40,6 +40,24 @@ WHERE bu.DEL_FLAG = '0' AND bu.ID = #{unitId} + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index c55f985fc5..326bbc864f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -521,5 +521,11 @@ #{id} ) + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 8d6e24b5f7..544451a17c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -312,4 +312,20 @@ a.del_flag = '0' AND a.ID = #{neighborHoodId} + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml index b544ba7019..c5fea23a4f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcOrganizationCodeInfoDao.xml @@ -10,6 +10,36 @@ + + + update ic_organization_code_info + set NEIGHBOR_MAX_NUM=#{neighborMaxNum} + where CUSTOMER_ID = #{customerId} + and COMMUNITY_ID = #{communityId} + + + update ic_organization_code_info + set BUILDING_MAX_NUM=#{buildingMaxNum} + where CUSTOMER_ID = #{customerId} + and COMMUNITY_ID = #{communityId} + + + update ic_organization_code_info + set UNIT_MAX_NUM=#{unitMaxNum} + where CUSTOMER_ID = #{customerId} + and COMMUNITY_ID = #{communityId} + + + update ic_organization_code_info + set HOUSE_MAX_NUM=#{houseMaxNum} + where CUSTOMER_ID = #{customerId} + and COMMUNITY_ID = #{communityId} + - \ No newline at end of file + From a57b5a9940c7a5218d9642eceb7a501d9c4ac654 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 29 Jun 2022 16:42:16 +0800 Subject: [PATCH 011/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E5=B0=8F=E5=8C=BA=E3=80=81=E6=A5=BC?= =?UTF-8?q?=E6=A0=8B=E3=80=81=E6=88=BF=E5=B1=8B-=E6=96=B0=E5=A2=9E/?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcBulidingAddFormDTO.java | 13 +++++++++++++ .../com/epmet/dto/form/IcHouseAddFormDTO.java | 5 +++++ .../epmet/dto/form/IcNeighborHoodAddFormDTO.java | 13 +++++++++++++ .../com/epmet/dto/result/HouseInfoResultDTO.java | 5 +++++ .../main/java/com/epmet/dao/IcBuildingDao.java | 3 ++- .../java/com/epmet/dao/IcNeighborHoodDao.java | 3 ++- .../epmet/service/impl/BuildingServiceImpl.java | 14 ++++++++++++++ .../com/epmet/service/impl/HouseServiceImpl.java | 8 +++++++- .../impl/IcOrganizationCodeInfoServiceImpl.java | 8 ++++---- .../service/impl/NeighborHoodServiceImpl.java | 15 ++++++++++++++- .../src/main/resources/mapper/IcBuildingDao.xml | 3 +++ .../src/main/resources/mapper/IcHouseDao.xml | 3 ++- .../main/resources/mapper/IcNeighborHoodDao.xml | 3 +++ 13 files changed, 87 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java index 58655da002..e3401fa877 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java @@ -135,7 +135,20 @@ public class IcBulidingAddFormDTO implements Serializable { */ private String buildingLeaderMobile; + /** + * 楼栋编码 + */ + private String coding; + /** + * 楼栋系统编码 + */ + private String sysCoding; + + /** + * 实有人口数 + */ + private Integer realPerson; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java index a07f4fe886..aa4e6a999b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java @@ -108,4 +108,9 @@ public class IcHouseAddFormDTO implements Serializable { private BigDecimal sort = NumConstant.ZERO_DECIMAL; + /** + * 房屋可编辑编码 + */ + private String coding; + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java index 65708da4d3..854462c6e1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java @@ -99,7 +99,20 @@ public class IcNeighborHoodAddFormDTO extends PageFormDTO { private String latitude; + /** + * 小区编码 + */ + private String coding; + /** + * 小区系统编码 + */ + private String sysCoding; + + /** + * 实有楼栋数 + */ + private Integer realBuilding; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java index e83ec67bf4..ddb4af560e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java @@ -103,4 +103,9 @@ public class HouseInfoResultDTO implements Serializable { * 备注 */ private String remark; + + /** + * 房屋可编辑编码 + */ + private String coding; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index e38cfbbdda..8b0cd3f470 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -221,6 +221,7 @@ public interface IcBuildingDao extends BaseDao { * @params [coding] * @return com.epmet.entity.IcBuildingEntity */ - IcBuildingEntity selectByCoding(@Param("coding") String coding); + IcBuildingEntity selectByCoding(@Param("coding") String coding, + @Param("id") String id); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index 0bdd1d770f..ac8fc69c10 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -109,5 +109,6 @@ public interface IcNeighborHoodDao extends BaseDao { * @params [coding] * @return com.epmet.entity.IcNeighborHoodEntity */ - IcNeighborHoodEntity selectByCoding(@Param("coding") String coding); + IcNeighborHoodEntity selectByCoding(@Param("coding") String coding, + @Param("id") String id); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index 6a95c20596..a32f8489fb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -100,6 +100,13 @@ public class BuildingServiceImpl implements BuildingService { if (null != count && count > 0) { throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(), EpmetErrorCode.BUILDING_NAME_EXITED.getMsg()); } + //楼栋编码不可重复 + if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){ + IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(formDTO.getCoding(),null); + if(null != isHaveCoding){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!"); + } + } IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); icBuildingDTO.setCustomerId(customerId); IcBuildingEntity entity = ConvertUtils.sourceToTarget(icBuildingDTO, IcBuildingEntity.class); @@ -440,6 +447,13 @@ public class BuildingServiceImpl implements BuildingService { throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(), "楼栋单元下存在房屋,无法更新"); } } + //楼栋编码不可重复 + if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){ + IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(formDTO.getCoding(),formDTO.getBuildingId()); + if(null != isHaveCoding){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!"); + } + } IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); icBuildingDTO.setId(formDTO.getBuildingId()); icBuildingDTO.setCustomerId(customerId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index e329260f69..127eef5f0e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -137,7 +137,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (null != count && count > 0) { throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg()); } - + //房屋编码不可重复 + if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){ + IcHouseEntity isHaveCoding = icHouseDao.selectByCoding(formDTO.getCoding()); + if(null != isHaveCoding){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该房屋编码已存在,请勿重复!","该房屋编码已存在,请勿重复!"); + } + } IcHouseEntity icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); icHouseDTO.setCustomerId(customerId); icHouseDTO.setHouseName(getHouseName(formDTO)); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index 8cbb9ebbe0..3466b89a3b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -135,11 +135,11 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl 0) { throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg()); } - + //小区编码不可重复 + if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){ + IcNeighborHoodEntity isHaveCoding = icNeighborHoodDao.selectByCoding(formDTO.getCoding(),formDTO.getNeighborHoodId()); + if(null != isHaveCoding){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该小区编码已存在,请勿重复!","该小区编码已存在,请勿重复!"); + } + } IcNeighborHoodDTO icNeighborHoodDTO = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodDTO.class); icNeighborHoodDTO.setId(formDTO.getNeighborHoodId()); icNeighborHoodDTO.setCustomerId(customerId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index a7ffad3cd8..f552de0747 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -444,6 +444,9 @@ from ic_building where del_flag = '0' and CODING=#{coding} + + and id != #{id} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index 326bbc864f..b383b938b4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -450,7 +450,8 @@ a.OWNER_PHONE, a.OWNER_ID_CARD, a.REMARK, - c.AGENCY_PIDS + c.AGENCY_PIDS, + a.CODING from ic_house a LEFT JOIN ic_building b on a.BUILDING_ID = b.ID and b.DEL_FLAG = '0' LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0' diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 544451a17c..de52475d2a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -327,5 +327,8 @@ from ic_neighbor_hood where del_flag = '0' and CODING=#{coding} + + and id != #{id} + From 917af2df9c38038ed3ebb4abd961947bac5620c0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 29 Jun 2022 17:23:26 +0800 Subject: [PATCH 012/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HouseInformationFormDTO.java | 3 +- .../dto/result/BuildingCountResultDTO.java | 1 + .../dto/result/BuildingListResultDTO.java | 5 +- .../dto/result/CommunityCountResultDTO.java | 2 + .../dto/result/GridCountListResultDTO.java | 3 + .../dto/result/GridStatisticsResultDTO.java | 2 + .../result/NeighborHoodCountResultDTO.java | 1 + .../dto/result/NeighborHoodListResultDTO.java | 3 + .../epmet/dto/result/UnitCountResultDTO.java | 1 + .../HouseInformationController.java | 10 + .../java/com/epmet/dao/IcNeighborHoodDao.java | 104 +++++- .../impl/HouseInformationServiceImpl.java | 112 ++++++- .../resources/mapper/IcNeighborHoodDao.xml | 313 ++++++++++++++++++ 13 files changed, 543 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java index 3533225669..8fd3a8358e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java @@ -13,6 +13,7 @@ import java.io.Serializable; @Data public class HouseInformationFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = 2348447479132364176L; + private String customerId; private String staffId; private String communityId; private String gridId; @@ -20,5 +21,5 @@ public class HouseInformationFormDTO extends PageFormDTO implements Serializable private String buildingId; private String unitId; private String name; - private String sort; + private String sort = "1"; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java index 69f3919b61..c37e19702d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; @Data public class BuildingCountResultDTO { private String buildingId; + private String buildingName; private String buildingType; private Integer unitCount; private Integer houseCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java index ed54d7b998..e0f6c7e038 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java @@ -16,10 +16,11 @@ public class BuildingListResultDTO implements Serializable { private static final long serialVersionUID = -1423424057500044373L; private String id; private String name; - private Integer buildingCount; + private Integer unitCount; private Integer houseCount; private Integer personCount; - private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java index 2d85e642ca..50961f3a9f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java @@ -14,6 +14,8 @@ import java.io.Serializable; @Data public class CommunityCountResultDTO implements Serializable { private static final long serialVersionUID = -1677303397440121269L; + private String id; + private String name; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java index 9a5c6b368c..99318e3bc5 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java @@ -22,4 +22,7 @@ public class GridCountListResultDTO implements Serializable { private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java index d1a74e8847..ea5ff3634f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java @@ -15,6 +15,8 @@ import java.io.Serializable; public class GridStatisticsResultDTO implements Serializable { private static final long serialVersionUID = -2022337690871957027L; + private String gridId; + private String gridName; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java index 9c7d5cfcfd..610b7d871f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java @@ -15,6 +15,7 @@ import java.io.Serializable; public class NeighborHoodCountResultDTO implements Serializable { private static final long serialVersionUID = 4148009467129407023L; private String neighborHoodId; + private String neighborHoodName; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java index fa41ac49f8..ad256b2f9f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java @@ -22,4 +22,7 @@ public class NeighborHoodListResultDTO implements Serializable { private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java index 548e0c4ef6..ac8d1d8d03 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; @Data public class UnitCountResultDTO { private String unitId; + private String unitName; private Integer houseCount; private Integer personCount; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index ea9b6504a0..314940ecf8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -103,6 +103,7 @@ public class HouseInformationController { */ @PostMapping("getCommunityCount") public Result getCommunityCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getCommunityCount(formDTO)); } @@ -118,6 +119,7 @@ public class HouseInformationController { */ @PostMapping("getGridList") public Result> getGridList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getGridList(formDTO)); } @@ -133,6 +135,7 @@ public class HouseInformationController { */ @PostMapping("getGridCount") public Result getGridCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getGridCount(formDTO)); } @@ -148,6 +151,7 @@ public class HouseInformationController { */ @PostMapping("getNeighborHoodList") public Result> getNeighborHoodList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getNeighborHoodList(formDTO)); } @@ -163,6 +167,7 @@ public class HouseInformationController { */ @PostMapping("getNeighborHoodCount") public Result getNeighborHoodCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getNeighborHoodCount(formDTO)); } @@ -178,6 +183,7 @@ public class HouseInformationController { */ @PostMapping("getBuildingList") public Result> getBuildingList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getBuildingList(formDTO)); } @@ -194,6 +200,7 @@ public class HouseInformationController { */ @PostMapping("getBuildingCount") public Result getBuildingCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getBuildingCount(formDTO)); } @@ -209,6 +216,7 @@ public class HouseInformationController { */ @PostMapping("getUnitList") public Result> getUnitList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getUnitList(formDTO)); } @@ -224,6 +232,7 @@ public class HouseInformationController { */ @PostMapping("getUnitCount") public Result getUnitCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getUnitCount(formDTO)); } @@ -239,6 +248,7 @@ public class HouseInformationController { */ @PostMapping("getHouseList") public Result> getHouseList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getHouseList(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index ac8fc69c10..f872338c1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -21,9 +21,9 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.NeighborHoodAndManagementDTO; +import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.form.IcNeighborHoodListFormDTO; -import com.epmet.dto.result.IcNeighborHoodResultDTO; -import com.epmet.dto.result.OrganizationCommunityDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.excel.IcNeighborHoodExcel; @@ -111,4 +111,104 @@ public interface IcNeighborHoodDao extends BaseDao { */ IcNeighborHoodEntity selectByCoding(@Param("coding") String coding, @Param("id") String id); + + /** + * 社区录入数据统计 + * + * @Param communityId + * @Return {@link CommunityCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 17:16 + */ + CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】社区-网格列表 + * + * @Param formDTO + * @Return {@link List< GridCountListResultDTO>} + * @Author zhaoqifeng + * @Date 2022/6/29 11:06 + */ + List getGridList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格录入数据统计 + * + * @Param formDTO + * @Return {@link GridStatisticsResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 13:52 + */ + GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格-小区列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 14:11 + */ + List getNeighborHoodList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区录入数据统计 + * + * @Param formDTO + * @Return {@link NeighborHoodCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 14:27 + */ + NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区-楼栋列表 + * + * @Param formDTO + * @Return {@link List< BuildingListResultDTO>} + * @Author zhaoqifeng + * @Date 2022/6/29 14:50 + */ + List getBuildingList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋录入数据统计 + * + * @Param formDTO + * @Return {@link BuildingCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 15:44 + */ + BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋-单元列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 16:07 + */ + List getUnitList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元录入数据统计 + * + * @Param formDTO + * @Return {@link UnitCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 16:06 + */ + UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元-房屋列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 16:48 + */ + List getHouseList(HouseInformationFormDTO formDTO) } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java index 0a03a15f97..66aae8029b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -1,12 +1,28 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.dao.CustomerAgencyDao; +import com.epmet.dao.IcNeighborHoodDao; import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.result.*; +import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.enums.HouseRentFlagEnums; import com.epmet.service.HouseInformationService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + /** * @Description * @Author zhaoqifeng @@ -15,6 +31,12 @@ import org.springframework.stereotype.Service; @Slf4j @Service public class HouseInformationServiceImpl implements HouseInformationService { + + @Resource + private IcNeighborHoodDao icNeighborHoodDao; + @Resource + private CustomerAgencyDao customerAgencyDao; + /** * 【双实录入】社区录入数据统计 * @@ -26,7 +48,31 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { - return null; + if (StringUtils.isEmpty(formDTO.getCommunityId())) { + //获取工作人员所属组织 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if(null == staffInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败"); + } + formDTO.setCommunityId(staffInfo.getAgencyId()); + } + String orgName; + CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId()); + if (null == agency) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); + } + CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid()); + if (null == parentAgency) { + orgName = agency.getOrganizationName(); + } else { + orgName = parentAgency.getOrganizationName() + agency.getOrganizationName(); + } + //获取工作人员信息 + CommunityCountResultDTO result = icNeighborHoodDao.getCommunityCount(formDTO); + result.setId(agency.getId()); + result.setName(orgName); + //TODO 获取录入人口数 + return result; } /** @@ -34,13 +80,17 @@ public class HouseInformationServiceImpl implements HouseInformationService { * * @param formDTO * @Param formDTO - * @Return {@link PageData < GridCountListResultDTO >} + * @Return {@link PageData} * @Author zhaoqifeng * @Date 2022/6/28 15:41 */ @Override public PageData getGridList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getGridList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -54,7 +104,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) { - return null; + GridStatisticsResultDTO result = icNeighborHoodDao.getGridCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -62,13 +114,17 @@ public class HouseInformationServiceImpl implements HouseInformationService { * * @param formDTO * @Param formDTO - * @Return {@link PageData< NeighborHoodListResultDTO >} + * @Return {@link PageData} * @Author zhaoqifeng * @Date 2022/6/28 16:24 */ @Override public PageData getNeighborHoodList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getNeighborHoodList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -82,7 +138,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) { - return null; + NeighborHoodCountResultDTO result = icNeighborHoodDao.getNeighborHoodCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -96,7 +154,20 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getBuildingList(HouseInformationFormDTO formDTO) { - return null; + List list; + long total = 0; + //TODO 获取录入人口数 + if (NumConstant.FIVE_STR.equals(formDTO.getSort())) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + list = icNeighborHoodDao.getBuildingList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + total = pageInfo.getTotal(); + } else { + list = icNeighborHoodDao.getBuildingList(formDTO); + total = list.size(); + } + + return new PageData<>(list, total); } /** @@ -110,7 +181,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) { - return null; + BuildingCountResultDTO result = icNeighborHoodDao.getBuildingCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -124,7 +197,11 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getUnitList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getUnitList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -138,7 +215,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) { - return null; + UnitCountResultDTO result = icNeighborHoodDao.getUnitCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -152,6 +231,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getHouseList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getHouseList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); + }); + } + return new PageData<>(list, pageInfo.getTotal()); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index de52475d2a..2ac839f1ce 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -331,4 +331,317 @@ and id != #{id} + + + + + + + + + + + + + + + + + + + From bce6914e12a378e47446c88c4aa2a8f22602bad7 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 29 Jun 2022 17:56:17 +0800 Subject: [PATCH 013/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E8=A1=A8=E5=BF=85=E5=A1=AB=E9=A1=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcNeighborHoodDao.java | 2 +- .../impl/IcOrganizationCodeInfoServiceImpl.java | 10 +++++----- .../V0.0.32__alter_ic_organization_code_info.sql | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index f872338c1e..a1999a0ee6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -210,5 +210,5 @@ public interface IcNeighborHoodDao extends BaseDao { * @Author zhaoqifeng * @Date 2022/6/29 16:48 */ - List getHouseList(HouseInformationFormDTO formDTO) + List getHouseList(HouseInformationFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index 3466b89a3b..a992a25e31 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -229,10 +229,10 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl().ok(result); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql index aa87d01a3a..ee6e1fc7a1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql @@ -1,4 +1,9 @@ -alter table ic_organization_code_info add COLUMN`UNIT_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的单元编码序列号'; +alter table ic_organization_code_info add COLUMN `UNIT_MAX_NUM` varchar(10) NOT NULL COMMENT '该社区下最大的单元编码序列号'; alter table ic_building_unit add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '单元编码'; alter table ic_building_unit add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '单元系统编码'; + +ALTER TABLE ic_organization_code_info MODIFY COLUMN `NEIGHBOR_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的小区编码序列号'; +ALTER TABLE ic_organization_code_info MODIFY COLUMN `BUILDING_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的楼栋编码序列号'; +ALTER TABLE ic_organization_code_info MODIFY COLUMN `UNIT_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的单元编码序列号'; +ALTER TABLE ic_organization_code_info MODIFY COLUMN `HOUSE_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的房屋编码序列号'; From 061c51aaf80f7946b522c5bb997620b6afaa2015 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 30 Jun 2022 10:29:03 +0800 Subject: [PATCH 014/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E6=A5=BC=E6=A0=8B=E6=96=B0=E5=A2=9E/?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E6=95=B4=E5=9C=B0=E5=9D=80=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java | 2 +- .../main/java/com/epmet/dto/result/IcBulidingDetailDTO.java | 2 +- .../epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java | 4 ++-- .../src/main/resources/mapper/IcBuildingDao.xml | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java index e3401fa877..91b93b2569 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java @@ -110,7 +110,7 @@ public class IcBulidingAddFormDTO implements Serializable { * 坐标位置 */ - private String location; + private String coordinatePosition; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java index e1d16b92d6..910044f9cb 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java @@ -81,7 +81,7 @@ public class IcBulidingDetailDTO implements Serializable { * 坐标位置 */ - private String location; + private String coordinatePosition; /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index a992a25e31..80fce6a6a6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -134,11 +134,11 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl Date: Thu, 30 Jun 2022 10:31:30 +0800 Subject: [PATCH 015/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/BuildingCountResultDTO.java | 12 +- .../dto/result/BuildingListResultDTO.java | 14 +- .../dto/result/CommunityCountResultDTO.java | 12 +- .../dto/result/GridCountListResultDTO.java | 18 +- .../epmet/dto/result/HomeListResultDTO.java | 2 +- .../epmet/dto/result/UnitCountResultDTO.java | 4 +- .../epmet/dto/result/UnitListResultDTO.java | 6 +- .../impl/HouseInformationServiceImpl.java | 198 ++++++++++++++++-- .../resources/mapper/IcNeighborHoodDao.xml | 8 +- .../epmet/dto/form/IcUserCountFormDTO.java | 24 +++ .../dto/result/IcUserCountResultDTO.java | 17 ++ .../epmet/feign/EpmetUserOpenFeignClient.java | 11 + .../EpmetUserOpenFeignClientFallback.java | 14 ++ .../controller/IcResiUserController.java | 13 ++ .../java/com/epmet/dao/IcResiUserDao.java | 15 +- .../com/epmet/service/IcResiUserService.java | 10 + .../service/impl/IcResiUserServiceImpl.java | 18 ++ .../main/resources/mapper/IcResiUserDao.xml | 64 ++++++ 18 files changed, 400 insertions(+), 60 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserCountFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserCountResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java index c37e19702d..c6a09dd2ab 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java @@ -14,10 +14,10 @@ public class BuildingCountResultDTO { private String buildingId; private String buildingName; private String buildingType; - private Integer unitCount; - private Integer houseCount; - private Integer personCount; - private Integer unitRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer unitCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer unitRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java index e0f6c7e038..67b4642640 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java @@ -16,11 +16,11 @@ public class BuildingListResultDTO implements Serializable { private static final long serialVersionUID = -1423424057500044373L; private String id; private String name; - private Integer unitCount; - private Integer houseCount; - private Integer personCount; - private Integer differHouseCount; - private Integer differPersonCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer unitCoun = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer differHouseCount = 0; + private Integer differPersonCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java index 50961f3a9f..393d6d5b2e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java @@ -16,10 +16,10 @@ public class CommunityCountResultDTO implements Serializable { private static final long serialVersionUID = -1677303397440121269L; private String id; private String name; - private Integer buildingCount; - private Integer houseCount; - private Integer personCount; - private Integer buildingRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer buildingCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer buildingRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java index 99318e3bc5..6863f4cf49 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java @@ -16,13 +16,13 @@ public class GridCountListResultDTO implements Serializable { private static final long serialVersionUID = -7938740461257344347L; private String id; private String name; - private Integer buildingCount; - private Integer houseCount; - private Integer personCount; - private Integer differBuildingCount; - private Integer differHouseCount; - private Integer differPersonCount; - private Integer buildingRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer buildingCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer differBuildingCount = 0; + private Integer differHouseCount = 0; + private Integer differPersonCount = 0; + private Integer buildingRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java index be5a99c195..9dbf8bfcac 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java @@ -16,7 +16,7 @@ public class HomeListResultDTO implements Serializable { private static final long serialVersionUID = -1098032063828430218L; private String id; private String name; - private Double personCount; + private Integer personCount = 0; private String houseType; private String houseCode; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java index ac8d1d8d03..f9a634f59d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java @@ -13,6 +13,6 @@ import lombok.NoArgsConstructor; public class UnitCountResultDTO { private String unitId; private String unitName; - private Integer houseCount; - private Integer personCount; + private Integer houseCount = 0; + private Integer personCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java index 3d6256a399..4deeb9dd66 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java @@ -16,7 +16,7 @@ public class UnitListResultDTO implements Serializable { private static final long serialVersionUID = -8750897881106004416L; private String id; private String name; - private Double houseCount; - private Double personCount; - private Double differHouseCount; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer differHouseCount = 0; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java index 66aae8029b..ddd609fd47 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -6,12 +6,15 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.CustomerAgencyDao; import com.epmet.dao.IcNeighborHoodDao; import com.epmet.dto.form.HouseInformationFormDTO; +import com.epmet.dto.form.IcUserCountFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.enums.HouseRentFlagEnums; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HouseInformationService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -21,7 +24,11 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Collections; +import java.util.Comparator; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * @Description @@ -36,6 +43,8 @@ public class HouseInformationServiceImpl implements HouseInformationService { private IcNeighborHoodDao icNeighborHoodDao; @Resource private CustomerAgencyDao customerAgencyDao; + @Resource + private EpmetUserOpenFeignClient userOpenFeignClient; /** * 【双实录入】社区录入数据统计 @@ -71,7 +80,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { CommunityCountResultDTO result = icNeighborHoodDao.getCommunityCount(formDTO); result.setId(agency.getId()); result.setName(orgName); - //TODO 获取录入人口数 + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.ZERO_STR); + countFormDTO.setOrgId(formDTO.getCommunityId()); + countFormDTO.setType(NumConstant.ZERO_STR); + Map map = getMapResult(countFormDTO); + if (map.containsKey(formDTO.getCommunityId())) { + result.setPersonCount(map.get(formDTO.getCommunityId())); + } return result; } @@ -89,7 +106,22 @@ public class HouseInformationServiceImpl implements HouseInformationService { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); List list = icNeighborHoodDao.getGridList(formDTO); PageInfo pageInfo = new PageInfo<>(list); - //TODO 获取录入人口数 + if (CollectionUtils.isNotEmpty(list)) { + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.ZERO_STR); + countFormDTO.setOrgId(formDTO.getCommunityId()); + countFormDTO.setType(NumConstant.ONE_STR); + Map map = getMapResult(countFormDTO); + + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setPersonCount(map.get(item.getId())); + } + item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); + }); + + } return new PageData<>(list, pageInfo.getTotal()); } @@ -105,7 +137,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { @Override public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) { GridStatisticsResultDTO result = icNeighborHoodDao.getGridCount(formDTO); - //TODO 获取录入人口数 + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.ONE_STR); + countFormDTO.setOrgId(formDTO.getGridId()); + countFormDTO.setType(NumConstant.ZERO_STR); + Map map = getMapResult(countFormDTO); + if (map.containsKey(formDTO.getGridId())) { + result.setPersonCount(map.get(formDTO.getGridId())); + } return result; } @@ -123,7 +163,20 @@ public class HouseInformationServiceImpl implements HouseInformationService { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); List list = icNeighborHoodDao.getNeighborHoodList(formDTO); PageInfo pageInfo = new PageInfo<>(list); - //TODO 获取录入人口数 + if (CollectionUtils.isNotEmpty(list)) { + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.ONE_STR); + countFormDTO.setOrgId(formDTO.getGridId()); + countFormDTO.setType(NumConstant.ONE_STR); + Map map = getMapResult(countFormDTO); + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setPersonCount(map.get(item.getId())); + } + item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); + }); + } return new PageData<>(list, pageInfo.getTotal()); } @@ -139,7 +192,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { @Override public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) { NeighborHoodCountResultDTO result = icNeighborHoodDao.getNeighborHoodCount(formDTO); - //TODO 获取录入人口数 + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.TWO_STR); + countFormDTO.setOrgId(formDTO.getNeighborHoodId()); + countFormDTO.setType(NumConstant.ZERO_STR); + Map map = getMapResult(countFormDTO); + if (map.containsKey(formDTO.getNeighborHoodId())) { + result.setPersonCount(map.get(formDTO.getNeighborHoodId())); + } return result; } @@ -156,17 +217,47 @@ public class HouseInformationServiceImpl implements HouseInformationService { public PageData getBuildingList(HouseInformationFormDTO formDTO) { List list; long total = 0; - //TODO 获取录入人口数 - if (NumConstant.FIVE_STR.equals(formDTO.getSort())) { + + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.TWO_STR); + countFormDTO.setOrgId(formDTO.getNeighborHoodId()); + countFormDTO.setType(NumConstant.ONE_STR); + Map map = getMapResult(countFormDTO); + + if (!NumConstant.FIVE_STR.equals(formDTO.getSort())) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); list = icNeighborHoodDao.getBuildingList(formDTO); PageInfo pageInfo = new PageInfo<>(list); total = pageInfo.getTotal(); + + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setPersonCount(map.get(item.getId())); + } + item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); + }); + } } else { list = icNeighborHoodDao.getBuildingList(formDTO); - total = list.size(); + if (CollectionUtils.isNotEmpty(list)) { + total = list.size(); + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setPersonCount(map.get(item.getId())); + } + item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); + }); + + //排序 + list = list.stream().sorted(Comparator.comparing(BuildingListResultDTO::getDifferPersonCount).reversed()).collect(Collectors.toList()); + //分页 + list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList()); + } } + return new PageData<>(list, total); } @@ -182,7 +273,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { @Override public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) { BuildingCountResultDTO result = icNeighborHoodDao.getBuildingCount(formDTO); - //TODO 获取录入人口数 + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.THREE_STR); + countFormDTO.setOrgId(formDTO.getBuildingId()); + countFormDTO.setType(NumConstant.ZERO_STR); + Map map = getMapResult(countFormDTO); + if (map.containsKey(formDTO.getBuildingId())) { + result.setPersonCount(map.get(formDTO.getBuildingId())); + } return result; } @@ -200,7 +299,19 @@ public class HouseInformationServiceImpl implements HouseInformationService { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); List list = icNeighborHoodDao.getUnitList(formDTO); PageInfo pageInfo = new PageInfo<>(list); - //TODO 获取录入人口数 + if (CollectionUtils.isNotEmpty(list)) { + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.THREE_STR); + countFormDTO.setOrgId(formDTO.getBuildingId()); + countFormDTO.setType(NumConstant.ONE_STR); + Map map = getMapResult(countFormDTO); + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setPersonCount(map.get(item.getId())); + } + }); + } return new PageData<>(list, pageInfo.getTotal()); } @@ -216,7 +327,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { @Override public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) { UnitCountResultDTO result = icNeighborHoodDao.getUnitCount(formDTO); - //TODO 获取录入人口数 + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.FOUR_STR); + countFormDTO.setOrgId(formDTO.getUnitId()); + countFormDTO.setType(NumConstant.ZERO_STR); + Map map = getMapResult(countFormDTO); + if (map.containsKey(formDTO.getUnitId())) { + result.setPersonCount(map.get(formDTO.getUnitId())); + } return result; } @@ -231,15 +350,54 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getHouseList(HouseInformationFormDTO formDTO) { - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); - List list = icNeighborHoodDao.getHouseList(formDTO); - PageInfo pageInfo = new PageInfo<>(list); - //TODO 获取录入人口数 - if (CollectionUtils.isNotEmpty(list)) { - list.forEach(item -> { - item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); - }); + List list = null; + long total = 0; + //获取录入人口数 + IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); + countFormDTO.setOrgType(NumConstant.FOUR_STR); + countFormDTO.setOrgId(formDTO.getUnitId()); + countFormDTO.setType(NumConstant.ONE_STR); + Map map = getMapResult(countFormDTO); + + if (!NumConstant.TWO_STR.equals(formDTO.getSort())) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + list = icNeighborHoodDao.getHouseList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + total = pageInfo.getTotal(); + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); + item.setPersonCount(map.get(item.getId())); + } + }); + } + } else { + list = icNeighborHoodDao.getHouseList(formDTO); + if (CollectionUtils.isNotEmpty(list)) { + total = list.size(); + list.forEach(item -> { + if (map.containsKey(item.getId())) { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); + item.setPersonCount(map.get(item.getId())); + } + }); + //排序 + list = list.stream().sorted(Comparator.comparing(HomeListResultDTO::getPersonCount).reversed()).collect(Collectors.toList()); + //分页 + list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList()); + } } - return new PageData<>(list, pageInfo.getTotal()); + + return new PageData<>(list, total); + } + + private Map getMapResult(IcUserCountFormDTO countFormDTO) { + Result> result = userOpenFeignClient.getIcUserCount(countFormDTO); + if (!result.success()) { + log.warn("查询录入人数失败"); + return Collections.emptyMap(); + } + return result.getData(); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 2ac839f1ce..fefb061e7d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -381,7 +381,9 @@ SUM(IFNULL( houseRealCount, 0 )) AS houseRealCount, SUM(IFNULL( personRealCount, 0 )) AS personRealCount, SUM(IFNULL( buildingCount, 0 )) AS buildingCount, - SUM(IFNULL( houseCount, 0 )) AS houseCount + SUM(IFNULL( houseCount, 0 )) AS houseCount, + SUM(IFNULL( buildingRealCount, 0 )) - SUM(IFNULL( buildingCount, 0 )) AS differBuildingCount, + SUM(IFNULL( houseRealCount, 0 )) - SUM(IFNULL( houseCount, 0 )) AS differHouseCount FROM customer_grid grid LEFT JOIN ( @@ -472,7 +474,9 @@ SUM( IFNULL( b.TOTAL_HOUSE_NUM, 0 ) ) AS houseRealCount, SUM( IFNULL( b.REAL_PERSON, 0 ) ) AS personRealCount, COUNT( DISTINCT b.ID ) AS buildingCount, - IFNULL(c.houseCount, 0) AS houseCount + IFNULL(c.houseCount, 0) AS houseCount, + IFNULL( a.REAL_BUILDING, 0 ) - COUNT( DISTINCT b.ID ) AS differBuildingCount, + SUM( IFNULL( b.TOTAL_HOUSE_NUM, 0 ) ) - IFNULL(c.houseCount, 0) AS differHouseCount FROM ic_neighbor_hood a LEFT JOIN ic_building b ON a.ID = b.NEIGHBOR_HOOD_ID diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserCountFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserCountFormDTO.java new file mode 100644 index 0000000000..675109ce0c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserCountFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/29 17:27 + */ +@Data +public class IcUserCountFormDTO implements Serializable { + private static final long serialVersionUID = 1303693003176367290L; + private String orgId; + /** + * 0 组织,1 网格,2 小区,3 楼栋,4 单元,5 房屋 + */ + private String orgType; + /** + * 0 本级,1 下级 + */ + private String type; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserCountResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserCountResultDTO.java new file mode 100644 index 0000000000..a1e6e6a482 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserCountResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/29 17:50 + */ +@Data +public class IcUserCountResultDTO implements Serializable { + private static final long serialVersionUID = 2875016989035736971L; + private String id; + private Integer count; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 90b0359881..196debd91f 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -816,4 +816,15 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/icresiuser/getUserId/{icUserId}") Result> getUserId(@PathVariable("icUserId") String icUserId); + + /** + * 获取录入居民的数量 + * + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/30 9:35 + */ + @PostMapping("/epmetuser/icresiuser/getIcUserCount") + Result> getIcUserCount(IcUserCountFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 55083de3a2..be1b2903c2 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -611,4 +611,18 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserId", icUserId); } + /** + * 获取录入居民的数量 + * + * @param formDTO + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/30 9:35 + */ + @Override + public Result> getIcUserCount(IcUserCountFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIcUserCount", formDTO); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 8e9e6a41c7..3541d2f4ad 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -1188,4 +1188,17 @@ public class IcResiUserController implements ResultDataResolver { public Result> getUserId(@PathVariable("icUserId") String icUserId) { return new Result>().ok(icResiUserService.getUserId(icUserId)); } + + /** + * 获取录入居民的数量 + * + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/30 9:35 + */ + @PostMapping("getIcUserCount") + public Result> getIcUserCount(IcUserCountFormDTO formDTO) { + return new Result>().ok(icResiUserService.getIcUserCount(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index f145fadd97..712537df0c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -22,10 +22,7 @@ import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcVolunteerPolyDTO; -import com.epmet.dto.form.EpidemicPreventionFormDTO; -import com.epmet.dto.form.MoveOutMemberFormDTO; -import com.epmet.dto.form.RentTenantDataFormDTO; -import com.epmet.dto.form.ResiUserQueryValueDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; import org.apache.ibatis.annotations.MapKey; @@ -370,4 +367,14 @@ public interface IcResiUserDao extends BaseDao { * @return com.epmet.entity.IcResiUserEntity */ IcResiUserEntity selectResiUserEntityByIdCard(@Param("idCard") String idCard,@Param("customerId") String customerId); + + /** + * 获取录入居民的数量 + * + * @Param formDTO + * @Return {@link Map} + * @Author zhaoqifeng + * @Date 2022/6/29 17:37 + */ + List getIcUserCount(IcUserCountFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 1abd65036f..31091ff3a6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -436,4 +436,14 @@ public interface IcResiUserService extends BaseService { * @Date 2022/6/16 15:30 */ List getUserId(String icResiUserId); + + /** + * 获取录入居民的数量 + * + * @Param formDTO + * @Return {@link Map} + * @Author zhaoqifeng + * @Date 2022/6/29 17:32 + */ + Map getIcUserCount(IcUserCountFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 981abb643a..bfbc25808f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -2572,6 +2572,24 @@ public class IcResiUserServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/6/29 17:32 + */ + @Override + public Map getIcUserCount(IcUserCountFormDTO formDTO) { + List list = baseDao.getIcUserCount(formDTO); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyMap(); + } + return list.stream().collect(Collectors.toMap(IcUserCountResultDTO::getId, IcUserCountResultDTO::getCount, (key1 , key2)-> key2))); + } + /** * 根据身份证获取居民角色(目前只有是否是志愿者) * diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 57f23f9898..6fb49d35c0 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -1133,4 +1133,68 @@ AND customer_id = #{customerId} AND DEL_FLAG = '0' + From f686c75a760e42afe00024ad101e2f76a65f8c27 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Jun 2022 10:49:53 +0800 Subject: [PATCH 016/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index bfbc25808f..0fb0d6d0ae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -2587,7 +2587,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl key2))); + return list.stream().collect(Collectors.toMap(IcUserCountResultDTO::getId, IcUserCountResultDTO::getCount, (key1 , key2)-> key2)); } /** From af198d329a4216f6bffa3faf9050e62371377571 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Jun 2022 13:59:07 +0800 Subject: [PATCH 017/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/GridStatisticsResultDTO.java | 12 ++++++------ .../dto/result/NeighborHoodCountResultDTO.java | 12 ++++++------ .../dto/result/NeighborHoodListResultDTO.java | 18 +++++++++--------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java index ea5ff3634f..d855740dca 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java @@ -17,10 +17,10 @@ public class GridStatisticsResultDTO implements Serializable { private static final long serialVersionUID = -2022337690871957027L; private String gridId; private String gridName; - private Integer buildingCount; - private Integer houseCount; - private Integer personCount; - private Integer buildingRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer buildingCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer buildingRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java index 610b7d871f..6795bbb9f3 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java @@ -16,10 +16,10 @@ public class NeighborHoodCountResultDTO implements Serializable { private static final long serialVersionUID = 4148009467129407023L; private String neighborHoodId; private String neighborHoodName; - private Integer buildingCount; - private Integer houseCount; - private Integer personCount; - private Integer buildingRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer buildingCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer buildingRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java index ad256b2f9f..e947b2e385 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java @@ -16,13 +16,13 @@ public class NeighborHoodListResultDTO implements Serializable { private static final long serialVersionUID = -5333918463141094854L; private String id; private String name; - private Integer buildingCount; - private Integer houseCount; - private Integer personCount; - private Integer differBuildingCount; - private Integer differHouseCount; - private Integer differPersonCount; - private Integer buildingRealCount; - private Integer houseRealCount; - private Integer personRealCount; + private Integer buildingCount = 0; + private Integer houseCount = 0; + private Integer personCount = 0; + private Integer differBuildingCount = 0; + private Integer differHouseCount = 0; + private Integer differPersonCount = 0; + private Integer buildingRealCount = 0; + private Integer houseRealCount = 0; + private Integer personRealCount = 0; } From 1a51a609015b103d8929b3580ed299f63e8efa87 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Jun 2022 14:24:07 +0800 Subject: [PATCH 018/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcNeighborHoodDao.xml | 3 ++- .../main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 2 +- .../main/java/com/epmet/controller/IcResiUserController.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index fefb061e7d..33600cf2e6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -435,7 +435,7 @@ ( SELECT a.GRID_ID, - a.GRID_NAME, + d.GRID_NAME, IFNULL( a.REAL_BUILDING, 0 ) AS buildingRealCount, SUM( IFNULL( b.TOTAL_HOUSE_NUM, 0 ) ) AS houseRealCount, SUM( IFNULL( b.REAL_PERSON, 0 ) ) AS personRealCount, @@ -456,6 +456,7 @@ GROUP BY NEIGHBOR_HOOD_ID ) c ON a.ID = c.NEIGHBOR_HOOD_ID + INNER JOIN customer_grid d ON a.GRID_ID = d.ID WHERE a.DEL_FLAG = '0' AND a.GRID_ID = #{gridId} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 196debd91f..e270ca5178 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -826,5 +826,5 @@ public interface EpmetUserOpenFeignClient { * @Date 2022/6/30 9:35 */ @PostMapping("/epmetuser/icresiuser/getIcUserCount") - Result> getIcUserCount(IcUserCountFormDTO formDTO); + Result> getIcUserCount(@RequestBody IcUserCountFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 3541d2f4ad..4fe8b5b0ae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -1198,7 +1198,7 @@ public class IcResiUserController implements ResultDataResolver { * @Date 2022/6/30 9:35 */ @PostMapping("getIcUserCount") - public Result> getIcUserCount(IcUserCountFormDTO formDTO) { + public Result> getIcUserCount(@RequestBody IcUserCountFormDTO formDTO) { return new Result>().ok(icResiUserService.getIcUserCount(formDTO)); } } From ccef2a36489a3fa56a07096006723fd5d88f6852 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Jun 2022 14:42:03 +0800 Subject: [PATCH 019/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiUserDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6fb49d35c0..98c379394d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -1136,7 +1136,7 @@ + + From c1f59dba16a9988d7050acdf3a0f1cf640e73089 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Jun 2022 15:09:29 +0800 Subject: [PATCH 021/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/HouseInformationServiceImpl.java | 2 ++ .../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 1 + 2 files changed, 3 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java index ddd609fd47..9738c9759d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -13,6 +13,7 @@ import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.form.IcUserCountFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.enums.BuildingTypeEnums; import com.epmet.enums.HouseRentFlagEnums; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HouseInformationService; @@ -282,6 +283,7 @@ public class HouseInformationServiceImpl implements HouseInformationService { if (map.containsKey(formDTO.getBuildingId())) { result.setPersonCount(map.get(formDTO.getBuildingId())); } + result.setBuildingType(BuildingTypeEnums.getTypeValue(result.getBuildingType())); return result; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 0fb0d6d0ae..4fb6693333 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -2584,6 +2584,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getIcUserCount(IcUserCountFormDTO formDTO) { List list = baseDao.getIcUserCount(formDTO); + list = list.stream().filter(item -> null != item.getId()).collect(Collectors.toList()); if (CollectionUtils.isEmpty(list)) { return Collections.emptyMap(); } From 1337edbf88fdcca1a46b5cad99416a42c5dd1c12 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 30 Jun 2022 15:17:29 +0800 Subject: [PATCH 022/122] =?UTF-8?q?=E8=A1=A8=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/ArticleContentDTO.java | 2 +- .../src/main/java/com/epmet/dto/ArticleDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/ArticleContentEntity.java | 2 +- .../src/main/java/com/epmet/entity/ArticleEntity.java | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java index a8269648f3..a71e8179fb 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java @@ -55,7 +55,7 @@ public class ArticleContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text;文件:file + * 内容类型 图片:img;文字:text;文件:file 富文本:rich_text */ private String contentType; diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java index 4c72866e27..09660e6c8c 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java @@ -124,6 +124,11 @@ public class ArticleDTO implements Serializable { */ private String departmentId; + /** + * 1:富文本;0:不是 + */ + private String richTextFlag; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java index 29661c7350..f5d571ec75 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java @@ -51,7 +51,7 @@ public class ArticleContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text;文件:file + * 内容类型 图片:img;文字:text;文件:file 富文本:rich_text */ private String contentType; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java index 13dc5bd83e..87a4c76078 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java @@ -131,5 +131,9 @@ public class ArticleEntity extends BaseEpmetEntity { * 部门ID 数据权限使用 */ private String departmentId; + /** + * 1:富文本;0:不是 + */ + private String richTextFlag; } From 228bb2dfb3217b7c3ef1e70f9e0f52cfb5bcbf49 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 30 Jun 2022 15:25:45 +0800 Subject: [PATCH 023/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E8=8E=B7=E5=8F=96=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E6=B7=BB=E5=8A=A0=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=EF=BC=8C=E5=8A=A0=E9=95=BF=E8=A1=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcOrganizationCodeInfoServiceImpl.java | 12 ++++++++++-- .../db/migration/V0.0.33__alter_ic_building.sql | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.33__alter_ic_building.sql diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index 80fce6a6a6..992cf837c4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -121,7 +121,15 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl Date: Thu, 30 Jun 2022 16:04:35 +0800 Subject: [PATCH 024/122] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ArticleListFormDTO.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java new file mode 100644 index 0000000000..76b3fd3ae1 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java @@ -0,0 +1,60 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/7/15 4:34 下午 + * @DESC + */ +@Data +public class ArticleListFormDTO implements Serializable { + private static final long serialVersionUID = 6397877545890473794L; + + /** + * 文章标题 + */ + private String title; + /** + * 标签Id集合 + */ + private List tagIds; + /** + * 上下线状态,上线:published,下线:offline + */ + private String statusFlag; + /** + * 发布范围类型,组织:agency,网格:grid + */ + private String publishRangeType; + /** + * 发布范围Id==网格Id + */ + private String publishRangeId; + /** + * 开始日期 yyyy-MM-dd HH:mm:ss + */ + private String startDate; + /** + * 结束日期 yyyy-MM-dd HH:mm:ss + */ + private String endDate; + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; + + private Boolean isPage = true; + private String articleId; + private String customerId; + private String agencyId; + private String staffId; + +} From 607958e1cc2770c14f0e4aaa3ac95c779a6d719a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Jun 2022 16:40:55 +0800 Subject: [PATCH 025/122] =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/ActContentDTO.java | 2 +- .../main/java/com/epmet/dto/ActInfoDTO.java | 5 ++ .../com/epmet/dto/LatestActContentDTO.java | 2 +- .../java/com/epmet/dto/LatestActInfoDTO.java | 5 ++ .../epmet/dto/form/work/ActPageFormDTO.java | 36 ++++++++ .../dto/form/work/PublishActInfoFormDTO.java | 5 ++ .../epmet/dto/form/work/RePublishFormDTO.java | 5 ++ .../epmet/dto/result/work/ActPageResDTO.java | 88 +++++++++++++++++++ .../epmet/controller/WorkActController.java | 30 ++++++- .../main/java/com/epmet/dao/ActInfoDao.java | 8 ++ .../com/epmet/entity/ActContentEntity.java | 2 +- .../java/com/epmet/entity/ActInfoEntity.java | 5 ++ .../epmet/entity/LatestActContentEntity.java | 2 +- .../com/epmet/entity/LatestActInfoEntity.java | 6 ++ .../com/epmet/service/WorkActService.java | 8 ++ .../service/impl/WorkActServiceImpl.java | 68 ++++++++++++++ .../db/migration/V0.0.22__act_addcol.sql | 6 ++ .../src/main/resources/mapper/ActInfoDao.xml | 50 +++++++++++ 18 files changed, 326 insertions(+), 7 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java index 34b2b31423..797bade6a4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java @@ -50,7 +50,7 @@ public class ActContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java index 10180e0222..3a46608052 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java @@ -238,6 +238,11 @@ public class ActInfoDTO implements Serializable { */ private Boolean summaryFlag; + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + /** * 乐观锁 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java index ef9a3e16e8..59b7ca29c3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java @@ -50,7 +50,7 @@ public class LatestActContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java index d4cc64d386..d72ef3b66e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java @@ -179,6 +179,11 @@ public class LatestActInfoDTO implements Serializable { */ private Boolean auditSwitch; + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + /** * 活动类型爱心活动heart 联建活动party */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java new file mode 100644 index 0000000000..1c8b9f501c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.form.work; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * 爱心互助列表入参DTO + */ +@Data +public class ActPageFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 6473824879249274683L; + /** + * 活动标题 + */ + private String title; + /** + * 活动预计开始时间 + */ + private String actStartTime; + /** + * 活动预计结束时间 + */ + private String actEndTime; + /** + * 状态: 已发布/报名中:published; 已取消:canceled; 已结束:finished) + */ + private String status; + + /** + * tokenDto获取 + */ + private String customerId; + private String userId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java index 57e0358505..b63079f849 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java @@ -212,4 +212,9 @@ public class PublishActInfoFormDTO implements Serializable { private String serviceMatter; @NotEmpty(message = "服务事项不能为空", groups = {AddPartyActivityGroup.class}) private List serviceMatterList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java index 7dfc46329f..13e67231f1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java @@ -221,4 +221,9 @@ public class RePublishFormDTO implements Serializable { private String serviceMatter; @NotEmpty(message = "服务事项不能为空", groups = {PublishActInfoFormDTO.AddPartyActivityGroup.class}) private List serviceMatterList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java new file mode 100644 index 0000000000..0f388d686e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java @@ -0,0 +1,88 @@ +package com.epmet.dto.result.work; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description + * @Author yzm + * @Date 2022/6/30 14:15 + */ +@Data +public class ActPageResDTO implements Serializable { + private static final long serialVersionUID = 5330377961022020364L; + /** + *活动id + */ + private String actId; + + /** + *活动标题 + */ + private String title; + + /** + * 活动地点 + */ + private String actAddress; + + /** + * 活动预计开始时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actStartTime; + + /** + * 活动预计结束时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actEndTime; + /** + * 报名截止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date signUpEndTime; + + /** + * 报名开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date signUpStartTime; + + /** + * 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough + */ + private String status=""; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + + /** + * true,我发布的,false,其他人发布的 + */ + private Boolean isMyPublish; + + /** + * true:固定名额 false: 不限制名额 + */ + @JsonIgnore + private Boolean actQuotaCategory; + /** + * 活动名额人数 + */ + @JsonIgnore + private Integer actQuota; + + /** + * 已报名人数 + */ + @JsonIgnore + private Integer signedUp; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 1383924f57..985e549bba 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -1,6 +1,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -73,7 +75,12 @@ public class WorkActController { } @PostMapping("publishV2") - public Result publishActV2(@RequestBody PublishActInfoFormDTO formDTO) { + public Result publishActV2(@LoginUser TokenDto tokenDto ,@RequestBody PublishActInfoFormDTO formDTO) { + if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) { + formDTO.setRichTextFlag(true); + } else { + formDTO.setRichTextFlag(false); + } if (ActConstant.HEART.equals(formDTO.getActType())) { ValidatorUtils.validateEntity(formDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class); } else { @@ -276,7 +283,12 @@ public class WorkActController { } @PostMapping("republishV2") - public Result rePublishV2(@RequestBody RePublishFormDTO rePublishFormDTO) { + public Result rePublishV2(@LoginUser TokenDto tokenDto,@RequestBody RePublishFormDTO rePublishFormDTO) { + if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) { + rePublishFormDTO.setRichTextFlag(true); + } else { + rePublishFormDTO.setRichTextFlag(false); + } if (ActConstant.HEART.equals(rePublishFormDTO.getActType())) { ValidatorUtils.validateEntity(rePublishFormDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class); } else { @@ -291,5 +303,17 @@ public class WorkActController { return new Result().ok(workActService.rePublishV2(rePublishFormDTO)); } - + /** + * 数字社区-爱心互助活动列表:查询当前客户下的所有活动,限制活动类型是爱心活动 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("pagelist") + public Result> pageList(@LoginUser TokenDto tokenDto, @RequestBody ActPageFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + PageData page = workActService.pageList(formDTO); + return new Result>().ok(page); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java index 2a1522348e..36e02859a8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java @@ -24,6 +24,7 @@ import com.epmet.dto.form.resi.ResiActDetailFormDTO; import com.epmet.dto.form.resi.ResiLatestActFormDTO; import com.epmet.dto.form.resi.ResiMyActFormDTO; import com.epmet.dto.form.work.ActListCommonFormDTO; +import com.epmet.dto.form.work.ActPageFormDTO; import com.epmet.dto.result.resi.*; import com.epmet.dto.result.work.*; import com.epmet.entity.ActInfoEntity; @@ -319,4 +320,11 @@ public interface ActInfoDao extends BaseDao { * @return java.util.List */ List selectPublishedAct(@Param("staffId") String staffId); + + /** + * 数字社区-爱心互助活动列表:查询当前客户下的所有活动,限制活动类型是爱心活动 + * @param formDTO + * @return + */ + List pageList(ActPageFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActContentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActContentEntity.java index 0fea888353..36258239ad 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActContentEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActContentEntity.java @@ -48,7 +48,7 @@ public class ActContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java index 191e639b24..ac8ceea745 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java @@ -216,6 +216,11 @@ public class ActInfoEntity extends BaseEpmetEntity { */ private Boolean summaryFlag; + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + /** * 活动类型爱心活动heart 联建活动party */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActContentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActContentEntity.java index b22c65efed..b05c0cffee 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActContentEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActContentEntity.java @@ -48,7 +48,7 @@ public class LatestActContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java index 03b679c9c4..4636310442 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java @@ -177,6 +177,12 @@ public class LatestActInfoEntity extends BaseEpmetEntity { * 审核开关:1报名人员需要人工审核0不需要 */ private Boolean auditSwitch; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + /** * 数据库新增ACT_INFO_ID字段,act_info.id */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java index d470f3571f..244303c84c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java @@ -1,5 +1,6 @@ package com.epmet.service; +import com.epmet.commons.tools.page.PageData; import com.epmet.dto.form.work.*; import com.epmet.dto.result.work.*; @@ -148,4 +149,11 @@ public interface WorkActService { PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO); PublishActResultDTO rePublishV2(RePublishFormDTO rePublishFormDTO); void testGrantPoint(TestGrantFormDTO formDTO); + + /** + * 数字社区-爱心互助活动列表:查询当前客户下的所有活动,限制活动类型是爱心活动 + * @param formDTO + * @return + */ + PageData pageList(ActPageFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 7c4f924e20..8f1ec3e74e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; @@ -35,6 +36,9 @@ import com.epmet.entity.*; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -1621,4 +1625,68 @@ public class WorkActServiceImpl implements WorkActService { }); return content.get(); } + + /** + * @param formDTO + * @return 数字社区-爱心互助活动列表:查询当前客户下的所有活动,限制活动类型是爱心活动 + */ + @Override + public PageData pageList(ActPageFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); + List list = actInfoDao.pageList(formDTO); + if (CollectionUtils.isNotEmpty(list)) { + Date nowDate = new Date(); + for (ActPageResDTO actPageResDTO : list) { + // 进行中的重新设置状态 + if (ActConstant.ACT_STATUS_PUBLISHED.equals(actPageResDTO.getStatus())) { + // 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough + if (!NumConstant.ONE_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getSignUpEndTime()))) { + logger.info(String.format("当前时间%s报名截止时间%s处于报名中", + DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN), + DateUtils.format(actPageResDTO.getSignUpEndTime(), DateUtils.DATE_TIME_PATTERN))); + // 截止报名时间之前(包含报名时间截止时间点) + if (!actPageResDTO.getActQuotaCategory()) { + // 如果是不限制名额,则显示报名中 + actPageResDTO.setStatus("signing_up"); + logger.info("活动不限制名额,界面显示 报名中"); + continue; + } else { + // 固定名额,且已报名人数<活动需要人数显示报名中 + if (actPageResDTO.getActQuota() > actPageResDTO.getSignedUp()) { + logger.info("活动限制名额,未报满,界面显示报名中"); + actPageResDTO.setStatus("signing_up"); + continue; + } else if (actPageResDTO.getActQuota().equals(actPageResDTO.getSignedUp())) { + actPageResDTO.setStatus("enough"); + logger.info("活动限制名额,且已报满,界面显示已报满"); + continue; + } + } + } else if (NumConstant.ONE_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getSignUpEndTime())) + && NumConstant.ONE_NEG_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getActStartTime()))) { + logger.info(String.format("当前时间%s报名截止时间%s活动预计开始时间%s界面显示截止报名", + DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN), + DateUtils.format(actPageResDTO.getSignUpEndTime(), DateUtils.DATE_TIME_PATTERN), + DateUtils.format(actPageResDTO.getActStartTime(), DateUtils.DATE_TIME_PATTERN))); + // 活动报名截止-活动预计开始之间显示截止报名 + actPageResDTO.setStatus("end_sign_up"); + continue; + } else if (!NumConstant.ONE_NEG_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getActStartTime()))) { + logger.info(String.format("当前时间%s活动预计开始时间%s界面显示已开始", + DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN), + DateUtils.format(actPageResDTO.getActStartTime(), DateUtils.DATE_TIME_PATTERN))); + // 活动预计开始时间点之后,包含活动预计开始时间点,显示 已开始 + actPageResDTO.setStatus("in_progress"); + continue; + } + } + + } + } + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql new file mode 100644 index 0000000000..91fe197874 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql @@ -0,0 +1,6 @@ +alter table act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; +alter table act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; +alter table act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER SUMMARY_FLAG; +alter table latest_act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER AUDIT_SWITCH; +alter table latest_act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; +alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 6aa5b1b477..4aca026874 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -798,4 +798,54 @@ AND ACT_STATUS = 'published' AND CREATED_BY = #{staffId} + + + From 29ba18680a81a11ef645467607b5bc142eaa064a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 30 Jun 2022 16:49:12 +0800 Subject: [PATCH 026/122] =?UTF-8?q?=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/PublishedListResultDTO.java | 35 +++++++++++++++- .../epmet/controller/ArticleController.java | 12 ++++++ .../com/epmet/service/ArticleService.java | 2 + .../service/impl/ArticleServiceImpl.java | 40 +++++++++++++++++++ .../src/main/resources/mapper/ArticleDao.xml | 15 ++++++- 5 files changed, 101 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java index 5ab17bbd61..94b190c799 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; +import java.util.LinkedList; import java.util.List; /** @@ -25,10 +26,26 @@ public class PublishedListResultDTO implements Serializable { * 文章标题 */ private String title; + /** + * 是否置顶 1是;0否; + */ + private String isTop; + /** + * 是否置顶 1是;0否; + */ + private String isTopName; + /** + * 发布单位ID + */ + private String publisherId; /** * 发布单位 */ private String publisherName; + /** + * 发布单位类型 机关:agency;部门:department;网格:grid + */ + private String publisherType; /** * 发布时间 */ @@ -39,9 +56,13 @@ public class PublishedListResultDTO implements Serializable { @JsonIgnore private String tags; /** - * 文章标签列表 + * 文章标签名列表 */ private List tagNameList; + /** + * 文章标签Id列表 + */ + private List tagIdList; /** * 概要内容 */ @@ -66,4 +87,16 @@ public class PublishedListResultDTO implements Serializable { * 文章创建人 */ private String createdBy; + /** + * 封面图片url + */ + private String imgUrl; + /** + * 发布范围网格Id集合 + */ + private List gridIdList; + /** + * 文章内容 + */ + private LinkedList contentList; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 860b9cca2c..0ae720155c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -419,4 +419,16 @@ public class ArticleController { return new Result>().ok(articleService.articleListV2(formDTO)); } + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 数字平台-党建声音-文章详情 + **/ + @PostMapping("detailV2") + public Result detailV2(@LoginUser TokenDto tokenDTO, @RequestBody ArticleListFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); + return new Result().ok(articleService.detailV2(formDTO)); + } + } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index 31f292136d..c54d0fe6e5 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -245,4 +245,6 @@ public interface ArticleService extends BaseService { List getArticleListByTag(String tagId, Integer pageNo, Integer pageSize); PageData articleListV2(ArticleListFormDTO formDTO); + + PublishedListResultDTO detailV2(ArticleListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index e9b7c2b4c1..047d9584c4 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -18,6 +18,7 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; @@ -1477,4 +1478,43 @@ public class ArticleServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + + @Override + public PublishedListResultDTO detailV2(ArticleListFormDTO formDTO) { + PublishedListResultDTO resultDTO = new PublishedListResultDTO(); + //1.查询文章主表信息 + List list = baseDao.selectAllArticle(formDTO); + + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(NumConstant.ZERO); + //查询文章涉及的发布范围网络Id列表 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(ArticlePublishRangeEntity::getArticleId, formDTO.getArticleId()); + tWrapper.eq(ArticlePublishRangeEntity::getDelFlag, NumConstant.ZERO_STR); + //【文章下线的查所有发布范围,文章没下线的只查还没下线的发布范围】 + if("offline".equals(resultDTO.getStatusFlag())){ + tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "offline"); + }else { + tWrapper.eq(ArticlePublishRangeEntity::getPublishStatus, "published"); + } + List entityList = articlePublishRangeDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + List contentList = entityList.stream().map(ArticlePublishRangeEntity::getGridId).collect(Collectors.toList()); + resultDTO.setGridIdList(contentList); + } + + //查询文章内容 + LambdaQueryWrapper tWrapper1 = new LambdaQueryWrapper<>(); + tWrapper1.eq(ArticleContentEntity::getArticleId, formDTO.getArticleId()); + tWrapper1.eq(ArticleContentEntity::getDelFlag, NumConstant.ZERO_STR); + tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum); + List contentEntityList = articleContentDao.selectList(tWrapper1); + if (!CollectionUtils.isEmpty(entityList)) { + LinkedList contentList = (LinkedList)contentEntityList.stream().map(ArticleContentEntity::getContent).collect(Collectors.toList()); + resultDTO.setContentList(contentList); + } + } + + return resultDTO; + } } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 3a95b47397..e9cfdce2b8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -431,17 +431,28 @@ a.id AS "articleId", a.title AS "title", IFNULL(a.preview_content, "") AS "previewContent", + a.publisher_id AS "publisherId", a.publisher_name AS "publisherName", + a.publisher_type AS "publisherType", a.publish_date AS "publishDate", IFNULL(a.tags, "") AS "tags", a.status_flag AS "statusFlag", a.rich_text_flag AS "richTextFlag", - a.created_by AS "createdBy" + a.created_by AS "createdBy", + a.is_top AS "isTop", + IF (a.is_top = '0', '否', '是') "isTopName", + ac.img_url AS "imgUrl" FROM article a + LEFT JOIN article_cover ac ON a.id = ac.article_id AND ac.del_flag = '0' WHERE a.del_flag = '0' - AND a.customer_id = #{customerId} + + AND id = #{articleId} + + + AND a.customer_id = #{customerId} + AND a.org_id_path like concat('%',#{agencyId},'%') From 2c02614be1836287944a10cd550f7e10a70b9360 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 30 Jun 2022 17:06:12 +0800 Subject: [PATCH 027/122] =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/DraftListFormDTO.java | 23 +++- .../dto/result/DraftPcListResultDTO.java | 101 ++++++++++++++++++ .../com/epmet/controller/DraftController.java | 34 +++++- .../java/com/epmet/service/DraftService.java | 5 + .../epmet/service/impl/DraftServiceImpl.java | 10 ++ .../src/main/resources/mapper/ArticleDao.xml | 1 + 6 files changed, 168 insertions(+), 6 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java index 02dd80d4df..95167469f2 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java @@ -12,12 +12,31 @@ import java.io.Serializable; @Data public class DraftListFormDTO implements Serializable { private static final long serialVersionUID = 7957826609741967502L; + + /** + * 文章标题 + */ + private String title; + /** + * 开始日期 yyyy-MM-dd HH:mm:ss + */ + private String startDate; + /** + * 结束日期 yyyy-MM-dd HH:mm:ss + */ + private String endDate; /** * 页码 */ - private Integer pageNo; + private Integer pageNo = 1; /** * 每页显示数量 */ - private Integer pageSize; + private Integer pageSize = 20; + + private Boolean isPage = true; + private String draftId; + private String customerId; + private String agencyId; + private String staffId; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java new file mode 100644 index 0000000000..196e629fed --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -0,0 +1,101 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +/** + * @author sun + */ +@NoArgsConstructor +@Data +public class DraftPcListResultDTO implements Serializable { + + private static final long serialVersionUID = -8525181219822398750L; + /** + * 文章草稿ID + */ + private String draftId; + /** + * 文章标题 + */ + private String title; + /** + * 是否置顶 1是;0否; + */ + private String isTop; + /** + * 是否置顶 1是;0否; + */ + private String isTopName; + /** + * 发布单位ID + */ + private String publisherId; + /** + * 发布单位 + */ + private String publisherName; + /** + * 发布单位类型 机关:agency;部门:department;网格:grid + */ + private String publisherType; + /** + * 发布时间 + */ + private String publishDate; + /** + * 文章标签串 + */ + @JsonIgnore + private String tags; + /** + * 文章标签名列表 + */ + private List tagNameList; + /** + * 文章标签Id列表 + */ + private List tagIdList; + /** + * 概要内容 + */ + private String previewContent; + /** + * 上下线状态,上线:published,下线:offline + */ + private String statusFlag; + /** + * 是不是我发布 + */ + private Boolean isMePublished; + /** + * 发布范围 + */ + private String publishRangeDesc; + /** + * 1:是否富文本类型【】富文本;0:不是】 + */ + private String richTextFlag; + /** + * 文章创建人 + */ + private String createdBy; + /** + * 封面图片url + */ + private String imgUrl; + /** + * 发布范围网格Id集合 + */ + private List gridIdList; + /** + * 文章内容 + */ + private LinkedList contentList; + +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java index b7ffc4a382..b0cd066b27 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java @@ -20,15 +20,15 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.enums.RequirePermissionEnum; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.DeleteDraftFormDTO; -import com.epmet.dto.form.DraftDetailFormDTO; -import com.epmet.dto.form.DraftListFormDTO; -import com.epmet.dto.form.GovArticleDetailFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.DraftDetailResultDTO; import com.epmet.dto.result.DraftListResultDTO; +import com.epmet.dto.result.DraftPcListResultDTO; +import com.epmet.dto.result.PublishedListResultDTO; import com.epmet.service.DraftService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -86,4 +86,30 @@ public class DraftController { DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO); return new Result().ok(draftDetailResultDTO); } + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 数字平台-党建声音-草稿列表 + **/ + @PostMapping("draftListV2") + public Result> draftListV2(@LoginUser TokenDto tokenDTO, @RequestBody DraftListFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); + formDTO.setStaffId(tokenDTO.getUserId()); + return new Result>().ok(draftService.draftListV2(formDTO)); + } + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 数字平台-党建声音-草稿详情 + **/ + @PostMapping("detailV2") + public Result detailV2(@LoginUser TokenDto tokenDTO, @RequestBody DraftListFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); + return new Result().ok(draftService.detailV2(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/DraftService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/DraftService.java index a11c1361a3..f34898f749 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/DraftService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/DraftService.java @@ -27,6 +27,7 @@ import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.DraftAttrResultDTO; import com.epmet.dto.result.DraftContentResultDTO; import com.epmet.dto.result.DraftDetailResultDTO; +import com.epmet.dto.result.DraftPcListResultDTO; import com.epmet.entity.DraftEntity; import java.util.List; @@ -148,4 +149,8 @@ public interface DraftService extends BaseService { * @date 2020-06-03 */ DraftDetailResultDTO queryDraftDetail(DraftDetailFormDTO formDTO); + + PageData draftListV2(DraftListFormDTO formDTO); + + DraftPcListResultDTO detailV2(DraftListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index c2f755e901..53ab778879 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -201,4 +201,14 @@ public class DraftServiceImpl extends BaseServiceImpl imp return draftDetailResultDTO; } + @Override + public PageData draftListV2(DraftListFormDTO formDTO) { + return null; + } + + @Override + public DraftPcListResultDTO detailV2(DraftListFormDTO formDTO) { + return null; + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index e9cfdce2b8..922c54c044 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -431,6 +431,7 @@ a.id AS "articleId", a.title AS "title", IFNULL(a.preview_content, "") AS "previewContent", + a.publish_range_desc AS "publishRangeDesc", a.publisher_id AS "publisherId", a.publisher_name AS "publisherName", a.publisher_type AS "publisherType", From b22c87134d274ab8e083136db1e1a5362714a725 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Jun 2022 17:07:16 +0800 Subject: [PATCH 028/122] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=E6=9A=82=E5=AD=98=E4=B8=80=E6=B3=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddOrSaveDraftFormDTO.java | 72 +++++++++ .../com/epmet/constant/ArticleConstant.java | 10 ++ .../epmet/controller/ArticleController.java | 14 ++ .../com/epmet/service/ArticleService.java | 8 + .../service/impl/ArticleServiceImpl.java | 146 +++++++++++++++--- 5 files changed, 232 insertions(+), 18 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java new file mode 100644 index 0000000000..702a9dd677 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/6/30 13:41 + * @DESC + */ +@Data +public class AddOrSaveDraftFormDTO implements Serializable { + + public interface AddOrSaveDraftForm{} + + /** + * 类型 发布文章:article;存草稿:draft + */ + @NotBlank(message = "类型不能为空",groups = AddOrSaveDraftForm.class) + private String type; + + @NotBlank(message = "标题不能为空",groups = AddOrSaveDraftForm.class) + @Length(max = 50, message = "标题最长为50个字") + private String title; + + /** + * 发布范围IDs + */ + private List gridIdList; + + /** + * 发布范围Names + */ + private List publishRangeDesc; + + /** + * 文章标签 + */ + private List tagNameList; + + @NotBlank(message = "发布单位不能为空",groups = AddOrSaveDraftForm.class) + private String publisher; + + @NotBlank(message = "发布单位名称不能为空",groups = AddOrSaveDraftForm.class) + private String publisherName; + /** + * 发布单位类型 机关:agency;部门:department;网格:grid + */ + @NotBlank(message = "发布单位类型不能为空",groups = AddOrSaveDraftForm.class) + private String publisherType; + + @NotNull(message = "发布时间不能为空",groups = AddOrSaveDraftForm.class) + private Date publishDate; + + @NotBlank(message = "文章内容不能为空",groups = AddOrSaveDraftForm.class) + private String content; + + /** + * 是否置顶 1是;0否; + */ + private Integer isTop; + + private String userId; + + private String customerId; +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java index 65a7f54855..29d8bca111 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java @@ -19,6 +19,8 @@ public interface ArticleConstant { * 发布状态-已发布 */ String PUBLISHED = "published"; + String PUBLISH = "publish"; + String PUBLISH_CONTENT = "发布文章"; /** * 发布状态-已下线 */ @@ -66,4 +68,12 @@ public interface ArticleConstant { * 发布方式 api审核后自动发布 */ String PUBLISH_WAY_AUTO_AUDIT = "autoAudit"; + + /** + * 未审核 + */ + String AUDIT_WAY_NO_AUDIT = "noAudit"; + + String SAVE_TYPE_ARTICLE = "article"; + String SAVE_TYPE_DRAFT = "draft"; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 0ae720155c..6dcd4f2af5 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -431,4 +431,18 @@ public class ArticleController { return new Result().ok(articleService.detailV2(formDTO)); } + /** + * Desc: 发布文章/存草稿 + * @param formDTO + * @author zxc + * @date 2022/6/30 14:03 + */ + @PostMapping("addOrSaveDraft") + public Result addOrSaveDraft(@LoginUser TokenDto tokenDto,@RequestBody AddOrSaveDraftFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddOrSaveDraftFormDTO.AddOrSaveDraftForm.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + articleService.addOrSaveDraft(formDTO); + return new Result(); + } } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index c54d0fe6e5..127e7422ee 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -244,6 +244,14 @@ public interface ArticleService extends BaseService { */ List getArticleListByTag(String tagId, Integer pageNo, Integer pageSize); + /** + * Desc: 发布文章/存草稿 + * @param formDTO + * @author zxc + * @date 2022/6/30 14:03 + */ + void addOrSaveDraft(AddOrSaveDraftFormDTO formDTO); + PageData articleListV2(ArticleListFormDTO formDTO); PublishedListResultDTO detailV2(ArticleListFormDTO formDTO); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 047d9584c4..30bfcaf86b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -30,6 +30,10 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; @@ -126,6 +130,8 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsInfo = formDto.getTagsInfo(); String userId = tokenDto.getUserId(); //根据草稿id查询发布范围id集合 List gridIds = draftPublishRangeDao.selectGridIdByDraftId(draftId); if (gridIds.size() == NumConstant.ZERO) { throw new RenException(TagConstant.SELECT_GRIDIDLIST_FAILURE); } + return updateGridTagV2(formDto,customerId,gridIds,userId); + } + + public List updateGridTagV2(UpdateCustomerTagCacheDTO formDto,String customerId,List gridIds,String userId){ + List tagsInfo = formDto.getTagsInfo(); List gridTags = new ArrayList<>(); List gridTagCache = new ArrayList<>(); gridIds.forEach(gridId -> { @@ -1380,23 +1397,22 @@ public class ArticleServiceImpl extends BaseServiceImpl addArticleTags = new ArrayList<>(); - List tagsInfo = formDto.getTagsInfo(); DraftDTO draft = draftService.get(draftId); String customerId = draft.getCustomerId(); - String userId = tokenDto.getUserId(); String articleId = articleDao.getArticleIdByDraftId(draftId); + addArticleTagsV2(formDto,customerId,articleId); + } + + public void addArticleTagsV2(UpdateCustomerTagCacheDTO formDto,String customerId,String articleId){ + List articleTags = new ArrayList<>(); + List tagsInfo = formDto.getTagsInfo(); tagsInfo.forEach(resultDTO -> { - AddArticleTagsFormDTO addArticleTag = new AddArticleTagsFormDTO(); - addArticleTag.setCreatedBy(userId); - addArticleTag.setUpdatedBy(userId); - addArticleTag.setCustomerId(customerId); - addArticleTag.setArticleId(articleId); - BeanUtils.copyProperties(resultDTO, addArticleTag); - addArticleTag.setCreatedTime(createdTime); - addArticleTags.add(addArticleTag); + ArticleTagsEntity e = ConvertUtils.sourceToTarget(resultDTO, ArticleTagsEntity.class); + e.setCustomerId(customerId); + e.setArticleId(articleId); + articleTags.add(e); }); - articleTagsDao.addArticleTags(addArticleTags); + articleTagsService.insertBatch(articleTags); } /** @@ -1454,6 +1470,100 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); + article.setPublisherId(formDTO.getPublisher()); + article.setPublishRangeDesc(formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); + article.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); + article.setOrgId(staffInfo.getAgencyId()); + article.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); + baseDao.insert(article); + // 2.内容 + ArticleContentEntity articleContent = ConvertUtils.sourceToTarget(article, ArticleContentEntity.class); + articleContent.setCustomerId(customerId); + articleContent.setArticleId(article.getId()); + articleContent.setContent(formDTO.getContent()); + articleContent.setContentType("rich_text"); + articleContent.setAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); + articleContent.setOrderNum(NumConstant.ZERO); + articleContentDao.insert(articleContent); + // 3.操作记录 + ArticleOperateRecordEntity articleOperateRecord = new ArticleOperateRecordEntity(); + articleOperateRecord.setCustomerId(customerId); + articleOperateRecord.setArticleId(article.getId()); + articleOperateRecord.setGridIds(formDTO.getGridIdList().stream().collect(Collectors.joining(":"))); + articleOperateRecord.setOpUser(staffInfo.getAgencyName().concat("-").concat(staffInfo.getRealName())); + articleOperateRecord.setContent(formDTO.getContent()); + articleOperateRecord.setOpType(ArticleConstant.PUBLISH); + articleOperateRecord.setOpTime(new Date()); + articleOperateRecordService.insert(articleOperateRecord); + // 4.发布范围 + List rangeList = new ArrayList<>(); + formDTO.getGridIdList().forEach(g -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(g); + if (null == gridInfo){ + throw new EpmetException("未查询到网格信息:"+g); + } + ArticlePublishRangeEntity articlePublishRange = ConvertUtils.sourceToTarget(gridInfo,ArticlePublishRangeEntity.class); + articlePublishRange.setCustomerId(customerId); + articlePublishRange.setArticleId(article.getId()); + articlePublishRange.setGridId(g); + articlePublishRange.setAgencyGridName(gridInfo.getGridNamePath()); + articlePublishRange.setAgencyId(gridInfo.getPid()); + articlePublishRange.setPublishStatus(ArticleConstant.PUBLISHED); + articlePublishRange.setId(null); + rangeList.add(articlePublishRange); + }); + articlePublishRangeService.insertBatch(rangeList); + // 5.文章标签 + UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = updateCustomerTagV2(formDTO.getUserId(), formDTO.getCustomerId(), article.getTags()); + addArticleTagsV2(updateCustomerTagCacheDTO,customerId,article.getId()); + // 6.更新网格tag + List updateGridTagCacheDTOS = updateGridTagV2(updateCustomerTagCacheDTO, customerId, formDTO.getGridIdList(), formDTO.getUserId()); + // 7.更新redis + try { + this.updateCacheCustomerTag(updateCustomerTagCacheDTO); + this.updateCacheGridTag(updateGridTagCacheDTOS); + } catch (Exception e) { + log.error("scanAllPassPublishArticle update redis exception", e); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + } + }else {// 存草稿 + + } + } + + @Override public PageData articleListV2(ArticleListFormDTO formDTO) { //1.获取工作人员缓存信息 From 74a5bcc08281ac1f838bdf6ffaa444147cf10d34 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Jun 2022 17:08:46 +0800 Subject: [PATCH 029/122] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/work/ActDetailResultDTO.java | 167 ++++++++++++++++++ .../work/ActPreviewContentResultDTO.java | 2 +- .../epmet/controller/WorkActController.java | 11 ++ .../com/epmet/service/WorkActService.java | 8 + .../service/impl/WorkActServiceImpl.java | 23 ++- 5 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java new file mode 100644 index 0000000000..99d00721fd --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java @@ -0,0 +1,167 @@ +package com.epmet.dto.result.work; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/6/30 16:47 + */ +@Data +public class ActDetailResultDTO implements Serializable { + private static final long serialVersionUID = 4235569576711312094L; + + private String actId; + + /** + * 活动标题 + */ + private String title; + + /** + * 封面图 + */ + private String coverPic; + + /** + * 活动地点 + */ + private String actAddress; + + /** + * 活动地点-经度 + */ + private BigDecimal actLongitude; + + /** + * 活动地点-纬度 + */ + private BigDecimal actLatitude; + + /** + * 活动预计开始时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actStartTime; + + /** + * 活动预计结束时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actEndTime; + + /** + * 活动人数 + */ + private Integer actQuota; + + /** + * 活动积分 + */ + private Integer reward; + + /** + * 报名审核:true:只有志愿者才可以参加活动,false: 只要是居民就可以参加活动 + */ + private Boolean volunteerLimit; + + /** + * 报名审核: true: 需人工审核 false: 无需审核 + */ + private Boolean auditSwitch; + + /** + * 报名截止时间:yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date signUpEndTime; + + /** + * 报名条件 + */ + private String requirement; + + /** + * 签到开始时间:yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date signInStartTime; + + /** + * 签到结束时间: yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date signInEndTime; + + /** + * 签到地址 + */ + private String signInAddress; + + /** + * 签到地址-纬度 + */ + private BigDecimal signInLatitude; + + /** + * 签到地址-经度 + */ + private BigDecimal signInLongitude; + + /** + * 签到有效范围(米) + */ + private Integer signInRadius; + + /** + * 主办方id + */ + private String sponsorId; + + /** + * 主办方类型:以网格名义:grid , 以机关名义: agency + */ + private String sponsorType; + + /** + * 主办方名称 + */ + private String sponsorName; + + /** + * 联系人 + */ + private String sponsorContacts; + + /** + * 联系电话 + */ + private String sponsorTel; + + /** + * 活动类型爱心活动heart 联建活动party + */ + @JsonIgnore + private String actType; + @JsonIgnore + private String createdBy; + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; + + /** + * true,我发布的,false,其他人发布的 + */ + private Boolean isMyPublish; + + private List actContent; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewContentResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewContentResultDTO.java index 73609e486f..c626fd0bba 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewContentResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewContentResultDTO.java @@ -19,7 +19,7 @@ public class ActPreviewContentResultDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 985e549bba..fd014695a2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -316,4 +316,15 @@ public class WorkActController { PageData page = workActService.pageList(formDTO); return new Result>().ok(page); } + + /** + * 数字社区,查看活动详情 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("detail") + public Result queryActDetail(@LoginUser TokenDto tokenDto,@RequestBody ActIdFormDTO formDTO){ + return new Result() .ok(workActService.queryActDetail(formDTO.getActId(),tokenDto.getUserId())); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java index 244303c84c..588f8c4ef2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java @@ -156,4 +156,12 @@ public interface WorkActService { * @return */ PageData pageList(ActPageFormDTO formDTO); + + /** + * 数字社区查看活动详情 + * @param actId + * @param userId + * @return + */ + ActDetailResultDTO queryActDetail(String actId, String userId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 8f1ec3e74e..42128bb066 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -1688,5 +1688,26 @@ public class WorkActServiceImpl implements WorkActService { } - + /** + * 数字社区查看活动详情 + * + * @param actId + * @param userId + * @return + */ + @Override + public ActDetailResultDTO queryActDetail(String actId, String userId) { + ActInfoEntity actInfoEntity=actInfoDao.selectById(actId); + ActDetailResultDTO resultDTO=ConvertUtils.sourceToTarget(actInfoEntity,ActDetailResultDTO.class); + //查询活动详情 + List list = actContentDao.selectByActId(actId); + resultDTO.setActContent(list); + //当前活动是否是我发布的 + if(resultDTO.getCreatedBy().equals(loginUserUtil.getLoginUserId())){ + resultDTO.setIsMyPublish(true); + }else{ + resultDTO.setIsMyPublish(false); + } + return resultDTO; + } } From 3ca44aeb986b2eeaff347a26932c62b685ea689e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 30 Jun 2022 17:12:33 +0800 Subject: [PATCH 030/122] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java | 4 ++-- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java index 702a9dd677..b9f60f9ea0 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -55,8 +55,8 @@ public class AddOrSaveDraftFormDTO implements Serializable { @NotBlank(message = "发布单位类型不能为空",groups = AddOrSaveDraftForm.class) private String publisherType; - @NotNull(message = "发布时间不能为空",groups = AddOrSaveDraftForm.class) - private Date publishDate; + @NotBlank(message = "发布时间不能为空",groups = AddOrSaveDraftForm.class) + private String publishDate; @NotBlank(message = "文章内容不能为空",groups = AddOrSaveDraftForm.class) private String content; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 30bfcaf86b..67ba076d23 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1502,6 +1502,7 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); + article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); article.setPublisherId(formDTO.getPublisher()); article.setPublishRangeDesc(formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); article.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); From 9323769aa61d7c4309eee3229b7ba56b17e5cfd6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Jun 2022 17:36:12 +0800 Subject: [PATCH 031/122] =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=80=BB=E7=BB=93=E6=A0=87=E5=BF=97=EF=BC=8C=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=80=BB=E7=BB=93=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/work/ActDetailResultDTO.java | 11 +++++++++++ .../java/com/epmet/dto/result/work/ActPageResDTO.java | 5 +++++ .../java/com/epmet/controller/WorkActController.java | 5 +++-- .../com/epmet/service/impl/WorkActServiceImpl.java | 6 ++++++ .../src/main/resources/mapper/ActInfoDao.xml | 3 ++- 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java index 99d00721fd..e977a2ec35 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result.work; +import com.epmet.dto.result.resi.ResiActSummaryResultDTO; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; @@ -163,5 +164,15 @@ public class ActDetailResultDTO implements Serializable { private Boolean isMyPublish; private List actContent; + + /** + * 1已经总结0未总结 + */ + private Boolean summaryFlag; + + /** + * 只有填写了总结的才有内容 + */ + List summaryContent; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java index 0f388d686e..dff386732b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java @@ -84,5 +84,10 @@ public class ActPageResDTO implements Serializable { */ @JsonIgnore private Integer signedUp; + + /** + * 1已经总结0未总结 + */ + private Boolean summaryFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index fd014695a2..abc846eb86 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -319,12 +319,13 @@ public class WorkActController { /** * 数字社区,查看活动详情 + * * @param tokenDto * @param formDTO * @return */ @PostMapping("detail") - public Result queryActDetail(@LoginUser TokenDto tokenDto,@RequestBody ActIdFormDTO formDTO){ - return new Result() .ok(workActService.queryActDetail(formDTO.getActId(),tokenDto.getUserId())); + public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActIdFormDTO formDTO) { + return new Result().ok(workActService.queryActDetail(formDTO.getActId(), tokenDto.getUserId())); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 42128bb066..57ae820fbc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.dto.*; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.dto.form.WxSubscribeMessageFormDTO; +import com.epmet.dto.form.resi.ResiActContentFormDTO; import com.epmet.dto.form.work.*; import com.epmet.dto.result.ActSponsorResultDTO; import com.epmet.dto.result.demand.OptionDTO; @@ -1708,6 +1709,11 @@ public class WorkActServiceImpl implements WorkActService { }else{ resultDTO.setIsMyPublish(false); } + if(resultDTO.getSummaryFlag()){ + ResiActContentFormDTO resiActContentFormDTO=new ResiActContentFormDTO(); + resiActContentFormDTO.setActId(actId); + resultDTO.setSummaryContent(actSummaryDao.selectListSummary(resiActContentFormDTO)); + } return resultDTO; } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 4aca026874..c0bdf44c43 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -827,7 +827,8 @@ aur.ACT_ID = ai.ID AND aur.DEL_FLAG = '0' AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) - ) AS signedUp + ) AS signedUp, + ai.SUMMARY_FLAG as summaryFlag FROM act_info ai WHERE From 7b76d2b7c2e8ea81249be0428ae9df7813712a92 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 30 Jun 2022 17:41:02 +0800 Subject: [PATCH 032/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E6=96=B0=E5=A2=9E/=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=BC=8F=E6=B4=9E=E8=A1=A5=E5=85=85=E7=94=9F=E6=88=90=E5=8D=95?= =?UTF-8?q?=E5=85=83=E7=BC=96=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BuildingServiceImpl.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index a32f8489fb..01c317f180 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -38,10 +38,7 @@ import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.model.BuildingInfoModel; import com.epmet.model.ImportBuildingInfoListener; import com.epmet.redis.IcHouseRedis; -import com.epmet.service.BuildingService; -import com.epmet.service.IcBuildingService; -import com.epmet.service.IcBuildingUnitService; -import com.epmet.service.IcNeighborHoodService; +import com.epmet.service.*; import com.epmet.util.ExcelPoiUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -91,6 +88,9 @@ public class BuildingServiceImpl implements BuildingService { private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; @Autowired private ExecutorService executorService; + @Autowired + private IcOrganizationCodeInfoService icOrganizationCodeInfoService; + @Override @Transactional(rollbackFor = Exception.class) @@ -121,6 +121,12 @@ public class BuildingServiceImpl implements BuildingService { icBuildingUnit.setBuildingId(entity.getId()); icBuildingUnit.setUnitName((i + 1) + "单元"); icBuildingUnit.setUnitNum(String.valueOf(i + 1)); + Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,entity.getId()); + if(!codeResult.success() || null == codeResult.getData()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员"); + } + icBuildingUnit.setCoding(codeResult.getData().getCoding()); + icBuildingUnit.setSysCoding(codeResult.getData().getSysCoding()); unitList.add(icBuildingUnit); } icBuildingUnitService.insertBatch(unitList, NumConstant.ONE_HUNDRED); @@ -495,6 +501,12 @@ public class BuildingServiceImpl implements BuildingService { icBuildingUnit.setCustomerId(customerId); icBuildingUnit.setUnitName(unitNum + "单元"); icBuildingUnit.setUnitNum(unitNum); + Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,icBuilding.getId()); + if(!codeResult.success() || null == codeResult.getData()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员"); + } + icBuildingUnit.setCoding(codeResult.getData().getCoding()); + icBuildingUnit.setSysCoding(codeResult.getData().getSysCoding()); unitList.add(icBuildingUnit); } } From 74083c50026fe028abc31f33f2d42a439701adf3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Jun 2022 18:49:24 +0800 Subject: [PATCH 033/122] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/work/ActUserResDTO.java | 96 +++++++++++++++++++ .../controller/WorkActUserController.java | 13 +++ .../com/epmet/service/WorkActUserService.java | 8 ++ .../service/impl/WorkActUserServiceImpl.java | 49 ++++++++++ 4 files changed, 166 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java new file mode 100644 index 0000000000..01fcf7e293 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java @@ -0,0 +1,96 @@ +package com.epmet.dto.result.work; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description + * @Author yzm + * @Date 2022/6/30 17:58 + */ +@Data +public class ActUserResDTO implements Serializable { + private static final long serialVersionUID = 7621004224467504031L; + /** + * 主键 + */ + private String actUserRelationId; + + /** + * 活动id + */ + private String actId; + + /** + * 用户id + */ + private String userId; + + /** + * 姓名 + */ + private String realName; + + /** + * 昵称 + */ + private String nickName; + + /** + * 联系方式 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idNum; + + /** + * 报名时间yyyy-MM-dd HH:mm:ss + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signUpTime; + + /** + * true: 是志愿者 false : 不是志愿者 + */ + private Boolean volunteerFlag; + + /** + * 实际参加活动个数 + */ + private Integer signInActNum; + /** + * 报名活动个数 + */ + private Integer signUpActNum; + /** + * 获得积分活动个数 + */ + private Integer obtainPointsActNum; + + /** + * 已处理: handled; 默认"",重新处理时reward_flag置为空字符串 + */ + private String processFlag; + + /** + * 已签到:signed_in; 默认"" + */ + private String signInFlag; + + /** + * 已给分:agree, 不给分:deny 默认"" + */ + private String rewardFlag; + public ActUserResDTO(){ + this.signInActNum=0; + this.signUpActNum=0; + this.obtainPointsActNum=0; + } +} + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java index a7ddc2c6dc..e1b4eca9c0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.work.AactUserDetailFormDTO; @@ -174,4 +175,16 @@ public class WorkActUserController { ValidatorUtils.validateEntity(formDTO, ActIdFormDTO.AddUserInternalGroup.class); return new Result>().ok(workActUserService.queryCanceledUserList(formDTO)); } + + /** + * 数字社区查看人员列表:报名审核、查看人员、活动结束发放积分页面人员列表 + * @param formDTO + * @return + */ + @PostMapping("userlist") + public Result> queryUserList(@RequestBody ActIdFormDTO formDTO){ + return new Result>().ok(workActUserService.queryUserList(formDTO.getActId())); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java index 281d8e7556..ae4bf7acc9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java @@ -1,5 +1,6 @@ package com.epmet.service; +import com.epmet.commons.tools.page.PageData; import com.epmet.dto.form.work.AactUserDetailFormDTO; import com.epmet.dto.form.work.ActIdFormDTO; import com.epmet.dto.form.work.AuditUserFormDTO; @@ -141,4 +142,11 @@ public interface WorkActUserService { * @Date 2020/7/24 12:52 **/ Boolean getVolunteerFlag(String userId); + + /** + * 数字社区查看人员列表:报名审核、查看人员、活动结束发放积分页面人员列表 + * @param actId + * @return + */ + PageData queryUserList(String actId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java index 2a67649019..67dbefd705 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java @@ -6,7 +6,9 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ActConstant; import com.epmet.constant.ActMessageConstant; @@ -36,6 +38,7 @@ import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; import com.epmet.service.HeartUserInfoService; import com.epmet.service.WorkActUserService; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -46,6 +49,8 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; /** * 工作端:活动人员相关api @@ -775,4 +780,48 @@ public class WorkActUserServiceImpl implements WorkActUserService { } return resultUserList.getData().get(0); } + + /** + * 数字社区查看人员列表:报名审核、查看人员、活动结束发放积分页面人员列表 + * + * @param actId + * @return + */ + @Override + public PageData queryUserList(String actId) { + List list = new ArrayList<>(); + // 活动相关人员 + List actUserRelationDTOList = actUserRelationService.getUserList(actId, StrConstant.EPMETY_STR); + if (null == actUserRelationDTOList || actUserRelationDTOList.size() == 0) { + return new PageData<>(list, NumConstant.ZERO); + } + // 查询人员id集合 + Set userIdList = actUserRelationDTOList.stream().map(ActUserRelationDTO::getUserId).collect(Collectors.toSet()); + // 查询出用户基本信息 + List userInfoList = this.queryUserBaseInfoList(new ArrayList<>(userIdList)); + for (ActUserRelationDTO actUserRelationDTO : actUserRelationDTOList) { + ActUserResDTO resultDTO = ConvertUtils.sourceToTarget(actUserRelationDTO,ActUserResDTO.class); + resultDTO.setActUserRelationId(actUserRelationDTO.getId()); + resultDTO.setSignUpTime(actUserRelationDTO.getCreatedTime()); + // true: 是志愿者 false : 不是志愿者 + resultDTO.setVolunteerFlag(getVolunteerFlag(actUserRelationDTO.getUserId())); + // 赋值基本信息 + for (UserBaseInfoResultDTO userBaseInfoResultDTO : userInfoList) { + if (actUserRelationDTO.getUserId().equals(userBaseInfoResultDTO.getUserId())) { + resultDTO.setRealName(StringUtils.isNotBlank(userBaseInfoResultDTO.getRealName()) ? userBaseInfoResultDTO.getRealName() : StrConstant.EPMETY_STR); + resultDTO.setNickName(StringUtils.isNotBlank(userBaseInfoResultDTO.getNickname()) ? userBaseInfoResultDTO.getNickname() : StrConstant.EPMETY_STR); + resultDTO.setMobile(StringUtils.isNotBlank(userBaseInfoResultDTO.getMobile()) ? userBaseInfoResultDTO.getMobile() : StrConstant.EPMETY_STR); + resultDTO.setIdNum(StringUtils.isNotBlank(userBaseInfoResultDTO.getIdNum()) ? userBaseInfoResultDTO.getIdNum() : StrConstant.EPMETY_STR); + break; + } + } + HistoricalActInfo historicalActInfo = this.getHistoricalActInfo(resultDTO.getUserId(), actId); + resultDTO.setSignInActNum(historicalActInfo.getSignInActNum()); + resultDTO.setSignUpActNum(historicalActInfo.getSignUpActNum()); + resultDTO.setObtainPointsActNum(historicalActInfo.getObtainPointsActNum()); + list.add(resultDTO); + } + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } } From 030b569286b233c5f394f3e979aaa548b67aec0e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 30 Jun 2022 19:00:22 +0800 Subject: [PATCH 034/122] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87.?= =?UTF-8?q?=E6=8B=92=E7=BB=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/work/AuditUserFormDTO.java | 5 +++++ .../epmet/dto/result/work/ActUserResDTO.java | 12 +++++++++++ .../controller/WorkActUserController.java | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java index 0df68ec7a8..f10fa57149 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form.work; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.Valid; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -12,6 +13,7 @@ import java.io.Serializable; * @author yinzuomei@elink-cn.com * @date 2020/7/23 17:28 */ +@Valid @Data public class AuditUserFormDTO implements Serializable { private static final long serialVersionUID = 243279409415285207L; @@ -28,4 +30,7 @@ public class AuditUserFormDTO implements Serializable { @NotBlank(message = "拒绝理由不能为空", groups = {RefusedUserShowGroup.class}) private String rejectReason; + @NotBlank(message = "type不能为空【通过:pass;拒绝:refused】", groups = {AddUserInternalGroup.class}) + private String type; + } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java index 01fcf7e293..17b09b3687 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java @@ -87,6 +87,18 @@ public class ActUserResDTO implements Serializable { * 已给分:agree, 不给分:deny 默认"" */ private String rewardFlag; + + + /** + * 当前状态(已报名/待审核auditing, + 审核通过passed, + 审核不通过refused + 取消报名canceled, + ) + */ + private String status; + + public ActUserResDTO(){ this.signInActNum=0; this.signUpActNum=0; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java index e1b4eca9c0..41f5b456eb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java @@ -3,6 +3,7 @@ package com.epmet.controller; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.ActConstant; import com.epmet.dto.form.work.AactUserDetailFormDTO; import com.epmet.dto.form.work.ActIdFormDTO; import com.epmet.dto.form.work.AuditUserFormDTO; @@ -131,6 +132,7 @@ public class WorkActUserController { **/ @PostMapping("auditpass") public Result auditPass(@RequestBody AuditUserFormDTO formDTO){ + formDTO.setType(ActConstant.ACT_USER_STATUS_PASSED); ValidatorUtils.validateEntity(formDTO, AuditUserFormDTO.AddUserInternalGroup.class); workActUserService.auditPass(formDTO.getActUserRelationId()); return new Result(); @@ -145,6 +147,7 @@ public class WorkActUserController { **/ @PostMapping("auditrefuse") public Result auditrefuse(@RequestBody AuditUserFormDTO formDTO){ + formDTO.setType(ActConstant.ACT_USER_STATUS_REFUSED); ValidatorUtils.validateEntity(formDTO, AuditUserFormDTO.RefusedUserShowGroup.class); workActUserService.auditRefuse(formDTO); return new Result(); @@ -186,5 +189,23 @@ public class WorkActUserController { return new Result>().ok(workActUserService.queryUserList(formDTO.getActId())); } + /** + * 批量审核通过、拒绝调用原来的接口 + * @param formDTOList + * @return + */ + @PostMapping("audit-user") + public Result auditUser(@RequestBody List formDTOList) { + ValidatorUtils.validateEntity(formDTOList); + for (AuditUserFormDTO formDTO : formDTOList) { + if (ActConstant.ACT_USER_STATUS_REFUSED.equals(formDTO.getType())) { + workActUserService.auditRefuse(formDTO); + } else if (ActConstant.ACT_USER_STATUS_PASSED.equals(formDTO.getType())) { + workActUserService.auditPass(formDTO.getActUserRelationId()); + } + } + return new Result(); + } + } From d40bd347355518b189b1fb2ead2064265b10a049 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 09:14:55 +0800 Subject: [PATCH 035/122] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/work/FinishActFormDTO.java | 21 ++++++++++++ .../dto/form/work/GrantPointsFormDTO.java | 6 ++++ .../epmet/dto/result/work/ActPageResDTO.java | 5 +++ .../controller/GrantPointsController.java | 2 ++ .../epmet/controller/WorkActController.java | 12 +++++++ .../com/epmet/service/WorkActService.java | 6 ++++ .../service/impl/GrantPointsServiceImpl.java | 24 ++++--------- .../service/impl/WorkActServiceImpl.java | 34 ++++++++++++++++++- .../src/main/resources/mapper/ActInfoDao.xml | 3 +- 9 files changed, 94 insertions(+), 19 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java new file mode 100644 index 0000000000..6fe6f5ae7d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form.work; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/6/30 19:22 + */ +@Data +public class FinishActFormDTO extends SaveActualTimeFormDTO implements Serializable { + private static final long serialVersionUID = -4352058593501077516L; + @NotNull(message = "分值不能为空",groups =AddUserInternalGroup.class ) + private Integer reward; + private List userList; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java index b3b79453b5..ef0631ccc9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -27,4 +28,9 @@ public class GrantPointsFormDTO implements Serializable { @NotBlank(message = "理由不能为空", groups = {DenyUserShowGroup.class}) private String denyRewardReason; + /** + * true:给分;false:不给分 + */ + @NotNull(message = "请选择是否给分", groups = DenyUserShowGroup.class) + private Boolean grantPoint; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java index dff386732b..ce729c351b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java @@ -89,5 +89,10 @@ public class ActPageResDTO implements Serializable { * 1已经总结0未总结 */ private Boolean summaryFlag; + + /** + * 活动积分 + */ + private Integer reward; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java index 72f402337a..390b3bfe21 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java @@ -54,6 +54,7 @@ public class GrantPointsController { **/ @PostMapping("deny") public Result deny(@RequestBody GrantPointsFormDTO formDTO){ + formDTO.setGrantPoint(false); ValidatorUtils.validateEntity(formDTO, GrantPointsFormDTO.DenyUserShowGroup.class); grantPointsService.deny(formDTO); return new Result(); @@ -68,6 +69,7 @@ public class GrantPointsController { **/ @PostMapping("agree") public Result agree(@RequestBody GrantPointsFormDTO formDTO){ + formDTO.setGrantPoint(true); ValidatorUtils.validateEntity(formDTO, GrantPointsFormDTO.AddUserInternalGroup.class); grantPointsService.agree(formDTO); return new Result(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index abc846eb86..845e6d239a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -328,4 +328,16 @@ public class WorkActController { public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActIdFormDTO formDTO) { return new Result().ok(workActService.queryActDetail(formDTO.getActId(), tokenDto.getUserId())); } + + /** + * 数字社区:结束活动 + * @param formDTO + * @return + */ + @PostMapping("finish") + public Result finish(@RequestBody FinishActFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,SaveActualTimeFormDTO.AddUserInternalGroup.class,SaveActualTimeFormDTO.UserShowGroup.class); + workActService.finish(formDTO); + return new Result(); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java index 588f8c4ef2..8d3f98cb37 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java @@ -164,4 +164,10 @@ public interface WorkActService { * @return */ ActDetailResultDTO queryActDetail(String actId, String userId); + + /** + * + * @param formDTO + */ + void finish(FinishActFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java index d761445c55..32607d5d9d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -108,19 +109,14 @@ public class GrantPointsServiceImpl implements GrantPointsService { @Transactional(rollbackFor = Exception.class) public void agree(GrantPointsFormDTO formDTO) { //是否是待处理 - ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); - if(null==actUserRelationDTO){ - logger.warn("积分发放-给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId()); - return; - } //如果是已处理直接返回 - if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){ - logger.info("积分发放-给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId()); + ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); + if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) { return; } //查取分值 ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId()); - if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) { + if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) { logger.warn("积分发放-给分act_info is null or act_info is finished"); return; } @@ -152,20 +148,14 @@ public class GrantPointsServiceImpl implements GrantPointsService { @Override @Transactional(rollbackFor = Exception.class) public void deny(GrantPointsFormDTO formDTO) { - //是否是待处理 - ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); - if(null==actUserRelationDTO){ - logger.warn("积分发放-不给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId()); - return; - } //如果是已处理直接返回 - if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){ - logger.info("积分发放-不给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId()); + ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); + if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) { return; } //查取分值 ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId()); - if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) { + if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) { logger.warn("积分发放-不给分act_info is null or act_info is finished"); return; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 57ae820fbc..59cbd317aa 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -113,7 +113,8 @@ public class WorkActServiceImpl implements WorkActService { private IcActivityUnitRelationService icActivityUnitRelationService; @Resource private IcActivityServiceRelationService icActivityServiceRelationService; - + @Autowired + private ActPointLogService actPointLogService; /** * @author yinzuomei @@ -1716,4 +1717,35 @@ public class WorkActServiceImpl implements WorkActService { } return resultDTO; } + + /** + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void finish(FinishActFormDTO formDTO) { + // 1、保存活动实际开始、结束时间 + saveActualTime(formDTO); + // 2、积分大于0的->发放积分 + if (formDTO.getReward() > NumConstant.ZERO) { + for (GrantPointsFormDTO grantPointsFormDTO : formDTO.getUserList()) { + ActUserRelationDTO actUserRelationDTO = actUserRelationService.get(grantPointsFormDTO.getActUserRelationId()); + // 更新act_user_relation改为已处理,给分 + actUserRelationDTO.setProcessFlag(ActConstant.HANDLED); + actUserRelationDTO.setRewardFlag(grantPointsFormDTO.getGrantPoint() ? ActConstant.ACT_USER_STATUS_AGREE : ActConstant.ACT_USER_STATUS_DENY); + actUserRelationDTO.setDenyRewardReason(StrConstant.EPMETY_STR); + actUserRelationService.update(actUserRelationDTO); + // 增加一条act_point_log + ActPointLogDTO actPointLogDTO = new ActPointLogDTO(); + actPointLogDTO.setActId(actUserRelationDTO.getActId()); + actPointLogDTO.setUserId(actUserRelationDTO.getUserId()); + actPointLogDTO.setPoints(formDTO.getReward()); + actPointLogDTO.setOperateType(grantPointsFormDTO.getGrantPoint() ? ActConstant.ACT_USER_STATUS_AGREE : ActConstant.ACT_USER_STATUS_DENY); + actPointLogDTO.setRemark(grantPointsFormDTO.getGrantPoint() ? StrConstant.EPMETY_STR : grantPointsFormDTO.getDenyRewardReason()); + actPointLogService.save(actPointLogDTO); + } + } + // 3、结束活动 + finishAct(formDTO.getActId()); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index c0bdf44c43..465dd8adb1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -828,7 +828,8 @@ AND aur.DEL_FLAG = '0' AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) ) AS signedUp, - ai.SUMMARY_FLAG as summaryFlag + ai.SUMMARY_FLAG as summaryFlag, + ai.REWARD as reward, FROM act_info ai WHERE From 705fd87addef758f6dbb7b35a5d595755c1d631e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Jul 2022 09:16:37 +0800 Subject: [PATCH 036/122] =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/DraftContentDTO.java | 2 +- .../src/main/java/com/epmet/dto/DraftDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/DraftContentEntity.java | 2 +- .../src/main/java/com/epmet/entity/DraftEntity.java | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java index ee29b969c7..add18d59f8 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java @@ -55,7 +55,7 @@ public class DraftContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text;文件:file + * 内容类型 图片:img;文字:text;文件:file 富文本:rich_text */ private String contentType; diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java index c7a383a56d..55751bdfd1 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java @@ -114,6 +114,11 @@ public class DraftDTO implements Serializable { */ private String departmentId; + /** + * 1:富文本;0:不是 + */ + private String richTextFlag; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java index 15a7ba4e76..bf93f1b2c8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java @@ -51,7 +51,7 @@ public class DraftContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text;文件:file + * 内容类型 图片:img;文字:text;文件:file 富文本:rich_text */ private String contentType; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java index 04e1b22158..1c93cfc7cf 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java @@ -117,4 +117,9 @@ public class DraftEntity extends BaseEpmetEntity { */ private String departmentId; + /** + * 1:富文本;0:不是 + */ + private String richTextFlag; + } From 028f181a167f9d02f3839a759da038419175812b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 09:29:27 +0800 Subject: [PATCH 037/122] =?UTF-8?q?=E5=88=97=E8=A1=A8+=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=A2=9E=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../work/CanceledActDetailResultDTO.java | 5 +++++ .../dto/result/work/CanceledActResultDTO.java | 5 +++++ .../work/FinishedActDetailResultDTO.java | 5 +++++ .../dto/result/work/FinishedActResultDTO.java | 5 +++++ .../work/InProgressActDetailResultDTO.java | 5 +++++ .../result/work/InProgressActResultDTO.java | 5 +++++ .../result/work/ReEditActInfoResultDTO.java | 5 +++++ .../epmet/controller/WorkActController.java | 4 ++-- .../src/main/resources/mapper/ActInfoDao.xml | 20 ++++++++++++------- 9 files changed, 50 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java index 61f6eae029..dbccdd7451 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java @@ -174,4 +174,9 @@ public class CanceledActDetailResultDTO implements Serializable { private String serviceMatterName; private List serviceMatterList; private List serviceMatterNameList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java index 89b1374c03..6af2c03bed 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java @@ -61,4 +61,9 @@ public class CanceledActResultDTO implements Serializable { * 活动类型 爱心活动heart 联建活动party */ private String actType; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java index 26aa13d4a1..00dfeccf0b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java @@ -164,4 +164,9 @@ public class FinishedActDetailResultDTO implements Serializable { private String serviceMatterName; private List serviceMatterList; private List serviceMatterNameList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java index 113d5dc46e..157fc148af 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java @@ -63,4 +63,9 @@ public class FinishedActResultDTO implements Serializable { * 活动类型 爱心活动heart 联建活动party */ private String actType; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java index f220f19a96..a589c1bd5e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java @@ -159,4 +159,9 @@ public class InProgressActDetailResultDTO implements Serializable { private String serviceMatterName; private List serviceMatterList; private List serviceMatterNameList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java index eae286055b..adb2e310e7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java @@ -87,4 +87,9 @@ public class InProgressActResultDTO implements Serializable { * 活动类型 爱心活动heart 联建活动party */ private String actType; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java index e4db367ee0..365c2c0671 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java @@ -176,4 +176,9 @@ public class ReEditActInfoResultDTO implements Serializable { private String serviceMatterName; private List serviceMatterList; private List serviceMatterNameList; + + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 845e6d239a..2a328dc800 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -59,7 +59,7 @@ public class WorkActController { * @param formDTO * @return com.epmet.commons.tools.utils.Result * @author yinzuomei - * @description 发布活动 + * @description 发布活动-----废弃现在使用publishV2 * @Date 2020/7/21 18:32 **/ @PostMapping("publish") @@ -267,7 +267,7 @@ public class WorkActController { * @param rePublishFormDTO * @return com.epmet.commons.tools.utils.Result * @author yinzuomei - * @description 重新发布活动 + * @description 重新发布活动-----废弃现在使用republishV2 * @Date 2020/7/27 13:55 **/ @PostMapping("republish") diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 465dd8adb1..0e2d35d965 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -534,7 +534,8 @@ ai.SIGN_UP_END_TIME as signUpEndTime, ai.SIGN_UP_START_TIME as signUpStartTime, ai.ACT_ADDRESS as actAddress, - ai.act_type as actType + ai.act_type as actType, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -556,7 +557,8 @@ ai.CANCEL_TIME AS cancelTime, ai.CANCEL_REASON AS cancelReason, ai.ACT_ADDRESS as actAddress, - ai.act_type as actType + ai.act_type as actType, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -579,7 +581,8 @@ ai.ACTUAL_START_TIME as actualStartTime, ai.ACTUAL_END_TIME as actualEndTime, ai.ACT_ADDRESS as actAddress, - ai.act_type as actType + ai.act_type as actType, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -669,7 +672,8 @@ ai.ACT_TYPE, ai.UNIT_ID, ai.SERVICE_MATTER, - ai.TARGET + ai.TARGET, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -706,7 +710,8 @@ ai.ACT_TYPE, ai.UNIT_ID, ai.SERVICE_MATTER, - ai.TARGET + ai.TARGET, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -749,7 +754,8 @@ ai.ACT_TYPE, ai.UNIT_ID, ai.SERVICE_MATTER, - ai.TARGET + ai.TARGET, + ai.RICH_TEXT_FLAG as richTextFlag FROM act_info ai WHERE @@ -829,7 +835,7 @@ AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) ) AS signedUp, ai.SUMMARY_FLAG as summaryFlag, - ai.REWARD as reward, + ai.REWARD as reward FROM act_info ai WHERE From 424c0d992cc3d1fe63e14a03d4afb8482454cb9d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 09:39:29 +0800 Subject: [PATCH 038/122] =?UTF-8?q?=E5=AD=98=E8=8D=89=E7=A8=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddOrSaveDraftFormDTO.java | 5 + .../service/impl/ArticleServiceImpl.java | 104 ++++++++++++++---- 2 files changed, 88 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java index b9f60f9ea0..6467737355 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -69,4 +69,9 @@ public class AddOrSaveDraftFormDTO implements Serializable { private String userId; private String customerId; + + /** + * 草稿ID + */ + private String draftId; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 67ba076d23..18590b1e4a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -132,6 +132,8 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagV2(UpdateCustomerTagCacheDTO formDto,String customerId,List gridIds,String userId){ + if (CollectionUtils.isEmpty(gridIds)){ + return new ArrayList<>(); + } List tagsInfo = formDto.getTagsInfo(); List gridTags = new ArrayList<>(); List gridTagCache = new ArrayList<>(); @@ -1369,6 +1374,9 @@ public class ArticleServiceImpl extends BaseServiceImpl gridTagCache) { + if (CollectionUtils.isEmpty(gridTagCache)){ + return; + } //更新 网格下 标签使用数量 List gridTagCacheCopy = new ArrayList<>(); gridTagCache.forEach(cacheDTO -> { @@ -1406,6 +1414,9 @@ public class ArticleServiceImpl extends BaseServiceImpl articleTags = new ArrayList<>(); List tagsInfo = formDto.getTagsInfo(); + if (CollectionUtils.isEmpty(tagsInfo)){ + return; + } tagsInfo.forEach(resultDTO -> { ArticleTagsEntity e = ConvertUtils.sourceToTarget(resultDTO, ArticleTagsEntity.class); e.setCustomerId(customerId); @@ -1479,6 +1490,12 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); article.setPublisherId(formDTO.getPublisher()); - article.setPublishRangeDesc(formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); + article.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); article.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); article.setOrgId(staffInfo.getAgencyId()); article.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); @@ -1522,30 +1538,32 @@ public class ArticleServiceImpl extends BaseServiceImpl rangeList = new ArrayList<>(); - formDTO.getGridIdList().forEach(g -> { - GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(g); - if (null == gridInfo){ - throw new EpmetException("未查询到网格信息:"+g); - } - ArticlePublishRangeEntity articlePublishRange = ConvertUtils.sourceToTarget(gridInfo,ArticlePublishRangeEntity.class); - articlePublishRange.setCustomerId(customerId); - articlePublishRange.setArticleId(article.getId()); - articlePublishRange.setGridId(g); - articlePublishRange.setAgencyGridName(gridInfo.getGridNamePath()); - articlePublishRange.setAgencyId(gridInfo.getPid()); - articlePublishRange.setPublishStatus(ArticleConstant.PUBLISHED); - articlePublishRange.setId(null); - rangeList.add(articlePublishRange); - }); - articlePublishRangeService.insertBatch(rangeList); + if (!CollectionUtils.isEmpty(formDTO.getGridIdList())){ + List rangeList = new ArrayList<>(); + formDTO.getGridIdList().forEach(g -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(g); + if (null == gridInfo){ + throw new EpmetException("未查询到网格信息:"+g); + } + ArticlePublishRangeEntity articlePublishRange = ConvertUtils.sourceToTarget(gridInfo,ArticlePublishRangeEntity.class); + articlePublishRange.setCustomerId(customerId); + articlePublishRange.setArticleId(article.getId()); + articlePublishRange.setGridId(g); + articlePublishRange.setAgencyGridName(gridInfo.getGridNamePath()); + articlePublishRange.setAgencyId(gridInfo.getPid()); + articlePublishRange.setPublishStatus(ArticleConstant.PUBLISHED); + articlePublishRange.setId(null); + rangeList.add(articlePublishRange); + }); + articlePublishRangeService.insertBatch(rangeList); + } // 5.文章标签 UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = updateCustomerTagV2(formDTO.getUserId(), formDTO.getCustomerId(), article.getTags()); addArticleTagsV2(updateCustomerTagCacheDTO,customerId,article.getId()); @@ -1560,7 +1578,51 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); + draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); + draft.setPublisherId(formDTO.getPublisher()); + draft.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); + draft.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); + draft.setOrgId(staffInfo.getAgencyId()); + draft.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); + if (formDTO.getPublisherType().equals(DraftConstant.GRID)){ + draft.setGridId(formDTO.getPublisher()); + } + draft.setStatusFlag(DraftConstant.UNPUBLISH); + draftDao.insert(draft); + // 2.内容 + DraftContentEntity draftContent = ConvertUtils.sourceToTarget(draft, DraftContentEntity.class); + draftContent.setCustomerId(customerId); + draftContent.setDraftId(draft.getId()); + draftContent.setContent(formDTO.getContent()); + draftContent.setContentType("rich_text"); + draftContent.setAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); + draftContent.setOrderNum(NumConstant.ZERO); + draftContentDao.insert(draftContent); + // 3.发布范围 + if (!CollectionUtils.isEmpty(formDTO.getGridIdList())){ + List rangeList = new ArrayList<>(); + formDTO.getGridIdList().forEach(g -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(g); + if (null == gridInfo){ + throw new EpmetException("未查询到网格信息:"+g); + } + DraftPublishRangeEntity draftPublishRange = ConvertUtils.sourceToTarget(gridInfo,DraftPublishRangeEntity.class); + draftPublishRange.setCustomerId(customerId); + draftPublishRange.setDraftId(draft.getId()); + draftPublishRange.setGridId(g); + draftPublishRange.setAgencyGridName(gridInfo.getGridNamePath()); + draftPublishRange.setAgencyId(gridInfo.getPid()); + draftPublishRange.setPublishStatus(ArticleConstant.PUBLISHED); + draftPublishRange.setId(null); + rangeList.add(draftPublishRange); + }); + draftPublishRangeService.insertBatch(rangeList); + } } } From 5ca6bce24de05fca4f334962a8eed416b053fc24 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 09:39:41 +0800 Subject: [PATCH 039/122] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=80=BB=E7=BB=93=E5=86=85=E5=AE=B9=E5=8F=98=E6=9B=B4=E4=B8=BA?= =?UTF-8?q?longtext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/ActSummaryDTO.java | 2 +- .../com/epmet/dto/form/work/PublishActContentFormDTO.java | 4 ++-- .../src/main/java/com/epmet/entity/ActSummaryEntity.java | 2 +- .../src/main/resources/db/migration/V0.0.22__act_addcol.sql | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java index 9e8acacb88..b1b73cfdc1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java @@ -50,7 +50,7 @@ public class ActSummaryDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java index efe2592e7a..82b405949d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java @@ -29,8 +29,8 @@ public class PublishActContentFormDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ - @NotBlank(message = "内容类型不能为空,图片:img;文字:text", groups = {UserInternalGroup.class}) + @NotBlank(message = "内容类型 图片:img;文字:text;富文本:rich_text", groups = {UserInternalGroup.class}) private String contentType; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActSummaryEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActSummaryEntity.java index bc09dfcc52..1dd1bc354c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActSummaryEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActSummaryEntity.java @@ -48,7 +48,7 @@ public class ActSummaryEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;富文本:rich_text */ private String contentType; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql index 91fe197874..4d25597cae 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql @@ -3,4 +3,7 @@ alter table act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容 alter table act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER SUMMARY_FLAG; alter table latest_act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER AUDIT_SWITCH; alter table latest_act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; -alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; \ No newline at end of file +alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; + +alter table act_summary MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '总结内容'; +alter table act_summary MODIFY CONTENT_TYPE VARCHAR(32)not null COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; \ No newline at end of file From 104ef63a591c96e102ec1bacb5dcd6b9a67fa756 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Jul 2022 09:51:23 +0800 Subject: [PATCH 040/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ArticleController.java | 1 + .../com/epmet/controller/DraftController.java | 1 + .../src/main/java/com/epmet/dao/DraftDao.java | 3 + .../epmet/service/impl/DraftServiceImpl.java | 82 +++++++++++++++++-- .../src/main/resources/mapper/ArticleDao.xml | 8 +- .../src/main/resources/mapper/DraftDao.xml | 44 ++++++++++ 6 files changed, 127 insertions(+), 12 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 6dcd4f2af5..2b757b7320 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -428,6 +428,7 @@ public class ArticleController { @PostMapping("detailV2") public Result detailV2(@LoginUser TokenDto tokenDTO, @RequestBody ArticleListFormDTO formDTO) { formDTO.setCustomerId(tokenDTO.getCustomerId()); + formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(articleService.detailV2(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java index b0cd066b27..6cf5a28000 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java @@ -109,6 +109,7 @@ public class DraftController { @PostMapping("detailV2") public Result detailV2(@LoginUser TokenDto tokenDTO, @RequestBody DraftListFormDTO formDTO) { formDTO.setCustomerId(tokenDTO.getCustomerId()); + formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(draftService.detailV2(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java index 470ec938b6..0b5a30084a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.DraftEntity; import org.apache.ibatis.annotations.Mapper; @@ -112,4 +113,6 @@ public interface DraftDao extends BaseDao { * @return */ int updateAuditStatusById(@Param("draftId") String draftId, @Param("statusFlag") String statusFlag, @Param("titleAuditStatus") String titleAuditStatus); + + List selectAllDraft(DraftListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index 53ab778879..45d0e96cb2 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -17,24 +17,30 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DraftConstant; +import com.epmet.dao.DraftContentDao; import com.epmet.dao.DraftCoverDao; import com.epmet.dao.DraftDao; +import com.epmet.dao.DraftPublishRangeDao; import com.epmet.dto.DraftDTO; import com.epmet.dto.form.DeleteDraftFormDTO; import com.epmet.dto.form.DraftDetailFormDTO; import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.*; -import com.epmet.entity.DraftCoverEntity; -import com.epmet.entity.DraftEntity; +import com.epmet.entity.*; import com.epmet.service.DraftService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -44,11 +50,10 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 草稿表 @@ -62,6 +67,13 @@ public class DraftServiceImpl extends BaseServiceImpl imp @Autowired private DraftCoverDao draftCoverDao; + @Autowired + private LoginUserUtil loginUserUtil; + @Autowired + private DraftPublishRangeDao draftPublishRangeDao; + @Autowired + private DraftContentDao draftContentDao; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -203,12 +215,66 @@ public class DraftServiceImpl extends BaseServiceImpl imp @Override public PageData draftListV2(DraftListFormDTO formDTO) { - return null; + //1.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException("获取工作人员信息失败"); + } + //查询当前组织及下级数据 + formDTO.setAgencyId(staffInfo.getAgencyId()); + //列表查询 + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); + List list = baseDao.selectAllDraft(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + + //封装数据 + if (!CollectionUtils.isEmpty(list)) { + list.forEach(l->{ + l.setTagNameList(StringUtils.isNotBlank(l.getTags())?Arrays.asList(l.getTags().split("[|]")):new ArrayList<>()); + l.setIsMePublished(l.getCreatedBy().equals(loginUserUtil.getLoginUserId())?true:false); + }); + } + + return new PageData<>(list, pageInfo.getTotal()); } @Override public DraftPcListResultDTO detailV2(DraftListFormDTO formDTO) { - return null; + DraftPcListResultDTO resultDTO = new DraftPcListResultDTO(); + //1.查询文章主表信息 + List list = baseDao.selectAllDraft(formDTO); + + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(NumConstant.ZERO); + //查询文章涉及的发布范围网络Id列表 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(DraftPublishRangeEntity::getDraftId, formDTO.getDraftId()); + tWrapper.eq(DraftPublishRangeEntity::getDelFlag, NumConstant.ZERO_STR); + //【文章下线的查所有发布范围,文章没下线的只查还没下线的发布范围】 + if("unpublish".equals(resultDTO.getStatusFlag())){ + tWrapper.eq(DraftPublishRangeEntity::getPublishStatus, "unpublish"); + }else { + tWrapper.eq(DraftPublishRangeEntity::getPublishStatus, "published"); + } + List entityList = draftPublishRangeDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + List contentList = entityList.stream().map(DraftPublishRangeEntity::getGridId).collect(Collectors.toList()); + resultDTO.setGridIdList(contentList); + } + + //查询文章内容 + LambdaQueryWrapper tWrapper1 = new LambdaQueryWrapper<>(); + tWrapper1.eq(DraftContentEntity::getDraftId, formDTO.getDraftId()); + tWrapper1.eq(DraftContentEntity::getDelFlag, NumConstant.ZERO_STR); + tWrapper1.orderByDesc(DraftContentEntity::getOrderNum); + List contentEntityList = draftContentDao.selectList(tWrapper1); + if (!CollectionUtils.isEmpty(entityList)) { + LinkedList contentList = (LinkedList)contentEntityList.stream().map(DraftContentEntity::getContent).collect(Collectors.toList()); + resultDTO.setContentList(contentList); + } + } + + return resultDTO; } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 922c54c044..3ee0cf2193 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -449,7 +449,7 @@ WHERE a.del_flag = '0' - AND id = #{articleId} + AND a.id = #{articleId} AND a.customer_id = #{customerId} @@ -464,10 +464,10 @@ AND a.status_flag = #{statusFlag} - and publish_date >= #{startDate} + AND a.publish_date >= #{startDate} - + @@ -487,7 +487,7 @@ ) - ORDER BY publish_date DESC, updated_time DESC + ORDER BY a.publish_date DESC, a.updated_time DESC diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index a6675ddb4e..1c2e4d36b2 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -177,6 +177,50 @@ ORDER BY dc.ORDER_NUM ASC + + + update draft set DEL_FLAG='1' where id=#{draftId} From 779eabe9fa789ae90c7de4199a971204511bd323 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 1 Jul 2022 09:58:25 +0800 Subject: [PATCH 041/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E5=B0=8F=E5=8C=BA=E6=A5=BC=E6=A0=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=89=94=E9=99=A4=E7=B3=BB=E7=BB=9F=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/BuildingServiceImpl.java | 1 + .../java/com/epmet/service/impl/NeighborHoodServiceImpl.java | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index 01c317f180..cdcb22272a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -454,6 +454,7 @@ public class BuildingServiceImpl implements BuildingService { } } //楼栋编码不可重复 + formDTO.setSysCoding(null); if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){ IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(formDTO.getCoding(),formDTO.getBuildingId()); if(null != isHaveCoding){ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java index 2afbe5d76c..7639e0737f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java @@ -136,6 +136,7 @@ public class NeighborHoodServiceImpl extends BaseServiceImpl Date: Fri, 1 Jul 2022 10:02:10 +0800 Subject: [PATCH 042/122] =?UTF-8?q?/heart/resi/act/detail=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/resi/ResiActDetailResultDTO.java | 4 ++++ .../src/main/resources/mapper/ActInfoDao.xml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java index 266ccf8e9f..40cd730d96 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java @@ -203,4 +203,8 @@ public class ResiActDetailResultDTO implements Serializable { private String serviceMatterName; private List serviceMatterList; private List serviceMatterNameList; + /** + * true:富文本;false: 原来小程序那种发布内容 + */ + private Boolean richTextFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 0e2d35d965..a9e6e093a9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -449,7 +449,8 @@ i.UNIT_ID AS unitId, i.SERVICE_MATTER AS serviceMatter, i.TARGET AS target, - i.act_type as actType + i.act_type as actType, + i.RICH_TEXT_FLAG as richTextFlag FROM act_info i LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID From 072bf28a441176c397b33c01def1c7db68843a6a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 10:15:35 +0800 Subject: [PATCH 043/122] =?UTF-8?q?=E4=B8=BB=E5=8A=9E=E6=96=B9=E5=85=A8?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.22__act_addcol.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql index 4d25597cae..a91b45f305 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql @@ -6,4 +6,7 @@ alter table latest_act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL C alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容'; alter table act_summary MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '总结内容'; -alter table act_summary MODIFY CONTENT_TYPE VARCHAR(32)not null COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; \ No newline at end of file +alter table act_summary MODIFY CONTENT_TYPE VARCHAR(32)not null COMMENT '内容类型 图片:img;文字:text;富文本:rich_text'; + +alter table act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID; +alter table latest_act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID; \ No newline at end of file From 3721436d82909f75cb792ca675fb54010f566da4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 10:20:46 +0800 Subject: [PATCH 044/122] sponsorPath; --- .../src/main/java/com/epmet/dto/ActInfoDTO.java | 5 +++++ .../src/main/java/com/epmet/dto/LatestActInfoDTO.java | 5 +++++ .../java/com/epmet/dto/form/work/PublishActInfoFormDTO.java | 5 +++++ .../main/java/com/epmet/dto/form/work/RePublishFormDTO.java | 5 +++++ .../java/com/epmet/dto/result/work/ActDetailResultDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/ActInfoEntity.java | 5 +++++ .../src/main/java/com/epmet/entity/LatestActInfoEntity.java | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java index 3a46608052..ee2a138b09 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java @@ -193,6 +193,11 @@ public class ActInfoDTO implements Serializable { */ private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 活动主办方名称(机关或网格的名称) */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java index d72ef3b66e..96fef0dbd6 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java @@ -154,6 +154,11 @@ public class LatestActInfoDTO implements Serializable { */ private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 活动主办方名称(机关或网格的名称) */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java index b63079f849..88ff78c443 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java @@ -165,6 +165,11 @@ public class PublishActInfoFormDTO implements Serializable { @NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class}) private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 主办方类型:以网格名义:grid , 以机关名义: agency */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java index 13e67231f1..eb24b3413d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java @@ -173,6 +173,11 @@ public class RePublishFormDTO implements Serializable { @NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class}) private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 主办方类型:以网格名义:grid , 以机关名义: agency */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java index e977a2ec35..af4d0df040 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java @@ -126,6 +126,11 @@ public class ActDetailResultDTO implements Serializable { */ private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 主办方类型:以网格名义:grid , 以机关名义: agency */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java index ac8ceea745..d5980e5e46 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java @@ -171,6 +171,11 @@ public class ActInfoEntity extends BaseEpmetEntity { */ private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 活动主办方名称(机关或网格的名称) */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java index 4636310442..8787edf240 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java @@ -153,6 +153,11 @@ public class LatestActInfoEntity extends BaseEpmetEntity { */ private String sponsorId; + /** + * 主办方全路径包含自身id + */ + private String sponsorPath; + /** * 活动主办方名称(机关或网格的名称) */ From 0a1df33823a46e72894864d2d7ccf2ca1c26f033 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 1 Jul 2022 10:30:32 +0800 Subject: [PATCH 045/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E6=88=BF=E5=B1=8Bcoding=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.34__alter_ic_house.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_house.sql diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_house.sql new file mode 100644 index 0000000000..277dadd03d --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_house.sql @@ -0,0 +1 @@ +update `ic_house` set CODING=HOUSE_CODE From daf8115a0ee7a11f3bacb47f88abefa7c6cdc1e2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 10:56:40 +0800 Subject: [PATCH 046/122] =?UTF-8?q?=E5=B0=81=E9=9D=A2=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddOrSaveDraftFormDTO.java | 5 ++ .../service/impl/ArticleServiceImpl.java | 48 +++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java index 6467737355..9f6eee7f79 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -74,4 +74,9 @@ public class AddOrSaveDraftFormDTO implements Serializable { * 草稿ID */ private String draftId; + + /** + * 封面图地址 + */ + private String imgUrl; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 18590b1e4a..8a88030394 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -78,6 +78,8 @@ import org.springframework.util.CollectionUtils; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; /** @@ -1491,10 +1493,11 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); + article.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); article.setPublisherId(formDTO.getPublisher()); article.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); article.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); article.setOrgId(staffInfo.getAgencyId()); article.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); + article.setRichTextFlag(NumConstant.ONE_STR); baseDao.insert(article); // 2.内容 ArticleContentEntity articleContent = ConvertUtils.sourceToTarget(article, ArticleContentEntity.class); @@ -1569,7 +1573,15 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagCacheDTOS = updateGridTagV2(updateCustomerTagCacheDTO, customerId, formDTO.getGridIdList(), formDTO.getUserId()); - // 7.更新redis + // 7.文章封面 + if (StringUtils.isNotBlank(formDTO.getImgUrl())){ + ArticleCoverEntity articleCover = new ArticleCoverEntity(); + articleCover.setCustomerId(customerId); + articleCover.setArticleId(article.getId()); + articleCover.setImgUrl(formDTO.getImgUrl()); + articleCoverDao.insert(articleCover); + } + // 8.更新redis try { this.updateCacheCustomerTag(updateCustomerTagCacheDTO); this.updateCacheGridTag(updateGridTagCacheDTOS); @@ -1582,7 +1594,7 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? formDTO.getContent().substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : formDTO.getContent()); + draft.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); draft.setPublisherId(formDTO.getPublisher()); draft.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); @@ -1593,6 +1605,7 @@ public class ArticleServiceImpl extends BaseServiceImpl articleListV2(ArticleListFormDTO formDTO) { From c8cf7121789ad6a33d5f816364f784770f496e31 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 11:03:55 +0800 Subject: [PATCH 047/122] =?UTF-8?q?regex=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ArticleServiceImpl.java | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 8a88030394..bba911bb2f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1653,18 +1653,34 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Fri, 1 Jul 2022 13:22:20 +0800 Subject: [PATCH 048/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index bba911bb2f..a7a6e94b0a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1630,7 +1630,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Fri, 1 Jul 2022 13:27:13 +0800 Subject: [PATCH 049/122] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ArticleListFormDTO.java | 4 +- .../com/epmet/dto/form/DraftListFormDTO.java | 4 +- .../dto/result/DraftPcListResultDTO.java | 3 +- .../dto/result/PublishedListResultDTO.java | 3 +- .../service/impl/ArticleServiceImpl.java | 17 +++++++-- .../epmet/service/impl/DraftServiceImpl.java | 37 +++++++++++++------ .../src/main/resources/mapper/ArticleDao.xml | 28 ++++++++++---- 7 files changed, 66 insertions(+), 30 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java index 76b3fd3ae1..0a601e9802 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleListFormDTO.java @@ -35,11 +35,11 @@ public class ArticleListFormDTO implements Serializable { */ private String publishRangeId; /** - * 开始日期 yyyy-MM-dd HH:mm:ss + * 开始日期 yyyy-MM-dd */ private String startDate; /** - * 结束日期 yyyy-MM-dd HH:mm:ss + * 结束日期 yyyy-MM-dd */ private String endDate; /** diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java index 95167469f2..51e659bdd0 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java @@ -18,11 +18,11 @@ public class DraftListFormDTO implements Serializable { */ private String title; /** - * 开始日期 yyyy-MM-dd HH:mm:ss + * 开始日期 yyyy-MM-dd */ private String startDate; /** - * 结束日期 yyyy-MM-dd HH:mm:ss + * 结束日期 yyyy-MM-dd */ private String endDate; /** diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java index 196e629fed..8ab389eb8f 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -5,7 +5,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; -import java.util.LinkedList; import java.util.List; /** @@ -96,6 +95,6 @@ public class DraftPcListResultDTO implements Serializable { /** * 文章内容 */ - private LinkedList contentList; + private List contentList; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java index 94b190c799..fd0ece2918 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java @@ -5,7 +5,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; -import java.util.LinkedList; import java.util.List; /** @@ -98,5 +97,5 @@ public class PublishedListResultDTO implements Serializable { /** * 文章内容 */ - private LinkedList contentList; + private List contentList; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index bba911bb2f..de9123cfd3 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -34,7 +34,6 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -1701,7 +1700,7 @@ public class ArticleServiceImpl extends BaseServiceImpl{ l.setTagNameList(StringUtils.isNotBlank(l.getTags())?Arrays.asList(l.getTags().split("[|]")):new ArrayList<>()); - l.setIsMePublished(l.getCreatedBy().equals(loginUserUtil.getLoginUserId())?true:false); + l.setIsMePublished(l.getCreatedBy().equals(formDTO.getStaffId())?true:false); }); } @@ -1716,6 +1715,8 @@ public class ArticleServiceImpl extends BaseServiceImpl()); + resultDTO.setIsMePublished(resultDTO.getCreatedBy().equals(formDTO.getStaffId())?true:false); //查询文章涉及的发布范围网络Id列表 LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); tWrapper.eq(ArticlePublishRangeEntity::getArticleId, formDTO.getArticleId()); @@ -1739,9 +1740,19 @@ public class ArticleServiceImpl extends BaseServiceImpl contentEntityList = articleContentDao.selectList(tWrapper1); if (!CollectionUtils.isEmpty(entityList)) { - LinkedList contentList = (LinkedList)contentEntityList.stream().map(ArticleContentEntity::getContent).collect(Collectors.toList()); + List contentList = contentEntityList.stream().map(ArticleContentEntity::getContent).collect(Collectors.toList()); resultDTO.setContentList(contentList); } + + //标签列表 + LambdaQueryWrapper tWrapper2 = new LambdaQueryWrapper<>(); + tWrapper2.eq(ArticleTagsEntity::getArticleId, formDTO.getArticleId()); + tWrapper2.eq(ArticleTagsEntity::getDelFlag, NumConstant.ZERO_STR); + List tagsEntityList = articleTagsDao.selectList(tWrapper2); + if (!CollectionUtils.isEmpty(tagsEntityList)) { + List contentList = tagsEntityList.stream().map(ArticleTagsEntity::getTagId).collect(Collectors.toList()); + resultDTO.setTagIdList(contentList); + } } return resultDTO; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index 45d0e96cb2..e44014d13c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -28,13 +28,9 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DraftConstant; -import com.epmet.dao.DraftContentDao; -import com.epmet.dao.DraftCoverDao; -import com.epmet.dao.DraftDao; -import com.epmet.dao.DraftPublishRangeDao; +import com.epmet.dao.*; import com.epmet.dto.DraftDTO; import com.epmet.dto.form.DeleteDraftFormDTO; import com.epmet.dto.form.DraftDetailFormDTO; @@ -52,7 +48,10 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -68,11 +67,11 @@ public class DraftServiceImpl extends BaseServiceImpl imp @Autowired private DraftCoverDao draftCoverDao; @Autowired - private LoginUserUtil loginUserUtil; - @Autowired private DraftPublishRangeDao draftPublishRangeDao; @Autowired private DraftContentDao draftContentDao; + @Autowired + private TagCustomerDao tagCustomerDao; @Override public PageData page(Map params) { @@ -231,7 +230,7 @@ public class DraftServiceImpl extends BaseServiceImpl imp if (!CollectionUtils.isEmpty(list)) { list.forEach(l->{ l.setTagNameList(StringUtils.isNotBlank(l.getTags())?Arrays.asList(l.getTags().split("[|]")):new ArrayList<>()); - l.setIsMePublished(l.getCreatedBy().equals(loginUserUtil.getLoginUserId())?true:false); + l.setIsMePublished(l.getCreatedBy().equals(formDTO.getStaffId())?true:false); }); } @@ -246,6 +245,8 @@ public class DraftServiceImpl extends BaseServiceImpl imp if (!CollectionUtils.isEmpty(list)) { resultDTO = list.get(NumConstant.ZERO); + resultDTO.setTagNameList(StringUtils.isNotBlank(resultDTO.getTags())?Arrays.asList(resultDTO.getTags().split("[|]")):new ArrayList<>()); + resultDTO.setIsMePublished(resultDTO.getCreatedBy().equals(formDTO.getStaffId())?true:false); //查询文章涉及的发布范围网络Id列表 LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); tWrapper.eq(DraftPublishRangeEntity::getDraftId, formDTO.getDraftId()); @@ -268,10 +269,24 @@ public class DraftServiceImpl extends BaseServiceImpl imp tWrapper1.eq(DraftContentEntity::getDelFlag, NumConstant.ZERO_STR); tWrapper1.orderByDesc(DraftContentEntity::getOrderNum); List contentEntityList = draftContentDao.selectList(tWrapper1); - if (!CollectionUtils.isEmpty(entityList)) { - LinkedList contentList = (LinkedList)contentEntityList.stream().map(DraftContentEntity::getContent).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(contentEntityList)) { + List contentList = contentEntityList.stream().map(DraftContentEntity::getContent).collect(Collectors.toList()); resultDTO.setContentList(contentList); } + + //标签列表 + if(!CollectionUtils.isEmpty(resultDTO.getTagNameList())){ + LambdaQueryWrapper tWrapper2 = new LambdaQueryWrapper<>(); + tWrapper2.eq(TagCustomerEntity::getCustomerId, formDTO.getCustomerId()); + tWrapper2.in(TagCustomerEntity::getTagName, resultDTO.getTagNameList()); + tWrapper2.eq(TagCustomerEntity::getDelFlag, NumConstant.ZERO_STR); + List tagEntityList = tagCustomerDao.selectList(tWrapper2); + if (!CollectionUtils.isEmpty(tagEntityList)) { + List contentList = tagEntityList.stream().map(TagCustomerEntity::getId).collect(Collectors.toList()); + resultDTO.setTagIdList(contentList); + } + } + } return resultDTO; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 3ee0cf2193..b650f3094c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -469,14 +469,26 @@ - - - AND a.org_id_path like concat('%', #{publishRangeId}, '%') - - - AND a.publisher_id = #{publishRangeId} - - + + + + AND EXISTS( + SELECT 1 FROM article_publish_range + WHERE del_flag = '0' + AND article_id = a.id + AND agency_id = #{publishRangeId} + ) + + + AND EXISTS( + SELECT 1 FROM article_publish_range + WHERE del_flag = '0' + AND article_id = a.id + AND grid_id = #{publishRangeId} + ) + + + AND EXISTS( From 5458b690daca2f917d4fbd0b25eb00a5ac1bb473 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 13:43:07 +0800 Subject: [PATCH 050/122] emm --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 99d84ce00c..4d9549075d 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1518,7 +1518,6 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); article.setPublisherId(formDTO.getPublisher()); @@ -1534,7 +1533,6 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); draft.setPublisherId(formDTO.getPublisher()); @@ -1612,7 +1609,6 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Fri, 1 Jul 2022 13:47:32 +0800 Subject: [PATCH 051/122] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/WorkActController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 2a328dc800..459783d713 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -290,7 +290,7 @@ public class WorkActController { rePublishFormDTO.setRichTextFlag(false); } if (ActConstant.HEART.equals(rePublishFormDTO.getActType())) { - ValidatorUtils.validateEntity(rePublishFormDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class); + ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class); } else { ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class); } From c688bd16a63e5b6d91f1e50e4230767a79e12c23 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 13:56:59 +0800 Subject: [PATCH 052/122] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.10__alert_new_article_and_draft.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.10__alert_new_article_and_draft.sql diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.10__alert_new_article_and_draft.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.10__alert_new_article_and_draft.sql new file mode 100644 index 0000000000..00d77ca9fe --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.10__alert_new_article_and_draft.sql @@ -0,0 +1,6 @@ +ALTER TABLE `draft` ADD COLUMN `RICH_TEXT_FLAG` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1:富文本;0:不是' AFTER `DEPARTMENT_ID`; +ALTER TABLE `draft_content` MODIFY COLUMN `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text;文件:file;\r\n富文本:rich_text' AFTER `CONTENT`; +ALTER TABLE `article` ADD COLUMN `RICH_TEXT_FLAG` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1:富文本;0:不是' AFTER `DEPARTMENT_ID`; +ALTER TABLE `article_content` + MODIFY COLUMN `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容' AFTER `ARTICLE_ID`, + MODIFY COLUMN `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text;文件:file;视频:video;富文本:rich_text' AFTER `CONTENT`; From 39921761f60e68e13224c12c803d63e61699bd6e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 1 Jul 2022 14:35:07 +0800 Subject: [PATCH 053/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/HouseInformationServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java index 9738c9759d..47faf87ea9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -368,8 +368,8 @@ public class HouseInformationServiceImpl implements HouseInformationService { total = pageInfo.getTotal(); if (CollectionUtils.isNotEmpty(list)) { list.forEach(item -> { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); if (map.containsKey(item.getId())) { - item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); item.setPersonCount(map.get(item.getId())); } }); @@ -379,8 +379,8 @@ public class HouseInformationServiceImpl implements HouseInformationService { if (CollectionUtils.isNotEmpty(list)) { total = list.size(); list.forEach(item -> { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); if (map.containsKey(item.getId())) { - item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); item.setPersonCount(map.get(item.getId())); } }); From b3542382cce50b985614b0b683a149a17ebfb366 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 15:06:08 +0800 Subject: [PATCH 054/122] auditSwitch --- .../java/com/epmet/dto/result/work/ActPageResDTO.java | 8 ++++++++ .../src/main/resources/mapper/ActInfoDao.xml | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java index ce729c351b..406198fedf 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java @@ -1,9 +1,11 @@ package com.epmet.dto.result.work; +import com.epmet.dto.form.work.PublishActInfoFormDTO; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; @@ -94,5 +96,11 @@ public class ActPageResDTO implements Serializable { * 活动积分 */ private Integer reward; + + /** + * 报名审核: true: 需人工审核 false: 无需审核 + */ + @NotNull(message = "报名审核方式不能为空", groups = {PublishActInfoFormDTO.AddUserInternalGroup.class}) + private Boolean auditSwitch; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index a9e6e093a9..3a1358cea8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -836,7 +836,8 @@ AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) ) AS signedUp, ai.SUMMARY_FLAG as summaryFlag, - ai.REWARD as reward + ai.REWARD as reward, + ai.AUDIT_SWITCH as auditSwitch FROM act_info ai WHERE From 3359f9c8b2f46f5770c9e299bd2895550abfe0d4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Jul 2022 15:43:36 +0800 Subject: [PATCH 055/122] xiangqing --- .../src/main/java/com/epmet/service/impl/WorkActServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 59cbd317aa..4816d705e8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -1701,6 +1701,7 @@ public class WorkActServiceImpl implements WorkActService { public ActDetailResultDTO queryActDetail(String actId, String userId) { ActInfoEntity actInfoEntity=actInfoDao.selectById(actId); ActDetailResultDTO resultDTO=ConvertUtils.sourceToTarget(actInfoEntity,ActDetailResultDTO.class); + resultDTO.setActId(actId); //查询活动详情 List list = actContentDao.selectByActId(actId); resultDTO.setActContent(list); From 81f350f103456e1e6ec22a274db0f02dde90f52e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Jul 2022 16:42:31 +0800 Subject: [PATCH 056/122] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/DraftPcListResultDTO.java | 24 +++++++++++++++++-- .../dto/result/PublishedListResultDTO.java | 24 +++++++++++++++++-- .../service/impl/ArticleServiceImpl.java | 9 +++---- .../epmet/service/impl/DraftServiceImpl.java | 2 +- .../src/main/resources/mapper/ArticleDao.xml | 2 +- .../src/main/resources/mapper/DraftDao.xml | 2 +- 6 files changed, 50 insertions(+), 13 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java index 8ab389eb8f..273f8fe9ba 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -34,7 +34,7 @@ public class DraftPcListResultDTO implements Serializable { /** * 发布单位ID */ - private String publisherId; + private String publisher; /** * 发布单位 */ @@ -95,6 +95,26 @@ public class DraftPcListResultDTO implements Serializable { /** * 文章内容 */ - private List contentList; + private List contentList; + + @Data + public static class Content { + /** + * 内容 + */ + private String content; + /** + * 内容类型 图片:img;文字:text;文件:file;视频:video;富文本:rich_text + */ + private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** + * 内容顺序 从1开始 + */ + private Integer orderNum; + } } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java index fd0ece2918..55317885a1 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java @@ -36,7 +36,7 @@ public class PublishedListResultDTO implements Serializable { /** * 发布单位ID */ - private String publisherId; + private String publisher; /** * 发布单位 */ @@ -97,5 +97,25 @@ public class PublishedListResultDTO implements Serializable { /** * 文章内容 */ - private List contentList; + private List contentList; + + @Data + public static class Content { + /** + * 内容 + */ + private String content; + /** + * 内容类型 图片:img;文字:text;文件:file;视频:video;富文本:rich_text + */ + private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** + * 内容顺序 从1开始 + */ + private Integer orderNum; + } } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 4d9549075d..828982ac8b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -48,10 +48,7 @@ import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.*; import com.epmet.dao.*; -import com.epmet.dto.ArticleVisitRecordDTO; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.DraftCoverDTO; -import com.epmet.dto.DraftDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.*; @@ -1735,8 +1732,8 @@ public class ArticleServiceImpl extends BaseServiceImpl contentEntityList = articleContentDao.selectList(tWrapper1); - if (!CollectionUtils.isEmpty(entityList)) { - List contentList = contentEntityList.stream().map(ArticleContentEntity::getContent).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(contentEntityList)) { + List contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class); resultDTO.setContentList(contentList); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index e44014d13c..5d786be693 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -270,7 +270,7 @@ public class DraftServiceImpl extends BaseServiceImpl imp tWrapper1.orderByDesc(DraftContentEntity::getOrderNum); List contentEntityList = draftContentDao.selectList(tWrapper1); if (!CollectionUtils.isEmpty(contentEntityList)) { - List contentList = contentEntityList.stream().map(DraftContentEntity::getContent).collect(Collectors.toList()); + List contentList = ConvertUtils.sourceToTarget(contentEntityList, DraftPcListResultDTO.Content.class); resultDTO.setContentList(contentList); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index b650f3094c..4c471430a3 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -432,7 +432,7 @@ a.title AS "title", IFNULL(a.preview_content, "") AS "previewContent", a.publish_range_desc AS "publishRangeDesc", - a.publisher_id AS "publisherId", + a.publisher_id AS "publisher", a.publisher_name AS "publisherName", a.publisher_type AS "publisherType", a.publish_date AS "publishDate", diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index 1c2e4d36b2..8c94443ac1 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -184,7 +184,7 @@ a.title AS "title", IFNULL(a.preview_content, "") AS "previewContent", a.publish_range_desc AS "publishRangeDesc", - a.publisher_id AS "publisherId", + a.publisher_id AS "publisher", a.publisher_name AS "publisherName", a.publisher_type AS "publisherType", a.publish_date AS "publishDate", From 8c52b40e1a9aeb279a8e8bb8eb5ad4397fde83b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 17:10:45 +0800 Subject: [PATCH 057/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../epmet/dto/form/AddOrSaveDraftFormDTO.java | 20 +++++++++-------- .../epmet/controller/ArticleController.java | 12 +++++++++- .../service/impl/ArticleServiceImpl.java | 22 ++++++++++--------- 4 files changed, 35 insertions(+), 20 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 425417c7d5..4995291154 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -160,6 +160,7 @@ public enum EpmetErrorCode { ERROR_DATE(8533, "不合理日期"), CHECK_PHONE_ERROR(8534, "号码不合法"), + TITLE_AND_CONTENT_ERROR(8535, "标题和内容不能同时为空"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java index 9f6eee7f79..f2372a5ab7 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -17,15 +18,16 @@ import java.util.List; @Data public class AddOrSaveDraftFormDTO implements Serializable { - public interface AddOrSaveDraftForm{} + public interface AddArticleForm{} + public interface AddDraftForm{} /** * 类型 发布文章:article;存草稿:draft */ - @NotBlank(message = "类型不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "类型不能为空",groups = AddArticleForm.class) private String type; - @NotBlank(message = "标题不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "标题不能为空",groups = {AddArticleForm.class}) @Length(max = 50, message = "标题最长为50个字") private String title; @@ -44,27 +46,27 @@ public class AddOrSaveDraftFormDTO implements Serializable { */ private List tagNameList; - @NotBlank(message = "发布单位不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "发布单位不能为空",groups = AddArticleForm.class) private String publisher; - @NotBlank(message = "发布单位名称不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "发布单位名称不能为空",groups = AddArticleForm.class) private String publisherName; /** * 发布单位类型 机关:agency;部门:department;网格:grid */ - @NotBlank(message = "发布单位类型不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "发布单位类型不能为空",groups = AddArticleForm.class) private String publisherType; - @NotBlank(message = "发布时间不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "发布时间不能为空",groups = AddArticleForm.class) private String publishDate; - @NotBlank(message = "文章内容不能为空",groups = AddOrSaveDraftForm.class) + @NotBlank(message = "文章内容不能为空",groups = {AddArticleForm.class}) private String content; /** * 是否置顶 1是;0否; */ - private Integer isTop; + private Integer isTop = NumConstant.ZERO; private String userId; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 2b757b7320..4430d1a3c3 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -21,12 +21,15 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.enums.RequirePermissionEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.constant.ArticleConstant; import com.epmet.constant.DraftConstant; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -34,6 +37,7 @@ import com.epmet.service.ArticleOperateRecordService; import com.epmet.service.ArticleService; import com.epmet.service.DraftService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.web.bind.annotation.PostMapping; @@ -440,7 +444,13 @@ public class ArticleController { */ @PostMapping("addOrSaveDraft") public Result addOrSaveDraft(@LoginUser TokenDto tokenDto,@RequestBody AddOrSaveDraftFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, AddOrSaveDraftFormDTO.AddOrSaveDraftForm.class); + if (formDTO.getType().equals(ArticleConstant.SAVE_TYPE_ARTICLE)){ + ValidatorUtils.validateEntity(formDTO, AddOrSaveDraftFormDTO.AddArticleForm.class); + }else { + if (StringUtils.isBlank(formDTO.getTitle()) && StringUtils.isBlank(formDTO.getContent())){ + throw new EpmetException(EpmetErrorCode.TITLE_AND_CONTENT_ERROR.getCode()); + } + } formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); articleService.addOrSaveDraft(formDTO); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 828982ac8b..dd596af0fe 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1587,10 +1587,10 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); + draft.setPreviewContent(StringUtils.isBlank(formDTO.getContent()) ? "" : getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); - draft.setPublisherId(formDTO.getPublisher()); - draft.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); + draft.setPublisherId(StringUtils.isBlank(formDTO.getPublisher()) ? "" : formDTO.getPublisher()); + draft.setPublishDate(StringUtils.isBlank(formDTO.getPublishDate()) ? null : DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); draft.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); draft.setOrgId(staffInfo.getAgencyId()); draft.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); @@ -1601,13 +1601,15 @@ public class ArticleServiceImpl extends BaseServiceImpl rangeList = new ArrayList<>(); From 7ec94d823beb0e122cfa0b35849237cdd207fe27 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Jul 2022 17:37:44 +0800 Subject: [PATCH 058/122] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/DraftPcListResultDTO.java | 4 ++++ .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java index 273f8fe9ba..97b776e960 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -47,6 +47,10 @@ public class DraftPcListResultDTO implements Serializable { * 发布时间 */ private String publishDate; + /** + * 创建时间 + */ + private String createdTime; /** * 文章标签串 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index 8c94443ac1..f55a8f5430 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -194,6 +194,7 @@ a.created_by AS "createdBy", a.is_top AS "isTop", IF (a.is_top = '0', '否', '是') "isTopName", + a.created_time AS "createdTime", ac.img_url AS "imgUrl" FROM draft a @@ -213,10 +214,10 @@ AND a.title like concat('%', #{title}, '%') - AND a.publish_date >= #{startDate} + AND a.created_time >= #{startDate} - + ORDER BY a.publish_date DESC, a.updated_time DESC From 844e5d9dc63f75df45febd146b50e8c99a32fedb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 1 Jul 2022 17:38:07 +0800 Subject: [PATCH 059/122] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B1=89=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java | 2 +- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java index f2372a5ab7..568943b537 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/AddOrSaveDraftFormDTO.java @@ -39,7 +39,7 @@ public class AddOrSaveDraftFormDTO implements Serializable { /** * 发布范围Names */ - private List publishRangeDesc; + private String publishRangeDesc; /** * 文章标签 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index dd596af0fe..bf06c682c9 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1518,7 +1518,6 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); article.setPublisherId(formDTO.getPublisher()); - article.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); article.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); article.setOrgId(staffInfo.getAgencyId()); article.setOrgIdPath(StringUtils.isBlank(agencyInfo.getPids()) || agencyInfo.getPids().equals(NumConstant.ZERO_STR) ? agencyInfo.getId() : agencyInfo.getPids().concat(":").concat(agencyInfo.getId())); @@ -1588,7 +1587,6 @@ public class ArticleServiceImpl extends BaseServiceImpl DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); - draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); draft.setPublisherId(StringUtils.isBlank(formDTO.getPublisher()) ? "" : formDTO.getPublisher()); draft.setPublishDate(StringUtils.isBlank(formDTO.getPublishDate()) ? null : DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); draft.setTags(CollectionUtils.isEmpty(formDTO.getTagNameList()) ? "" : formDTO.getTagNameList().stream().collect(Collectors.joining("|"))); From 2a6db9fe837eb936241563bdf2c5f2fc57f88544 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 4 Jul 2022 09:05:50 +0800 Subject: [PATCH 060/122] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index f55a8f5430..aa7c50a285 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -194,7 +194,7 @@ a.created_by AS "createdBy", a.is_top AS "isTop", IF (a.is_top = '0', '否', '是') "isTopName", - a.created_time AS "createdTime", + date_format(a.created_time, '%Y-%m-%d') AS "createdTime", ac.img_url AS "imgUrl" FROM draft a @@ -214,10 +214,10 @@ AND a.title like concat('%', #{title}, '%') - AND a.created_time >= #{startDate} + AND date_format(a.created_time, '%Y-%m-%d') >= #{startDate} - + ORDER BY a.publish_date DESC, a.updated_time DESC From 724c53763e7e9547d4d0c5f89f8e842bfe5e7abd Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 4 Jul 2022 14:06:59 +0800 Subject: [PATCH 061/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcNeighborHoodDao.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 33600cf2e6..cf599c8986 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -566,6 +566,9 @@ differHouseCount desc, convert(name using gbk) + + convert(name using gbk) + @@ -635,7 +638,7 @@ DOOR_NAME AS "name", RENT_FLAG AS houseType, HOUSE_CODE, - 0 AS houseCount + 0 AS personCount FROM ic_house WHERE From 839d2cc035e06941dac758f433a10d103c81c718 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 4 Jul 2022 14:11:29 +0800 Subject: [PATCH 062/122] =?UTF-8?q?PC=E7=AB=AF=E4=B8=8B=E7=BA=BF=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E9=99=90=E5=88=B6=E8=87=AA=E5=B7=B1=E4=B8=8B=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/ArticleController.java | 2 +- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 4430d1a3c3..e08c8dca5f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -182,7 +182,7 @@ public class ArticleController { * @Description 党建声音-政府端-下线文章 **/ @PostMapping("offlinearticle") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE) + //@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE) public Result offLineArticle(@LoginUser TokenDto tokenDTO, @RequestBody OffLineArticleFormDTO formDTO) { formDTO.setStaffId(tokenDTO.getUserId()); ValidatorUtils.validateEntity(formDTO, OffLineArticleFormDTO.AddUserInternalGroup.class); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index bf06c682c9..b040850216 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -499,9 +499,11 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 4 Jul 2022 14:16:54 +0800 Subject: [PATCH 063/122] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/DraftPcListResultDTO.java | 4 ++++ .../java/com/epmet/dto/result/PublishedListResultDTO.java | 8 ++++++++ .../src/main/resources/mapper/ArticleDao.xml | 2 ++ .../src/main/resources/mapper/DraftDao.xml | 1 + 4 files changed, 15 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java index 97b776e960..2f14da3dc6 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftPcListResultDTO.java @@ -19,6 +19,10 @@ public class DraftPcListResultDTO implements Serializable { * 文章草稿ID */ private String draftId; + /** + * 组织Id + */ + private String agencyId; /** * 文章标题 */ diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java index 55317885a1..e73acb6294 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/PublishedListResultDTO.java @@ -21,6 +21,10 @@ public class PublishedListResultDTO implements Serializable { * 文章ID */ private String articleId; + /** + * 组织Id + */ + private String agencyId; /** * 文章标题 */ @@ -70,6 +74,10 @@ public class PublishedListResultDTO implements Serializable { * 上下线状态,上线:published,下线:offline */ private String statusFlag; + /** + * 上下线状态,已发布:published,已下线:offline + */ + private String statusFlagName; /** * 是不是我发布 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 4c471430a3..875773b8c9 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -429,6 +429,7 @@ SELECT a.id AS "draftId", + a.org_id AS "agencyId", a.title AS "title", IFNULL(a.preview_content, "") AS "previewContent", a.publish_range_desc AS "publishRangeDesc", From 6ddce711cc21e64c6b4f41fc192271d19a5c1738 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 4 Jul 2022 14:15:38 +0800 Subject: [PATCH 064/122] =?UTF-8?q?pids=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/ArticleServiceImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index b040850216..caba5c8346 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1557,6 +1557,11 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 4 Jul 2022 14:30:11 +0800 Subject: [PATCH 065/122] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcNeighborHoodDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index cf599c8986..ba47187e06 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -607,7 +607,7 @@ LEFT JOIN ( SELECT BUILDING_UNIT_ID, COUNT( ID ) AS houseCount FROM ic_house WHERE DEL_FLAG = '0' AND BUILDING_ID = #{buildingId} - GROUP BY BUILDING_ID ) b ON a.ID = b.BUILDING_UNIT_ID + GROUP BY BUILDING_UNIT_ID ) b ON a.ID = b.BUILDING_UNIT_ID WHERE a.DEL_FLAG = '0' AND a.BUILDING_ID = #{buildingId} From f6ca02ad4638d69ce99732a1e1d4cc8d2eb88721 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 4 Jul 2022 16:09:05 +0800 Subject: [PATCH 066/122] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/EditInfoFormDTO.java | 2 ++ .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java index e8eb4249fa..7917113509 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java @@ -37,11 +37,13 @@ public class EditInfoFormDTO implements Serializable { * 姓 */ @NotBlank(message = "姓不能为空",groups = AddUserShowGroup.class) + @Length(max = 10,groups =AddUserShowGroup.class ,message = "姓不能超过10个字") private String surname; /** * 名 */ @NotBlank(message = "名不能为空",groups = AddUserShowGroup.class) + @Length(max = 10,groups =AddUserShowGroup.class ,message = "名不能超过10个字") private String name; //@NotBlank(message = "身份证号不能为空") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 5970d78788..6785817934 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -378,6 +378,8 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl Date: Mon, 4 Jul 2022 16:12:26 +0800 Subject: [PATCH 067/122] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95con?= =?UTF-8?q?tent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index caba5c8346..fd73c9790f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1539,7 +1539,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Mon, 4 Jul 2022 16:21:47 +0800 Subject: [PATCH 068/122] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserResiInfoServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index a0012e8a45..44cd7c12a3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -49,6 +49,7 @@ import com.epmet.entity.UserResiRegisterVisitEntity; import com.epmet.entity.UserWechatEntity; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovIssueOpenFeignClient; +import com.epmet.redis.UserBaseInfoRedis; import com.epmet.redis.UserResiInfoRedis; import com.epmet.resi.group.dto.topic.form.SharableTopicAndInviteeFormDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; @@ -96,7 +97,8 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -420,6 +422,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl Date: Mon, 4 Jul 2022 16:45:40 +0800 Subject: [PATCH 069/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8F=AA=E6=9F=A5=E8=AF=A2=E8=87=AA=E5=B7=B1=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index de27f83e83..cd53bab639 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -208,6 +208,9 @@ AND a.customer_id = #{customerId} + + AND a.created_by = #{staffId} + AND a.org_id_path like concat('%',#{agencyId},'%') From 956be272e80e5f9f17561e7d5948a3fb1a857283 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 4 Jul 2022 17:06:24 +0800 Subject: [PATCH 070/122] =?UTF-8?q?=E4=B8=BB=E5=8A=9E=E6=96=B9=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E7=94=B5=E8=AF=9D=EF=BC=8C50=E5=AD=97=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E9=99=90=E5=88=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.23__acttel.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql new file mode 100644 index 0000000000..655a03272a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql @@ -0,0 +1,4 @@ +alter table act_info MODIFY COLUMN + `SPONSOR_TEL` varchar(64) NOT NULL COMMENT '联系电话' AFTER SPONSOR_CONTACTS; + +alter table latest_act_info MODIFY COLUMN `SPONSOR_TEL` varchar(64)COMMENT '联系电话' AFTER SPONSOR_CONTACTS; \ No newline at end of file From 3d4dfe3c4a2d1f0a61f30781932cbc63bd6b36b4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 5 Jul 2022 09:53:24 +0800 Subject: [PATCH 071/122] =?UTF-8?q?=E8=8D=89=E7=A8=BFID=E5=8F=AF=E4=B8=BAn?= =?UTF-8?q?ull=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.11__alert_article_draft_id.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.11__alert_article_draft_id.sql diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.11__alert_article_draft_id.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.11__alert_article_draft_id.sql new file mode 100644 index 0000000000..073cc6362f --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.11__alert_article_draft_id.sql @@ -0,0 +1 @@ +ALTER TABLE `article` MODIFY COLUMN `DRAFT_ID` varchar(64) NULL COMMENT '草稿ID'; \ No newline at end of file From e214b1f88b989c386dcf70bb626b827fc6907bf5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 5 Jul 2022 09:57:41 +0800 Subject: [PATCH 072/122] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=BA=E7=A9=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index fd73c9790f..84ba6c3cf7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1413,10 +1413,11 @@ public class ArticleServiceImpl extends BaseServiceImpl articleTags = new ArrayList<>(); - List tagsInfo = formDto.getTagsInfo(); - if (CollectionUtils.isEmpty(tagsInfo)){ + + if (CollectionUtils.isEmpty(formDto.getTagsInfo())){ return; } + List tagsInfo = formDto.getTagsInfo(); tagsInfo.forEach(resultDTO -> { ArticleTagsEntity e = ConvertUtils.sourceToTarget(resultDTO, ArticleTagsEntity.class); e.setCustomerId(customerId); From 749453627449ef2e8031cecb868d938f50202af6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 5 Jul 2022 10:00:15 +0800 Subject: [PATCH 073/122] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=BA=E7=A9=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 84ba6c3cf7..65af6e724a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1570,7 +1570,7 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagCacheDTOS = updateGridTagV2(updateCustomerTagCacheDTO, customerId, formDTO.getGridIdList(), formDTO.getUserId()); From e956c2b70869f72064415ae4c9db2ffd94b34a3b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 5 Jul 2022 10:11:00 +0800 Subject: [PATCH 074/122] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=BA=E7=A9=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ArticleServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 65af6e724a..257a43e8c8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1414,7 +1414,7 @@ public class ArticleServiceImpl extends BaseServiceImpl articleTags = new ArrayList<>(); - if (CollectionUtils.isEmpty(formDto.getTagsInfo())){ + if (null == formDto || CollectionUtils.isEmpty(formDto.getTagsInfo())){ return; } List tagsInfo = formDto.getTagsInfo(); @@ -1571,7 +1571,9 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagCacheDTOS = updateGridTagV2(updateCustomerTagCacheDTO, customerId, formDTO.getGridIdList(), formDTO.getUserId()); // 7.文章封面 From e25e93746b97f2b53d17f5dab9e098ac63bdd551 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 5 Jul 2022 10:20:50 +0800 Subject: [PATCH 075/122] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=BA=E7=A9=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 257a43e8c8..2c2ea58bfc 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1304,6 +1304,9 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsInfo = formDto.getTagsInfo(); String customerId = formDto.getCustomerId(); //更新缓存标签使用数量 @@ -1343,7 +1346,7 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagV2(UpdateCustomerTagCacheDTO formDto,String customerId,List gridIds,String userId){ - if (CollectionUtils.isEmpty(gridIds)){ + if ( null == formDto || CollectionUtils.isEmpty(formDto.getTagsInfo()) || CollectionUtils.isEmpty(gridIds)){ return new ArrayList<>(); } List tagsInfo = formDto.getTagsInfo(); From 34e3f8c1a46efb8780d5da4dfe3a02cd0ff7a37c Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 5 Jul 2022 14:54:30 +0800 Subject: [PATCH 076/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E6=96=B0=E5=A2=9E=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=88=A9=E7=94=A8=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HouseInformationController.java | 6 +- .../IcOrganizationCodeInfoService.java | 8 +-- .../service/impl/BuildingServiceImpl.java | 36 +++++++++++- .../epmet/service/impl/HouseServiceImpl.java | 33 +++++++++++ .../IcOrganizationCodeInfoServiceImpl.java | 58 ++++++++++++------- .../service/impl/NeighborHoodServiceImpl.java | 43 +++++++++++++- 6 files changed, 154 insertions(+), 30 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 314940ecf8..21ca6fb933 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -262,7 +262,7 @@ public class HouseInformationController { */ @PostMapping("getNeighborHoodCoding/{gridId}") public Result getNeighborHoodCoding(@LoginUser TokenDto tokenDTO, @PathVariable("gridId") String gridId) { - return icOrganizationCodeInfoService.getNeighborHoodCoding(tokenDTO.getCustomerId(),gridId); + return icOrganizationCodeInfoService.getNeighborHoodCoding(tokenDTO.getCustomerId(),gridId,false); } /** @@ -274,7 +274,7 @@ public class HouseInformationController { */ @PostMapping("getBuildingCoding/{neighborhoodId}") public Result getBuildingCoding(@LoginUser TokenDto tokenDTO, @PathVariable("neighborhoodId") String neighborhoodId) { - return icOrganizationCodeInfoService.getBuildingCoding(tokenDTO.getCustomerId(),neighborhoodId); + return icOrganizationCodeInfoService.getBuildingCoding(tokenDTO.getCustomerId(),neighborhoodId,false); } /** @@ -286,6 +286,6 @@ public class HouseInformationController { */ @PostMapping("getHouseCoding/{unitId}") public Result getHouseCoding(@LoginUser TokenDto tokenDTO, @PathVariable("unitId") String unitId) { - return icOrganizationCodeInfoService.getHouseCoding(tokenDTO.getCustomerId(),unitId); + return icOrganizationCodeInfoService.getHouseCoding(tokenDTO.getCustomerId(),unitId,false); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java index c0e3bb5545..58791b1b44 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java @@ -85,7 +85,7 @@ public interface IcOrganizationCodeInfoService extends BaseService */ - Result getNeighborHoodCoding(String customerId, String gridId); + Result getNeighborHoodCoding(String customerId, String gridId,Boolean updateFlag); /** * @describe: 【双实录入】获取楼栋编码 @@ -94,7 +94,7 @@ public interface IcOrganizationCodeInfoService extends BaseService */ - Result getBuildingCoding(String customerId, String neighborhoodId); + Result getBuildingCoding(String customerId, String neighborhoodId,Boolean updateFlag); /** * @describe: 【双实录入】获取单元编码 @@ -103,7 +103,7 @@ public interface IcOrganizationCodeInfoService extends BaseService */ - Result getUnitCoding(String customerId, String buildingId); + Result getUnitCoding(String customerId, String buildingId,Boolean updateFlag); /** * @describe: 【双实录入】获取房屋编码 @@ -112,5 +112,5 @@ public interface IcOrganizationCodeInfoService extends BaseService */ - Result getHouseCoding(String customerId, String unitId); + Result getHouseCoding(String customerId, String unitId,Boolean updateFlag); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index cdcb22272a..981e1f10b4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -90,6 +90,10 @@ public class BuildingServiceImpl implements BuildingService { private ExecutorService executorService; @Autowired private IcOrganizationCodeInfoService icOrganizationCodeInfoService; + @Autowired + private IcOrganizationCodeInfoDao icOrganizationCodeInfoDao; + @Autowired + private IcOrganizationCodeInfoServiceImpl icOrganizationCodeInfoServiceImpl; @Override @@ -106,6 +110,7 @@ public class BuildingServiceImpl implements BuildingService { if(null != isHaveCoding){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!"); } + updateBuildingMaxNum(customerId,formDTO); } IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); icBuildingDTO.setCustomerId(customerId); @@ -121,7 +126,7 @@ public class BuildingServiceImpl implements BuildingService { icBuildingUnit.setBuildingId(entity.getId()); icBuildingUnit.setUnitName((i + 1) + "单元"); icBuildingUnit.setUnitNum(String.valueOf(i + 1)); - Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,entity.getId()); + Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,entity.getId(),true); if(!codeResult.success() || null == codeResult.getData()){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员"); } @@ -133,6 +138,32 @@ public class BuildingServiceImpl implements BuildingService { } + /** + * @describe: 如果编码未改动提交,则最大数+1 + * @author wangtong + * @date 2022/7/5 10:43 + * @params [formDTO] + * @return void + */ + private void updateBuildingMaxNum(String customerId,IcBulidingAddFormDTO formDTO){ + //获取楼栋id、行政编码 + OrganizationCommunityDTO communResult = icNeighborHoodDao.selectCommunityByNeiId(formDTO.getNeighborHoodId()); + //如果是自增的,则最大数+1 + IcOrganizationCodeInfoEntity communEntity = icOrganizationCodeInfoDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + Integer buildMaxNum = org.apache.commons.lang3.StringUtils.isBlank(communEntity.getBuildingMaxNum())?1:Integer.valueOf(communEntity.getBuildingMaxNum()) + 1; + Integer submitMaxNum = null; + try { + submitMaxNum = Integer.valueOf(formDTO.getCoding().substring(formDTO.getCoding().length()-3)); + }catch (Exception e){ + e.printStackTrace(); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "编码转换失败", "编码转换失败"); + } + if(buildMaxNum.intValue() == submitMaxNum.intValue()){ + communEntity.setBuildingMaxNum(icOrganizationCodeInfoServiceImpl.getNewMaxIndex(3, buildMaxNum)); + icOrganizationCodeInfoDao.updateBuildingByCuIdAndCoId(communEntity); + } + } + @Override public List treeList(String customerId, String staffId) { CustomerStaffInfoCacheResult agency = CustomerStaffRedis.getStaffInfo(customerId, staffId); @@ -460,6 +491,7 @@ public class BuildingServiceImpl implements BuildingService { if(null != isHaveCoding){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!"); } + updateBuildingMaxNum(customerId,formDTO); } IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); icBuildingDTO.setId(formDTO.getBuildingId()); @@ -502,7 +534,7 @@ public class BuildingServiceImpl implements BuildingService { icBuildingUnit.setCustomerId(customerId); icBuildingUnit.setUnitName(unitNum + "单元"); icBuildingUnit.setUnitNum(unitNum); - Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,icBuilding.getId()); + Result codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,icBuilding.getId(),true); if(!codeResult.success() || null == codeResult.getData()){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员"); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 127eef5f0e..78dd6ce923 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -127,6 +127,12 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { private OssFeignClient ossFeignClient; @Autowired private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired + private IcOrganizationCodeInfoDao icOrganizationCodeInfoDao; + @Autowired + private IcOrganizationCodeInfoServiceImpl icOrganizationCodeInfoServiceImpl; + @Autowired + private IcBuildingUnitDao icBuildingUnitDao; @Override @@ -143,6 +149,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if(null != isHaveCoding){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该房屋编码已存在,请勿重复!","该房屋编码已存在,请勿重复!"); } + updateHouseMaxNum(customerId,formDTO); } IcHouseEntity icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); icHouseDTO.setCustomerId(customerId); @@ -164,6 +171,32 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { icHouseDao.updateById(entity); } + /** + * @describe: 如果编码未改动提交,则最大数+1 + * @author wangtong + * @date 2022/7/5 10:53 + * @params [customerId, formDTO] + * @return void + */ + private void updateHouseMaxNum(String customerId, IcHouseAddFormDTO formDTO){ + //获取社区id、单元编码 + OrganizationCommunityDTO communResult = icBuildingUnitDao.selectCommunityByUnitId(formDTO.getBuildingUnitId()); + //如果是自增的,则最大数+1 + IcOrganizationCodeInfoEntity communEntity = icOrganizationCodeInfoDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); + Integer houseMaxNum = org.apache.commons.lang3.StringUtils.isBlank(communEntity.getHouseMaxNum())?1:Integer.valueOf(communEntity.getHouseMaxNum()) + 1; + Integer submitMaxNum = null; + try { + submitMaxNum = Integer.valueOf(formDTO.getCoding().substring(formDTO.getCoding().length()-4)); + }catch (Exception e){ + e.printStackTrace(); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "编码转换失败", "编码转换失败"); + } + if(houseMaxNum.intValue() == submitMaxNum.intValue()){ + communEntity.setHouseMaxNum(icOrganizationCodeInfoServiceImpl.getNewMaxIndex(4, houseMaxNum)); + icOrganizationCodeInfoDao.updateHouseByCuIdAndCoId(communEntity); + } + } + private String getHouseName(IcHouseAddFormDTO formDTO) { //设置房间名 楼栋-单元号-门牌号 IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java index 992cf837c4..803a73cde8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java @@ -108,7 +108,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl getNeighborHoodCoding(String customerId, String gridId) { + public Result getNeighborHoodCoding(String customerId, String gridId,Boolean updateFlag) { if (StringUtils.isBlank(customerId) || StringUtils.isBlank(gridId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); } @@ -137,7 +137,9 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl getBuildingCoding(String customerId, String neighborhoodId) { + public Result getBuildingCoding(String customerId, String neighborhoodId,Boolean updateFlag) { if (StringUtils.isBlank(customerId) || StringUtils.isBlank(neighborhoodId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); } @@ -175,7 +181,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl().ok(result); } @Override @Transactional(rollbackFor = Exception.class) - public Result getUnitCoding(String customerId, String buildingId) { + public Result getUnitCoding(String customerId, String buildingId,Boolean updateFlag) { if (StringUtils.isBlank(customerId) || StringUtils.isBlank(buildingId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); } @@ -226,7 +239,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl().ok(result); @@ -263,7 +278,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl getHouseCoding(String customerId, String unitId) { + public Result getHouseCoding(String customerId, String unitId,Boolean updateFlag) { if (StringUtils.isBlank(customerId) || StringUtils.isBlank(unitId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); } @@ -277,7 +292,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl().ok(result); } @@ -317,7 +335,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl Date: Tue, 5 Jul 2022 14:55:30 +0800 Subject: [PATCH 077/122] =?UTF-8?q?pc=E7=88=B1=E5=BF=83=E4=BA=92=E5=8A=A9?= =?UTF-8?q?=E4=B8=8D=E8=B5=B0=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/WorkActController.java | 14 ++++++++++++-- .../com/epmet/service/impl/WorkActServiceImpl.java | 13 ++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 459783d713..86195a32cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -63,7 +63,12 @@ public class WorkActController { * @Date 2020/7/21 18:32 **/ @PostMapping("publish") - public Result publishAct(@RequestBody PublishActInfoFormDTO formDTO) { + public Result publishAct(@LoginUser TokenDto tokenDto,@RequestBody PublishActInfoFormDTO formDTO) { + if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) { + formDTO.setRichTextFlag(true); + } else { + formDTO.setRichTextFlag(false); + } ValidatorUtils.validateEntity(formDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class); for (PublishActContentFormDTO actContentFormDTO : formDTO.getActContent()) { ValidatorUtils.validateEntity(actContentFormDTO, @@ -271,7 +276,12 @@ public class WorkActController { * @Date 2020/7/27 13:55 **/ @PostMapping("republish") - public Result rePublish(@RequestBody RePublishFormDTO rePublishFormDTO) { + public Result rePublish(@LoginUser TokenDto tokenDto,@RequestBody RePublishFormDTO rePublishFormDTO) { + if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) { + rePublishFormDTO.setRichTextFlag(true); + } else { + rePublishFormDTO.setRichTextFlag(false); + } ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class); for (PublishActContentFormDTO actContentFormDTO : rePublishFormDTO.getActContent()) { ValidatorUtils.validateEntity(actContentFormDTO, diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 4816d705e8..37b56f1443 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -310,6 +310,10 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/21 19:20 **/ private void auditAct(PublishActInfoFormDTO formDTO) { + if(formDTO.getRichTextFlag()){ + // true:富文本;false: 原来小程序那种发布内容 + return; + } //1、活动标题 if (StringUtils.isNotBlank(formDTO.getTitle())) { this.auditActTitle(formDTO.getTitle()); @@ -347,6 +351,9 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/27 14:01 **/ private void auditRePublishAct(RePublishFormDTO formDTO) { + if(formDTO.getRichTextFlag()){ + return; + } //1、活动标题 if (StringUtils.isNotBlank(formDTO.getTitle())) { this.auditActTitle(formDTO.getTitle()); @@ -1352,7 +1359,11 @@ public class WorkActServiceImpl implements WorkActService { imgList.add(actContent.getContent()); } } - this.auditActContent(textList,imgList); + // + if(!actInfoDTO.getRichTextFlag()){ + //不是富文本的走审核 + this.auditActContent(textList,imgList); + } //插入act_summary记录 int orderNum=1; for(PublishActContentFormDTO actContentFormDTO:formDTO.getActSummary()){ From b700563fde0ad1a19696d82be03fa8f94340728f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 5 Jul 2022 15:07:12 +0800 Subject: [PATCH 078/122] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/PublishGridListFormDTO.java | 4 ++++ .../java/com/epmet/controller/ArticleController.java | 1 + .../java/com/epmet/service/impl/ArticleServiceImpl.java | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java index a9ad61ecc6..3b35533d99 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java @@ -25,4 +25,8 @@ public class PublishGridListFormDTO implements Serializable { * token中人员Id */ private String staffId; + /** + * token中客户ID + */ + private String customerId; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index e08c8dca5f..56b92b7d5c 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -351,6 +351,7 @@ public class ArticleController { **/ @PostMapping("publishgridlist") public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class); ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 2c2ea58bfc..0661ece50b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -736,12 +736,17 @@ public class ArticleServiceImpl extends BaseServiceImpl resultDTOResult = epmetUserOpenFeignClient.getLoginUserDetails(loginUserDetailsFormDTO); - String agencyId = resultDTOResult.getData().getOrgIdPath().substring(resultDTOResult.getData().getOrgIdPath().lastIndexOf(":") + NumConstant.ONE); + String agencyId = resultDTOResult.getData().getOrgIdPath().substring(resultDTOResult.getData().getOrgIdPath().lastIndexOf(":") + NumConstant.ONE);*/ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException("获取工作人员信息失败"); + } + String agencyId = staffInfo.getAgencyId(); //存放树的每一个节点对象,用于将同一节点下的网格列表合并(主键:agencyId 值:节点对象) Map map = new HashMap<>(); //3:循环可下线网格列表,根据pids组织每一个树节点对象信息 From 8b94ad94c590b8809b0216497836680dccf8708e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 5 Jul 2022 15:16:05 +0800 Subject: [PATCH 079/122] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/ChangeRelocationDTO.java | 2 + .../com/epmet/dto/IcResiUserConfirmDTO.java | 2 + .../ChangeRelocationController.java | 20 +++++++ .../service/ChangeRelocationService.java | 10 ++++ .../impl/ChangeRelocationServiceImpl.java | 53 +++++++++++++++++++ .../impl/IcResiUserConfirmServiceImpl.java | 1 + 6 files changed, 88 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java index 25b5dbf56b..088f8431d5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java @@ -210,4 +210,6 @@ public class ChangeRelocationDTO implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date transferTime; + + private String isMoveOut; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java index e0a297cd63..d8e37ceba2 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java @@ -221,4 +221,6 @@ public class IcResiUserConfirmDTO implements Serializable { private String moveOutDate; + private String isMoveOut; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java index 8066a87271..1b84302742 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java @@ -124,4 +124,24 @@ public class ChangeRelocationController { return new Result(); } + /** + * 从家庭中移除 + * + * @Param tokenDto + * @Param dto + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/27 10:50 + */ + @NoRepeatSubmit + @PostMapping("moveOutHomeConfirm") + public Result moveOutHomeConfirm(@LoginUser TokenDto tokenDto, @RequestBody ChangeRelocationDTO dto){ + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setStaffId(tokenDto.getUserId()); + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + changeRelocationService.moveOutHomeConfirm(dto); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java index 1a54dba7c7..150fc05fa0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java @@ -95,4 +95,14 @@ public interface ChangeRelocationService extends BaseService Date: Tue, 5 Jul 2022 16:12:46 +0800 Subject: [PATCH 080/122] =?UTF-8?q?pc=E7=AB=AF=E5=85=9A=E5=BB=BA=E5=A3=B0?= =?UTF-8?q?=E9=9F=B3=E5=8F=AF=E9=80=89=E5=8F=91=E5=B8=83=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E6=8C=89=E8=A7=92=E8=89=B2=E5=81=9A=E9=99=90?= =?UTF-8?q?=E5=88=B6=20=E4=BB=A3=E7=A0=81=E6=9A=82=E4=B8=8D=E5=8F=91?= =?UTF-8?q?=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/CustomerAgencyServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index adaf547abf..b80c595f85 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -710,6 +710,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl Date: Tue, 5 Jul 2022 17:19:53 +0800 Subject: [PATCH 081/122] bug --- .../mapper/epmetuser/CustomerStaffDao.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml index 3efcdfb3dc..9ac36b2509 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml @@ -116,16 +116,18 @@ customer_staff WHERE del_flag = '0' - AND user_id IN - - #{staffId} - - ORDER BY field( - user_id, - + + AND user_id IN + #{staffId} - ) + ORDER BY field( + user_id, + + #{staffId} + + ) + + - + update ic_organization_code_info - set NEIGHBOR_MAX_NUM=#{neighborMaxNum} + set MAX_NUM=#{maxNum} where CUSTOMER_ID = #{customerId} - and COMMUNITY_ID = #{communityId} - - - update ic_organization_code_info - set BUILDING_MAX_NUM=#{buildingMaxNum} - where CUSTOMER_ID = #{customerId} - and COMMUNITY_ID = #{communityId} - - - update ic_organization_code_info - set UNIT_MAX_NUM=#{unitMaxNum} - where CUSTOMER_ID = #{customerId} - and COMMUNITY_ID = #{communityId} - - - update ic_organization_code_info - set HOUSE_MAX_NUM=#{houseMaxNum} - where CUSTOMER_ID = #{customerId} - and COMMUNITY_ID = #{communityId} + and SYS_ID = #{sysId} + AND SYS_TYPE = #{sysType} + + + + + + + + + + + + + + + + + + From cbd741c165d348b382674173cbb14bc9e1c1a2ba Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 5 Jul 2022 17:52:30 +0800 Subject: [PATCH 084/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E8=84=9A=E6=9C=AC=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...code_info.sql => V0.0.35__alter_ic_organization_code_info.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/{V0.0.34__alter_ic_organization_code_info.sql => V0.0.35__alter_ic_organization_code_info.sql} (100%) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_organization_code_info.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.35__alter_ic_organization_code_info.sql similarity index 100% rename from epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.34__alter_ic_organization_code_info.sql rename to epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.35__alter_ic_organization_code_info.sql From 103d7c31b487568bd94faca0ddbb719c423e02b2 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 6 Jul 2022 09:58:45 +0800 Subject: [PATCH 085/122] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=85=9A=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=97=B6=E8=8E=B7=E5=8F=96=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyMemberServiceImpl.java | 2 ++ .../service/impl/IcResiUserServiceImpl.java | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 7e4ecfc6ac..92c7da220d 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -566,6 +566,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl Date: Wed, 6 Jul 2022 10:05:37 +0800 Subject: [PATCH 086/122] =?UTF-8?q?=E6=96=87=E7=AB=A0=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E6=8C=89=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index cd53bab639..dd593035b9 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -223,7 +223,7 @@ - ORDER BY a.publish_date DESC, a.updated_time DESC + ORDER BY a.created_time DESC, a.updated_time DESC From ce8b83d33db7f0e64aa7ab20494d6ecaf91a0187 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 6 Jul 2022 10:22:07 +0800 Subject: [PATCH 087/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E6=9F=A5=E8=AF=A2=E5=B7=B2=E5=8F=91=E5=B8=83=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index dd593035b9..cfe5e6c14b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -201,7 +201,8 @@ draft a LEFT JOIN draft_cover ac ON a.id = ac.draft_id AND ac.del_flag = '0' WHERE - a.del_flag = '0' + a.del_flag = '0' + AND (a.STATUS_FLAG = 'unpublish' OR a.STATUS_FLAG = 'auditfail') AND a.id = #{draftId} From 8491f4d4013fa9a252969b0e3aef4dc7ee627a87 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 6 Jul 2022 10:46:25 +0800 Subject: [PATCH 088/122] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=85=9A=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=97=B6=E8=8E=B7=E5=8F=96=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/service/impl/IcPartyMemberServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 92c7da220d..807f7e5022 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -700,7 +700,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl result = epmetUserOpenFeignClient.icPartyMemberSync(ConvertUtils.sourceToTarget(e, IcPartyMemberDTO.class)); - if (!result.success() && null != result.getData()) { + if (result.success() && null != result.getData()) { e.setIcResiUser(result.getData().getIcResiUser()); e.setVolunteerCategory(result.getData().getVolunteerCategory()); e.setAddress(result.getData().getAddress()); From 529cdaa328aabfd956ff39b55e8e5cc0f229eda9 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 6 Jul 2022 10:49:12 +0800 Subject: [PATCH 089/122] =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=8E=B7=E5=8F=96=E4=BF=A1=E6=81=AF-?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/HouseServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 7d3f52f944..f0b1a76711 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -1084,6 +1084,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { public Result getHomeInfoByHouseCode(HouseInfoFormDTO dto) { HouseInfoResultDTO house = icHouseDao.selectHomeInfoByHouseCode(dto.getHouseCode()); + if(null == house){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"未获取到房屋信息,请核对房屋编码","未获取到房屋信息,请核对房屋编码"); + } + HouseInfoCache cache = CustomerIcHouseRedis.getHouseInfo(house.getCustomerId(), house.getHouseId()); BeanUtils.copyProperties(cache,house); From 0022b36842ad4d0ce7c4e4da8585ed6d5d00b973 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 6 Jul 2022 13:31:50 +0800 Subject: [PATCH 090/122] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 0661ece50b..3a01001543 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -1590,6 +1590,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Wed, 6 Jul 2022 14:22:08 +0800 Subject: [PATCH 091/122] =?UTF-8?q?/oss/file/upload-resi-event-file=20?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B6=85=E8=BF=872M=E7=9A=84=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E4=B8=8B=E8=AF=95=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/OssController.java | 8 ++++++-- .../src/main/java/com/epmet/service/OssService.java | 2 +- .../main/java/com/epmet/service/impl/OssServiceImpl.java | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index b265308eaf..e593cb7a95 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -158,7 +158,7 @@ public class OssController { */ @PostMapping("compressuploadimg") public Result compressUploadImg(@RequestParam("file") MultipartFile file) { - return ossService.compressUploadImg(file, null); + return ossService.compressUploadImg(file, null,200L); } @PostMapping("uploadwximg") @@ -410,7 +410,11 @@ public class OssController { throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); } - + //如果图片大于2M压缩一下 + int compressSize = 2 * 1024 * 1024; + if(file.getSize()>compressSize){ + return ossService.compressUploadImg(file, null,2 * 1024); + } return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java index d9e210c006..531cf986fb 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java @@ -31,7 +31,7 @@ public interface OssService extends BaseService { Result uploadImg(MultipartFile file, String privacy); - Result compressUploadImg(MultipartFile file, String privacy); + Result compressUploadImg(MultipartFile file, String privacy,long desFileSize); Result extUpload(MultipartFile file, String fileName, String privacy); diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index 40d5d7b492..d55751762c 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java @@ -101,7 +101,7 @@ public class OssServiceImpl extends BaseServiceImpl implement } @Override - public Result compressUploadImg(MultipartFile file, String privacy) { + public Result compressUploadImg(MultipartFile file, String privacy,long desFileSize) { if (file.isEmpty()) { return new Result().error(ModuleErrorCode.UPLOAD_FILE_EMPTY); } @@ -110,7 +110,7 @@ public class OssServiceImpl extends BaseServiceImpl implement String url = null; String ossDomain = null; try { - byte[] fileBytes = compressPicCycle(file.getBytes(),200L,0.3); + byte[] fileBytes = compressPicCycle(file.getBytes(),desFileSize,0.3); AbstractCloudStorageService storageService = OssFactory.build(); url = storageService.uploadSuffix(fileBytes, extension, privacy); ossDomain = storageService.getOssDomain(privacy); From f59c0866b435f77c6883fb9191775f4d3827485c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 6 Jul 2022 14:38:30 +0800 Subject: [PATCH 092/122] =?UTF-8?q?"uploadvariedfile"/"article/upload"?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8E=8B=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/OssController.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index e593cb7a95..9f9994f148 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -262,7 +262,17 @@ public class OssController { , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); } } - Result result = ossService.uploadImg(file, null); + Result result =null; + String originFileName = file.getOriginalFilename(); + String format = "-" + originFileName.substring(originFileName.lastIndexOf(".") + NumConstant.ONE) + "-"; + format = format.toLowerCase(); + int compressSize = 2 * 1024 * 1024; + // 如果是图片,超过2M的压缩一下 + if (ModuleConstant.PROJECT_FILE_IMAGE.contains(format) && file.getSize() > compressSize) {// 单个图片10M + result= ossService.compressUploadImg(file, null, 2 * 1024); + } else { + result=ossService.uploadImg(file, null); + } if (result != null && result.success() ){ UploadImgResultDTO data = result.getData(); if ( data!= null && StringUtils.isNotBlank(data.getUrl())){ @@ -350,7 +360,13 @@ public class OssController { if (size > maxSize) { throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(), EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); } - + // 如果是图片,超过2M的压缩一下 + if (ModuleConstant.PROJECT_FILE_IMAGE.contains(format)) {//单个图片10M + int compressSize = 2 * 1024 * 1024; + if(file.getSize()>compressSize){ + return ossService.compressUploadImg(file, null,2 * 1024); + } + } return ossService.uploadVariedFile(file); } From b3071b062eeeb7bc8e582fada608abd0cd04d5be Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 6 Jul 2022 14:39:42 +0800 Subject: [PATCH 093/122] ossurl --- epmet-gateway/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 56bde19105..dc505b1985 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -275,6 +275,7 @@ lb://epmet-admin-server lb://epmet-oss-server + lb://epmet-message-server From 97c4f30eb4e13796cd4ba56d639a5fc9b11d7d4a Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 6 Jul 2022 14:49:44 +0800 Subject: [PATCH 094/122] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserConfirmServiceImpl.java | 4 +++- .../src/main/resources/mapper/IcResiUserDao.xml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java index a0e90f7450..5fb27ad388 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java @@ -167,11 +167,13 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcResiUserConfirmEntity::getIcResiUserId, dto.getIcResiUserId()); + wrapper.eq(IcResiUserConfirmEntity::getHouseId, result.getHouseId()); wrapper.in(IcResiUserConfirmEntity::getSubmitType, Arrays.asList("in", "out")); wrapper.orderByDesc(IcResiUserConfirmEntity::getCreatedTime); List list = baseDao.selectList(wrapper); if (CollectionUtils.isNotEmpty(list)) { - result.setMoveOutStatus(list.get(NumConstant.ZERO).getConfirmResult()); + result.setMoveOutStatus(NumConstant.ONE_STR.equals(list.get(NumConstant.ZERO).getConfirmResult())? + NumConstant.THREE_STR:list.get(NumConstant.ZERO).getConfirmResult()); } else { result.setMoveOutStatus(NumConstant.THREE_STR); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 57f23f9898..32bcc084e5 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -1099,9 +1099,11 @@ mz, HJSZD, yhzgx, - XJZD + XJZD, + HOME_ID AS houseId from ic_resi_user where DEL_FLAG='0' + and Status='0' and id=#{icResiUserId} SELECT ac.CONTENT_TYPE, - ac.CONTENT, - ac.FILE_NAME + IFNULL(ac.CONTENT,''), + IFNULL(ac.FILE_NAME,'') FROM article_content ac WHERE @@ -298,9 +298,9 @@ art.PUBLISHER_NAME AS publishUnitDesc, art.PUBLISH_DATE AS publishDate, IFNULL(art.TAGS,'') AS tags, - content2.CONTENT, + IFNULL(content2.CONTENT,''), content2.CONTENT_TYPE, - content2.FILE_NAME, + IFNULL(content2.FILE_NAME,''), (SELECT COUNT(1) FROM ARTICLE_VISIT_RECORD WHERE DEL_FLAG = '0' AND ARTICLE_ID = #{articleId} AND GRID_ID = #{gridId}) AS visitRecordCount, art.CUSTOMER_ID FROM @@ -308,9 +308,9 @@ LEFT JOIN ( SELECT content.ARTICLE_ID, - content.CONTENT, + IFNULL(content.CONTENT,''), content.CONTENT_TYPE, - content.FILE_NAME, + IFNULL(content.FILE_NAME,''), content.ORDER_NUM FROM ARTICLE_CONTENT content diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index cfe5e6c14b..bad753cd78 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -26,9 +26,9 @@ SELECT ac.CONTENT_TYPE, - IFNULL(ac.CONTENT,''), - IFNULL(ac.FILE_NAME,'') + ac.CONTENT, + ac.FILE_NAME FROM article_content ac WHERE @@ -298,9 +298,9 @@ art.PUBLISHER_NAME AS publishUnitDesc, art.PUBLISH_DATE AS publishDate, IFNULL(art.TAGS,'') AS tags, - IFNULL(content2.CONTENT,''), + content2.CONTENT, content2.CONTENT_TYPE, - IFNULL(content2.FILE_NAME,''), + content2.FILE_NAME, (SELECT COUNT(1) FROM ARTICLE_VISIT_RECORD WHERE DEL_FLAG = '0' AND ARTICLE_ID = #{articleId} AND GRID_ID = #{gridId}) AS visitRecordCount, art.CUSTOMER_ID FROM @@ -308,9 +308,9 @@ LEFT JOIN ( SELECT content.ARTICLE_ID, - IFNULL(content.CONTENT,''), + content.CONTENT, content.CONTENT_TYPE, - IFNULL(content.FILE_NAME,''), + content.FILE_NAME, content.ORDER_NUM FROM ARTICLE_CONTENT content diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index bad753cd78..cfe5e6c14b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -26,9 +26,9 @@ SELECT ac.CONTENT_TYPE, - ac.CONTENT, - ac.FILE_NAME + IFNULL(ac.CONTENT,'') CONTENT, + IFNULL(ac.FILE_NAME,'') FILE_NAME FROM article_content ac WHERE @@ -298,9 +298,9 @@ art.PUBLISHER_NAME AS publishUnitDesc, art.PUBLISH_DATE AS publishDate, IFNULL(art.TAGS,'') AS tags, - content2.CONTENT, + IFNULL(content2.CONTENT,'') CONTENT, content2.CONTENT_TYPE, - content2.FILE_NAME, + IFNULL(content2.FILE_NAME,'') FILE_NAME, (SELECT COUNT(1) FROM ARTICLE_VISIT_RECORD WHERE DEL_FLAG = '0' AND ARTICLE_ID = #{articleId} AND GRID_ID = #{gridId}) AS visitRecordCount, art.CUSTOMER_ID FROM @@ -308,9 +308,9 @@ LEFT JOIN ( SELECT content.ARTICLE_ID, - content.CONTENT, + IFNULL(content.CONTENT,'') CONTENT, content.CONTENT_TYPE, - content.FILE_NAME, + IFNULL(content.FILE_NAME,'') FILE_NAME, content.ORDER_NUM FROM ARTICLE_CONTENT content diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index cfe5e6c14b..ab61a224e1 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -26,9 +26,9 @@ - \ No newline at end of file + From 1f4893582baedfb0fa0fd5550d84d681e8be9f89 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 7 Jul 2022 17:15:12 +0800 Subject: [PATCH 110/122] =?UTF-8?q?/epmetuser/icresiuser/searchbyname?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcResiUserController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 1feccb5fac..0cde5e57af 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -48,6 +48,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.OrgInfoConstant; import com.epmet.constant.SystemMessageType; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; @@ -666,6 +667,8 @@ public class IcResiUserController implements ResultDataResolver { public Result> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); + //前端不会传level,这里默认查询当前组织及下级 + formDTO.setLevel(OrgInfoConstant.AGENCY); ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByNameForm.class); return new Result>().ok(icResiUserService.searchByName(formDTO)); } From f206132b26d730ddb26ef4c630a17503dfdfc06f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 7 Jul 2022 17:18:31 +0800 Subject: [PATCH 111/122] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=90=8D=E5=8D=95=E5=8F=96=E6=B6=88=E5=85=B3?= =?UTF-8?q?=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/CancelAttentionPackageFormDTO.java | 5 ++++- .../service/impl/IcEpidemicSpecialAttentionServiceImpl.java | 4 ++-- .../main/resources/mapper/IcEpidemicSpecialAttentionDao.xml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java index 6867827cd4..a059d76680 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java @@ -22,7 +22,7 @@ public class CancelAttentionPackageFormDTO implements Serializable { /** * 身份证 */ - @NotNull(message = "idCard不能为空",groups = CancelAttentionPackageForm.class) +// @NotNull(message = "idCard不能为空",groups = CancelAttentionPackageForm.class) private List idCards; /** @@ -30,4 +30,7 @@ public class CancelAttentionPackageFormDTO implements Serializable { */ @NotNull(message = "attentionType不能为空",groups = CancelAttentionPackageForm.class) private Integer attentionType ; + + @NotNull(message = "ids不能为空",groups = CancelAttentionPackageForm.class) + private List ids; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index 6175e742c5..5c36cb1eb2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -289,8 +289,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl #{l} From 959f8f1e392143fc409714510e3244749593891f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 7 Jul 2022 17:21:47 +0800 Subject: [PATCH 112/122] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ConfirmListResultDTO.java | 1 + .../impl/ChangeRelocationServiceImpl.java | 20 +++++++++---------- .../resources/mapper/IcResiUserConfirmDao.xml | 3 ++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ConfirmListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ConfirmListResultDTO.java index f9c131d7b5..7871653ae7 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ConfirmListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ConfirmListResultDTO.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; @Data public class ConfirmListResultDTO { private String id; + private String agencyId; private String name; private String gender; private String mobile; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java index 694cfbb153..361b8842a8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java @@ -298,15 +298,6 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl SELECT a.ID, + a.AGENCY_ID, b.`NAME`, b.GENDER, b.ID_CARD, @@ -81,7 +82,7 @@ WHERE a.DEL_FLAG = 0 AND a.SUBMIT_TYPE IN ( 'in', 'out' ) - AND a.AGENCY_ID = #{agencyId} + AND (a.AGENCY_ID = #{agencyId} OR a.PIDS LIKE concat( '%', #{agencyId}, '%' )) AND b.NAME LIKE CONCAT('%',#{name},'%') From 3ee7fc1f97f466ca60f695da2bc70123fee9eedc Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 7 Jul 2022 17:38:36 +0800 Subject: [PATCH 113/122] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcNatDao.java | 7 ------- .../main/java/com/epmet/dao/IcVaccineDao.java | 7 ------- .../src/main/resources/mapper/IcNatDao.xml | 18 ------------------ .../src/main/resources/mapper/IcVaccineDao.xml | 18 ------------------ 4 files changed, 50 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java index 5496919f3c..31ef9ec667 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java @@ -44,13 +44,6 @@ public interface IcNatDao extends BaseDao { **/ int delById(@Param("icNatId") String icNatId); - /** - * 插入或者更新 - * - * @param e - */ - void insertOrUpdate(IcNatEntity e); - /** * @Author sun * @Description 按条件查询业务数据 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java index 0471d9496b..15cd0fe88e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java @@ -46,13 +46,6 @@ public interface IcVaccineDao extends BaseDao { **/ int delById(@Param("icNatId") String icNatId); - /** - * 插入或者更新 - * - * @param e - */ - void insertOrUpdate(IcVaccineEntity e); - /** * @Author sun * @Description 按条件查询业务数据 diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml index 5c4ad0b6e7..1bbaeeaa3b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml @@ -139,24 +139,6 @@ DELETE FROM ic_nat WHERE id = #{icNatId} - - INSERT INTO epmet_user.ic_nat - (ID, CUSTOMER_ID, AGENCY_ID, PIDS, USER_ID, - USER_TYPE, NAME, MOBILE, ID_CARD, NAT_TIME, NAT_RESULT, NAT_ADDRESS, FILE_NAME, ATTACHMENT_TYPE, ATTACHMENT_URL, - DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) - VALUES (#{id}, #{customerId}, #{agencyId}, #{pids}, #{userId}, - #{userType}, #{name}, #{mobile}, #{idCard}, #{natTime}, - #{natResult}, #{natAddress}, #{fileName}, #{attachmentType}, #{attachmentUrl}, - #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, - #{updatedTime}) - ON DUPLICATE KEY update - NAME=#{name}, - MOBILE=#{mobile}, - NAT_ADDRESS=#{natAddress}, - NAT_RESULT=#{natResult}, - UPDATED_BY=#{updatedBy}, - UPDATED_TIME=NOW() - UPDATE ic_nat m, ( diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml index 4ee69e7e3d..8bf4afa201 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml @@ -130,24 +130,6 @@ DELETE FROM ic_nat WHERE id = #{icNatId} - - INSERT INTO epmet_user.ic_nat - (ID, CUSTOMER_ID, AGENCY_ID, PIDS, USER_ID, - USER_TYPE, NAME, MOBILE, ID_CARD, NAT_TIME, NAT_RESULT, NAT_ADDRESS, FILE_NAME, ATTACHMENT_TYPE, ATTACHMENT_URL, - DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) - VALUES (#{id}, #{customerId}, #{agencyId}, #{pids}, #{userId}, - #{userType}, #{name}, #{mobile}, #{idCard}, #{natTime}, - #{natResult}, #{natAddress}, #{fileName}, #{attachmentType}, #{attachmentUrl}, - #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, - #{updatedTime}) - ON DUPLICATE KEY update - NAME=#{name}, - MOBILE=#{mobile}, - NAT_ADDRESS=#{natAddress}, - NAT_RESULT=#{natResult}, - UPDATED_BY=#{updatedBy}, - UPDATED_TIME=NOW() - UPDATE ic_nat m, ( From d53b4669395940b533c39612302b7252861fae6c Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 7 Jul 2022 17:41:42 +0800 Subject: [PATCH 114/122] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ChangeRelocationServiceImpl.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java index 361b8842a8..a7c985599e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java @@ -10,6 +10,8 @@ import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; +import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -32,10 +34,7 @@ import com.epmet.entity.ChangeRelocationEntity; import com.epmet.entity.IcResiUserEntity; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.redis.ChangeRelocationRedis; -import com.epmet.service.ChangeRelocationService; -import com.epmet.service.ChangeWelfareService; -import com.epmet.service.IcResiUserService; -import com.epmet.service.IcUserTransferRecordService; +import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -77,6 +76,8 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl page(Map params) { @@ -324,6 +325,15 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl Date: Fri, 8 Jul 2022 09:26:38 +0800 Subject: [PATCH 115/122] bugfix --- .../src/main/resources/mapper/IcResiUserDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 73d9b8ee4d..737d0500de 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -330,6 +330,7 @@ FROM ic_resi_user WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} + AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%')) AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) From 077ce1bb6dc8f7322118c38df4dcbba078aeec0e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 8 Jul 2022 09:30:20 +0800 Subject: [PATCH 116/122] bugfix --- .../epmet/controller/IcResiUserController.java | 2 -- .../src/main/resources/mapper/IcResiUserDao.xml | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 0cde5e57af..9becc91a97 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -667,8 +667,6 @@ public class IcResiUserController implements ResultDataResolver { public Result> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); - //前端不会传level,这里默认查询当前组织及下级 - formDTO.setLevel(OrgInfoConstant.AGENCY); ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByNameForm.class); return new Result>().ok(icResiUserService.searchByName(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 737d0500de..54d77d9ad5 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -333,16 +333,24 @@ AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%')) - AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) + + AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) + - AND GRID_ID = #{id} + + AND GRID_ID = #{id} + - AND VILLAGE_ID = #{id} + + AND VILLAGE_ID = #{id} + - AND BUILD_ID = #{id} + + AND BUILD_ID = #{id} + From 4f01887cf7c376399a484e11211f1eac55d90836 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 8 Jul 2022 14:09:21 +0800 Subject: [PATCH 117/122] =?UTF-8?q?=E5=8F=8C=E5=AE=9E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5-=E5=B0=8F=E5=8C=BA=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E5=AD=97=E6=AE=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcNeighborHoodServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 7c26b4a947..14c9af3048 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -793,7 +793,11 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl neighborhoodDetail(String neighborhoodId) { - return new Result().ok(baseDao.selectById(neighborhoodId)); + IcNeighborHoodEntity result = baseDao.selectById(neighborhoodId); + if(null != result && null == result.getRemark()){ + result.setRemark(""); + } + return new Result().ok(result); } } From af11feb2a6caba6692d988f181a0c75f0e067f84 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 8 Jul 2022 14:32:22 +0800 Subject: [PATCH 118/122] =?UTF-8?q?=E3=80=90=E7=A4=BE=E5=8C=BA=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E3=80=91=E4=BF=AE=E5=A4=8D=EF=BC=9A1.=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E6=9C=8D=E5=8A=A1=E6=97=B6=E5=80=99=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E6=9C=8D=E5=8A=A1=E7=9B=AE=E6=A0=87ID=5FPATH=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=822.=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=8A=A0=E4=B8=8A=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=BB=84=E7=BB=87=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcServiceRecordDao.java | 3 ++- .../com/epmet/service/impl/IcServiceRecordServiceImpl.java | 2 +- .../src/main/resources/mapper/IcServiceRecordDao.xml | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java index 5a51a14a76..186a80a260 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java @@ -25,5 +25,6 @@ public interface IcServiceRecordDao extends BaseDao { @Param("serviceTimeStart") Date serviceTimeStart, @Param("serviceTimeEnd") Date serviceTimeEnd, @Param("serviceStatus") String serviceStatus, - @Param("satisfaction") String satisfaction); + @Param("satisfaction") String satisfaction, + @Param("searchOrgIdPath") String searchOrgIdPath); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java index 214b762cfc..77863907e6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java @@ -260,7 +260,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl record.DEL_FLAG = '0' @@ -61,6 +62,9 @@ and feedback.SATISFACTION = #{satisfaction} + + and scope.OBJECT_ID_PATH like CONCAT(#{searchOrgIdPath}, '%') + order by record.CREATED_TIME desc From 0e61469278ce5bb75ce63ba947426975aa894789 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 8 Jul 2022 14:35:07 +0800 Subject: [PATCH 119/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=A1=A8=EF=BC=8C=E5=86=85=E5=AE=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.12__alert_draft.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql new file mode 100644 index 0000000000..9073b92eec --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql @@ -0,0 +1,3 @@ + +ALTER TABLE `draft_content` + MODIFY COLUMN `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容' AFTER `ARTICLE_ID`; From c21e2e46c022fcf263ec21aea7cc1b61bcb01e6b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 8 Jul 2022 14:36:38 +0800 Subject: [PATCH 120/122] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=A1=A8=EF=BC=8C=E5=86=85=E5=AE=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.12__alert_draft.sql | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql deleted file mode 100644 index 9073b92eec..0000000000 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql +++ /dev/null @@ -1,3 +0,0 @@ - -ALTER TABLE `draft_content` - MODIFY COLUMN `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容' AFTER `ARTICLE_ID`; From ca1dce3df40d535a7b4176160bf36917dc603bb1 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 8 Jul 2022 14:41:17 +0800 Subject: [PATCH 121/122] =?UTF-8?q?=E3=80=90=E7=A4=BE=E5=8C=BA=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E3=80=91=E4=BF=AE=E5=A4=8D=EF=BC=9A1.=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E6=9C=8D=E5=8A=A1=E6=97=B6=E5=80=99=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E6=9C=8D=E5=8A=A1=E7=9B=AE=E6=A0=87ID=5FPATH=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=822.=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=8A=A0=E4=B8=8A=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=BB=84=E7=BB=87=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcServiceRecordServiceImpl.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java index 77863907e6..cb88587cdf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java @@ -2,15 +2,18 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.*; import com.epmet.dto.IcNeighborHoodDTO; @@ -147,8 +150,22 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl records = baseDao.listServiceRecords(serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction); + List records = baseDao.listServiceRecords( + serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction, searchOrgIdPath); + PageInfo pi = new PageInfo<>(records); // 补充信息 From 7fecdeb070c685202d9e8f41997b3aac11b95300 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 8 Jul 2022 15:06:44 +0800 Subject: [PATCH 122/122] =?UTF-8?q?/icServiceProject/serviceProjectList?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=BB=84=E7=BB=87=E5=8F=8A=E4=B8=8B=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcServiceProjectServiceImpl.java | 1 + .../src/main/resources/mapper/IcServiceProjectDao.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java index ecc399cfb3..88075ff9cd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java @@ -150,6 +150,7 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getServiceProjectList(formDTO)); if (CollectionUtils.isNotEmpty(pageInfo.getList())){ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml index 17f4de965a..c042978f80 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml @@ -43,7 +43,7 @@ AND ID = #{serviceProjectId} - AND AGENCY_ID = #{agencyId} + AND AGENCY_ID_PATH like concat( '%',#{agencyId},'%') AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey}