From a5a30794eac3cec902f5253704c2269ba763a063 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 17 May 2022 09:31:26 +0800 Subject: [PATCH 001/416] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/NodeTree.java | 45 +++++ .../commons/tools/utils/NodeTreeUtils.java | 31 +++ .../AgencyAddressBookTreeResultDTO.java | 39 ++++ .../epmet/controller/AgencyController.java | 92 +++++---- .../java/com/epmet/dao/CustomerAgencyDao.java | 18 +- .../java/com/epmet/service/AgencyService.java | 25 ++- .../epmet/service/impl/AgencyServiceImpl.java | 180 ++++++++++-------- .../resources/mapper/CustomerAgencyDao.xml | 55 ++++++ 8 files changed, 361 insertions(+), 124 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAddressBookTreeResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java new file mode 100644 index 0000000000..8f28cef145 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTree.java @@ -0,0 +1,45 @@ +package com.epmet.commons.tools.utils; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class NodeTree implements Serializable { + private static final long serialVersionUID = 8020505121785861117L; + /** + * 主键 + */ + private String id; + /** + * 上级ID + */ + private String pid; + /** + * 子节点列表 + */ + private List children = new ArrayList<>(); + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java new file mode 100644 index 0000000000..1c3df168ee --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/NodeTreeUtils.java @@ -0,0 +1,31 @@ +package com.epmet.commons.tools.utils; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class NodeTreeUtils { + + public static List build(List treeNodes) { + List result = new ArrayList<>(); + + //list转map + Map nodeMap = new LinkedHashMap<>(treeNodes.size()); + for(T treeNode : treeNodes){ + nodeMap.put(treeNode.getId(), treeNode); + } + + for(T node : nodeMap.values()) { + T parent = nodeMap.get(node.getPid()); + if(parent != null && !(node.getId().equals(parent.getId()))){ + parent.getChildren().add(node); + continue; + } + + result.add(node); + } + + return result; + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAddressBookTreeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAddressBookTreeResultDTO.java new file mode 100644 index 0000000000..33e3fd3737 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyAddressBookTreeResultDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.result; + + +import com.epmet.commons.tools.utils.NodeTree; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AgencyAddressBookTreeResultDTO extends NodeTree implements Serializable { + + private static final long serialVersionUID = -1993037593855768962L; + + /** + * 父id + */ + private String pid; + + /** + * 名字 + */ + private String name; + + /** + * 级别 + */ + private String level; + + /** + * 创建时间 + */ + private Date createTime; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index 659b411519..e917eacf59 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -94,15 +94,15 @@ public class AgencyController { public Result addAgency(@LoginUser TokenDto tokenDTO, @RequestBody AddAgencyFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); //机构级别是市级以上则市、区县名称可不传值,是区县级以上则区县名称可不传值 - if(!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel())&&!CustomerAgencyConstant.CITY_LEVEL.equals(formDTO.getLevel())){ - if(StringUtils.isBlank(formDTO.getCity())){ + if (!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel()) && !CustomerAgencyConstant.CITY_LEVEL.equals(formDTO.getLevel())) { + if (StringUtils.isBlank(formDTO.getCity())) { throw new RenException(CustomerAgencyConstant.CITY_EXCEPTION); } - if(StringUtils.isBlank(formDTO.getDistrict())){ + if (StringUtils.isBlank(formDTO.getDistrict())) { throw new RenException(CustomerAgencyConstant.DISTRICT_EXCEPTION); } - }else if(!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel())){ - if(StringUtils.isBlank(formDTO.getCity())){ + } else if (!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel())) { + if (StringUtils.isBlank(formDTO.getCity())) { throw new RenException(CustomerAgencyConstant.CITY_EXCEPTION); } } @@ -118,13 +118,13 @@ public class AgencyController { **/ @PostMapping("addagency-v2") @RequirePermission(requirePermission = RequirePermissionEnum.ORG_SUBAGENCY_CREATE) - public Result addAgencyV2(@LoginUser TokenDto tokenDTO,@RequestBody AddAgencyV2FormDTO formDTO) { + public Result addAgencyV2(@LoginUser TokenDto tokenDTO, @RequestBody AddAgencyV2FormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddAgencyV2FormDTO.DefaultUserShowGroup.class, AddAgencyV2FormDTO.AddUserInternalGroup.class); if (formDTO.getAreaCodeSwitch().equals(CustomerAgencyConstant.AREA_CODE_SWITCH_OPEN)) { ValidatorUtils.validateEntity(formDTO, AddAgencyV2FormDTO.AreaCodeGroup.class); } //当前客户下,同级组织中,组织名称不允许重复 - customerAgencyService.checkAgencyName(formDTO.getAgencyName(),tokenDTO.getCustomerId(),null,formDTO.getParentAgencyId()); + customerAgencyService.checkAgencyName(formDTO.getAgencyName(), tokenDTO.getCustomerId(), null, formDTO.getParentAgencyId()); AddAgencyResultDTO resultDTO = agencyService.addAgencyV2(formDTO); //2021-11-30 推送mq,数据同步到中介库 start @@ -141,6 +141,7 @@ public class AgencyController { /** * 添加根级组织 + * * @param form * @return */ @@ -175,7 +176,7 @@ public class AgencyController { formDTO.setUserId(tokenDTO.getUserId()); formDTO.setCustomerId(tokenDTO.getCustomerId()); ValidatorUtils.validateEntity(formDTO, EditAgencyFormDTO.DefaultUserShowGroup.class, EditAgencyFormDTO.AddUserInternalGroup.class); - Result result = agencyService.editAgency(formDTO); + Result result = agencyService.editAgency(formDTO); //2021-10-18 推送mq,数据同步到中介库 start【中介库只放了组织的名称、级别,所以涉及批量修改pname的操作不涉及同步中间库】 OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); @@ -245,6 +246,7 @@ public class AgencyController { /** * 根据Id查询agency + * * @param agencyId * @return */ @@ -259,6 +261,7 @@ public class AgencyController { /** * 根据staffId查询 + * * @param staffId * @return */ @@ -275,6 +278,7 @@ public class AgencyController { /** * 查询客户根级组织 + * * @param customerId * @return */ @@ -286,6 +290,7 @@ public class AgencyController { /** * 批量查询客户根级组织 + * * @param customerIds * @return */ @@ -324,100 +329,101 @@ public class AgencyController { } /** - * @Description 【地图配置】删除 * @param formDTO + * @Description 【地图配置】删除 * @author zxc * @date 2021/10/25 9:30 上午 */ @PostMapping("mapdelarea") - public Result mapDelArea(@RequestBody MapDelAreaFormDTO formDTO){ + public Result mapDelArea(@RequestBody MapDelAreaFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, MapDelAreaFormDTO.MapDelAreaForm.class); agencyService.mapDelArea(formDTO); return new Result(); } /** - * @Description 【地图配置】新增 * @param formDTO + * @Description 【地图配置】新增 * @author zxc * @date 2021/10/25 9:58 上午 */ @PostMapping("mapaddarea") - public Result mapAddArea(@RequestBody MapAddAreaFormDTO formDTO){ + public Result mapAddArea(@RequestBody MapAddAreaFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, MapAddAreaFormDTO.MapAddAreaForm.class); agencyService.mapAddArea(formDTO); return new Result(); } /** - * @Description 【地图配置】组织查询 * @param formDTO * @param tokenDto + * @Description 【地图配置】组织查询 * @author zxc * @date 2021/10/25 10:50 上午 */ @PostMapping("maporg") - public Result mapOrg(@RequestBody MapOrgFormDTO formDTO, @LoginUser TokenDto tokenDto){ - return new Result().ok(agencyService.mapOrg(formDTO,tokenDto)); + public Result mapOrg(@RequestBody MapOrgFormDTO formDTO, @LoginUser TokenDto tokenDto) { + return new Result().ok(agencyService.mapOrg(formDTO, tokenDto)); } /** - * @Description 查询楼栋信息 * @param formDTO + * @Description 查询楼栋信息 * @author zxc * @date 2021/11/2 9:18 上午 */ @PostMapping("baseinfofamilybuilding") - public Result> baseInfoFamilyBuilding(@RequestBody BaseInfoFamilyBuildingFormDTO formDTO){ + public Result> baseInfoFamilyBuilding(@RequestBody BaseInfoFamilyBuildingFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, BaseInfoFamilyBuildingFormDTO.BaseInfoFamilyBuildingForm.class); return new Result>().ok(agencyService.baseInfoFamilyBuilding(formDTO)); } /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ @PostMapping("getsonagencyid") - public Result> getSonAgencyId(@RequestParam("orgId")String orgId,@RequestParam("type")String type){ - return new Result>().ok(agencyService.getSonAgencyId(orgId,type)); + public Result> getSonAgencyId(@RequestParam("orgId") String orgId, @RequestParam("type") String type) { + return new Result>().ok(agencyService.getSonAgencyId(orgId, type)); } /** * Desc: 生成某类型下的二维码 + * * @param formDTO * @author zxc * @date 2022/3/2 10:32 上午 */ @PostMapping("create-qrcode") - public void createQrCode(@LoginUser TokenDto tokenDto, @RequestBody CreateQrCodeFormDTO formDTO, HttpServletResponse response){ + public void createQrCode(@LoginUser TokenDto tokenDto, @RequestBody CreateQrCodeFormDTO formDTO, HttpServletResponse response) { ValidatorUtils.validateEntity(formDTO, CreateQrCodeFormDTO.CreateQrCodeForm.class); String id = formDTO.getId(); String type = formDTO.getType(); String name = ""; try { - if (type.equals(OrgInfoConstant.COMMUNITY)){ + if (type.equals(OrgInfoConstant.COMMUNITY)) { CustomerAgencyDTO customerAgencyDTO = customerAgencyService.get(id); - if (customerAgencyDTO == null){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"组织信息不存在"); + if (customerAgencyDTO == null) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "组织信息不存在"); } name = customerAgencyDTO.getOrganizationName(); - }else if (type.equals(OrgInfoConstant.NEIGHBOR_HOOD)){ + } else if (type.equals(OrgInfoConstant.NEIGHBOR_HOOD)) { IcNeighborHoodDTO icNeighborHoodDTO = neighborHoodService.get(id); - if (icNeighborHoodDTO == null){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"小区信息不存在"); + if (icNeighborHoodDTO == null) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "小区信息不存在"); } name = icNeighborHoodDTO.getNeighborHoodName(); } //url组成:数字社区地址?小区id&用户id //String url = "https://demo.tduckapp.com/s/7314b64b3a26455ab793fb8c640856b6?id="+id; String url = EnvEnum.getCurrentEnv().getUrl() - .replace("cloud","open") + .replace("cloud", "open") .replace("api/", StrConstant.EPMETY_STR) .concat("epmet-oper-gov/#/caiji/") .concat(id).concat("?") - .concat("name=").concat(URLEncoder.encode(name,StrConstant.UTF_8)).concat(StrConstant.AND_MARK) + .concat("name=").concat(URLEncoder.encode(name, StrConstant.UTF_8)).concat(StrConstant.AND_MARK) .concat("customerId=").concat(tokenDto.getCustomerId()).concat(StrConstant.AND_MARK) .concat("type=").concat(type).concat(StrConstant.AND_MARK) .concat("userId=").concat(tokenDto.getUserId()) @@ -429,18 +435,18 @@ public class AgencyController { ImageIO.write(image, "png", imageOutput); InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); long length = imageOutput.length(); - String fileName = name+".png"; + String fileName = name + ".png"; response.setContentType("application/octet-stream"); - response.setContentLength((int)length); - response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(fileName, StrConstant.UTF_8)); + response.setContentLength((int) length); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, StrConstant.UTF_8)); //输出流 byte[] bytes = new byte[1024]; OutputStream outputStream = response.getOutputStream(); long count = 0; - while(count < length){ + while (count < length) { int len = inputStream.read(bytes, 0, 1024); - count +=len; + count += len; outputStream.write(bytes, 0, len); } outputStream.flush(); @@ -451,12 +457,28 @@ public class AgencyController { /** * Desc: 查询工作人员所属组织下的所有社区 + * * @param tokenDto * @author zxc * @date 2022/3/21 15:13 */ @PostMapping("community-list") - public Result> getCommunityList(@LoginUser TokenDto tokenDto){ + public Result> getCommunityList(@LoginUser TokenDto tokenDto) { return new Result>().ok(agencyService.getCommunityList(tokenDto)); } + + /** + * 通讯录树状结构 + * + * @param name + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/16 10:42 + */ + @GetMapping("/orgtree/{name}/{customerId}") + public Result> getAddressTree(@PathVariable String name, @PathVariable String customerId) { + List dto = agencyService.getAddressTree(name, customerId); + return new Result>().ok(dto); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 5e7cd8713a..8eb7a45da1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -295,26 +295,40 @@ public interface CustomerAgencyDao extends BaseDao { /** * desc:获取组织和网格的数据 树形sql + * * @param agencyId * @return */ ExtStaffPermissionResultDTO selectAgencyAndGridById(@Param("agencyId") String agencyId); + /** * @Description 【事件】社区服务热线 * @author sun **/ OrgMobileResultDTO getAgencyMobile(@Param("gridId") String gridId); - int updateSubAgencyAreaCodeById(@Param("customerId")String customerId, @Param("agencyId")String agencyId, @Param("operateUserId") String operateUserId); + int updateSubAgencyAreaCodeById(@Param("customerId") String customerId, @Param("agencyId") String agencyId, @Param("operateUserId") String operateUserId); /** * Desc: 查询组织下的社区 + * * @param customerId * @param agencyId * @author zxc * @date 2022/3/21 15:23 */ - List getCommunityList(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + List getCommunityList(@Param("customerId") String customerId, @Param("agencyId") String agencyId); + /** + * 通讯录树 + * + * @param name + * @param customerId + * @return java.util.List + * @author LZN + * @date 2022/5/16 10:44 + */ + List getAddressTree(@Param("name") String name, + @Param("customerId") String customerId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java index 629adcc17a..ea43abd53e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java @@ -66,6 +66,7 @@ public interface AgencyService { /** * 根据Id查询 + * * @param agencyId * @return */ @@ -75,6 +76,7 @@ public interface AgencyService { /** * 查询客户根级组织 + * * @param customerId */ CustomerAgencyDTO getCustomerRootAgency(String customerId); @@ -99,52 +101,63 @@ public interface AgencyService { AddAgencyResultDTO addAgencyV2(AddAgencyV2FormDTO formDTO); /** - * @Description 【地图配置】删除 * @param formDTO + * @Description 【地图配置】删除 * @author zxc * @date 2021/10/25 9:30 上午 */ void mapDelArea(MapDelAreaFormDTO formDTO); /** - * @Description 【地图配置】新增 * @param formDTO + * @Description 【地图配置】新增 * @author zxc * @date 2021/10/25 9:58 上午 */ void mapAddArea(MapAddAreaFormDTO formDTO); /** - * @Description 【地图配置】组织查询 * @param formDTO * @param tokenDto + * @Description 【地图配置】组织查询 * @author zxc * @date 2021/10/25 10:50 上午 */ MapOrgResultDTO mapOrg(MapOrgFormDTO formDTO, TokenDto tokenDto); /** - * @Description 查询楼栋信息 * @param formDTO + * @Description 查询楼栋信息 * @author zxc * @date 2021/11/2 9:18 上午 */ List baseInfoFamilyBuilding(BaseInfoFamilyBuildingFormDTO formDTO); /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ - List getSonAgencyId(String orgId,String type); + List getSonAgencyId(String orgId, String type); /** * Desc: 查询工作人员所属组织下的所有社区 + * * @param tokenDto * @author zxc * @date 2022/3/21 15:13 */ List getCommunityList(TokenDto tokenDto); + /** + * 通讯录树状结构 + * + * @param name + * @param customerId + * @return java.util.List + * @author LZN + * @date 2022/5/16 10:43 + */ + List getAddressTree(String name, String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index c07985347c..dd9e8009eb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -33,6 +33,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; 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.commons.tools.utils.NodeTreeUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerAgencyConstant; import com.epmet.constant.OrgInfoConstant; @@ -156,15 +157,15 @@ public class AgencyServiceImpl implements AgencyService { Result result = new Result(); CustomerAgencyEntity originalEntity = customerAgencyDao.selectById(formDTO.getAgencyId()); //当前客户下,同级组织中,组织名称不允许重复 - customerAgencyService.checkAgencyName(formDTO.getAgencyName(),originalEntity.getCustomerId(),originalEntity.getId(),originalEntity.getPid()); + customerAgencyService.checkAgencyName(formDTO.getAgencyName(), originalEntity.getCustomerId(), originalEntity.getId(), originalEntity.getPid()); originalEntity.setOrganizationName(formDTO.getAgencyName()); originalEntity.setCode(formDTO.getCode()); originalEntity.setContacts(formDTO.getContacts()); originalEntity.setMobile(formDTO.getMobile()); - if(StringUtils.isNotBlank(formDTO.getLatitude())){ + if (StringUtils.isNotBlank(formDTO.getLatitude())) { originalEntity.setLatitude(formDTO.getLatitude()); } - if(StringUtils.isNotBlank(formDTO.getLongitude())){ + if (StringUtils.isNotBlank(formDTO.getLongitude())) { originalEntity.setLongitude(formDTO.getLongitude()); } originalEntity.setCenterAddress(formDTO.getCenterAddress()); @@ -207,20 +208,20 @@ public class AgencyServiceImpl implements AgencyService { } //3:循环组织列表,查询每一个组织的所有上级组织重新拼接所有上级名称(allParentName)字段值 List editList = new ArrayList<>(); - agencyList.forEach(agency->{ + agencyList.forEach(agency -> { //3-1:查询当前组织的所有上级组织 List listStr = Arrays.asList(agency.getPids().split(":")); List parentList = customerAgencyDao.selectPAgencyById(listStr); //3-2:重新拼接当前组织的所有上级名称字段值,将组织Id和拼好的值存入集合 StringBuffer allParentName = new StringBuffer(); - parentList.forEach(parents->{ - if(StringUtils.isBlank(allParentName)){ + parentList.forEach(parents -> { + if (StringUtils.isBlank(allParentName)) { allParentName.append(parents.getName()); - }else { + } else { allParentName.append("-").append(parents.getName()); } }); - CustomerAgencyEntity customerAgencyEntity = ConvertUtils.sourceToTarget(agency,CustomerAgencyEntity.class); + CustomerAgencyEntity customerAgencyEntity = ConvertUtils.sourceToTarget(agency, CustomerAgencyEntity.class); customerAgencyEntity.setAllParentName(allParentName.toString()); customerAgencyEntity.setUpdatedBy(formDTO.getUserId()); editList.add(customerAgencyEntity); @@ -240,11 +241,12 @@ public class AgencyServiceImpl implements AgencyService { /** * 所有下家组织、网格、部门的area_code,parent_area_code置为空 * 直属组织parent_area_code、直属网格+直属部门的area_code更新为最新值 + * * @param customerId * @param formDTO * @param originalAreaCode */ - private void updateSubOrg(String customerId, EditAgencyFormDTO formDTO,String originalAreaCode) { + private void updateSubOrg(String customerId, EditAgencyFormDTO formDTO, String originalAreaCode) { //如果原来这个组织有area_code再去更新,没有其实应该按照pids去更新。 customerAgencyDao.updateSubAgencyAreaCodeById(customerId, formDTO.getAgencyId(), formDTO.getUserId()); //网格的 @@ -254,40 +256,39 @@ public class AgencyServiceImpl implements AgencyService { //1、更新直属网格的areaCode LambdaUpdateWrapper updateGridWrapper = new LambdaUpdateWrapper<>(); - updateGridWrapper.eq(CustomerGridEntity::getPid,formDTO.getAgencyId()) + updateGridWrapper.eq(CustomerGridEntity::getPid, formDTO.getAgencyId()) .set(CustomerGridEntity::getAreaCode, formDTO.getAreaCode()) - .set(CustomerGridEntity::getUpdatedBy,formDTO.getUserId()) - .set(CustomerGridEntity::getUpdatedTime,new Date()); - int subGridRows=customerGridDao.update(null,updateGridWrapper); - log.info(String.format("更新了%s个直属网格的area_code",subGridRows)); + .set(CustomerGridEntity::getUpdatedBy, formDTO.getUserId()) + .set(CustomerGridEntity::getUpdatedTime, new Date()); + int subGridRows = customerGridDao.update(null, updateGridWrapper); + log.info(String.format("更新了%s个直属网格的area_code", subGridRows)); // 2、更新直属部门的area_code LambdaUpdateWrapper updateDeptWrapper = new LambdaUpdateWrapper<>(); - updateDeptWrapper.eq(CustomerDepartmentEntity::getAgencyId,formDTO.getAgencyId()) + updateDeptWrapper.eq(CustomerDepartmentEntity::getAgencyId, formDTO.getAgencyId()) .set(CustomerDepartmentEntity::getAreaCode, formDTO.getAreaCode()) - .set(CustomerDepartmentEntity::getUpdatedBy,formDTO.getUserId()) - .set(CustomerDepartmentEntity::getUpdatedTime,new Date()); - int gridRows=customerDepartmentDao.update(null,updateDeptWrapper); - log.info(String.format("更新了%s个直属部门的area_code",gridRows)); + .set(CustomerDepartmentEntity::getUpdatedBy, formDTO.getUserId()) + .set(CustomerDepartmentEntity::getUpdatedTime, new Date()); + int gridRows = customerDepartmentDao.update(null, updateDeptWrapper); + log.info(String.format("更新了%s个直属部门的area_code", gridRows)); // 3、更新下级组织的parent_area_code LambdaUpdateWrapper updateAgencyWrapper = new LambdaUpdateWrapper<>(); - updateAgencyWrapper.eq(CustomerAgencyEntity::getPid,formDTO.getAgencyId()) + updateAgencyWrapper.eq(CustomerAgencyEntity::getPid, formDTO.getAgencyId()) .set(CustomerAgencyEntity::getParentAreaCode, formDTO.getAreaCode()) - .set(CustomerAgencyEntity::getUpdatedBy,formDTO.getUserId()) - .set(CustomerAgencyEntity::getUpdatedTime,new Date()); + .set(CustomerAgencyEntity::getUpdatedBy, formDTO.getUserId()) + .set(CustomerAgencyEntity::getUpdatedTime, new Date()); Integer rows = customerAgencyDao.update(null, updateAgencyWrapper); - log.info(String.format("更新了%s个下级组织的parent_area_code",rows)); + log.info(String.format("更新了%s个下级组织的parent_area_code", rows)); } /** - * * @param formDTO 编辑组织入参 - * @param parent 当前编辑组织的上级组织 + * @param parent 当前编辑组织的上级组织 * @return 返回组织区划编码 */ private String getAgencyNewAreaCode(EditAgencyFormDTO formDTO, CustomerAgencyEntity parent) { - String newAreaCode=""; + String newAreaCode = ""; if (!"other".equals(formDTO.getAreaCode())) { //校验除了当前组织外,areaCode是否被使用过 List agencyIds = customerAgencyDao.selectAgencyIdsByAreaCode(formDTO.getAreaCode(), formDTO.getAgencyId()); @@ -295,7 +296,7 @@ public class AgencyServiceImpl implements AgencyService { //已经被占用,提示 throw new RenException(EpmetErrorCode.AREA_CODE_ALREADY_EXISTS.getCode(), EpmetErrorCode.AREA_CODE_ALREADY_EXISTS.getMsg()); } - newAreaCode=formDTO.getAreaCode(); + newAreaCode = formDTO.getAreaCode(); } else { //如果选择的是other,需要自定义一个编码 AddAreaCodeFormDTO addAreaCodeFormDTO = new AddAreaCodeFormDTO(); @@ -310,16 +311,17 @@ public class AgencyServiceImpl implements AgencyService { throw new RenException("自定义area_code异常" + addAreaCodeResult.getInternalMsg()); } } - newAreaCode=addAreaCodeResult.getData(); + newAreaCode = addAreaCodeResult.getData(); } return newAreaCode; } /** * 如果当前客户开启了areaCode,校验参数逼单 + * * @param formDTO */ - private void checkEditAgencyFormDTO(EditAgencyFormDTO formDTO,CustomerAgencyEntity originalEntity) { + private void checkEditAgencyFormDTO(EditAgencyFormDTO formDTO, CustomerAgencyEntity originalEntity) { //根组织不允许修改 if (StringUtils.isNotBlank(originalEntity.getPid()) && !NumConstant.ZERO_STR.equals(originalEntity.getPid())) { //03.23:平阴线上版本与产品主线版本差距太大,平阴的修改组织只能修改组织名称。 @@ -364,14 +366,14 @@ public class AgencyServiceImpl implements AgencyService { return result; } //3:组织下有网格,不允许删除 - int gridCount = customerGridDao.selectGridCountByAgencyId(formDTO.getAgencyId()); + int gridCount = customerGridDao.selectGridCountByAgencyId(formDTO.getAgencyId()); if (gridCount > NumConstant.ZERO) { result.setCode(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getCode()); result.setMsg(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getMsg()); return result; } //4:删除当前机关组织(逻辑删) - if (customerAgencyDao.delByAgencyId(formDTO.getAgencyId(),loginUserUtil.getLoginUserId()) < NumConstant.ONE) { + if (customerAgencyDao.delByAgencyId(formDTO.getAgencyId(), loginUserUtil.getLoginUserId()) < NumConstant.ONE) { log.error(CustomerAgencyConstant.DEL_EXCEPTION); throw new RenException(CustomerAgencyConstant.DEL_EXCEPTION); } @@ -403,24 +405,24 @@ public class AgencyServiceImpl implements AgencyService { agencysResultDTO.setMobile(entity.getMobile()); agencysResultDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(entity.getCustomerId())); agencysResultDTO.setAreaName(StrConstant.EPMETY_STR); - agencysResultDTO.setAreaCode(StringUtils.isNotBlank(entity.getAreaCode())?entity.getAreaCode():StrConstant.EPMETY_STR); + agencysResultDTO.setAreaCode(StringUtils.isNotBlank(entity.getAreaCode()) ? entity.getAreaCode() : StrConstant.EPMETY_STR); //查询组织区划的名称 if (null != entity && StringUtils.isNotBlank(entity.getAreaCode())) { switch (entity.getLevel()) { case CustomerAgencyConstant.PROVINCE_LEVEL: - agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getProvince()) ? entity.getProvince():entity.getOrganizationName()); + agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getProvince()) ? entity.getProvince() : entity.getOrganizationName()); break; case CustomerAgencyConstant.CITY_LEVEL: - agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getCity()) ? entity.getCity():entity.getOrganizationName()); + agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getCity()) ? entity.getCity() : entity.getOrganizationName()); break; case CustomerAgencyConstant.DISTRICT: - agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getDistrict()) ? entity.getDistrict():entity.getOrganizationName()); + agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getDistrict()) ? entity.getDistrict() : entity.getOrganizationName()); break; case CustomerAgencyConstant.STREET_LEVEL: - agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getStreet()) ? entity.getStreet():entity.getOrganizationName()); + agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getStreet()) ? entity.getStreet() : entity.getOrganizationName()); break; case CustomerAgencyConstant.COMMUNITY_LEVEL: - agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getCommunity()) ? entity.getCommunity():entity.getOrganizationName()); + agencysResultDTO.setAreaName(StringUtils.isNotBlank(entity.getCommunity()) ? entity.getCommunity() : entity.getOrganizationName()); break; default: agencysResultDTO.setAreaName(StrConstant.EPMETY_STR); @@ -504,7 +506,7 @@ public class AgencyServiceImpl implements AgencyService { } customerAgencyRedis.set(agencyId, agencyInfoCache); } - CustomerAgencyDTO customerAgencyDTO=ConvertUtils.sourceToTarget(agencyInfoCache,CustomerAgencyDTO.class); + CustomerAgencyDTO customerAgencyDTO = ConvertUtils.sourceToTarget(agencyInfoCache, CustomerAgencyDTO.class); return customerAgencyDTO; } @@ -547,7 +549,7 @@ public class AgencyServiceImpl implements AgencyService { @Override public CustomerAgencyDTO getCustomerRootAgency(String customerId) { - CustomerAgencyDTO root=customerAgencyDao.getCustomerRootAgency(customerId); + CustomerAgencyDTO root = customerAgencyDao.getCustomerRootAgency(customerId); if (null != root) { root.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(customerId)); } @@ -652,17 +654,17 @@ public class AgencyServiceImpl implements AgencyService { } AddAgencyResultDTO resultDTO = new AddAgencyResultDTO(); resultDTO.setAreaCodeSwitch(formDTO.getAreaCodeSwitch()); - CustomerAgencyEntity insertEntity=this.constructInsertEntity(formDTO,parent); + CustomerAgencyEntity insertEntity = this.constructInsertEntity(formDTO, parent); //判断areaCodeSwitch:open: 选择地区编码必填;closed: 无需选择地区编码 if (CustomerAgencyConstant.AREA_CODE_SWITCH_OPEN.equals(formDTO.getAreaCodeSwitch())) { //校验areaCode是否被使用过 if (!"other".equals(formDTO.getAreaCode())) { - List agencyIds = customerAgencyDao.selectAgencyIdsByAreaCode(insertEntity.getAreaCode(),null); + List agencyIds = customerAgencyDao.selectAgencyIdsByAreaCode(insertEntity.getAreaCode(), null); if (CollectionUtils.isNotEmpty(agencyIds)) { //已经被占用,提示 throw new RenException(EpmetErrorCode.AREA_CODE_ALREADY_EXISTS.getCode(), EpmetErrorCode.AREA_CODE_ALREADY_EXISTS.getMsg()); } - }else{ + } else { //如果选择的是other,需要自定义一个编码 AddAreaCodeFormDTO addAreaCodeFormDTO = new AddAreaCodeFormDTO(); addAreaCodeFormDTO.setCurrentAreaLevel(formDTO.getLevel()); @@ -688,19 +690,19 @@ public class AgencyServiceImpl implements AgencyService { } /** - * @Description 【地图配置】删除 * @param formDTO + * @Description 【地图配置】删除 * @author zxc * @date 2021/10/25 9:30 上午 */ @Override public void mapDelArea(MapDelAreaFormDTO formDTO) { - customerAgencyDao.delMapArea(formDTO.getOrgId(),formDTO.getLevel()); + customerAgencyDao.delMapArea(formDTO.getOrgId(), formDTO.getLevel()); } /** - * @Description 【地图配置】新增 * @param formDTO + * @Description 【地图配置】新增 * @author zxc * @date 2021/10/25 9:58 上午 */ @@ -710,14 +712,14 @@ public class AgencyServiceImpl implements AgencyService { } /** + * @param formDTO + * @param tokenDto * @Description 【地图配置】组织查询 * 根据level查询去查询不同的表,类型,组织:agency,网格:grid,小区:neighborHood * 组织类型去查 customer_agency,看本级是不是 community,是,下级组织就是网格,查询customer_grid,不是,继续查customer_agency * 网格类型去查 查询customer_grid,下级去查 ic_neighbor_hood, * 当前组织没有经纬度的话,直接赋值根组织的经纬度, * 下级组织经纬度为空的话,直接赋值上级的经纬度 - * @param formDTO - * @param tokenDto * @author zxc * @date 2021/10/25 10:50 上午 */ @@ -725,38 +727,38 @@ public class AgencyServiceImpl implements AgencyService { public MapOrgResultDTO mapOrg(MapOrgFormDTO formDTO, TokenDto tokenDto) { MapOrgResultDTO result = new MapOrgResultDTO(); LambdaQueryWrapper qw = new LambdaQueryWrapper(); - qw.eq(CustomerAgencyEntity::getPid, NumConstant.ZERO_STR).eq(CustomerAgencyEntity::getDelFlag, NumConstant.ZERO_STR).eq(CustomerAgencyEntity::getCustomerId,tokenDto.getCustomerId()); + qw.eq(CustomerAgencyEntity::getPid, NumConstant.ZERO_STR).eq(CustomerAgencyEntity::getDelFlag, NumConstant.ZERO_STR).eq(CustomerAgencyEntity::getCustomerId, tokenDto.getCustomerId()); CustomerAgencyEntity customerAgencyEntity = customerAgencyDao.selectOne(qw); - if (StringUtils.isBlank(formDTO.getOrgId())){ + if (StringUtils.isBlank(formDTO.getOrgId())) { CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); - if (null == staffInfo){ + if (null == staffInfo) { return result; } formDTO.setOrgId(staffInfo.getAgencyId()); formDTO.setLevel(OrgInfoConstant.AGENCY); } - if (StringUtils.isNotBlank(customerAgencyEntity.getLatitude())){ + if (StringUtils.isNotBlank(customerAgencyEntity.getLatitude())) { result.setLatitude(new BigDecimal(customerAgencyEntity.getLatitude())); } - if (StringUtils.isNotBlank(customerAgencyEntity.getLongitude())){ + if (StringUtils.isNotBlank(customerAgencyEntity.getLongitude())) { result.setLongitude(new BigDecimal(customerAgencyEntity.getLongitude())); } - if (formDTO.getLevel().equals(OrgInfoConstant.AGENCY)){ + if (formDTO.getLevel().equals(OrgInfoConstant.AGENCY)) { CustomerAgencyEntity entity = customerAgencyDao.selectById(formDTO.getOrgId()); - result = ConvertUtils.sourceToTarget(entity,MapOrgResultDTO.class); + result = ConvertUtils.sourceToTarget(entity, MapOrgResultDTO.class); result.setName(entity.getOrganizationName()); result.setLevel(formDTO.getLevel()); result.setAgencyLevel(entity.getLevel()); //经纬度 如果本级没有则取根级组织的 根级没有就空着 - if (StringUtils.isNotBlank(entity.getLatitude())){ + if (StringUtils.isNotBlank(entity.getLatitude())) { result.setLatitude(new BigDecimal(entity.getLatitude())); } - if (StringUtils.isNotBlank(entity.getLongitude())){ + if (StringUtils.isNotBlank(entity.getLongitude())) { result.setLongitude(new BigDecimal(entity.getLongitude())); } - if (entity.getLevel().equals(OrgInfoConstant.COMMUNITY)){ + if (entity.getLevel().equals(OrgInfoConstant.COMMUNITY)) { List son = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.GRID); - if (CollectionUtils.isNotEmpty(son)){ + if (CollectionUtils.isNotEmpty(son)) { MapOrgResultDTO finalResult = result; son.forEach(s -> { s.setLatitude(StringUtils.isBlank(s.getLatitudeOrigin()) ? finalResult.getLatitude() : new BigDecimal(s.getLatitudeOrigin())); @@ -764,15 +766,15 @@ public class AgencyServiceImpl implements AgencyService { }); } result.setChildren(CollectionUtils.isEmpty(son) ? new ArrayList<>() : son); - }else { + } else { List dtoList = new ArrayList<>(); List son = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.AGENCY); - if (CollectionUtils.isNotEmpty(son)){ + if (CollectionUtils.isNotEmpty(son)) { dtoList.addAll(son); } // 直属网格 List directlySub = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.GRID); - if (CollectionUtils.isNotEmpty(directlySub)){ + if (CollectionUtils.isNotEmpty(directlySub)) { dtoList.addAll(directlySub); } for (MapSonOrgResultDTO d : dtoList) { @@ -781,21 +783,21 @@ public class AgencyServiceImpl implements AgencyService { } result.setChildren(dtoList); } - }else if (formDTO.getLevel().equals(OrgInfoConstant.GRID)){ + } else if (formDTO.getLevel().equals(OrgInfoConstant.GRID)) { CustomerGridEntity entity = customerGridDao.selectById(formDTO.getOrgId()); - result = ConvertUtils.sourceToTarget(entity,MapOrgResultDTO.class); + result = ConvertUtils.sourceToTarget(entity, MapOrgResultDTO.class); result.setName(entity.getGridName()); result.setLevel(formDTO.getLevel()); result.setAgencyLevel(OrgInfoConstant.GRID); //经纬度 如果本级没有则取根级组织的 根级没有就空着 - if (StringUtils.isNotBlank(entity.getLatitude())){ + if (StringUtils.isNotBlank(entity.getLatitude())) { result.setLatitude(new BigDecimal(entity.getLatitude())); } - if (StringUtils.isNotBlank(entity.getLongitude())){ + if (StringUtils.isNotBlank(entity.getLongitude())) { result.setLongitude(new BigDecimal(entity.getLongitude())); } List son = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.NEIGHBOR_HOOD); - if (CollectionUtils.isNotEmpty(son)){ + if (CollectionUtils.isNotEmpty(son)) { for (MapSonOrgResultDTO s : son) { s.setLatitude(StringUtils.isBlank(s.getLatitudeOrigin()) ? result.getLatitude() : new BigDecimal(s.getLatitudeOrigin())); s.setLongitude(StringUtils.isBlank(s.getLongitudeOrigin()) ? result.getLongitude() : new BigDecimal(s.getLongitudeOrigin())); @@ -807,35 +809,35 @@ public class AgencyServiceImpl implements AgencyService { } /** - * @Description 查询楼栋信息 * @param formDTO + * @Description 查询楼栋信息 * @author zxc * @date 2021/11/2 9:18 上午 */ @Override public List baseInfoFamilyBuilding(BaseInfoFamilyBuildingFormDTO formDTO) { List result = icBuildingDao.baseInfoFamilyBuilding(formDTO.getNeighborHoodId()); - if (CollectionUtils.isEmpty(result)){ + if (CollectionUtils.isEmpty(result)) { return new ArrayList<>(); } return result; } /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ @Override - public List getSonAgencyId(String orgId,String type) { + public List getSonAgencyId(String orgId, String type) { List result = new ArrayList<>(); - if (type.equals("community")){ + if (type.equals("community")) { result = customerAgencyDao.getSonGridId(orgId); - }else { + } else { result = customerAgencyDao.getSonAgencyId(orgId); } - if (CollectionUtils.isNotEmpty(result)){ + if (CollectionUtils.isNotEmpty(result)) { return result; } return new ArrayList<>(); @@ -843,6 +845,7 @@ public class AgencyServiceImpl implements AgencyService { /** * Desc: 查询工作人员所属组织下的所有社区 + * * @param tokenDto * @author zxc * @date 2022/3/21 15:13 @@ -850,20 +853,36 @@ public class AgencyServiceImpl implements AgencyService { @Override public List getCommunityList(TokenDto tokenDto) { CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); - if (null == staffInfo){ - throw new EpmetException("未查询到工作人员信息"+staffInfo.getStaffId()); + if (null == staffInfo) { + throw new EpmetException("未查询到工作人员信息" + staffInfo.getStaffId()); } String agencyId = staffInfo.getAgencyId(); AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId); - if (null == agencyInfo){ - throw new EpmetException("查询组织信息失败"+agencyInfo); + if (null == agencyInfo) { + throw new EpmetException("查询组织信息失败" + agencyInfo); } - if (agencyInfo.getLevel().equals(CustomerAgencyConstant.COMMUNITY_LEVEL)){ + if (agencyInfo.getLevel().equals(CustomerAgencyConstant.COMMUNITY_LEVEL)) { return new ArrayList<>(); } return customerAgencyDao.getCommunityList(tokenDto.getCustomerId(), agencyId); } + /** + * 通讯录树 + * + * @param name + * @param customerId + * @return java.util.List + * @author LZN + * @date 2022/5/16 10:45 + */ + @Override + public List getAddressTree(String name, String customerId) { + List list = customerAgencyDao.getAddressTree(name, customerId); + System.out.println(list); + return NodeTreeUtils.build(list); + } + private CustomerAgencyEntity constructInsertEntity(AddAgencyV2FormDTO formDTO, CustomerAgencyDTO parent) { CustomerAgencyEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, CustomerAgencyEntity.class); insertEntity.setOrganizationName(formDTO.getAgencyName()); @@ -879,8 +898,7 @@ public class AgencyServiceImpl implements AgencyService { insertEntity.setPids(parent.getPids().concat(StrConstant.COLON).concat(parent.getId())); insertEntity.setAllParentName(parent.getAllParentName().concat(StrConstant.HYPHEN).concat(parent.getOrganizationName())); } - switch(parent.getLevel()) - { + switch (parent.getLevel()) { case CustomerAgencyConstant.PROVINCE_LEVEL: insertEntity.setLevel(CustomerAgencyConstant.CITY_LEVEL); insertEntity.setProvince(parent.getProvince()); @@ -908,7 +926,7 @@ public class AgencyServiceImpl implements AgencyService { insertEntity.setCommunity(formDTO.getAreaName()); break; default: - log.info("parent.getLevel()="+parent.getLevel()); + log.info("parent.getLevel()=" + parent.getLevel()); break; } return insertEntity; diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index d8314ee8b5..fc0cd6aaa9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -744,6 +744,61 @@ AND CUSTOMER_ID = #{customerId} AND CONCAT(PIDS,':',ID) LIKE CONCAT('%',#{agencyId},'%') + UPDATE customer_agency From b2b62e09258143c01d34e67308d0f3ac7862839c Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 17 May 2022 10:02:00 +0800 Subject: [PATCH 002/416] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/AgencyServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index dd9e8009eb..e108376cbe 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -879,7 +879,6 @@ public class AgencyServiceImpl implements AgencyService { @Override public List getAddressTree(String name, String customerId) { List list = customerAgencyDao.getAddressTree(name, customerId); - System.out.println(list); return NodeTreeUtils.build(list); } From 6d3fbc65258eb81aad0fd0ab4380a357a50f0157 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 16:55:58 +0800 Subject: [PATCH 003/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcEventAttachmentDTO.java | 110 ++++++++++ .../com/epmet/dto/IcEventCategoryDTO.java | 79 +++++++ .../main/java/com/epmet/dto/IcEventDTO.java | 194 ++++++++++++++++++ .../com/epmet/dto/IcEventOperationLogDTO.java | 101 +++++++++ .../java/com/epmet/dto/IcEventReplyDTO.java | 79 +++++++ .../com/epmet/dto/IcEventScanTaskDTO.java | 87 ++++++++ .../epmet/dto/form/IcEventListFormDTO.java | 82 ++++++++ .../dto/result/IcEventListResultDTO.java | 3 + .../epmet/controller/IcEventController.java | 87 ++++++++ .../com/epmet/dao/IcEventAttachmentDao.java | 16 ++ .../com/epmet/dao/IcEventCategoryDao.java | 16 ++ .../main/java/com/epmet/dao/IcEventDao.java | 16 ++ .../com/epmet/dao/IcEventOperationLogDao.java | 16 ++ .../java/com/epmet/dao/IcEventReplyDao.java | 16 ++ .../com/epmet/dao/IcEventScanTaskDao.java | 16 ++ .../epmet/entity/IcEventAttachmentEntity.java | 80 ++++++++ .../epmet/entity/IcEventCategoryEntity.java | 49 +++++ .../java/com/epmet/entity/IcEventEntity.java | 164 +++++++++++++++ .../entity/IcEventOperationLogEntity.java | 71 +++++++ .../com/epmet/entity/IcEventReplyEntity.java | 49 +++++ .../epmet/entity/IcEventScanTaskEntity.java | 57 +++++ .../java/com/epmet/excel/IcEventExcel.java | 120 +++++++++++ .../service/IcEventAttachmentService.java | 78 +++++++ .../epmet/service/IcEventCategoryService.java | 78 +++++++ .../service/IcEventOperationLogService.java | 78 +++++++ .../epmet/service/IcEventReplyService.java | 78 +++++++ .../epmet/service/IcEventScanTaskService.java | 78 +++++++ .../com/epmet/service/IcEventService.java | 69 +++++++ .../impl/IcEventAttachmentServiceImpl.java | 83 ++++++++ .../impl/IcEventCategoryServiceImpl.java | 83 ++++++++ .../impl/IcEventOperationLogServiceImpl.java | 83 ++++++++ .../service/impl/IcEventReplyServiceImpl.java | 83 ++++++++ .../impl/IcEventScanTaskServiceImpl.java | 83 ++++++++ .../service/impl/IcEventServiceImpl.java | 80 ++++++++ .../resources/mapper/IcEventAttachmentDao.xml | 27 +++ .../resources/mapper/IcEventCategoryDao.xml | 22 ++ .../src/main/resources/mapper/IcEventDao.xml | 44 ++++ .../mapper/IcEventOperationLogDao.xml | 24 +++ .../main/resources/mapper/IcEventReplyDao.xml | 22 ++ .../resources/mapper/IcEventScanTaskDao.xml | 23 +++ 40 files changed, 2624 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java new file mode 100644 index 0000000000..9d1abdb1b7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java new file mode 100644 index 0000000000..1d79e0e415 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java new file mode 100644 index 0000000000..7233e80a75 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -0,0 +1,194 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,事件id + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件所属的网格Id + */ + private String gridId; + + /** + * 网格的所属组织 + */ + private String agencyId; + + /** + * 网格的所有组织Id + */ + private String gridPids; + + /** + * 报事的人【居民端/pc端居民Id】可为空 + */ + private String reportUserId; + + /** + * 报事人姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 反映渠道【字典表】 + */ + private String sourceType; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 纬度 + */ + private String latitude; + + /** + * 经度 + */ + private String longitude; + + /** + * 地址 + */ + private String address; + + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + /** + * 办结时间 + */ + private Date closeCaseTime; + + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 事件是否被阅读过;1已读;针对报事人待处理列表 + */ + private Integer readFlag; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Integer redDot; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + private Date latestOperatedTime; + + /** + * 是否解决:已解决 resolved,未解决 un_solved + */ + private String resolveStatus; + + /** + * 结案说明 + */ + private String closeRemark; + + /** + * 评论人 + */ + private String commentUserId; + + /** + * 评论内容 + */ + private String satisfaction; + + /** + * 评论时间 + */ + private Date commentTime; + + /** + * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) + */ + private String auditStatus; + + /** + * 审核理由 + */ + private String auditReason; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java new file mode 100644 index 0000000000..db707294fc --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -0,0 +1,101 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventOperationLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件id + */ + private String icEventId; + + /** + * 操作用户Id + */ + private String userId; + + /** + * 操作用户类型【居民端用户:resi_user;工作人员:staff;】 + */ + private String userIdentity; + + /** + * 1、发布事件:add + 2、复:reply; +3、立项:shift_project; +4、转需求:shift_demand +5、办结:close_case; + + + */ + private String actionCode; + + /** + * 1、发布事件:publish; +2、撤回事件:recall; +3、复:reply; +4、立项:shift_project; +5、办结:close_case; +6、选择是否已解决:choose_resolve; +7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + */ + private String actionDesc; + + /** + * 操作时间 + */ + private Date operateTime; + + /** + * 删除标识 1删除;0未删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java new file mode 100644 index 0000000000..b60d6fbdf5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventReplyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 回复人用户Id[工作人员ID] + */ + private String fromUserId; + + /** + * 内容 + */ + private String content; + + /** + * 报事人:组织-人名 + */ + private String userShowName; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java new file mode 100644 index 0000000000..d8433ce7a4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java @@ -0,0 +1,87 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventScanTaskDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件附件表主键,对应dataId + */ + private String icEventAttachmentId; + + /** + * 阿里云审核任务Id + */ + private String taskId; + + /** + * 审核状态【auditing: 审核中; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规;】 + */ + private String status; + + /** + * 附件类型(视频 - video、 语音 - voice 文件 - doc) + */ + private String attachmentType; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 操作人,API审核结果,存储为SCAN_USER或者APP_USER + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java new file mode 100644 index 0000000000..dd13a583fd --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【迁入管理】列表--接口入参 + * @Author sun + */ +@Data +public class IcEventListFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + + /** + * 网格ID + */ + private String gridId; + /** + * 所属小区ID + */ + private String villageId; + /** + * 所属楼宇Id + */ + private String buildId; + /** + * 单元id + */ + private String unitId; + /** + * 所属家庭Id + */ + private String homeId; + /** + * 姓名 + */ + private String name; + /** + * 是否享受福利【否:0 是:1】 + */ + private String isWeifare; + /** + * 手机号 + */ + private String mobile; + /** + * 身份证号 + */ + private String idCard; + /** + * 起始迁入时间 + */ + //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String startTime; + /** + * 终止迁入时间 + */ + //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String endTime; + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; + + private Boolean isPage = true; + private String customerId; + private String moveInId; + /** + * 当前登录用户id + */ + private String staffId; + /** + * 当前登录用户所属组织id + */ + private String agencyId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java new file mode 100644 index 0000000000..47bedb0b7f --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -0,0 +1,3 @@ +package com.epmet.dto.result; + +public class IcEventListResultDTO implements Serializable { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java new file mode 100644 index 0000000000..95df49df4c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -0,0 +1,87 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +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.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.excel.IcEventExcel; +import com.epmet.service.IcEventService; +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-05-17 + */ +@RestController +@RequestMapping("icEvent") +public class IcEventController { + + @Autowired + private IcEventService icEventService; + + @RequestMapping("list") + public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icEventService.list(formDTO)); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcEventDTO data = icEventService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcEventDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icEventService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcEventDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icEventService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icEventService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icEventService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcEventExcel.class); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java new file mode 100644 index 0000000000..481d4d9e2d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java new file mode 100644 index 0000000000..f9db23cc56 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java new file mode 100644 index 0000000000..f73270d115 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java new file mode 100644 index 0000000000..08fb7a82dc --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventOperationLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventOperationLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java new file mode 100644 index 0000000000..65a0b893d7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventReplyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventReplyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java new file mode 100644 index 0000000000..0666a818a0 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventScanTaskEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventScanTaskDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java new file mode 100644 index 0000000000..3f9534982f --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java @@ -0,0 +1,80 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_attachment") +public class IcEventAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java new file mode 100644 index 0000000000..7e96695161 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java @@ -0,0 +1,49 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_category") +public class IcEventCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java new file mode 100644 index 0000000000..58dd68e144 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -0,0 +1,164 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event") +public class IcEventEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件所属的网格Id + */ + private String gridId; + + /** + * 网格的所属组织 + */ + private String agencyId; + + /** + * 网格的所有组织Id + */ + private String gridPids; + + /** + * 报事的人【居民端/pc端居民Id】可为空 + */ + private String reportUserId; + + /** + * 报事人姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 反映渠道【字典表】 + */ + private String sourceType; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 纬度 + */ + private String latitude; + + /** + * 经度 + */ + private String longitude; + + /** + * 地址 + */ + private String address; + + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + /** + * 办结时间 + */ + private Date closeCaseTime; + + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 事件是否被阅读过;1已读;针对报事人待处理列表 + */ + private Integer readFlag; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Integer redDot; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + private Date latestOperatedTime; + + /** + * 是否解决:已解决 resolved,未解决 un_solved + */ + private String resolveStatus; + + /** + * 结案说明 + */ + private String closeRemark; + + /** + * 评论人 + */ + private String commentUserId; + + /** + * 评论内容 + */ + private String satisfaction; + + /** + * 评论时间 + */ + private Date commentTime; + + /** + * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) + */ + private String auditStatus; + + /** + * 审核理由 + */ + private String auditReason; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java new file mode 100644 index 0000000000..a3cdf53b51 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -0,0 +1,71 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_operation_log") +public class IcEventOperationLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件id + */ + private String icEventId; + + /** + * 操作用户Id + */ + private String userId; + + /** + * 操作用户类型【居民端用户:resi_user;工作人员:staff;】 + */ + private String userIdentity; + + /** + * 1、发布事件:add + 2、复:reply; +3、立项:shift_project; +4、转需求:shift_demand +5、办结:close_case; + + + */ + private String actionCode; + + /** + * 1、发布事件:publish; +2、撤回事件:recall; +3、复:reply; +4、立项:shift_project; +5、办结:close_case; +6、选择是否已解决:choose_resolve; +7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + */ + private String actionDesc; + + /** + * 操作时间 + */ + private Date operateTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java new file mode 100644 index 0000000000..e477a9cb2a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java @@ -0,0 +1,49 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_reply") +public class IcEventReplyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 回复人用户Id[工作人员ID] + */ + private String fromUserId; + + /** + * 内容 + */ + private String content; + + /** + * 报事人:组织-人名 + */ + private String userShowName; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java new file mode 100644 index 0000000000..bc51c9a0df --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java @@ -0,0 +1,57 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_scan_task") +public class IcEventScanTaskEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件附件表主键,对应dataId + */ + private String icEventAttachmentId; + + /** + * 阿里云审核任务Id + */ + private String taskId; + + /** + * 审核状态【auditing: 审核中; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规;】 + */ + private String status; + + /** + * 附件类型(视频 - video、 语音 - voice 文件 - doc) + */ + private String attachmentType; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java new file mode 100644 index 0000000000..fdf4ae9a0a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java @@ -0,0 +1,120 @@ +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-05-17 + */ +@Data +public class IcEventExcel { + + @Excel(name = "主键,事件id") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "事件所属的网格Id") + private String gridId; + + @Excel(name = "网格的所属组织") + private String agencyId; + + @Excel(name = "网格的所有组织Id") + private String gridPids; + + @Excel(name = "报事的人【居民端/pc端居民Id】可为空") + private String reportUserId; + + @Excel(name = "报事人姓名") + private String name; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "反映渠道【字典表】") + private String sourceType; + + @Excel(name = "事件内容") + private String eventContent; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "处理中:processing;已办结:closed_case") + private String status; + + @Excel(name = "办结时间") + private Date closeCaseTime; + + @Excel(name = "0:已回复 1:已转项目 1:已转需求") + private String operationType; + + @Excel(name = "项目、需求ID") + private String operationId; + + @Excel(name = "事件是否被阅读过;1已读;针对报事人待处理列表") + private Integer readFlag; + + @Excel(name = "报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; ") + private Integer redDot; + + @Excel(name = "最近一次操作时间(回复、立项、转需求、办结更新此列)") + private Date latestOperatedTime; + + @Excel(name = "是否解决:已解决 resolved,未解决 un_solved") + private String resolveStatus; + + @Excel(name = "结案说明") + private String closeRemark; + + @Excel(name = "评论人") + private String commentUserId; + + @Excel(name = "评论内容") + private String commentContent; + + @Excel(name = "评论时间") + private Date commentTime; + + @Excel(name = "事件审核状态") + private String auditStatus; + + @Excel(name = "审核理由") + private String auditReason; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java new file mode 100644 index 0000000000..2827802377 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.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.IcEventAttachmentDTO; +import com.epmet.entity.IcEventAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventAttachmentDTO + * @author generator + * @date 2022-05-17 + */ + IcEventAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java new file mode 100644 index 0000000000..182569670b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.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.IcEventCategoryDTO; +import com.epmet.entity.IcEventCategoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventCategoryDTO + * @author generator + * @date 2022-05-17 + */ + IcEventCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java new file mode 100644 index 0000000000..87706a7c52 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.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.IcEventOperationLogDTO; +import com.epmet.entity.IcEventOperationLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventOperationLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventOperationLogDTO + * @author generator + * @date 2022-05-17 + */ + IcEventOperationLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventOperationLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventOperationLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java new file mode 100644 index 0000000000..6f30e79285 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.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.IcEventReplyDTO; +import com.epmet.entity.IcEventReplyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventReplyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventReplyDTO + * @author generator + * @date 2022-05-17 + */ + IcEventReplyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventReplyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventReplyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java new file mode 100644 index 0000000000..593e0b3438 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.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.IcEventScanTaskDTO; +import com.epmet.entity.IcEventScanTaskEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventScanTaskService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventScanTaskDTO + * @author generator + * @date 2022-05-17 + */ + IcEventScanTaskDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventScanTaskDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventScanTaskDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java new file mode 100644 index 0000000000..4222b0b20c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -0,0 +1,69 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.entity.IcEventEntity; + +import java.util.Map; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventService extends BaseService { + + /** + * 默认查询 + * + * @param formDTO + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + PageData list(IcEventListFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return IcEventDTO + * @author generator + * @date 2022-05-17 + */ + IcEventDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java new file mode 100644 index 0000000000..1b2101cc28 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java @@ -0,0 +1,83 @@ +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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventAttachmentDao; +import com.epmet.dto.IcEventAttachmentDTO; +import com.epmet.entity.IcEventAttachmentEntity; +import com.epmet.service.IcEventAttachmentService; +import org.apache.commons.lang3.StringUtils; +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-05-17 + */ +@Service +public class IcEventAttachmentServiceImpl extends BaseServiceImpl implements IcEventAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventAttachmentDTO.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 IcEventAttachmentDTO get(String id) { + IcEventAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventAttachmentDTO dto) { + IcEventAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcEventAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventAttachmentDTO dto) { + IcEventAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcEventAttachmentEntity.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-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java new file mode 100644 index 0000000000..373ba4a279 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java @@ -0,0 +1,83 @@ +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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventCategoryDao; +import com.epmet.dto.IcEventCategoryDTO; +import com.epmet.entity.IcEventCategoryEntity; +import com.epmet.service.IcEventCategoryService; +import org.apache.commons.lang3.StringUtils; +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-05-17 + */ +@Service +public class IcEventCategoryServiceImpl extends BaseServiceImpl implements IcEventCategoryService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventCategoryDTO.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 IcEventCategoryDTO get(String id) { + IcEventCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventCategoryDTO dto) { + IcEventCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcEventCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventCategoryDTO dto) { + IcEventCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcEventCategoryEntity.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-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java new file mode 100644 index 0000000000..7eea43a96e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java @@ -0,0 +1,83 @@ +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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventOperationLogDao; +import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.entity.IcEventOperationLogEntity; +import com.epmet.service.IcEventOperationLogService; +import org.apache.commons.lang3.StringUtils; +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-05-17 + */ +@Service +public class IcEventOperationLogServiceImpl extends BaseServiceImpl implements IcEventOperationLogService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventOperationLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventOperationLogDTO.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 IcEventOperationLogDTO get(String id) { + IcEventOperationLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventOperationLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventOperationLogDTO dto) { + IcEventOperationLogEntity entity = ConvertUtils.sourceToTarget(dto, IcEventOperationLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventOperationLogDTO dto) { + IcEventOperationLogEntity entity = ConvertUtils.sourceToTarget(dto, IcEventOperationLogEntity.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-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java new file mode 100644 index 0000000000..86f09b900c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -0,0 +1,83 @@ +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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventReplyDao; +import com.epmet.dto.IcEventReplyDTO; +import com.epmet.entity.IcEventReplyEntity; +import com.epmet.service.IcEventReplyService; +import org.apache.commons.lang3.StringUtils; +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-05-17 + */ +@Service +public class IcEventReplyServiceImpl extends BaseServiceImpl implements IcEventReplyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventReplyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventReplyDTO.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 IcEventReplyDTO get(String id) { + IcEventReplyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventReplyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventReplyDTO dto) { + IcEventReplyEntity entity = ConvertUtils.sourceToTarget(dto, IcEventReplyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventReplyDTO dto) { + IcEventReplyEntity entity = ConvertUtils.sourceToTarget(dto, IcEventReplyEntity.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-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java new file mode 100644 index 0000000000..43a03b4865 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java @@ -0,0 +1,83 @@ +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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventScanTaskDao; +import com.epmet.dto.IcEventScanTaskDTO; +import com.epmet.entity.IcEventScanTaskEntity; +import com.epmet.service.IcEventScanTaskService; +import org.apache.commons.lang3.StringUtils; +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-05-17 + */ +@Service +public class IcEventScanTaskServiceImpl extends BaseServiceImpl implements IcEventScanTaskService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventScanTaskDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventScanTaskDTO.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 IcEventScanTaskDTO get(String id) { + IcEventScanTaskEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventScanTaskDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventScanTaskDTO dto) { + IcEventScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, IcEventScanTaskEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventScanTaskDTO dto) { + IcEventScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, IcEventScanTaskEntity.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-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java new file mode 100644 index 0000000000..f3d8ebbcb9 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -0,0 +1,80 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventDao; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.entity.IcEventEntity; +import com.epmet.service.IcEventService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { + + + @Override + public PageData list(IcEventListFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); + List list = null; + PageInfo pageInfo = new PageInfo<>(list); + if (!CollectionUtils.isEmpty(list)) {} + return new PageData<>(list, pageInfo.getTotal()); + } + + 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 IcEventDTO get(String id) { + IcEventEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventDTO dto) { + IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventDTO dto) { + IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.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-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml new file mode 100644 index 0000000000..c7479f2f96 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml new file mode 100644 index 0000000000..7198c5cfff --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml new file mode 100644 index 0000000000..85a4717acb --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml new file mode 100644 index 0000000000..2caf3ba943 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml new file mode 100644 index 0000000000..81991a3266 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml new file mode 100644 index 0000000000..ec954edfa2 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 86160bd88036a0647402538f1a490382dd724349 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 16:56:45 +0800 Subject: [PATCH 004/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcEventController.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 95df49df4c..e0c8ce8569 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -4,7 +4,6 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -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; @@ -14,15 +13,10 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.excel.IcEventExcel; import com.epmet.service.IcEventService; 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; - /** * 事件管理表 @@ -76,11 +70,6 @@ public class IcEventController { return new Result(); } - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icEventService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcEventExcel.class); - } From 43203d76d1a3619fb00690344cbafa637719c3d3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 17:30:12 +0800 Subject: [PATCH 005/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ProjectManageListFormDTO.java | 43 ++++++++++ .../result/ProjectManageListResultDTO.java | 82 +++++++++++++++++++ .../epmet/controller/ProjectController.java | 14 ++++ .../main/java/com/epmet/dao/ProjectDao.java | 7 +- .../com/epmet/service/ProjectService.java | 8 ++ .../service/impl/ProjectServiceImpl.java | 51 ++++++++++++ .../src/main/resources/mapper/ProjectDao.xml | 25 ++++++ 7 files changed, 226 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java new file mode 100644 index 0000000000..7065f356c4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/17 14:14 + * @DESC + */ +@Data +public class ProjectManageListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -3317804468566708838L; + + public interface ProjectManageListForm{} + + /** + * 标题 + */ + private String title; + + /** + * 转项目开始日期,eg:20220505 + */ + private String startDate; + + /** + * 转项目结束日期,eg:20220505 + */ + private String endDate; + + /** + * all:全部,closed:已关闭,pending:待处理 + */ + @NotBlank(message = "status不能为空",groups = ProjectManageListForm.class) + private String status; + + private String userId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java new file mode 100644 index 0000000000..03d82753ec --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 14:27 + * @DESC + */ +@Data +public class ProjectManageListResultDTO implements Serializable { + + private static final long serialVersionUID = 2374701362057175388L; + + /** + * 所顺网格 + */ + private String gridName; + private String gridId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 项目标题 + */ + private String title; + + /** + * 转项目时间 + */ + private String shiftProjectTime; + + /** + * 项目方案 + */ + private String projectScheme; + + /** + * 内部备注 + */ + private String internalRemark; + + /** + * 滞留天数 + */ + private Integer detentionDays; + + /** + * 状态 + */ + private String status; + private String statusValue; + + /** + * 处理部门 + */ + private List departmentNameList; + + private Date updatedTime; + private String isHandle; + + public ProjectManageListResultDTO() { + this.gridName = ""; + this.title = ""; + this.shiftProjectTime = ""; + this.projectScheme = ""; + this.internalRemark = ""; + this.detentionDays = NumConstant.ZERO; + this.status = ""; + this.departmentNameList = new ArrayList<>(); + this.projectId = ""; + } +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 372ff5fb5c..e496dced52 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -336,4 +336,18 @@ public class ProjectController { public Result eventAuditReset(@RequestParam("gridId")String gridId){ return new Result().ok(projectService.eventAuditReset(gridId)); } + + /** + * Desc: 列表【项目管理】 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/17 14:19 + */ + @PostMapping("project-list") + public Result projectList(@LoginUser TokenDto tokenDto,ProjectManageListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ProjectManageListFormDTO.ProjectManageListForm.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(projectService.projectList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index 5d1a7d578e..6c5e253e06 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.EventProjectInfoDTO; import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectStaffDTO; -import com.epmet.dto.form.LatestListFormDTO; -import com.epmet.dto.form.PatrolProjectFormDTO; -import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; @@ -300,4 +297,6 @@ public interface ProjectDao extends BaseDao { */ Integer selectEventStatus(@Param("gridId") String gridId); + List getProjectManageList(ProjectManageListFormDTO formDTO); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index d5f4ec3154..0f048acf8b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -385,4 +385,12 @@ public interface ProjectService extends BaseService { */ ProjectAuditResetResultDTO eventAuditReset(String gridId); + /** + * Desc: 列表【项目管理】 + * @param formDTO + * @author zxc + * @date 2022/5/17 14:19 + */ + PageData projectList(ProjectManageListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index a74ee75a3e..e107138a17 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -32,6 +32,7 @@ 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.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; @@ -3170,6 +3171,56 @@ public class ProjectServiceImpl extends BaseServiceImpl projectList(ProjectManageListFormDTO formDTO) { + PageData result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List projectManageList = baseDao.getProjectManageList(formDTO); + if (CollectionUtils.isNotEmpty(projectManageList)){ + // 获取滞留天数 + Integer days = getDays(ConvertUtils.sourceToTarget(formDTO, ProjectListFromDTO.class)); + projectManageList.forEach(p -> { + // 所属网格赋值 + if (StringUtils.isNotBlank(p.getGridId())){ + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(p.getGridId()); + if (null == gridInfo){ + throw new EpmetException("未查询到网格信息"+p.getGridId()); + } + p.setGridName(gridInfo.getGridNamePath()); + } + // 获取当前处理部门 + List departmentNameList = new ArrayList<>(); + if (ProjectConstant.CLOSED.equals(p.getStatus())) { + p.setDepartmentNameList(departmentNameList); + p.setDetentionDays(NumConstant.ZERO); + } else { + ProjectDTO projectDTO = ConvertUtils.sourceToTarget(p, ProjectDTO.class); + projectDTO.setId(p.getProjectId()); + if (p.getIsHandle().equals("unhandled")){ + String detentionDays = getDetentionDays(projectDTO); + if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > days) { + p.setDetentionDays(Integer.valueOf(detentionDays)); + } else { + p.setDetentionDays(Integer.valueOf(detentionDays)); + } + } + departmentNameList = baseDao.selectDepartmentNameList(projectDTO); + p.setDepartmentNameList(departmentNameList); + } + }); + result.setTotal(projectManageList.size()); + result.setList(projectManageList); + } + return result; + } + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index bef089e81f..b1cc58e362 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -564,4 +564,29 @@ AND p.status = 'pending' ORDER BY psp.created_time, p.created_time ASC + + + \ No newline at end of file From 3594e0d9ed9bcdf9d1bf5730d241500b5eff21c5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 17:39:30 +0800 Subject: [PATCH 006/416] =?UTF-8?q?sql=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.22__add_project_and_process.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql new file mode 100644 index 0000000000..aa58e9f0ae --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql @@ -0,0 +1,6 @@ + + +ALTER TABLE `project_process` ADD COLUMN `ASSISTANCE_UNIT_ID` VARCHAR(32) COMMENT '协办单位ID' AFTER `staff_id`; +ALTER TABLE `project_process` ADD COLUMN `ASSISTANCE_UNIT_TYPE` VARCHAR(1) COMMENT '协办单位类型,1社区自组织,2联建单位' AFTER `ASSISTANCE_UNIT_ID`; +ALTER TABLE `project` ADD COLUMN `GRID_ID` VARCHAR(32) DEFAULT'' COMMENT '网格ID' AFTER `AGENCY_ID`; + From da3c5a055ae2d3bd525780392b1f4d2077776881 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 17 May 2022 17:55:09 +0800 Subject: [PATCH 007/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB=EF=BC=9A=E6=96=87?= =?UTF-8?q?=E5=8C=96=E9=98=9F=E4=BC=8D=E6=A5=BC=E5=A7=94=E4=BC=9A=E8=80=81?= =?UTF-8?q?=E5=8F=8B=E4=BF=B1=E4=B9=90=E9=83=A8=E6=B2=BB=E5=AE=89=E5=B7=A1?= =?UTF-8?q?=E9=80=BB=E9=98=9F=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.16__self_org_category.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql new file mode 100644 index 0000000000..4804535be7 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql @@ -0,0 +1,6 @@ +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526493468551626753', 'self_org_category', '社区自组织类别', '社区自组织类别:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他', 1, 0, 0, '1', '2022-05-17 17:22:58', '1', '2022-05-17 17:22:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495882432299010', 1526493468551626753, '楼委会', 'lwh', '0', '楼委会', 2, 0, 0, '1', '2022-05-17 17:32:34', '1', '2022-05-17 17:32:34'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495969778679810', 1526493468551626753, '老友俱乐部', 'lyjlb', '0', '老友俱乐部', 3, 0, 0, '1', '2022-05-17 17:32:55', '1', '2022-05-17 17:32:55'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496168622243842', 1526493468551626753, '其他', 'other', '0', '其他', 5, 0, 0, '1', '2022-05-17 17:33:42', '1', '2022-05-17 17:33:51'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495766724034562', 1526493468551626753, '文化队伍', 'whdw', '0', '文化队伍', 1, 0, 0, '1', '2022-05-17 17:32:06', '1', '2022-05-17 17:32:40'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496054369402882', 1526493468551626753, '治安巡逻队', 'zaxld', '0', '治安巡逻队', 4, 0, 0, '1', '2022-05-17 17:33:15', '1', '2022-05-17 17:33:24'); \ No newline at end of file From 6fc89434b596f9b1247fe66d6cc76d9c53591823 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 17 May 2022 17:57:35 +0800 Subject: [PATCH 008/416] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A7=9F=E6=88=BF?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/IcResiUserEntity.java | 5 +++++ .../epmet/service/impl/IcResiUserServiceImpl.java | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index 8b3b5ad283..f17a1b8852 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -215,6 +215,11 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String isSpecial; + /** + * 是否租户【是:1 否:0】 + */ + private String isTenant; + /** * 文化程度【字典表】 */ 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 bc6582d1e0..75a30d6a97 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 @@ -1757,16 +1757,24 @@ public class IcResiUserServiceImpl extends BaseServiceImpl images = formDTO.getImages(); images.forEach(item -> item.setUserId(userDTO.getId())); - images.forEach(item-> icResiUserAttachmentService.save(item)); + images.forEach(item -> icResiUserAttachmentService.save(item)); + // 如果是已经存在的居民,并且是租客状态,需要更新原本的状态 + if (NumConstant.ONE_STR.equals(formDTO.getType())) { + IcResiUserEntity entity = new IcResiUserEntity(); + entity.setId(resiUserId); + entity.setIsTenant(NumConstant.ONE_STR); + updateById(entity); + } } else if (NumConstant.ONE_STR.equals(formDTO.getType())) { // 如果是新增的租客,需要新增一条信息,不存在的房东就不管了 IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); + entity.setIsTenant(NumConstant.ONE_STR); insert(entity); resiUserId = entity.getId(); // 变更记录表和变更记录明细表新增数据 LinkedHashMap map = new LinkedHashMap(); - map.put("AGENCY_ID",entity.getAgencyId()); - saveUserChangeRecord(tokenDto,map,resiUserId,entity.getName()); + map.put("AGENCY_ID", entity.getAgencyId()); + saveUserChangeRecord(tokenDto, map, resiUserId, entity.getName()); // 新增用户后保存头像信息 List images = formDTO.getImages(); images.forEach(item -> item.setUserId(entity.getId())); From eeb8afc950d634211664b1da96316d52395c2f2e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 18:01:32 +0800 Subject: [PATCH 009/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventListFormDTO.java | 38 ++---- .../dto/result/IcEventListResultDTO.java | 117 ++++++++++++++++++ 2 files changed, 126 insertions(+), 29 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index dd13a583fd..164439cb76 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -19,45 +19,32 @@ public class IcEventListFormDTO implements Serializable { /** * 所属小区ID */ - private String villageId; + private String sourceType; /** * 所属楼宇Id */ - private String buildId; + private String eventContent; /** * 单元id */ - private String unitId; - /** - * 所属家庭Id - */ - private String homeId; - /** - * 姓名 - */ private String name; /** - * 是否享受福利【否:0 是:1】 - */ - private String isWeifare; - /** - * 手机号 + * 所属家庭Id */ private String mobile; - /** - * 身份证号 - */ - private String idCard; /** * 起始迁入时间 */ - //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String startTime; /** * 终止迁入时间 */ - //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String endTime; + /** + * 手机号 + */ + private String status; + /** * 页码 */ @@ -68,15 +55,8 @@ public class IcEventListFormDTO implements Serializable { private Integer pageSize = 20; private Boolean isPage = true; + private String customerId; - private String moveInId; - /** - * 当前登录用户id - */ private String staffId; - /** - * 当前登录用户所属组织id - */ - private String agencyId; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 47bedb0b7f..8cf25dde15 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,3 +1,120 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Description 【迁入管理】列表--接口返参 + * @Author sun + */ +@Data public class IcEventListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 迁入Id + */ + private String eventId; + /** + * 网格ID + */ + private String gridId; + /** + * 网格名称 + */ + private String gridName; + /** + * 所属小区ID + */ + private String eventContent; + /** + * 所属小区名称 + */ + private List imageList; + /** + * 所属小区名称 + */ + private List voiceList; + /** + * 所属楼宇Id + */ + private String sourceTypeName; + /** + * 所属楼宇名称 + */ + private String address; + /** + * 单元id + */ + private String name; + /** + * 单元名称 + */ + private String mobile; + /** + * 所属家庭Id + */ + private String satisfaction; + /** + * 所属家庭名称 + */ + private String isResiUser; + /** + * 所属家庭Id + */ + private String status; + /** + * 姓名 + */ + private String createdUserId; + + /** + * 迁入时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date inTime; + + /** + * 迁入原因 + */ + private String inReason; + + /** + * 来源地区编码 + */ + private String sourceAddressCode; + /** + * 来源地区编码全路径 + */ + private String sourceAddressPathCode; + /** + * 来源地区地址 + */ + private String sourceAddress; + + /** + * 迁移证号码 + */ + private String moveNumber; + + /** + * 户主姓名 + */ + private String householderName; + + /** + * 与户主关系[字典表] + */ + private String householderRelation; + + /** + * 与户主关系[字典表] + */ + private String householderRelationName; + +} From ec6d243707d1bdce52869a15ed9bf847c2800804 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 17 May 2022 18:03:19 +0800 Subject: [PATCH 010/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.15__self_org_category.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql new file mode 100644 index 0000000000..4b02bfcfd2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql @@ -0,0 +1,2 @@ +alter table ic_community_self_organization +add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; \ No newline at end of file From 6a3d4c9c91be1b6b91ebbc851246bfd45ef22cd8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 19:16:07 +0800 Subject: [PATCH 011/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AEprocess=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/PartyUnitListFormDTO.java | 27 ++++++++++++++++ .../dto/result/PartyUnitListResultDTO.java | 27 ++++++++++++++++ .../feign/EpmetHeartOpenFeignClient.java | 12 +++++++ .../EpmetHeartOpenFeignClientFallback.java | 8 +++++ .../controller/IcPartyUnitController.java | 31 +++++++++---------- .../java/com/epmet/dao/IcPartyUnitDao.java | 18 +++++++++++ .../com/epmet/service/IcPartyUnitService.java | 28 +++++++---------- .../service/impl/IcPartyUnitServiceImpl.java | 20 ++++++++++++ .../main/resources/mapper/IcPartyUnitDao.xml | 28 +++++++++++++++++ .../dto/result/ProcessListV2ResultDTO.java | 18 +++++++++++ .../gov-project/gov-project-server/pom.xml | 5 +++ .../service/impl/ProjectTraceServiceImpl.java | 26 ++++++++++++++++ .../resources/mapper/ProjectProcessDao.xml | 4 ++- 13 files changed, 217 insertions(+), 35 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java new file mode 100644 index 0000000000..d2b78256ff --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 18:45 + * @DESC + */ +@Data +public class PartyUnitListFormDTO implements Serializable { + + private static final long serialVersionUID = 8059924463686783668L; + + /** + * 联建单位IDs + */ + private List partyUnitIds; + + /** + * 社区自组织IDs + */ + private List communitySelfIds; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java new file mode 100644 index 0000000000..c8244a0263 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 18:45 + * @DESC + */ +@Data +public class PartyUnitListResultDTO implements Serializable { + + private static final long serialVersionUID = 8059924463686783008L; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位名字 + */ + private String assistanceUnitName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 133cb6200c..29a60588a9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -7,8 +7,10 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.IcResiDemandDictDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory; @@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; +import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -107,4 +110,13 @@ public interface EpmetHeartOpenFeignClient { @PostMapping("/heart/icresidemanddict/demandoption") Result> getDemandOptions(); + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + @PostMapping("/heart/icpartyunit/getPartyUnitList") + Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index a0af921435..df9f67f0ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -8,13 +8,16 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.IcResiDemandDictDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import java.util.List; +import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -108,4 +111,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> getDemandOptions() { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getDemandOptions", null); } + + @Override + public Result> getPartyUnitList(PartyUnitListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 2d9ae33d75..d055a580eb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -1,20 +1,3 @@ -/** - * 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 com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO; @@ -36,9 +19,11 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcPartyUnitExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -57,6 +42,7 @@ import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -267,4 +253,15 @@ public class IcPartyUnitController { } } } + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + @PostMapping("/getPartyUnitList") + public Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){ + return new Result>().ok(icPartyUnitService.getPartyUnitList(formDTO)); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index faddda7644..6cc2e76293 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.apache.ibatis.annotations.Mapper; @@ -27,6 +28,7 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** * 联建单位 @@ -66,4 +68,20 @@ public interface IcPartyUnitDao extends BaseDao { List getDistribution(@Param("agencyId")String agencyId); int updateSatisfaction(@Param("partyUnitId") String serverId, @Param("satisfaction") BigDecimal satisfaction); + + /** + * Desc: 获取联建单位名字 + * @param ids + * @author zxc + * @date 2022/5/17 17:53 + */ + List getPartyUnitList(@Param("ids") List ids); + + /** + * Desc: 获取社区自组织名字 + * @param ids + * @author zxc + * @date 2022/5/17 18:51 + */ + List getCommunitySelfList(@Param("ids") List ids); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index d8e5285297..e6d3857757 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -1,20 +1,3 @@ -/** - * 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.service; import com.epmet.commons.mybatis.service.BaseService; @@ -25,8 +8,10 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.springframework.web.multipart.MultipartFile; @@ -34,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; +import java.util.Map; /** * 联建单位 @@ -158,4 +144,12 @@ public interface IcPartyUnitService extends BaseService { void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO); List queryListById(List partyUnitIds); + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + List getPartyUnitList(PartyUnitListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 3924261510..4c6e590798 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -51,8 +51,10 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceStatDTO; @@ -594,6 +596,24 @@ public class IcPartyUnitServiceImpl extends BaseServiceImplgetPartyUnitList(PartyUnitListFormDTO formDTO) { + List result = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(formDTO.getPartyUnitIds())){ + result.addAll(baseDao.getPartyUnitList(formDTO.getPartyUnitIds())); + } + if (CollectionUtils.isNotEmpty(formDTO.getCommunitySelfIds())){ + result.addAll(baseDao.getCommunitySelfList(formDTO.getCommunitySelfIds())); + } + return result; + } + private String getServiceMatter(Map map, String matter) { List matters = Arrays.asList(matter.split(StrConstant.COLON)); List list = matters.stream().map(map::get).collect(Collectors.toList()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index d7f02b7109..cd2dbda9ec 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -74,6 +74,34 @@ ID + + + + + + update ic_party_unit set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW() diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index cea1ce6288..22676c243a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -53,6 +54,23 @@ public class ProcessListV2ResultDTO implements Serializable { * 内部备注 */ private String internalRemark; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + @JsonIgnore + private String assistanceUnitType; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位名字 + */ + private String assistanceUnitName; + /** * 子节点 */ diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 5b54fd759d..a9db4bb0ad 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -24,6 +24,11 @@ epmet-third-client 2.0.0 + + com.epmet + epmet-heart-client + 2.0.0 + com.epmet epmet-commons-tools diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 7bf5b6e4df..40114f34a7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -111,6 +111,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS private BlockChainUploadService blockChainUploadService; @Autowired private YuShanSysApiService yuShanSysApiService; + @Autowired + private EpmetHeartOpenFeignClient heartOpenFeignClient; @Override @@ -240,6 +242,30 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processList.forEach(p -> internalFiles.stream().filter(f -> p.getProcessId().equals(f.getProcessId())).forEach(f -> p.getInternalFile().add(f))); } } + // 协办单位名字赋值 协办单位类型,1社区自组织,2联建单位 + Map> groupByType = processList.stream().filter(p -> StringUtils.isNotBlank(p.getAssistanceUnitType())).collect(Collectors.groupingBy(ProcessListV2ResultDTO::getAssistanceUnitType)); + List oneType = groupByType.get(NumConstant.ONE_STR); + List twoType = groupByType.get(NumConstant.TWO_STR); + PartyUnitListFormDTO partyUnitListFormDTO = new PartyUnitListFormDTO(); + if (CollectionUtils.isNotEmpty(oneType)){ + partyUnitListFormDTO.setCommunitySelfIds(oneType.stream().map(m -> m.getAssistanceUnitId()).collect(Collectors.toList())); + } + if (CollectionUtils.isNotEmpty(twoType)){ + partyUnitListFormDTO.setPartyUnitIds(twoType.stream().map(m -> m.getAssistanceUnitId()).collect(Collectors.toList())); + } + Result> partyUnitListResult = heartOpenFeignClient.getPartyUnitList(partyUnitListFormDTO); + if (!partyUnitListResult.success()){ + throw new EpmetException("查询协办单位失败"); + } + if (CollectionUtils.isNotEmpty(partyUnitListResult.getData())){ + partyUnitListResult.getData().forEach(u -> { + processList.forEach(p -> { + if (u.getAssistanceUnitId().equals(p.getAssistanceUnitId())){ + p.setAssistanceUnitName(u.getAssistanceUnitName()); + } + }); + }); + } return processList; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml index 0e2a2e5b3d..8a774f3c21 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml @@ -95,7 +95,9 @@ DEPARTMENT_NAME, PUBLIC_REPLY, INTERNAL_REMARK, - IS_SEND + IS_SEND, + ASSISTANCE_UNIT_TYPE, + ASSISTANCE_UNIT_ID FROM project_process WHERE DEL_FLAG = '0' AND PROJECT_ID = #{projectId} From 1f1f93dbd73dd94b4fce4083f1b71cac8bc77228 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 20:00:22 +0800 Subject: [PATCH 012/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 1 + .../epmet/dto/form/IcEventListFormDTO.java | 17 ++- .../dto/result/IcEventListResultDTO.java | 95 +++++++--------- .../gov-project/gov-project-server/pom.xml | 6 + .../main/java/com/epmet/dao/IcEventDao.java | 7 +- .../service/impl/IcEventServiceImpl.java | 54 ++++++++- .../resources/mapper/IcEventAttachmentDao.xml | 19 ---- .../resources/mapper/IcEventCategoryDao.xml | 14 --- .../src/main/resources/mapper/IcEventDao.xml | 106 ++++++++++++------ .../mapper/IcEventOperationLogDao.xml | 16 --- .../main/resources/mapper/IcEventReplyDao.xml | 14 --- .../resources/mapper/IcEventScanTaskDao.xml | 15 --- 12 files changed, 184 insertions(+), 180 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 6375462f14..da44078271 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -23,6 +23,7 @@ public enum DictTypeEnum { PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13), GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), + IC_EVENT("ic_event","事件管理",19), ; private final String code; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index 164439cb76..eb00fcf44d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -13,38 +13,37 @@ public class IcEventListFormDTO implements Serializable { private static final long serialVersionUID = 9156247659994638103L; /** - * 网格ID + * 所属网格 */ private String gridId; /** - * 所属小区ID + * 上报渠道 */ private String sourceType; /** - * 所属楼宇Id + * 事件内容 */ private String eventContent; /** - * 单元id + * 报事人 */ private String name; /** - * 所属家庭Id + * 手机号 */ private String mobile; /** - * 起始迁入时间 + * 起始上报时间yyyy-MM-dd HH:mm:ss */ private String startTime; /** - * 终止迁入时间 + * 终止上报时间yyyy-MM-dd HH:mm:ss */ private String endTime; /** - * 手机号 + * 状态【处理中:processing;已办结:closed_case】】 */ private String status; - /** * 页码 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 8cf25dde15..3e01ff4144 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,10 +1,9 @@ package com.epmet.dto.result; -import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; -import java.util.Date; import java.util.List; @@ -17,7 +16,7 @@ public class IcEventListResultDTO implements Serializable { private static final long serialVersionUID = 1L; /** - * 迁入Id + * 事件Id */ private String eventId; /** @@ -25,96 +24,88 @@ public class IcEventListResultDTO implements Serializable { */ private String gridId; /** - * 网格名称 + * 所属网格 */ private String gridName; /** - * 所属小区ID + * 事件内容 */ private String eventContent; /** - * 所属小区名称 + * 图片[url集合] */ private List imageList; /** - * 所属小区名称 + * 音频[url集合] */ private List voiceList; /** - * 所属楼宇Id + * 上报渠道[字典表] + */ + private String sourceType; + /** + * 上报渠道 */ private String sourceTypeName; /** - * 所属楼宇名称 + * 地址 */ private String address; /** - * 单元id + * 报事人 */ private String name; /** - * 单元名称 + * 手机号 */ private String mobile; /** - * 所属家庭Id + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ private String satisfaction; /** - * 所属家庭名称 + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ - private String isResiUser; + private String satisfactionName; /** - * 所属家庭Id + * 上报时间 */ - private String status; + private String createdTime; /** - * 姓名 + * 状态【处理中:processing;已办结:closed_case】】 */ - private String createdUserId; - - /** - * 迁入时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date inTime; - - /** - * 迁入原因 - */ - private String inReason; - - /** - * 来源地区编码 - */ - private String sourceAddressCode; + private String status; /** - * 来源地区编码全路径 + * 状态【处理中:processing;已办结:closed_case】】 */ - private String sourceAddressPathCode; + private String statusName; /** - * 来源地区地址 + * 事件创建人 */ - private String sourceAddress; + private String createdUserId; /** - * 迁移证号码 + * 事件附件 */ - private String moveNumber; + @JsonIgnore + private List attachmentList; + @Data + public static class Attachment { + /** + * url + */ + private String url; - /** - * 户主姓名 - */ - private String householderName; + /** + * 附件类型 + */ + private String type; - /** - * 与户主关系[字典表] - */ - private String householderRelation; + /** + * 附件类型 + */ + private Integer duration; + } - /** - * 与户主关系[字典表] - */ - private String householderRelationName; } diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index a9db4bb0ad..6ded692a78 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -137,6 +137,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f73270d115..1b3532ead4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,9 +1,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 事件管理表 * @@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventDao extends BaseDao { - + + List icEventList(IcEventListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f3d8ebbcb9..49a3d61286 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -3,24 +3,32 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.form.FileCommonDTO; +import com.epmet.commons.tools.enums.DictTypeEnum; 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.IcEventDao; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcMoveInListResultDTO; import com.epmet.entity.IcEventEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 事件管理表 @@ -30,14 +38,50 @@ import java.util.Map; */ @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private EpmetAdminOpenFeignClient adminOpenFeignClient; @Override public PageData list(IcEventListFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); - List list = null; + List list = baseDao.icEventList(formDTO); PageInfo pageInfo = new PageInfo<>(list); - if (!CollectionUtils.isEmpty(list)) {} + if (!CollectionUtils.isEmpty(list)) { + //查询网格名称(组织-网格) + List gridIds = list.stream().map(IcEventListResultDTO::getGridId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); + Result> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); + + //与户主关系字典表数据 + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + + //封装数据 + for (IcEventListResultDTO dto : list) { + if (gridInfoMap.containsKey(dto.getGridId())) { + dto.setGridName(gridInfoMap.get(dto.getGridId())); + } + if (StringUtils.isNotBlank(dto.getSourceType())) { + dto.setSourceTypeName(statusMap.get(dto.getSourceType())); + } + //每个事件对应的图片数据 + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + dto.getAttachmentList().forEach(file -> { + if ("image".equals(file.getType())) { + imageList.add(file.getUrl()); + } else if ("voice".equals(file.getType())) { + voiceList.add(file.getUrl()); + } + }); + dto.setImageList(imageList); + dto.setVoiceList(voiceList); + } + } return new PageData<>(list, pageInfo.getTotal()); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index c7479f2f96..23437af527 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -3,25 +3,6 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml index 7198c5cfff..3e2471e5f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -3,20 +3,6 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85a4717acb..dfd598e067 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -3,42 +3,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml index 2caf3ba943..259d73aa3e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -3,22 +3,6 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index 81991a3266..11d5ebf740 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -3,20 +3,6 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml index ec954edfa2..8e73ee8fee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml @@ -3,21 +3,6 @@ - - - - - - - - - - - - - - - \ No newline at end of file From 74b68302edf39bac28e5f3787c7f9c9efcba68cf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 20:18:06 +0800 Subject: [PATCH 013/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9+?= =?UTF-8?q?=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=BD=91=E6=A0=BCID=EF=BC=8C=E5=8D=8F=E5=8A=9E=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=20=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E6=9C=89=E4=B8=AATODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/dto/govproject/ProjectDTO.java | 2 ++ .../dataaggre/dto/govproject/ProjectProcessDTO.java | 10 ++++++++++ .../com/epmet/dto/form/EventToProjectFormDTO.java | 10 ++++++++++ .../com/epmet/dto/form/ProjectApprovalFormDTO.java | 12 +++++++++++- .../com/epmet/dto/result/ProcessListV2ResultDTO.java | 2 ++ .../main/java/com/epmet/entity/ProjectEntity.java | 2 ++ .../java/com/epmet/entity/ProjectProcessEntity.java | 10 ++++++++++ .../epmet/service/impl/ProjectTraceServiceImpl.java | 8 ++++++++ 8 files changed, 55 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java index 1a7f37a932..7eae78be1d 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java @@ -50,6 +50,8 @@ public class ProjectDTO implements Serializable { */ private String agencyId; + private String gridId; + /** * 来源:议题issue */ diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java index 8d566b72ef..1b8f73993b 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java @@ -109,6 +109,16 @@ public class ProjectProcessDTO implements Serializable { */ private String costWorkdays; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + /** * 删除标识:0.未删除 1.已删除 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java index 560ebfe2d8..ecc93498b7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java @@ -94,4 +94,14 @@ public class EventToProjectFormDTO implements Serializable { private String app; private String client; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java index 0ce775f1ad..69676d8e14 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java @@ -73,7 +73,17 @@ public class ProjectApprovalFormDTO implements Serializable { /** * 网格ID */ - @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class}) + @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class,ProjectApprovalFormDTO.ApprovalCategory.class}) private String gridId; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index 22676c243a..25d9dcebf7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -94,6 +94,8 @@ public class ProcessListV2ResultDTO implements Serializable { this.departmentName = ""; this.publicReply = ""; this.internalRemark = ""; + this.assistanceUnitName = ""; + this.assistanceUnitId = ""; this.publicFile = new ArrayList<>(); this.internalFile = new ArrayList<>(); this.subProcess = new ArrayList<>(); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java index 64ea885f2c..b5199a8392 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java @@ -45,6 +45,8 @@ public class ProjectEntity extends BaseEpmetEntity { */ private String agencyId; + private String gridId; + /** * 来源:议题issue 项目立项:agency */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java index a67f6b7eee..78599eb5bf 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java @@ -112,4 +112,14 @@ public class ProjectProcessEntity extends BaseEpmetEntity { */ private Integer isSend; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 40114f34a7..d597fedeff 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -408,6 +408,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS ProjectEntity projectEntity = new ProjectEntity(); projectEntity.setCustomerId(formDTO.getCustomerId()); projectEntity.setAgencyId(loginUser.getAgencyId()); + projectEntity.setGridId(formDTO.getGridId()); if (ProjectConstant.WORK_EVENT.equals(formDTO.getType())) { projectEntity.setOrigin(ProjectConstant.WORK_EVENT); projectEntity.setOriginId(formDTO.getGridId()); @@ -433,6 +434,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL); processEntity.setPublicReply(formDTO.getPublicReply()); processEntity.setInternalRemark(formDTO.getInternalRemark()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); agencyDeptGrid.getAgencyList().forEach(agency -> { if (loginUser.getAgencyId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); @@ -701,6 +704,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS public EventToProjectResultDTO eventToProject(EventToProjectFormDTO formDTO) { //事件已经立项,不能重复操作 ResiEventEntity resiEventEntity=resiEventService.getById(formDTO.getEventId()); + //TODO 兼容新事件表 + String gridId = ""; if(null==resiEventEntity||resiEventEntity.getShiftProject()){ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(),EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg()); } @@ -745,6 +750,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS projectEntity.setOriginId(formDTO.getEventId()); projectEntity.setTitle(formDTO.getTitle()); projectEntity.setBackGround(formDTO.getPublicReply()); + projectEntity.setGridId(gridId); projectEntity.setStatus(ProjectConstant.PENDING); projectEntity.setOrgIdPath(loginUser.getOrgIdPath()); projectEntity.setLocateAddress(null == formDTO.getLocateAddress() ? "" : formDTO.getLocateAddress()); @@ -761,6 +767,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL); processEntity.setPublicReply(formDTO.getPublicReply()); processEntity.setInternalRemark(formDTO.getInternalRemark()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); agencyDeptGrid.getAgencyList().forEach(agency -> { if (loginUser.getAgencyId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); From 68a27f1c68c26b27f79d8aaefaad6f694e1652ba Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 17 May 2022 20:34:12 +0800 Subject: [PATCH 014/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=8A=B6=E6=80=81=E6=AF=94=E4=BE=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventProcessAnalysisCommonFormDTO.java | 50 ++++++++++ .../dto/result/IcEventListResultDTO.java | 4 + .../result/ProcessStatusRatioResultDTO.java | 11 +++ .../epmet/controller/IcEventController.java | 22 +++++ .../main/java/com/epmet/dao/IcEventDao.java | 21 ++++- .../com/epmet/service/IcEventService.java | 4 + .../service/impl/IcEventServiceImpl.java | 91 ++++++++++++++++++- .../src/main/resources/mapper/IcEventDao.xml | 10 ++ 8 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java new file mode 100644 index 0000000000..ca2bf433c2 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * 事件处理分析通用 + */ +@Data +public class EventProcessAnalysisCommonFormDTO { + + /** + * 处理状态比例查询 + */ + public interface ProcessStatusRatioQuery {} + + /** + * 要查询的组织ID + */ + @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class }) + private String orgId; + + /** + * 组织类型。grid,agency + */ + @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class }) + private String orgType; + + /** + * 查询起始时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + private Date queryStartTime; + + /** + * 查询截止时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + private Date queryEndTime; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 47bedb0b7f..a262e832fc 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,3 +1,7 @@ package com.epmet.dto.result; +import java.io.Serializable; + public class IcEventListResultDTO implements Serializable { + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java new file mode 100644 index 0000000000..b166788691 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class ProcessStatusRatioResultDTO { + private Long processingCount; + private Long closedCount; + private Double processingRatio; + private Double closedRatio; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e0c8ce8569..008796b4c3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -11,12 +11,16 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.Date; + /** * 事件管理表 @@ -70,6 +74,24 @@ public class IcEventController { return new Result(); } + /** + * 处理状态比例查询 + * @param formDTO + * @return + */ + @PostMapping("processAnalysis/processStatusRatio") + public Result getProcessStatusRatio(@RequestBody EventProcessAnalysisCommonFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EventProcessAnalysisCommonFormDTO.ProcessStatusRatioQuery.class); + + String orgId = formDTO.getOrgId(); + String orgType = formDTO.getOrgType(); + Date queryStartTime = formDTO.getQueryStartTime(); + Date queryEndTime = formDTO.getQueryEndTime(); + + ProcessStatusRatioResultDTO r = icEventService.getProcessStatusRatio(orgId, orgType, queryStartTime, queryEndTime); + return new Result().ok(r); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f73270d115..b9236e1aa5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,8 +1,15 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 事件管理表 @@ -12,5 +19,17 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventDao extends BaseDao { - + + /** + * 查询事件处理状态比例 + * @param gridPids + * @param queryStartTime + * @param queryEndTime + * @return List[Map<状态key:事件数量>] + */ + @MapKey("status") + List> getProcessStatusRatio(@Param("customerId") String customerId, + @Param("gridPids") String gridPids, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 4222b0b20c..ba68529bf1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,8 +5,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import java.util.Date; import java.util.Map; /** @@ -66,4 +68,6 @@ public interface IcEventService extends BaseService { * @date 2022-05-17 */ void delete(String[] ids); + + ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f3d8ebbcb9..acfa82c3f6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -2,23 +2,40 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +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.utils.ConvertUtils; +import com.epmet.commons.tools.utils.EpmetRequestHolder; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcEventDao; +import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.AgencyInfoFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.AgencyInfoResultDTO; +import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import com.epmet.feign.GovOrgFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; @@ -29,8 +46,10 @@ import java.util.Map; * @since v1.0.0 2022-05-17 */ @Service -public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { +public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; @Override public PageData list(IcEventListFormDTO formDTO) { @@ -77,4 +96,74 @@ public class IcEventServiceImpl extends BaseServiceImpl> m = baseDao.getProcessStatusRatio(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), gridPids, queryStartTime, queryEndTime); + + ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO(); + + BigDecimal processingCount = null; + BigDecimal closedCount = null; + BigDecimal processingRatio = null; + BigDecimal closedRatio = null; + + for (Map entry : m) { + if ("processing".equals(entry.get("status"))) { + processingCount = new BigDecimal(entry.get("eventCount")); + } else if ("closed_case".equals(entry.get("status"))) { + closedCount = new BigDecimal(entry.get("eventCount")); + } + } + + // 根据个数,计算比例 + BigDecimal total = processingCount.add(closedCount); + processingRatio = processingCount.divide(total, 2, BigDecimal.ROUND_HALF_UP); + closedRatio = new BigDecimal(1).subtract(processingRatio); + + r.setProcessingCount(processingCount.longValue()); + r.setClosedCount(closedCount.longValue()); + r.setProcessingRatio(processingRatio.doubleValue()); + r.setClosedRatio(closedRatio.doubleValue()); + + return r; + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85a4717acb..6c46172fec 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -39,6 +39,16 @@ + \ No newline at end of file From a53c16f9188d2ce4ea1aa1fa07b6da987fd0faf3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 09:05:49 +0800 Subject: [PATCH 015/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=85=B3=E9=97=AD?= =?UTF-8?q?=EF=BC=8C=E6=B5=81=E8=BD=AC=EF=BC=8C=E5=93=8D=E5=BA=94=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ProjectClosedFromDTO.java | 10 ++++++++++ .../com/epmet/dto/form/ProjectResponseFormDTO.java | 10 ++++++++++ .../main/java/com/epmet/dto/form/TransferFormDTO.java | 10 ++++++++++ .../epmet/service/impl/ProjectProcessServiceImpl.java | 2 ++ .../com/epmet/service/impl/ProjectServiceImpl.java | 4 ++++ 5 files changed, 36 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java index 75cf13e64e..28e6177189 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java @@ -55,4 +55,14 @@ public class ProjectClosedFromDTO implements Serializable { * 内部备注对应文件集合 */ private List internalFile; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java index 3f7f2a1c13..1562997afa 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java @@ -55,4 +55,14 @@ public class ProjectResponseFormDTO implements Serializable { */ private List internalFile; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java index 4b9718122c..da8e7b8f3d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java @@ -40,5 +40,15 @@ public class TransferFormDTO implements Serializable { * 内部备注对应文件集合 */ private List internalFile; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 902fb92e6f..2b51ec32ce 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -646,6 +646,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl NumConstant.ZERO) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index e107138a17..d7ae034b35 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -709,6 +709,8 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 09:29:42 +0800 Subject: [PATCH 016/416] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E6=88=BF?= =?UTF-8?q?=E4=B8=80=E6=88=B7=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/HouseServiceImpl.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) 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 451d9e262d..eda0551555 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 @@ -597,19 +597,23 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { resiParam.setCustomerId(tokenDto.getCustomerId()); resiParam.setAgencyId(formDTO.getAgencyId()); resiParam.setGridId(formDTO.getGridId()); - resiParam.setPageSize(NumConstant.ONE_THOUSAND); + resiParam.setPageSize(NumConstant.TEN_THOUSAND); resiParam.setIsPage(false); - //查询级别 默认按照小区去查 + //查询级别 默认按照房屋的组织去查 int searchLevel = 0; + //如果小区id不为空 则直接查询小区内的居民 + if (StringUtils.isNotEmpty(formDTO.getNeighborHoodId())){ + searchLevel = 1; + } //如果楼宇id不为空 则直接查询楼宇内的居民 if (StringUtils.isNotEmpty(formDTO.getBuildingId())){ - searchLevel = 1; + searchLevel = 2; } - //如果有具体的查询套件 则直接降级为2 按照房屋Id 来查 + //如果有具体的查询套件 则直接按照房屋Id 来查 if (StringUtils.isNotEmpty(formDTO.getOwnerName()) || StringUtils.isNotEmpty(formDTO.getOwnerPhone()) || StringUtils.isNotEmpty(formDTO.getRentFlag())){ - searchLevel = 2; + searchLevel = 3; } PageData houseData = this.getHouseList(formDTO); @@ -620,12 +624,14 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { AtomicInteger num = new AtomicInteger((formDTO.getPageNo()-1) * formDTO.getPageSize()); houseData.getList().forEach(o ->{ - - resiParam.setNeighborHoodId(o.getNeighborHoodId()); + resiParam.setAgencyId(o.getAgencyId()); if (finalSearchLevel == 1){ - resiParam.setBuildingId(o.getBuildingId()); + resiParam.setNeighborHoodId(o.getNeighborHoodId()); } if (finalSearchLevel == 2){ + resiParam.setBuildingId(o.getBuildingId()); + } + if (finalSearchLevel == 3){ resiParam.setHouseId(o.getHouseId()); } this.getHouseMembers(resiParam, memberCacheMap,haveSearchCache); From 225d1fe5bba2af704322710b4d41ac6acf0e10de Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 09:41:37 +0800 Subject: [PATCH 017/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB,=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B7=B2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 1 + .../AddCommunitySelfOrganizationFormDTO.java | 3 +++ .../EditCommunitySelfOrganizationFormDTO.java | 6 +++++ .../CommunitySelfOrganizationListDTO.java | 9 ++++++++ .../IcCommunitySelfOrganizationEntity.java | 5 +++++ .../ExportCommunitySelfOrganizationExcel.java | 3 +++ .../ImportCommunitySelfOrganization.java | 4 ++++ ...cCommunitySelfOrganizationServiceImpl.java | 21 ++++++++++++++++-- .../mapper/IcCommunitySelfOrganizationDao.xml | 1 + .../templates/self_org_import_template.xlsx | Bin 8929 -> 8959 bytes 10 files changed, 51 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 6375462f14..aa3ee12c48 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -23,6 +23,7 @@ public enum DictTypeEnum { PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13), GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), + SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index 3a931390b8..c88f3a6192 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -26,6 +26,9 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) private String organizationName; + @NotBlank(message = "分类不能为空", groups = AddCommunitySelfOrganizationForm.class) + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java index 32556b2c27..6c8eb94baa 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -26,6 +26,12 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable { @NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class) private String organizationName; + /** + * 分类编码 + */ + @NotBlank(message = "categoryCode不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index b7a7627030..6ca4a94d25 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -33,6 +33,15 @@ public class CommunitySelfOrganizationListDTO implements Serializable { */ private String organizationName; + /** + * 分类,来源于字典表dictType=self_org_category; + */ + private String categoryCode; + /** + * 分类名称 + */ + private String categoryName; + /** * 服务事项 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 01db2e7108..0268a247fb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -67,6 +67,11 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { */ private String organizationName; + /** + * 分类,来源于字典表dictType=self_org_category; + */ + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java index 140d821022..73e0747958 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java @@ -15,6 +15,9 @@ public class ExportCommunitySelfOrganizationExcel { @Excel(name = "组织名称", width = 40, needMerge = true) private String organizationName; + @Excel(name = "分类", width = 40, needMerge = true) + private String categoryName; + @Excel(name = "组织人数", width = 20, needMerge = true) private Integer organizationPersonCount; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java index 10a10f21ad..a0e4133890 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -20,6 +20,10 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { @NotBlank(message = "不能为空") private String organizationName; + @Excel(name = "分类", needMerge = true) + @NotBlank(message = "不能为空") + private String categoryCode; + @Excel(name = "组织人数", needMerge = true) //@NotNull(message = "不能为空") private Integer organizationPersonCount; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 1443592a16..d7e53e3483 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; 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.exception.ExceptionUtils; @@ -43,6 +44,7 @@ import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import com.epmet.excel.CommunitySelfOrgImportExcel; import com.epmet.excel.ImportCommunitySelfOrganization; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.OssFeignClient; import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; @@ -51,6 +53,7 @@ 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.collections4.MapUtils; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -93,6 +96,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl page(Map params) { @@ -328,11 +333,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl resultDTOs = baseDao.selectCommunitySelfOrganizationList(formDTO); if (CollectionUtils.isNotEmpty(resultDTOs)){ + //获取分类名称字典 + Result> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); result.setTotal(resultDTOs.size()); AtomicReference sort = new AtomicReference<>(NumConstant.ONE); for (CommunitySelfOrganizationListDTO r : resultDTOs) { r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); r.setScore(null == pointMap.get(r.getOrgId()) ? NumConstant.ZERO : pointMap.get(r.getOrgId())); + //赋值分类名称 + r.setCategoryName(dictMap.get(r.getCategoryCode())); } result.setList(resultDTOs); } @@ -538,7 +548,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map categoryMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); list.forEach(l -> { IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class); e.setCustomerId(tokenDto.getCustomerId()); @@ -547,7 +558,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = new ArrayList<>(); AtomicReference bl = new AtomicReference<>(false); StringBuffer msg = new StringBuffer(""); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 0903571a1a..872f404c8e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -46,6 +46,7 @@ \ No newline at end of file From 03a1c8805771a30d0ecbe4177d073aff6573ce97 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 18 May 2022 10:11:49 +0800 Subject: [PATCH 019/416] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E5=90=8C=E6=97=B6=E6=9B=B4=E6=96=B0=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/entity/IcResiUserEntity.java | 5 +++++ .../src/main/java/com/epmet/service/IcResiUserService.java | 2 ++ .../java/com/epmet/service/impl/IcResiUserServiceImpl.java | 2 ++ 3 files changed, 9 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index f17a1b8852..5b70e7a653 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -220,6 +220,11 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String isTenant; + /** + * 是否流动人口【是:1 否:0】 + */ + private String isFloating; + /** * 文化程度【字典表】 */ 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 b9a9592509..d53232e75d 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 @@ -301,6 +301,8 @@ public interface IcResiUserService extends BaseService { /** * 租客房东根据身份证更新头像 + * 5.17更新头像的同时更新居民状态是租客 + * 5.18同时更新居民状态是流动 * * @param formDTO * @return com.epmet.commons.tools.utils.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 75a30d6a97..8cb037fa4e 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 @@ -1763,12 +1763,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 10:20:48 +0800 Subject: [PATCH 020/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB,=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B7=B2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddCommunitySelfOrganizationFormDTO.java | 16 ++++++++++------ .../IcCommunitySelfOrganizationServiceImpl.java | 10 +++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index c88f3a6192..29a338232f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; @@ -18,12 +20,13 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { private static final long serialVersionUID = -4996925380900678065L; - public interface AddCommunitySelfOrganizationForm{} + public interface AddCommunitySelfOrganizationForm extends CustomerClientShowGroup {} /** * 组织名称 */ - @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "组织名称不能为空",groups = AddCommunitySelfOrganizationForm.class) + @Length(max = 50,message = "组织名称最多输入50字",groups = AddCommunitySelfOrganizationForm.class) private String organizationName; @NotBlank(message = "分类不能为空", groups = AddCommunitySelfOrganizationForm.class) @@ -32,25 +35,25 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 组织人数 */ - @NotNull(message = "organizationPersonCount不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotNull(message = "组织人数不能为空",groups = AddCommunitySelfOrganizationForm.class) private Integer organizationPersonCount; /** * 负责人姓名 */ - @NotBlank(message = "principalName不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "负责人不能为空",groups = AddCommunitySelfOrganizationForm.class) private String principalName; /** * 负责人电话 */ - @NotBlank(message = "principalPhone不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "联系电话",groups = AddCommunitySelfOrganizationForm.class) private String principalPhone; /** * 服务事项 */ - @NotBlank(message = "serviceItem不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "服务事项不能为空",groups = AddCommunitySelfOrganizationForm.class) private String serviceItem; /** @@ -66,6 +69,7 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 经度 */ + @NotBlank(message = "位置坐标不能为空",groups = AddCommunitySelfOrganizationForm.class) private String longitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index d7e53e3483..6e51228e0f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -318,6 +318,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); + if (formDTO.getIsPage()){ PageInfo objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); @@ -326,6 +331,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl resultDTOs = baseDao.selectCommunitySelfOrganizationList(formDTO); if (CollectionUtils.isNotEmpty(resultDTOs)){ - //获取分类名称字典 - Result> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); - Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); result.setTotal(resultDTOs.size()); AtomicReference sort = new AtomicReference<>(NumConstant.ONE); for (CommunitySelfOrganizationListDTO r : resultDTOs) { From 7ea5371a5bc81c7e971538a0e1bf4044b9911bc3 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 18 May 2022 10:30:29 +0800 Subject: [PATCH 021/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=88=97=E8=A1=A8=20=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=A5=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessAnalysisEventListFormDTO.java | 47 +++++++ .../epmet/dto/result/IcEventResultDTO.java | 18 +++ .../epmet/enums/EcEventProcessStatusEnum.java | 40 ++++++ .../gov-project/gov-project-server/pom.xml | 5 + .../epmet/controller/IcEventController.java | 24 +++- .../main/java/com/epmet/dao/IcEventDao.java | 22 +++ .../com/epmet/service/IcEventService.java | 4 + .../service/impl/IcEventServiceImpl.java | 128 ++++++++++++------ .../src/main/resources/mapper/IcEventDao.xml | 40 +++++- 9 files changed, 285 insertions(+), 43 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java new file mode 100644 index 0000000000..c7b9026a65 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +@Data +public class ProcessAnalysisEventListFormDTO { + + /** + * 组织id + */ + @NotBlank(message = "组织ID为必填项") + private String orgId; + /** + * 组织类型grid,agency + */ + @NotBlank(message = "组织类型为必填项") + private String orgType; + /** + * 查询起始时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项") + private Date queryStartTime; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项") + private Date queryEndTime; + + /** + * 处理状态processing, closed_case + */ + private String processStatus; + /** + * 事件分类code + */ + private String categoryCode; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java new file mode 100644 index 0000000000..74ee36b9d4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class IcEventResultDTO { + private String eventId; + private String eventContent; + private String gridId; + private String gridName; + private String sourceType; + private String sourceTypeName; + private String processStatus; + private String processStatusName; + private String reportUserId; + private String reportUserName; + private String mobile; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java new file mode 100644 index 0000000000..b0878ded9c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java @@ -0,0 +1,40 @@ +package com.epmet.enums; + +/** + * ic事件状态枚举 + */ +public enum EcEventProcessStatusEnum { + + PROCESSING("processing", "处理中"), + CLOSED_CASE("closed_case", "已完成"); + + private String processStatus; + private String processStatusName; + + EcEventProcessStatusEnum(String processStatus, String processStatusName) { + this.processStatus = processStatus; + this.processStatusName = processStatusName; + } + + /** + * 根据sourceType查询对应的枚举对象 + * @param processStatus + * @return + */ + public static EcEventProcessStatusEnum getObjectBySourceType(String processStatus) { + for (EcEventProcessStatusEnum e : EcEventProcessStatusEnum.values()) { + if (e.getProcessStatus().equals(processStatus)) { + return e; + } + } + return null; + } + + public String getProcessStatus() { + return processStatus; + } + + public String getProcessStatusName() { + return processStatusName; + } +} diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index a9db4bb0ad..375daa8dd2 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -137,6 +137,11 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 008796b4c3..9d94d20e38 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,7 +13,9 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; @@ -75,7 +77,7 @@ public class IcEventController { } /** - * 处理状态比例查询 + * 事件分类分析-处理状态比例查询 * @param formDTO * @return */ @@ -92,6 +94,26 @@ public class IcEventController { return new Result().ok(r); } + /** + * 事件分类分析-事件列表 + * @param input + * @return + */ + @PostMapping("processAnalysis/eventList") + public Result> listProcessAnalysisEvents(@RequestBody ProcessAnalysisEventListFormDTO input) { + ValidatorUtils.validateEntity(input); + String orgId = input.getOrgId(); + String orgType = input.getOrgType(); + String categoryCode = input.getCategoryCode(); + Date queryStartTime = input.getQueryStartTime(); + Date queryEndTime = input.getQueryEndTime(); + Integer pageNo = input.getPageNo(); + Integer pageSize = input.getPageSize(); + String processStatus = input.getProcessStatus(); + PageData page = icEventService.listProcessAnalysisEvents(orgId, orgType, categoryCode, processStatus, queryStartTime, queryEndTime, pageNo, pageSize); + return new Result>().ok(page); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index b9236e1aa5..f9cdf7beff 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,6 +1,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; @@ -29,7 +30,28 @@ public interface IcEventDao extends BaseDao { */ @MapKey("status") List> getProcessStatusRatio(@Param("customerId") String customerId, + @Param("orgType") String orgType, + @Param("orgId") String orgId, @Param("gridPids") String gridPids, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * 事件处理分析-时间列表 + * @param customerId + * @param gridPids + * @param categoryCode + * @param processStatus + * @param queryStartTime 包含 + * @param queryEndTime 包含 + * @return + */ + List listProcessAnalysisEvents(@Param("customerId") String customerId, + @Param("orgType") String orgType, + @Param("orgId") String orgId, + @Param("gridPids") String gridPids, + @Param("categoryCode") String categoryCode, + @Param("processStatus") String processStatus, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index ba68529bf1..e3ad6ba353 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; @@ -70,4 +71,7 @@ public interface IcEventService extends BaseService { void delete(String[] ids); ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); + + PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, + Date queryEndTime, Integer pageNo, Integer pageSize); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index acfa82c3f6..5f7beffe5b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -9,20 +9,19 @@ 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.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.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.AgencyInfoFormDTO; import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.AgencyInfoResultDTO; -import com.epmet.dto.result.GridInfoResultDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; -import com.epmet.feign.GovOrgFeignClient; +import com.epmet.enums.EcEventProcessStatusEnum; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; @@ -51,6 +50,9 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); @@ -96,53 +98,51 @@ public class IcEventServiceImpl extends BaseServiceImpl> m = baseDao.getProcessStatusRatio(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), gridPids, queryStartTime, queryEndTime); + List> m = baseDao.getProcessStatusRatio( + EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, queryStartTime, queryEndTime); ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO(); - BigDecimal processingCount = null; - BigDecimal closedCount = null; + BigDecimal processingCount = new BigDecimal(0); + BigDecimal closedCount = new BigDecimal(0);; BigDecimal processingRatio = null; BigDecimal closedRatio = null; @@ -166,4 +166,52 @@ public class IcEventServiceImpl extends BaseServiceImpl listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, + Date queryStartTime, Date queryEndTime, Integer pageNo, + Integer pageSize) { + + // 1.分类字典 + Map eventSourceTypeDict = getResultDataOrThrowsException(adminOpenFeignClient.dictMap("ic_event_source_type"), + ServiceConstant.EPMET_ADMIN_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), + "【IC事件分析】查询上报渠道字典失败", + "【IC事件分析】查询上报渠道字典失败"); + + String gridPids = null; + if ("agency".equals(orgType)) { + gridPids = getEventGridPids(orgId); + } + + // 2.分页查询 + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.listProcessAnalysisEvents( + EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime + ,queryEndTime); + + // 3.补充数据 + for (IcEventResultDTO event : list) { + // 网格信息 + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(event.getGridId()); + if (gridInfo != null) { + event.setGridName(gridInfo.getGridName()); + } else { + logger.error("【IC事件分析】网格ID[{}]查询网格信息失败", event.getGridId()); + } + + // 上报渠道 + event.setSourceTypeName(eventSourceTypeDict.get(event.getSourceType())); + + // 状态 + EcEventProcessStatusEnum sourceTypeEnum = EcEventProcessStatusEnum.getObjectBySourceType(event.getProcessStatus()); + if (sourceTypeEnum != null) { + event.setProcessStatusName(sourceTypeEnum.getProcessStatusName()); + } + } + + PageInfo pageInfo = new PageInfo<>(list); + + return new PageData<>(list, pageInfo.getTotal()); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 6c46172fec..76202bb3fa 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -42,13 +42,49 @@ + + \ No newline at end of file From f2195b56c01a67b753b1b65b0c254852d73d7776 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 10:33:22 +0800 Subject: [PATCH 022/416] =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SatisfactionEvaluationListFormDTO.java | 23 ++++++++++++ .../SatisfactionEvaluationListResultDTO.java | 35 +++++++++++++++++++ .../epmet/controller/ProjectController.java | 12 +++++++ .../dao/ProjectSatisfactionDetailDao.java | 13 ++++--- .../com/epmet/service/ProjectService.java | 25 +++++-------- .../service/impl/ProjectServiceImpl.java | 28 +++++++++++++-- .../mapper/ProjectSatisfactionDetailDao.xml | 12 +++++++ 7 files changed, 124 insertions(+), 24 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java new file mode 100644 index 0000000000..3309a89426 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/18 09:57 + * @DESC + */ +@Data +public class SatisfactionEvaluationListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 1790517675681175478L; + + public interface SatisfactionEvaluationListForm{} + + @NotBlank(message = "projectId不能为空",groups = SatisfactionEvaluationListForm.class) + private String projectId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java new file mode 100644 index 0000000000..613449a6cf --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/18 09:58 + * @DESC + */ +@Data +public class SatisfactionEvaluationListResultDTO implements Serializable { + + private static final long serialVersionUID = 4086193179665858119L; + + /** + * 评价人 + */ + private String evaluationUser; + + @JsonIgnore + private String userId; + + /** + * 评价时间 + */ + private String time; + + /** + * 评价内容 + */ + private String content; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index e1744afd2b..f76ac99242 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -351,4 +351,16 @@ public class ProjectController { formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(projectService.projectList(formDTO)); } + + /** + * Desc: 满意度评价列表 + * @param formDTO + * @author zxc + * @date 2022/5/18 10:03 + */ + @PostMapping("satisfaction-evaluation-list") + public Result> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); + return new Result>().ok(projectService.satisfactionEvaluationList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java index ca0c2a492e..a8f03be57e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java @@ -20,10 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.ProjectEvaluationListFormDTO; import com.epmet.dto.form.ProjectInitEvaluationFormDTO; -import com.epmet.dto.result.EvaluationListResultDTO; -import com.epmet.dto.result.ProjectEvaluateDetailResultDTO; -import com.epmet.dto.result.ProjectEvaluateInfoResultDTO; -import com.epmet.dto.result.ProjectEvaluationListResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectSatisfactionDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -69,4 +66,12 @@ public interface ProjectSatisfactionDetailDao extends BaseDao selectProjectEvaluateDetail(@Param("projectIds")List projectIds); + /** + * Desc: 满意度评价列表 + * @param projectId + * @author zxc + * @date 2022/5/18 10:03 + */ + List satisfactionEvaluationList(@Param("projectId")String projectId); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 0f048acf8b..9b6dc38247 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -1,20 +1,3 @@ -/** - * 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.service; import com.epmet.commons.mybatis.service.BaseService; @@ -393,4 +376,12 @@ public interface ProjectService extends BaseService { */ PageData projectList(ProjectManageListFormDTO formDTO); + /** + * Desc: 满意度评价列表 + * @param formDTO + * @author zxc + * @date 2022/5/18 10:03 + */ + List satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 5fbd58c5c1..32e62465a6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -42,6 +42,7 @@ import com.epmet.commons.tools.utils.*; import com.epmet.constant.*; import com.epmet.dao.ProjectDao; import com.epmet.dao.ProjectOrgRelationDao; +import com.epmet.dao.ProjectSatisfactionDetailDao; import com.epmet.dao.ProjectSatisfactionStatisticsDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -96,8 +97,7 @@ import java.util.stream.Collectors; @Slf4j public class ProjectServiceImpl extends BaseServiceImpl implements ProjectService { private Logger logger = LogManager.getLogger(ProjectServiceImpl.class); - @Autowired - private ProjectRedis projectRedis; + @Autowired private CustomerProjectParameterService parameterService; @Autowired @@ -150,6 +150,8 @@ public class ProjectServiceImpl extends BaseServiceImpl satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); + List result = pageInfo.getList(); + if (CollectionUtils.isNotEmpty(result)){ + Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); + if (!listResult.success()){ + throw new EpmetException("查询user信息失败..."); + } + listResult.getData().forEach(u -> result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); + } + return result; + } + + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 * @param categories diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml index 595060968d..7bfae0a648 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml @@ -75,4 +75,16 @@ ) + + + \ No newline at end of file From e169fc1c33222798f3efee5ddca0be1a9c855c09 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 18 May 2022 10:33:24 +0800 Subject: [PATCH 023/416] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8E=92=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/HouseController.java | 6 ++++++ .../java/com/epmet/service/impl/HouseServiceImpl.java | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 60c9bff074..312a9a2c84 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -335,6 +335,7 @@ public class HouseController implements ResultDataResolver { @NoRepeatSubmit @RequestMapping(value = "/exportHouseUser") public void exportHouseUser(@LoginUser TokenDto tokenDto, @RequestBody IcHouseListFormDTO formDTO, HttpServletResponse response) throws Exception { + long startTime = System.currentTimeMillis(); formDTO.setIsPage(false); formDTO.setPageSize(NumConstant.TEN_THOUSAND); //效验数据 @@ -371,15 +372,19 @@ public class HouseController implements ResultDataResolver { .build(); PageData dataList = null; Cache haveSearchCache = CacheBuilder.newBuilder().maximumSize(NumConstant.ONE_HUNDRED).expireAfterWrite(NumConstant.THIRTY, TimeUnit.MINUTES).build(); + do { dataList = houseService.getHouseUser(tokenDto,formDTO,haveSearchCache); formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); + long start = System.currentTimeMillis(); excelWriter.write(dataList.getList(), writeSheet); + log.info("getHouseUser doWrite cost:{}ms",System.currentTimeMillis() - start); if (CollectionUtils.isEmpty(dataList.getList())){ break; } }while (dataList.getTotal() == formDTO.getPageSize()); + //获取导出配置 haveSearchCache.invalidateAll(); } catch (EpmetException e) { @@ -394,6 +399,7 @@ public class HouseController implements ResultDataResolver { if (excelWriter != null){ excelWriter.finish(); } + log.info("getHouseUser final cost:{}ms",System.currentTimeMillis() - startTime); } } 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 eda0551555..1e6676733e 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 @@ -615,8 +615,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (StringUtils.isNotEmpty(formDTO.getOwnerName()) || StringUtils.isNotEmpty(formDTO.getOwnerPhone()) || StringUtils.isNotEmpty(formDTO.getRentFlag())){ searchLevel = 3; } - + long start = System.currentTimeMillis(); PageData houseData = this.getHouseList(formDTO); + log.info("getHouseUser getHoseList cost:{}ms",System.currentTimeMillis() - start); List resultList = new ArrayList<>(); PageData result = new PageData<>(resultList,houseData.getList().size()); @@ -634,6 +635,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (finalSearchLevel == 3){ resiParam.setHouseId(o.getHouseId()); } + this.getHouseMembers(resiParam, memberCacheMap,haveSearchCache); List members = memberCacheMap.getIfPresent(o.getHouseId()); @@ -676,11 +678,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { * @param haveSearchCache */ public void getHouseMembers(RentTenantDataFormDTO resiParam, Cache> memberMap, Cache haveSearchCache) { - String searchKey = resiParam.getHouseId()+resiParam.getBuildingId()+resiParam.getNeighborHoodId()+resiParam.getAgencyId(); + String searchKey = resiParam.getHouseId()+resiParam.getBuildingId()+resiParam.getNeighborHoodId()+resiParam.getGridId()+resiParam.getAgencyId(); Boolean haveSearch = haveSearchCache.getIfPresent(searchKey); + //log.info("getHouseUser getHouseMembers searchKey:"+searchKey); if (haveSearch!= null && haveSearch){ return; } + long startT = System.currentTimeMillis(); haveSearchCache.put(searchKey,true); List memberListTemp = null; resiParam.setPageNo(NumConstant.ONE); @@ -699,6 +703,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { memberListTemp.parallelStream().forEach(h -> memberMap.put(h.getHomeId(), h.getHouseMemberList())); } while (memberListTemp.size() == resiParam.getPageSize()); + log.info("getHouseUser getHouseMembers cost:{}ms,param:{}",System.currentTimeMillis() - startT,JSON.toJSONString(resiParam)); } /** From 28e317b39fd413517560482d6bf0463d1dffe1e1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 10:58:28 +0800 Subject: [PATCH 024/416] =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/ProjectController.java | 4 ++-- .../src/main/java/com/epmet/service/ProjectService.java | 2 +- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index f76ac99242..2f862559de 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -359,8 +359,8 @@ public class ProjectController { * @date 2022/5/18 10:03 */ @PostMapping("satisfaction-evaluation-list") - public Result> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ + public Result satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); - return new Result>().ok(projectService.satisfactionEvaluationList(formDTO)); + return new Result().ok(projectService.satisfactionEvaluationList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 9b6dc38247..7e86778fd0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -382,6 +382,6 @@ public interface ProjectService extends BaseService { * @author zxc * @date 2022/5/18 10:03 */ - List satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 32e62465a6..6214f00200 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -3239,7 +3239,8 @@ public class ProjectServiceImpl extends BaseServiceImpl satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + public PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + PageData data = new PageData<>(new ArrayList<>(),NumConstant.ZERO); PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); List result = pageInfo.getList(); if (CollectionUtils.isNotEmpty(result)){ @@ -3248,8 +3249,10 @@ public class ProjectServiceImpl extends BaseServiceImpl result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); + data.setList(result); + data.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); } - return result; + return data; } /** From b6e8ec88b5575b662fce827029f5588a8805276d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 11:56:30 +0800 Subject: [PATCH 025/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 2 +- .../feign/EpmetHeartOpenFeignClient.java | 9 +- .../EpmetHeartOpenFeignClientFallback.java | 8 +- .../controller/ResiDemandController.java | 15 + .../main/java/com/epmet/dto/IcEventDTO.java | 5 + .../com/epmet/dto/IcEventOperationLogDTO.java | 23 +- .../com/epmet/dto/form/IcDemandFormDTO.java | 112 ++++++++ .../epmet/dto/form/IcEventAddEditFormDTO.java | 107 ++++++++ .../epmet/controller/IcEventController.java | 14 +- .../epmet/entity/IcEventAttachmentEntity.java | 12 +- .../java/com/epmet/entity/IcEventEntity.java | 5 + .../entity/IcEventOperationLogEntity.java | 23 +- .../com/epmet/service/IcEventService.java | 4 +- .../service/impl/IcEventServiceImpl.java | 257 ++++++++++++++++-- 14 files changed, 533 insertions(+), 63 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index dd332d4b13..a813af8152 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -24,7 +24,7 @@ public enum DictTypeEnum { GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), - IC_EVENT("ic_event","事件管理",19), + IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 29a60588a9..a444c32e5b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -7,7 +7,9 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -21,7 +23,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; -import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -119,4 +120,10 @@ public interface EpmetHeartOpenFeignClient { */ @PostMapping("/heart/icpartyunit/getPartyUnitList") Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO); + + /** + * @description 事件管理-转需求 + **/ + @PostMapping("/heart/residemand/iceventtodemand") + Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index df9f67f0ff..4ffce2041b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -8,7 +8,9 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -17,7 +19,6 @@ import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import java.util.List; -import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -116,4 +117,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> getPartyUnitList(PartyUnitListFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO); } + + @Override + public Result queryUserVolunteerInfo(IcDemandFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index b798d0fe0c..f152dd140f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -11,11 +11,14 @@ import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; +import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; @@ -267,4 +270,16 @@ public class ResiDemandController { demandSatisfactionService.evaluateDemandAuto(formDTO); return new Result(); } + + /** + * 事件管理-转需求 + * + * @return + */ + @PostMapping("iceventtodemand") + public Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO) { + ReportDemandFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ReportDemandFormDTO.class); + return new Result().ok(icUserDemandRecService.saveOrUpdateDemand(dto)); + } + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java index 7233e80a75..fb86222967 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -66,6 +66,11 @@ public class IcEventDTO implements Serializable { */ private String sourceType; + /** + * 发生时间 + */ + private Date happenTime; + /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java index db707294fc..ebe242b7ff 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -43,23 +43,22 @@ public class IcEventOperationLogDTO implements Serializable { /** * 1、发布事件:add - 2、复:reply; -3、立项:shift_project; -4、转需求:shift_demand -5、办结:close_case; - - + * 2、复:reply; + * 3、立项:shift_project; + * 4、转需求:shift_demand + * 5、办结:close_case; */ private String actionCode; /** * 1、发布事件:publish; -2、撤回事件:recall; -3、复:reply; -4、立项:shift_project; -5、办结:close_case; -6、选择是否已解决:choose_resolve; -7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 2、撤回事件:recall; + * 3、复:reply; + * 4、立项:shift_project; + * 5、转需求: shift_demand; + * 6、办结:close_case; + * 7、选择是否已解决:choose_resolve; + * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java new file mode 100644 index 0000000000..657bea778f --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -0,0 +1,112 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民端-上报需求,或者修改需求 + */ +@Data +public class IcDemandFormDTO implements Serializable { + private static final long serialVersionUID = -2931148629441558468L; + + public interface Add extends CustomerClientShowGroup { + } + + public interface AddInternalGroup { + } + + public interface Update extends CustomerClientShowGroup { + } + + public interface UpdateInternalGroup { + } + + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class}) + private String customerId; + + /** + * 网格id + */ + @NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class}) + private String gridId; + + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class}) + @Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class}) + private String content; + + /** + * 二级需求分类编码 + */ + @NotBlank(message = "需求类别不能为空",groups = Add.class) + private String categoryCode; + + /** + * 父级需求分类编码 + */ + @NotBlank(message = "父级分类不能为空",groups = Add.class) + private String parentCode; + + + /** + * 希望服务时间 + */ + @NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class}) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + @NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class}) + private String demandUserId; + + /** + * 需求人联系姓名 + */ + @NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class}) + private String demandUserName; + + /** + * 需求人联系电话 + */ + @NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class}) + private String demandUserMobile; + + /** + * 服务地点,工作端指派默认居民居住房屋地址,居民端地图选择 + */ + @NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class}) + private String serviceLocation; + + /** + * 门牌号详细地址 + */ + @Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class}) + private String locationDetail; + + /** + * 经度,需求人是ic的居民时,取所住楼栋的中心点位 + */ + private String longitude; + + /** + * 纬度,需求人是ic的居民时,取所住楼栋的中心点位 + */ + private String latitude; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java new file mode 100644 index 0000000000..b3fd086a1c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -0,0 +1,107 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 事件管理新增 + * @Author sun + */ +@Data +public class IcEventAddEditFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + @NotBlank(message = "网格ID不能为空", groups = {AddGroup.class}) + private String gridId; + /** + * 报事人Id + */ + private String reportUserId; + /** + * 报事人姓名 + */ + @NotBlank(message = "报事人不能为空", groups = {AddGroup.class}) + private String name; + /** + * 手机号 + */ + @Length(max = 11, message = "手机号位数不能超过11位", groups = AddGroup.class) + private String mobile; + /** + * 身份证号 + */ + @NotBlank(message = "身份证号不能为空", groups = {AddGroup.class}) + @Length(min = 15, max = 18, message = "身份证号位数不正确", groups = AddGroup.class) + private String idCard; + /** + * 反映渠道 + */ + @NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class}) + private String sourceType; + /** + * 事件内容 + */ + @NotBlank(message = "事件内容不能为空", groups = {AddGroup.class}) + private String eventContent; + /** + * 图片集合 + */ + private List imageList; + /** + * 二类分类Id + */ + private List categoryList; + /** + * 事件地址 + */ + //@NotBlank(message = "事件地址不能为空", groups = {AddGroup.class}) + private String address; + /** + * 经度 + */ + private String latitude; + /** + * 维度 + */ + private String longitude; + /** + * 处理方式[0:已回复 1:已转项目 1:已转需求] + */ + private String operationType; + /** + * 项目、需求ID + */ + private String operationId; + /** + * 回复内容 + */ + private String content; + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + /** + * 立项接口入参对象 + */ + private EventToProjectFormDTO project; + /** + * 转需求接口入参对象 + */ + private IcDemandFormDTO demand; + + + private String customerId; + private String userId; + private String app; + private String client; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 9d94d20e38..e1bdaca91a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; +import com.epmet.dto.form.IcEventAddEditFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; @@ -51,11 +52,14 @@ public class IcEventController { } @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody IcEventDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icEventService.save(dto); + @PostMapping("add") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcEventAddEditFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setApp(tokenDto.getApp()); + formDTO.setClient(tokenDto.getClient()); + icEventService.save(formDTO); return new Result(); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java index 3f9534982f..a5efd1f853 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java @@ -58,12 +58,12 @@ public class IcEventAttachmentEntity extends BaseEpmetEntity { /** * 附件状态(审核中:auditing; -auto_passed: 自动通过; -review:结果不确定,需要人工审核; -block: 结果违规; -rejected:人工审核驳回; -approved:人工审核通过) -现在图片是同步审核的,所以图片只有auto_passed一种状态 + auto_passed: 自动通过; + review:结果不确定,需要人工审核; + block: 结果违规; + rejected:人工审核驳回; + approved:人工审核通过) + 现在图片是同步审核的,所以图片只有auto_passed一种状态 */ private String status; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index 58dd68e144..e33765e233 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -66,6 +66,11 @@ public class IcEventEntity extends BaseEpmetEntity { */ private String sourceType; + /** + * 发生时间 + */ + private Date happenTime; + /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java index a3cdf53b51..c9c08f1951 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -43,23 +43,22 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { /** * 1、发布事件:add - 2、复:reply; -3、立项:shift_project; -4、转需求:shift_demand -5、办结:close_case; - - + * 2、复:reply; + * 3、立项:shift_project; + * 4、转需求:shift_demand + * 5、办结:close_case; */ private String actionCode; /** * 1、发布事件:publish; -2、撤回事件:recall; -3、复:reply; -4、立项:shift_project; -5、办结:close_case; -6、选择是否已解决:choose_resolve; -7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 2、撤回事件:recall; + * 3、复:reply; + * 4、立项:shift_project; + * 5、转需求: shift_demand; + * 6、办结:close_case; + * 7、选择是否已解决:choose_resolve; + * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index e3ad6ba353..ae4550c76e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventAddEditFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -10,7 +11,6 @@ import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import java.util.Date; -import java.util.Map; /** * 事件管理表 @@ -48,7 +48,7 @@ public interface IcEventService extends BaseService { * @author generator * @date 2022-05-17 */ - void save(IcEventDTO dto); + void save(IcEventAddEditFormDTO dto); /** * 默认更新 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index d081e4322e..9f28ccdded 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -4,49 +4,54 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; 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.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; -import com.epmet.commons.tools.dto.form.FileCommonDTO; -import com.epmet.commons.tools.enums.DictTypeEnum; 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.GridInfoCache; +import com.epmet.commons.tools.scan.param.ImgScanParamDTO; +import com.epmet.commons.tools.scan.param.ImgTaskDTO; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.AgencyInfoFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.result.*; -import com.epmet.dto.result.AllGridsByUserIdResultDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcMoveInListResultDTO; -import com.epmet.entity.IcEventEntity; +import com.epmet.entity.*; import com.epmet.enums.EcEventProcessStatusEnum; import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.EpmetHeartOpenFeignClient; +import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.service.IcEventService; +import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; /** @@ -58,11 +63,31 @@ import java.util.stream.Collectors; @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { + @Value("${openapi.scan.server.url}") + private String scanApiUrl; + @Value("${openapi.scan.method.textSyncScan}") + private String textSyncScanMethod; + @Value("${openapi.scan.method.imgSyncScan}") + private String imgSyncScanMethod; @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; - @Autowired private EpmetAdminOpenFeignClient adminOpenFeignClient; + @Autowired + private ProjectTraceService projectTraceService; + @Autowired + private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private IcEventAttachmentService icEventAttachmentService; + @Autowired + private IcEventCategoryService icEventCategoryService; + @Autowired + private IcEventReplyService icEventReplyService; + @Autowired + private IcEventOperationLogService icEventOperationLogService; + @Override public PageData list(IcEventListFormDTO formDTO) { @@ -77,7 +102,7 @@ public class IcEventServiceImpl extends BaseServiceImpl gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); //与户主关系字典表数据 - Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT.getCode()); + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); //封装数据 @@ -105,8 +130,8 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } - private QueryWrapper 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); @@ -122,9 +147,193 @@ public class IcEventServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + //图片内容 + if (!CollectionUtils.isEmpty(formDTO.getImageList())) { + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + formDTO.getImageList().forEach(imgUrl -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(imgUrl); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); + } + } + } + + //2.判断是否立项或转需求 + //2-1.项目立项 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) { + EventToProjectResultDTO project = projectTraceService.eventToProject(formDTO.getProject()); + formDTO.setOperationId(project.getProjectId()); + } + //2-2.转需求 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) { + IcDemandFormDTO dto = formDTO.getDemand(); + //需求人默认是当前用户id + dto.setDemandUserId(formDTO.getUserId()); + dto.setCustomerId(formDTO.getCustomerId()); + Result recIdResult = epmetHeartOpenFeignClient.icEventToDemand(dto); + if (!recIdResult.success() || recIdResult.getData() == null) { + throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); + } + formDTO.setOperationId(recIdResult.getData().getDemandRecId()); + } + + //3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据 + //3-1.事件数据保存 + IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class); + entity.setAgencyId(gridInfo.getPid()); + entity.setGridPids(gridInfo.getPids()); insert(entity); + //3-2.附件数据保存 + List imageEntityList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(formDTO.getImageList())) { + int sort = 0; + for (String url : formDTO.getImageList()) { + IcEventAttachmentEntity attachment = new IcEventAttachmentEntity(); + attachment.setCustomerId(formDTO.getCustomerId()); + attachment.setAttachmentUrl(url); + attachment.setIcEventId(entity.getId()); + attachment.setCreatedBy(formDTO.getUserId()); + attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); + attachment.setSort(sort++); + attachment.setAttachmentType("image"); + attachment.setStatus(TopicConstant.AUTO_PASSED); + imageEntityList.add(attachment); + } + icEventAttachmentService.insertBatch(imageEntityList); + } + + //3-3.分类数据保存 + if (!CollectionUtils.isEmpty(formDTO.getCategoryList())) { + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), formDTO.getCategoryList()); + AtomicReference categoryEntity = null; + category.getCategoryList().forEach(ca -> { + if (ca.getId().equals(formDTO.getCategoryList().get(0))) { + categoryEntity.set(new IcEventCategoryEntity()); + categoryEntity.get().setCustomerId(formDTO.getCustomerId()); + categoryEntity.get().setIcEventId(entity.getId()); + categoryEntity.get().setCategoryId(ca.getId()); + categoryEntity.get().setCategoryPids(ca.getPids()); + categoryEntity.get().setCategoryCode(ca.getCategoryCode()); + } + }); + if (categoryEntity.get() != null) { + icEventCategoryService.insert(categoryEntity.get()); + } + + } + //3-4.操作记录数据保存 + List logList = new ArrayList<>(); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), new Date(), "add", "publish")); + + Date date = new Date(); + //3-5.回复数据保存 + if (StringUtils.isNotBlank(formDTO.getContent())) { + IcEventReplyEntity replyEntity = new IcEventReplyEntity(); + replyEntity.setCustomerId(formDTO.getCustomerId()); + replyEntity.setIcEventId(entity.getId()); + replyEntity.setFromUserId(formDTO.getUserId()); + replyEntity.setContent(formDTO.getContent()); + replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName()); + icEventReplyService.insert(replyEntity); + //回复对应的操作记录 + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "reply", "reply")); + } + //立项对应的操作记录 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_project", "shift_project")); + } + //转需求对应的操作记录 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_demand", "shift_demand")); + } + //选择了已完成 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + } + icEventOperationLogService.insertBatch(logList); + } + + /** + * 根据分类Id集合查询对应数据信息 + * + * @return + */ + private CategoryTagResultDTO queryCategory(String customerId, List categoryIdList) { + CategoryTagListFormDTO categoryTag = new CategoryTagListFormDTO(); + categoryTag.setCustomerId(customerId); + categoryTag.setCategoryIdList(categoryIdList); + Result resultDTOResult = govIssueOpenFeignClient.getCategoryTagList(categoryTag); + if (!resultDTOResult.success()) { + throw new RenException("项目立项,调用issue服务查询分类、标签基础信息失败"); + } + return resultDTOResult.getData(); + } + + /** + * 事件管理操作日志记录 + * + * @return + */ + private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date date, String actionCode, String actionDesc) { + IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); + logEntity.setCustomerId(customerId); + logEntity.setIcEventId(icEventId); + logEntity.setUserId(userId); + logEntity.setUserIdentity("staff"); + logEntity.setActionCode(actionCode); + logEntity.setActionDesc(actionDesc); + logEntity.setOperateTime(date); + return logEntity; } @Override @@ -143,6 +352,7 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.listProcessAnalysisEvents( EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime - ,queryEndTime); + , queryEndTime); // 3.补充数据 for (IcEventResultDTO event : list) { From a73101fe1b5f8b3e866570cf6fc2c1a30eaf5037 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:14:43 +0800 Subject: [PATCH 026/416] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...CommunitySelfOrganizationPersonnelDTO.java | 8 +++ .../dto/form/CategorySelfOrgFormDTO.java | 33 +++++++++ .../CommunitySelfOrganizationListFormDTO.java | 2 + .../result/SelfOrgCategoryTotalResDTO.java | 20 ++++++ ...IcCommunitySelfOrganizationController.java | 43 ++++++++++++ .../dao/IcCommunitySelfOrganizationDao.java | 8 +++ .../IcCommunitySelfOrganizationService.java | 29 ++++++-- ...cCommunitySelfOrganizationServiceImpl.java | 70 +++++++++++++++++-- .../mapper/IcCommunitySelfOrganizationDao.xml | 62 +++++++++++++++- 9 files changed, 266 insertions(+), 9 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java index f74f2697e9..95ad773777 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -42,6 +43,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * 客户ID */ + @JsonIgnore private String customerId; /** @@ -62,31 +64,37 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * */ + @JsonIgnore private Integer delFlag; /** * 乐观锁 */ + @JsonIgnore private String revision; /** * 创建人 */ + @JsonIgnore private String createdBy; /** * 创建时间 */ + @JsonIgnore private Date createdTime; /** * 更新人 */ + @JsonIgnore private String updatedBy; /** * 更新时间 */ + @JsonIgnore private Date updatedTime; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java new file mode 100644 index 0000000000..bdfa1825f6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class CategorySelfOrgFormDTO extends PageFormDTO implements Serializable { + /** + * 默认展示全部,此列可空 + */ + private String categoryCode; + + /** + * token中获取 + */ + @NotBlank(message = "customerId不能为空",groups = PageFormDTO.AddUserInternalGroup.class) + private String customerId; + /** + * token中获取 + */ + @NotBlank(message = "staffId不能为空",groups = PageFormDTO.AddUserInternalGroup.class) + private String staffId; + + /** + * 当前登录用户所属组织id + */ + private String agencyId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java index 5d634afaa3..7a8fba0899 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -48,4 +48,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable { private Integer ranking; private String remark; + + private String categoryCode; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java new file mode 100644 index 0000000000..b79436c9d0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 多元主体分析-社区自组织饼图 + */ +@Data +public class SelfOrgCategoryTotalResDTO implements Serializable { + + private String categoryCode; + private String categoryName; + /** + * 当前分类下的社区自组织数量 + */ + private Integer total; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 9df5db60c2..399e9c7e81 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -34,8 +34,10 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.ExportCommunitySelfOrganizationExcel; import com.epmet.excel.IcCommunitySelfOrganizationExcel; @@ -281,4 +283,45 @@ public class IcCommunitySelfOrganizationController { ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); } + + /** + * 多元主体分析-各分类下的社区自组织数量饼图 + * + * @param tokenDto + * @return + */ + @PostMapping("/total-pie") + public Result> totalPie(@LoginUser TokenDto tokenDto) { + return new Result>().ok(icCommunitySelfOrganizationService.querySelfOrgCategoryTotal(tokenDto.getCustomerId(), tokenDto.getUserId())); + } + + /** + * 多元主体分析-分类下的社区自组织列表 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("/category-list") + public Result> queryCategoryList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setIsPage(true); + return new Result>().ok(icCommunitySelfOrganizationService.queryCategoryList(formDTO)); + } + + /** + * 003、多元主题分析-地图(详情信息已包含) + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("/coordinate-list") + public Result> queryCoordinateList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setIsPage(false); + return new Result>().ok(icCommunitySelfOrganizationService.queryCoordinateList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index e8fc375773..5899abc96f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -19,8 +19,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.CategorySelfOrgFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; @@ -65,4 +67,10 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao selectOrgByOrgName(@Param("names")List names, @Param("customerId") String customerId); List selectOrgByCustomerId(@Param("customerId") String customerId); + + List selectCountGroupByCategory(@Param("customerId") String customerId,@Param("agencyId") String agencyId); + + List queryCategoryList(CategorySelfOrgFormDTO formDTO); + + List queryCoordinateList(CategorySelfOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 6a61e4a199..14008a7ce2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -21,12 +21,11 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; -import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; -import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; @@ -160,4 +159,26 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryListById(List communityOrgIds); + + /** + * 多元主体分析-各分类下的社区自组织数量饼图 + * @param customerId + * @param userId + * @return + */ + List querySelfOrgCategoryTotal(String customerId, String userId); + + /** + * 多元主体分析-分类下的社区自组织列表 + * @param formDTO + * @return + */ + PageData queryCategoryList(CategorySelfOrgFormDTO formDTO); + + /** + * 多元主体分析-地图坐标,及详情 + * @param formDTO + * @return + */ + PageData queryCoordinateList(CategorySelfOrgFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 6e51228e0f..11bfd15d36 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -35,10 +35,7 @@ import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.CommunitySelfOrganizationListDTO; -import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; -import com.epmet.dto.result.ServicePointDTO; -import com.epmet.dto.result.UploadImgResultDTO; +import com.epmet.dto.result.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; @@ -709,4 +706,69 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl querySelfOrgCategoryTotal(String customerId, String staffId) { + Result> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + if (!dictMapRes.success() || MapUtils.isEmpty(dictMapRes.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常"); + } + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(customerId,staffId); + List list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId()); + Map map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2)); + List resultList = new ArrayList<>(); + for (String key : dictMapRes.getData().keySet()) { + SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO(); + resDTO.setCategoryCode(key); + resDTO.setCategoryName(dictMapRes.getData().get(key)); + resDTO.setTotal(map.containsKey(key) ? map.get(key) : NumConstant.ZERO); + resultList.add(resDTO); + } + return resultList; + } + + private CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId); + if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前工作人员信息异常"); + } + return staffInfo; + } + + /** + * 多元主体分析-分类下的社区自组织列表 + * + * @param formDTO + * @return + */ + @Override + public PageData queryCategoryList(CategorySelfOrgFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCategoryList(formDTO)); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + } + + /** + * 多元主体分析-地图坐标,及详情 + * + * @param formDTO + * @return + */ + @Override + public PageData queryCoordinateList(CategorySelfOrgFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 872f404c8e..2ad8ac92b9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -38,7 +38,10 @@ + + + + + \ No newline at end of file From 03590577ece7c3dc134909a0d2b47dec450e15ad Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 13:25:45 +0800 Subject: [PATCH 027/416] =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ProjectManageListResultDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index ba56db5c44..c0bce880b1 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -69,7 +69,6 @@ public class ProjectManageListResultDTO implements Serializable { @JsonIgnore private Date updatedTime; - @JsonIgnore private String isHandle; public ProjectManageListResultDTO() { From 08794a285a9630fe73e45c03221138804c59c983 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 18 May 2022 13:27:12 +0800 Subject: [PATCH 028/416] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E8=A1=8C?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/ExcelFillRowMergeStrategy.java | 106 ++++++++++++++++++ .../com/epmet/controller/HouseController.java | 7 +- 2 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java new file mode 100644 index 0000000000..a196c2dd82 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java @@ -0,0 +1,106 @@ +package com.epmet.commons.tools.utils.poi.excel.handler; + +import com.alibaba.excel.write.handler.RowWriteHandler; +import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; +import com.alibaba.excel.write.metadata.holder.WriteTableHolder; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.util.CellRangeAddress; + +import java.util.List; + +/** + * desc:按行对单元格合并策略 依据是第一列的值 + * + * @author liujianjun + */ +@Slf4j +public class ExcelFillRowMergeStrategy implements RowWriteHandler { + + /** + * 需要合并的列 下标 + */ + private int[] mergeColumnIndexArr; + /** + * 从下标n行开始合并 + */ + private int mergeRowIndex; + /** + * 默认隐藏第一列 用于合并数据 + */ + private boolean hiddenFirst = true; + + + public ExcelFillRowMergeStrategy(int mergeRowIndex, int[] mergeColumnIndexArr) { + this.mergeRowIndex = mergeRowIndex; + this.mergeColumnIndexArr = mergeColumnIndexArr; + } + + public ExcelFillRowMergeStrategy(int mergeRowIndex, int[] mergeColumnIndexArr, boolean hiddenFirst) { + this.mergeRowIndex = mergeRowIndex; + this.mergeColumnIndexArr = mergeColumnIndexArr; + this.hiddenFirst = hiddenFirst; + } + + @Override + public void beforeRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Integer rowIndex, Integer relativeRowIndex, Boolean isHead) { + + } + + @Override + public void afterRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) { + // 隐藏id列 + if (hiddenFirst) { + writeSheetHolder.getSheet().setColumnHidden(0, true); + } + } + + + @Override + public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) { + //当前行索引 + int curRowNum = row.getRowNum(); + if (mergeColumnIndexArr != null && mergeColumnIndexArr.length > 0 && !isHead) { + //当前行第一列单元格 + Cell curA1Cell = row.getCell(0); + Object curA1Data = curA1Cell.getCellType() == CellType.STRING ? curA1Cell.getStringCellValue() : curA1Cell.getNumericCellValue(); + //上一行第一列单元格 + Cell preA1Cell = row.getSheet().getRow(curRowNum - 1).getCell(0); + Object preA1Data = preA1Cell.getCellType() == CellType.STRING ? preA1Cell.getStringCellValue() : preA1Cell.getNumericCellValue(); + + if (curA1Data.equals(preA1Data)) { + for (int value : mergeColumnIndexArr) { + mergeSameRow(writeSheetHolder, curRowNum, value); + } + } + } + + } + + + private void mergeSameRow(WriteSheetHolder writeSheetHolder, int curRowIndex, int curColIndex) { + Sheet sheet = writeSheetHolder.getSheet(); + List mergeRegions = sheet.getMergedRegions(); + boolean isMerged = false; + for (int i = 0; i < mergeRegions.size() && !isMerged; i++) { + CellRangeAddress cellRangeAddr = mergeRegions.get(i); + // 若上一个单元格已经被合并,则先移出原有的合并单元,再重新添加合并单元 + if (cellRangeAddr.isInRange(curRowIndex - 1, curColIndex)) { + sheet.removeMergedRegion(i); + cellRangeAddr.setLastRow(curRowIndex); + sheet.addMergedRegionUnsafe(cellRangeAddr); + isMerged = true; + } + } + // 若上一个单元格未被合并,则新增合并单元 + if (!isMerged) { + CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex - 1, curRowIndex, curColIndex, curColIndex); + sheet.addMergedRegionUnsafe(cellRangeAddress); + } + } + + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 312a9a2c84..8bd6dd1b68 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -37,7 +37,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.poi.excel.handler.ExcelFillCellMergeStrategy; +import com.epmet.commons.tools.utils.poi.excel.handler.ExcelFillRowMergeStrategy; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; @@ -364,10 +364,11 @@ public class HouseController implements ResultDataResolver { //冻结表头 2行 FreezeAndFilter writeHandler = new FreezeAndFilter(); writeHandler.rowSplit = 2; - ExcelFillCellMergeStrategy mergeStrategy = new ExcelFillCellMergeStrategy(2,mergeRowArr,false); + //ExcelFillCellMergeStrategy mergeStrategy = new ExcelFillCellMergeStrategy(2,mergeRowArr,false); + ExcelFillRowMergeStrategy mergeStrategy2 = new ExcelFillRowMergeStrategy(2,mergeRowArr,false); WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1") .head(HouseMemberResultDTO.class) - .registerWriteHandler(mergeStrategy) + .registerWriteHandler(mergeStrategy2) .registerWriteHandler(writeHandler) .build(); PageData dataList = null; From 3115775f6249b4cd2542640dcf74e4000765a951 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 13:50:54 +0800 Subject: [PATCH 029/416] =?UTF-8?q?=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/PartyUnitListResultDTO.java | 5 ++++ .../controller/IcPartyUnitController.java | 12 ++++++++++ .../java/com/epmet/dao/IcPartyUnitDao.java | 8 +++++++ .../com/epmet/service/IcPartyUnitService.java | 9 ++++++++ .../service/impl/IcPartyUnitServiceImpl.java | 15 ++++++++++++ .../main/resources/mapper/IcPartyUnitDao.xml | 23 +++++++++++++++++++ 6 files changed, 72 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java index c8244a0263..e6aabc3d85 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java @@ -24,4 +24,9 @@ public class PartyUnitListResultDTO implements Serializable { * 协办单位名字 */ private String assistanceUnitName; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index d055a580eb..e4e507ee25 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -264,4 +264,16 @@ public class IcPartyUnitController { public Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){ return new Result>().ok(icPartyUnitService.getPartyUnitList(formDTO)); } + + /** + * Desc: 协办单位列表 + * @param tokenDto + * @author zxc + * @date 2022/5/18 13:37 + */ + @PostMapping("assistanceUnitList") + public Result> getAssistanceUnitList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icPartyUnitService.getAssistanceUnitList(tokenDto)); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index 6cc2e76293..a144e3f69d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -84,4 +84,12 @@ public interface IcPartyUnitDao extends BaseDao { * @date 2022/5/17 18:51 */ List getCommunitySelfList(@Param("ids") List ids); + + /** + * Desc: 协办单位列表 + * @param agencyId + * @author zxc + * @date 2022/5/18 13:48 + */ + List getAssistanceUnitList(@Param("agencyId")String agencyId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index e6d3857757..0507b31209 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -152,4 +152,13 @@ public interface IcPartyUnitService extends BaseService { * @date 2022/5/17 17:53 */ List getPartyUnitList(PartyUnitListFormDTO formDTO); + + /** + * Desc: 协办单位列表 + * @param tokenDto + * @author zxc + * @date 2022/5/18 13:37 + */ + List getAssistanceUnitList(TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 4c6e590798..c878b8f14d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -614,6 +614,21 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl getAssistanceUnitList(TokenDto tokenDto) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到此工作人员信息"+tokenDto.getUserId()); + } + return baseDao.getAssistanceUnitList(staffInfo.getAgencyId()); + } + private String getServiceMatter(Map map, String matter) { List matters = Arrays.asList(matter.split(StrConstant.COLON)); List list = matters.stream().map(map::get).collect(Collectors.toList()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index cd2dbda9ec..646eaedb99 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -102,6 +102,29 @@ ) + + + update ic_party_unit set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW() From abea2ee464a526b163b9b576c1161cd5961357af Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:55:32 +0800 Subject: [PATCH 030/416] duoyuan --- .../controller/ResiDemandController.java | 16 ++++++++++++- .../com/epmet/dao/IcUserDemandRecDao.java | 3 +++ .../epmet/service/IcUserDemandRecService.java | 8 +++++++ .../impl/IcUserDemandRecServiceImpl.java | 15 ++++++++++++ .../resources/mapper/IcUserDemandRecDao.xml | 16 +++++++++++++ .../epmet/dto/form/ServiceListFormDTO.java | 23 +++++++++++++++++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index f152dd140f..be82347461 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -10,15 +10,16 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; -import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.IcDemandFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; @@ -282,4 +283,17 @@ public class ResiDemandController { return new Result().ok(icUserDemandRecService.saveOrUpdateDemand(dto)); } + /** + * 根据服务方id查询,服务过的需求列表 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("service-list") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(icUserDemandRecService.queryServiceList(formDTO)); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index f3781ceea6..0a97c3eba4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.PageListAnalysisFormDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; @@ -140,4 +141,6 @@ public interface IcUserDemandRecDao extends BaseDao { * @Date 2022/1/21 15:53 */ List getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType); + + List queryServiceList(ServiceListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 5e86b438ed..0c0ec70167 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordResultDTO; import com.epmet.dto.result.demand.*; @@ -247,4 +248,11 @@ public interface IcUserDemandRecService extends BaseService getServicePoint(String customerId, String serviceType); + + /** + * 根据服务方id查询,服务过的需求列表 + * @param formDTO + * @return + */ + PageData queryServiceList(ServiceListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 433f118f42..fd5552644f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1704,5 +1704,20 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryServiceList(ServiceListFormDTO formDTO) { + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO)); + return new PageData<>(pageInfo.getList(),pageInfo.getTotal()); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 02432b91c5..1d62e01ac6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -641,4 +641,20 @@ GROUP BY b.SERVER_ID + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java new file mode 100644 index 0000000000..7695b79710 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class ServiceListFormDTO extends PageFormDTO implements Serializable { + @NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class) + private String type; + + /** + * 服务方id , + * 可能是来源于多元主题分析里的社区自组织,也可能是来源于志愿者 + */ + @NotBlank(message = "serverId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String serverId; + + private String customerId; +} From 06d0d73ad1e8dacfb7bc1a2f72622c7fe9fb4987 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:57:40 +0800 Subject: [PATCH 031/416] duoyuan --- .../src/main/java/com/epmet/controller/ResiDemandController.java | 1 - .../src/main/java/com/epmet/dao/IcUserDemandRecDao.java | 1 - .../src/main/java/com/epmet/service/IcUserDemandRecService.java | 1 - 3 files changed, 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index be82347461..1bb797aa61 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -19,7 +19,6 @@ import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.IcDemandFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index 0a97c3eba4..f0db70eba6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,7 +20,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.PageListAnalysisFormDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 0c0ec70167..58885f0d18 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -21,7 +21,6 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordResultDTO; import com.epmet.dto.result.demand.*; From d6b1f0e7e7030521f781fe9fe1db20f2997b2d74 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 13:57:42 +0800 Subject: [PATCH 032/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 4ffce2041b..6ebee201a1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -119,7 +119,7 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli } @Override - public Result queryUserVolunteerInfo(IcDemandFormDTO formDTO) { + public Result icEventToDemand(IcDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); } } From 11914ecb2c43daca5596991409d3b22b9e919c47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:58:46 +0800 Subject: [PATCH 033/416] duoyuan --- .../java/com/epmet/dto/form/demand}/ServiceListFormDTO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename epmet-module/{gov-project/gov-project-client/src/main/java/com/epmet/dto/form => epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand}/ServiceListFormDTO.java (95%) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java similarity index 95% rename from epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java rename to epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java index 7695b79710..3985df6fe0 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.dto.form; +package com.epmet.dto.form.demand; import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; @@ -6,7 +6,6 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; - @Data public class ServiceListFormDTO extends PageFormDTO implements Serializable { @NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class) @@ -21,3 +20,4 @@ public class ServiceListFormDTO extends PageFormDTO implements Serializable { private String customerId; } + From 18fda9352bc46814001a8f8067e2523299b4686a Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 18 May 2022 13:59:54 +0800 Subject: [PATCH 034/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E6=9C=88?= =?UTF-8?q?=E5=A2=9E=E9=87=8F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventProcessAnalysisCommonFormDTO.java | 13 +++-- .../result/IcEventMonthlyCountResultDTO.java | 15 ++++++ .../IcEventMonthlyIncrementResultDTO.java | 18 +++++++ .../epmet/controller/IcEventController.java | 29 ++++++++++- .../main/java/com/epmet/dao/IcEventDao.java | 18 +++++++ .../com/epmet/service/IcEventService.java | 24 +++++++++ .../service/impl/IcEventServiceImpl.java | 49 +++++++++++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 19 +++++++ 8 files changed, 175 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java index ca2bf433c2..51d626d39b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java @@ -19,16 +19,21 @@ public class EventProcessAnalysisCommonFormDTO { */ public interface ProcessStatusRatioQuery {} + /** + * 月度新增 + */ + public interface MonthlyIncrementAnalysis {} + /** * 要查询的组织ID */ - @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private String orgId; /** * 组织类型。grid,agency */ - @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private String orgType; /** @@ -36,7 +41,7 @@ public class EventProcessAnalysisCommonFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private Date queryStartTime; /** @@ -44,7 +49,7 @@ public class EventProcessAnalysisCommonFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private Date queryEndTime; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java new file mode 100644 index 0000000000..724a39a79b --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + +import jdk.nashorn.internal.ir.debug.PrintVisitor; +import lombok.Data; + +import java.util.Date; + +@Data +public class IcEventMonthlyCountResultDTO { + + private String monthName; + + private Integer eventCount; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java new file mode 100644 index 0000000000..18cebe0622 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 事件阅读增量dto + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class IcEventMonthlyIncrementResultDTO { + private String monthName; + private Integer increment; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 9d94d20e38..108ad78f78 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -2,6 +2,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +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.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -15,6 +17,7 @@ import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; @@ -22,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; +import java.util.List; /** @@ -77,7 +81,7 @@ public class IcEventController { } /** - * 事件分类分析-处理状态比例查询 + * 事件处理分析-处理状态比例查询 * @param formDTO * @return */ @@ -95,7 +99,7 @@ public class IcEventController { } /** - * 事件分类分析-事件列表 + * 事件处理分析-事件列表 * @param input * @return */ @@ -114,6 +118,27 @@ public class IcEventController { return new Result>().ok(page); } + /** + * 时间处理分析-阅读增量查询 + * @param input + * @return + */ + @PostMapping("processAnalysis/monthlyIncrement") + public Result> listMonthlyIncrement(@RequestBody EventProcessAnalysisCommonFormDTO input) { + ValidatorUtils.validateEntity(input, EventProcessAnalysisCommonFormDTO.MonthlyIncrementAnalysis.class); + String orgId = input.getOrgId(); + String orgType = input.getOrgType(); + Date queryStartTime = input.getQueryStartTime(); + Date queryEndTime = input.getQueryEndTime(); + + if (queryStartTime.after(queryEndTime)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "日期范围错误", "日期范围错误"); + } + + List page = icEventService.listMonthlyIncrement(orgType, orgId, queryStartTime, queryEndTime); + return new Result>().ok(page); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f9cdf7beff..f044348e41 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,6 +1,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventMonthlyCountResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; @@ -54,4 +56,20 @@ public interface IcEventDao extends BaseDao { @Param("processStatus") String processStatus, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * 月度事件数统计查询 + * @param orgType + * @param orgId + * @param gridPids + * @param queryStartTime + * @param queryEndTime + * @return + */ + List listMonthlyEventCount( + @Param("orgType") String orgType, + @Param("orgId") String orgId, + @Param("gridPids") String gridPids, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index e3ad6ba353..a0e1f8bd3c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,11 +5,13 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -72,6 +74,28 @@ public interface IcEventService extends BaseService { ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); + /** + * 事件列表 + * @param orgId + * @param orgType + * @param categoryCode + * @param processStatus + * @param queryStartTime + * @param queryEndTime + * @param pageNo + * @param pageSize + * @return + */ PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, Integer pageSize); + + /** + * 月度增量查询 + * @param orgType + * @param orgId + * @param queryStartTime + * @param queryEndTime + * @return + */ + List listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5f7beffe5b..6639b44380 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -12,6 +12,7 @@ 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.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; @@ -33,10 +34,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 事件管理表 @@ -214,4 +213,46 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + + @Override + public List listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime) { + List resultList = new ArrayList<>(); + + String gridPids = null; + if ("agency".equals(orgType)) { + gridPids = getEventGridPids(orgId); + } + + // 从输入开始月份上一个月的开始查 + queryEndTime = DateUtils.addDateMonths(queryEndTime, 1); + + // 查询分组统计后的结果,此时月份数据不全,如果数量是0的月份不会在这里面 + List eventCountDataList = baseDao.listMonthlyEventCount(orgType, orgId, gridPids, queryStartTime, queryEndTime); + Map monthAndCount = eventCountDataList.stream().collect(Collectors.toMap((e) -> e.getMonthName(), (e) -> e.getEventCount())); + + Date tempMonth = DateUtils.integrate(queryStartTime, DateUtils.DATE_PATTERN_YYYY_MM); + Date endMonth = DateUtils.integrate(queryEndTime, DateUtils.DATE_PATTERN_YYYY_MM); + + // 按照开始和结束时间,对比数据库查出来的,没有数据的填0 + while (true) { + Integer increment = 0; + + if (tempMonth.equals(endMonth)) { + break; + } + + String tempMonthString = DateUtils.format(tempMonth, DateUtils.DATE_PATTERN_YYYY_MM); + Integer eventCountOfMonth = monthAndCount.get(tempMonthString); + if (eventCountOfMonth != null) { + increment = eventCountOfMonth; + } + + tempMonth = DateUtils.addDateMonths(tempMonth, 1); + + resultList.add(new IcEventMonthlyIncrementResultDTO(tempMonthString, increment)); + } + + + return resultList; + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 76202bb3fa..bbd9a1d933 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -85,6 +85,25 @@ + \ No newline at end of file From 8eb0ed5dd96980243572bb1d5e629800a99afe4a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:20:38 +0800 Subject: [PATCH 035/416] =?UTF-8?q?=E5=BC=95=E5=8C=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcUserDemandRecDao.java | 4 +--- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index f0db70eba6..01ab0ad96d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,9 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; -import com.epmet.dto.form.demand.PageListAnalysisFormDTO; -import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordDTO; import com.epmet.dto.result.ServicePointDTO; import com.epmet.dto.result.demand.*; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 1d62e01ac6..bb32dfe95f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -643,7 +643,7 @@ - SELECT r.ID as demandRecId, r.CONTENT, From f632735c773f6cdd55e392a04f2245ad8f91da1e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 14:20:42 +0800 Subject: [PATCH 036/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventReplyFormDTO.java | 43 ++++++++++++ .../epmet/controller/IcEventController.java | 17 +++-- .../com/epmet/dao/IcEventCategoryDao.java | 5 +- .../java/com/epmet/entity/IcEventEntity.java | 10 +-- .../epmet/service/IcEventCategoryService.java | 2 + .../com/epmet/service/IcEventService.java | 7 ++ .../impl/IcEventCategoryServiceImpl.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 70 +++++++++++++++++++ .../resources/mapper/IcEventCategoryDao.xml | 15 +++- 9 files changed, 163 insertions(+), 11 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java new file mode 100644 index 0000000000..f4e7b57ab0 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 事件管理_回复 + * @Author sun + */ +@Data +public class IcEventReplyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 事件ID + */ + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class}) + private String icEventId; + /** + * 二类分类Id + */ + private String categoryId; + /** + * 回复内容 + */ + private String content; + /** + * 处理方式[0:已回复 1:已转项目 1:已转需求] + */ + private String operationType; + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + private String customerId; + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e1bdaca91a..9fb4070cf3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -11,10 +11,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; @@ -118,6 +115,18 @@ public class IcEventController { return new Result>().ok(page); } + /** + * @Author sun + * @Description 事件管理-回复 + **/ + @PostMapping("reply") + public Result reply(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icEventService.reply(formDTO); + return new Result(); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java index f9db23cc56..e8829fda7a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java @@ -3,6 +3,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcEventCategoryEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 事件所属分类表 @@ -12,5 +13,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventCategoryDao extends BaseDao { - + + IcEventCategoryEntity selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index e33765e233..ca36746d3c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -153,11 +153,11 @@ public class IcEventEntity extends BaseEpmetEntity { /** * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; -auto_passed: 自动通过; -review:结果不确定,需要人工审核; -block: 结果违规; -rejected:人工审核驳回; -approved:人工审核通过) + auto_passed: 自动通过; + review:结果不确定,需要人工审核; + block: 结果违规; + rejected:人工审核驳回; + approved:人工审核通过) */ private String auditStatus; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java index 182569670b..fe7eb78be7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java @@ -75,4 +75,6 @@ public interface IcEventCategoryService extends BaseService { PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, Integer pageSize); + + /** + * @Author sun + * @Description 事件管理-回复 + **/ + void reply(IcEventReplyFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java index 373ba4a279..25a308fa6d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java @@ -80,4 +80,9 @@ public class IcEventCategoryServiceImpl extends BaseServiceImpl imageEntityList = new ArrayList<>(); @@ -468,4 +471,71 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + + /** + * @Author sun + * @Description 事件管理-回复 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void reply(IcEventReplyFormDTO formDTO) { + //1.查询事件数据 判断是否允许回复 + IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); + if (null == entity || "1".equals(entity.getOperationType()) || "2".equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复"); + } + //2.修改事件数据 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())){ + entity.setStatus(formDTO.getStatus()); + entity.setCloseCaseTime(new Date()); + } + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //3.新增回复数据 + //获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + IcEventReplyEntity replyEntity = new IcEventReplyEntity(); + replyEntity.setCustomerId(formDTO.getCustomerId()); + replyEntity.setIcEventId(formDTO.getIcEventId()); + replyEntity.setFromUserId(formDTO.getUserId()); + replyEntity.setContent(formDTO.getContent()); + replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName()); + icEventReplyService.insert(replyEntity); + + //4.判断新增或修改分类数据 + if (StringUtils.isNotBlank(formDTO.getOperationType())) { + //查询分类信息 + List categoryList = new ArrayList<>(); + categoryList.add(formDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + AtomicReference categoryEntity = null; + category.getCategoryList().forEach(ca -> { + if (ca.getId().equals(formDTO.getCategoryId())) { + categoryEntity.set(new IcEventCategoryEntity()); + categoryEntity.get().setCustomerId(formDTO.getCustomerId()); + categoryEntity.get().setIcEventId(entity.getId()); + categoryEntity.get().setCategoryId(ca.getId()); + categoryEntity.get().setCategoryPids(ca.getPids()); + categoryEntity.get().setCategoryCode(ca.getCategoryCode()); + } + }); + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == category) { + icEventCategoryService.insert(categoryEntity.get()); + } else { + categoryEntity.get().setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity.get()); + } + } + + //5.新增操作记录数据 + IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "reply", "reply"); + icEventOperationLogService.insert(logEntity); + + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml index 3e2471e5f9..afb3965750 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -3,6 +3,19 @@ - + \ No newline at end of file From 5e47e6b3158c92281749b41182ad20a39042705e Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 18 May 2022 14:24:08 +0800 Subject: [PATCH 037/416] bug --- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 1d62e01ac6..eaf557b72b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -643,7 +643,7 @@ - SELECT r.ID as demandRecId, r.CONTENT, @@ -657,4 +657,4 @@ and s.SERVER_ID=#{serverId} order by r.REPORT_TIME desc - \ No newline at end of file + From 943ffcff81c4189535a096834cf6baa34bdc52e7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:44:46 +0800 Subject: [PATCH 038/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ProjectManageListFormDTO.java | 5 +---- .../main/java/com/epmet/controller/ProjectController.java | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java index e0e7eacecc..54d327354c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java @@ -16,8 +16,6 @@ public class ProjectManageListFormDTO extends PageFormDTO implements Serializabl private static final long serialVersionUID = -3317804468566708838L; - public interface ProjectManageListForm{} - /** * 标题 */ @@ -34,9 +32,8 @@ public class ProjectManageListFormDTO extends PageFormDTO implements Serializabl private String endDate; /** - * all:全部,closed:已关闭,pending:待处理 + * null就是全部,closed:已关闭,pending:待处理 */ - @NotBlank(message = "status不能为空",groups = ProjectManageListForm.class) private String status; private String userId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 2f862559de..4e09cbf193 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -346,7 +346,6 @@ public class ProjectController { */ @PostMapping("project-list") public Result projectList(@LoginUser TokenDto tokenDto,@RequestBody ProjectManageListFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, ProjectManageListFormDTO.ProjectManageListForm.class); formDTO.setUserId(tokenDto.getUserId()); formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(projectService.projectList(formDTO)); From 334e69b3612d22f20ec552e3e095bb516849f316 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:51:04 +0800 Subject: [PATCH 039/416] =?UTF-8?q?=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcPartyUnitDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index 646eaedb99..c3e86c3964 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -121,7 +121,7 @@ CREATED_TIME FROM ic_community_self_organization WHERE DEL_FLAG = '0' - AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') + AND CONCAT(PIDS,':',ORG_ID) LIKE CONCAT('%',#{agencyId},'%') ) t ORDER BY CREATED_TIME desc From 148e77e61809d788dae879690574549465d5501c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:55:16 +0800 Subject: [PATCH 040/416] =?UTF-8?q?=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E7=BD=91=E6=A0=BCID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/EventToProjectFormDTO.java | 5 +++++ .../java/com/epmet/service/impl/ProjectTraceServiceImpl.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java index ecc93498b7..39e4f6f06e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java @@ -104,4 +104,9 @@ public class EventToProjectFormDTO implements Serializable { * 协办单位类型,1社区自组织,2联建单位 */ private String assistanceUnitType; + + /** + * 网格ID + */ + private String gridId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index d597fedeff..273bfc29a4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -705,7 +705,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS //事件已经立项,不能重复操作 ResiEventEntity resiEventEntity=resiEventService.getById(formDTO.getEventId()); //TODO 兼容新事件表 - String gridId = ""; + String gridId = formDTO.getGridId(); if(null==resiEventEntity||resiEventEntity.getShiftProject()){ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(),EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg()); } From e083ad76c47ac4fefae45d1264ed8e8bca787f94 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 15:01:09 +0800 Subject: [PATCH 041/416] =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 2befd8ed97..f453fa9fd9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -598,7 +598,7 @@ AND DATE_FORMAT(p.CREATED_TIME,'%Y%m%d') #{endDate} - + AND p.`STATUS` = #{status} GROUP BY t.PROJECT_ID From 820f558278ced9ba1594c362d576003a21489a2d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 15:23:32 +0800 Subject: [PATCH 042/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E7=AB=8B=E9=A1=B9=E3=80=81=E8=BD=AC=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcDemandFormDTO.java | 3 + .../epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- .../dto/form/IcEventToProjectFormDTO.java | 110 +++++++++ .../epmet/controller/IcEventController.java | 29 +++ .../com/epmet/service/IcEventService.java | 16 +- .../epmet/service/ProjectTraceService.java | 6 + .../service/impl/IcEventServiceImpl.java | 58 ++++- .../service/impl/ProjectTraceServiceImpl.java | 230 ++++++++++++++++++ 8 files changed, 449 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 657bea778f..78c5c7becc 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -30,6 +30,9 @@ public class IcDemandFormDTO implements Serializable { public interface UpdateInternalGroup { } + @NotBlank(message = "事件id不能为空",groups = AddInternalGroup.class) + private String icEventId; + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) private String demandRecId; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index b3fd086a1c..caa87021bb 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -92,7 +92,7 @@ public class IcEventAddEditFormDTO implements Serializable { /** * 立项接口入参对象 */ - private EventToProjectFormDTO project; + private IcEventToProjectFormDTO project; /** * 转需求接口入参对象 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java new file mode 100644 index 0000000000..7c5bf3fc6c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 事件管理-立项 + * + * @author sun + */ +@Data +public class IcEventToProjectFormDTO implements Serializable { + private static final long serialVersionUID = 3392008990676159012L; + + public interface AddUserInternalGroup { + } + + public interface ApprovalCategory extends CustomerClientShowGroup { + } + + /** + * 事件id + */ + @NotBlank(message = "事件id不能为空", groups = AddUserInternalGroup.class) + private String icEventId; + /** + * 项目方案 1000 + */ + @Length(min = 1, max = 1000, message = "项目方案1000字", groups = {ApprovalCategory.class}) + private String publicReply; + /** + * 内部备注 1000 + * 21.08.09 直接立项的内部备注是必填的,然后议题转项目和我要直报转项目的都是非必填的 + */ + //@Length(min = 1, max = 1000, message = "内部备注1000字", groups = {ApprovalCategory.class}) + private String internalRemark; + + /** + * 吹哨勾选的工作人员信息集合,不可为空 + */ + @Valid + private List staffList; + /** + * 项目所选分类集合,不可为空 + */ + @Valid + private List categoryList; + /** + * 项目所选标签集合 + */ + private List tagList; + + @Length(min = 1, max = 20, message = "项目标题不能超过20位", groups = {ApprovalCategory.class}) + private String title; + + /** + * 公开答复对应文件集合 + */ + private List publicFile; + /** + * 内部备注对应文件集合 + */ + private List internalFile; + + //定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置] + private String locateAddress; + //定位经度 + private String locateLongitude; + //定位纬度 + private String locateDimension; + + + + //以下参数从token中获取 + /** + * 当前用户id + */ + @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) + private String userId; + + /** + * 当前客户id + */ + @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) + private String customerId; + + private String app; + private String client; + + /** + * 网格id + */ + @NotBlank(message = "网格id不能为空", groups = AddUserInternalGroup.class) + private String gridId; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1b9674f7da..c03e541af8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; +import com.epmet.dto.form.demand.ReportDemandFormDTO; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -153,6 +154,34 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 事件管理-立项 + **/ + @PostMapping("icEventToProject") + public Result icEventToProject(@LoginUser TokenDto tokenDto, @RequestBody IcEventToProjectFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setApp(tokenDto.getApp()); + formDTO.setClient(tokenDto.getClient()); + ValidatorUtils.validateEntity(formDTO,IcEventToProjectFormDTO.ApprovalCategory.class,IcEventToProjectFormDTO.AddUserInternalGroup.class); + icEventService.icEventToProject(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 事件管理-转需求 + **/ + @PostMapping("icEventToDemand") + public Result icEventToDemand(@LoginUser TokenDto tokenDto, @RequestBody IcDemandFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setDemandUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.Add.class,IcDemandFormDTO.AddInternalGroup.class); + icEventService.icEventToDemand(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9921fb6b85..eb146d45a4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,9 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.IcEventReplyFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -106,4 +104,16 @@ public interface IcEventService extends BaseService { * @Description 事件管理-回复 **/ void reply(IcEventReplyFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-立项 + **/ + void icEventToProject(IcEventToProjectFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-转需求 + **/ + void icEventToDemand(IcDemandFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java index 133711aea9..2b8d2a88e1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java @@ -205,4 +205,10 @@ public interface ProjectTraceService { * @Date 2022/1/4 15:33 */ void approvaledListExport(HttpServletResponse response, ApprovaledListFromDTO formDTO); + + /** + * 事件管理-事件立项 + * @author sun + */ + EventToProjectResultDTO icEventToProject(IcEventToProjectFormDTO formDTO); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 2a12250265..29582535e0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -208,7 +208,7 @@ public class IcEventServiceImpl extends BaseServiceImpl recIdResult = epmetHeartOpenFeignClient.icEventToDemand(formDTO); + if (!recIdResult.success() || recIdResult.getData() == null) { + throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); + } + + //3.更新事件数据 + entity.setOperationType("2"); + entity.setOperationId(recIdResult.getData().getDemandRecId()); + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //4.新增操作记录 + IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getDemandUserId(), new Date(), "shift_demand", "shift_demand"); + icEventOperationLogService.insert(logEntity); + + } + + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 273bfc29a4..4046d89bf6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -1225,4 +1225,234 @@ public class ProjectTraceServiceImpl implements ProjectTraceS epmetMessageOpenFeignClient.saveUserMessage(userMessage); } + + /** + * 事件管理-事件立项【赶时间没空兼容】 + * @author sun + */ + @Override + public EventToProjectResultDTO icEventToProject(IcEventToProjectFormDTO formDTO) { + //判断是否存在已立项 + List projectEntityList = projectService.getByOriginId(formDTO.getIcEventId()); + if (!CollectionUtils.isEmpty(projectEntityList)) { + throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(), EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg()); + } + List staffList = formDTO.getStaffList(); + //1.文字内容安全校验 + List list = new ArrayList<>(); + list.add(formDTO.getTitle()); + list.add(formDTO.getPublicReply()); + list.add(formDTO.getPublicReply()); + list.add(formDTO.getInternalRemark()); + safetyCheck(list); + //2.数据准备 + //2-1获取当前工作人员基本信息 + EventToProjectFormDTO eventToProjectFormDTO = ConvertUtils.sourceToTarget(formDTO, EventToProjectFormDTO.class); + LoginUserDetailsResultDTO loginUser = queryLoginUserInfo(eventToProjectFormDTO); + + //2-2.调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用 + AgencyDeptGridResultDTO agencyDeptGrid = getAgencyDeptGridRes(formDTO.getStaffList(), loginUser.getAgencyId()); + + //2-3.调用issue服务,查询分类、标签数据信息 + CategoryTagResultDTO categoryTagResultDTO = queryCategoryTagRes(eventToProjectFormDTO); + List categoryList = categoryTagResultDTO.getCategoryList(); + List tagList = categoryTagResultDTO.getTagList(); + + //2-4.批量查询被勾选工作人员基础信息 + List staffInfoList = queryStaffListRes(formDTO.getStaffList(), formDTO.getUserId()); + + //3.封装保存业务数据 + //3-1.项目主表新增数据 + ProjectEntity projectEntity = new ProjectEntity(); + projectEntity.setCustomerId(formDTO.getCustomerId()); + //立项人的所属组织id + projectEntity.setAgencyId(loginUser.getAgencyId()); + projectEntity.setOrigin("ic_event"); + projectEntity.setOriginId(formDTO.getIcEventId()); + projectEntity.setTitle(formDTO.getTitle()); + projectEntity.setBackGround(formDTO.getPublicReply()); + projectEntity.setGridId(formDTO.getGridId()); + projectEntity.setStatus(ProjectConstant.PENDING); + projectEntity.setOrgIdPath(loginUser.getOrgIdPath()); + projectEntity.setLocateAddress(null == formDTO.getLocateAddress() ? "" : formDTO.getLocateAddress()); + projectEntity.setLocateLongitude(null == formDTO.getLocateLongitude() ? "" : formDTO.getLocateLongitude()); + projectEntity.setLocateDimension(null == formDTO.getLocateDimension() ? "" : formDTO.getLocateDimension()); + projectService.insert(projectEntity); + + //3-2.项目进展表新增第一个节点数据 + ProjectProcessEntity processEntity = new ProjectProcessEntity(); + processEntity.setProjectId(projectEntity.getId()); + processEntity.setCustomerId(formDTO.getCustomerId()); + processEntity.setStaffId(formDTO.getUserId()); + processEntity.setOperation(ProjectConstant.OPERATION_CREATED); + processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL); + processEntity.setPublicReply(formDTO.getPublicReply()); + processEntity.setInternalRemark(formDTO.getInternalRemark()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); + agencyDeptGrid.getAgencyList().forEach(agency -> { + if (loginUser.getAgencyId().equals(agency.getId())) { + processEntity.setDepartmentName(agency.getOrganizationName()); + processEntity.setAgencyId(agency.getId()); + if (org.apache.commons.lang3.StringUtils.isBlank(agency.getPids()) || org.apache.commons.lang3.StringUtils.equals(NumConstant.ZERO_STR, agency.getPids().trim()) || "".equals(agency.getPids().trim())) { + processEntity.setOrgIdPath(agency.getId()); + } else { + processEntity.setOrgIdPath(agency.getPids().concat(":").concat(agency.getId())); + } + } + }); + projectProcessService.insert(processEntity); + + //3-3.项目人员表批量新增数据 + List entityList = new ArrayList<>(); + staffList.forEach(ts -> { + ProjectStaffEntity entity = ConvertUtils.sourceToTarget(ts, ProjectStaffEntity.class); + entity.setOrgId(ts.getAgencyId()); + entity.setProjectId(projectEntity.getId()); + entity.setProcessId(processEntity.getId()); + entity.setIsHandle(ProjectConstant.UNHANDLED); + agencyDeptGrid.getAgencyList().forEach(agency -> { + if (ts.getAgencyId().equals(agency.getId())) { + entity.setCustomerId(agency.getCustomerId()); + entity.setOrgIdPath(("".equals(agency.getPids()) ? "" : agency.getPids() + ":") + agency.getId()); + entity.setDepartmentName(agency.getOrganizationName()); + } + }); + if (org.apache.commons.lang3.StringUtils.isNotBlank(ts.getDepartmentId())) { + agencyDeptGrid.getDeptList().forEach(dept -> { + if (ts.getDepartmentId().equals(dept.getId())) { + entity.setDepartmentName(entity.getDepartmentName() + "-" + dept.getDepartmentName()); + } + }); + } + if (org.apache.commons.lang3.StringUtils.isNotBlank(ts.getGridId())) { + agencyDeptGrid.getGridList().forEach(grid -> { + if (ts.getGridId().equals(grid.getId())) { + entity.setDepartmentName(entity.getDepartmentName() + "-" + grid.getGridName()); + } + }); + } + entityList.add(entity); + }); + projectStaffService.insertBatch(entityList); + + //3-4.项目附件表新增数据 + if ((null != formDTO.getPublicFile() && formDTO.getPublicFile().size() > NumConstant.ZERO) + || (null != formDTO.getInternalFile() && formDTO.getInternalFile().size() > NumConstant.ZERO)) { + projectService.saveFile(formDTO.getPublicFile(), formDTO.getInternalFile(), formDTO.getCustomerId(), projectEntity.getId(), processEntity.getId()); + } + + //3-5.项目分类表新增数据 + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(formDTO.getCategoryList())) { + List categoryEntityList = new ArrayList<>(); + formDTO.getCategoryList().forEach(item -> { + categoryList.forEach(ca -> { + if (item.getId().equals(ca.getId())) { + ProjectCategoryEntity entity = new ProjectCategoryEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setProjectId(projectEntity.getId()); + entity.setCategoryId(item.getId()); + entity.setCategoryPids(ca.getPids()); + entity.setCategoryCode(ca.getCategoryCode()); + entity.setGridId(formDTO.getGridId()); + categoryEntityList.add(entity); + } + }); + }); + projectCategoryService.insertBatch(categoryEntityList); + } + + //3-6.项目标签表新增数据 + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(formDTO.getTagList())) { + List tagEntityList = new ArrayList<>(); + formDTO.getTagList().forEach(item -> { + tagList.forEach(ta -> { + if (item.getId().equals(ta.getId())) { + ProjectTagsEntity entity = new ProjectTagsEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setProjectId(projectEntity.getId()); + entity.setTagId(item.getId()); + entity.setTagName(ta.getTagName()); + tagEntityList.add(entity); + } + }); + }); + projectTagsService.insertBatch(tagEntityList); + } + + //3-7:初始化机关-项目时间关联数据 + Date current = new Date(); + List projectStaffIds = entityList.stream().map(ProjectStaffEntity::getId).distinct().collect(Collectors.toList()); + if (!org.apache.commons.collections4.CollectionUtils.isEmpty(projectStaffIds)) { + List container = new LinkedList<>(); + projectStaffIds.forEach(o -> { + ProjectOrgRelationEntity period = new ProjectOrgRelationEntity(); + period.setProjectStaffId(o); + period.setInformedDate(current); + period.setSourceOperation(ProjectConstant.OPERATION_CREATED); + period.setCreatedBy(formDTO.getUserId()); + container.add(period); + }); + relationDao.insertBatch(container); + } + + //4.推送站内信、微信、短信消息 + //4-1.调用epmet-message服务,给工作端勾选的工作人员发送消息 + if (!shiftProjectMessage(formDTO.getStaffList(), formDTO.getCustomerId(), formDTO.getTitle(), projectEntity.getId()).success()) { + throw new RenException("事件转为项目,推送站内信失败"); + } + + //4-2.以及政府端调用epmet-message服务,给工作端工作人员推送微信订阅消息 + if (!wxmpShiftProjectMessage(formDTO.getStaffList(), formDTO.getCustomerId(), formDTO.getTitle()).success()) { + logger.error("事件转为项目,推送微信订阅消息失败!"); + } + + //4-3.吹哨短信消息 + List smsList = new ArrayList<>(); + staffList.forEach(staff -> { + staffInfoList.forEach(st -> { + if (staff.getStaffId().equals(st.getStaffId())) { + ProjectSendMsgFormDTO sms = new ProjectSendMsgFormDTO(); + sms.setCustomerId(st.getCustomerId()); + sms.setMobile(st.getMobile()); + sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_TRANSFER); + sms.setParameterKey("send_msg"); + smsList.add(sms); + } + }); + }); + Result result = epmetMessageOpenFeignClient.projectSendMsg(smsList); + if (!result.success()) { + logger.error("项目吹哨,发送手机短信失败" + JSON.toJSONString(result)); + } + + //5.项目实时统计消息 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String mqMsgBrief = String.format("创建了\"%s\"的项目", formDTO.getTitle()); + ProjectChangedMQMsg mqMsg = new ProjectChangedMQMsg(projectEntity.getCustomerId(), ProjectConstant.OPERATION_CREATED, + projectEntity.getId(), + formDTO.getUserId(), + new Date(), + mqMsgBrief, + IpUtils.getIpAddr(request), + loginUserUtil.getLoginUserApp(), + loginUserUtil.getLoginUserClient()); + boolean msgResult = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendProjectChangedMqMsg(mqMsg); + if (!msgResult) { + log.error("项目实时统计消息发送失败"); + } + // 数据上链 + try { + blockChainUploadService.send2BlockChain(projectEntity, processEntity, entityList, null); + } catch (Exception e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【项目流转】上链失败,错误信息:{}", errorMsg); + } + + EventToProjectResultDTO resultDTO = new EventToProjectResultDTO(); + resultDTO.setProjectId(projectEntity.getId()); + return resultDTO; + } + + } From 429c677f65770fd58958297032ef8ff0a37496c5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 15:39:16 +0800 Subject: [PATCH 043/416] =?UTF-8?q?xiangmu=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProjectManageListResultDTO.java | 4 ++-- .../com/epmet/service/impl/ProjectServiceImpl.java | 13 ++++++------- .../src/main/resources/mapper/ProjectDao.xml | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index c0bce880b1..4cb79ebdf7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -53,7 +53,7 @@ public class ProjectManageListResultDTO implements Serializable { /** * 滞留天数 */ - private Integer detentionDays; + private String detentionDays; /** * 状态 @@ -77,7 +77,7 @@ public class ProjectManageListResultDTO implements Serializable { this.shiftProjectTime = ""; this.projectScheme = ""; this.internalRemark = ""; - this.detentionDays = NumConstant.ZERO; + this.detentionDays = NumConstant.ZERO_STR; this.status = ""; this.departmentNameList = new ArrayList<>(); this.projectId = ""; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 6214f00200..76a3149704 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -3191,9 +3191,8 @@ public class ProjectServiceImpl extends BaseServiceImpl result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); - int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); - formDTO.setPageNo(pageIndex); - List projectManageList = baseDao.getProjectManageList(formDTO); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); + List projectManageList = pageInfo.getList(); if (CollectionUtils.isNotEmpty(projectManageList)){ // 获取滞留天数 Integer days = getDays(ConvertUtils.sourceToTarget(formDTO, ProjectListFromDTO.class)); @@ -3210,23 +3209,23 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentNameList = new ArrayList<>(); if (ProjectConstant.CLOSED.equals(p.getStatus())) { p.setDepartmentNameList(departmentNameList); - p.setDetentionDays(NumConstant.ZERO); + p.setDetentionDays(NumConstant.ZERO_STR); } else { ProjectDTO projectDTO = ConvertUtils.sourceToTarget(p, ProjectDTO.class); projectDTO.setId(p.getProjectId()); if (p.getIsHandle().equals("unhandled")){ String detentionDays = getDetentionDays(projectDTO); if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > days) { - p.setDetentionDays(Integer.valueOf(detentionDays)); + p.setDetentionDays(detentionDays); } else { - p.setDetentionDays(Integer.valueOf(detentionDays)); + p.setDetentionDays(detentionDays); } } departmentNameList = baseDao.selectDepartmentNameList(projectDTO); p.setDepartmentNameList(departmentNameList); } }); - result.setTotal(projectManageList.size()); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); result.setList(projectManageList); } return result; diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index f453fa9fd9..e01a45275c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -603,6 +603,5 @@ GROUP BY t.PROJECT_ID ORDER BY p.CREATED_TIME DESC - LIMIT #{pageNo}, #{pageSize} \ No newline at end of file From 5a182abf8a1de5979aa9943e08a8ad8ca0c94e99 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 15:40:18 +0800 Subject: [PATCH 044/416] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovIssueOpenFeignClient.java | 3 + .../GovIssueOpenFeignClientFallBack.java | 7 ++ .../IssueProjectCategoryDictController.java | 7 ++ .../IssueProjectCategoryDictService.java | 2 + .../IssueProjectCategoryDictServiceImpl.java | 9 +++ .../form/IcEventCategoryAnalysisFormDTO.java | 68 +++++++++++++++++++ .../result/IcEventCategoryAnalysisResDTO.java | 21 ++++++ .../epmet/controller/IcEventController.java | 20 ++++-- .../main/java/com/epmet/dao/IcEventDao.java | 15 ++-- .../com/epmet/service/IcEventService.java | 13 ++-- .../service/impl/IcEventServiceImpl.java | 37 ++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 ++++++- 12 files changed, 207 insertions(+), 19 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 221a23af53..bc14e5764d 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -385,4 +385,7 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issue/audit-reset") Result issueAuditReset(@RequestParam("gridId")String gridId); + + @PostMapping(value = "/gov/issue/issueprojectcategorydict/first/{customerId}") + Result> queryFirstCategory(@PathVariable("customerId") String customerId); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index b9db284194..bb6426080e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -321,4 +321,11 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result issueAuditReset(String gridId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueAuditReset", gridId); } + + @Override + public Result> queryFirstCategory(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryFirstCategory", customerId); + } + + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 51b04c93f3..1af7dc4d7c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -299,5 +299,12 @@ public class IssueProjectCategoryDictController { return new Result>().ok(issueProjectCategoryDictService.getCategoryMap(customerId)); } + @PostMapping("first/{customerId}") + public Result> queryFirstCategory(@PathVariable("customerId") String customerId) { + List list = issueProjectCategoryDictService.queryFirstCategory(customerId); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 204fba3743..1cc9c7b98e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -231,4 +231,6 @@ public interface IssueProjectCategoryDictService extends BaseService getCategoryMap(String customerId); + + List queryFirstCategory(String customerId); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 08adcb5860..390da9e43b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -540,4 +540,13 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl queryFirstCategory(String customerId) { + List list=baseDao.selectCategoryOneLevelListByCustomerId(customerId); + if(CollectionUtils.isEmpty(list)){ + return new ArrayList<>(); + } + return ConvertUtils.sourceToTarget(list,IssueProjectCategoryDictDTO.class); + } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java new file mode 100644 index 0000000000..99fa7579ea --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java @@ -0,0 +1,68 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * 社区治理可视化分析 + * 事件分类分析-饼1入参 + */ +@Data +public class IcEventCategoryAnalysisFormDTO { + + /** + * 处理状态比例查询 + */ + public interface TotalPie { + } + + /** + * 要查询的组织ID + */ + @NotBlank(message = "组织ID为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private String orgId; + + /** + * 组织类型。grid,agency + */ + @NotBlank(message = "组织类型为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private String orgType; + + /** + * 查询起始时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private Date queryStartTime; + + /** + * 查询截止时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private Date queryEndTime; + + /** + * 一级分类 code长度 + */ + private Integer categoryOneLength; + + //以下参数从token中获取 + /** + * 当前登录用户 + */ + private String staffId; + + /** + * 当前客户id + */ + private String customerId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java new file mode 100644 index 0000000000..62609af451 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 社区治理可视化分析 + * 事件分类分析-饼1 + */ +@Data +public class IcEventCategoryAnalysisResDTO implements Serializable { + //一级分类Code + private String categoryCode; + //一级分类名称 + private String categoryName; + //一级分类颜色 + private String color = ""; + //分类下项目总数 + private Integer total = 0; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1b9674f7da..2e1705a04d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -14,10 +14,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -153,6 +150,21 @@ public class IcEventController { return new Result(); } + /** + * 事件分类分析-一级分类下事件数量 + * + * @param formDTO + * @return + */ + @PostMapping("category-analysis/total") + public Result> categoryAnalysisTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + List list = icEventService.categoryAnalysisTotal(formDTO); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 3a82df048c..bdd23f869f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,12 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.IcEventMonthlyCountResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; +import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventCategoryAnalysisResDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyCountResultDTO; import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; @@ -16,8 +16,6 @@ import java.util.Date; import java.util.List; import java.util.Map; -import java.util.List; - /** * 事件管理表 * @@ -78,4 +76,11 @@ public interface IcEventDao extends BaseDao { @Param("gridPids") String gridPids, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * + * @param formDTO + * @return + */ + List selectFirstCategoryTotal(IcEventCategoryAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9921fb6b85..f35275d840 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -4,12 +4,10 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventAddEditFormDTO; +import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.IcEventReplyFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; @@ -106,4 +104,11 @@ public interface IcEventService extends BaseService { * @Description 事件管理-回复 **/ void reply(IcEventReplyFormDTO formDTO); + + /** + * 事件分类分析-一级分类下事件数量 + * @param formDTO + * @return + */ + List categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 2a12250265..8a3ed9fbd8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,14 +21,11 @@ import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.result.*; @@ -42,6 +39,7 @@ import com.epmet.resi.group.constant.TopicConstant; import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -53,6 +51,7 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -61,6 +60,7 @@ import java.util.stream.Collectors; * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-17 */ +@Slf4j @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { @@ -581,4 +581,31 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO) { + //1.查询客户下一级分类信息 + Result> res = govIssueOpenFeignClient.queryFirstCategory(formDTO.getCustomerId()); + if (!res.success() || CollectionUtils.isEmpty(res.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前客户下未配置事件分类"); + } + int length = res.getData().get(NumConstant.ZERO).getCategoryCode().length(); + formDTO.setCategoryOneLength(length); + + List resList = baseDao.selectFirstCategoryTotal(formDTO); + Map resMap = resList.stream().collect(Collectors.toMap(IcEventCategoryAnalysisResDTO::getCategoryCode, Function.identity())); + List result = new ArrayList<>(); + for (IssueProjectCategoryDictDTO dict : res.getData()) { + IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); + resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); + result.add(resultDto); + } + return result; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index e1bd36f12f..abab8e75ed 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -141,5 +141,27 @@ order by ie.latest_operated_time desc, rea.sort asc - + \ No newline at end of file From 2395fb7af2282660dfd80edb15a384055b58cd9b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 15:49:14 +0800 Subject: [PATCH 045/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventAddEditFormDTO.java | 8 +++++ .../epmet/dto/form/IcEventReplyFormDTO.java | 11 ++++++- .../epmet/controller/IcEventController.java | 17 +++++++---- .../com/epmet/service/IcEventService.java | 15 ++++------ .../service/impl/IcEventServiceImpl.java | 29 +++++++++++++++++-- 5 files changed, 63 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index caa87021bb..76d50cd35a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -1,10 +1,12 @@ package com.epmet.dto.form; import com.epmet.commons.tools.validator.group.AddGroup; +import com.fasterxml.jackson.annotation.JsonFormat; 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.List; @@ -47,6 +49,12 @@ public class IcEventAddEditFormDTO implements Serializable { */ @NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class}) private String sourceType; + /** + * 发生时间 + */ + @NotNull(message = "发生时间不能为空", groups = {AddGroup.class}) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String happenTime; /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index f4e7b57ab0..1060909db2 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import lombok.Data; @@ -14,11 +15,13 @@ import java.io.Serializable; public class IcEventReplyFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface Comment extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class}) + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class}) private String icEventId; /** * 二类分类Id @@ -37,6 +40,12 @@ public class IcEventReplyFormDTO implements Serializable { */ private String status; + /** + * 满意度 - 不满意:bad、基本满意:good、非常满意:perfect + */ + @NotBlank(message = "满意度不能为空", groups = {Comment.class}) + private String satisfaction; + private String customerId; private String userId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 48406f1407..2469aa4e82 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -15,11 +15,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.form.demand.ReportDemandFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -197,6 +192,18 @@ public class IcEventController { return new Result>().ok(list); } + /** + * @Author sun + * @Description 事件管理-评价 + **/ + @PostMapping("comment") + public Result comment(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Comment.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icEventService.comment(formDTO); + return new Result(); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 593ce9605e..9fdbb15729 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -4,20 +4,11 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.IcEventReplyFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; import java.util.List; -import java.util.Map; /** * 事件管理表 @@ -128,4 +119,10 @@ public interface IcEventService extends BaseService { * @return */ List categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-评价 + **/ + void comment(IcEventReplyFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0d911480c6..54c1ea27af 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -229,7 +229,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 15:56:35 +0800 Subject: [PATCH 046/416] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java | 2 +- .../main/java/com/epmet/controller/IcEventController.java | 6 +----- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java index 99fa7579ea..9e3747a9cf 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java @@ -53,7 +53,7 @@ public class IcEventCategoryAnalysisFormDTO { * 一级分类 code长度 */ private Integer categoryOneLength; - + private String gridPids; //以下参数从token中获取 /** * 当前登录用户 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 48406f1407..77ab683550 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -15,11 +15,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.form.demand.ReportDemandFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -193,6 +188,7 @@ public class IcEventController { public Result> categoryAnalysisTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,IcEventCategoryAnalysisFormDTO.TotalPie.class); List list = icEventService.categoryAnalysisTotal(formDTO); return new Result>().ok(list); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0d911480c6..3a1b4e28ce 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -645,13 +645,15 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO) { - //1.查询客户下一级分类信息 Result> res = govIssueOpenFeignClient.queryFirstCategory(formDTO.getCustomerId()); if (!res.success() || CollectionUtils.isEmpty(res.getData())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前客户下未配置事件分类"); } int length = res.getData().get(NumConstant.ZERO).getCategoryCode().length(); formDTO.setCategoryOneLength(length); + if ("agency".equals(formDTO.getOrgType())) { + formDTO.setGridPids(getEventGridPids(formDTO.getOrgId())); + } List resList = baseDao.selectFirstCategoryTotal(formDTO); Map resMap = resList.stream().collect(Collectors.toMap(IcEventCategoryAnalysisResDTO::getCategoryCode, Function.identity())); From d8158f08bf592cc81c9dd736b585b17d7870820e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 16:13:53 +0800 Subject: [PATCH 047/416] color --- .../src/main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 681fa25d76..43e74723e6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -659,6 +659,7 @@ public class IcEventServiceImpl extends BaseServiceImpl result = new ArrayList<>(); for (IssueProjectCategoryDictDTO dict : res.getData()) { IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); + resultDto.setColor(dict.getColour()); resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); result.add(resultDto); } From f54b3ec42d643b02c5171c5d49d3d4a0c1df74df Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 16:27:34 +0800 Subject: [PATCH 048/416] color --- .../main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java | 5 ++++- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java index b89917e0d7..fd18bc5569 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java @@ -118,5 +118,8 @@ public class IssueProjectCategoryDictDTO implements Serializable { * 颜色 */ private String colour; - + /** + * 颜色 + */ + private String color; } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 43e74723e6..681fa25d76 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -659,7 +659,6 @@ public class IcEventServiceImpl extends BaseServiceImpl result = new ArrayList<>(); for (IssueProjectCategoryDictDTO dict : res.getData()) { IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); - resultDto.setColor(dict.getColour()); resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); result.add(resultDto); } From 14b492e2b13706af7c13a77c5e47968666972f64 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 16:28:48 +0800 Subject: [PATCH 049/416] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=20+=20gridId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java | 2 ++ .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 1 + .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 1 + 3 files changed, 4 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java index adb4ed7409..49d2afd9de 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -57,5 +57,7 @@ public class ShiftProjectFormDTO implements Serializable { */ private String customerId; + private String gridId; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index fd4f54a866..8722a0c027 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1014,6 +1014,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp //3:调用gov-project服务,新增项目各业务表初始数据 formDTO.setCategoryList(categoryList); + formDTO.setGridId(entity.getGridId()); List tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId()); formDTO.setTagList(tagList); Result resultDTO = govProjectFeignClient.issueShiftProject(formDTO); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 76a3149704..e0c7df913d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -1162,6 +1162,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 16:48:06 +0800 Subject: [PATCH 050/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventListFormDTO.java | 11 ++++ .../dto/result/IcEventListResultDTO.java | 20 ++++++- .../epmet/controller/IcEventController.java | 10 ++++ .../com/epmet/service/IcEventService.java | 7 +++ .../service/impl/IcEventServiceImpl.java | 59 ++++++++++++++++++- .../src/main/resources/mapper/IcEventDao.xml | 50 ++++++++-------- 6 files changed, 131 insertions(+), 26 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index eb00fcf44d..207988f1fa 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -12,6 +15,14 @@ import java.io.Serializable; public class IcEventListFormDTO implements Serializable { private static final long serialVersionUID = 9156247659994638103L; + public interface Detail extends CustomerClientShowGroup { + } + + /** + * 事件ID + */ + @NotBlank(message = "事件ID不能为空", groups = Detail.class) + private String icEventId; /** * 所属网格 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 3e01ff4144..e5e6680ea8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,9 +1,11 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.Date; import java.util.List; @@ -18,7 +20,7 @@ public class IcEventListResultDTO implements Serializable { /** * 事件Id */ - private String eventId; + private String icEventId; /** * 网格ID */ @@ -39,10 +41,23 @@ public class IcEventListResultDTO implements Serializable { * 音频[url集合] */ private List voiceList; + /** + * 分类Id + */ + private String categoryId; + /** + * 分类名称(医疗-二类名) + */ + private String categoryName; /** * 上报渠道[字典表] */ private String sourceType; + /** + * 发生时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date happenTime; /** * 上报渠道 */ @@ -70,7 +85,8 @@ public class IcEventListResultDTO implements Serializable { /** * 上报时间 */ - private String createdTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; /** * 状态【处理中:processing;已办结:closed_case】】 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 748155e3f2..cd04510c43 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -206,6 +206,16 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 事件管理-评价 + **/ + @PostMapping("detail") + public Result detail(@RequestBody IcEventListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); + return new Result().ok(icEventService.detail(formDTO)); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9fdbb15729..0021dc6bc7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -125,4 +125,11 @@ public interface IcEventService extends BaseService { * @Description 事件管理-评价 **/ void comment(IcEventReplyFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-评价 + **/ + IcEventListResultDTO detail(IcEventListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 681fa25d76..e2ad6eef57 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -102,7 +102,7 @@ public class IcEventServiceImpl extends BaseServiceImpl gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); - //与户主关系字典表数据 + //事件管理字典表数据 Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); @@ -690,5 +690,62 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.icEventList(formDTO); + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(0); + //查询网格名称(组织-网格) + List gridIds = list.stream().map(IcEventListResultDTO::getGridId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); + Result> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); + + //事件管理字典表数据 + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + + //封装数据 + if (gridInfoMap.containsKey(resultDTO.getGridId())) { + resultDTO.setGridName(gridInfoMap.get(resultDTO.getGridId())); + } + if (StringUtils.isNotBlank(resultDTO.getSourceType())) { + resultDTO.setSourceTypeName(statusMap.get(resultDTO.getSourceType())); + } + //每个事件对应的图片数据 + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + resultDTO.getAttachmentList().forEach(file -> { + if ("image".equals(file.getType())) { + imageList.add(file.getUrl()); + } else if ("voice".equals(file.getType())) { + voiceList.add(file.getUrl()); + } + }); + resultDTO.setImageList(imageList); + resultDTO.setVoiceList(voiceList); + + //分类信息 + if(StringUtils.isNotBlank(resultDTO.getCategoryId())){ + List categoryList = new ArrayList<>(); + categoryList.add(resultDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(resultDTO.getCategoryId())) { + resultDTO.setCategoryName(ca.getParentCategoryName()+"-"+ca.getCategoryName()); + } + } + } + } + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index abab8e75ed..695333d2cb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -3,27 +3,6 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + select STATUS status, count(1) eventCount from ic_event e @@ -168,4 +183,15 @@ ORDER BY total DESC + + + \ No newline at end of file From adde2eee217564a8804a55765e5e790e49018260 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 17:48:53 +0800 Subject: [PATCH 053/416] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=B7=BB=E5=8A=A0=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ShiftProjectFormDTO.java | 10 ++++++++++ .../com/epmet/service/impl/ProjectServiceImpl.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java index 49d2afd9de..e136ff04fa 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -59,5 +59,15 @@ public class ShiftProjectFormDTO implements Serializable { private String gridId; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index e0c7df913d..ad8d3ebbda 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -1177,6 +1177,8 @@ public class ProjectServiceImpl extends BaseServiceImpl { if (issueDTO.getOrgId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); From 500c24baefd60c554f5a35e58d3152b503401a3b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 17:56:23 +0800 Subject: [PATCH 054/416] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/task/AutoEvaluationTask.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java new file mode 100644 index 0000000000..348d37bbad --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.dto.form.AutoEvaluationFormDTO; +import com.epmet.feign.GovProjectOpenFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @DateTime 2022/5/18 17:53 + * @DESC + */ +@Slf4j +@Component("autoEvaluationTask") +public class AutoEvaluationTask implements ITask{ + + @Autowired + private GovProjectOpenFeignClient projectOpenFeignClient; + + @Override + public void run(String params) { + AutoEvaluationFormDTO formDTO = new AutoEvaluationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, AutoEvaluationFormDTO.class); + } + projectOpenFeignClient.autoEvaluation(formDTO); + } +} From 5a0f3c1845eeab4b9014a558bb8248c22aa092fd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 18:12:46 +0800 Subject: [PATCH 055/416] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubOrgResDTO.java | 20 ++++++++++++++++ .../epmet/feign/GovOrgOpenFeignClient.java | 8 +++++++ .../GovOrgOpenFeignClientFallback.java | 11 +++++++++ .../controller/CustomerAgencyController.java | 12 ++++++++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 1 + .../epmet/service/CustomerAgencyService.java | 7 ++++++ .../impl/CustomerAgencyServiceImpl.java | 11 +++++++++ .../resources/mapper/CustomerAgencyDao.xml | 22 +++++++++++++++++ .../dto/result/IcEventAnalysisOrgResDTO.java | 1 + .../main/java/com/epmet/dao/IcEventDao.java | 10 ++++++++ .../service/impl/IcEventServiceImpl.java | 24 +++++++++++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 +++++++++++++++++++ 12 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java new file mode 100644 index 0000000000..220c5c5bbf --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 当前组织的直属下级(下级组织+直属网格) + */ +@Data +public class SubOrgResDTO implements Serializable { + private String orgId; + /** + * agency + * grid + */ + private String orgType; + private String orgName; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index e2c0ae2359..7e21d51a83 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -624,4 +624,12 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/house/houseupdate") Result houseUpdate(@RequestBody IcHouseAddFormDTO formDTO); + + /** + * 直属网格+下一级组织 + * @param agencyId + * @return + */ + @GetMapping("/gov/org/customeragency/subOrgList/{agencyId}") + Result> subOrgList(@PathVariable("agencyId")String agencyId); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index 595fd11928..adac11545a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -403,4 +403,15 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result houseUpdate( IcHouseAddFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "houseUpdate",formDTO); } + + /** + * 直属网格+下一级组织 + * + * @param agencyId + * @return + */ + @Override + public Result> subOrgList(String agencyId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList",agencyId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index e097d3b38d..0cd507876d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -415,4 +415,16 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.rootAgencyGridTree(formDTO.getAgencyId())); } + /** + * 当前agencyId的下一级组织+直属网格 + * @param agencyId + * @return + */ + @GetMapping("subOrgList/{agencyId}") + public Result> subOrgList(@PathVariable("agencyId") String agencyId) { + List list = customerAgencyService.subOrgList(agencyId); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 5e7cd8713a..d81fcd8367 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -316,5 +316,6 @@ public interface CustomerAgencyDao extends BaseDao { */ List getCommunityList(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + List selectSubOrg(String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 855fae6038..a8c661d76b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -288,4 +288,11 @@ public interface CustomerAgencyService extends BaseService * @author sun **/ AgencyTreeResultDTO rootAgencyGridTree(String agencyId); + + /** + * 当前agencyId的下一级组织+直属网格 + * @param agencyId + * @return + */ + List subOrgList(String agencyId); } 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 ceb47e21f9..3206792b9b 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 @@ -1442,4 +1442,15 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl subOrgList(String agencyId) { + return baseDao.selectSubOrg(agencyId); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index d8314ee8b5..b53781ea0e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -756,4 +756,26 @@ AND CUSTOMER_ID = #{customerId} AND pids LIKE concat('%',#{agencyId}, '%' ) + + diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java index 14210200d4..cc6d31f72c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; + @Data public class IcEventAnalysisOrgResDTO implements Serializable { private String orgId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index bdd23f869f..4fb2e23858 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -83,4 +83,14 @@ public interface IcEventDao extends BaseDao { * @return */ List selectFirstCategoryTotal(IcEventCategoryAnalysisFormDTO formDTO); + + Integer selectGridTotal(String gridId); + + /** + * + * @param orgId + * @param orgType + * @return + */ + Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 837943cae4..a2095b5cf8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -755,8 +755,28 @@ public class IcEventServiceImpl extends BaseServiceImpl analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO) { - //todo - return null; + List list = new ArrayList<>(); + if ("grid".equals(formDTO.getOrgType())) { + GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); + if (null == gridInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "网格信息查询异常"); + } + IcEventAnalysisOrgResDTO grid = ConvertUtils.sourceToTarget(formDTO,IcEventAnalysisOrgResDTO.class); + grid.setOrgName(gridInfoCache.getGridName()); + grid.setTotal(baseDao.selectGridTotal(formDTO.getOrgId())); + list.add(grid); + return list; + } + Result> subOrgListRes = govOrgOpenFeignClient.subOrgList(formDTO.getOrgId()); + if (!subOrgListRes.success() || CollectionUtils.isEmpty(subOrgListRes.getData())) { + return list; + } + for (SubOrgResDTO org : subOrgListRes.getData()) { + IcEventAnalysisOrgResDTO resultDto = ConvertUtils.sourceToTarget(org, IcEventAnalysisOrgResDTO.class); + resultDto.setTotal(baseDao.selectOrgTotal(org.getOrgId(), org.getOrgType())); + list.add(resultDto); + } + return list; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 695333d2cb..468c4cb01c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -168,4 +168,28 @@ ORDER BY total DESC + + + \ No newline at end of file From 26a46ad355d074c7e1733886129f69a61ee21346 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 18:13:44 +0800 Subject: [PATCH 056/416] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index fc4b500258..d926893b75 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -191,6 +191,7 @@ WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND `STATUS` = 'closed_case' + AND SATISFACTION = null AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(CLOSE_CASE_TIME) > 60*60*24*7 LIMIT #{no},#{size} From da701740221fc7ced66deb73d2e67dc9a754a54b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 18:28:22 +0800 Subject: [PATCH 057/416] =?UTF-8?q?=E5=9E=83=E5=9C=BE=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcEventOperationLogDTO.java | 19 +++++++-- .../epmet/dto/form/IcEventReplyFormDTO.java | 4 +- .../epmet/controller/IcEventController.java | 10 +++++ .../com/epmet/dao/IcEventOperationLogDao.java | 8 +++- .../java/com/epmet/dao/IcEventReplyDao.java | 8 +++- .../entity/IcEventOperationLogEntity.java | 14 ++++++- .../service/IcEventOperationLogService.java | 4 ++ .../epmet/service/IcEventReplyService.java | 4 ++ .../com/epmet/service/IcEventService.java | 6 +++ .../impl/IcEventOperationLogServiceImpl.java | 7 ++++ .../service/impl/IcEventReplyServiceImpl.java | 7 ++++ .../service/impl/IcEventServiceImpl.java | 40 +++++++++++++++++-- .../mapper/IcEventOperationLogDao.xml | 18 ++++++++- .../main/resources/mapper/IcEventReplyDao.xml | 16 +++++++- 14 files changed, 151 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java index ebe242b7ff..a70e211c41 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -47,8 +47,9 @@ public class IcEventOperationLogDTO implements Serializable { * 3、立项:shift_project; * 4、转需求:shift_demand * 5、办结:close_case; + * 6、需求办结:close_demand */ - private String actionCode; + private String actionCode; /** * 1、发布事件:publish; @@ -57,16 +58,26 @@ public class IcEventOperationLogDTO implements Serializable { * 4、立项:shift_project; * 5、转需求: shift_demand; * 6、办结:close_case; - * 7、选择是否已解决:choose_resolve; - * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 7、需求办结:close_demand; + * 8、选择是否已解决:choose_resolve; + * 9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ - private String actionDesc; + private String actionDesc; /** * 操作时间 */ private Date operateTime; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; + /** * 删除标识 1删除;0未删除 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index 1060909db2..bdcb68045c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -17,11 +17,13 @@ public class IcEventReplyFormDTO implements Serializable { private static final long serialVersionUID = 1L; public interface Comment extends CustomerClientShowGroup { } + public interface Process extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class}) + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class, Process.class}) private String icEventId; /** * 二类分类Id diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e7bd4256db..ff20f0ab60 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; +import java.util.LinkedList; import java.util.List; /** @@ -229,6 +230,15 @@ public class IcEventController { List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } + /** + * @Author sun + * @Description 事件管理-处理进展 + **/ + @PostMapping("process") + public Result> process(@RequestBody IcEventReplyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Process.class); + return new Result>().ok(icEventService.process(formDTO)); + } /** * Desc: 定时任务自动评价 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java index 08fb7a82dc..50f87e388b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * 事件操作日志表 @@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventOperationLogDao extends BaseDao { - + + LinkedList selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java index 65a0b893d7..3476a57639 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * 事件回复表 @@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventReplyDao extends BaseDao { - + + LinkedList selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java index c9c08f1951..209d70d4f3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -47,6 +47,7 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 3、立项:shift_project; * 4、转需求:shift_demand * 5、办结:close_case; + * 6、需求办结:close_demand */ private String actionCode; @@ -57,8 +58,9 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 4、立项:shift_project; * 5、转需求: shift_demand; * 6、办结:close_case; - * 7、选择是否已解决:choose_resolve; - * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 7、需求办结:close_demand; + * 8、选择是否已解决:choose_resolve; + * 9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; @@ -66,5 +68,13 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 操作时间 */ private Date operateTime; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java index 87706a7c52..9b811b09cd 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java @@ -3,8 +3,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -75,4 +77,6 @@ public interface IcEventOperationLogService extends BaseService getByEventId(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java index 6f30e79285..2be7f4127c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java @@ -3,8 +3,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventReplyDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -75,4 +77,6 @@ public interface IcEventReplyService extends BaseService { * @date 2022-05-17 */ void delete(String[] ids); + + LinkedList getByEventId(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 7e9e082aae..e2fc9bf574 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -8,6 +8,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; +import java.util.LinkedList; import java.util.List; /** @@ -140,6 +141,11 @@ public interface IcEventService extends BaseService { **/ IcEventListResultDTO detail(IcEventListFormDTO formDTO); + /** + * @Author sun + * @Description 事件管理-处理进展 + **/ + LinkedList process(IcEventReplyFormDTO formDTO); /** * 事件分类分析- 饼图2,直属下级 事件数量 * @param formDTO diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java index 7eea43a96e..4ac89f9c94 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcEventOperationLogDao; import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; import com.epmet.service.IcEventOperationLogService; import org.apache.commons.lang3.StringUtils; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -80,4 +82,9 @@ public class IcEventOperationLogServiceImpl extends BaseServiceImpl getByEventId(String icEventId) { + return baseDao.selectByEventId(icEventId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java index 86f09b900c..a5e6eabb4d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcEventReplyDao; import com.epmet.dto.IcEventReplyDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import com.epmet.service.IcEventReplyService; import org.apache.commons.lang3.StringUtils; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -80,4 +82,9 @@ public class IcEventReplyServiceImpl extends BaseServiceImpl getByEventId(String icEventId) { + return baseDao.selectByEventId(icEventId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 4e65f71162..ef1b45375b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -47,7 +47,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.time.LocalDate; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -61,6 +60,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service + public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { @Value("${openapi.scan.server.url}") @@ -296,8 +296,7 @@ public class IcEventServiceImpl extends BaseServiceImpl process(IcEventReplyFormDTO formDTO) { + LinkedList resultList = new LinkedList(); + //1.查询事件基础信息 + IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); + if (null == entity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在"); + } + + //2.查询事件回复信息 + LinkedList event = icEventReplyService.getByEventId(formDTO.getIcEventId()); + + + //3.判断查询事件项目进展或需求进展信息 + //项目进展 + if ("1".equals(entity.getOperationType())) { + ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); + processListV2FormDTO.setProjectId(entity.getOperationId()); + List project = projectTraceService.processListV2(processListV2FormDTO); + resultList.addAll(ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class)); + } + //需求进展 + if ("2".equals(entity.getOperationType())) { + LinkedList demand = icEventOperationLogService.getByEventId(formDTO.getIcEventId()); + resultList.addAll(demand); + } + resultList.addAll(event); + + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml index 259d73aa3e..76994c7fc8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -3,6 +3,22 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index 11d5ebf740..a6e7111674 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -3,6 +3,20 @@ - + \ No newline at end of file From ee27343a21f5204050090e76981eae0fbf06cf67 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 18:40:41 +0800 Subject: [PATCH 058/416] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85f85ad2a8..c19e06f6b6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -206,7 +206,7 @@ @@ -54,8 +54,8 @@ inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) e.CUSTOMER_ID = #{customerId} - and e.CREATED_TIME >= #{queryStartTime} - and e.CREATED_TIME #{queryEndTime} + and e.HAPPEN_TIME >= #{queryStartTime} + and e.HAPPEN_TIME #{queryEndTime} and e.GRID_PIDS like CONCAT(#{gridPids},'%') @@ -69,6 +69,7 @@ and c.CATEGORY_CODE = #{categoryCode} + order by CREATE_TIME desc + + \ No newline at end of file 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 f97eb6f53d..17f94a25c0 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 @@ -748,4 +748,20 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getResiUserGroupHomeId") Result> getHouseMemberList(@RequestBody RentTenantDataFormDTO formDTO); + + /** + * 使用身份证号查询家属信息 + * @param idCard + * @return + */ + @GetMapping("/epmetuser/icresiuser/findFamilyMemByIdCard/{id-card}") + Result findFamilyMemByIdCard(@PathVariable("id-card") String idCard); + + /** + * 身份证号查询居民信息 + * @param idCard + * @return + */ + @PostMapping("/epmetuser/icresiuser/getByResiIdCard/{idcard}") + Result getByResiIdCard(@PathVariable("idcard") String idCard); } 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 1389394e78..91c1769eeb 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 @@ -548,4 +548,13 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHouseMemberList", formDTO); } + @Override + public Result findFamilyMemByIdCard(String idCard) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "findFamilyMemByIdCard", idCard); + } + + @Override + public Result getByResiIdCard(String idCard) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByResiIdCard", idCard); + } } 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 30c9a10bc2..61d75723b7 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 @@ -52,6 +52,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.entity.IcResiUserEntity; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1037,4 +1038,26 @@ public class IcResiUserController implements ResultDataResolver { Result> getResiUserGroupHomeId(@RequestBody RentTenantDataFormDTO formDTO) { return new Result().ok(icResiUserService.getResiUserGroupHomeId(formDTO)); } + + /** + * 使用身份证号查询家属信息 + * @param idCard + * @return + */ + @GetMapping("findFamilyMemByIdCard/{id-card}") + public Result findFamilyMemByIdCard(@PathVariable("id-card") String idCard) { + IcResiUserBriefDTO r = icResiUserService.findFamilyMemByIdCard(idCard); + return new Result().ok(r); + } + + /** + * 身份证号查询居民信息 + * @param idCard + * @return + */ + @PostMapping("getByResiIdCard/{idcard}") + public Result getByResiIdCard(@PathVariable("idcard") String idCard) { + IcResiUserDTO resi = icResiUserService.getByResiId(idCard); + return new Result().ok(resi); + } } 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 b9a9592509..7743f6594c 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 @@ -334,4 +334,8 @@ public interface IcResiUserService extends BaseService { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + IcResiUserBriefDTO findFamilyMemByIdCard(String idCard); + + IcResiUserDTO getByResiId(String idCard); } 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 bc6582d1e0..d8c1157794 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 @@ -41,10 +41,7 @@ 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.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.constant.IcPlatformConstant; import com.epmet.constant.IcResiUserConstant; import com.epmet.constant.UserConstant; @@ -1929,4 +1926,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl o1)); } + @Override + public IcResiUserBriefDTO findFamilyMemByIdCard(String idCard) { + IcResiUserDTO resi = baseDao.getResiUserByIdCard(idCard, EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID)); + if (resi == null) { + return null; + } + + return baseDao.selectIcResuUser(resi.getId()); + } + + @Override + public IcResiUserDTO getByResiId(String idCard) { + return baseDao.getResiUserByIdCard(idCard, EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID)); + } } From 04b7c2c4f3cbf5afa050f943301d71755a4e8af2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 08:58:49 +0800 Subject: [PATCH 060/416] =?UTF-8?q?=E5=A4=9A=E5=85=83=E9=A5=BC=E5=92=8C?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=86=E7=B1=BB=E9=A2=9C=E8=89=B2=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/SelfOrgCategoryEnum.java | 59 +++++++++++++++++++ .../CommunitySelfOrganizationListDTO.java | 5 ++ .../result/SelfOrgCategoryTotalResDTO.java | 1 + ...cCommunitySelfOrganizationServiceImpl.java | 8 ++- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java new file mode 100644 index 0000000000..e08af03017 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java @@ -0,0 +1,59 @@ +package com.epmet.commons.tools.enums; + +/** + * 社区自组织增加分类:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他 + */ +public enum SelfOrgCategoryEnum { + + /** + * 环境变量枚举 + */ + + WHDW("whdw", "文化队伍", "#0091ed", 1), + LWH("lwh", "楼委会", "#0091ed", 2), + LYJLB("lyjlb", "老友俱乐部", "#0091ed", 3), + ZAXLD("zaxld", "治安巡逻队", "#0091ed", 4), + OTHER("other", "其他", "#0091ed", 5), + ; + + private final String code; + private final String name; + private final String color; + private final Integer sort; + + + SelfOrgCategoryEnum(String code, String name, String color, Integer sort) { + this.code = code; + this.name = name; + this.color = color; + this.sort = sort; + } + + public static SelfOrgCategoryEnum getEnum(String code) { + SelfOrgCategoryEnum[] values = SelfOrgCategoryEnum.values(); + for (SelfOrgCategoryEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return SelfOrgCategoryEnum.OTHER; + + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getColor() { + return color; + } + + public Integer getSort() { + return sort; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index 6ca4a94d25..563ccf0928 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -42,6 +42,11 @@ public class CommunitySelfOrganizationListDTO implements Serializable { */ private String categoryName; + /** + * 分类的颜色 用于多元数据分析-地图 + */ + private String color; + /** * 服务事项 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java index b79436c9d0..c99e723d0f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java @@ -17,4 +17,5 @@ public class SelfOrgCategoryTotalResDTO implements Serializable { * 当前分类下的社区自组织数量 */ private Integer total; + private String color; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 11bfd15d36..7a70df7777 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.enums.SelfOrgCategoryEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -728,6 +729,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl pageInfo= PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); - return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + List list=pageInfo.getList(); + for(CommunitySelfOrganizationListDTO dto:list){ + dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); + } + return new PageData<>(list, pageInfo.getTotal()); } } From 70a604390eb86e5b969a643ed83b6cb05a1356dc Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 09:03:33 +0800 Subject: [PATCH 061/416] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/IcEventProcessListResultDTO.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java new file mode 100644 index 0000000000..65d28e6501 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/12/21 下午3:31 + */ +@Data +public class IcEventProcessListResultDTO implements Serializable { + + private static final long serialVersionUID = 5762152044573235897L; + + /** + * 进展Id + */ + private String processId; + + /** + * 处理进展名称 + */ + private String processName; + + /** + * 处理进展时间 + */ + private Long processTime; + + /** + * 处理部门 + */ + private String departmentName; + /** + * 公开答复 + */ + private String publicReply; + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + @JsonIgnore + private String assistanceUnitType; + /** + * 协办单位ID + */ + private String assistanceUnitId; + /** + * 协办单位名字 + */ + private String assistanceUnitName; + /** + * 回复event 项目project 需求demand + */ + private String type; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 服务时间 + */ + private String serviceTime; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; + +} From 07ec1735c64f312f94b1bf8e20c10a1723952e40 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 09:19:56 +0800 Subject: [PATCH 062/416] =?UTF-8?q?=E8=89=B2=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/SelfOrgCategoryEnum.java | 15 ++++++++++----- .../IcCommunitySelfOrganizationServiceImpl.java | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java index e08af03017..9be9765927 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java @@ -4,16 +4,21 @@ package com.epmet.commons.tools.enums; * 社区自组织增加分类:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他 */ public enum SelfOrgCategoryEnum { + // 文化队伍: #e70014 + // 楼委会: #f59701 + // 老友俱乐部: #8fc41e + // 治安巡逻队: #00a1be + // 其他: #0067b6 /** * 环境变量枚举 */ - WHDW("whdw", "文化队伍", "#0091ed", 1), - LWH("lwh", "楼委会", "#0091ed", 2), - LYJLB("lyjlb", "老友俱乐部", "#0091ed", 3), - ZAXLD("zaxld", "治安巡逻队", "#0091ed", 4), - OTHER("other", "其他", "#0091ed", 5), + WHDW("whdw", "文化队伍", "#e70014", 1), + LWH("lwh", "楼委会", "#f59701", 2), + LYJLB("lyjlb", "老友俱乐部", "#8fc41e", 3), + ZAXLD("zaxld", "治安巡逻队", "#00a1be", 4), + OTHER("other", "其他", "#0067b6", 5), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 7a70df7777..98c63a60c4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -771,7 +771,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl pageInfo= PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); List list=pageInfo.getList(); - for(CommunitySelfOrganizationListDTO dto:list){ + for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); } return new PageData<>(list, pageInfo.getTotal()); From b546f7afbb6216bd9f2e79891f01b9af41340f5b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 09:23:26 +0800 Subject: [PATCH 063/416] import --- .../main/java/com/epmet/controller/IcEventController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index a5d7ac3a93..380adb33c4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,10 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; @@ -256,7 +253,7 @@ public class IcEventController { public Result> analysisOrgTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO,IcEventCategoryAnalysisFormDTO.OrgTotalPie.class); + ValidatorUtils.validateEntity(formDTO, IcEventCategoryAnalysisFormDTO.OrgTotalPie.class); List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } From 02bc885118e8e2a6ca964d82f88a3dc67713d40f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 19 May 2022 09:29:11 +0800 Subject: [PATCH 064/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=A0=94=E5=88=A4=E5=88=86=E6=9E=90+=E5=90=8C?= =?UTF-8?q?=E7=B1=BB=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcEventController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index a5d7ac3a93..ddb1f44035 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,10 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; From 09d680ec7171b495044274fed0a7e6585a85b4c2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 10:36:47 +0800 Subject: [PATCH 065/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=A1=88?= =?UTF-8?q?=E3=80=81=E9=9C=80=E6=B1=82=E5=AE=8C=E6=88=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcUserDemandRecDTO.java | 9 ++ .../epmet/entity/IcUserDemandRecEntity.java | 8 ++ .../impl/IcUserDemandRecServiceImpl.java | 29 +++++- .../dto/form/ColseProjectOrDemandFormDTO.java | 25 +++++ .../com/epmet/dto/form/IcDemandFormDTO.java | 94 ++++++++++++------- .../epmet/dto/form/ProjectClosedFromDTO.java | 2 + .../feign/GovProjectOpenFeignClient.java | 9 ++ .../GovProjectOpenFeignClientFallback.java | 5 + .../epmet/controller/IcEventController.java | 13 ++- .../com/epmet/service/IcEventService.java | 6 ++ .../service/impl/IcEventServiceImpl.java | 37 ++++++++ .../service/impl/ProjectServiceImpl.java | 14 +++ .../service/impl/ProjectTraceServiceImpl.java | 1 + 13 files changed, 211 insertions(+), 41 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java index 30b24a8498..79168ae29e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java @@ -150,6 +150,15 @@ public class IcUserDemandRecDTO implements Serializable { */ private Integer awardPoint; + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; + /** * 删除标识:0.未删除 1.已删除 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java index 0d54cd6184..84d9de8e64 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java @@ -171,4 +171,12 @@ public class IcUserDemandRecEntity extends BaseEpmetEntity { * 需求人是ic的居民时,记录下住的房屋id */ private String demandUserHouseId; + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index fd5552644f..af160a4303 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -36,6 +36,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ReadFlagConstant; @@ -51,10 +52,7 @@ import com.epmet.dto.form.demand.*; import com.epmet.dto.result.*; import com.epmet.dto.result.demand.*; import com.epmet.entity.*; -import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.feign.EpmetMessageOpenFeignClient; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.feign.*; import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -108,6 +106,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl> serviceTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_SERVICE_TYPE.getCode()); + Map serviceTypeMap=serviceTypeRes.success()&& MapUtils.isNotEmpty(serviceTypeRes.getData())?serviceTypeRes.getData():new HashMap<>(); + //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + String str = serviceTypeMap.containsKey(serviceEntity.getServiceType())?serviceEntity.getServerName().concat("(").concat(serviceTypeMap.get(serviceEntity.getServiceType())).concat(")"):StrConstant.EPMETY_STR; + + ColseProjectOrDemandFormDTO dto = new ColseProjectOrDemandFormDTO(); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserId(formDTO.getUserId()); + dto.setIcEventId(entity.getOriginId()); + dto.setType("demand"); + dto.setServiceParty(str); + dto.setActualServiceTime(DateUtils.format(formDTO.getServiceStartTime(), DateUtils.DATE_TIME_PATTERN)+"至"+DateUtils.format(formDTO.getServiceEndTime(), DateUtils.DATE_TIME_PATTERN)); + Result result = govProjectOpenFeignClient.closeProjectOrDemand(dto); + if (!result.success()) { + throw new RenException("需求完成,修改事件管理数据失败..."); + } + } + //2022-5-19 sun end return finishResultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java new file mode 100644 index 0000000000..19e7d38344 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 需求完成/项目结案时 修改事件数据 + */ +@Data +public class ColseProjectOrDemandFormDTO implements Serializable { + private static final long serialVersionUID = -590440160577071133L; + //事件管理Id + private String icEventId; + //类型 需求:demand 项目:project + private String type; + //服务方【事件被转需求,需求在办结时的服务方名称】 + private String serviceParty; + //实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + private String actualServiceTime; + + private String customerId; + private String userId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 78c5c7becc..a856cb938e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -16,100 +16,122 @@ import java.util.Date; */ @Data public class IcDemandFormDTO implements Serializable { - private static final long serialVersionUID = -2931148629441558468L; - public interface Add extends CustomerClientShowGroup { - } + private static final long serialVersionUID = 1589287946950749226L; - public interface AddInternalGroup { + public interface AddUserInternalGroup { } - public interface Update extends CustomerClientShowGroup { + public interface AddUserShowGroup extends CustomerClientShowGroup { } - public interface UpdateInternalGroup { } - @NotBlank(message = "事件id不能为空",groups = AddInternalGroup.class) + @NotBlank(message = "事件id不能为空",groups = AddUserInternalGroup.class) private String icEventId; @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) private String demandRecId; - @NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class}) private String customerId; + private String currentUserId; + /** * 网格id */ - @NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class}) + @NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class) private String gridId; /** - * 需求内容1000字 + * 组织id */ - @NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class}) - @Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class}) - private String content; + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + + /** * 二级需求分类编码 */ - @NotBlank(message = "需求类别不能为空",groups = Add.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String categoryCode; /** * 父级需求分类编码 */ - @NotBlank(message = "父级分类不能为空",groups = Add.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String parentCode; + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class) + @Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class) + private String content; /** - * 希望服务时间 + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help */ - @NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class}) + @NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class) + private String reportType; + + /** + * 上报人姓名 + */ + @NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class) + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + @NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class) + private String reportUserMobile; + + /** + * 上报时间 + */ + @NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date wantServiceTime; + private Date reportTime; /** * 需求人:user.id或者ic_resi_user.id */ - @NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserId; /** - * 需求人联系姓名 + * 需求人姓名 */ - @NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserName; /** * 需求人联系电话 */ - @NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserMobile; /** - * 服务地点,工作端指派默认居民居住房屋地址,居民端地图选择 - */ - @NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class}) - private String serviceLocation; - - /** - * 门牌号详细地址 + * 希望服务时间 */ - @Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class}) - private String locationDetail; + @NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; /** - * 经度,需求人是ic的居民时,取所住楼栋的中心点位 + * 来源[需求录入:demand 事件管理:ic_event] */ - private String longitude; - + private String origin; /** - * 纬度,需求人是ic的居民时,取所住楼栋的中心点位 + * 来源Id[目前只有来源事件管理的有值] */ - private String latitude; + private String originId; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java index 28e6177189..0bcd5405fb 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java @@ -65,4 +65,6 @@ public class ProjectClosedFromDTO implements Serializable { * 协办单位类型,1社区自组织,2联建单位 */ private String assistanceUnitType; + + private String customerId; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index c82c3f879b..1242d3064b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -167,4 +167,13 @@ public interface GovProjectOpenFeignClient { */ @PostMapping("gov/project/icEvent/auto-evaluation") Result autoEvaluation(@RequestBody AutoEvaluationFormDTO formDTO); + + /** + * Desc: 需求完成/项目结案时 修改事件数据 + * @author sun + */ + @PostMapping("gov/project/icEvent/closeprojectordemand") + Result closeProjectOrDemand(@RequestBody ColseProjectOrDemandFormDTO formDTO); + + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index 158569077b..49a969f91e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -164,4 +164,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result autoEvaluation(AutoEvaluationFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "autoEvaluation",formDTO); } + + @Override + public Result closeProjectOrDemand(ColseProjectOrDemandFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "closeProjectOrDemand",formDTO); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 380adb33c4..1540339644 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -200,7 +200,7 @@ public class IcEventController { public Result icEventToDemand(@LoginUser TokenDto tokenDto, @RequestBody IcDemandFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setDemandUserId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.Add.class,IcDemandFormDTO.AddInternalGroup.class); + ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.AddUserShowGroup.class, IcDemandFormDTO.AddUserInternalGroup.class); icEventService.icEventToDemand(formDTO); return new Result(); } @@ -257,6 +257,7 @@ public class IcEventController { List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } + /** * @Author sun * @Description 事件管理-处理进展 @@ -279,4 +280,14 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 需求完成/项目结案时 修改事件数据 + **/ + @PostMapping("closeprojectordemand") + public Result closeProjectOrDemand(@RequestBody ColseProjectOrDemandFormDTO formDTO) { + icEventService.closeProjectOrDemand(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 490acabd2a..11a1f63c4d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -171,4 +171,10 @@ public interface IcEventService extends BaseService { * @return */ List analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); + + /** + * @Author sun + * @Description 需求完成/项目结案时 修改事件数据 + **/ + void closeProjectOrDemand(ColseProjectOrDemandFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index df980f089c..5b8b5f69db 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -715,6 +715,8 @@ public class IcEventServiceImpl extends BaseServiceImpl recIdResult = epmetHeartOpenFeignClient.icEventToDemand(formDTO); if (!recIdResult.success() || recIdResult.getData() == null) { throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); @@ -954,5 +956,40 @@ public class IcEventServiceImpl extends BaseServiceImpl%s", formDTO.getIcEventId())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在或已办结不允许修改"); + } + + //2.修改事件数据 + entity.setStatus("closed_case"); + entity.setCloseCaseTime(new Date()); + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //3.判断新增操作记录 + if ("demand".equals(formDTO.getType())) { + IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); + logEntity.setIcEventId(formDTO.getIcEventId()); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setUserIdentity("staff"); + logEntity.setActionCode("close_demand"); + logEntity.setActionDesc("close_demand"); + logEntity.setOperateTime(new Date()); + logEntity.setServiceParty(formDTO.getServiceParty()); + logEntity.setActualServiceTime(formDTO.getActualServiceTime()); + icEventOperationLogService.insert(logEntity); + } + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index ad8d3ebbda..cd4c7df3ab 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -152,6 +152,8 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectTraceS @Override public void closedV2(TokenDto tokenDto, ProjectClosedFromDTO fromDTO) { fromDTO.setUserId(tokenDto.getUserId()); + fromDTO.setCustomerId(tokenDto.getCustomerId()); projectService.closedV2(fromDTO); } From 47ffb5c28c2819cfd46d3d8cf5e84e745cbbeb02 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 10:48:39 +0800 Subject: [PATCH 066/416] =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=94=E5=8F=82?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IcEventListResultDTO.java | 34 ++++++++++++++----- .../epmet/controller/IcEventController.java | 2 +- .../service/impl/IcEventServiceImpl.java | 6 ++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index e5e6680ea8..feae9034b9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -41,14 +41,6 @@ public class IcEventListResultDTO implements Serializable { * 音频[url集合] */ private List voiceList; - /** - * 分类Id - */ - private String categoryId; - /** - * 分类名称(医疗-二类名) - */ - private String categoryName; /** * 上报渠道[字典表] */ @@ -100,6 +92,32 @@ public class IcEventListResultDTO implements Serializable { */ private String createdUserId; + /** + * 上级分类ID 顶级此列存储0 + */ + private String parentCategoryId; + /** + * 分类Id + */ + private String categoryId; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + + /** + * 分类编码 + */ + private String categoryCode; + /** + * 上级分类名称 + */ + private String parentCategoryName; + /** + * 分类名称 + */ + private String categoryName; + /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1540339644..2080575caf 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -235,7 +235,7 @@ public class IcEventController { /** * @Author sun - * @Description 事件管理-评价 + * @Description 事件管理-详情 **/ @PostMapping("detail") public Result detail(@RequestBody IcEventListFormDTO formDTO) { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5b8b5f69db..bcfb158e51 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -836,6 +836,12 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Thu, 19 May 2022 10:58:38 +0800 Subject: [PATCH 067/416] =?UTF-8?q?=E3=80=90=E4=BA=8B=E4=BB=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=88=86=E6=9E=90=E3=80=91=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/ProcessStatusRatioResultDTO.java | 8 ++++---- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 7 +++++++ .../src/main/resources/mapper/IcEventDao.xml | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java index b166788691..2028c30671 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java @@ -4,8 +4,8 @@ import lombok.Data; @Data public class ProcessStatusRatioResultDTO { - private Long processingCount; - private Long closedCount; - private Double processingRatio; - private Double closedRatio; + private Long processingCount = 0l; + private Long closedCount = 0l; + private Double processingRatio = 0d; + private Double closedRatio = 0d; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index bcfb158e51..b8f983cd31 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -402,6 +402,10 @@ public class IcEventServiceImpl extends BaseServiceImpl dependents = new ArrayList<>(); + if (CollectionUtils.isEmpty(dependents)) { + return dependents; + } for (HouseUserDTO u : familyInfo.getHouseUserList()) { dependents.add(new IcEventYpAnalysisResultDTO.Dependent(u.getIcResiUserId(), u.getIcUserName())); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 100f641659..50c9bbdf6f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -63,7 +63,7 @@ and c.CATEGORY_CODE = #{categoryCode} - order by CREATE_TIME desc + order by e.CREATED_TIME desc - SELECT - ie.id icEventId, - ie.grid_id gridId, - ie.event_content eventContent, - ie.source_type sourceType, - ie.address address, - ie.`name` name, - ie.mobile mobile, - ie.satisfaction satisfaction, - IF(ie.satisfaction = 'bad','不满意',IF (ie.satisfaction = 'good','基本满意',IF (ie.satisfaction = 'perfect','非常满意',''))) satisfactionName, - ie.created_time createdTime, - ie.`status` status, - ie.created_by createdUserId, - rea.attachment_url as img_url, - rea.id AS iceventattachmentid, + + - + @@ -121,7 +121,7 @@ From c040a6036d7f9af811e8f497aea3d7d283847b32 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 19 May 2022 21:27:39 +0800 Subject: [PATCH 085/416] =?UTF-8?q?=E5=86=85=E5=AD=98=E5=A4=A7=E4=B8=80?= =?UTF-8?q?=E7=82=B9=20=E5=85=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index 3e494ca6df..665f7108cd 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -10,10 +10,10 @@ services: - "/opt/epmet-cloud-logs/prod:/logs" - "/opt/epmet_files/:/opt/epmet_files" environment: - RUN_INSTRUCT: "java -Xms256m -Xmx1024m -jar ./epmet-user.jar" + RUN_INSTRUCT: "java -Xms256m -Xmx1524m -jar ./epmet-user.jar" restart: "unless-stopped" deploy: resources: limits: cpus: '0.1' - memory: 1100M + memory: 1600M From af31a727a9da9a7dd7ac5a349ddadb92507f9064 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 19 May 2022 21:38:57 +0800 Subject: [PATCH 086/416] =?UTF-8?q?=E3=80=90=E5=B1=85=E6=B0=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AF=BC=E5=85=A5=E3=80=91=E4=BF=AE=E5=A4=8D=E8=99=9A?= =?UTF-8?q?=E6=8B=9Fsheet=E5=9B=A0=E4=B8=BA=E8=BA=AB=E4=BB=BD=E8=AF=81?= =?UTF-8?q?=E5=8F=B7=E4=B8=8D=E5=A1=AB=E5=86=99=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?oom=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcResiUserImportServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 42fd297d3f..d952fddea7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -389,11 +389,6 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private void importIcResiBaseInfoFromExcel(List formItemList, String excelPathName, int sheetNo, int headRowNumber, String currUserAgencyId, String currUserAgencyPids, String currentUserId, String tableName, String customerId) { - String loginUserApp = EpmetRequestHolder.getHeader(AppClientConstant.APP); - String loginUserClient = EpmetRequestHolder.getHeader(AppClientConstant.CLIENT); - String loginUserId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID.toLowerCase()); - String loginUserCustomerId = EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID.toLowerCase()); - IcResiImportDynamicExcelListener readListener = new IcResiImportDynamicExcelListener(this, customerId, currentUserId, currUserAgencyId, currUserAgencyPids, true, tableName, formItemList, headRowNumber); EasyExcel.read(new File(excelPathName)).registerReadListener(readListener).headRowNumber(headRowNumber).sheet(sheetNo).doRead(); @@ -750,6 +745,12 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res public void singlePersistResiVirtualSheetExtraInfo(Map columnAndValues, IcResiUserTableEnum sheetEnumObject) { String idCard = columnAndValues.get(ID_CARD_COLUMN_NO); try { + if (StringUtils.isBlank(idCard)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "身份证号未填写", + "身份证号未填写"); + } + Map resiInfoMap = icResiUserDao.selectResiInfoMap(idCard, null); if (resiInfoMap == null || resiInfoMap.size() == 0) { From c77f8c466f6b2d0b156726bf6ea6da986ca6f5d9 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 19 May 2022 21:59:39 +0800 Subject: [PATCH 087/416] =?UTF-8?q?=E3=80=90=E5=B1=85=E6=B0=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AF=BC=E5=85=A5=E3=80=91=E4=BF=AE=E5=A4=8D=E8=99=9A?= =?UTF-8?q?=E6=8B=9Fsheet=E4=B8=AD=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E7=9A=84sheet=E5=90=8D=E7=A7=B0=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/enums/IcResiUserTableEnum.java | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java index 3a4e561c77..7ae5d5d706 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java @@ -24,18 +24,18 @@ public enum IcResiUserTableEnum { IC_SPECIAL("ic_special","特殊人群信息录入表", 8, 3, "IS_SPECIAL", true), // 下面的是:没有实际数据库表,在ic_resi_user中有一个标记,但是导入的时候是有单独的sheet的 - IC_DBH("ic_resi_user","低保人员信息录入表", null, 2, "IS_DBH", false), - IC_YLFN("ic_resi_user","育龄妇女信息录入表", null, 2, "IS_YLFN", false), - IC_XFRY("ic_resi_user","信访人员信息录入表", null, 2, "IS_XFRY", false), - IC_KC("ic_resi_user","空巢老人信息录入表", null, 2, "IS_KC", false), - IC_SD("ic_resi_user","失独人员信息录入表", null, 2, "IS_SD", false), - IC_SN("ic_resi_user","失能人员信息录入表", null, 2, "IS_SN", false), - IC_SZ("ic_resi_user","失智人员信息录入表", null, 2, "IS_SZ", false), - IC_CJ("ic_resi_user","残疾人员信息录入表", null, 2, "IS_CJ", false), - IC_DB("ic_resi_user","大病人员信息录入表", null, 2, "IS_DB", false), - IC_MB("ic_resi_user","慢病人员信息录入表", null, 2, "IS_MB", false), - IC_TENANT("ic_resi_user","租户信息录入表", null, 2, "IS_TENANT", false), - IC_FLOATING("ic_resi_user","流动人口信息录入表", null, 2, "IS_FLOATING", false); + IC_DBH("virtual_dbh","低保人员信息录入表", null, 2, "IS_DBH", false), + IC_YLFN("virtual_ylfn","育龄妇女信息录入表", null, 2, "IS_YLFN", false), + IC_XFRY("virtual_xfry","信访人员信息录入表", null, 2, "IS_XFRY", false), + IC_KC("virtual_kc","空巢老人信息录入表", null, 2, "IS_KC", false), + IC_SD("virtual_sd","失独人员信息录入表", null, 2, "IS_SD", false), + IC_SN("virtual_sn","失能人员信息录入表", null, 2, "IS_SN", false), + IC_SZ("virtual_sz","失智人员信息录入表", null, 2, "IS_SZ", false), + IC_CJ("virtual_cj","残疾人员信息录入表", null, 2, "IS_CJ", false), + IC_DB("virtual_db","大病人员信息录入表", null, 2, "IS_DB", false), + IC_MB("virtual_mb","慢病人员信息录入表", null, 2, "IS_MB", false), + IC_TENANT("virtual_tenant","租户信息录入表", null, 2, "IS_TENANT", false), + IC_FLOATING("virtual_floating","流动人口信息录入表", null, 2, "IS_FLOATING", false); private String tableName; /** @@ -64,6 +64,20 @@ public enum IcResiUserTableEnum { return null; } + /** + * 根据表comment(sheet名称)获取枚举对象 + * @param tableComment + * @return + */ + public static IcResiUserTableEnum getObjectByTableComment(String tableComment) { + for (IcResiUserTableEnum i : IcResiUserTableEnum.values()) { + if (i.tableComment.equals(tableComment)) { + return i; + } + } + return null; + } + /** * 判断是否有这一列 * @param columnName From 4eb71d6a7d2d055950ceb0a49cd249db444c3c49 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 09:12:41 +0800 Subject: [PATCH 088/416] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=85=9A=E5=BB=BA?= =?UTF-8?q?=E5=B9=B3=E9=9D=A2=E5=9B=BE=E6=9C=8D=E5=8A=A1=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserDemandRecServiceImpl.java | 21 ++++++++++++------- .../epmet/feign/EpmetUserOpenFeignClient.java | 9 ++++++++ .../EpmetUserOpenFeignClientFallback.java | 12 +++++++++++ .../controller/IcResiUserController.java | 13 +++++++++++- .../java/com/epmet/dao/IcResiUserDao.java | 2 ++ .../com/epmet/service/IcResiUserService.java | 2 ++ .../service/impl/IcResiUserServiceImpl.java | 5 +++++ .../main/resources/mapper/IcResiUserDao.xml | 19 +++++++++++++++++ 8 files changed, 75 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index f680e038e5..ac44e6559a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1734,16 +1734,23 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryServiceList(ServiceListFormDTO formDTO) { - List serverIds=new ArrayList<>(); - if("community_org".equals(formDTO.getType())){ + List serverIds = new ArrayList<>(); + if ("community_org".equals(formDTO.getType())) { serverIds.add(formDTO.getServerId()); - }else if("volunteer".equals(formDTO.getType())){ - // 根据身份证号查询ic_resi_user.id+epmetUserId - // todo + } else if ("volunteer".equals(formDTO.getType())) { + // 根据身份证号查询ic_resi_user.id+epmetUserId + Result> userIdRes = epmetUserOpenFeignClient.getAllUserIds(formDTO.getIdCard(), formDTO.getCustomerId()); + if (!userIdRes.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据身份证号查询用户id异常", EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); + } + if (CollectionUtils.isNotEmpty(userIdRes.getData())) { + serverIds.addAll(userIdRes.getData()); + } } - PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.setServerIds(serverIds); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO)); - return new PageData<>(pageInfo.getList(),pageInfo.getTotal()); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); } 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 17f94a25c0..0417195dbc 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 @@ -764,4 +764,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getByResiIdCard/{idcard}") Result getByResiIdCard(@PathVariable("idcard") String idCard); + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @return + */ + @PostMapping("/epmetuser/icresiuser/getAllUserIds") + Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId); } 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 91c1769eeb..94b8493076 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 @@ -557,4 +557,16 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result getByResiIdCard(String idCard) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByResiIdCard", idCard); } + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @param customerId + * @return + */ + @Override + public Result> getAllUserIds(String idCard, String customerId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId); + } } 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 1ab72df8b4..9a5f69cfed 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 @@ -52,7 +52,6 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.entity.IcResiUserEntity; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1062,4 +1061,16 @@ public class IcResiUserController implements ResultDataResolver { IcResiUserDTO resi = icResiUserService.getByResiId(idCard); return new Result().ok(resi); } + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @return + */ + @PostMapping("getAllUserIds") + public Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId) { + List list = icResiUserService.getAllUserIds(idCard, customerId); + return new Result>().ok(list); + } } 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 41903388f5..ef4241dfd3 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 @@ -309,4 +309,6 @@ public interface IcResiUserDao extends BaseDao { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + List getAllUserIds(@Param("idCard") String idCard, @Param("customerId")String customerId); } 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 7743f6594c..80f09261aa 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 @@ -338,4 +338,6 @@ public interface IcResiUserService extends BaseService { IcResiUserBriefDTO findFamilyMemByIdCard(String idCard); IcResiUserDTO getByResiId(String idCard); + + List getAllUserIds(String idCard, String customerId); } 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 854e7850bc..ad34c86e9a 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 @@ -1948,4 +1948,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getAllUserIds(String idCard, String customerId) { + return baseDao.getAllUserIds(idCard, customerId); + } } 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 8bf937a7e5..2001d71a0a 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 @@ -974,4 +974,23 @@ + From 92ef450c57d1a10b86491893178ee9e09ad16d16 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 09:27:14 +0800 Subject: [PATCH 089/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BD=93=E5=89=8D=E7=BB=84=E7=BB=87=E4=B8=8B?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/IcEventListFormDTO.java | 4 ++++ .../main/java/com/epmet/controller/IcEventController.java | 4 +++- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 8 ++++++++ .../src/main/resources/mapper/IcEventDao.xml | 5 ++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index 207988f1fa..ad88c1ce36 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -23,6 +23,10 @@ public class IcEventListFormDTO implements Serializable { */ @NotBlank(message = "事件ID不能为空", groups = Detail.class) private String icEventId; + /** + * 所属组织 + */ + private String agencyId; /** * 所属网格 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 01eb9d9cca..7455392679 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -237,7 +237,9 @@ public class IcEventController { * @Description 事件管理-详情 **/ @PostMapping("detail") - public Result detail(@RequestBody IcEventListFormDTO formDTO) { + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); return new Result().ok(icEventService.detail(formDTO)); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 95de4e4bba..9ce3a4a9e4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -95,6 +95,14 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { + //获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + + //分页查询当前组织下网格内事件数据 PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); List list = baseDao.icEventList(formDTO); PageInfo pageInfo = new PageInfo<>(list); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index b9ba5d91a1..5caf918df0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -178,6 +178,9 @@ AND ie.grid_id = #{gridId} + + AND ie.agency_id = #{agencyId} + AND ie.source_type = #{sourceType} @@ -199,7 +202,7 @@ AND ie.`status` = #{status} - order by ie.latest_operated_time desc + order by ie.created_time desc, ie.latest_operated_time desc SELECT m.ID AS icResiUserId, - m.`NAME` AS icUserName + m.`NAME` AS icUserName, + m.AGENCY_ID AS agencyId, + m.GRID_ID AS gridId FROM ic_resi_user m WHERE From 7f24fa932f0d4d5734a8e39cdcf29ea4d757e12b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 10:19:55 +0800 Subject: [PATCH 095/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java | 2 ++ .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index bdcb68045c..6c9bacafa8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -32,10 +32,12 @@ public class IcEventReplyFormDTO implements Serializable { /** * 回复内容 */ + @NotBlank(message = "回复内容不能为空", groups = {UpdateGroup.class}) private String content; /** * 处理方式[0:已回复 1:已转项目 1:已转需求] */ + @NotBlank(message = "处理方式不能为空", groups = {UpdateGroup.class}) private String operationType; /** * 处理中:processing;已办结:closed_case diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 537fe8217b..7dd6306315 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -660,7 +660,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 10:29:18 +0800 Subject: [PATCH 096/416] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.17__add_dict.sql | 9 +++++++++ .../db/migration/V0.0.15__self_org_category.sql | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql new file mode 100644 index 0000000000..5d0ab88047 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql @@ -0,0 +1,9 @@ + +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000013', 'ic_event', '事件管理', '', '13', '0', '0', '', '2022-05-17 18:23:27', '', '2022-05-17 18:23:27'); + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000004', '1000000000000000013', '网格员手持终端', '4', '0', '', '4', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000003', '1000000000000000013', '12345', '3', '0', '', '3', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000002', '1000000000000000013', '社区电话', '2', '0', '', '2', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000001', '1000000000000000013', '多媒体反映', '1', '0', '', '1', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000000', '1000000000000000013', '随手拍/随时讲', '0', '0', '', '0', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql index 4b02bfcfd2..928b038945 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql @@ -1,2 +1,8 @@ alter table ic_community_self_organization -add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; \ No newline at end of file +add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; + + + +ALTER TABLE `ic_user_demand_rec` +ADD COLUMN `ORIGIN` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'demand' COMMENT '来源[需求录入:demand 事件管理:ic_event]' AFTER `DEMAND_USER_HOUSE_ID`, +ADD COLUMN `ORIGIN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源Id[目前只有来源事件管理的有值]' AFTER `ORIGIN`; From 69adb3db93bb062642d1835ba8adf1c2e64eeb7a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 20 May 2022 10:40:23 +0800 Subject: [PATCH 097/416] =?UTF-8?q?url=20=E7=AB=99=E5=86=85=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/UserMessageTypeConstant.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 53 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 4 +- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java index 57ac759211..08991d8a8b 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java @@ -207,4 +207,9 @@ public interface UserMessageTypeConstant { * ic_user_demand_rec.id */ String DEMAND="demand"; + + /** + * ic_event,新事件 + */ + String IC_EVENT="ic_event"; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 1857fa17f4..53e5d5ab45 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -24,6 +24,8 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.*; +import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -47,6 +49,7 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -91,6 +94,8 @@ public class IcEventServiceImpl extends BaseServiceImpl userShowName = new AtomicReference<>(""); userResult.getData().forEach(u -> { if (u.getUserId().equals(formDTO.getUserId())){ entity.setName(u.getRealName()); entity.setMobile(u.getMobile()); entity.setIdCard(u.getIdNum()); + userShowName.set(u.getUserShowName()); } }); // 0代表 随手拍和随时讲 @@ -1106,9 +1113,55 @@ public class IcEventServiceImpl extends BaseServiceImpl> agencyStaffsResult = govOrgOpenFeignClient.getAgencyStaffs(formDTO); + if (!agencyStaffsResult.success()){ + throw new EpmetException("查询组织下工作人员失败..."); + } + if (!CollectionUtils.isEmpty(agencyStaffsResult.getData())){ + List msgList = new ArrayList<>(); + agencyStaffsResult.getData().forEach(u -> { + UserMessageFormDTO msg = new UserMessageFormDTO(); + msg.setUserId(u); + msg.setCustomerId(customerId); + msg.setTargetId(icEventId); + msg.setGridId("*"); + msg.setApp(AppClientConstant.APP_GOV); + msg.setMessageType(UserMessageTypeConstant.IC_EVENT); + msg.setReadFlag(ReadFlagConstant.UN_READ); + msg.setTitle("您有一条事件消息"); + msg.setMessageContent(showName+"上报一条事件,请查看。"); + msgList.add(msg); + }); + messageOpenFeignClient.saveUserMessageList(msgList); + } } + /** + * Desc: 附件处理 + * @param list + * @param attachmentEntityList + * @param id + * @param customerId + * @param userId + * @author zxc + * @date 2022/5/20 09:50 + */ public void disposeAttachment(List list,List attachmentEntityList,String id,String customerId,String userId){ int sort = NumConstant.ZERO; for (FileCommonDTO a : list) { 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 96b9f9e2b2..0417195dbc 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 @@ -23,8 +23,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** From 192cb1d6a067550c178f46f041c998d6a6b02548 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 10:53:06 +0800 Subject: [PATCH 098/416] =?UTF-8?q?=E8=BF=9B=E5=B1=95=E8=BF=94=E5=8F=82?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 53e5d5ab45..4b99805fe0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -998,14 +998,15 @@ public class IcEventServiceImpl extends BaseServiceImpl event = icEventReplyService.getByEventId(formDTO.getIcEventId()); - //3.判断查询事件项目进展或需求进展信息 //项目进展 if ("1".equals(entity.getOperationType())) { ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); processListV2FormDTO.setProjectId(entity.getOperationId()); List project = projectTraceService.processListV2(processListV2FormDTO); - resultList.addAll(ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class)); + List projectList = ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class); + projectList.forEach(p->p.setType("project")); + resultList.addAll(projectList); } //需求进展 if ("2".equals(entity.getOperationType())) { From 445a0ea0b7440fe539572457e0e590647727f347 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:29:17 +0800 Subject: [PATCH 099/416] =?UTF-8?q?=E6=88=91=E4=B8=8A=E6=8A=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcEventReplyDTO.java | 5 +- .../epmet/dto/form/MyReportIcEvFormDTO.java | 35 ++++++++ .../dto/form/ResiReplyIcEventFormDTO.java | 36 ++++++++ .../epmet/dto/result/MyReportIcEvResDTO.java | 88 +++++++++++++++++++ .../epmet/controller/IcEventController.java | 64 ++++++++++++++ .../com/epmet/dao/IcEventAttachmentDao.java | 6 +- .../main/java/com/epmet/dao/IcEventDao.java | 16 +++- .../java/com/epmet/dao/IcEventReplyDao.java | 3 + .../epmet/service/IcEventReplyService.java | 8 ++ .../com/epmet/service/IcEventService.java | 28 +++++- .../service/impl/IcEventReplyServiceImpl.java | 12 +++ .../service/impl/IcEventServiceImpl.java | 60 +++++++++++++ .../resources/mapper/IcEventAttachmentDao.xml | 11 ++- .../src/main/resources/mapper/IcEventDao.xml | 54 ++++++++++++ .../main/resources/mapper/IcEventReplyDao.xml | 15 ++++ 15 files changed, 431 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java index b60d6fbdf5..9830330fc6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java @@ -1,8 +1,10 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -64,6 +66,7 @@ public class IcEventReplyDTO implements Serializable { /** * 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; /** diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java new file mode 100644 index 0000000000..87805ee893 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 居民端小程序,我上报的事件 列表入参 + */ +@Data +public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { + //以下参数前端传入 + @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) + private String status; + /** + * 暂时两端不打通,先不要求传身份证了 + */ + // private String idCard; + + //以下参数从token中获取 + @NotBlank(message = "customerId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "userId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String userId; + private String icEventId; + + public interface ReplyListGroup { + } + public interface RemoveRedGroup { + } + @NotBlank(message = "事件id不能为空", groups = {ReplyListGroup.class,RemoveRedGroup.class}) + private String icEventId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java new file mode 100644 index 0000000000..0e4b423f0c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 居民端我上报的事件回复 + * ic_event + */ +@Data +public class ResiReplyIcEventFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "事件id不能为空", groups = {AddUserInternalGroup.class}) + private String icEventId; + + @NotBlank(message = "内容不能为空", groups = AddUserShowGroup.class) + @Length(max = 200, message = "内容最多输入200字", groups = AddUserShowGroup.class) + private String content; + + + //以下参数从token中获取 + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java new file mode 100644 index 0000000000..9e5954fe9c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -0,0 +1,88 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IcEventAttachmentDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 居民端我上报的事件列表+详情 + */ +@Data +public class MyReportIcEvResDTO implements Serializable { + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 发生时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date happenTime; + + /** + * 图片[url集合] + */ + private List imageList; + /** + * 音频[url集合] + */ + private List voiceList; + + /** + * 地址 + */ + private String address; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Boolean redDot; + + /** + * true:可以回复 + * false:不可以回复 + * todo + */ + private Boolean replyFlag; + + /** + * 状态【处理中:processing;已办结:closed_case】】 + */ + private String status; + /** + * 状态【处理中:processing;已办结:closed_case】】 + */ + private String statusName; + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date latestOperatedTime; + + /** + * 事件附件 + */ + @JsonIgnore + private List attachmentList; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 7455392679..edca0f5cc2 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -13,8 +14,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.service.IcEventReplyService; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -35,6 +38,8 @@ public class IcEventController { @Autowired private IcEventService icEventService; + @Autowired + private IcEventReplyService icEventReplyService; @RequestMapping("list") public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { @@ -307,4 +312,63 @@ public class IcEventController { return new Result(); } + /** + * 居民端小程序我上报的事件-列表+详情 + * yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("myreport") + public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icEventService.myReport(formDTO)); + } + + /** + * 居民端小程序我上报的事件详情页面-回复列表 + * http://yapi.elinkservice.cn/project/102/interface/api/7783 + * @param formDTO + * @return + */ + @PostMapping("reply-list") + public Result> replyList(@LoginUser TokenDto tokenDto,@RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.ReplyListGroup.class); + return new Result>().ok(icEventReplyService.replyList(formDTO.getIcEventId(),formDTO.getUserId())); + } + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * yapi:http://yapi.elinkservice.cn/project/102/interface/api/7790 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("remove-red") + public Result removeRed(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.RemoveRedGroup.class); + icEventService.removeRed(formDTO.getUserId(), formDTO.getIcEventId()); + return new Result(); + } + + /** + * 居民端我上报的事件-回复 + * http://yapi.elinkservice.cn/project/102/interface/api/7789 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("resi-reply") + public Result resiReply(@LoginUser TokenDto tokenDto, @RequestBody ResiReplyIcEventFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, ResiReplyIcEventFormDTO.AddUserShowGroup.class,ResiReplyIcEventFormDTO.AddUserInternalGroup.class); + icEventService.resiReply(formDTO); + return new Result(); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java index 481d4d9e2d..2da1ab32f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcEventAttachmentDTO; import com.epmet.entity.IcEventAttachmentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事件附件表 @@ -12,5 +16,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventAttachmentDao extends BaseDao { - + List selectByIcEventId(@Param("icEventId") String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index d9b9d90f89..5ee5947514 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -3,10 +3,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.IcEventCategoryAnalysisResDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyCountResultDTO; -import com.epmet.dto.result.IcEventResultDTO; +import com.epmet.dto.form.MyReportIcEvFormDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; @@ -123,4 +121,14 @@ public interface IcEventDao extends BaseDao { * @return */ Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); + + /** + * 居民端小程序我上报的事件-列表+详情 + * + * @param formDTO + * @return + */ + List selectMyReport(MyReportIcEvFormDTO formDTO); + + int updateRedDot(@Param("userId") String userId, @Param("icEventId")String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java index 3476a57639..efdc25830a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -1,12 +1,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.LinkedList; +import java.util.List; /** * 事件回复表 @@ -19,4 +21,5 @@ public interface IcEventReplyDao extends BaseDao { LinkedList selectByEventId(@Param("icEventId") String icEventId); + List selectReplyList(@Param("icEventId") String icEventId, @Param("userId")String userId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java index 2be7f4127c..c2b3da8830 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java @@ -79,4 +79,12 @@ public interface IcEventReplyService extends BaseService { void delete(String[] ids); LinkedList getByEventId(String icEventId); + + /** + * 居民端小程序我上报的事件详情页面-回复列表 + * + * @param icEventId + * @return + */ + List replyList(String icEventId,String userId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 24500f057b..cd926cf332 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,9 +3,6 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; @@ -186,4 +183,29 @@ public interface IcEventService extends BaseService { */ void addEventFromResi(AddEventFromResiFormDTO formDTO); + /** + * 居民端小程序我上报的事件-列表+详情 + * yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781 + * + * @param formDTO + * @param formDTO + * @return + */ + PageData myReport(MyReportIcEvFormDTO formDTO); + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * + * @param userId + * @param icEventId + * @return + */ + void removeRed(String userId, String icEventId); + + /** + * 居民端我上报的事件-回复 + * @param formDTO + */ + void resiReply(ResiReplyIcEventFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java index a5e6eabb4d..c3fe7d9106 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -87,4 +87,16 @@ public class IcEventReplyServiceImpl extends BaseServiceImpl replyList(String icEventId, String userId) { + List list = baseDao.selectReplyList(icEventId, userId); + return list; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 307febd0f3..461486ae2b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1124,4 +1124,64 @@ public class IcEventServiceImpl extends BaseServiceImpl myReport(MyReportIcEvFormDTO formDTO) { + // 1.分页查询 + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectMyReport(formDTO)); + List list = pageInfo.getList(); + if (!CollectionUtils.isEmpty(list)) { + //封装数据 + for (MyReportIcEvResDTO dto : list) { + //每个事件对应的图片数据 + if (!CollectionUtils.isEmpty(dto.getAttachmentList())) { + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + for (IcEventAttachmentDTO file : dto.getAttachmentList()) { + if ("image".equals(file.getAttachmentType())) { + imageList.add(file.getAttachmentUrl()); + } else if ("voice".equals(file.getAttachmentType())) { + voiceList.add(file.getAttachmentUrl()); + } + } + dto.setImageList(imageList); + dto.setVoiceList(voiceList); + } + } + } + return new PageData<>(list, pageInfo.getTotal()); + } + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * + * @param userId + * @param icEventId + * @return + */ + @Override + public void removeRed(String userId, String icEventId) { + baseDao.updateRedDot(userId,icEventId); + } + + /** + * 居民端我上报的事件-回复 + * + * @param formDTO + */ + @Override + public void resiReply(ResiReplyIcEventFormDTO formDTO) { + // todo + } + + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index 23437af527..4900fb16e8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -3,6 +3,15 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 5caf918df0..e4e5316014 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -280,4 +280,58 @@ and ie.GRID_ID=#{orgId} + + + + + + + + + + + + + + + + + + + UPDATE ic_event + SET UPDATED_BY = #{userId}, + UPDATED_TIME = NOW(), + RED_DOT = '0' + WHERE + id = #{icEventId} + AND DEL_FLAG = '0' + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index a6e7111674..60dadc46aa 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -19,4 +19,19 @@ ORDER BY created_time DESC + \ No newline at end of file From 5047c5ffdbb4f031eb1f94d7dc42b68b5ab8248a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:41:36 +0800 Subject: [PATCH 100/416] =?UTF-8?q?=E6=88=91=E4=B8=8A=E6=8A=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java index 87805ee893..28f124a4fd 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -24,7 +24,6 @@ public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { private String customerId; @NotBlank(message = "userId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) private String userId; - private String icEventId; public interface ReplyListGroup { } From b36a16fe646a33aeb78b12625d2ff5fbe9272254 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:55:42 +0800 Subject: [PATCH 101/416] =?UTF-8?q?/heart/userdemand/pagelist=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0demandRecId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/demand/UserDemandPageFormDTO.java | 7 +++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index bfeb9203e2..e4aa06f5e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -79,4 +79,11 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { * 搜索关键词 */ private String keyword; + + + /** + * 需求id + */ + private String demandRecId; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 5221f5309b..dd7cf16d8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -129,6 +129,9 @@ AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') #{wantServiceEndTime} + + and r.id = #{demandRecId} + order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc From 69b6bb024e542e229ac52a05944eedeeb8da19ba Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:18:22 +0800 Subject: [PATCH 102/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/IcEventEntity.java | 2 +- .../service/impl/IcEventServiceImpl.java | 53 +++++++++++++++++-- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index ca36746d3c..db3fc54536 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -102,7 +102,7 @@ public class IcEventEntity extends BaseEpmetEntity { private Date closeCaseTime; /** - * 0:已回复 1:已转项目 1:已转需求 + * 0:已回复 1:已转项目 2:已转需求 */ private String operationType; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index b736dfcc5b..6b81909bb6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -24,7 +24,9 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.*; +import com.epmet.constant.EventConstant; import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.ResiEventAction; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; @@ -265,6 +267,8 @@ public class IcEventServiceImpl extends BaseServiceImpl logList = new ArrayList<>(); - logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, "reply", "reply")); + logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getDesc())); //回复时选择了已完成 - if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { + if (StringUtils.isNotBlank(formDTO.getOperationType()) && ResiEventAction.CLOSE_CASE.getCode().equals(formDTO.getStatus())) { date.setTime(date.getTime() + 6000 * 1); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getDesc())); } icEventOperationLogService.insertBatch(logList); @@ -1235,7 +1240,47 @@ public class IcEventServiceImpl extends BaseServiceImpl userIdList =new ArrayList<>(); + userIdList.add(formDTO.getUserId()); + Result> userResult=userOpenFeignClient.queryUserBaseInfo(userIdList); + if (!userResult.success() || CollectionUtils.isEmpty(userResult.getData())) { + throw new RenException("查询当前用户信息异常"); + } + replyEntity.setUserShowName(userResult.getData().get(NumConstant.ZERO).getUserShowName()); + icEventReplyService.insert(replyEntity); + + //3.新增操作记录数据 + IcEventOperationLogEntity logEntity =ConvertUtils.sourceToTarget(formDTO,IcEventOperationLogEntity.class); + logEntity.setUserIdentity(EventConstant.RESI_USER); + logEntity.setActionCode(ResiEventAction.REPLY.getCode()); + logEntity.setActionDesc(ResiEventAction.REPLY.getDesc()); + logEntity.setOperateTime(new Date()); + icEventOperationLogService.insert(logEntity); + } + + private IcEventEntity checkReply(String icEventId) { + //:0:已回复 1:已转项目 1:已转需求 + IcEventEntity entity = baseDao.selectById(icEventId); + if (null == entity || NumConstant.ONE_STR.equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复", "事件已转项目"); + } + if (null == entity || NumConstant.TWO_STR.equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复", "事件已转需求"); + } + return entity; } From 32518f0f1cd95eb27bf983ddee08a2d904b8ee6e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:29:15 +0800 Subject: [PATCH 103/416] douhao --- .../src/main/resources/mapper/IcEventAttachmentDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index 4900fb16e8..42b0c0dd12 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -5,13 +5,13 @@ \ No newline at end of file From 36b21fdfbdb65f8a9df5c0b7ec2a0cebde8072c9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:47:53 +0800 Subject: [PATCH 104/416] =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E6=88=90=E7=9A=84?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/MyReportIcEvResDTO.java | 8 ++++++++ .../src/main/resources/mapper/IcEventDao.xml | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 9e5954fe9c..7fb327037e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -80,6 +80,14 @@ public class MyReportIcEvResDTO implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date latestOperatedTime; + /** + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] + */ + private String satisfaction; + /** + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] + */ + private String satisfactionName; /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index a596aef481..fb0099a172 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -292,6 +292,8 @@ + + @@ -304,10 +306,19 @@ ie.address, ie.`status`, IF(ie.status = 'processing','处理中',IF (ie.status = 'closed_case','已办结','')) statusName, - ie.operation_type, - ie.operation_id, + IFNULL(ie.operation_type,'') AS operation_type, + IFNULL(ie.operation_id,'') AS operation_id, ie.red_dot, - ie.latest_operated_time + ie.latest_operated_time, + IFNULL(ie.satisfaction,'') as satisfaction, + ( + case when satisfaction is null or satisfaction='' then '' + when satisfaction='bad' then '不满意' + when satisfaction='good' then '基本满意' + when satisfaction='perfect' then '非常满意' + else '' + end + ) as satisfactionName FROM ic_event ie WHERE From fe82ff2d56fc076ecc2e8b7fd072d68463d3db6c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:00:11 +0800 Subject: [PATCH 105/416] =?UTF-8?q?=E5=B7=B2=E8=BD=AC=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=88=96=E8=80=85=E6=9C=8D=E5=8A=A1=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E5=B1=85=E6=B0=91=E7=AB=AF=E4=B8=8D=E5=8F=AF=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E5=B7=A5=E4=BD=9C=E7=AB=AF=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=92=8Cpc=E5=9B=9E=E5=A4=8D=E4=BA=86=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E7=AB=AF=E6=89=8D=E5=8F=AF=E4=BB=A5=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcEventDao.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index fb0099a172..4100a73ffb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -291,6 +291,7 @@ + @@ -318,7 +319,12 @@ when satisfaction='perfect' then '非常满意' else '' end - ) as satisfactionName + ) as satisfactionName, + ( + case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 + else '0' + end + )as read_flag FROM ic_event ie WHERE From f9480c92c1dae7f38dceae34cf3ce6440292f701 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:00:47 +0800 Subject: [PATCH 106/416] reply_flag --- .../src/main/resources/mapper/IcEventDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 4100a73ffb..523eac4560 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -291,7 +291,7 @@ - + @@ -324,7 +324,7 @@ case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 else '0' end - )as read_flag + )as reply_flag FROM ic_event ie WHERE From 0cff7c12ddbd7d3ffe85188434230015c58c5d44 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:03:16 +0800 Subject: [PATCH 107/416] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=AD=E6=89=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcEventDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 523eac4560..648177b3f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -321,8 +321,8 @@ end ) as satisfactionName, ( - case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 - else '0' + case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 + else 0 end )as reply_flag FROM From 94d7ca6d945ebd71d317fcd77d4cdb680964d15e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:33:27 +0800 Subject: [PATCH 108/416] parentCategoryName --- .../mapper/IssueProjectCategoryDictDao.xml | 18 ++++++++++----- .../epmet/dto/result/MyReportIcEvResDTO.java | 13 +++++++++++ .../service/impl/IcEventServiceImpl.java | 23 +++++++++++++++---- .../src/main/resources/mapper/IcEventDao.xml | 7 +++++- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index f67db1aaa1..80ede5083f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -215,19 +215,25 @@ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 7fb327037e..80a846cb4b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -88,6 +88,19 @@ public class MyReportIcEvResDTO implements Serializable { * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ private String satisfactionName; + + /** + * 分类Id + */ + // @JsonIgnore + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 6b81909bb6..3cd05b27d0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -3,10 +3,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.AppClientConstant; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.dto.form.FileCommonDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; @@ -1215,6 +1212,24 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(dto.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(dto.getCategoryId())) { + if(StringUtils.isNotBlank(ca.getParentCategoryName())){ + //大类-子类 + dto.setCategoryName(ca.getParentCategoryName().concat(StrConstant.HYPHEN).concat(ca.getCategoryName())); + }else{ + dto.setCategoryName(ca.getCategoryName()); + } + } + } + } + } } return new PageData<>(list, pageInfo.getTotal()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 648177b3f9..72a5c10d19 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -295,6 +295,7 @@ + @@ -324,9 +325,13 @@ case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 else 0 end - )as reply_flag + )as reply_flag, + IFNULL(iec.category_id,'') AS category_id FROM ic_event ie + LEFT JOIN ic_event_category iec + ON(ie.id = iec.ic_event_id + AND iec.del_flag = '0') WHERE ie.del_flag = '0' and ie.customer_id = #{customerId} From 494e0451f7f551769749720d59f27fa5b32c3f0a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 14:44:10 +0800 Subject: [PATCH 109/416] =?UTF-8?q?=E4=BB=A3=E4=B9=B0=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=81sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 102 ++++++++++-- .../db/migration/V0.0.23__add_ic_event.sql | 153 ++++++++++++++++++ 2 files changed, 240 insertions(+), 15 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3cd05b27d0..0785d59d01 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,8 +21,10 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.*; +import com.epmet.constant.ProjectConstant; import com.epmet.constant.EventConstant; import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.UserMessageConstant; import com.epmet.constant.ResiEventAction; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; @@ -184,7 +186,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成项目,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); //5.新增操作记录数据 Date date = new Date(); @@ -725,8 +745,18 @@ public class IcEventServiceImpl extends BaseServiceImpl%s", entity.getId())); + } + } @@ -746,7 +776,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成项目,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); + Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); + if (!sendMessageRes.success()) { + log.warn(String.format("事件立项,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); + } + } } /** @@ -777,7 +828,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成服务,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); + Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); + if (!sendMessageRes.success()) { + log.warn(String.format("事件转需求,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); + } + } + } /** diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql new file mode 100644 index 0000000000..a2cc8bed1d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql @@ -0,0 +1,153 @@ + +CREATE TABLE `ic_event` ( + `ID` varchar(64) NOT NULL COMMENT '主键,事件id', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `GRID_ID` varchar(64) NOT NULL COMMENT '事件所属的网格Id。不包含网格的id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格的所属组织', + `GRID_PIDS` varchar(255) NOT NULL COMMENT '网格的所有组织Id', + `REPORT_USER_ID` varchar(64) NOT NULL COMMENT '报事的人【居民端/pc端居民Id】可为空', + `NAME` varchar(64) DEFAULT NULL COMMENT '报事人姓名', + `MOBILE` varchar(11) NOT NULL COMMENT '手机号', + `ID_CARD` varchar(18) DEFAULT NULL COMMENT '身份证号', + `SOURCE_TYPE` char(1) DEFAULT NULL COMMENT '反映渠道【字典表】', + `HAPPEN_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '发生时间', + `EVENT_CONTENT` varchar(1024) NOT NULL COMMENT '事件内容', + `LATITUDE` varchar(32) DEFAULT NULL COMMENT '纬度', + `LONGITUDE` varchar(32) DEFAULT NULL COMMENT '经度', + `ADDRESS` varchar(255) NOT NULL COMMENT '地址', + `STATUS` varchar(32) NOT NULL DEFAULT 'processing' COMMENT '处理中:processing;已办结:closed_case', + `CLOSE_CASE_TIME` datetime DEFAULT NULL COMMENT '办结时间', + `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 1:已转需求', + `OPERATION_ID` varchar(32) DEFAULT NULL COMMENT '项目、需求ID', + `READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '事件是否被阅读过;1已读;针对报事人待处理列表', + `RED_DOT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '报事人的红点:展示1;不展示:0;【工作人员回复/立项/转需求/办结更新为1】', + `LATEST_OPERATED_TIME` datetime NOT NULL COMMENT '最近一次操作时间(回复、立项、转需求、办结更新此列)', + `RESOLVE_STATUS` varchar(32) DEFAULT 'resolved' COMMENT '是否解决:已解决 resolved,未解决 un_solved', + `CLOSE_REMARK` varchar(255) DEFAULT NULL COMMENT '结案说明', + `COMMENT_USER_ID` varchar(32) DEFAULT NULL COMMENT '评价人', + `SATISFACTION` varchar(300) DEFAULT NULL COMMENT '满意度 - 不满意:bad、基本满意:good、非常满意:perfect', + `COMMENT_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '满意度评价时间', + `AUDIT_STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '事件审核状态[涉及附件审核需要加的状态](审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)', + `AUDIT_REASON` varchar(128) DEFAULT NULL COMMENT '审核理由', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_gid` (`GRID_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件管理表'; + +-- ---------------------------- +-- Table structure for ic_event_attachment +-- ---------------------------- + +CREATE TABLE `ic_event_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名', + `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `SORT` int(1) NOT NULL COMMENT '排序字段', + `STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '附件状态(审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)\r\n现在图片是同步审核的,所以图片只有auto_passed一种状态', + `REASON` varchar(255) DEFAULT NULL COMMENT '失败原因', + `DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_eid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; + +-- ---------------------------- +-- Table structure for ic_event_category +-- ---------------------------- + +CREATE TABLE `ic_event_category` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `CATEGORY_ID` varchar(64) NOT NULL COMMENT '分类id', + `CATEGORY_PIDS` varchar(512) NOT NULL COMMENT '分类对应的所有上级,英文逗号隔开', + `CATEGORY_CODE` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '分类编码,分类编码+customer_id唯一', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_pid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件所属分类表'; + +-- ---------------------------- +-- Table structure for ic_event_operation_log +-- ---------------------------- + +CREATE TABLE `ic_event_operation_log` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件id', + `USER_ID` varchar(64) NOT NULL COMMENT '操作用户Id', + `USER_IDENTITY` varchar(32) NOT NULL COMMENT ' 操作用户类型【居民端用户:resi_user;工作人员:staff;】', + `ACTION_CODE` varchar(32) NOT NULL COMMENT '1、发布事件:add\r\n2、复:reply;\r\n3、立项:shift_project;\r\n4、转需求:shift_demand\r\n5、办结:close_case;\r\n6、需求办结:close_demand\r\n\r\n', + `ACTION_DESC` varchar(32) NOT NULL COMMENT '1、发布事件:publish;\r\n2、撤回事件:recall;\r\n3、复:reply;\r\n4、立项:shift_project;\r\n5、转需求: shift_demand;\r\n6、办结:close_case;\r\n7、需求办结:close_demand;\r\n8、选择是否已解决:choose_resolve;\r\n9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中;', + `OPERATE_TIME` datetime NOT NULL COMMENT '操作时间', + `SERVICE_PARTY` varchar(64) DEFAULT NULL COMMENT '服务方【事件被转需求,需求在办结时的服务方名称】', + `ACTUAL_SERVICE_TIME` varchar(64) DEFAULT NULL COMMENT '实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件操作日志表'; + +-- ---------------------------- +-- Table structure for ic_event_reply +-- ---------------------------- + +CREATE TABLE `ic_event_reply` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `FROM_USER_ID` varchar(64) NOT NULL COMMENT '回复人用户Id[工作人员ID]', + `CONTENT` varchar(255) NOT NULL COMMENT '内容', + `USER_SHOW_NAME` varchar(64) NOT NULL COMMENT '报事人:组织-人名', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_eid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件回复表'; + +-- ---------------------------- +-- Table structure for ic_event_scan_task +-- ---------------------------- + +CREATE TABLE `ic_event_scan_task` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `IC_EVENT_ATTACHMENT_ID` varchar(64) NOT NULL COMMENT '事件附件表主键,对应dataId', + `TASK_ID` varchar(64) NOT NULL COMMENT '阿里云审核任务Id', + `STATUS` varchar(32) NOT NULL COMMENT '审核状态【auditing: 审核中;\r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;】', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型(视频 - video、 语音 - voice 文件 - doc)', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '操作人,API审核结果,存储为SCAN_USER或者APP_USER', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件附件安全校验任务表'; From 119b0db8790f490cd4ae59deea4ea311e538e75f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:58:16 +0800 Subject: [PATCH 110/416] on --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- .../src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 80ede5083f..f128b4a17f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p (c.PID=p.id) + left join issue_project_category_dict p on (c.PID=p.id) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java index 28f124a4fd..032a0c5b65 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -12,7 +12,7 @@ import java.io.Serializable; @Data public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { //以下参数前端传入 - @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) + // @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) private String status; /** * 暂时两端不打通,先不要求传身份证了 From 2ce578e0ebdc61f27e635bc2adb63dfc3fc93265 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 15:06:06 +0800 Subject: [PATCH 111/416] pppppppppp --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index f128b4a17f..7602170e27 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -217,7 +217,7 @@ SELECT c.*, ( - case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then CATEGORY_NAME + case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then p.CATEGORY_NAME else '' end )as parentCategoryName From fdbd1f1f762493396c743957298abd7eae4c9699 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 15:31:49 +0800 Subject: [PATCH 112/416] customerId --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 7602170e27..e2c93a5a98 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p on (c.PID=p.id) + left join issue_project_category_dict p on (c.PID=p.id and AND p.customer_id = #{customerId}) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} From d997a38b0376d844d702114a202f922f737caff7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 15:33:38 +0800 Subject: [PATCH 113/416] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0785d59d01..caeed38231 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -716,7 +716,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 15:37:50 +0800 Subject: [PATCH 114/416] customerId --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index e2c93a5a98..c1d52f8ea5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p on (c.PID=p.id and AND p.customer_id = #{customerId}) + left join issue_project_category_dict p on (c.PID=p.id and p.customer_id = #{customerId}) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} From c6fbdd0491fe77adcf7a29d8d117cd8be897d3c0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 20 May 2022 15:59:09 +0800 Subject: [PATCH 115/416] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=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/IcResiUserDao.java | 2 -- 1 file changed, 2 deletions(-) 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 41903388f5..ab73f7826a 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 @@ -258,8 +258,6 @@ public interface IcResiUserDao extends BaseDao { List icUserCustomerIds(); - List> getIcUserList(@Param("customerId") String customerId); - /** * desc: 获取数据分析列中的 各类居民数据 * From 8617d1c2b9afbc520742c4d457fa7bf5c2d5105d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 16:00:22 +0800 Subject: [PATCH 116/416] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index caeed38231..d1050e7f47 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -716,7 +716,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 16:24:38 +0800 Subject: [PATCH 117/416] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcEventServiceImpl.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index d1050e7f47..f7a35fd0ae 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -731,7 +731,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 16:55:17 +0800 Subject: [PATCH 118/416] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=BD=91=E6=A0=BCID=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java index 69676d8e14..3b2fe63a12 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java @@ -73,7 +73,7 @@ public class ProjectApprovalFormDTO implements Serializable { /** * 网格ID */ - @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class,ProjectApprovalFormDTO.ApprovalCategory.class}) + @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class}) private String gridId; /** From 41861190d4c1be917e8612e44eb5a1806eee7773 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 16:55:18 +0800 Subject: [PATCH 119/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=BD=AC=E9=9C=80?= =?UTF-8?q?=E6=B1=82=20=E5=A2=9E=E5=8A=A0=E6=8C=87=E6=B4=BE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcUserDemandRecServiceImpl.java | 16 ++++++++++++++++ .../java/com/epmet/dto/form/IcDemandFormDTO.java | 12 ++++++++++++ .../db/migration/V0.0.23__add_ic_event.sql | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index ac44e6559a..003485d8d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1396,6 +1396,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 17:36:23 +0800 Subject: [PATCH 120/416] .. --- .../dto/form/demand/ReportDemandFormDTO.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java index 025297f1de..34b457ffe2 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java @@ -118,4 +118,19 @@ public class ReportDemandFormDTO implements Serializable { */ private String originId; + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 服务方姓名 + */ + private String serverName; + } From b2b4c9fb31147a0c6841419f3b2fca94124d9a02 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sun, 22 May 2022 22:23:28 +0800 Subject: [PATCH 121/416] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E7=BD=91=E6=A0=BC=E6=97=B6=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=8A=8A=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E9=87=8C?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E7=BB=99=E4=BF=AE=E6=94=B9=E5=88=B0=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E7=BD=91=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/NeighborHoodServiceImpl.java | 25 +++++++++++++- .../form/IcUserBelongToChangedFormDTO.java | 33 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 8 +++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++ .../controller/IcResiUserController.java | 22 +++++++++++++ .../java/com/epmet/dao/IcResiUserDao.java | 9 +++++ .../com/epmet/service/IcResiUserService.java | 10 ++++++ .../service/impl/IcResiUserServiceImpl.java | 26 +++++++++++++++ .../main/resources/mapper/IcResiUserDao.xml | 7 ++++ 9 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserBelongToChangedFormDTO.java 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 627af897fb..7c6c631284 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 @@ -2,8 +2,10 @@ package com.epmet.service.impl; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.enums.OrgTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; +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.utils.ConvertUtils; @@ -17,11 +19,13 @@ import com.epmet.dto.IcNeighborHoodPropertyDTO; import com.epmet.dto.form.IcHouseListFormDTO; import com.epmet.dto.form.IcNeighborHoodAddFormDTO; import com.epmet.dto.form.IcNeighborHoodListFormDTO; +import com.epmet.dto.form.IcUserBelongToChangedFormDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.entity.IcNeighborHoodPropertyEntity; import com.epmet.excel.IcNeighborHoodExcel; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcNeighborHoodPropertyService; import com.epmet.service.IcNeighborHoodService; @@ -44,7 +48,7 @@ import java.util.Optional; @Slf4j @Service -public class NeighborHoodServiceImpl implements NeighborHoodService { +public class NeighborHoodServiceImpl extends BaseServiceImpl implements NeighborHoodService { @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; @@ -56,6 +60,8 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { private IcNeighborHoodPropertyDao icNeighborHoodPropertyDao; @Resource private IcNeighborHoodDao icNeighborHoodDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override @@ -132,11 +138,28 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { if (!customerAgencyResult.success()) { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); } + IcNeighborHoodEntity icNeighborHoodEntity = baseDao.selectById(formDTO.getNeighborHoodId()); + if (icNeighborHoodEntity == null){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"小区信息不存在","小区信息不存在"); + } + CustomerAgencyDTO customerAgencyDTO = Optional.ofNullable(customerAgencyResult.getData()).orElse(new CustomerAgencyDTO()); icNeighborHoodDTO.setParentAgencyId(customerAgencyDTO.getPid()); icNeighborHoodDTO.setAgencyPids(customerAgencyDTO.getPids()); icNeighborHoodService.update(icNeighborHoodDTO); + //如果更新了网格 则需要更新网格下的居民所属关系 + if (icNeighborHoodEntity.getGridId().equals(icNeighborHoodDTO.getGridId())){ + IcUserBelongToChangedFormDTO userForm = new IcUserBelongToChangedFormDTO(); + userForm.setSourceGridId(icNeighborHoodEntity.getGridId()); + userForm.setTargetGridId(icNeighborHoodDTO.getGridId()); + Result updateResult = epmetUserOpenFeignClient.changeIcResiUserBelongTo(userForm); + if (updateResult == null || !updateResult.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"更新居民信息失败,请稍后重试!","更新居民信息失败,请稍后重试!"); + } + } + + //设置物业关联 String propertyId = formDTO.getPropertyId(); String neighborHoodId = icNeighborHoodDTO.getId(); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserBelongToChangedFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserBelongToChangedFormDTO.java new file mode 100644 index 0000000000..da773e7266 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserBelongToChangedFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * desc: 居民所属关系调整参数类 + * + * @author LiuJanJun + * @date 2022/5/22 9:41 下午 + */ +@Data +public class IcUserBelongToChangedFormDTO implements Serializable { + + private static final long serialVersionUID = 6572482888379744011L; + /** + * 客户Id + */ + private String customerId; + /** + * 原网格Id + */ + @NotBlank(message = "网格ID不能为空") + private String sourceGridId; + /** + * 新网格Id + */ + @NotBlank(message = "网格ID不能为空") + private String targetGridId; + +} 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 f97eb6f53d..3caad37cb0 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 @@ -748,4 +748,12 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getResiUserGroupHomeId") Result> getHouseMemberList(@RequestBody RentTenantDataFormDTO formDTO); + + /** + * desc:更新居民所属 eg:所属网格等等 + * @param formDTO + * @return + */ + @PostMapping("/icresiuser/changeIcResiUserBelongTo") + Result changeIcResiUserBelongTo(@RequestBody IcUserBelongToChangedFormDTO 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 1389394e78..a170b1e617 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 @@ -548,4 +548,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHouseMemberList", formDTO); } + @Override + public Result changeIcResiUserBelongTo(IcUserBelongToChangedFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "changeIcResiUserBelongTo", 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 30c9a10bc2..97660e7ac9 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 @@ -232,6 +232,28 @@ public class IcResiUserController implements ResultDataResolver { return new Result(); } + /** + * 更新居民的所属网格-》来源于小区更改所属网格 目前只有网格, + * + * @param formDTO + * @return + * @remark:后续如果有其他的变动需要调用的话 可以丰富参数 修改方法名 + */ + @NoRepeatSubmit + @PostMapping("changeIcResiUserBelongTo") + Result changeIcResiUserBelongTo(@LoginUser TokenDto tokenDto, @RequestBody IcUserBelongToChangedFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO); + List changedUserIds = icResiUserService.changeIcResiUserBelongTo(tokenDto,formDTO); + //推送MQ事件 + if (CollectionUtils.isNotEmpty(changedUserIds)){ + changedUserIds.forEach(resiUserId->editResiMq(tokenDto.getCustomerId(), resiUserId)); + + } + return new Result().ok(true); + } + + /** * 租客房东根据身份证更新头像 * 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 41903388f5..3449f7f115 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 @@ -309,4 +309,13 @@ public interface IcResiUserDao extends BaseDao { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + /** + * desc:条件获取居民Id列表 所有状态的包含死亡等状态 + * + * @param customerId + * @param gridId + * @return + */ + List listUserIds(@Param("customerId") String customerId, @Param("gridId") String gridId); } 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 d53232e75d..0de9ef4928 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 @@ -336,4 +336,14 @@ public interface IcResiUserService extends BaseService { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + /** + * desc:更新居民信息的所属 eg:所属网格等等 + * + * @param tokenDto + * @param formDTO + * @return + */ + List changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO 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 8cb037fa4e..4ee2b30e8b 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 @@ -1920,6 +1920,32 @@ public class IcResiUserServiceImpl extends BaseServiceImpl changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) { + List resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(),formDTO.getSourceGridId()); + if (CollectionUtils.isEmpty(resiUserIdList)){ + return null; + } + List icResiUserFormDTOS = new ArrayList<>(); + IcResiUserFormDTO e = new IcResiUserFormDTO(); + e.setTableName(IcResiUserConstant.IC_RESI_USER); + LinkedHashMap map = new LinkedHashMap(); + + map.put(FieldConstant.GRID_ID, formDTO.getSourceGridId()); + List> list = new ArrayList<>(); + list.add(map); + e.setList(list); + icResiUserFormDTOS.add(e); + + resiUserIdList.forEach(userId->{ + map.put(FieldConstant.ID, userId); + this.edit(tokenDto,icResiUserFormDTOS); + }); + + return resiUserIdList; + } + /** * desc:根据字段值获取 options * @param customerId 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 7057ade746..387d1f72cd 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 @@ -971,5 +971,12 @@ and HOME_ID = #{houseId} + From 07121b17766edbd9a38ed92c720385113083039b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 09:09:13 +0800 Subject: [PATCH 122/416] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E8=87=AA=E7=BB=84=E7=BB=87=E9=BB=98=E8=AE=A4=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcCommunitySelfOrganizationServiceImpl.java | 4 ++++ .../db/migration/V0.0.16__self_org_categorydefaultother.sql | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 98c63a60c4..f1de7d88c2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -773,6 +773,10 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl list=pageInfo.getList(); for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); + if (StringUtils.isNotBlank(dto.getCategoryCode())) { + dto.setCategoryName(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getName()); + } + } return new PageData<>(list, pageInfo.getTotal()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql new file mode 100644 index 0000000000..64a82e8c86 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql @@ -0,0 +1,4 @@ +update ic_community_self_organization set CATEGORY_CODE='other' +where DEL_FLAG='0' +and CATEGORY_CODE is not null +and CATEGORY_CODE !=''; \ No newline at end of file From 7ce392f40c829ab8035100eeb8709973dd6ae759 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 09:26:55 +0800 Subject: [PATCH 123/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E6=98=AF=E5=90=A6=E9=80=80?= =?UTF-8?q?=E5=9B=9E=E6=A0=87=E5=BF=97=E5=92=8C=E5=A4=84=E7=90=86=E6=A0=87?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ProjectManageListResultDTO.java | 5 +++ .../service/impl/ProjectServiceImpl.java | 40 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index 4cb79ebdf7..7c9bb481e8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -69,8 +69,13 @@ public class ProjectManageListResultDTO implements Serializable { @JsonIgnore private Date updatedTime; + @JsonIgnore private String isHandle; + private Boolean processable; + + private Boolean returnable; + public ProjectManageListResultDTO() { this.gridName = ""; this.title = ""; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index cd4c7df3ab..ab30428219 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -3227,6 +3227,8 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentList = projectStaffService.getDepartmentNameList(projectStaffDTO); + if (null != departmentList && departmentList.size() > NumConstant.ZERO) { + //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, + // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true + CustomerProjectParameterDTO customerProjectParameterDTO = new CustomerProjectParameterDTO(); + customerProjectParameterDTO.setCustomerId(formDTO.getCustomerId()); + customerProjectParameterDTO.setParameterKey(ProjectConstant.EXTERNAL_SYSTEM); + String parameterValue = parameterService.getParameterValueByKey(customerProjectParameterDTO); + if (StringUtils.isNotEmpty(parameterValue)){ + if (parameterValue.equals(NumConstant.ONE_STR)) { + List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); + if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { + p.setProcessable(true); + } else { + p.setProcessable(false); + } + } else { + p.setProcessable(true); + } + } else { + p.setProcessable(true); + } + } else { + p.setProcessable(false); + } + ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO(); + returnListFromDTO.setProjectId(p.getProjectId()); + List returnableList = projectProcessService.getReturnableList(returnListFromDTO); + if (null != returnableList && returnableList.size() > NumConstant.ZERO) { + p.setReturnable(true); + } else { + p.setReturnable(false); + } } }); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); From 205f38827854159eb5b89be1e9273e24d1091b6a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 09:27:39 +0800 Subject: [PATCH 124/416] updateCommunitySelfOrganization --- .../main/resources/mapper/IcCommunitySelfOrganizationDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 2ad8ac92b9..b8374a921e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -16,7 +16,8 @@ ORGANIZATION_CREATED_TIME = #{organizationCreatedTime}, REMARK = #{remark}, UPDATED_TIME = NOW(), - UPDATED_BY = #{updatedBy} + UPDATED_BY = #{updatedBy}, + CATEGORY_CODE =#{categoryCode} WHERE DEL_FLAG = 0 AND ID = #{orgId} From 801ea3dc1ad6d3502863d473634c2bc7b53f1793 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 23 May 2022 09:28:19 +0800 Subject: [PATCH 125/416] =?UTF-8?q?=E5=B8=A6header=E7=9A=84post?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/utils/HttpClientManager.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 4fd11ba0c2..4fe6be37da 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -143,6 +143,41 @@ public class HttpClientManager { } + /** + * desc: 发送json post 请求 + * param: url,jsonStrParam + * return: CallResult + * date: 2019/2/21 9:12 + * + * @author: jianjun liu + */ + public Result sendPostAndHeader(String url, Map paramsMap, Map headerMap) { + + try { + HttpPost httppost = new HttpPost(url); + httppost.setConfig(requestConfig); + + httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_FORM_URL_ENCODED); + if (null != headerMap){ + headerMap.forEach((k,v) -> { + httppost.addHeader(k,v); + }); + } + List list = new ArrayList(); + for (String key : paramsMap.keySet()) { + list.add(new BasicNameValuePair(key, String.valueOf(paramsMap.get(key)))); + } + UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, UTF8); + httppost.setEntity(urlEncodedFormEntity); + + return execute(httppost, false); + } catch (Exception e) { + log.error("send exception", e); + return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + } + + } + /** * desc: 发送json post 请求 * param: url,jsonStrParam From 317b7f09ce21fdaf65c850c180ab2869e3601694 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 23 May 2022 09:40:53 +0800 Subject: [PATCH 126/416] =?UTF-8?q?=E3=80=90=E4=BA=8B=E4=BB=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=88=86=E6=9E=90=E3=80=91=E7=A0=94=E5=88=A4=E5=88=86?= =?UTF-8?q?=E6=9E=90=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=B1=85=E6=B0=91=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E4=BA=8B=E4=BB=B6=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/IcEventYpAnalysisResultDTO.java | 4 ++++ .../src/main/java/com/epmet/dao/IcEventDao.java | 7 +++++++ .../java/com/epmet/service/impl/IcEventServiceImpl.java | 4 ++++ .../src/main/resources/mapper/IcEventDao.xml | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java index 1bf3e0ce99..934833d09c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java @@ -60,6 +60,10 @@ public class IcEventYpAnalysisResultDTO { */ private String categoryPids; + /** + * 居民上报的事件的总和 + */ + private Integer resiReportEventCount; /** * 家属 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 5ee5947514..2c7812b93c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -131,4 +131,11 @@ public interface IcEventDao extends BaseDao { List selectMyReport(MyReportIcEvFormDTO formDTO); int updateRedDot(@Param("userId") String userId, @Param("icEventId")String icEventId); + + /** + * 查询居民上报的时间数量 + * @param reportorIdCard 上报人的身份证号 + * @return + */ + Integer getResiReportEventCount(@Param("reportorIdCard") String reportorIdCard); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f7a35fd0ae..6ad0222007 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -611,6 +611,9 @@ public class IcEventServiceImpl extends BaseServiceImpl + + \ No newline at end of file From cb1627ed7b05e4803ddf572328be664a7c5e3cae Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 09:47:50 +0800 Subject: [PATCH 127/416] =?UTF-8?q?feign=E6=B7=BB=E5=8A=A0=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3caad37cb0..6ad96ff185 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 @@ -754,6 +754,6 @@ public interface EpmetUserOpenFeignClient { * @param formDTO * @return */ - @PostMapping("/icresiuser/changeIcResiUserBelongTo") + @PostMapping("/epmetuser/icresiuser/changeIcResiUserBelongTo") Result changeIcResiUserBelongTo(@RequestBody IcUserBelongToChangedFormDTO formDTO); } From 75e9b91de0d19853411750a6cd0f1ad357afe40c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 10:03:22 +0800 Subject: [PATCH 128/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=88=86=E7=B1=BB=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/EpmetAdminOpenFeignClient.java | 4 ++++ .../EpmetAdminOpenFeignClientFallback.java | 6 ++++++ .../epmet/controller/SysDictDataController.java | 5 +++++ .../main/java/com/epmet/dao/SysDictDataDao.java | 3 +++ .../com/epmet/service/SysDictDataService.java | 2 ++ .../service/impl/SysDictDataServiceImpl.java | 5 +++++ .../main/resources/mapper/SysDictDataDao.xml | 11 +++++++++++ .../IcCommunitySelfOrganizationServiceImpl.java | 17 +++++++++-------- .../mapper/IcCommunitySelfOrganizationDao.xml | 2 +- 9 files changed, 46 insertions(+), 9 deletions(-) diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index 9068180318..59eb1e1e40 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.DictTreeResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; @@ -101,4 +102,7 @@ public interface EpmetAdminOpenFeignClient { @PostMapping("/sys/dict/data/dictlist") Result> dictList(@RequestBody DictListFormDTO formDTO); + + @PostMapping("/sys/dict/data/dictDataList/{dictType}") + Result> dictDataList(@PathVariable("dictType") String dictType); } diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java index 110ba490e3..98e7e7f0f0 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java @@ -7,6 +7,7 @@ import com.epmet.commons.tools.dto.result.DictTreeResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.EpmetAdminOpenFeignClient; @@ -59,4 +60,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli public Result> dictList(DictListFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO); } + + @Override + public Result> dictDataList(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictDataList", dictType); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java index 3c3ac4d344..ce18026bf8 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java @@ -172,4 +172,9 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.dictMap(dictType)); } + @PostMapping("dictDataList/{dictType}") + public Result> dictDataList(@PathVariable("dictType") String dictType){ + List list=sysDictDataService.getDictDataList(dictType); + return new Result>().ok(list); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java index 7ba543b6af..8c437ee27e 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java @@ -11,6 +11,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.DictTreeResultDTO; +import com.epmet.dto.SysDictDataDTO; import com.epmet.entity.DictData; import com.epmet.entity.SysDictDataEntity; import org.apache.ibatis.annotations.Mapper; @@ -33,4 +34,6 @@ public interface SysDictDataDao extends BaseDao { List selectDictList(String dictType); List selectDictData(String dictType); + + List selectDictDataList(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java index b49e51fbdc..6277ab6d2f 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java @@ -90,4 +90,6 @@ public interface SysDictDataService extends BaseService { Map dictMap(String dictType); List dictListTree(String dictType); + + List getDictDataList(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java index bd042379dd..a7b6bff903 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -225,4 +225,9 @@ public class SysDictDataServiceImpl extends BaseServiceImpl getDictDataList(String dictType) { + return baseDao.selectDictDataList(dictType); + } + } diff --git a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml index d7ea8fa27b..9330c7d779 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml +++ b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml @@ -33,4 +33,15 @@ a.sort asc + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index f1de7d88c2..833f93d900 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -34,6 +34,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.*; @@ -716,20 +717,20 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl querySelfOrgCategoryTotal(String customerId, String staffId) { - Result> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); - if (!dictMapRes.success() || MapUtils.isEmpty(dictMapRes.getData())) { + Result> dictDataListRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + if (!dictDataListRes.success() || CollectionUtils.isEmpty(dictDataListRes.getData())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常"); } - CustomerStaffInfoCacheResult staffInfo=getStaffInfo(customerId,staffId); + CustomerStaffInfoCacheResult staffInfo = getStaffInfo(customerId, staffId); List list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId()); Map map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2)); List resultList = new ArrayList<>(); - for (String key : dictMapRes.getData().keySet()) { + for (SysDictDataDTO dict : dictDataListRes.getData()) { SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO(); - resDTO.setCategoryCode(key); - resDTO.setCategoryName(dictMapRes.getData().get(key)); - resDTO.setTotal(map.containsKey(key) ? map.get(key) : NumConstant.ZERO); - resDTO.setColor(SelfOrgCategoryEnum.getEnum(key).getColor()); + resDTO.setCategoryCode(dict.getDictValue()); + resDTO.setCategoryName(dict.getDictLabel()); + resDTO.setTotal(map.containsKey(dict.getDictValue()) ? map.get(dict.getDictValue()) : NumConstant.ZERO); + resDTO.setColor(SelfOrgCategoryEnum.getEnum(dict.getDictValue()).getColor()); resultList.add(resDTO); } return resultList; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index b8374a921e..4293f65f43 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -166,7 +166,7 @@ so.LONGITUDE AS longitude, so.LATITUDE AS latitude, so.ID as orgId, - so.remark + IFNULL(so.remark,'')AS remark FROM ic_community_self_organization so WHERE so.DEL_FLAG = 0 AND so.CATEGORY_CODE IS NOT NULL From b3da911a4db03d2abd1f2045a1b05a8670a7492e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 10:06:28 +0800 Subject: [PATCH 129/416] emm --- .../java/com/epmet/service/impl/NeighborHoodServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7c6c631284..a053e7b183 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 @@ -149,7 +149,7 @@ public class NeighborHoodServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 10:12:57 +0800 Subject: [PATCH 130/416] .. --- .../src/main/resources/db/migration/V0.0.23__add_ic_event.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql index b5720f74b9..6ccf4c6343 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql @@ -17,7 +17,7 @@ CREATE TABLE `ic_event` ( `ADDRESS` varchar(255) NOT NULL COMMENT '地址', `STATUS` varchar(32) NOT NULL DEFAULT 'processing' COMMENT '处理中:processing;已办结:closed_case', `CLOSE_CASE_TIME` datetime DEFAULT NULL COMMENT '办结时间', - `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 1:已转需求', + `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 2:已转需求', `OPERATION_ID` varchar(32) DEFAULT NULL COMMENT '项目、需求ID', `READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '事件是否被阅读过;1已读;针对报事人待处理列表', `RED_DOT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '报事人的红点:展示1;不展示:0;【工作人员回复/立项/转需求/办结更新为1】', From 966f2fc2cb7dc83b934884c6e82ca2d7d4f66eed Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 10:27:56 +0800 Subject: [PATCH 131/416] emm --- .../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 4ee2b30e8b..40c6bbe69d 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 @@ -1932,7 +1932,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl map = new LinkedHashMap(); - map.put(FieldConstant.GRID_ID, formDTO.getSourceGridId()); + map.put(FieldConstant.GRID_ID, formDTO.getTargetGridId()); List> list = new ArrayList<>(); list.add(map); e.setList(list); From 529f049057ef8d5009ff3eef3c6f712e64b4c7d7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:22:29 +0800 Subject: [PATCH 132/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=A5=BC22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubOrgResDTO.java | 2 ++ .../resources/mapper/CustomerAgencyDao.xml | 8 +++++-- .../main/java/com/epmet/dao/IcEventDao.java | 7 ++---- .../service/impl/IcEventServiceImpl.java | 10 ++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 +++++++++---------- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java index 220c5c5bbf..8bc06550a1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java @@ -17,4 +17,6 @@ public class SubOrgResDTO implements Serializable { */ private String orgType; private String orgName; + private String pid; + private String pids; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index b53781ea0e..50fbf27003 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -761,7 +761,9 @@ SELECT ca.ID AS orgId, ca.ORGANIZATION_NAME AS orgName, - 'agency' AS orgType + 'agency' AS orgType, + ca.PID, + ca.PIDS FROM customer_agency ca WHERE @@ -771,7 +773,9 @@ SELECT cg.ID AS orgId, cg.GRID_NAME AS orgName, - 'grid' AS orgType + 'grid' AS orgType, + cg.PID, + cg.PIDS FROM customer_grid cg WHERE diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 2c7812b93c..52196ff764 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -112,15 +112,12 @@ public interface IcEventDao extends BaseDao { */ void updateAutoEvaluation(@Param("ids")List ids); - Integer selectGridTotal(String gridId); - /** * - * @param orgId - * @param orgType + * @param formDTO * @return */ - Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); + Integer selectOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); /** * 居民端小程序我上报的事件-列表+详情 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 6ad0222007..faf39035ee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1007,7 +1007,7 @@ public class IcEventServiceImpl extends BaseServiceImpl 60*60*24*7 LIMIT #{no},#{size} - - SELECT count( ie.id ) as total FROM ic_event ie + inner join ic_event_category ic + on(ie.ID=ic.IC_EVENT_ID and ic.DEL_FLAG='0') WHERE ie.DEL_FLAG = '0' + AND ie.CUSTOMER_ID = #{customerId} + and ie.HAPPEN_TIME >= #{queryStartTime} + and ie.HAPPEN_TIME #{queryEndTime} - and ie.GRID_PIDS like CONCAT('%',#{orgId},'%') + and e.GRID_PIDS like CONCAT(#{gridPids},'%') - and ie.GRID_ID=#{orgId} + AND ie.GRID_ID = #{orgId} + + + and ic.CATEGORY_CODE like concat(#{categoryCode},'%') From 33fdecc39449ab849d9ee241793794d9d187d992 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:33:13 +0800 Subject: [PATCH 133/416] i --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 98a5ed5057..d8958fd4a3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -271,7 +271,7 @@ and ie.HAPPEN_TIME >= #{queryStartTime} and ie.HAPPEN_TIME #{queryEndTime} - and e.GRID_PIDS like CONCAT(#{gridPids},'%') + and ie.GRID_PIDS like CONCAT(#{gridPids},'%') AND ie.GRID_ID = #{orgId} From b0c2f6ab6d5b7df69bea90f23c637c9be7121c90 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:42:20 +0800 Subject: [PATCH 134/416] bugfix --- .../com/epmet/service/impl/IcEventServiceImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index faf39035ee..3e07d15b32 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1017,11 +1017,15 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 13:32:52 +0800 Subject: [PATCH 135/416] =?UTF-8?q?customerId=E8=8E=B7=E5=8F=96?= 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 40c6bbe69d..7af9e8343c 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 @@ -1923,7 +1923,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) { - List resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(),formDTO.getSourceGridId()); + List resiUserIdList = baseDao.listUserIds(tokenDto.getCustomerId(),formDTO.getSourceGridId()); if (CollectionUtils.isEmpty(resiUserIdList)){ return null; } From 385984d98e0891e166128eaff57b04c746ee8009 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 13:37:41 +0800 Subject: [PATCH 136/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IcEventListResultDTO.java | 8 ++ .../epmet/controller/IcEventController.java | 62 +++++++++ .../java/com/epmet/excel/IcEventExcel.java | 121 +++++------------- .../src/main/resources/mapper/IcEventDao.xml | 2 + 4 files changed, 105 insertions(+), 88 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index c4dd90f6be..19bb9b55df 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -120,6 +120,10 @@ public class IcEventListResultDTO implements Serializable { * 0:已回复 1:已转项目 1:已转需求 */ private String operationType; + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationTypeName; /** * 项目、需求ID */ @@ -179,6 +183,10 @@ public class IcEventListResultDTO implements Serializable { * 分类名称 */ private String categoryName; + /** + * 第一章图片url + */ + private String imageUrl; /** * 事件附件 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index edca0f5cc2..62c48a83f4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -1,13 +1,22 @@ package com.epmet.controller; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; 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.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; @@ -17,11 +26,17 @@ import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.excel.IcEventExcel; import com.epmet.service.IcEventReplyService; import com.epmet.service.IcEventService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -34,6 +49,7 @@ import java.util.List; */ @RestController @RequestMapping("icEvent") +@Slf4j public class IcEventController { @Autowired @@ -371,4 +387,50 @@ public class IcEventController { icEventService.resiReply(formDTO); return new Result(); } + + /** + * @Author sun + * @Description 数字平台-事件导出 + **/ + @PostMapping("export") + public void export(@RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { + formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setStaffId("d8dfc6c1fa2538976059f3900036d419"); + formDTO.setIsPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + try { + String fileName = "事件管理" + DateUtils.format(new Date()) + ".xlsx"; + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcEventExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + PageData data = null; + List list = null; + do { + data = icEventService.list(formDTO); + data.getList().forEach(d->{ + if(!org.springframework.util.CollectionUtils.isEmpty(d.getImageList())){ + d.setImageUrl(d.getImageList().get(NumConstant.ZERO)); + } + }); + list = ConvertUtils.sourceToTarget(data.getList(), IcEventExcel.class); + formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); + excelWriter.write(list, writeSheet); + } while (CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize()); + } catch (EpmetException e) { + response.reset(); + response.setCharacterEncoding("UTF-8"); + response.setHeader("content-type", "application/json; charset=UTF-8"); + PrintWriter printWriter = response.getWriter(); + Result result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); + printWriter.write(JSON.toJSONString(result)); + printWriter.close(); + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java index fdf4ae9a0a..5bfc88d274 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java @@ -1,6 +1,8 @@ package com.epmet.excel; -import cn.afterturn.easypoi.excel.annotation.Excel; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.format.DateTimeFormat; +import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; import java.util.Date; @@ -14,107 +16,50 @@ import java.util.Date; @Data public class IcEventExcel { - @Excel(name = "主键,事件id") - private String id; + @ExcelProperty(value = "所属网格") + @ColumnWidth(20) + private String gridName; - @Excel(name = "客户ID") - private String customerId; - - @Excel(name = "事件所属的网格Id") - private String gridId; - - @Excel(name = "网格的所属组织") - private String agencyId; - - @Excel(name = "网格的所有组织Id") - private String gridPids; - - @Excel(name = "报事的人【居民端/pc端居民Id】可为空") - private String reportUserId; - - @Excel(name = "报事人姓名") - private String name; - - @Excel(name = "手机号") - private String mobile; - - @Excel(name = "身份证号") - private String idCard; - - @Excel(name = "反映渠道【字典表】") - private String sourceType; - - @Excel(name = "事件内容") + @ExcelProperty(value = "事件内容") + @ColumnWidth(25) private String eventContent; - @Excel(name = "纬度") - private String latitude; + @ExcelProperty(value = "图片") + @ColumnWidth(25) + private String imageUrl; - @Excel(name = "经度") - private String longitude; + @ExcelProperty(value = "上报渠道") + @ColumnWidth(20) + private String sourceTypeName; - @Excel(name = "地址") + @ExcelProperty(value = "地址") + @ColumnWidth(25) private String address; - @Excel(name = "处理中:processing;已办结:closed_case") - private String status; - - @Excel(name = "办结时间") - private Date closeCaseTime; - - @Excel(name = "0:已回复 1:已转项目 1:已转需求") - private String operationType; - - @Excel(name = "项目、需求ID") - private String operationId; - - @Excel(name = "事件是否被阅读过;1已读;针对报事人待处理列表") - private Integer readFlag; - - @Excel(name = "报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; ") - private Integer redDot; - - @Excel(name = "最近一次操作时间(回复、立项、转需求、办结更新此列)") - private Date latestOperatedTime; - - @Excel(name = "是否解决:已解决 resolved,未解决 un_solved") - private String resolveStatus; - - @Excel(name = "结案说明") - private String closeRemark; + @ExcelProperty(value = "报事人") + @ColumnWidth(20) + private String name; - @Excel(name = "评论人") - private String commentUserId; + @ExcelProperty(value = "手机号") + @ColumnWidth(20) + private String mobile; - @Excel(name = "评论内容") + @ExcelProperty(value = "满意度") + @ColumnWidth(20) private String commentContent; - @Excel(name = "评论时间") - private Date commentTime; - - @Excel(name = "事件审核状态") - private String auditStatus; - - @Excel(name = "审核理由") - private String auditReason; - - @Excel(name = "删除标识:0.未删除 1.已删除") - private String delFlag; - - @Excel(name = "乐观锁") - private Integer revision; - - @Excel(name = "创建人") - private String createdBy; - - @Excel(name = "展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示") + @ExcelProperty(value = "上报时间") + @ColumnWidth(20) + @DateTimeFormat("yyyy-MM-dd HH:mm:ss") private Date createdTime; - @Excel(name = "更新人") - private String updatedBy; + @ExcelProperty(value = "结点") + @ColumnWidth(20) + private String operationTypeName; - @Excel(name = "更新时间") - private Date updatedTime; + @ExcelProperty(value = "状态") + @ColumnWidth(20) + private String statusName; } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index d8958fd4a3..1e5f89095c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -105,6 +105,7 @@ + @@ -156,6 +157,7 @@ ie.satisfaction, IF(ie.satisfaction = 'bad','不满意',IF (ie.satisfaction = 'good','基本满意',IF (ie.satisfaction = 'perfect','非常满意',''))) satisfactionName, ie.operation_type, + IF(ie.operation_type = '0','已回复',IF (ie.operation_type = '1','已转项目',IF (ie.operation_type = '2','已转需求',''))) operationTypeName, ie.operation_id, ie.read_flag, ie.red_dot, From 79d85740dd1941f30d0461161df1cbd693b5d1e2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 13:41:31 +0800 Subject: [PATCH 137/416] =?UTF-8?q?customerId=E8=8E=B7=E5=8F=96?= 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 7af9e8343c..40c6bbe69d 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 @@ -1923,7 +1923,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl changeIcResiUserBelongTo(TokenDto tokenDto, IcUserBelongToChangedFormDTO formDTO) { - List resiUserIdList = baseDao.listUserIds(tokenDto.getCustomerId(),formDTO.getSourceGridId()); + List resiUserIdList = baseDao.listUserIds(formDTO.getCustomerId(),formDTO.getSourceGridId()); if (CollectionUtils.isEmpty(resiUserIdList)){ return null; } From 234c79fd3dc51b7e900109fee44eb0ec50126bbd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 14:09:43 +0800 Subject: [PATCH 138/416] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcEventServiceImpl.java | 9 +++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 +++++++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++++ .../controller/UserResiInfoController.java | 11 +++++++++++ .../com/epmet/service/UserResiInfoService.java | 8 ++++++++ .../service/impl/UserResiInfoServiceImpl.java | 17 ++++++++++++++++- 6 files changed, 58 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3e07d15b32..3fde323af5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1159,6 +1159,15 @@ public class IcEventServiceImpl extends BaseServiceImpl isResiFlag = userOpenFeignClient.getIsResiFlag(formDTO.getUserId()); + if (!isResiFlag.success()){ + throw new EpmetException("查询是否注册居民失败..."); + } + // todo 未注册居民不允许随手拍、随时讲 + if (!isResiFlag.getData()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),""); + } if(StringUtils.isBlank(formDTO.getContent()) && CollectionUtils.isEmpty(formDTO.getVoiceList())) { //话题内容和语音不能同时为空 log.error("事件内容和语音不能同时为空"); 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 0417195dbc..2e5ec4bcd5 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 @@ -773,4 +773,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getAllUserIds") Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId); + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + @PostMapping("/epmetuser/userresiinfo/isResiFlag") + Result getIsResiFlag(@RequestParam("userId") String userId); } 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 94b8493076..49dd6a0a66 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 @@ -569,4 +569,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result> getAllUserIds(String idCard, String customerId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId); } + + @Override + public Result getIsResiFlag(String userId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIsResiFlag", userId); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index 820f310a40..3ac5a09d81 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -219,4 +219,15 @@ public class UserResiInfoController { userResiInfoService.submitInLink(param); return new Result(); } + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + @PostMapping("isResiFlag") + public Result getIsResiFlag(@RequestParam("userId") String userId){ + return new Result().ok(userResiInfoService.getIsResiFlag(userId)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java index 1334034ebd..d28605f95d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java @@ -195,4 +195,12 @@ public interface UserResiInfoService extends BaseService { * @date 2020.12.18 16:34 */ void submitInLink(AfterRegisterResidentInSharableLinkFormDTO param); + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + Boolean getIsResiFlag(String userId); } 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 ee80c0809d..3e2d368486 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 @@ -499,8 +499,23 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:22:47 +0800 Subject: [PATCH 139/416] =?UTF-8?q?=E7=AB=8B=E9=A1=B9=E3=80=81=E8=BD=AC?= =?UTF-8?q?=E9=9C=80=E6=B1=82=20=E5=88=86=E7=B1=BB=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcDemandFormDTO.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 75 +++++++++++++++---- 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 50d659f799..0e2bc16a97 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -165,5 +165,10 @@ public class IcDemandFormDTO implements Serializable { * 服务方名称 */ private String serverName; + /** + * 二级分类Id + */ + @NotBlank(message = "分类id不能为空",groups = AddUserInternalGroup.class) + private String categoryId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3fde323af5..f1561debbe 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,12 +21,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.*; -import com.epmet.constant.ProjectConstant; -import com.epmet.constant.EventConstant; -import com.epmet.constant.ReadFlagConstant; -import com.epmet.constant.UserMessageConstant; -import com.epmet.constant.ResiEventAction; -import com.epmet.constant.UserMessageTypeConstant; +import com.epmet.constant.*; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -744,12 +739,11 @@ public class IcEventServiceImpl extends BaseServiceImpl logList = new ArrayList<>(); - logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getDesc())); + logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getCode())); //回复时选择了已完成 if (StringUtils.isNotBlank(formDTO.getOperationType()) && ResiEventAction.CLOSE_CASE.getCode().equals(formDTO.getStatus())) { date.setTime(date.getTime() + 6000 * 1); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getDesc())); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getCode())); UserMessageFormDTO close = ConvertUtils.sourceToTarget(messageFormDTO, UserMessageFormDTO.class); close.setMessageContent(String.format("您上报的事件已完成,请查看。")); @@ -785,11 +779,39 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(categoryId); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + IcEventCategoryEntity categoryEntity = null; + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(categoryId)) { + categoryEntity = new IcEventCategoryEntity(); + categoryEntity.setCustomerId(formDTO.getCustomerId()); + categoryEntity.setIcEventId(entity.getId()); + categoryEntity.setCategoryId(ca.getId()); + categoryEntity.setCategoryPids(ca.getPids()); + categoryEntity.setCategoryCode(ca.getCategoryCode()); + } + } + + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { + icEventCategoryService.insert(categoryEntity); + } else { + categoryEntity.setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity); + } + } + + //5.新增操作记录 IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "shift_project", "shift_project"); icEventOperationLogService.insert(logEntity); - //5.判断来源居民端的事件,转了项目给居民推送站内信 + //6.判断来源居民端的事件,转了项目给居民推送站内信 if ("0".equals(entity.getSourceType())) { //通知 List msgList = new ArrayList<>(); @@ -842,11 +864,38 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(formDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + IcEventCategoryEntity categoryEntity = null; + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(formDTO.getCategoryId())) { + categoryEntity = new IcEventCategoryEntity(); + categoryEntity.setCustomerId(formDTO.getCustomerId()); + categoryEntity.setIcEventId(entity.getId()); + categoryEntity.setCategoryId(ca.getId()); + categoryEntity.setCategoryPids(ca.getPids()); + categoryEntity.setCategoryCode(ca.getCategoryCode()); + } + } + + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { + icEventCategoryService.insert(categoryEntity); + } else { + categoryEntity.setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity); + } + } + + //5.新增操作记录 IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getDemandUserId(), new Date(), "shift_demand", "shift_demand"); icEventOperationLogService.insert(logEntity); - //5.判断来源居民端的事件,转了项目给居民推送站内信 + //6.判断来源居民端的事件,转了项目给居民推送站内信 if ("0".equals(entity.getSourceType())) { //通知 List msgList = new ArrayList<>(); From f07a7290b97a9e63d3a9e31b3cc57424de7f0612 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 14:29:14 +0800 Subject: [PATCH 140/416] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f1561debbe..842c358de1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1215,7 +1215,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:35:31 +0800 Subject: [PATCH 141/416] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 1 + .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 8140096f7d..ed274b2c28 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 @@ -255,6 +255,7 @@ public enum EpmetErrorCode { IC_NAT(8924,"平台已存在记录,请去修改原有记录"), RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"), IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"), + NOT_REGEIST_RESI(8927,"未注册居民"), //通用错误码 start diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 842c358de1..b420f9542d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1215,7 +1215,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:38:44 +0800 Subject: [PATCH 142/416] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index b420f9542d..075b5a6ea9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1213,7 +1213,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 15:02:25 +0800 Subject: [PATCH 143/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E7=AB=8B?= =?UTF-8?q?=E9=A1=B9=E3=80=81=E8=BD=AC=E9=9C=80=E6=B1=82=E3=80=81=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=97=B6=20=E5=88=86=E7=B1=BB=E5=BF=85?= =?UTF-8?q?=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 075b5a6ea9..a6b126c9f6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -176,7 +176,9 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 15:46:01 +0800 Subject: [PATCH 144/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 10 +++++----- .../src/main/resources/mapper/project/ProjectDao.xml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 83158a9711..cdf8395fd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -141,7 +141,7 @@ WHERE 1 = 1 - AND f.ORIGIN = 'issue' + AND f.ORIGIN IN('issue', 'ic_event') AND f.PROJECT_STATUS = 'closed' AND f.CUSTOMER_ID = #{customerId} ) a @@ -468,7 +468,7 @@ AND fm.MONTH_ID = #{monthId} AND fm.PROJECT_STATUS = 'closed' AND fm.GRID_ID != '' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY GRID_ID @@ -490,7 +490,7 @@ WHERE fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} AND fm.PROJECT_STATUS = 'closed' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY AGENCY_ID @@ -680,7 +680,7 @@ fm.CUSTOMER_ID = #{customerId} AND fm.PROJECT_STATUS = 'closed' AND fm.GRID_ID != '' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY GRID_ID @@ -701,7 +701,7 @@ INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' ) WHERE fm.CUSTOMER_ID = #{customerId} AND fm.PROJECT_STATUS = 'closed' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY AGENCY_ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index f309d79bf4..2949e36b6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -58,7 +58,7 @@ FROM project WHERE DEL_FLAG = '0' - AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event') + AND ORIGIN IN('issue', 'resi_event', 'ic_event') AND STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') #{date} @@ -72,7 +72,7 @@ FROM project WHERE DEL_FLAG = '0' - AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event') + AND ORIGIN IN('issue', 'resi_event', 'ic_event') AND STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date} From ad05dae5b77ccf932c4199011fb8bf88ac389bb9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 16:37:07 +0800 Subject: [PATCH 145/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E3=80=81=E7=BB=84=E7=BB=87=E7=9A=84=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8F=8A=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactAgencyGovernDailyEntity.java | 8 ++++++ .../datastats/impl/DataStatsServiceImpl.java | 5 +++- .../mapper/datastats/DatsStatsDao.xml | 10 +++++-- .../dto/extract/FactAgencyGovernDailyDTO.java | 10 +++++++ .../dto/extract/FactGridGovernDailyDTO.java | 10 +++++++ .../com/epmet/constant/ProjectConstant.java | 2 ++ .../extract/FactAgencyGovernDailyEntity.java | 10 +++++++ .../extract/FactGridGovernDailyEntity.java | 10 +++++++ .../FactAgencyGovernDailyServiceImpl.java | 28 +++++++++++++++++++ .../impl/FactGridGovernDailyServiceImpl.java | 16 ++++++++++- 10 files changed, 104 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java index a0dc4073d4..0f7a9e2cb7 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java @@ -187,5 +187,13 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity { * 18、当前组织内:来源于工作人员上报事件的项目:结案无需解决数 */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index cd77750bee..8682ec5876 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -1201,9 +1201,12 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve Integer eventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getEventUnResolvedCount).sum(); Integer workEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventResolvedCount).sum(); Integer workEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventUnResolvedCount).sum(); + Integer icEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventResolvedCount).sum(); + Integer icEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventUnResolvedCount).sum(); Integer closedProjectTotal = issueResolvedCount + issueUnResolvedCount+projectResolvedCount + projectUnResolvedCount + eventResolvedCount + eventUnResolvedCount - + workEventResolvedCount + workEventUnResolvedCount; + + workEventResolvedCount + workEventUnResolvedCount + +icEventResolvedCount + icEventUnResolvedCount; resultDTO.setProblemResolvedCount(closedProjectTotal); resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount)); resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, closedProjectTotal)); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml index 051bffb00c..330f564b25 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml @@ -631,7 +631,8 @@ ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT +APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT +EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT - +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, + +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT + +IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, @@ -654,7 +655,8 @@ ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT +APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT +EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT - +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, + +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT + +IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, @@ -693,7 +695,9 @@ EVENT_RESOLVED_COUNT, EVENT_UN_RESOLVED_COUNT, WORK_EVENT_RESOLVED_COUNT, - WORK_EVENT_UN_RESOLVED_COUNT + WORK_EVENT_UN_RESOLVED_COUNT, + IC_EVENT_RESOLVED_COUNT, + IC_EVENT_UN_RESOLVED_COUNT FROM fact_agency_govern_daily WHERE diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java index 5767491aa3..2f438b7bb8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java @@ -147,6 +147,16 @@ public class FactAgencyGovernDailyDTO implements Serializable { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 未出当前网格的,结案项目数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java index e1122d933b..55dad7ab07 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java @@ -158,6 +158,16 @@ public class FactGridGovernDailyDTO implements Serializable { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 15、未出当前网格的,结案项目数=11+12+13+14 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java index 07cb835339..93e0966db2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -85,6 +85,8 @@ public interface ProjectConstant { String PROJECT_ORIGIN_EVENT="resi_event"; String PROJECT_ORIGIN_WORK_EVENT="work_event"; + + String IC_EVENT="ic_event"; /** * 自办 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java index 523f482902..7e0c4ad338 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java @@ -186,4 +186,14 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity { */ private Integer districtDeptClosedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java index 204a3591ff..4120ed76c5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java @@ -186,6 +186,16 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java index ccf0ee8597..75fd5d4d4f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java @@ -285,6 +285,32 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl icEventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, + dateId, ProjectConstant.RESOLVED, + ProjectConstant.IC_EVENT); + if (!icEventProjectResolvedTotal.isEmpty()) { + agencyGovernDailyList.forEach(item -> { + OrgStatisticsResultDTO dto = icEventProjectResolvedTotal.get(item.getAgencyId()); + if (null != dto) { + item.setIcEventResolvedCount(dto.getSum()); + } + }); + } + //2022-5-23 当前组织内:来源于事件管理的项目:结案无需解决数 + Map icEventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, + dateId, ProjectConstant.UNRESOLVED, + ProjectConstant.IC_EVENT); + if (!icEventProjectUnResolvedTotal.isEmpty()) { + agencyGovernDailyList.forEach(item -> { + OrgStatisticsResultDTO dto = icEventProjectUnResolvedTotal.get(item.getAgencyId()); + if (null != dto) { + item.setIcEventUnResolvedCount(dto.getSum()); + } + }); + } + + // 2.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的) agencyGovernDailyList.forEach(item -> { int count = item.getInGroupTopicResolvedCount() + item.getInGroupTopicUnResolvedCount(); @@ -423,6 +449,8 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl eventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.UNRESOLVED); Map workEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.RESOLVED); Map workEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.UNRESOLVED); + Map icEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_EVENT,DimObjectStatusConstant.RESOLVED); + Map icEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_EVENT,DimObjectStatusConstant.UNRESOLVED); Map inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ZERO_STR); Map inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ZERO_STR); Map dtoMap=getGovernGridClosedTotalCommonDTOMap(customerId,gridIds); @@ -182,6 +184,16 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 16:38:48 +0800 Subject: [PATCH 146/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8E=AA=E6=96=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9Eorigin\originId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/demand/DemandRecResultDTO.java | 9 +++++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index c235915430..bbf2c8f3ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -139,4 +139,13 @@ public class DemandRecResultDTO implements Serializable { private String longitude; // 纬度,需求人是ic的居民时,取所住楼栋的中心点位 private String latitude; + + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index dd7cf16d8a..4d215c16d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -85,7 +85,9 @@ CASE WHEN R.DEMAND_USER_TYPE='mini_resi' THEN R.DEMAND_USER_ID ELSE '' END - ) as epmetUserId + ) as epmetUserId, + r.ORIGIN AS origin, + r.ORIGIN_ID AS originId FROM ic_user_demand_rec r left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' ) From f233a46d6c53c78da43f34202c3117baa1be68b4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 16:44:55 +0800 Subject: [PATCH 147/416] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E3=80=81=E7=BB=84=E7=BB=87=E7=9A=84=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8F=8A=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=8F=98=E5=8C=96=20=20?= =?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 --- .../resources/db/migration/V0.0.31__alter_govern.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql new file mode 100644 index 0000000000..53d0a39910 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql @@ -0,0 +1,11 @@ + +ALTER TABLE `fact_agency_govern_daily` +ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`, +ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`; + + +ALTER TABLE `epmet_data_statistical`.`fact_grid_govern_daily` + ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`, + ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`; + + From fba94c10a0003d9df6eda30f8011f3d16653e750 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 16:52:15 +0800 Subject: [PATCH 148/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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 7057ade746..6e7ea6f69b 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 @@ -294,6 +294,7 @@ IFNULL(REMARKS,'') AS REMARKS FROM ic_resi_user WHERE DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%')) From 3a7076d10ea9908be1cbba981e51645b85e62992 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 16:53:51 +0800 Subject: [PATCH 149/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcResiUserDao.java | 2 +- .../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ab73f7826a..23e59d3f13 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 @@ -133,7 +133,7 @@ public interface IcResiUserDao extends BaseDao { @Param("level")String level, @Param("id")String id, @Param("agencyId") String agencyId, - @Param("pageNo") Integer pageNo); + @Param("pageNo") Integer pageNo,@Param("customerId") String customerId); Set selectUserDemandCode(String icResiUserId); 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 bc6582d1e0..6a14cc8ad9 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 @@ -920,7 +920,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl result = pageInfo.getList(); if (CollectionUtils.isEmpty(result)) { return new PageData<>(new ArrayList<>(), pageInfo.getTotal()); From 24275d5f2fd61230f5ad58b45ae36e64ace3a107 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 24 May 2022 09:59:59 +0800 Subject: [PATCH 150/416] =?UTF-8?q?myreport=E8=BF=94=E5=9B=9Elist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/IcEventController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 62c48a83f4..31edd65710 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -336,11 +336,11 @@ public class IcEventController { * @return */ @PostMapping("myreport") - public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); - return new Result>().ok(icEventService.myReport(formDTO)); + return new Result>().ok(icEventService.myReport(formDTO).getList()); } /** From 00376eecd987aec0b4b09e46e420d9bedc014ff7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 10:34:11 +0800 Subject: [PATCH 151/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ProjectDao.xml | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index e01a45275c..19e082d341 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -578,14 +578,30 @@ t.* FROM (SELECT - DISTINCT pp.PROJECT_ID, - pp.INTERNAL_REMARK, - pp.PUBLIC_REPLY AS projectScheme - FROM project_process pp - WHERE DEL_FLAG = '0' - AND pp.STAFF_ID = #{userId} - AND pp.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) - ORDER BY pp.CREATED_TIME DESC) t + DISTINCT t.PROJECT_ID, + t.INTERNAL_REMARK, + t.projectScheme + FROM ( + (SELECT + DISTINCT pp.PROJECT_ID, + pp.INTERNAL_REMARK, + pp.PUBLIC_REPLY AS projectScheme + FROM project_process pp + WHERE DEL_FLAG = '0' + AND pp.STAFF_ID = #{userId} + AND pp.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) + ORDER BY pp.CREATED_TIME DESC) + UNION ALL + (SELECT + DISTINCT ps.PROJECT_ID , + pp.INTERNAL_REMARK, + pp.PUBLIC_REPLY AS projectScheme + FROM project_staff ps + INNER JOIN project_process pp ON pp.PROJECT_ID = ps.PROJECT_ID AND pp.DEL_FLAG = '0' + WHERE ps.DEL_FLAG = '0' + AND ps.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) + AND ps.STAFF_ID = #{userId} + ORDER BY pp.CREATED_TIME DESC) )t)t INNER JOIN project p ON p.ID = t.PROJECT_ID AND p.DEL_FLAG = '0' LEFT JOIN project_staff ps ON ps.PROJECT_ID = t.PROJECT_ID AND ps.DEL_FLAG = '0' WHERE 1=1 From 8460527dc10131eb927855ecdc62dcee94d53f0b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 10:51:02 +0800 Subject: [PATCH 152/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 19e082d341..493f8bbf72 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -606,7 +606,7 @@ LEFT JOIN project_staff ps ON ps.PROJECT_ID = t.PROJECT_ID AND ps.DEL_FLAG = '0' WHERE 1=1 - AND p.TITLE LIKE CONCAT('',#{title},'') + AND p.TITLE LIKE CONCAT('%',#{title},'%') AND DATE_FORMAT(p.CREATED_TIME,'%Y%m%d') >= #{startDate} From cb6fbb6f991a2dfbf06b3c53deba0ec1d67c56ac Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 24 May 2022 13:24:32 +0800 Subject: [PATCH 153/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=A1=B9=E7=9B=AE=E3=80=81=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demand/IcEventCommentToDemandFromDTO.java | 20 +++++++++ .../feign/EpmetHeartOpenFeignClient.java | 8 ++++ .../EpmetHeartOpenFeignClientFallback.java | 6 +++ .../controller/IcUserDemandRecController.java | 10 +++++ .../epmet/service/IcUserDemandRecService.java | 6 +++ .../impl/IcUserDemandRecServiceImpl.java | 41 +++++++++++++++++++ .../ProjectSatisfactionDetailService.java | 6 +++ .../service/impl/IcEventServiceImpl.java | 21 ++++++++++ .../ProjectSatisfactionDetailServiceImpl.java | 25 +++++++++++ 9 files changed, 143 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java new file mode 100644 index 0000000000..21161a301b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class IcEventCommentToDemandFromDTO implements Serializable { + private static final long serialVersionUID = 591380873862126679L; + + //客户Id + private String customerId; + //需求Id + private String demandRecId; + //评价满意度【 不满意:bad、基本满意:good、非常满意:perfect 】 + private String satisfaction; + //当前操作工作人员Id + private String staffId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index a444c32e5b..8c9c514a47 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -10,6 +10,7 @@ import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -126,4 +127,11 @@ public interface EpmetHeartOpenFeignClient { **/ @PostMapping("/heart/residemand/iceventtodemand") Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO); + + /** + * @description 事件评价时同步=评价结果到需求 + **/ + @PostMapping("/heart/userdemand/iceventcomment") + Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO); + } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 6ebee201a1..de7669bba9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -11,6 +11,7 @@ import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -122,4 +123,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result icEventToDemand(IcDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); } + + @Override + public Result icEventComment(IcEventCommentToDemandFromDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventComment", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 1d14501080..9c53742254 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -380,5 +380,15 @@ public class IcUserDemandRecController implements ResultDataResolver { return new Result().ok(result); } + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + @PostMapping("iceventcomment") + public Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO) { + icUserDemandRecService.icEventComment(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 58885f0d18..eb5f2f89fc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -254,4 +254,10 @@ public interface IcUserDemandRecService extends BaseService queryServiceList(ServiceListFormDTO formDTO); + + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + void icEventComment(IcEventCommentToDemandFromDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 003485d8d9..b552251007 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -65,6 +65,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -1769,6 +1770,46 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl(pageInfo.getList(), pageInfo.getTotal()); } + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + @Override + public void icEventComment(IcEventCommentToDemandFromDTO formDTO) { + //1.校验需求是否存在且是否已评价 + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity || NumConstant.ONE_STR.equals(entity.getEvaluateFlag())) { + log.warn(String.format("需求不存在或已完成评价,需求Id->%s", formDTO.getDemandRecId())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "需求不存在或评价"); + } + + //2.新增评价记录 + IcUserDemandSatisfactionEntity satisfactionEntity = new IcUserDemandSatisfactionEntity(); + satisfactionEntity.setCustomerId(formDTO.getCustomerId()); + satisfactionEntity.setDemandRecId(formDTO.getDemandRecId()); + satisfactionEntity.setUserType("staff"); + satisfactionEntity.setUserId(formDTO.getStaffId()); + satisfactionEntity.setEvaluateTime(new Date()); + satisfactionEntity.setScore(("perfect".equals(formDTO.getSatisfaction()) ? new BigDecimal(5) : ("good".equals(formDTO.getSatisfaction()) ? new BigDecimal(3) : ("bad".equals(formDTO.getSatisfaction()) ? BigDecimal.ONE : BigDecimal.ZERO)))); + demandSatisfactionDao.insert(satisfactionEntity); + + //3.新增操作日志记录 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType("staff"); + logEntity.setUserId(formDTO.getStaffId()); + logEntity.setActionCode(""); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + + //4.更新需求主表数据状态 + entity.setStatus("finished"); + entity.setFinishResult("resolved"); + entity.setEvaluateFlag(true); + baseDao.updateById(entity); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java index 2b138c7890..ba5b78ab6d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java @@ -136,4 +136,10 @@ public interface ProjectSatisfactionDetailService extends BaseService Date: Tue, 24 May 2022 13:53:48 +0800 Subject: [PATCH 154/416] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-oss/epmet-oss-client/pom.xml | 5 ++ .../com/epmet/controller/OssController.java | 13 ++++ .../java/com/epmet/service/OssService.java | 2 + .../epmet/service/impl/OssServiceImpl.java | 65 +++++++++++++++++++ 4 files changed, 85 insertions(+) diff --git a/epmet-module/epmet-oss/epmet-oss-client/pom.xml b/epmet-module/epmet-oss/epmet-oss-client/pom.xml index 7e307f1777..3b07913b6e 100644 --- a/epmet-module/epmet-oss/epmet-oss-client/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-client/pom.xml @@ -33,6 +33,11 @@ commons-fileupload 1.3.3 + + net.coobird + thumbnailator + 0.4.8 + 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 1b79042fbc..b265308eaf 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 @@ -148,6 +148,19 @@ public class OssController { return ossService.uploadImg(file, null); } + /** + * 压缩上传 + * + * @param file + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/24 13:32 + */ + @PostMapping("compressuploadimg") + public Result compressUploadImg(@RequestParam("file") MultipartFile file) { + return ossService.compressUploadImg(file, null); + } + @PostMapping("uploadwximg") public Result uploadWxImg(@RequestPart("media") MultipartFile media) { return ossService.uploadImg(media, null); 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 ae9625ee66..d9e210c006 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,6 +31,8 @@ public interface OssService extends BaseService { Result uploadImg(MultipartFile file, String privacy); + Result compressUploadImg(MultipartFile file, String privacy); + Result extUpload(MultipartFile file, String fileName, String privacy); Result uploadVariedFile(MultipartFile file); 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 6fab1be511..1e0c8800e6 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 @@ -29,6 +29,7 @@ import com.epmet.entity.OssEntity; import com.epmet.exception.ModuleErrorCode; import com.epmet.service.OssService; import lombok.extern.slf4j.Slf4j; +import net.coobird.thumbnailator.Thumbnails; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -37,8 +38,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.math.BigDecimal; import java.util.Map; @Slf4j @@ -94,6 +100,37 @@ public class OssServiceImpl extends BaseServiceImpl implement return new Result().ok(dto); } + @Override + public Result compressUploadImg(MultipartFile file, String privacy) { + if (file.isEmpty()) { + return new Result().error(ModuleErrorCode.UPLOAD_FILE_EMPTY); + } + //上传文件 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + String url = null; + String ossDomain = null; + try { + byte[] fileBytes = compressPicCycle(file.getBytes(),200L,0.7); + AbstractCloudStorageService storageService = OssFactory.build(); + url = storageService.uploadSuffix(fileBytes, extension, privacy); + ossDomain = storageService.getOssDomain(privacy); + } catch (IOException e) { + logger.error("图片上传异常", e); + throw new RenException("图片上传异常"); + + } + //保存文件信息 + OssEntity ossEntity = new OssEntity(); + ossEntity.setUrl(url); + + baseDao.insert(ossEntity); + //文件信息 + UploadImgResultDTO dto = new UploadImgResultDTO(); + dto.setUrl(url); + dto.setDomain(ossDomain); + return new Result().ok(dto); + } + @Override public Result extUpload(MultipartFile file, String fileName, String privacy) { try { @@ -262,5 +299,33 @@ public class OssServiceImpl extends BaseServiceImpl implement return ossDomain.concat(File.separator).concat(ossPrefix).concat(File.separator).concat(filePath); } + /** + * + * @param bytes 原图片字节数组 + * @param desFileSize 指定图片大小,单位 kb + * @param accuracy 精度,递归压缩的比率,建议小于0.9 + * @return + */ + private byte[] compressPicCycle(byte[] bytes, long desFileSize, double accuracy) throws IOException{ + // 获取目标图片 + long fileSize = bytes.length; + System.out.println("=====fileSize======== "+fileSize); + // 判断图片大小是否小于指定图片大小 + if(fileSize <= desFileSize * 1024){ + return bytes; + } + //计算宽高 + BufferedImage bim = ImageIO.read(new ByteArrayInputStream(bytes)); + int imgWidth = bim.getWidth(); + System.out.println(imgWidth+"====imgWidth====="); + int imgHeight = bim.getHeight(); + int desWidth = new BigDecimal(imgWidth).multiply( new BigDecimal(accuracy)).intValue(); + System.out.println(desWidth+"====desWidth====="); + int desHeight = new BigDecimal(imgHeight).multiply( new BigDecimal(accuracy)).intValue(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); //字节输出流(写入到内存) + Thumbnails.of(new ByteArrayInputStream(bytes)).size(desWidth, desHeight).outputQuality(accuracy).toOutputStream(baos); + //如果不满足要求,递归直至满足要求 + return compressPicCycle(baos.toByteArray(), desFileSize, accuracy); + } } From f65fb81749592dc294d273c5f5941a90ca86082f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 24 May 2022 13:55:38 +0800 Subject: [PATCH 155/416] =?UTF-8?q?bug=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.18__alter_dict.sql | 1 + .../src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql new file mode 100644 index 0000000000..4e778ee121 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql @@ -0,0 +1 @@ +UPDATE `epmet_admin`.`sys_dict_type` SET `id`='1000000000000000013', `dict_type`='ic_event_source_type', `dict_name`='事件管理', `remark`='', `sort`='13', `DEL_FLAG`='0', `REVISION`='0', `CREATED_BY`='', `CREATED_TIME`='2022-05-17 18:23:27', `UPDATED_BY`='', `UPDATED_TIME`='2022-05-17 18:23:27' WHERE (`id`='1000000000000000013'); diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index db08fd78d5..7ce5e3fc5d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -43,7 +43,7 @@ public class IcEventAddEditFormDTO implements Serializable { * 身份证号 */ // @NotBlank(message = "身份证号不能为空", groups = {AddGroup.class}) - @Length(min = 15, max = 18, message = "身份证号位数不正确", groups = AddGroup.class) + @Length(max = 18, message = "身份证号位数不正确", groups = AddGroup.class) private String idCard; /** * 反映渠道 From 309d440131730c991cb6c93bd2e4964f4f5473fb Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 24 May 2022 14:27:30 +0800 Subject: [PATCH 156/416] =?UTF-8?q?=E6=8F=90=E9=AB=98=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E6=AF=94=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/OssServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1e0c8800e6..40d5d7b492 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 @@ -110,7 +110,7 @@ public class OssServiceImpl extends BaseServiceImpl implement String url = null; String ossDomain = null; try { - byte[] fileBytes = compressPicCycle(file.getBytes(),200L,0.7); + byte[] fileBytes = compressPicCycle(file.getBytes(),200L,0.3); AbstractCloudStorageService storageService = OssFactory.build(); url = storageService.uploadSuffix(fileBytes, extension, privacy); ossDomain = storageService.getOssDomain(privacy); From 13402c0500eec34d4379287ff073bb3a7c0c2a64 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 24 May 2022 15:10:34 +0800 Subject: [PATCH 157/416] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/ChangeWelfareDao.java | 13 +++++ .../impl/ChangeWelfareServiceImpl.java | 8 ++-- .../main/resources/mapper/ChangeDeathDao.xml | 37 ++++++++------- .../resources/mapper/ChangeRelocationDao.xml | 38 +++++++++++++-- .../resources/mapper/ChangeWelfareDao.xml | 47 +++++++++++++++++++ 5 files changed, 116 insertions(+), 27 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeWelfareDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeWelfareDao.java index ba7aadeea2..c7f64d3231 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeWelfareDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeWelfareDao.java @@ -6,6 +6,9 @@ import com.epmet.entity.ChangeWelfareEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; +import java.util.Map; + /** * 福利表 * @@ -15,6 +18,16 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface ChangeWelfareDao extends BaseDao { + /** + * 福利名单列表 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/5/12 17:44 + */ + List getWelfareList(Map params); + /** * @describe: 通过身份证号查询福利人员 * @author wangtong diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java index ff7e8b3ad6..87cf889ab7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java @@ -49,11 +49,9 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl page(Map params) { params.put("customerId", loginUserUtil.getLoginUserCustomerId()); - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ChangeWelfareDTO.class); + IPage page = getPage(params); + List list = baseDao.getWelfareList(params); + return new PageData<>(list, page.getTotal()); } @Override diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml index 79711680bc..8e14dc15c9 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml @@ -26,31 +26,34 @@ SELECT - r.* + r.id, + u.`NAME`, + r.ID_CARD, + u.GENDER, + r.age, + u.MOBILE, + r.PID, + r.AGENCY_ID, + r.AGENCY_NAME, + r.VILLAGE_ID, + r.VILLAGE_NAME, + r.BUILD_ID, + r.BUILD_NAME, + r.UNIT_ID, + r.UNIT_NAME, + r.HOME_ID, + r.HOME_NAME, + r.ADDRESS, + r.TYPE, + r.OWNER_NAME, + r.OLD_DEPT, + r.OLD_ADDRESS, + r.OLD_HOME, + r.REASON, + r.CREATED_TIME, + r.UPDATED_TIME, + r.OUT_OF_TIME, + r.IC_USER_ID FROM - pli_change_relocation r - LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD - AND w.DEL_FLAG = '0' + pli_change_relocation r + LEFT JOIN ic_resi_user u ON u.ID_CARD = r.ID_CARD + LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD + AND w.DEL_FLAG = '0' WHERE - r.DEL_FLAG = '0' + r.DEL_FLAG = '0' AND r.CUSTOMER_ID = #{customerId} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml index 423c38d57e..e10a64a0ce 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml @@ -24,11 +24,58 @@ + + + + update pli_change_welfare set REMOVE_DATE=#{removeDate}, From 61095855a6cab77f370d338657ec8c611d855ead Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 15:55:13 +0800 Subject: [PATCH 158/416] daochu --- .../epmet/controller/ProjectController.java | 17 +++++++ .../epmet/excel/ProjectListExportExcel.java | 42 ++++++++++++++++++ .../com/epmet/service/ProjectService.java | 11 +++++ .../service/impl/ProjectServiceImpl.java | 23 +++++++++- .../resources/excel/project_list_export.xlsx | Bin 0 -> 11369 bytes 5 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 4e09cbf193..03bb218bd1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -351,6 +352,22 @@ public class ProjectController { return new Result().ok(projectService.projectList(formDTO)); } + /** + * Desc: 项目管理导出 + * @param response + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/24 15:22 + */ + @PostMapping("project-list-export") + public void projectListExport(HttpServletResponse response,@LoginUser TokenDto tokenDto,@RequestBody ProjectManageListFormDTO formDTO) throws IOException { + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setIsPage(false); + projectService.projectListExport(response,formDTO); + } + /** * Desc: 满意度评价列表 * @param formDTO diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java new file mode 100644 index 0000000000..0afc9cd28b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java @@ -0,0 +1,42 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import cn.afterturn.easypoi.excel.annotation.ExcelCollection; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/24 15:24 + * @DESC + */ +@Data +public class ProjectListExportExcel extends ExcelVerifyInfo implements Serializable { + + @Excel(name = "所属网格",needMerge = true) + private String gridName = ""; + + @Excel(name = "项目标题",needMerge = true) + private String title = ""; + + @Excel(name = "转项目时间",needMerge = true) + private String shiftProjectTime; + + @Excel(name = "项目方案",needMerge = true) + private String projectScheme = ""; + + @Excel(name = "内部备注",needMerge = true) + private String internalRemark = ""; + + @Excel(name = "滞留工作日",needMerge = true) + private String detentionDays = ""; + +// @ExcelCollection(name = "当前处理部门") +// private List departmentNameList; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 7e86778fd0..82a88d3a5b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -9,6 +9,8 @@ import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -384,4 +386,13 @@ public interface ProjectService extends BaseService { */ PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + /** + * Desc: 项目管理导出 + * @param response + * @param formDTO + * @author zxc + * @date 2022/5/24 15:22 + */ + void projectListExport(HttpServletResponse response,ProjectManageListFormDTO formDTO) throws IOException; + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index ab30428219..74ea937511 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -48,6 +49,7 @@ import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.*; +import com.epmet.excel.ProjectListExportExcel; import com.epmet.feign.*; import com.epmet.redis.ProjectRedis; import com.epmet.resi.group.constant.TopicConstant; @@ -80,6 +82,8 @@ import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -3208,7 +3212,7 @@ public class ProjectServiceImpl extends BaseServiceImpl result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); - PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); List projectManageList = pageInfo.getList(); if (CollectionUtils.isNotEmpty(projectManageList)){ // 获取滞留天数 @@ -3312,6 +3316,23 @@ public class ProjectServiceImpl extends BaseServiceImpl list = this.projectList(formDTO).getList(); + List projectListExportExcels = ConvertUtils.sourceToTarget(list, ProjectListExportExcel.class); + TemplateExportParams templatePath = new TemplateExportParams("excel/project_list_export.xlsx"); + Map map = new HashMap<>(); + map.put("maplist",projectListExportExcels); + ExcelPoiUtils.exportExcel(templatePath ,map,"项目管理导出表",response); + } + + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 * @param categories diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx b/epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..28448471086e9b942f5846fbc1b2e967c6b3acf5 GIT binary patch literal 11369 zcmeHtWmKHY)+X-m5?q42y9aj&E)9*lJHaKm1&82H2$tY30fGe&65J)Yg=v!So}6&c zoHg@v)|&c3_iDDh^*mL3*IRol%RxdRfIW^d#Z{5V&;JZ~&=*sC6J;lR2WMtwkQf%| z2e_YN*NC1E{NP|<_7GrTXnz+oc5q~)8MF++jn?bnJH95K`IP>^Cr_89_i{wNb)Nl8t@oS&4{87s>1%8p=Qi^1YGlgQxtbnmwuD&| zAv!7op@j}WOO8xFU&A0OR$`P`s0w%+@ZJu4L{FbdVq z4B0p8%sp(d=o=s1iO&QNwp0^8$_}&0mr==2?$y?D{{)(-eIi&B1hfeVX!O4WZDQ{P zd_>weVO+MG1uOIjdim{oo5H-ExcEZArz$Kc`bc*&-i1g7orGaK)U~V`gKJq3&hvKl z;^-a-SM!-T+Nq!cK?5u3c zmZFvkhw^fQI>ruoTk&KN! zT00dwYIV7%lR6rx$4?p-Sut6098~8X@P)~4M2-qDx1n!#Q%^8o=|R@oYUJL@*TkH0 zTj_I#vt)C4=cYquIvenM`id!qX(t({(zS4jV(JodEg4X|GC>~b7(8oJf#Gn|6@X~( zTIVn67MXQ0Z0DVxX_xKSrDVXoKL%W>%mZqu$di>OV!-gw7-3M$g_}glh<>7;`*PHg z@p%Nw<2|5Dk&Mn~cH=I;74ukeOAeVQM$NuR|`w7+ch}3B3z1~3_QdPn*1`p(%FGLG_BBQh~Sb9`#%;B zKh+vLhUNCD=B%%#!st<^D=XeiEmQi zEqTv}O~5c1_{Fd2p&pIPJ+OFTKp0s!=h!|7D+z|J+VNJf$qz|4>|_y$&XW?f{6jqU z+`#0hFq~*~j@aXbxFI&OBjOnn%Ej8E-54)YPP62SDM~0wu10bKDCRK&NWDKx)T=dGed*RPpdLPVeqm z*)|K<=x;QpdJMRf9{yz+p!{Ob-QLOC*#Zc3dCGJuseN_}h-DiXFfhFTlKrXjlkI2? zefta+EZ>~E2czp&pMq-~<$9S(h4})j#c6X`rp~g?VJ?|w!*=VhW6Er$o}`;MS6{tj zV-;M^^$^~}7JjS%5O{%8DHpP>O)(X<``IyVCRucsMZs%}${UJImam@{Z<9_XGJzq9 zhRXKWu@o8Hv?(Ieq+OUIV}D*(O&(q;pTBO>?0D~{LVKrzCV!uB63G`@cmo$U?3~@D zQ=|Z&>_~|K#je%PRiQBP^3x1HVS zGCaFsm;@ikuaPavPQQVOu(q)qg63wnZRUv3fj>&lk-&d}zrTbI?I~Z~y|EY$Xpy|z zbQpVX0+_u3hbn+!`)Vz_Pi$A{^S+}R4}rlQ@m&-Hrw=MU8brhkiy&d97a1K#Y?R{* zSE;s>hc~U{`0EwuW>mctqw?sJDk}>8`PZg6P0t0z{06#lSDL$wfb90N5jIgP*gipm zaG5rULeXUA^2H5v>Im{tN~%uQ09o0KsE5g+YrKp*Lx8OT6d%Di%lv2tLwY2}!Xusq z>Y3qpl&arF##F+mIcxn;->@gq*LPYI_Ab$M?s7_9%Aj3)%biAkz$fn#0&q%1-GrZ` zInKTKih{l-1YnntzX@+91I&~8sJ~6@(gDzfME9M2mx$DEY{A~^BXcn4tJ(DJu?p8Z zL*FAK_bI+Qz#rfr$oV{X+?uK=|^YrHZ-okX)` za|tkAB(S7Mp06Up@nD7EqdlfJWd}V2+T1)T+^5J!i!OAz4 zXVv`|no*XF$tqEV);4b}CY>;-ud2M(i#!Ci8`|$ntXU#e!=Jncx>(wSw#Ijj-1l z=GHx!!6oC#Y)Wjj9aFOwGs)k#x;IyAvEq}glSE+)eFA9g%VJ3)Aw%`|!KGO`dsQza ze())nECy+?ilW9)Fv66F$G(-zN6k%V9ZWw{OJP(kuS>-I#@7-SU|VjjWzyQXVi5?% z5~=0CUmweU@X-^u8h*E<{5enCDj)Ek_; zghVwIbr(E|VNC2*+0cmx^cuJx>xU>d(;(H|X{0bz7r?1~av?p-WbDO>7>h9*y@e9k zV)*!}cF2cSSdLal!i)dRYguq?39(ur*!w>0WyTa>tVLsuEqTHuH&C8~LnM z-|7vz`$tk*{wD0f8j*lJ%W=7YB`=zJ80l9A6NYPCk{J-!h(t~==~eTr`Ul7u0fv-^ z8Q<21kC8t%Ih`AewVDh=8(a2Q>zCaSD?;KVaO_^WzX*zDy3LNGK}HAC9$q;!+?6+z z_&Goy4B$PVg}hbY&y69GOFK}fBY$N~$y9?>d~DO@5lHE?p+dF34RuFd_gRTRU+uVLUE+^eE&B1{hQNspy~ zI`m6aHXP5OX@7e**(|zTb+zH$)lDz^(fRA*;@IpQp_`4fleNhg!dq<&-H=IAMc>Mg z+OKXGlv>-feJ^(hU)r^>oU}ij&Dpp6?Z9*i>9BcSpHB*B3;SM=Z2A8iuOC#0uUWE0^?Ze^FEW}bK#ctPu3BSiBk90VqhwVkj zDqqyKJVyU8_i7IWF{{)izB|lHX!=n2u|qMdX~?aAd9CN8CyHi|7v`Zb&A1?koW02`_8#MIt62L>iwFPev5brF3o{#qSV6Mo z-9~<^(_2TTYbV}fG(?|xd&9(XI-ogn9l(MoilZsNG&`Loi`8By^_wzZsqeLYHG9= zyIC%Gn{JS@)FRsbIUNT?Le%(QVw9ijN>F%QV@qe-U%jT0>kHW@L*D|Q$xAF36{FlF zrjqG@ImA3EqE< z1;ZTDgkV%RroFuR9ZDdEb)6O6D>C%s$l{b2?3Blv@3Gzk?<+Zq#N0+^0-Hj=J4)2z zVH5RYoj$87Y$?cZPiAFl!?q56MLmA0>YfjIgDe|5%rV*4Jxy!Qk23(y+CqQ1mi0d9N9fK`WKMRjgzyQ^R%$XLDd23$5?S7Nhg>5< z5(u{CF~$(mSwU=)->y zGJ1gQG`d9_PPxj%ElR1?;tBv?R3@cW&Siwq$+LmL+KE>;vd4>K9BHYS4j{Lk#DSi! zKYow;y3w_pz(wI^R3h@u@}VocnIhJGB0d2#B9DTUns({*ySLxvSLc>|t}5aS{hbt| z;FzO&Q(!BdT*J&sb4=q*f?>OH6(^83ilN&2W1D&7It71HwcU?nSVCi$_4%1gTmA%* zVBCiFdm6qEs-?kMzRmU_dp`mWI=Kafw{_7oVZ4)%N#9l4g%g}FM(R{f)B6sctdAhu zk8$6s(74_O;MSXF86*sF3-5JF>ZgR)H7rA`*~tq3*yxBgxL&?|zP|F_W#{=DCXJc$ zsf-EwK>KB#p@(c~Z3_P?gI+N|FSP{v2;U0UU7x;n9r7Ou>=eszwiDs-a7=QTLWVJ{ z8Iv+p;zA9P2(hDV2UR`ei(j{|4G2s%LTK{oGYG#`7wD!S-l?(9YA#c6bx&Sq3x15P za=oY|g{q2Q;2_d3kL$xE$MR`Dx(UGAKWH$W{Bj~}@EzHD`AFAUW(iv3i-?pLlmIM& zRm+M`qT^P0)*gR0Np2teeK@D_;u3>Hne@8cPA3LVVVF3o$y8^JHi}nf1GN|+ZC;`x zoYy>E<0=eE3o8x|3>cdMzN*Sjl z>|K0vf0MV_Bas;qKd_;wpcJ&RWE@J-#OBsNFjb~-B4evM0G-!5BFXuW<$2;)*9c$0 zDi?Yvw^I1iueag5A3;yY=dET68wQQJXED78RFA|QD%ZR~q1!IsOE<=g)~VE1L(+JO zWIAN$Q@iGRAWlek$49$|_k5F+M_gFm0OOu>%-%vFzluPiFj8N)?ML8O4$XaPrn*Rx zM5$WvP8+&&vs%mT^gzp6pZjyH&E$6Jg5%Gw#Eu zTTTLl!IlSABre8`vXO5BlIY}V2kS?WXAULfnjy{YN$#WXAd?2~X};e&jJZ|_F4yYu zR8TS|w3kpZ06M)ik( z?ahU8k?w{%g~wZqOQ#l)qmD2(5R4FspVOtg8BR6_K&IlH8V_=$V#*cudir7or7ZKB zH>6!Sn_&hNvoEY)6QB~YV7S`Mw8n%+aeKM&OdxODh6$SCg6*e>l#g1tL+}L`SDldI zdkqY3hHmhA8!TTKUC*PC7YC&@@jF<-recJ(+SJ4~VAdcEt7(5saCKNAz6Xpg*F$0+ zz3DB-aTOJHu;C0&P1cA+1z=0q?^S}OMLlO?49Ua@l7 zu^x3j#wIE62@^xxJIf$e1czZ(DV8#`B5;xibg}qED@F3`bcICu)^CN(T<|N;Bc}*KrET@aZW9d~RhcPmRD1!*XElFCyoK zoot2T`Ygtiw$N3nF>*UKk%EduID}Llv)|&8NI;$3ZKaU*y&y)u+2d7S={IOONO@mB z6olhaS71bWT@b%ofF7E98ZG+eHpcKMen(`qz-^241^|_MOUqJ>T85;DvGEna$;#3^ zMZQ9g|2sQR%7rH(0SB{K)6DqUyO$tvHfo)?)(0en!0AhEliuhW znx8q2sui8ZrxP%(DKkp*f4Vzad&UyHr`yt4Af=O8o!MY%=qPy+*aolz&q$3XzT-mu zBnaQyzL*deOA<@c*4^XozVhMN4&NAapDx`-x%!8+PGab?FaMAJtnvQ-?iZ+^+wOes z`m3pE-oV)y@lh0nHo_{%s?-*Uq)@1$k*TV!&<1wk1Yp+*61b#Zc#KXKV6PQlhPf+Y zMALK@F|Objh~#Gjxl1VA@*^3N^S;@(Cwj5B7ON^B3`&#P-#yoLUmc5nxOcd^YK$;Y zS1D#Z{=6wu5AmTyEa}7KrjGdf-KkOz%ER&P__DCPOP;6HJlqjf_Lnpn+;Dq&+%H6` zv;<24;YPey{5ai{inwCbBBb>}=FeJu=)(Pr_;Uptf}RsIlxDs_Dr8O{Wi9E@L<~qh z*~!Vt5z0;X-0h6P5yb?DDBTg*Ga{fxb8x$LA0-yf>TX=a|p&CMDeKvJ4 zo}(CgDMYZ;%6_xTKc7;JVWWxe5#cm@(pU$tMEFi~%=E1HWbRFlG%b>VqmjPOn8n?3 zdF`6}i$)T$2@>BQ++}fF@(LCv)Zi9dka}8LgGbczT?7jXw{T0+DWS0~K7w=Mri0w& z_G+&^58)sa(l$%&S{RadL&M%f42NDG3V1uAI&IFGlTh!Td5#;gx zF~`65@Kvz+!R71+Jaz}W?5qsDY8~__g$D-xJI+ZU0R5+*r?1gC-lP-)4V+%%9plObb3 zsaNyhOtk5%U9!tv)IKf zNwkjxp_Y0Sti4I4W)8I>xtm1WZ3cHvMo*gA(ekgVW-@jCf+g$L&#pAiP%va3E{xBt z;FwW54K2}l7_Vpeb&*ZH`_*UCrz$totLExC^Bd}0H76Hz7Z!?CG|CT_MPfyT)7>|e z$BX@Vs*hYCgwMRkyi-y%fVeL;#qZtW_7!=&(794Zl!+ z*n|p24?l@ig|I zKjWze7CC(!CWGxToN~3~4K_|Y@#(^*^$IjrE~43)z=c|vAcIORXEv)H;_FVL82OIE zQ_>_iz(L80%(B+!csBnm_@(3C!dNHA*<1gf1ULWVV~ob#!Abq}`_NI7XFimj-UP98 zw!(Hf#oFrpa*AFm#l-FB6AVABQ0xx#M-P>*@L(4?V!HN99MN4BVc&2T#zSF3B!AM2 zuVCA6R<}iBqY^z(7?#$7XA|knT1`P=>`FPl2#1E|V;m>x%=-4D7)}{Q!eQU8d@uZd zu!#%2OLWm6`OOB$z6rQ|2-3omvYLANgG$p4cH-#{i$L7M8-XX_3$EohJ&8zV(NU#KM(=Y~(CV zTlJR*bTXM0Z_(`lx-5023|w84;bA@XaCt7Auk2kC3U}BngV}tHw7&WC*l5tg$7;GE z;|a%+T6~jfE7#cbsHsW{y@yX@qJ zU5c3ityCg^0ojK|`t8MQfvAd?MRoUxCE^FPT^j;&-HYp}Lg_``HEfvJts$gENp>Z= zUP)ehv{nwfijdvVe78YGeiAP#aV_5SIH?KenXBmQ#Z%JOeI-MricB5F#RrmA#uJf; z+=*mlqNex>w_g2A2@6!20yA_1+B_{?dGolnJb?bU3?c;aFBzss$;yOLP;C;e?{Qmf zwkfz{qtCf8lkY2-`o2n)e;A|2Owc}PYZX;t_|gO$n|8gKvFu~oOt?sDz*-d366mTD zC}Kb0)~0goA>yHsBev9f|d?-E_OcQcG5Pe{wPy?xo<=M}-UeDP6s`gQgA zELWR2?5H50{MmN2b4eH&-ccu4p`jyp*|3UAGe%@dy^vJ3$gdlE?T!p-{d$TdkyN=O z*CLaXTV0*;Gd3z6(Z2dj!DV{={hSE;o8Oz-t7w*4ahW-9P6NjuoOI`9Z?c*~O(k0AqF_9WH7Z z=Ba}n8m4LBoQJnZb=%K*pv~4b=*w{KK`n=r!HM7I%cB-OfZ1OtnUEsSCC9Q8Z9GAh zy57g~CiQHe*{uD4kL>@H$^TYp{U?x1GS9*4LEut>0tv-0kpD~LchU7H+99!>2wf~_ z5}-y1vKPL6weZ4aD`(y1CRd`IFu8iykOY3X zV{U=yr_0b~)lYW}B~7Y^8@o?>Zd#8N^Zh_G&H`=a$94~0aeF%#pq-1Mx+mzRSN}15 z)+a02fo2(Und}udun>t?qOO4*An6Y(eeHnjd6S|?*m}YsG#>ScP@zGqZd0oOMsJr| zRNAQKo8t)2d8Q?c7)2{Zj#2f6CroY;6Sa4V6moqArtPkD3%r>epqoNu`^lNp( z$d!l}sN$Ngkf%8s5~BwcJK2q(6xLH0=;2=)8F;i96N(*DeW7oMoOZQ;ra*&4DUQ9Z zp2d?Ksd%|I6ury2_raKkb0}t&RWBKbNrN>0XFN{Y2I^<< z{x^j`Q3@pgTeN@rpik4nqoZFamHu7rzmmjLJ5NuuzwPi5|8)OfXWOS1p5D;@won2J zDxh@r`@Z(y=KgDuJ}N(g75xjWzq+9QTp~~Vpnkio|3mM0SJc0G{u6aq&@J;{1;?jz zeOj6P?Kt!AYQO80PYpaht^PJJNb=L~-wFG-hkk4z`ZXTmat3W?&_n+%XZ@S*V@~`v z9(BKh65gM>|H+Vlg8no|K3e#-;!r66*}{{I`4o$%Jx;$3=KR-mew%t~ Date: Tue, 24 May 2022 15:57:20 +0800 Subject: [PATCH 159/416] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcEventController.java | 8 +++++--- .../src/main/resources/mapper/IcEventDao.xml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 31edd65710..21117b94b0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -8,9 +8,11 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; +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.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -393,9 +395,9 @@ public class IcEventController { * @Description 数字平台-事件导出 **/ @PostMapping("export") - public void export(@RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { - formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); - formDTO.setStaffId("d8dfc6c1fa2538976059f3900036d419"); + public void export(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 1e5f89095c..6ae905f668 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -181,7 +181,7 @@ AND ie.grid_id = #{gridId} - AND ie.agency_id = #{agencyId} + AND ie.grid_pids LIKE CONCAT('%', #{agencyId}, '%') AND ie.source_type = #{sourceType} From e1d704cf00d64115c15de9dccc8c73b32e2aca5d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 16:07:05 +0800 Subject: [PATCH 160/416] daochu --- .../main/java/com/epmet/excel/ProjectListExportExcel.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java index 0afc9cd28b..5edd25b643 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java @@ -3,11 +3,9 @@ package com.epmet.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.ExcelCollection; import com.epmet.commons.tools.utils.ExcelVerifyInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; -import java.util.Date; import java.util.List; /** @@ -36,7 +34,7 @@ public class ProjectListExportExcel extends ExcelVerifyInfo implements Serializa @Excel(name = "滞留工作日",needMerge = true) private String detentionDays = ""; -// @ExcelCollection(name = "当前处理部门") -// private List departmentNameList; + @ExcelCollection(name = "当前处理部门") + private List departmentNameList; } From ef00aefd5debaf624fc1e2e94304e3b18ffd3f1c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 24 May 2022 17:36:23 +0800 Subject: [PATCH 161/416] null --- .../java/com/epmet/service/impl/ResiEventServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 8228fb19df..eb336fe63e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -502,9 +502,11 @@ public class ResiEventServiceImpl extends BaseServiceImpl imgList=new ArrayList<>(); - for(FileCommonDTO fileCommonDTO:attachmentList){ - if("image".equals(fileCommonDTO.getType())){ - imgList.add(fileCommonDTO.getUrl()); + if(!CollectionUtils.isEmpty(attachmentList)){ + for(FileCommonDTO fileCommonDTO:attachmentList){ + if("image".equals(fileCommonDTO.getType())){ + imgList.add(fileCommonDTO.getUrl()); + } } } //事件图片 From bdad70428ef6caa7ce7a1e0f649587cd0f4018bf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 25 May 2022 09:27:18 +0800 Subject: [PATCH 162/416] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E4=BA=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProjectServiceImpl.java | 2 +- .../dto/result/StaffAndResiResultDTO.java | 40 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 +++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++ .../controller/UserResiInfoController.java | 13 ++++++ .../java/com/epmet/dao/UserResiInfoDao.java | 9 +++++ .../epmet/service/UserResiInfoService.java | 10 +++++ .../service/impl/UserResiInfoServiceImpl.java | 20 ++++++++-- .../main/resources/mapper/UserResiInfoDao.xml | 34 ++++++++++++++++ 9 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 74ea937511..a9f4ca0093 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -3304,7 +3304,7 @@ public class ProjectServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); List result = pageInfo.getList(); if (CollectionUtils.isNotEmpty(result)){ - Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); + Result> listResult = epmetUserOpenFeignClient.getStaffAndResi(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); if (!listResult.success()){ throw new EpmetException("查询user信息失败..."); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java new file mode 100644 index 0000000000..2ae73db285 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/25 09:06 + * @DESC + */ +@Data +public class StaffAndResiResultDTO implements Serializable { + + private static final long serialVersionUID = 5546194837482246174L; + + /** + * staff工作人员,resi居民 + */ + private String type; + + private String userId; + + /** + * 手机号(注册手机号) + */ + private String mobile; + + /** + * 姓名 + */ + private String realName; + + /** + * 性别(1男2女0未知) + */ + private String gender; + + private String address; +} 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 2e5ec4bcd5..c6ca38a94c 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 @@ -782,4 +782,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/userresiinfo/isResiFlag") Result getIsResiFlag(@RequestParam("userId") String userId); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + @PostMapping("/epmetuser/userresiinfo/getStaffAndResi") + Result> getStaffAndResi(@RequestBody List userIds); } 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 49dd6a0a66..bafe8aa8d7 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 @@ -574,4 +574,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result getIsResiFlag(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIsResiFlag", userId); } + + @Override + public Result> getStaffAndResi(List userIds) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffAndResi", userIds); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index 3ac5a09d81..5f8a5ca171 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.excel.UserResiInfoExcel; import com.epmet.service.UserResiInfoService; @@ -230,4 +231,16 @@ public class UserResiInfoController { public Result getIsResiFlag(@RequestParam("userId") String userId){ return new Result().ok(userResiInfoService.getIsResiFlag(userId)); } + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + @PostMapping("getStaffAndResi") + public Result> getStaffAndResi(@RequestBody List userIds){ + return new Result>().ok(userResiInfoService.getStaffAndResi(userIds)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 1fddb41280..925e62f61a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.IssueInitiatorFormDTO; import com.epmet.dto.form.UserResiInfoFormDTO; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.entity.UserResiInfoEntity; import org.apache.ibatis.annotations.Mapper; @@ -109,4 +110,12 @@ public interface UserResiInfoDao extends BaseDao { List selectCommonIdNumUser(@Param("customerId") String customerId, @Param("idNum")String idNum); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + List getStaffAndResi(@Param("userIds") List userIds); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java index d28605f95d..9e3a9f86fe 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.entity.UserResiInfoEntity; @@ -203,4 +204,13 @@ public interface UserResiInfoService extends BaseService { * @date 2022/5/23 13:52 */ Boolean getIsResiFlag(String userId); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + List getStaffAndResi(List userIds); + } 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 3e2d368486..a0012e8a45 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 @@ -42,10 +42,7 @@ import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserResiRegisterVisitDTO; import com.epmet.dto.UserRoleDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IssueInitiatorResultDTO; -import com.epmet.dto.result.SendVerificationCodeResultDTO; -import com.epmet.dto.result.UserBaseInfoResultDTO; -import com.epmet.dto.result.UserResiInfoResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserResiInfoEntity; import com.epmet.entity.UserResiRegisterVisitEntity; @@ -57,6 +54,7 @@ import com.epmet.resi.group.dto.topic.form.SharableTopicAndInviteeFormDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.*; import com.epmet.util.ModuleConstant; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -514,6 +512,20 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl getStaffAndResi(List userIds) { + if (CollectionUtils.isEmpty(userIds)){ + return new ArrayList<>(); + } + return baseDao.getStaffAndResi(userIds); + } + /** * 自动认证居民:志愿者注册,自动认证居民 diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index df1d830567..d308058d06 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -231,4 +231,38 @@ and uri.customer_id=#{customerId} AND uri.id_num = #{idNum} + + + From 522e4bc0fe2b41d7475d9502184b441b0e76ff2a Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 25 May 2022 10:26:35 +0800 Subject: [PATCH 163/416] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/IcHouseListFormDTO.java | 9 +++++++++ .../resources/db/migration/V0.0.20__alter_ic_house.sql | 1 + .../src/main/resources/mapper/IcHouseDao.xml | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.20__alter_ic_house.sql diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java index b57f0bdadc..cec2d19994 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java @@ -70,4 +70,13 @@ public class IcHouseListFormDTO extends PageFormDTO { */ private String sortType; + /** + * 房屋用途 + */ + private String purpose; + + /** + * 备注 + */ + private String remark; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.20__alter_ic_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.20__alter_ic_house.sql new file mode 100644 index 0000000000..5c2deb613e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.20__alter_ic_house.sql @@ -0,0 +1 @@ +ALTER TABLE epmet_gov_org.ic_house ADD REMARK varchar(255) NULL COMMENT '备注'; 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 53d4ff2277..5fe411e6ee 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 @@ -164,6 +164,12 @@ AND a.rent_flag = #{rentFlag} + + AND a.PURPOSE = #{purpose} + + + AND a.REMARK like CONCAT('%',#{remark},'%') + and a.del_flag = '0' #排序规则:根据小区、楼栋、单元、门牌号(分别按照数字和中文)分别升序排序 From e0a62150198546ed0495cdd660dad44e12427289 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 25 May 2022 10:29:05 +0800 Subject: [PATCH 164/416] =?UTF-8?q?type=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 81736f9aa3..28166485f0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1348,7 +1348,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 12:23:13 +0800 Subject: [PATCH 165/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?biz=E5=8F=82=E6=95=B0=EF=BC=8C=E5=89=8D=E7=AB=AF=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8D=E5=90=8C=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessAnalysisEventListFormDTO.java | 7 +++++++ .../epmet/controller/IcEventController.java | 19 ++++++++++--------- .../main/java/com/epmet/dao/IcEventDao.java | 3 ++- .../com/epmet/service/IcEventService.java | 2 +- .../service/impl/IcEventServiceImpl.java | 4 ++-- .../src/main/resources/mapper/IcEventDao.xml | 10 +++++++++- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java index 45e3cf5d21..5a4b1800ef 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java @@ -44,4 +44,11 @@ public class ProcessAnalysisEventListFormDTO { private String categoryCode; private Integer pageNo; private Integer pageSize; + + /** + * 业务: + * 1.eventProcessAnalysis 事件处理分析 + * 2.eventCategoryAnalysis 事件分类分析 + */ + private String biz; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 21117b94b0..d86e13474e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -126,15 +126,16 @@ public class IcEventController { @PostMapping("processAnalysis/eventList") public Result> listProcessAnalysisEvents(@RequestBody ProcessAnalysisEventListFormDTO input) { ValidatorUtils.validateEntity(input); - String orgId = input.getOrgId(); - String orgType = input.getOrgType(); - String categoryCode = input.getCategoryCode(); - Date queryStartTime = input.getQueryStartTime(); - Date queryEndTime = input.getQueryEndTime(); - Integer pageNo = input.getPageNo(); - Integer pageSize = input.getPageSize(); - String processStatus = input.getProcessStatus(); - PageData page = icEventService.listProcessAnalysisEvents(orgId, orgType, categoryCode, processStatus, queryStartTime, queryEndTime, pageNo, pageSize); + PageData page = icEventService.listProcessAnalysisEvents( + input.getOrgId(), + input.getOrgType(), + input.getCategoryCode(), + input.getProcessStatus(), + input.getQueryStartTime(), + input.getQueryEndTime(), + input.getPageNo(), + input.getPageSize(), + input.getBiz()); return new Result>().ok(page); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 52196ff764..386225e922 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -57,7 +57,8 @@ public interface IcEventDao extends BaseDao { @Param("categoryCode") String categoryCode, @Param("processStatus") String processStatus, @Param("queryStartTime") Date queryStartTime, - @Param("queryEndTime") Date queryEndTime); + @Param("queryEndTime") Date queryEndTime, + @Param("biz") String biz); /** * 月度事件数统计查询 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index cd926cf332..acffa5765c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -84,7 +84,7 @@ public interface IcEventService extends BaseService { * @return */ PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, - Date queryEndTime, Integer pageNo, Integer pageSize); + Date queryEndTime, Integer pageNo, Integer pageSize, String biz); /** * 月度增量查询 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 28166485f0..35616c6511 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -479,7 +479,7 @@ public class IcEventServiceImpl extends BaseServiceImpl listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, - Integer pageSize) { + Integer pageSize, String biz) { // 1.分类字典 Map eventSourceTypeDict = getResultDataOrThrowsException(adminOpenFeignClient.dictMap("ic_event_source_type"), @@ -497,7 +497,7 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.listProcessAnalysisEvents( EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime - , queryEndTime); + , queryEndTime, biz); // 3.补充数据 for (IcEventResultDTO event : list) { diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 6ae905f668..d2035f274a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -45,7 +45,15 @@ e.MOBILE mobile, e.STATUS processStatus from ic_event e - inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + + + inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + + left join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + e.CUSTOMER_ID = #{customerId} and e.HAPPEN_TIME >= #{queryStartTime} From bc37531718815ea529428a07d56be7ad2102a8a4 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 25 May 2022 13:35:05 +0800 Subject: [PATCH 166/416] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BA=BA=E6=88=BF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/org/IcHouseDao.java | 26 + .../com/epmet/dao/user/IcResiUserDao.java | 39 ++ .../com/epmet/entity/org/IcHouseEntity.java | 110 ++++ .../epmet/entity/user/IcResiUserEntity.java | 513 ++++++++++++++++++ .../com/epmet/service/org/HouseService.java | 37 ++ .../service/org/impl/HouseServiceImpl.java | 80 +++ .../epmet/service/user/IcResiUserService.java | 39 ++ .../user/impl/IcResiUserServiceImpl.java | 90 +++ .../main/resources/mapper/org/IcHouseDao.xml | 39 ++ .../resources/mapper/user/IcResiUserDao.xml | 28 + 10 files changed, 1001 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java new file mode 100644 index 0000000000..040f5ec9a4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java @@ -0,0 +1,26 @@ +package com.epmet.dao.org; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.HouseChartResultDTO; +import com.epmet.entity.org.IcHouseEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Mapper +public interface IcHouseDao extends BaseDao { + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + List houseChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java new file mode 100644 index 0000000000..5625f9a3c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java @@ -0,0 +1,39 @@ +/** + * 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.dao.user; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.entity.user.IcResiUserEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Mapper +public interface IcResiUserDao extends BaseDao { + + List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java new file mode 100644 index 0000000000..889f5b3d86 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java @@ -0,0 +1,110 @@ +/** + * 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.entity.org; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_house") +public class IcHouseEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 片区id,neighbor_hood_part.id,可为空。 + */ + private String partId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id + */ + private String buildingUnitId; + + /** + * 房屋名字后台插入时生成 + */ + private String houseName; + + /** + * 门牌号 + */ + private String doorName; + + /** + * 房屋类型,这里存储字典value就可以 + */ + private String houseType; + + /** + * 存储字典value + */ + private String purpose; + + /** + * 1出租;0未出租 + */ + private Integer rentFlag; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 房主电话 + */ + private String ownerPhone; + + /** + * 房主身份证号 + */ + private String ownerIdCard; + + /** + * 排序 + */ + private BigDecimal sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java new file mode 100644 index 0000000000..4a2260b045 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java @@ -0,0 +1,513 @@ +/** + * 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.entity.user; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_resi_user") +public class IcResiUserEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * + */ + private String agencyId; + + /** + * + */ + private String pids; + + /** + * 网格ID + */ + private String gridId; + + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 单元id + */ + private String unitId; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 是否本地户籍 + */ + private String isBdhj; + + /** + * 姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 备注 + */ + private String remarks; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系人电话 + */ + private String contactsMobile; + + /** + * 九小场所url + */ + private String ninePlace; + + /** + * 是否党员 + */ + private String isParty; + + /** + * 是否低保户 + */ + private String isDbh; + + /** + * 是否保障房 + */ + private String isEnsureHouse; + + /** + * 是否失业 + */ + private String isUnemployed; + + /** + * 是否育龄妇女 + */ + private String isYlfn; + + /** + * 是否退役军人 + */ + private String isVeterans; + + /** + * 是否统战人员 + */ + private String isUnitedFront; + + /** + * 是否信访人员 + */ + private String isXfry; + + /** + * 是否志愿者 + */ + private String isVolunteer; + + /** + * 是否老年人 + */ + private String isOldPeople; + + /** + * 是否空巢 + */ + private String isKc; + + /** + * 是否失独 + */ + private String isSd; + + /** + * 是否失能 + */ + private String isSn; + + /** + * 是否失智 + */ + private String isSz; + + /** + * 是否残疾 + */ + private String isCj; + + /** + * 是否大病 + */ + private String isDb; + + /** + * 是否慢病 + */ + private String isMb; + + /** + * 是否特殊人群 + */ + private String isSpecial; + + /** + * 是否租户【是:1 否:0】 + */ + private String isTenant; + + /** + * 是否流动人口【是:1 否:0】 + */ + private String isFloating; + + /** + * 文化程度【字典表】 + */ + private String culture; + + /** + * 文化程度备注 + */ + private String cultureRemakes; + + /** + * 特长【字典表】 + */ + private String specialSkill; + + /** + * 兴趣爱好 + */ + private String hobby; + + /** + * 兴趣爱好备注 + */ + private String hobbyRemakes; + + /** + * 宗教信仰 + */ + private String faith; + + /** + * 宗教信仰备注 + */ + private String faithRemakes; + + /** + * 残疾类别【字典表】 + */ + private String cjlb; + + /** + * 残疾登记(状况)【字典表】 + */ + private String cjzk; + + /** + * 残疾证号 + */ + private String cjzh; + + /** + * 残疾说明 + */ + private String cjsm; + + /** + * 有无监护人【yes no】 + */ + private String ynJdr; + + /** + * 有无技能特长【yes no】 + */ + private String ynJntc; + + /** + * 有无劳动能力 + */ + private String ynLdnl; + + /** + * 有无非义务教育阶段助学【yes no】 + */ + private String ynFywjyjdzx; + + /** + * 所患大病 + */ + private String shdb; + + /** + * 患大病时间 + */ + private String dbsj; + + /** + * 所患慢性病 + */ + private String shmxb; + + /** + * 患慢性病时间 + */ + private String mxbsj; + + /** + * 是否参保 + */ + private String isCb; + + /** + * 自付金额 + */ + private String zfje; + + /** + * 救助金额 + */ + private String jzje; + + /** + * 救助时间[yyyy-MM-dd] + */ + private String jzsj; + + /** + * 享受救助明细序号 + */ + private String jzmxxh; + + /** + * 健康信息备注 + */ + private String healthRemakes; + + /** + * 工作单位 + */ + private String gzdw; + + /** + * 职业 + */ + private String zy; + + /** + * 离退休时间 + */ + private String ltxsj; + + /** + * 工作信息备注 + */ + private String workRemake; + + /** + * 退休金额 + */ + private String txje; + + /** + * 月收入 + */ + private String ysr; + + /** + * 籍贯 + */ + private String jg; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 人户情况 + */ + private String rhzk; + + /** + * 居住信息备注 + */ + private String jzxxRemakes; + + /** + * 民族【字典表】 + */ + private String mz; + + /** + * 与户主关系【字典表】 + */ + private String yhzgx; + + /** + * 居住情况【字典表】 + */ + private String jzqk; + + /** + * 婚姻状况【字典表】 + */ + private String hyzk; + + /** + * 配偶情况【字典表】 + */ + private String poqk; + + /** + * 有无赡养人 + */ + private String ynSyr; + + /** + * 与赡养人关系【字典表】 + */ + private String ysyrgx; + + /** + * 赡养人电话 + */ + private String syrMobile; + + /** + * 家庭信息备注 + */ + private String jtxxRemakes; + + /** + * 用户状态【0:正常;1:迁出;2:注销】 + */ + private String status; + + /** + * 用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡 + */ + private String subStatus; + + /** + * 预留字段1 + */ + private String field1; + + /** + * 预留字段2 + */ + private String field2; + + /** + * 预留字段3 + */ + private String field3; + + /** + * 预留字段4 + */ + private String field4; + + /** + * 预留字段5 + */ + private String field5; + + /** + * 预留字段6 + */ + private String field6; + + /** + * 预留字段7 + */ + private String field7; + + /** + * 预留字段8 + */ + private String field8; + + /** + * 预留字段9 + */ + private String field9; + + /** + * 预留字段10 + */ + private String field10; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java new file mode 100644 index 0000000000..1989a04cf8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java @@ -0,0 +1,37 @@ +/** + * 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.service.org; + +import com.epmet.dto.form.HouseChartFormDTO; +import com.epmet.dto.result.HouseChartResultDTO; + +/** + * 小区表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +public interface HouseService { + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + HouseChartResultDTO houseChart(HouseChartFormDTO formDTO); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java new file mode 100644 index 0000000000..030792e44a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java @@ -0,0 +1,80 @@ +package com.epmet.service.org.impl; + +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.feign.ResultDataResolver; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.dao.org.IcHouseDao; +import com.epmet.dto.form.HouseChartFormDTO; +import com.epmet.dto.result.HouseChartResultDTO; +import com.epmet.dto.result.HouseIcResiUserResultDTO; +import com.epmet.service.org.HouseService; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.text.NumberFormat; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +@Slf4j +@Service +public class HouseServiceImpl implements HouseService, ResultDataResolver { + + /** + * 导出房屋内家庭成员时本地缓存 + */ + private static final Cache> memberCacheMap = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.MINUTES).expireAfterWrite(30,TimeUnit.MINUTES).build(); + + @Resource + private IcHouseDao icHouseDao; + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + @Override + public HouseChartResultDTO houseChart(HouseChartFormDTO formDTO) { + HouseChartResultDTO resultDTO = new HouseChartResultDTO(); + //计算百分比使用,保留小数点后两位 + NumberFormat numberFormat = NumberFormat.getInstance(); + numberFormat.setMaximumFractionDigits(NumConstant.TWO); + //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息 + if (StringUtils.isEmpty(formDTO.getOrgId())) { + //2.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + formDTO.setOrgType("agency"); + } + //2.根据入参值查询对应的房屋统计数据 + List list = icHouseDao.houseChart(formDTO.getOrgId(), formDTO.getOrgType()); + //3.汇总数据 + AtomicInteger houseTotal = new AtomicInteger(); + list.forEach(l -> { + houseTotal.addAndGet(l.getNum()); + if (l.getRentFlag() == 0) { + resultDTO.setZzHouseTotal(l.getNum()); + } else if (l.getRentFlag() == 1) { + resultDTO.setCzHouseTotal(l.getNum()); + } else { + resultDTO.setXzHouseTotal(l.getNum()); + } + }); + resultDTO.setHouseTotal(houseTotal.get()); + resultDTO.setZzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getZzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getZzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); + resultDTO.setCzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getCzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); + resultDTO.setXzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getXzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getXzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); + resultDTO.setOrgId(formDTO.getOrgId()); + resultDTO.setOrgType(formDTO.getOrgType()); + return resultDTO; + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java new file mode 100644 index 0000000000..ea6a7e6261 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java @@ -0,0 +1,39 @@ +/** + * 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.service.user; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.form.UserChartFormDTO; +import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.entity.user.IcResiUserEntity; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +public interface IcResiUserService extends BaseService { + + /** + * @Author sun + * @Description 【人房】居民总数饼图 + **/ + UserChartResultDTO userChart(UserChartFormDTO formDTO); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java new file mode 100644 index 0000000000..ea583e56a0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java @@ -0,0 +1,90 @@ +/** + * 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.service.user.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +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.feign.ResultDataResolver; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.dao.user.IcResiUserDao; +import com.epmet.dto.form.UserChartFormDTO; +import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.entity.user.IcResiUserEntity; +import com.epmet.service.user.IcResiUserService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.text.NumberFormat; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 用户基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Slf4j +@Service +public class IcResiUserServiceImpl extends BaseServiceImpl implements IcResiUserService, ResultDataResolver { + + /** + * @Author sun + * @Description 【人房】居民总数饼图 + **/ + @Override + public UserChartResultDTO userChart(UserChartFormDTO formDTO) { + UserChartResultDTO resultDTO = new UserChartResultDTO(); + //计算百分比使用,保留小数点后两位 + NumberFormat numberFormat = NumberFormat.getInstance(); + numberFormat.setMaximumFractionDigits(NumConstant.TWO); + //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息 + if (StringUtils.isEmpty(formDTO.getOrgId())) { + //2.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + formDTO.setOrgType("agency"); + } + //2.根据入参值查询对应的房屋统计数据 + List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType()); + //3.汇总数据 + AtomicInteger userTotal = new AtomicInteger(); + list.forEach(l -> { + userTotal.addAndGet(l.getNum()); + if ("0".equals(l.getIsFloating())) { + resultDTO.setCzUserTotal(l.getNum()); + } else { + resultDTO.setLdUserTotal(l.getNum()); + } + }); + resultDTO.setUserTotal(userTotal.get()); + resultDTO.setCzUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100))); + resultDTO.setLdUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100))); + resultDTO.setOrgId(formDTO.getOrgId()); + resultDTO.setOrgType(formDTO.getOrgType()); + + return resultDTO; + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml new file mode 100644 index 0000000000..2be94d9f5d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml new file mode 100644 index 0000000000..e32ef99c58 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -0,0 +1,28 @@ + + + + + + + + From 8bd2ba497ea96d002407117aeb99d75b47ebff1c Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 25 May 2022 13:37:29 +0800 Subject: [PATCH 167/416] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcHouseDTO.java | 5 +++++ .../src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/IcHouseEntity.java | 5 +++++ 3 files changed, 15 insertions(+) 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 f25311b2db..2e0484f6b7 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 @@ -141,4 +141,9 @@ public class IcHouseDTO implements Serializable { */ private Date updatedTime; + /** + * 备注 + */ + private String remark; + } \ No newline at end of file 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 440b2323bb..8882060a2e 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 @@ -101,6 +101,11 @@ public class IcHouseAddFormDTO implements Serializable { */ private String ownerIdCard; + /** + * 备注 + */ + private String remark; + private BigDecimal sort = NumConstant.ZERO_DECIMAL; } 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 362740e9c2..9383210f9c 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 @@ -107,4 +107,9 @@ public class IcHouseEntity extends BaseEpmetEntity { */ private BigDecimal sort; + /** + * 备注 + */ + private String remark; + } From e19245a42e4a7062c80d7f4179a233a1ff654c36 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 25 May 2022 13:38:17 +0800 Subject: [PATCH 168/416] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E8=BD=AC=E6=9C=8D=E5=8A=A1reddot=3D1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 35616c6511..21ca0d9b46 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -685,6 +685,8 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 13:39:39 +0800 Subject: [PATCH 169/416] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E8=BD=AC=E6=9C=8D=E5=8A=A1reddot=3D1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 21ca0d9b46..39a80c39ca 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -771,8 +771,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 15:27:57 +0800 Subject: [PATCH 170/416] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90=EF=BC=8C=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=88=86=E7=B1=BB=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=8F=91=E7=94=9F=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 39a80c39ca..463fc759ba 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -583,15 +583,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 15:36:27 +0800 Subject: [PATCH 171/416] =?UTF-8?q?type=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 463fc759ba..8bf21d6b4f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1357,7 +1357,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 16:47:55 +0800 Subject: [PATCH 172/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0flyway=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=9A=E9=9A=90=E8=97=8F=E6=97=A7=E7=9A=84event?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6footbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.26__hide_old_event_footbar.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql new file mode 100644 index 0000000000..5bb2273861 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql @@ -0,0 +1,4 @@ +-- 隐藏旧的事件footbar +update customer_foot_bar +set DISPLAY='0' +where BAR_NAME = '事件' \ No newline at end of file From 7573835b2b9328269cacab4e1e34c148730c7269 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 26 May 2022 09:46:35 +0800 Subject: [PATCH 173/416] =?UTF-8?q?=E6=94=AF=E6=8F=B4=E8=80=85=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E6=B2=BB=E5=AE=89=E5=B7=A1=E9=80=BB=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.27__modify_zhianxunluoyuan.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql new file mode 100644 index 0000000000..33a8111fb3 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql @@ -0,0 +1,5 @@ + +update ic_form_item_options set OPTION_LABEL='治安巡逻员' +where DEL_FLAG='0' +and OPTION_LABEL like '%治安巡逻%' +and ITEM_ID like '%1074'; \ No newline at end of file From 10513cdeb2db4aeffb626ca79a83067932f28005 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 26 May 2022 15:29:28 +0800 Subject: [PATCH 174/416] =?UTF-8?q?voice=EF=BC=9Aduration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- .../epmet/dto/result/MyReportIcEvResDTO.java | 2 +- .../service/impl/IcEventServiceImpl.java | 46 ++++++------------- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index 7ce5e3fc5d..6774329890 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -83,7 +83,7 @@ public class IcEventAddEditFormDTO implements Serializable { */ private String longitude; /** - * 处理方式[0:已回复 1:已转项目 1:已转需求] + * 处理方式[0:已回复 1:已转项目 2:已转需求] */ private String operationType; /** diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 80a846cb4b..d2652ce3a3 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -38,7 +38,7 @@ public class MyReportIcEvResDTO implements Serializable { /** * 音频[url集合] */ - private List voiceList; + private List voiceList; /** * 地址 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 8bf21d6b4f..a05d3d731d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1,6 +1,5 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.*; @@ -96,14 +95,18 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { //获取当前工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); - if (null == staffInfo) { - throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); - } + CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); formDTO.setAgencyId(staffInfo.getAgencyId()); //分页查询当前组织下网格内事件数据 @@ -149,14 +152,6 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } - 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 IcEventDTO get(String id) { @@ -168,10 +163,7 @@ public class IcEventServiceImpl extends BaseServiceImpl imageList = new ArrayList<>(); - List voiceList = new ArrayList<>(); + List voiceList = new ArrayList<>(); for (IcEventAttachmentDTO file : dto.getAttachmentList()) { if ("image".equals(file.getAttachmentType())) { imageList.add(file.getAttachmentUrl()); } else if ("voice".equals(file.getAttachmentType())) { - voiceList.add(file.getAttachmentUrl()); + voiceList.add(file); } } dto.setImageList(imageList); From dd5d2b94df10fa63f0af802b63cf66223c210500 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 26 May 2022 15:45:06 +0800 Subject: [PATCH 175/416] =?UTF-8?q?pc=E7=AB=AF=E8=8F=9C=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 4 +-- .../main/java/com/epmet/dto/GovMenuDTO.java | 7 ++++- .../epmet/controller/GovMenuController.java | 8 ++--- .../main/java/com/epmet/dao/GovMenuDao.java | 25 +++++++++------- .../com/epmet/redis/GovCustomerMenuRedis.java | 10 ++++--- .../com/epmet/service/GovMenuService.java | 8 +++-- .../service/impl/GovMenuServiceImpl.java | 29 ++++++++++++------- .../src/main/resources/mapper/GovMenuDao.xml | 4 +-- 8 files changed, 58 insertions(+), 37 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 05e5c200a4..412b4b7237 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -744,8 +744,8 @@ public class RedisKeys { return rootPrefix.concat("temporary:").concat("temporaryResult:").concat(customerId).concat(":").concat(userId); } - public static String getCustomerMenuList(String customerId, Integer type) { - return getCustomerMenuListPrefix().concat(customerId).concat(":type:")+type; + public static String getCustomerMenuList(String customerId, Integer type, String tableName) { + return getCustomerMenuListPrefix().concat(customerId).concat(":type:").concat(type.toString()).concat(":tableName:").concat(tableName); } /** diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java index fb130e9c65..a82f78d877 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java @@ -121,4 +121,9 @@ public class GovMenuDTO extends TreeStringNode implements Serializab * 是否显示,1:显示 0不显示 */ private Integer showFlag; -} \ No newline at end of file + + /** + * 用于区分哪个端的菜单 eg:管理平台(gov_menu)、数据分析平台(data_menu) + */ + private String tableName; +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java index d3a67c889f..904f7a268e 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java @@ -101,8 +101,8 @@ public class GovMenuController { * @return Result> */ @GetMapping("list") - public Result> list(Integer type){ - List list = govMenuService.getMenuList(type); + public Result> list(Integer type,String tableName){ + List list = govMenuService.getMenuList(type,tableName); return new Result>().ok(list); } @@ -113,8 +113,8 @@ public class GovMenuController { * @return List */ @GetMapping("nav") - public Result> nav(@LoginUser TokenDto tokenDto){ - List list = govMenuService.getUserMenuNavList(tokenDto); + public Result> nav(@LoginUser TokenDto tokenDto, String tableName){ + List list = govMenuService.getUserMenuNavList(tokenDto,tableName); return new Result>().ok(list); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java index ba05556dc1..45370406ab 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java @@ -1,8 +1,8 @@ /** * Copyright (c) 2018 人人开源 All rights reserved. - * + *

* https://www.renren.io - * + *

* 版权所有,侵权必究! */ @@ -29,16 +29,17 @@ public interface GovMenuDao extends BaseDao { /** * 查询所有菜单列表 * - * @param type 菜单类型 - * @param language 语言 + * @param type 菜单类型 + * @param language 语言 + * @param tableName */ - List getMenuList(@Param("type") Integer type, @Param("language") String language); + List getMenuList(@Param("type") Integer type, @Param("language") String language, @Param("tableName") String tableName); /** * 查询用户菜单列表 * - * @param userId 用户ID - * @param type 菜单类型 + * @param userId 用户ID + * @param type 菜单类型 * @param language 语言 */ List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language); @@ -46,7 +47,8 @@ public interface GovMenuDao extends BaseDao { /** * 根据父菜单,查询子菜单 - * @param pid 父菜单ID + * + * @param pid 父菜单ID */ List getListPid(String pid); @@ -54,8 +56,9 @@ public interface GovMenuDao extends BaseDao { * 查询客户菜单列表 * * @param customerId 客户id - * @param type 菜单类型 - * @param language 语言 + * @param type 菜单类型 + * @param language 语言 + * @param tableName */ - List getCustomerMenuList(@Param("customerId") String customerId, @Param("type") Integer type, @Param("language") String language); + List getCustomerMenuList(@Param("customerId") String customerId, @Param("type") Integer type, @Param("language") String language, @Param("tableName") String tableName); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java index 911e42f59a..64dcb0fb1c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java @@ -45,11 +45,12 @@ public class GovCustomerMenuRedis { * desc:保存客户菜单缓存 * @param customerId * @param type + * @param tableName * @see com.epmet.enums.MenuTypeEnum */ - public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS) { + public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS, String tableName) { if (checkParam(customerId, type) && !CollectionUtils.isEmpty(govMenuDTOS) && StringUtils.isNotBlank(govMenuDTOS.get(NumConstant.ZERO).getName())) { - String key = RedisKeys.getCustomerMenuList(customerId, type); + String key = RedisKeys.getCustomerMenuList(customerId, type, tableName); redisUtils.set(key, govMenuDTOS, RedisUtils.DEFAULT_EXPIRE); } } @@ -57,11 +58,12 @@ public class GovCustomerMenuRedis { * desc:获取客户菜单缓存 * @param customerId * @param type + * @param tableName * @see com.epmet.enums.MenuTypeEnum */ - public List getCustomerMenuList(String customerId, Integer type) { + public List getCustomerMenuList(String customerId, Integer type, String tableName) { if (checkParam(customerId, type)) { - String key = RedisKeys.getCustomerMenuList(customerId, type); + String key = RedisKeys.getCustomerMenuList(customerId, type, tableName); return (List) redisUtils.get(key); } return null; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java index b5c0cf12a3..99b5c9fdd1 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java @@ -117,15 +117,17 @@ public interface GovMenuService extends BaseService { * 菜单列表 * * @param type 菜单类型 + * @param tableName */ - List getMenuList(Integer type); + List getMenuList(Integer type, String tableName); /** * 用户菜单导航 * @param tokenDto 用户信息 + * @param tableName * @return java.util.List */ - List getUserMenuNavList(TokenDto tokenDto); + List getUserMenuNavList(TokenDto tokenDto, String tableName); /** * 获取用户权限标识 @@ -141,4 +143,4 @@ public interface GovMenuService extends BaseService { List getListPid(String pid); void clearOperUserAccess(String app, String client, String userId); -} \ No newline at end of file +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index 63bde3c678..57a47a71d1 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -169,7 +169,8 @@ public class GovMenuServiceImpl extends BaseServiceImpl getMenuList(Integer type) { - List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); + public List getMenuList(Integer type, String tableName) { + if (StringUtils.isBlank(tableName)){ + tableName = "gov_menu"; + } + List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage(), tableName); List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); @@ -189,7 +193,7 @@ public class GovMenuServiceImpl extends BaseServiceImpl getUserMenuNavList(TokenDto tokenDto) { + public List getUserMenuNavList(TokenDto tokenDto, String tableName) { // List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient()); // if(menuList == null){ // menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); @@ -198,7 +202,10 @@ public class GovMenuServiceImpl extends BaseServiceImpl * @Author zhangyong * @Date 15:51 2021-03-16 **/ - private List getCustomerMenuList(String customerId, Integer type) { - List govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type); + private List getCustomerMenuList(String customerId, Integer type, String tableName) { + List govMenuDTOS = govCustomerMenuRedis.getCustomerMenuList(customerId,type,tableName); if (!CollectionUtils.isEmpty(govMenuDTOS)){ return govMenuDTOS; } - List menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); + List menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage(),tableName); List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); govMenuDTOS = TreeUtils.buildTree(dtoList); - govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS); + govCustomerMenuRedis.setCustomerMenuList(customerId,type,govMenuDTOS,tableName); return govMenuDTOS; } @@ -235,7 +243,8 @@ public class GovMenuServiceImpl extends BaseServiceImpl menuList; // if(govUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ - menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); + //目前不支持角色 菜单 + menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage(), null); // }else{ // menuList = baseDao.getUserMenuList(tokenDto.getUserId(), MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); // } diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml index 9ac55ce17b..dc82218d8e 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml @@ -14,7 +14,7 @@ + SELECT + a.*, + d.AGENCY_NAME + FROM + fact_agency_user_house_daily a + LEFT JOIN dim_agency d ON d.id = a.AGENCY_ID + + AND a.CUSTOMER_ID = #{customerId} + AND d.CUSTOMER_ID = #{customerId} + + + AND a.AGENCY_ID = #{agencyId} + + + AND a.DATE_ID >= #{startTime} + + + AND a.DATE_ID <= #{endTime} + + ORDER BY + a.CREATED_TIME DESC + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 534d2376d8..965cb87d1f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -30,5 +30,28 @@ - + \ No newline at end of file From 9a7b8f1e53ccd12087d9b78a82efcfb40312c181 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 27 May 2022 15:17:05 +0800 Subject: [PATCH 187/416] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/IcServiceProjectAttachmentDTO.java | 110 ++++++++++++++++++ .../com/epmet/dto/IcServiceProjectDTO.java | 104 +++++++++++++++++ .../IcServiceProjectAttachmentController.java | 72 ++++++++++++ .../IcServiceProjectController.java | 73 ++++++++++++ .../dao/IcServiceProjectAttachmentDao.java | 16 +++ .../com/epmet/dao/IcServiceProjectDao.java | 16 +++ .../IcServiceProjectAttachmentEntity.java | 80 +++++++++++++ .../epmet/entity/IcServiceProjectEntity.java | 74 ++++++++++++ .../IcServiceProjectAttachmentService.java | 78 +++++++++++++ .../service/IcServiceProjectService.java | 78 +++++++++++++ ...IcServiceProjectAttachmentServiceImpl.java | 83 +++++++++++++ .../impl/IcServiceProjectServiceImpl.java | 87 ++++++++++++++ .../mapper/IcServiceProjectAttachmentDao.xml | 7 ++ .../resources/mapper/IcServiceProjectDao.xml | 6 + 14 files changed, 884 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java new file mode 100644 index 0000000000..c137d874e3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class IcServiceProjectAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icServiceId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java new file mode 100644 index 0000000000..3d3a6c733f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java @@ -0,0 +1,104 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class IcServiceProjectDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织ID的上级 + */ + private String pid; + + /** + * 组织ID的所有上级[包括自己] + */ + private String agencyIdPath; + + /** + * 服务类别值 + */ + private String serviceCategoryKey; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 启用状态,0启用,1禁用 + */ + private Integer enabled; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java new file mode 100644 index 0000000000..07e07b0d92 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java @@ -0,0 +1,72 @@ +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.IcServiceProjectAttachmentDTO; +import com.epmet.service.IcServiceProjectAttachmentService; +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-05-27 + */ +@RestController +@RequestMapping("icServiceProjectAttachment") +public class IcServiceProjectAttachmentController { + + @Autowired + private IcServiceProjectAttachmentService icServiceProjectAttachmentService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icServiceProjectAttachmentService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceProjectAttachmentDTO data = icServiceProjectAttachmentService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcServiceProjectAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icServiceProjectAttachmentService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcServiceProjectAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icServiceProjectAttachmentService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icServiceProjectAttachmentService.delete(ids); + return new Result(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java new file mode 100644 index 0000000000..c3ae252c24 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -0,0 +1,73 @@ +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.IcServiceProjectDTO; +import com.epmet.service.IcServiceProjectService; +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-05-27 + */ +@RestController +@RequestMapping("icServiceProject") +public class IcServiceProjectController { + + @Autowired + private IcServiceProjectService icServiceProjectService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icServiceProjectService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceProjectDTO data = icServiceProjectService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcServiceProjectDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icServiceProjectService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcServiceProjectDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icServiceProjectService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icServiceProjectService.delete(ids); + return new Result(); + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java new file mode 100644 index 0000000000..39a516c723 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcServiceProjectAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceProjectAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java new file mode 100644 index 0000000000..57a80eb75d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcServiceProjectEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceProjectDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java new file mode 100644 index 0000000000..3238791176 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java @@ -0,0 +1,80 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_project_attachment") +public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icServiceId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java new file mode 100644 index 0000000000..b8a09e67cf --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java @@ -0,0 +1,74 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_project") +public class IcServiceProjectEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织ID的上级 + */ + private String pid; + + /** + * 组织ID的所有上级[包括自己] + */ + private String agencyIdPath; + + /** + * 服务类别值 + */ + private String serviceCategoryKey; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 启用状态,0启用,1禁用 + */ + private Integer enabled; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java new file mode 100644 index 0000000000..afc94ec748 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.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.IcServiceProjectAttachmentDTO; +import com.epmet.entity.IcServiceProjectAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceProjectAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcServiceProjectAttachmentDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceProjectAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceProjectAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceProjectAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java new file mode 100644 index 0000000000..de2955668c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.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.IcServiceProjectDTO; +import com.epmet.entity.IcServiceProjectEntity; + +import java.util.List; +import java.util.Map; + +/** + * 服务项目管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceProjectService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcServiceProjectDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceProjectDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceProjectDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceProjectDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java new file mode 100644 index 0000000000..13610ad374 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectAttachmentServiceImpl.java @@ -0,0 +1,83 @@ +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.IcServiceProjectAttachmentDao; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import com.epmet.entity.IcServiceProjectAttachmentEntity; +import com.epmet.service.IcServiceProjectAttachmentService; +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-05-27 + */ +@Service +public class IcServiceProjectAttachmentServiceImpl extends BaseServiceImpl implements IcServiceProjectAttachmentService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcServiceProjectAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcServiceProjectAttachmentDTO.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 IcServiceProjectAttachmentDTO get(String id) { + IcServiceProjectAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceProjectAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceProjectAttachmentDTO dto) { + IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceProjectAttachmentDTO dto) { + IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.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/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 new file mode 100644 index 0000000000..730a59a2c8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.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.IcServiceProjectDao; +import com.epmet.dto.IcServiceProjectDTO; +import com.epmet.entity.IcServiceProjectEntity; +import com.epmet.redis.IcServiceProjectRedis; +import com.epmet.service.IcServiceProjectService; +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-05-27 + */ +@Service +public class IcServiceProjectServiceImpl extends BaseServiceImpl implements IcServiceProjectService { + + @Autowired + private IcServiceProjectRedis icServiceProjectRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcServiceProjectDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcServiceProjectDTO.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 IcServiceProjectDTO get(String id) { + IcServiceProjectEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceProjectDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceProjectDTO dto) { + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceProjectDTO dto) { + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.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/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml new file mode 100644 index 0000000000..e93240c068 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..c557bd066a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From ab685c637f7a27670926ab7c718ede01d9f3ffaf Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 27 May 2022 15:27:33 +0800 Subject: [PATCH 188/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 1 + .../java/com/epmet/dto/IcServiceOrgDTO.java | 115 +++++++++++++ .../epmet/dto/form/IcMoveInListFormDTO.java | 3 + .../dto/form/IcServiceOrgAddEditFormDTO.java | 71 ++++++++ .../dto/form/IcServiceOrgListFormDTO.java | 46 ++++++ .../dto/result/IcServiceOrgListResultDTO.java | 77 +++++++++ .../controller/IcServiceOrgController.java | 74 +++++++++ .../java/com/epmet/dao/IcServiceOrgDao.java | 25 +++ .../com/epmet/entity/IcServiceOrgEntity.java | 81 ++++++++++ .../com/epmet/excel/IcServiceOrgExcel.java | 75 +++++++++ .../epmet/service/IcServiceOrgService.java | 68 ++++++++ .../service/impl/IcServiceOrgServiceImpl.java | 152 ++++++++++++++++++ .../main/resources/mapper/IcServiceOrgDao.xml | 45 ++++++ 13 files changed, 833 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 6375462f14..e740ddc74e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -23,6 +23,7 @@ public enum DictTypeEnum { PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13), GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), + IC_SERVICE_TYPE("ic_service_type","居民信息组件查询方式",20), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java new file mode 100644 index 0000000000..42d8fcf19b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java @@ -0,0 +1,115 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class IcServiceOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 服务类别【字典表 ic_service_type】多个值逗号分隔 + */ + private String serviceType; + + /** + * 服务组织名称 + */ + private String orgName; + + /** + * 组织描述 + */ + private String orgDescribe; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalMobile; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * 备注 + */ + private String remark; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java new file mode 100644 index 0000000000..85e1039efe --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java @@ -0,0 +1,3 @@ +package com.epmet.dto.form; + +public class IcMoveInListFormDTO implements Serializable { diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java new file mode 100644 index 0000000000..6288775a23 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 服务组织新增/修改 + * @Author sun + */ +@Data +public class IcServiceOrgAddEditFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + public interface Del extends CustomerClientShowGroup { + } + + /** + * 服务组织Id + */ + @NotBlank(message = "服务组织Id不能为空", groups = {UpdateGroup.class, Del.class}) + private String icServiceOrgId; + /** + * 服务类型,多个值逗号分隔,字典值,字典key:ic_service_type + */ + @NotBlank(message = "服务类型不能为空", groups = {AddGroup.class}) + private String serviceType; + /** + * 服务组织名称 + */ + @NotBlank(message = "服务组织名称不能为空", groups = {AddGroup.class}) + private String orgName; + /** + * 组织描述 + */ + private String orgDescribe; + /** + * 负责人姓名 + */ + @NotBlank(message = "负责人姓名不能为空", groups = {AddGroup.class}) + private String principalName; + /** + * 负责人说手机号 + */ + @NotBlank(message = "负责人说手机号不能为空", groups = {AddGroup.class}) + private String principalMobile; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String latitude; + /** + * 服务地址 + */ + private String address; + /** + * 备注信息 + */ + private String remarks; + + private String customerId; + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java new file mode 100644 index 0000000000..f5eb0e8d1c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【组织】服务组织列表--接口入参 + * @Author sun + */ +@Data +public class IcServiceOrgListFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + + /** + * 服务类型,字典值 + */ + private String serviceType; + /** + * 服务组织名称 + */ + private String orgName; + /** + * 服务地址 + */ + private String address; + /** + * 备注信息 + */ + private String remarks; + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; + + private Boolean isPage = true; + private String icServiceOrgId; + private String customerId; + private String staffId; + private String agencyId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java new file mode 100644 index 0000000000..46d4d21f1b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 【组织】服务组织列表--接口返参 + * @Author sun + */ +@Data +public class IcServiceOrgListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 服务组织Id + */ + private String icServiceOrgId; + /** + * 组织Id + */ + private String agencyId; + /** + * 服务类别 + */ + private List serviceTypeList; + /** + * 服务类别,多个值逗号分隔 + */ + private String serviceType; + /** + * 服务组织名称 + */ + private String orgName; + /** + * 组织描述 + */ + private String orgDescribe; + /** + * 负责人名称 + */ + private String principalName; + /** + * 负责人电话 + */ + private String principalMobile; + /** + * 经度 + */ + private String longitude; + /** + * 纬度 + */ + private String latitude; + /** + * 地址 + */ + private String address; + /** + * 备注 + */ + private String remarks; + + @Data + public static class ServiceType { + /** + * 服务类别值 + */ + private String value; + /** + * 服务类别名 + */ + private String name; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java new file mode 100644 index 0000000000..95fc3fcded --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java @@ -0,0 +1,74 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +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.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.IcServiceOrgDTO; +import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.service.IcServiceOrgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@RestController +@RequestMapping("icServiceOrg") +public class IcServiceOrgController { + + @Autowired + private IcServiceOrgService icServiceOrgService; + + @RequestMapping("list") + public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icServiceOrgService.list(formDTO)); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcServiceOrgDTO data = icServiceOrgService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("add") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto) { + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserId(tokenDto.getUserId()); + icServiceOrgService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("edit") + public Result edit(@RequestBody IcServiceOrgAddEditFormDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icServiceOrgService.update(dto); + return new Result(); + } + + @PostMapping("del") + public Result delete(@RequestBody IcServiceOrgAddEditFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, IcServiceOrgAddEditFormDTO.Del.class); + icServiceOrgService.delete(formDTO.getIcServiceOrgId()); + return new Result(); + } + + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java new file mode 100644 index 0000000000..04472f9c0d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java @@ -0,0 +1,25 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.entity.IcServiceOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Mapper +public interface IcServiceOrgDao extends BaseDao { + + /** + * @Author sun + * @Description 服务组织-列表查询 + **/ + List selectServiceOrgList(IcServiceOrgListFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java new file mode 100644 index 0000000000..9b9da6dd7c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java @@ -0,0 +1,81 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_org") +public class IcServiceOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 服务类别【字典表 ic_service_type】多个值逗号分隔 + */ + private String serviceType; + + /** + * 服务组织名称 + */ + private String orgName; + + /** + * 组织描述 + */ + private String orgDescribe; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalMobile; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java new file mode 100644 index 0000000000..79c052a9f8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java @@ -0,0 +1,75 @@ +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-05-27 + */ +@Data +public class IcServiceOrgExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "所属组织机构Id") + private String agencyId; + + @Excel(name = "agencyId的所有上级,包含自己") + private String agencyIdPath; + + @Excel(name = "服务类别【字典表 ic_service_type】多个值逗号分隔") + private String serviceType; + + @Excel(name = "服务组织名称") + private String orgName; + + @Excel(name = "组织描述") + private String orgDescribe; + + @Excel(name = "负责人姓名") + private String principalName; + + @Excel(name = "负责人电话") + private String principalMobile; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java new file mode 100644 index 0000000000..716c00188d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java @@ -0,0 +1,68 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcServiceOrgDTO; +import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.entity.IcServiceOrgEntity; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +public interface IcServiceOrgService extends BaseService { + + /** + * 默认查询 + * + * @param formDTO + * @return java.util.List + * @author generator + * @date 2022-05-27 + */ + PageData list(IcServiceOrgListFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return IcServiceOrgDTO + * @author generator + * @date 2022-05-27 + */ + IcServiceOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void save(IcServiceOrgAddEditFormDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-27 + */ + void update(IcServiceOrgAddEditFormDTO dto); + + /** + * 批量删除 + * + * @param icServiceOrgId + * @return void + * @author generator + * @date 2022-05-27 + */ + void delete(String icServiceOrgId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java new file mode 100644 index 0000000000..8444957e8c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java @@ -0,0 +1,152 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +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.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcServiceOrgDao; +import com.epmet.dto.IcServiceOrgDTO; +import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; +import com.epmet.dto.form.IcServiceOrgListFormDTO; +import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.entity.IcServiceOrgEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcServiceOrgService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 服务组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Service +public class IcServiceOrgServiceImpl extends BaseServiceImpl implements IcServiceOrgService { + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + + + @Override + public PageData list(IcServiceOrgListFormDTO formDTO) { + 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.selectServiceOrgList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + + //封装服务类别数据 + if (!CollectionUtils.isEmpty(list)) { + //服务类别字典表数据 + Result> statusRes = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + List stList = null; + IcServiceOrgListResultDTO.ServiceType st = null; + for (IcServiceOrgListResultDTO dto : list) { + stList = new ArrayList<>(); + for (String str : dto.getServiceType().split(",")) { + st = new IcServiceOrgListResultDTO.ServiceType(); + st.setValue(str); + st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); + stList.add(st); + } + dto.setServiceTypeList(stList); + } + } + + return new PageData<>(list, pageInfo.getTotal()); + } + + 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 IcServiceOrgDTO get(String id) { + IcServiceOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcServiceOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcServiceOrgAddEditFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + //2.校验同组织下服务组织名称不能重复 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(IcServiceOrgEntity::getAgencyId, staffInfo.getAgencyId()); + tWrapper.eq(IcServiceOrgEntity::getOrgName, formDTO.getOrgName()); + List entityList = baseDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的服务组织"); + } + //3.新增服务组织数据 + IcServiceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceOrgEntity.class); + entity.setAgencyId(staffInfo.getAgencyId()); + entity.setAgencyIdPath(staffInfo.getAgencyPIds()); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcServiceOrgAddEditFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + //2.校验同组织下服务组织名称不能重复 + LambdaQueryWrapper tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(IcServiceOrgEntity::getAgencyId, staffInfo.getAgencyId()); + tWrapper.ne(IcServiceOrgEntity::getId, formDTO.getIcServiceOrgId()); + tWrapper.eq(IcServiceOrgEntity::getOrgName, formDTO.getOrgName()); + List entityList = baseDao.selectList(tWrapper); + if (!CollectionUtils.isEmpty(entityList)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的服务组织"); + } + //3.更新服务组织数据 + IcServiceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceOrgEntity.class); + entity.setId(formDTO.getIcServiceOrgId()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String icServiceOrgId) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteById(icServiceOrgId); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml new file mode 100644 index 0000000000..fb9d2679ab --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + \ No newline at end of file From 69a19e62d088becb7cd720cfd45f3d78c341eba8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 27 May 2022 15:35:18 +0800 Subject: [PATCH 189/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java deleted file mode 100644 index 85e1039efe..0000000000 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcMoveInListFormDTO.java +++ /dev/null @@ -1,3 +0,0 @@ -package com.epmet.dto.form; - -public class IcMoveInListFormDTO implements Serializable { From 83c4c67eb18c3fc5fe7b1ec12175b87ff1843f57 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 27 May 2022 16:38:34 +0800 Subject: [PATCH 190/416] ... --- .../epmet/dto/form/ServiceProjectFormDTO.java | 51 +++++++++++++++++++ .../IcServiceProjectController.java | 19 +++++++ .../service/IcServiceProjectService.java | 10 ++++ .../impl/IcServiceProjectServiceImpl.java | 50 +++++++++++++++++- 4 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java new file mode 100644 index 0000000000..9662d64908 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/27 15:53 + * @DESC + */ +@Data +public class ServiceProjectFormDTO implements Serializable { + + private static final long serialVersionUID = -4573264697450644498L; + + public interface ServiceProjectAddForm{} + + @NotBlank(message = "服务类别不能为空",groups = {ServiceProjectAddForm.class}) + private String serviceCategoryKey; + + @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class}) + private String serviceName; + + @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class}) + private String serviceContent; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 政策级别,0市级;1区级;2街道级 + */ + private String policyLevel; + + private String customerId; + + private String userId; + + /** + * 附件集合 + */ + @Valid + private List attachmentList; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index c3ae252c24..06d4295a3c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -1,7 +1,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,7 @@ 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.IcServiceProjectDTO; +import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.service.IcServiceProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -70,4 +73,20 @@ public class IcServiceProjectController { return new Result(); } + /** + * Desc: 服务项目新增 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/27 16:04 + */ + @PostMapping("serviceProjectAdd") + public Result serviceProjectAdd(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectAddForm.class); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + icServiceProjectService.serviceProjectAdd(formDTO); + return new Result(); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java index de2955668c..82d7e9205a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcServiceProjectDTO; +import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.entity.IcServiceProjectEntity; import java.util.List; @@ -75,4 +76,13 @@ public interface IcServiceProjectService extends BaseService implements IcServiceProjectService { @Autowired - private IcServiceProjectRedis icServiceProjectRedis; + private IcServiceProjectAttachmentService attachmentService; @Override public PageData page(Map params) { @@ -84,4 +93,41 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl entities = ConvertUtils.sourceToTarget(formDTO.getAttachmentList(), IcServiceProjectAttachmentEntity.class); + Integer sort = NumConstant.ZERO; + for (IcServiceProjectAttachmentEntity e : entities) { + e.setCustomerId(formDTO.getCustomerId()); + e.setStatus("auto_passed"); + e.setSort(sort); + e.setIcServiceId(entity.getId()); + sort++; + } + attachmentService.insertBatch(entities); + } + } + } \ No newline at end of file From 7dad0337363930c72c1586dfadcf49c32501f0ef Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 27 May 2022 17:48:29 +0800 Subject: [PATCH 191/416] ... --- .../epmet/dto/form/ServiceProjectFormDTO.java | 1 - .../dto/form/ServiceProjectListFormDTO.java | 26 ++++++++ .../result/ServiceProjectListResultDTO.java | 61 +++++++++++++++++++ .../IcServiceProjectController.java | 14 +++++ .../com/epmet/dao/IcServiceProjectDao.java | 14 ++++- .../service/IcServiceProjectService.java | 9 +++ .../impl/IcServiceProjectServiceImpl.java | 42 +++++++++++++ .../resources/mapper/IcServiceProjectDao.xml | 49 +++++++++++++++ 8 files changed, 214 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java index 9662d64908..cb1979f3a4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java @@ -46,6 +46,5 @@ public class ServiceProjectFormDTO implements Serializable { /** * 附件集合 */ - @Valid private List attachmentList; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java new file mode 100644 index 0000000000..19ecf87d87 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/27 16:42 + * @DESC + */ +@Data +public class ServiceProjectListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -6508966695564469253L; + + private String serviceCategoryKey; + private String serviceName; + private String serviceContent; + private String policyGround; + private String customerId; + private String userId; + private String agencyId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java new file mode 100644 index 0000000000..f954047512 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java @@ -0,0 +1,61 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.dto.IcServiceProjectAttachmentDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/27 16:42 + * @DESC + */ +@Data +public class ServiceProjectListResultDTO implements Serializable { + + private static final long serialVersionUID = -6508966695564469113L; + + /** + * 服务类别 + */ + private String serviceCategory; + private String serviceCategoryKey; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务名称 + */ + private String serviceName; + + /** + * 服务内容 + */ + private String serviceContent; + + /** + * 政策依据 + */ + private String policyGround; + + /** + * 政策级别 + */ + private String policyLevel; + + private List attachmentList; + + public ServiceProjectListResultDTO() { + this.serviceCategory = ""; + this.serviceProjectId = ""; + this.serviceName = ""; + this.serviceContent = ""; + this.policyGround = ""; + this.policyLevel = ""; + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index 06d4295a3c..016c0dff5d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.form.ServiceProjectFormDTO; +import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.service.IcServiceProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -89,4 +90,17 @@ public class IcServiceProjectController { return new Result(); } + /** + * Desc: 服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 16:46 + */ + @PostMapping("serviceProjectList") + public Result serviceProjectList(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(icServiceProjectService.serviceProjectList(formDTO)); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java index 57a80eb75d..dc12406c3b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java @@ -1,9 +1,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.ServiceProjectListFormDTO; +import com.epmet.dto.result.ServiceProjectListResultDTO; import com.epmet.entity.IcServiceProjectEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 服务项目管理表 * @@ -12,5 +16,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcServiceProjectDao extends BaseDao { - + + /** + * Desc: 查询服务项目列表 + * @param formDTO + * @author zxc + * @date 2022/5/27 17:13 + */ + List getServiceProjectList(ServiceProjectListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java index 82d7e9205a..f1097079fd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.form.ServiceProjectFormDTO; +import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.entity.IcServiceProjectEntity; import java.util.List; @@ -85,4 +86,12 @@ public interface IcServiceProjectService extends BaseService page(Map params) { @@ -130,4 +141,35 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl> serviceProjectList(ServiceProjectListFormDTO formDTO) { + PageData result = new PageData(new ArrayList(),NumConstant.ZERO); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到此工作人员"+formDTO.getUserId()); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getServiceProjectList(formDTO)); + if (CollectionUtils.isNotEmpty(pageInfo.getList())){ + DictListFormDTO dictListFormDTO = new DictListFormDTO(); + dictListFormDTO.setDictType("ic_service_type"); + Result> listResult = adminOpenFeignClient.dictList(dictListFormDTO); + if (!listResult.success()){ + throw new EpmetException("获取字典表数据失败,类型为:ic_service_type"); + } + if (CollectionUtils.isNotEmpty(listResult.getData())){ + pageInfo.getList().forEach(p -> listResult.getData().stream().filter(l -> l.getValue().equals(p.getServiceCategoryKey())).forEach(l -> p.setServiceCategory(l.getLabel()))); + } + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + result.setList(pageInfo.getList()); + } + return result; + } + } \ No newline at end of file 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 c557bd066a..b7d3b978fb 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 @@ -3,4 +3,53 @@ + + + + + + + + + + + + \ No newline at end of file From 1d18a2482c8fc1e904edd1840498ee95fdc0255f Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Fri, 27 May 2022 17:59:40 +0800 Subject: [PATCH 192/416] =?UTF-8?q?grid=E5=92=8Cagency=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/stats/form/FactUserHouseFormDTO.java | 30 +++++++ .../stats/result/FactUserHouseResultDTO.java | 5 ++ .../controller/FactUserHouseController.java | 15 ++-- .../java/com/epmet/dao/org/IcHouseDao.java | 12 ++- .../com/epmet/dao/user/IcResiUserDao.java | 5 +- .../com/epmet/service/org/HouseService.java | 14 ++-- .../service/org/impl/HouseServiceImpl.java | 76 ++++-------------- .../service/stats/FactUserHouseService.java | 3 + .../stats/impl/DimGridServiceImpl.java | 2 + .../stats/impl/FactUserHouseServiceImpl.java | 66 ++++++++++++++++ .../epmet/service/user/IcResiUserService.java | 12 ++- .../user/impl/IcResiUserServiceImpl.java | 54 ++----------- .../main/resources/mapper/org/IcHouseDao.xml | 79 ++++++++++++------- .../resources/mapper/user/IcResiUserDao.xml | 25 +++--- 14 files changed, 217 insertions(+), 181 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java new file mode 100644 index 0000000000..9206fcccd1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.stats.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-27 + */ +@Data +public class FactUserHouseFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java index a8fc8cb467..67c5da0a6b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java @@ -32,6 +32,11 @@ public class FactUserHouseResultDTO implements Serializable { */ private String dateId; + /** + * 网格id + */ + private String gridId; + /** * 组织id */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java index 423a372d5a..b1f2ee1f01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java @@ -3,16 +3,15 @@ package com.epmet.controller; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.excel.FactUserHouseExcel; import com.epmet.service.stats.FactAgencyUserHouseDailyService; import com.epmet.service.stats.FactUserHouseService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -33,7 +32,7 @@ public class FactUserHouseController { private FactUserHouseService factUserHouseService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = factUserHouseService.page(params); return new Result>().ok(page); } @@ -44,4 +43,10 @@ public class FactUserHouseController { ExcelUtils.exportExcelToTarget(response, null, list, FactUserHouseExcel.class); } + @PostMapping("stat") + public Result stat(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.stat(formDTO); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java index 040f5ec9a4..b6af5aa3b2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/IcHouseDao.java @@ -1,10 +1,10 @@ package com.epmet.dao.org; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.HouseChartResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.org.IcHouseEntity; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; import java.util.List; @@ -17,10 +17,8 @@ import java.util.List; @Mapper public interface IcHouseDao extends BaseDao { - /** - * @Author sun - * @Description 【人房】房屋总数饼图 - **/ - List houseChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + List houseStat(FactUserHouseFormDTO formDTO); + + List neighborhoodStatStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java index 5625f9a3c5..56b1cb5fd1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/IcResiUserDao.java @@ -18,7 +18,8 @@ package com.epmet.dao.user; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.user.IcResiUserEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -34,6 +35,6 @@ import java.util.List; @Mapper public interface IcResiUserDao extends BaseDao { - List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + List userStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java index 1989a04cf8..fa7081cf7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java @@ -17,8 +17,10 @@ package com.epmet.service.org; -import com.epmet.dto.form.HouseChartFormDTO; -import com.epmet.dto.result.HouseChartResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; + +import java.util.List; /** * 小区表 @@ -28,10 +30,8 @@ import com.epmet.dto.result.HouseChartResultDTO; */ public interface HouseService { - /** - * @Author sun - * @Description 【人房】房屋总数饼图 - **/ - HouseChartResultDTO houseChart(HouseChartFormDTO formDTO); + List houseStat(FactUserHouseFormDTO formDTO); + + List neighborhoodStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java index 030792e44a..efcb8612ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java @@ -1,80 +1,32 @@ package com.epmet.service.org.impl; -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.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.feign.ResultDataResolver; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.org.IcHouseDao; -import com.epmet.dto.form.HouseChartFormDTO; -import com.epmet.dto.result.HouseChartResultDTO; -import com.epmet.dto.result.HouseIcResiUserResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.org.IcHouseEntity; import com.epmet.service.org.HouseService; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import java.text.NumberFormat; import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; @Slf4j +@DataSource(DataSourceConstant.GOV_ORG) @Service -public class HouseServiceImpl implements HouseService, ResultDataResolver { +public class HouseServiceImpl extends BaseServiceImpl implements HouseService, ResultDataResolver { - /** - * 导出房屋内家庭成员时本地缓存 - */ - private static final Cache> memberCacheMap = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.MINUTES).expireAfterWrite(30,TimeUnit.MINUTES).build(); - - @Resource - private IcHouseDao icHouseDao; + @Override + public List houseStat(FactUserHouseFormDTO formDTO) { + return baseDao.houseStat(formDTO); + } - /** - * @Author sun - * @Description 【人房】房屋总数饼图 - **/ @Override - public HouseChartResultDTO houseChart(HouseChartFormDTO formDTO) { - HouseChartResultDTO resultDTO = new HouseChartResultDTO(); - //计算百分比使用,保留小数点后两位 - NumberFormat numberFormat = NumberFormat.getInstance(); - numberFormat.setMaximumFractionDigits(NumConstant.TWO); - //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息 - if (StringUtils.isEmpty(formDTO.getOrgId())) { - //2.获取工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); - if (null == staffInfo) { - throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); - } - formDTO.setOrgId(staffInfo.getAgencyId()); - formDTO.setOrgType("agency"); - } - //2.根据入参值查询对应的房屋统计数据 - List list = icHouseDao.houseChart(formDTO.getOrgId(), formDTO.getOrgType()); - //3.汇总数据 - AtomicInteger houseTotal = new AtomicInteger(); - list.forEach(l -> { - houseTotal.addAndGet(l.getNum()); - if (l.getRentFlag() == 0) { - resultDTO.setZzHouseTotal(l.getNum()); - } else if (l.getRentFlag() == 1) { - resultDTO.setCzHouseTotal(l.getNum()); - } else { - resultDTO.setXzHouseTotal(l.getNum()); - } - }); - resultDTO.setHouseTotal(houseTotal.get()); - resultDTO.setZzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getZzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getZzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); - resultDTO.setCzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getCzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); - resultDTO.setXzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getXzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getXzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100))); - resultDTO.setOrgId(formDTO.getOrgId()); - resultDTO.setOrgType(formDTO.getOrgType()); - return resultDTO; + public List neighborhoodStat(FactUserHouseFormDTO formDTO) { + return baseDao.neighborhoodStatStat(formDTO); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java index e792d7be1f..6d88596a7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java @@ -2,6 +2,7 @@ package com.epmet.service.stats; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import java.util.List; @@ -34,4 +35,6 @@ public interface FactUserHouseService { * @date 2022-05-27 */ List list(Map params); + + void stat(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 9ff2671fbb..044f6e63d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -81,9 +81,11 @@ public class DimGridServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); + String customerId = (String)params.get("customerId"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId); return wrapper; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 282d5f3695..122b6c8d91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -1,18 +1,26 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.enums.OrgLevelEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactGridUserHouseDailyEntity; +import com.epmet.service.org.HouseService; +import com.epmet.service.stats.DimGridService; import com.epmet.service.stats.FactAgencyUserHouseDailyService; import com.epmet.service.stats.FactGridUserHouseDailyService; import com.epmet.service.stats.FactUserHouseService; +import com.epmet.service.user.IcResiUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Optional; /** * 人房信息统计数,按天统计 @@ -29,6 +37,15 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { @Autowired private FactGridUserHouseDailyService factGridUserHouseDailyService; + @Autowired + private HouseService houseService; + + @Autowired + private IcResiUserService icResiUserService; + + @Autowired + private DimGridService dimGridService; + @Override public PageData page(Map params) { PageData page = null; @@ -55,4 +72,53 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { return list; } + @Override + public void stat(FactUserHouseFormDTO formDTO) { + String dateId = DateUtils.getBeforeNDay(NumConstant.ONE); + String customerId = formDTO.getCustomerId(); + + List neiList = houseService.neighborhoodStat(formDTO); + List houseList = houseService.houseStat(formDTO); + List userList = icResiUserService.userStat(formDTO); + + List addList = new ArrayList<>(); + + neiList.forEach(item -> { + String agencyId = item.getAgencyId(); + FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setDateId(dateId); + dto.setPid(item.getPid()); + dto.setPids(item.getPids()); + dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); + + Optional houseOptional = houseList.stream().filter(house -> agencyId.equals(house.getAgencyId()) && customerId.equals(house.getCustomerId())).findFirst(); + if (houseOptional.isPresent()) { + dto.setHouseCount(houseOptional.get().getHouseCount()); + dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount()); + dto.setHouseLeaseCount(houseOptional.get().getHouseLeaseCount()); + dto.setHouseIdleCount(houseOptional.get().getHouseIdleCount()); + } else { + dto.setHouseCount(NumConstant.ZERO); + dto.setHouseSelfCount(NumConstant.ZERO); + dto.setHouseLeaseCount(NumConstant.ZERO); + dto.setHouseIdleCount(NumConstant.ZERO); + } + + Optional userOptional = userList.stream().filter(user -> agencyId.equals(user.getAgencyId()) && customerId.equals(user.getCustomerId())).findFirst(); + if (userOptional.isPresent()) { + dto.setUserCount(userOptional.get().getUserCount()); + dto.setUserResiCount(userOptional.get().getUserResiCount()); + dto.setUserFloatCount(userOptional.get().getUserFloatCount()); + } else { + dto.setUserCount(NumConstant.ZERO); + dto.setUserResiCount(NumConstant.ZERO); + dto.setUserFloatCount(NumConstant.ZERO); + } + addList.add(dto); + }); + + List entityList = ConvertUtils.sourceToTarget(addList, FactGridUserHouseDailyEntity.class); + factGridUserHouseDailyService.insertBatch(entityList); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java index ea6a7e6261..12bc106b65 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java @@ -18,10 +18,12 @@ package com.epmet.service.user; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.dto.form.UserChartFormDTO; -import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.user.IcResiUserEntity; +import java.util.List; + /** * 用户基础信息 * @@ -30,10 +32,6 @@ import com.epmet.entity.user.IcResiUserEntity; */ public interface IcResiUserService extends BaseService { - /** - * @Author sun - * @Description 【人房】居民总数饼图 - **/ - UserChartResultDTO userChart(UserChartFormDTO formDTO); + List userStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java index ea583e56a0..b48086d053 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java @@ -17,24 +17,19 @@ package com.epmet.service.user.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -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.feign.ResultDataResolver; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.user.IcResiUserDao; -import com.epmet.dto.form.UserChartFormDTO; -import com.epmet.dto.result.UserChartResultDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.user.IcResiUserEntity; import com.epmet.service.user.IcResiUserService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import java.text.NumberFormat; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; /** * 用户基础信息 @@ -43,48 +38,13 @@ import java.util.concurrent.atomic.AtomicInteger; * @since v1.0.0 2021-10-26 */ @Slf4j +@DataSource(DataSourceConstant.EPMET_USER) @Service public class IcResiUserServiceImpl extends BaseServiceImpl implements IcResiUserService, ResultDataResolver { - /** - * @Author sun - * @Description 【人房】居民总数饼图 - **/ @Override - public UserChartResultDTO userChart(UserChartFormDTO formDTO) { - UserChartResultDTO resultDTO = new UserChartResultDTO(); - //计算百分比使用,保留小数点后两位 - NumberFormat numberFormat = NumberFormat.getInstance(); - numberFormat.setMaximumFractionDigits(NumConstant.TWO); - //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息 - if (StringUtils.isEmpty(formDTO.getOrgId())) { - //2.获取工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); - if (null == staffInfo) { - throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); - } - formDTO.setOrgId(staffInfo.getAgencyId()); - formDTO.setOrgType("agency"); - } - //2.根据入参值查询对应的房屋统计数据 - List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType()); - //3.汇总数据 - AtomicInteger userTotal = new AtomicInteger(); - list.forEach(l -> { - userTotal.addAndGet(l.getNum()); - if ("0".equals(l.getIsFloating())) { - resultDTO.setCzUserTotal(l.getNum()); - } else { - resultDTO.setLdUserTotal(l.getNum()); - } - }); - resultDTO.setUserTotal(userTotal.get()); - resultDTO.setCzUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100))); - resultDTO.setLdUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100))); - resultDTO.setOrgId(formDTO.getOrgId()); - resultDTO.setOrgType(formDTO.getOrgType()); - - return resultDTO; + public List userStat(FactUserHouseFormDTO formDTO) { + return baseDao.userStat(formDTO); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 2be94d9f5d..41f39be8ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -3,37 +3,58 @@ - SELECT - COUNT(id) num, - rent_flag rentFlag + g.CUSTOMER_ID, + g.id AS GRID_ID, + g.PID, + g.PIDS, + sum( CASE WHEN t.RENT_FLAG = '0' THEN 1 ELSE 0 END ) AS houseSelfCount, + sum( CASE WHEN t.RENT_FLAG = '1' THEN 1 ELSE 0 END ) AS houseLeaseCount, + sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, + sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount FROM - ic_house - WHERE del_flag = '0' - - - AND neighbor_hood_id IN ( - select id from ic_neighbor_hood - where del_flag = '0' - and (agency_id = #{orgId} OR agency_pids LIKE CONCAT('%', #{orgId}, '%')) - ) - - - AND neighbor_hood_id IN ( - select id from ic_neighbor_hood - where del_flag = '0' - and grid_id = #{orgId} - ) - - - AND neighbor_hood_id IN ( - select id from ic_neighbor_hood - where del_flag = '0' - and id = #{orgId} - ) - - - GROUP BY rent_flag + customer_grid g + LEFT JOIN ( + SELECT + h.id, + h.RENT_FLAG, + n.GRID_ID + FROM + ic_house h + LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id + WHERE + h.CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + ) t ON t.GRID_ID = g.ID + + + AND g.CUSTOMER_ID = #{customerId} + + + GROUP BY + g.CUSTOMER_ID, + g.id + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index e32ef99c58..54d5f37b7e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -3,26 +3,21 @@ - SELECT - COUNT(id) num, - is_floating isFloating + CUSTOMER_ID, + GRID_ID, + sum( CASE WHEN IS_FLOATING = '0' THEN 1 ELSE 0 END ) AS userResiCount, + sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, + sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount FROM ic_resi_user WHERE del_flag = '0' - - - AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) - - - AND grid_id = #{orgId} - - - AND village_id = #{orgId} - - - GROUP BY is_floating + AND CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + GROUP BY + CUSTOMER_ID, + AGENCY_ID From 9b5935ba7d8e161aa1c59c5b44b5b1c8b2ff0162 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 30 May 2022 09:50:36 +0800 Subject: [PATCH 193/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=88=9D=E5=A7=8B=E5=8C=96-=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=A1=B9=E7=9B=AE=E8=AE=AE=E9=A2=98=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=9A=84listern=EF=BC=8C@Autowire=E6=B3=A8=E5=85=A5=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E7=9A=84=E9=94=99=E8=AF=AF=E7=94=A8=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/mq/RocketMQConsumerRegister.java | 20 ++++++++++++++++++- .../IssueProjectCategoryTagInitListener.java | 12 +++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java index 9a5e2da482..65b2b9961f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java @@ -4,17 +4,35 @@ import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants; import com.epmet.commons.rocketmq.constants.TopicConstants; import com.epmet.commons.rocketmq.register.MQAbstractRegister; import com.epmet.commons.rocketmq.register.MQConsumerProperties; +import com.epmet.commons.tools.distributedlock.DistributedLock; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.mq.listener.IssueProjectCategoryTagInitListener; +import com.epmet.service.IssueProjectCategoryDictService; import org.apache.rocketmq.common.protocol.heartbeat.MessageModel; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class RocketMQConsumerRegister extends MQAbstractRegister { + @Autowired + private IssueProjectCategoryDictService issueProjectCategoryDictService; + + @Autowired + private DistributedLock distributedLock; + + @Autowired + private RedisUtils redisUtils; + @Override public void registerAllListeners(String env, MQConsumerProperties consumerProperties) { // 客户初始化监听器注册 - register(consumerProperties, ConsomerGroupConstants.ISSUE_PROJECT_CATEGORY_TAG, MessageModel.CLUSTERING, TopicConstants.INIT_CUSTOMER, "*", new IssueProjectCategoryTagInitListener()); + register(consumerProperties, + ConsomerGroupConstants.ISSUE_PROJECT_CATEGORY_TAG, + MessageModel.CLUSTERING, + TopicConstants.INIT_CUSTOMER, + "*", + new IssueProjectCategoryTagInitListener(issueProjectCategoryDictService, distributedLock, redisUtils)); // ...其他监听器类似 } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/listener/IssueProjectCategoryTagInitListener.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/listener/IssueProjectCategoryTagInitListener.java index a9eb9c436f..2e7c269025 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/listener/IssueProjectCategoryTagInitListener.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/mq/listener/IssueProjectCategoryTagInitListener.java @@ -31,21 +31,21 @@ public class IssueProjectCategoryTagInitListener implements MessageListenerConcu private Logger logger = LoggerFactory.getLogger(getClass()); - @Autowired private IssueProjectCategoryDictService issueProjectCategoryDictService; - @Autowired private DistributedLock distributedLock; private RedisUtils redisUtils; + public IssueProjectCategoryTagInitListener(IssueProjectCategoryDictService issueProjectCategoryDictService, DistributedLock distributedLock, RedisUtils redisUtils) { + this.issueProjectCategoryDictService = issueProjectCategoryDictService; + this.distributedLock = distributedLock; + this.redisUtils = redisUtils; + } + @Override public ConsumeConcurrentlyStatus consumeMessage(List msgs, ConsumeConcurrentlyContext context) { - if (redisUtils == null) { - redisUtils = SpringContextUtils.getBean(RedisUtils.class); - } - try { msgs.forEach(msg -> consumeMessage(msg)); } catch (Exception e) { From c5149b3f9ddd4df2c119c42b5365f84ef399fd72 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 30 May 2022 10:26:27 +0800 Subject: [PATCH 194/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ServiceProjectFormDTO.java | 9 ++- .../IcServiceProjectController.java | 26 +++++++ .../dao/IcServiceProjectAttachmentDao.java | 13 +++- .../com/epmet/dao/IcServiceProjectDao.java | 9 +++ .../service/IcServiceProjectService.java | 16 +++++ .../impl/IcServiceProjectServiceImpl.java | 71 ++++++++++++++++--- .../mapper/IcServiceProjectAttachmentDao.xml | 6 +- .../resources/mapper/IcServiceProjectDao.xml | 10 +++ 8 files changed, 145 insertions(+), 15 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java index cb1979f3a4..524628e95c 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java @@ -3,7 +3,6 @@ package com.epmet.dto.form; import com.epmet.dto.IcServiceProjectAttachmentDTO; import lombok.Data; -import javax.validation.Valid; import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.List; @@ -19,14 +18,15 @@ public class ServiceProjectFormDTO implements Serializable { private static final long serialVersionUID = -4573264697450644498L; public interface ServiceProjectAddForm{} + public interface ServiceProjectUpdateForm{} @NotBlank(message = "服务类别不能为空",groups = {ServiceProjectAddForm.class}) private String serviceCategoryKey; - @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class}) + @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class}) private String serviceName; - @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class}) + @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class}) private String serviceContent; /** @@ -43,6 +43,9 @@ public class ServiceProjectFormDTO implements Serializable { private String userId; + @NotBlank(message = "serviceProjectId不能为空",groups = {ServiceProjectUpdateForm.class}) + private String serviceProjectId; + /** * 附件集合 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index 016c0dff5d..6b76a3fea2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -103,4 +103,30 @@ public class IcServiceProjectController { return new Result().ok(icServiceProjectService.serviceProjectList(formDTO)); } + /** + * Desc: 修改【服务项目】 + * @param formDTO + * @author zxc + * @date 2022/5/30 09:36 + */ + @PostMapping("serviceProjectEdit") + public Result serviceProjectEdit(@RequestBody ServiceProjectFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectUpdateForm.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + icServiceProjectService.serviceProjectEdit(formDTO); + return new Result(); + } + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + @PostMapping("serviceProjectEnabled") + public Result serviceProjectEnabled(@RequestBody List ids){ + icServiceProjectService.serviceProjectEnabled(ids); + return new Result(); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java index 39a516c723..17eddc6215 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java @@ -3,6 +3,9 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcServiceProjectAttachmentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事件附件表 @@ -12,5 +15,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcServiceProjectAttachmentDao extends BaseDao { - + + /** + * Desc: 根据服务项目ID删除附件 + * @param id + * @author zxc + * @date 2022/5/30 09:50 + */ + void delAttachmentByServiceProjectId(@Param("id")String id); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java index dc12406c3b..528e9a06a5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java @@ -5,6 +5,7 @@ import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.dto.result.ServiceProjectListResultDTO; import com.epmet.entity.IcServiceProjectEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -25,4 +26,12 @@ public interface IcServiceProjectDao extends BaseDao { */ List getServiceProjectList(ServiceProjectListFormDTO formDTO); + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + void serviceProjectEnabled(@Param("ids") List ids); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java index f1097079fd..d81be7f0f2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java @@ -94,4 +94,20 @@ public interface IcServiceProjectService extends BaseService ids); + } \ No newline at end of file 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 4729645698..f2e3f4ff00 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 @@ -1,5 +1,6 @@ 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; @@ -15,7 +16,9 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcServiceProjectAttachmentDao; import com.epmet.dao.IcServiceProjectDao; +import com.epmet.dto.IcServiceProjectAttachmentDTO; import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO; @@ -50,6 +53,8 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl entities = ConvertUtils.sourceToTarget(formDTO.getAttachmentList(), IcServiceProjectAttachmentEntity.class); - Integer sort = NumConstant.ZERO; - for (IcServiceProjectAttachmentEntity e : entities) { - e.setCustomerId(formDTO.getCustomerId()); - e.setStatus("auto_passed"); - e.setSort(sort); - e.setIcServiceId(entity.getId()); - sort++; - } - attachmentService.insertBatch(entities); + disposeAttachment(formDTO.getAttachmentList(), formDTO.getCustomerId(), entity.getId()); } } @@ -172,4 +168,59 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl qw = new LambdaQueryWrapper<>(); + qw.eq(IcServiceProjectEntity::getId,formDTO.getServiceProjectId()); + IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(formDTO, IcServiceProjectEntity.class); + baseDao.update(entity,qw); + if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())){ + // 先删后增 + attachmentDao.delAttachmentByServiceProjectId(formDTO.getServiceProjectId()); + disposeAttachment(formDTO.getAttachmentList(), formDTO.getCustomerId(), formDTO.getServiceProjectId()); + } + } + + /** + * Desc: 上下架【服务项目】 + * @param ids + * @author zxc + * @date 2022/5/30 10:17 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void serviceProjectEnabled(List ids) { + if (CollectionUtils.isNotEmpty(ids)){ + baseDao.serviceProjectEnabled(ids); + } + } + + /** + * Desc: 附件处理 + * @param attachmentList + * @param customerId + * @param serviceId + * @author zxc + * @date 2022/5/30 10:17 + */ + public void disposeAttachment(List attachmentList,String customerId,String serviceId){ + List entities = ConvertUtils.sourceToTarget(attachmentList, IcServiceProjectAttachmentEntity.class); + Integer sort = NumConstant.ZERO; + for (IcServiceProjectAttachmentEntity e : entities) { + e.setCustomerId(customerId); + e.setStatus("auto_passed"); + e.setSort(sort); + e.setIcServiceId(serviceId); + sort++; + } + attachmentService.insertBatch(entities); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml index e93240c068..e33c5a3958 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectAttachmentDao.xml @@ -3,5 +3,9 @@ - + + + DELETE FROM ic_service_project_attachment + WHERE IC_SERVICE_ID = #{id} + \ No newline at end of file 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 b7d3b978fb..0a7e0183fb 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 @@ -3,6 +3,16 @@ + + + UPDATE ic_service_project + SET ENABLED = 1, + UPDATED_TIME = NOW() + WHERE ID IN ( + #{id} + ) + + From 0347a88abcf886e240713aa14d5e1851a2d6b29e Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 10:37:05 +0800 Subject: [PATCH 195/416] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/stats/form/FactUserHouseFormDTO.java | 5 + .../feign/DataStatisticalOpenFeignClient.java | 7 ++ ...ataStatisticalOpenFeignClientFallBack.java | 11 +++ .../controller/FactUserHouseController.java | 15 +-- .../dao/stats/FactGridUserHouseDailyDao.java | 2 + .../stats/FactGridUserHouseDailyService.java | 3 + .../service/stats/FactUserHouseService.java | 4 +- .../FactGridUserHouseDailyServiceImpl.java | 10 ++ .../stats/impl/FactUserHouseServiceImpl.java | 53 ++++++++-- .../stats/FactGridUserHouseDailyDao.xml | 99 ++++++++++++++++++- .../epmet/service/StatsUserHouseService.java | 18 ++++ .../impl/StatsUserHouseServiceImpl.java | 26 +++++ .../com/epmet/task/StatsUserHouseTask.java | 43 ++++++++ 13 files changed, 282 insertions(+), 14 deletions(-) create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java index 9206fcccd1..ed7492dbee 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/FactUserHouseFormDTO.java @@ -27,4 +27,9 @@ public class FactUserHouseFormDTO implements Serializable { */ private String dateId; + /** + * level + */ + private String level; + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 595977d64c..0aedb1d83e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -13,6 +13,7 @@ import com.epmet.dto.org.result.CustomerAgencyDTO; import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.user.form.StaffBaseInfoFormDTO; import com.epmet.dto.user.param.MidPatrolFormDTO; import com.epmet.dto.user.result.GridUserInfoDTO; @@ -368,4 +369,10 @@ public interface DataStatisticalOpenFeignClient { @PostMapping("/data/stats/screenextract/data_check") Result dataCheck(@RequestBody ExtractOriginFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatGrid") + Result userHouseStatGrid(@RequestBody FactUserHouseFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatAgency") + Result userHouseStatAgency(@RequestBody FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index 43e2a3445c..6ebe9d5004 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -14,6 +14,7 @@ import com.epmet.dto.org.result.CustomerAgencyDTO; import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.user.form.StaffBaseInfoFormDTO; import com.epmet.dto.user.param.MidPatrolFormDTO; import com.epmet.dto.user.result.GridUserInfoDTO; @@ -351,4 +352,14 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result dataCheck(ExtractOriginFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "dataCheck", formDTO); } + + @Override + public Result userHouseStatGrid(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatGrid", formDTO); + } + + @Override + public Result userHouseStatAgency(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatAgency", formDTO); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java index b1f2ee1f01..d36cf9a5e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java @@ -3,12 +3,9 @@ package com.epmet.controller; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.extract.form.ExtractOriginFormDTO; -import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.excel.FactUserHouseExcel; -import com.epmet.service.stats.FactAgencyUserHouseDailyService; import com.epmet.service.stats.FactUserHouseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -43,9 +40,15 @@ public class FactUserHouseController { ExcelUtils.exportExcelToTarget(response, null, list, FactUserHouseExcel.class); } - @PostMapping("stat") - public Result stat(@RequestBody FactUserHouseFormDTO formDTO) { - factUserHouseService.stat(formDTO); + @PostMapping("userHouseStatGrid") + public Result userHouseStatGrid(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.statGrid(formDTO); + return new Result(); + } + + @PostMapping("userHouseStatAgency") + public Result userHouseStatAgency(@RequestBody FactUserHouseFormDTO formDTO) { + factUserHouseService.statAgency(formDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java index 312dd37fbb..346ea6bf40 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java @@ -1,6 +1,7 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.stats.FactGridUserHouseDailyEntity; import org.apache.ibatis.annotations.Mapper; @@ -19,4 +20,5 @@ public interface FactGridUserHouseDailyDao extends BaseDao listPage(Map params); + List statAgency(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java index 72f1bb7e85..bd171008cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java @@ -3,6 +3,7 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.stats.FactGridUserHouseDailyEntity; @@ -76,4 +77,6 @@ public interface FactGridUserHouseDailyService extends BaseService statAgency(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java index 6d88596a7c..6b77221a07 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java @@ -36,5 +36,7 @@ public interface FactUserHouseService { */ List list(Map params); - void stat(FactUserHouseFormDTO formDTO); + void statGrid(FactUserHouseFormDTO formDTO); + + void statAgency(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java index 9ba325485b..54878a314e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.stats.FactGridUserHouseDailyDao; import com.epmet.dto.stats.FactGridUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.stats.FactGridUserHouseDailyEntity; import com.epmet.service.stats.FactGridUserHouseDailyService; @@ -50,9 +51,13 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); + String dateId = (String)params.get("dateId"); + String customerId = (String)params.get("customerId"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(dateId), "DATE_ID", dateId); + wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId); return wrapper; } @@ -84,4 +89,9 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl statAgency(FactUserHouseFormDTO formDTO){ + return baseDao.statAgency(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 122b6c8d91..c9f3baac89 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -5,8 +5,10 @@ import com.epmet.commons.tools.enums.OrgLevelEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dto.stats.FactGridUserHouseDailyDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; +import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; import com.epmet.entity.stats.FactGridUserHouseDailyEntity; import com.epmet.service.org.HouseService; import com.epmet.service.stats.DimGridService; @@ -14,13 +16,11 @@ import com.epmet.service.stats.FactAgencyUserHouseDailyService; import com.epmet.service.stats.FactGridUserHouseDailyService; import com.epmet.service.stats.FactUserHouseService; import com.epmet.service.user.IcResiUserService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; /** * 人房信息统计数,按天统计 @@ -73,8 +73,11 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { } @Override - public void stat(FactUserHouseFormDTO formDTO) { - String dateId = DateUtils.getBeforeNDay(NumConstant.ONE); + public void statGrid(FactUserHouseFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getDateId())) { + formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); + } + String dateId = formDTO.getDateId(); String customerId = formDTO.getCustomerId(); List neiList = houseService.neighborhoodStat(formDTO); @@ -121,4 +124,42 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { List entityList = ConvertUtils.sourceToTarget(addList, FactGridUserHouseDailyEntity.class); factGridUserHouseDailyService.insertBatch(entityList); } + + @Override + public void statAgency(FactUserHouseFormDTO formDTO) { + Map params = new HashMap<>(); + params.put("dateId", formDTO.getDateId()); + params.put("customerId", formDTO.getCustomerId()); + List list = factGridUserHouseDailyService.list(params); + if (list.isEmpty()) { + return; + } + + formDTO.setLevel("community"); + List commList = factGridUserHouseDailyService.statAgency(formDTO); + if (!commList.isEmpty()) { + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(commList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("street"); + List streetList = factGridUserHouseDailyService.statAgency(formDTO); + if (!streetList.isEmpty()) { + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(streetList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("district"); + List districtList = factGridUserHouseDailyService.statAgency(formDTO); + if (!districtList.isEmpty()) { + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(districtList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("city"); + List cityList = factGridUserHouseDailyService.statAgency(formDTO); + if (!cityList.isEmpty()) { + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(cityList, FactAgencyUserHouseDailyEntity.class)); + } + formDTO.setLevel("province"); + List provinceList = factGridUserHouseDailyService.statAgency(formDTO); + if (!provinceList.isEmpty()) { + factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(provinceList, FactAgencyUserHouseDailyEntity.class)); + } + + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 965cb87d1f..6108a2f5cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -40,7 +40,7 @@ LEFT JOIN dim_grid d ON d.id = g.GRID_ID AND g.CUSTOMER_ID = #{customerId} - AND g.CUSTOMER_ID = #{customerId} + AND d.CUSTOMER_ID = #{customerId} AND g.GRID_ID = #{agencyId} @@ -54,4 +54,101 @@ ORDER BY g.CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java new file mode 100644 index 0000000000..789d99c3ea --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java @@ -0,0 +1,18 @@ +package com.epmet.service; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.StatsFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; + +public interface StatsUserHouseService { + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseStatistical(FactUserHouseFormDTO formDTO); +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java new file mode 100644 index 0000000000..04d5b287fb --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java @@ -0,0 +1,26 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.StatsFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.feign.DataStatisticalOpenFeignClient; +import com.epmet.service.StatsUserHouseService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +@Service +public class StatsUserHouseServiceImpl implements StatsUserHouseService { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; + + @Override + public Result execUserHouseStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatGrid(formDTO); + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java new file mode 100644 index 0000000000..0b4cae80f2 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java @@ -0,0 +1,43 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.StatsFormDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; +import com.epmet.service.StatsUserHouseService; +import com.epmet.service.StatsUserService; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 人房 + * + * @author zhy + * @date 2022/5/30 10:23 + */ +@Component("statsUserHouseTask") +public class StatsUserHouseTask implements ITask { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private StatsUserHouseService statsUserHouseService; + + @Override + public void run(String params) { + logger.info("StatsUserHouseTask定时任务正在执行,参数为:{}", params); + FactUserHouseFormDTO formDTO = new FactUserHouseFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, FactUserHouseFormDTO.class); + } + Result result = statsUserHouseService.execUserHouseStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask定时任务执行失败:" + result.getMsg()); + } + } +} From 751d1099be67ebb193d588ef1ba2792642802326 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 10:59:33 +0800 Subject: [PATCH 196/416] =?UTF-8?q?=E6=A3=80=E6=B5=8BgridId=E8=80=8C?= =?UTF-8?q?=E9=9D=9Eagency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index c9f3baac89..2681ca34cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -87,7 +87,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { List addList = new ArrayList<>(); neiList.forEach(item -> { - String agencyId = item.getAgencyId(); + String gridId = item.getGridId(); FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); dto.setCustomerId(formDTO.getCustomerId()); dto.setDateId(dateId); @@ -95,7 +95,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { dto.setPids(item.getPids()); dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); - Optional houseOptional = houseList.stream().filter(house -> agencyId.equals(house.getAgencyId()) && customerId.equals(house.getCustomerId())).findFirst(); + Optional houseOptional = houseList.stream().filter(house -> gridId.equals(house.getGridId()) && customerId.equals(house.getCustomerId())).findFirst(); if (houseOptional.isPresent()) { dto.setHouseCount(houseOptional.get().getHouseCount()); dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount()); @@ -108,7 +108,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { dto.setHouseIdleCount(NumConstant.ZERO); } - Optional userOptional = userList.stream().filter(user -> agencyId.equals(user.getAgencyId()) && customerId.equals(user.getCustomerId())).findFirst(); + Optional userOptional = userList.stream().filter(user -> gridId.equals(user.getGridId()) && customerId.equals(user.getCustomerId())).findFirst(); if (userOptional.isPresent()) { dto.setUserCount(userOptional.get().getUserCount()); dto.setUserResiCount(userOptional.get().getUserResiCount()); From 8aa442d8395d22c6883239d4ae2120267b2eb471 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 11:09:08 +0800 Subject: [PATCH 197/416] =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/stats/impl/FactUserHouseServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 2681ca34cb..47a30955bd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -91,6 +91,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); dto.setCustomerId(formDTO.getCustomerId()); dto.setDateId(dateId); + dto.setGridId(gridId); dto.setPid(item.getPid()); dto.setPids(item.getPids()); dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); From 45e6c4722306927149cc6cc000273fc115cd6b6d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 30 May 2022 13:31:03 +0800 Subject: [PATCH 198/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/IcServiceOrgListFormDTO.java | 2 +- .../dto/result/IcServiceOrgListResultDTO.java | 2 +- .../IcServiceOrgSelectListResultDTO.java | 24 +++++++++ .../controller/IcServiceOrgController.java | 25 +++++++-- .../java/com/epmet/dao/IcServiceOrgDao.java | 9 ++++ .../epmet/service/IcServiceOrgService.java | 18 +++---- .../service/impl/IcServiceOrgServiceImpl.java | 51 +++++++++++++++++-- .../main/resources/mapper/IcServiceOrgDao.xml | 41 +++++++++++++-- 8 files changed, 149 insertions(+), 23 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java index f5eb0e8d1c..b0cceaeb79 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java @@ -27,7 +27,7 @@ public class IcServiceOrgListFormDTO implements Serializable { /** * 备注信息 */ - private String remarks; + private String remark; /** * 页码 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java index 46d4d21f1b..94de3be56c 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java @@ -60,7 +60,7 @@ public class IcServiceOrgListResultDTO implements Serializable { /** * 备注 */ - private String remarks; + private String remark; @Data public static class ServiceType { diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java new file mode 100644 index 0000000000..30f5ef457b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【组织】服务组织列表_下拉框使用--接口返参 + * @Author sun + */ +@Data +public class IcServiceOrgSelectListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 服务组织Id + */ + private String icServiceOrgId; + /** + * 服务组织名称 + */ + private String orgName; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java index 95fc3fcded..2232830346 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java @@ -13,10 +13,13 @@ import com.epmet.dto.IcServiceOrgDTO; import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; import com.epmet.dto.form.IcServiceOrgListFormDTO; import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; import com.epmet.service.IcServiceOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * 服务组织表 @@ -56,19 +59,33 @@ public class IcServiceOrgController { @NoRepeatSubmit @PostMapping("edit") - public Result edit(@RequestBody IcServiceOrgAddEditFormDTO dto){ - //效验数据 + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto){ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserId(tokenDto.getUserId()); icServiceOrgService.update(dto); return new Result(); } @PostMapping("del") - public Result delete(@RequestBody IcServiceOrgAddEditFormDTO formDTO){ + public Result delete(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, IcServiceOrgAddEditFormDTO.Del.class); - icServiceOrgService.delete(formDTO.getIcServiceOrgId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icServiceOrgService.delete(formDTO); return new Result(); } + @RequestMapping("detail") + public Result detail(@RequestBody IcServiceOrgListFormDTO formDTO) { + return new Result().ok(icServiceOrgService.detail(formDTO)); + } + + @RequestMapping("selectlist") + public Result> selectList(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icServiceOrgService.selectList(formDTO)); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java index 04472f9c0d..5407d8f10b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java @@ -3,6 +3,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.IcServiceOrgListFormDTO; import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; import com.epmet.entity.IcServiceOrgEntity; import org.apache.ibatis.annotations.Mapper; @@ -22,4 +23,12 @@ public interface IcServiceOrgDao extends BaseDao { * @Description 服务组织-列表查询 **/ List selectServiceOrgList(IcServiceOrgListFormDTO formDTO); + + /** + * @Author sun + * @Description 服务组织列表_下拉框 + **/ + List selectServiceOrgSelectList(IcServiceOrgListFormDTO formDTO); + + void del(IcServiceOrgEntity entity); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java index 716c00188d..3115e08d8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java @@ -6,8 +6,11 @@ import com.epmet.dto.IcServiceOrgDTO; import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; import com.epmet.dto.form.IcServiceOrgListFormDTO; import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; import com.epmet.entity.IcServiceOrgEntity; +import java.util.List; + /** * 服务组织表 * @@ -56,13 +59,10 @@ public interface IcServiceOrgService extends BaseService { */ void update(IcServiceOrgAddEditFormDTO dto); - /** - * 批量删除 - * - * @param icServiceOrgId - * @return void - * @author generator - * @date 2022-05-27 - */ - void delete(String icServiceOrgId); + void delete(IcServiceOrgAddEditFormDTO formDTO); + + IcServiceOrgListResultDTO detail(IcServiceOrgListFormDTO formDTO); + + List selectList(IcServiceOrgListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java index 8444957e8c..eacf96586e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.enums.DictTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -17,6 +18,7 @@ import com.epmet.dto.IcServiceOrgDTO; import com.epmet.dto.form.IcServiceOrgAddEditFormDTO; import com.epmet.dto.form.IcServiceOrgListFormDTO; import com.epmet.dto.result.IcServiceOrgListResultDTO; +import com.epmet.dto.result.IcServiceOrgSelectListResultDTO; import com.epmet.entity.IcServiceOrgEntity; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcServiceOrgService; @@ -115,7 +117,7 @@ public class IcServiceOrgServiceImpl extends BaseServiceImpl list = baseDao.selectServiceOrgList(formDTO); + + //封装服务类别数据 + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(NumConstant.ZERO); + //服务类别字典表数据 + Result> statusRes = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.IC_SERVICE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + List stList = new ArrayList<>(); + IcServiceOrgListResultDTO.ServiceType st = null; + for (String str : resultDTO.getServiceType().split(",")) { + st = new IcServiceOrgListResultDTO.ServiceType(); + st.setValue(str); + st.setName(null != statusMap.get(str) ? statusMap.get(str) : ""); + stList.add(st); + } + resultDTO.setServiceTypeList(stList); + } + + return resultDTO; + } + + @Override + public List selectList(IcServiceOrgListFormDTO formDTO) { + //1.获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); + } + //2.按条件查询当前组织及下级服务组织数据 + List resultList = baseDao.selectServiceOrgSelectList(formDTO); + + return resultList; } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml index fb9d2679ab..18c6dbe981 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceOrgDao.xml @@ -15,7 +15,7 @@ longitude longitude, latitude latitude, address address, - remarks remarks + remark remark FROM ic_service_org WHERE @@ -27,7 +27,10 @@ AND customer_id = #{customerId} - AND pids LIKE CONCAT('%',#{agencyId},'%') + AND agency_id_path LIKE CONCAT('%',#{agencyId},'%') + + + AND service_type LIKE CONCAT('%', #{serviceType}, '%') AND org_name LIKE CONCAT('%', #{orgName}, '%') @@ -35,11 +38,41 @@ AND address LIKE CONCAT('%', #{address}, '%') - - AND remarks LIKE CONCAT('%', #{remarks}, '%') + + AND remark LIKE CONCAT('%', #{remark}, '%') + + ORDER BY created_time DESC + + + + + UPDATE ic_service_org + SET del_flag = '1', + updated_by = #{updatedBy}, + updated_time = NOW() + WHERE + id = #{id} + AND del_flag = '0' + + \ No newline at end of file From 1eb63292955584eb037a5e6ce87b7bfcadd924f2 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 13:34:35 +0800 Subject: [PATCH 199/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/stats/FactGridUserHouseDailyDao.java | 2 ++ .../com/epmet/service/org/HouseService.java | 16 ++++++++++++++++ .../stats/FactGridUserHouseDailyService.java | 18 ++++++++++++++++++ .../service/stats/FactUserHouseService.java | 16 ++++++++++++++++ .../FactGridUserHouseDailyServiceImpl.java | 5 +++++ .../stats/impl/FactUserHouseServiceImpl.java | 2 ++ .../epmet/service/user/IcResiUserService.java | 8 ++++++++ .../mapper/stats/FactGridUserHouseDailyDao.xml | 8 ++++++++ 8 files changed, 75 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java index 346ea6bf40..d6ee4903be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java @@ -21,4 +21,6 @@ public interface FactGridUserHouseDailyDao extends BaseDao listPage(Map params); List statAgency(FactUserHouseFormDTO formDTO); + + void deleteByDateId(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java index fa7081cf7c..a174b06c26 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java @@ -30,8 +30,24 @@ import java.util.List; */ public interface HouseService { + /** + * 房屋统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ List houseStat(FactUserHouseFormDTO formDTO); + /** + * 小区统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ List neighborhoodStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java index bd171008cb..3e63b8c477 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java @@ -78,5 +78,23 @@ public interface FactGridUserHouseDailyService extends BaseService + * @author zhy + * @date 2022/5/30 13:32 + */ List statAgency(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java index 6b77221a07..8f3776908b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java @@ -36,7 +36,23 @@ public interface FactUserHouseService { */ List list(Map params); + /** + * 人房网格数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:31 + */ void statGrid(FactUserHouseFormDTO formDTO); + /** + * 人房组织数据 + * + * @param formDTO + * @return void + * @author zhy + * @date 2022/5/30 13:31 + */ void statAgency(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java index 54878a314e..c2232e4f56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java @@ -89,6 +89,11 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl statAgency(FactUserHouseFormDTO formDTO){ return baseDao.statAgency(formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 47a30955bd..48b82e2065 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -80,6 +80,8 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { String dateId = formDTO.getDateId(); String customerId = formDTO.getCustomerId(); + factGridUserHouseDailyService.deleteByDateId(formDTO); + List neiList = houseService.neighborhoodStat(formDTO); List houseList = houseService.houseStat(formDTO); List userList = icResiUserService.userStat(formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java index 12bc106b65..3f2289edef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java @@ -32,6 +32,14 @@ import java.util.List; */ public interface IcResiUserService extends BaseService { + /** + * 居民统计 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/5/30 13:33 + */ List userStat(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 6108a2f5cc..77b9f35449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -151,4 +151,12 @@ + + DELETE + FROM + fact_agency_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + \ No newline at end of file From 106bf78ee659bedc0e885295cc9daa35d853365b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 14:00:30 +0800 Subject: [PATCH 200/416] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E5=88=A0=E9=99=A4=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/stats/FactAgencyUserHouseDailyDao.java | 2 ++ .../stats/FactAgencyUserHouseDailyService.java | 11 +++++++++++ .../impl/FactAgencyUserHouseDailyServiceImpl.java | 6 ++++++ .../stats/impl/FactUserHouseServiceImpl.java | 6 ++++++ .../mapper/stats/FactAgencyUserHouseDailyDao.xml | 10 ++++++++++ .../mapper/stats/FactGridUserHouseDailyDao.xml | 2 +- .../com/epmet/service/StatsUserHouseService.java | 13 +++++++++++-- .../service/impl/StatsUserHouseServiceImpl.java | 8 ++++++-- .../java/com/epmet/task/StatsUserHouseTask.java | 15 ++++++++++----- 9 files changed, 63 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java index 9fc1e9dc60..a3a65195ae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java @@ -1,6 +1,7 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; import org.apache.ibatis.annotations.Mapper; @@ -19,4 +20,5 @@ public interface FactAgencyUserHouseDailyDao extends BaseDao listPage(Map params); + void deleteByDateId(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java index d0dfe6bfd3..4e42898302 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java @@ -3,6 +3,7 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; +import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; @@ -76,4 +77,14 @@ public interface FactAgencyUserHouseDailyService extends BaseService params = new HashMap<>(); params.put("dateId", formDTO.getDateId()); params.put("customerId", formDTO.getCustomerId()); @@ -138,6 +142,8 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { return; } + factAgencyUserHouseDailyService.deleteByDateId(formDTO); + formDTO.setLevel("community"); List commList = factGridUserHouseDailyService.statAgency(formDTO); if (!commList.isEmpty()) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml index a348c0d295..2be091d038 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml @@ -54,4 +54,14 @@ ORDER BY a.CREATED_TIME DESC + + + DELETE + FROM + fact_agency_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 77b9f35449..deed30076f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -154,7 +154,7 @@ DELETE FROM - fact_agency_user_house_daily + fact_grid_user_house_daily WHERE DATE_ID = #{dateId} AND CUSTOMER_ID = #{customerId} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java index 789d99c3ea..58c930e1a1 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java @@ -1,7 +1,6 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.StatsFormDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; public interface StatsUserHouseService { @@ -14,5 +13,15 @@ public interface StatsUserHouseService { * @author zhy * @date 2022/5/30 10:25 */ - Result execUserHouseStatistical(FactUserHouseFormDTO formDTO); + Result execUserHouseGridStatistical(FactUserHouseFormDTO formDTO); + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java index 04d5b287fb..30875e947b 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.StatsFormDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.feign.DataStatisticalOpenFeignClient; import com.epmet.service.StatsUserHouseService; @@ -20,7 +19,12 @@ public class StatsUserHouseServiceImpl implements StatsUserHouseService { private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; @Override - public Result execUserHouseStatistical(FactUserHouseFormDTO formDTO) { + public Result execUserHouseGridStatistical(FactUserHouseFormDTO formDTO) { return dataStatisticalOpenFeignClient.userHouseStatGrid(formDTO); } + + @Override + public Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatAgency(formDTO); + } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java index 0b4cae80f2..1a32b7c1c7 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java @@ -2,10 +2,8 @@ package com.epmet.task; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.StatsFormDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.service.StatsUserHouseService; -import com.epmet.service.StatsUserService; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,11 +31,18 @@ public class StatsUserHouseTask implements ITask { if (StringUtils.isNotBlank(params)) { formDTO = JSON.parseObject(params, FactUserHouseFormDTO.class); } - Result result = statsUserHouseService.execUserHouseStatistical(formDTO); + Result result = statsUserHouseService.execUserHouseGridStatistical(formDTO); if (result.success()) { - logger.info("StatsUserHouseTask定时任务执行成功"); + logger.info("StatsUserHouseTask-grid定时任务执行成功"); } else { - logger.error("StatsUserHouseTask定时任务执行失败:" + result.getMsg()); + logger.error("StatsUserHouseTask-grid定时任务执行失败:" + result.getMsg()); + } + + result = statsUserHouseService.execUserHouseAgencyStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask-agency定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask-agency定时任务执行失败:" + result.getMsg()); } } } From f8250fb0b973bf51dd1dadb56eca441937636081 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 30 May 2022 14:09:16 +0800 Subject: [PATCH 201/416] daimashegnchegn --- .../IcServiceProjectController.java | 19 ++++- .../com/epmet/dao/IcServiceRecordDao.java | 16 ++++ .../java/com/epmet/dao/IcServiceScopeDao.java | 18 +++++ .../epmet/entity/IcServiceRecordEntity.java | 79 +++++++++++++++++++ .../epmet/entity/IcServiceScopeEntity.java | 69 ++++++++++++++++ .../epmet/service/IcServiceRecordService.java | 20 +++++ .../epmet/service/IcServiceScopeService.java | 14 ++++ .../impl/IcServiceRecordServiceImpl.java | 51 ++++++++++++ .../impl/IcServiceScopeServiceImpl.java | 33 ++++++++ .../resources/mapper/IcServiceRecordDao.xml | 28 +++++++ .../resources/mapper/IcServiceScopeDao.xml | 29 +++++++ 11 files changed, 373 insertions(+), 3 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index 6b76a3fea2..ac8e54e7b4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -4,21 +4,20 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -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.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.service.IcServiceProjectService; +import com.epmet.service.IcServiceRecordService; 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; @@ -35,6 +34,9 @@ public class IcServiceProjectController { @Autowired private IcServiceProjectService icServiceProjectService; + @Autowired + private IcServiceRecordService icServiceRecordService; + @RequestMapping("page") public Result> page(@RequestParam Map params){ @@ -129,4 +131,15 @@ public class IcServiceProjectController { return new Result(); } + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * + * @param serviceId + * @return 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + @PostMapping("service/cancel/{service-id}") + public Result cancelService(@LoginUser TokenDto tokenDto, @PathVariable("service-id") String serviceId) { + icServiceRecordService.cancelService(serviceId, tokenDto.getUserId()); + return new Result(); + } } 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 new file mode 100644 index 0000000000..5efc925a36 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcServiceRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Mapper +public interface IcServiceRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java new file mode 100644 index 0000000000..416e8b2cd6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java @@ -0,0 +1,18 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcServiceScopeEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Mapper +public interface IcServiceScopeDao extends BaseDao { + + int update(@Param("serviceId") String serviceId, @Param("userId") String userId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java new file mode 100644 index 0000000000..e8bf9438da --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java @@ -0,0 +1,79 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_record") +public class IcServiceRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 服务类别ID + */ + private String serviceCategoryId; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务项目名称 + */ + private String serviceProjectName; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务组织名称 + */ + private String serviceOrgName; + + /** + * 经办人姓名 + */ + private String principalName; + + /** + * 联系方式 + */ + private String principalContact; + + /** + * 服务时间 + */ + private Date serviceTimeStart; + + /** + * 服务截止时间 + */ + private Date serviceTimeEnd; + + /** + * in_service服务中;completed:已完成 + */ + private String serviceStatus; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java new file mode 100644 index 0000000000..1bb64db4f6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java @@ -0,0 +1,69 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_scope") +public class IcServiceScopeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 服务类别ID + */ + private String serviceCategoryId; + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务组织ID + */ + private String serviceOrgId; + + /** + * 服务记录的ID + */ + private String serviceRecordId; + + /** + * agency单位;grid网格;neighborhood小区 + */ + private String objectType; + + /** + * 选中的组织的ID + */ + private String objectId; + + /** + * 发布范围的组织ID PATH + */ + private String objectIdPath; + + /** + * + */ + private String objectName; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java new file mode 100644 index 0000000000..a69cd1820b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java @@ -0,0 +1,20 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcServiceRecordEntity; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +public interface IcServiceRecordService extends BaseService { + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * @param serviceId + * 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + void cancelService(String serviceId,String userId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java new file mode 100644 index 0000000000..00603de5c3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java @@ -0,0 +1,14 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcServiceScopeEntity; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +public interface IcServiceScopeService extends BaseService { + +} \ 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 new file mode 100644 index 0000000000..7dca7793bc --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java @@ -0,0 +1,51 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.dao.IcServiceRecordDao; +import com.epmet.dao.IcServiceScopeDao; +import com.epmet.entity.IcServiceRecordEntity; +import com.epmet.service.IcServiceRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-30 + */ +@Service +public class IcServiceRecordServiceImpl extends BaseServiceImpl implements IcServiceRecordService { + @Autowired + private IcServiceScopeDao icServiceScopeDao; + + /** + * http://yapi.elinkservice.cn/project/245/interface/api/7820 + * + * @param serviceId 【服务项目记录】取消:进行中的项目可以取消。删除该记录 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void cancelService(String serviceId,String userId) { + IcServiceRecordEntity icServiceRecordEntity=queryRecordEntity(serviceId); + baseDao.deleteById(serviceId); + icServiceScopeDao.update(serviceId,userId); + } + + private IcServiceRecordEntity queryRecordEntity(String serviceId) { + IcServiceRecordEntity icServiceRecordEntity = baseDao.selectById(serviceId); + if (null == icServiceRecordEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),String.format("服务记录不存在,serviceId:%s",serviceId),"服务记录不存在"); + } + if (!"in_service".equals(icServiceRecordEntity.getServiceStatus())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("服务状态:%s", icServiceRecordEntity.getServiceStatus()), "只有服务中的项目可以取消"); + } + return icServiceRecordEntity; + } + + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java new file mode 100644 index 0000000000..ab8f87bf74 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java @@ -0,0 +1,33 @@ +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.IcServiceScopeDao; +import com.epmet.dto.IcServiceScopeDTO; +import com.epmet.entity.IcServiceScopeEntity; +import com.epmet.redis.IcServiceScopeRedis; +import com.epmet.service.IcServiceScopeService; +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-05-30 + */ +@Service +public class IcServiceScopeServiceImpl extends BaseServiceImpl implements IcServiceScopeService { + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml new file mode 100644 index 0000000000..746b4a4302 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml new file mode 100644 index 0000000000..8bf98e7d3e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + update ic_service_scope set del_flag='1',updatedTime=now(),updatedBy=#{userId} + where SERVICE_RECORD_ID=#{serviceId} + + \ No newline at end of file From 335f2298cfbf8e4e7be078eac33ce7366bbe8727 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 14:25:21 +0800 Subject: [PATCH 202/416] =?UTF-8?q?=E6=8C=87=E5=AE=9Acustomer=E8=A1=A8?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/stats/FactGridUserHouseDailyDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index deed30076f..8dabf42170 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -98,8 +98,8 @@ INNER JOIN dim_grid g ON g.id = d.GRID_ID INNER JOIN dim_agency c ON c.id = g.AGENCY_ID WHERE - DATE_ID = #{dateId} - AND CUSTOMER_ID = #{customerId} + d.DATE_ID = #{dateId} + AND d.CUSTOMER_ID = #{customerId} GROUP BY c.id From 25b3240fd9a65591e6d0c639b47133e423ff3c55 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 14:34:41 +0800 Subject: [PATCH 203/416] dateId --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 64b8246255..a7d94b76a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -147,26 +147,31 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { formDTO.setLevel("community"); List commList = factGridUserHouseDailyService.statAgency(formDTO); if (!commList.isEmpty()) { + commList.forEach(item -> item.setDateId(formDTO.getDateId())); factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(commList, FactAgencyUserHouseDailyEntity.class)); } formDTO.setLevel("street"); List streetList = factGridUserHouseDailyService.statAgency(formDTO); if (!streetList.isEmpty()) { + streetList.forEach(item -> item.setDateId(formDTO.getDateId())); factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(streetList, FactAgencyUserHouseDailyEntity.class)); } formDTO.setLevel("district"); List districtList = factGridUserHouseDailyService.statAgency(formDTO); if (!districtList.isEmpty()) { + districtList.forEach(item -> item.setDateId(formDTO.getDateId())); factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(districtList, FactAgencyUserHouseDailyEntity.class)); } formDTO.setLevel("city"); List cityList = factGridUserHouseDailyService.statAgency(formDTO); if (!cityList.isEmpty()) { + cityList.forEach(item -> item.setDateId(formDTO.getDateId())); factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(cityList, FactAgencyUserHouseDailyEntity.class)); } formDTO.setLevel("province"); List provinceList = factGridUserHouseDailyService.statAgency(formDTO); if (!provinceList.isEmpty()) { + provinceList.forEach(item -> item.setDateId(formDTO.getDateId())); factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(provinceList, FactAgencyUserHouseDailyEntity.class)); } From bcc9b738382bfb9e48352aec0c479fc5a14a158c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 30 May 2022 14:42:23 +0800 Subject: [PATCH 204/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java index 6288775a23..9b691c71bb 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java @@ -63,7 +63,7 @@ public class IcServiceOrgAddEditFormDTO implements Serializable { /** * 备注信息 */ - private String remarks; + private String remark; private String customerId; private String userId; From 81b678fa03acaaf22b7f668888e7883e2c443b3a Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 14:44:26 +0800 Subject: [PATCH 205/416] =?UTF-8?q?=E7=BB=84=E7=BB=87ID=E5=8F=96=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/stats/FactGridUserHouseDailyDao.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 8dabf42170..ca3a8ebb99 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -58,6 +58,7 @@ + SELECT + s.OBJECT_ID, + s.OBJECT_TYPE, + s.OBJECT_NAME, + s.OBJECT_ID_PATH + FROM + ic_service_scope s + WHERE + s.DEL_FLAG = '0' + AND s.SERVICE_RECORD_ID = #{serviceRecordId} + \ No newline at end of file From 7f05cb7acd1e7b56a1bcc4b60cb6380acae086c2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 30 May 2022 15:25:59 +0800 Subject: [PATCH 208/416] serviceCategoryKey --- .../com/epmet/entity/IcServiceScopeEntity.java | 2 +- .../service/impl/IcServiceScopeServiceImpl.java | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java index 1bb64db4f6..f4aa9c4549 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java @@ -24,7 +24,7 @@ public class IcServiceScopeEntity extends BaseEpmetEntity { /** * 服务类别ID */ - private String serviceCategoryId; + private String serviceCategoryKey; /** * 服务项目ID diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java index ab8f87bf74..8324f297d3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceScopeServiceImpl.java @@ -1,24 +1,10 @@ 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.IcServiceScopeDao; -import com.epmet.dto.IcServiceScopeDTO; import com.epmet.entity.IcServiceScopeEntity; -import com.epmet.redis.IcServiceScopeRedis; import com.epmet.service.IcServiceScopeService; -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; /** * From c88dc8873fb1472df983e2f8d47dd3d29cd4b8b5 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 15:33:15 +0800 Subject: [PATCH 209/416] =?UTF-8?q?=E7=81=B5=E6=B4=BB=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/org/IcHouseDao.xml | 4 ++-- .../src/main/resources/mapper/user/IcResiUserDao.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 41f39be8ec..e2dacf96e8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -24,7 +24,7 @@ ic_house h LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id WHERE - h.CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) ) t ON t.GRID_ID = g.ID @@ -46,7 +46,7 @@ FROM customer_grid g LEFT JOIN ic_neighbor_hood n ON n.GRID_ID = g.id - AND n.CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) AND g.CUSTOMER_ID = #{customerId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 54d5f37b7e..e83103a79a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -14,7 +14,7 @@ ic_resi_user WHERE del_flag = '0' - AND CREATED_TIME < DATE_SUB( CURDATE(), INTERVAL 1 DAY ) + AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) GROUP BY CUSTOMER_ID, AGENCY_ID From 53e24a571be35bf9d7c38457510ce0ca099a01ef Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 30 May 2022 15:36:58 +0800 Subject: [PATCH 210/416] serviceCategoryKey --- .../java/com/epmet/controller/IcServiceProjectController.java | 4 ++-- .../com/epmet/service/impl/IcServiceRecordServiceImpl.java | 3 +++ .../src/main/resources/mapper/IcServiceScopeDao.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index b0e21a1938..1a3b87b4f6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -140,8 +140,8 @@ public class IcServiceProjectController { * @return 【服务项目记录】取消:进行中的项目可以取消。删除该记录 */ @PostMapping("service/cancel/{service-id}") - public Result cancelService(@LoginUser TokenDto tokenDto, @PathVariable("service-id") String serviceId) { - icServiceRecordService.cancelService(serviceId, tokenDto.getUserId()); + public Result cancelService(@PathVariable("service-id") String serviceId) { + icServiceRecordService.cancelService(serviceId, "yzm"); return new Result(); } 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 67379acd5e..5ac3c537f7 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 @@ -83,6 +83,9 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl - update ic_service_scope set del_flag='1',updatedTime=now(),updatedBy=#{userId} + update ic_service_scope set del_flag='1',UPDATED_TIME=now(),UPDATED_BY=#{userId} where SERVICE_RECORD_ID=#{serviceId} From 3ef6a425db2017c67132899548c1a1627a872396 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 30 May 2022 15:37:19 +0800 Subject: [PATCH 211/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=A1=B9=E7=9B=AE=EF=BC=8C=E6=9C=8D=E5=8A=A1=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E6=A0=91=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ServiceProjectScopeResultDTO.java | 20 ++++ .../controller/ServiceProjectController.java | 35 ++++++ .../epmet/service/ServiceProjectService.java | 9 ++ .../impl/ServiceProjectServiceImpl.java | 107 ++++++++++++++++++ 4 files changed, 171 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java new file mode 100644 index 0000000000..a727b2dae8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ServiceProjectScopeResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceProjectScopeResultDTO { + + private String objectId; + private String objectName; + private String objectType; + + private List children; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java new file mode 100644 index 0000000000..6bae4e8f2f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/ServiceProjectController.java @@ -0,0 +1,35 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +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.result.ServiceProjectScopeResultDTO; +import com.epmet.service.ServiceProjectService; +import com.epmet.service.impl.ServiceProjectServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务项目 + */ +@RestController +@RequestMapping("icServiceProject") +public class ServiceProjectController { + + @Autowired + public ServiceProjectService serviceProjectService; + + + /** + * 服务范围树查询 + * @return + */ + @RequestMapping("service/serviceScopeTree") + public Result getServiceScopeTree(@LoginUser TokenDto loginInfo) { + ServiceProjectScopeResultDTO r = serviceProjectService.getServiceScopeTree(loginInfo.getUserId()); + return new Result().ok(r); + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java new file mode 100644 index 0000000000..22058470de --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/ServiceProjectService.java @@ -0,0 +1,9 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.result.ServiceProjectScopeResultDTO; +import com.epmet.entity.IcPlaceOrgEntity; + +public interface ServiceProjectService { + ServiceProjectScopeResultDTO getServiceScopeTree(String staffId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java new file mode 100644 index 0000000000..3e4fc139d5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/ServiceProjectServiceImpl.java @@ -0,0 +1,107 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dao.CustomerAgencyDao; +import com.epmet.dao.CustomerGridDao; +import com.epmet.dao.IcNeighborHoodDao; +import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.dto.result.AgencyTreeResultDTO; +import com.epmet.dto.result.ServiceProjectScopeResultDTO; +import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.entity.IcPlaceOrgEntity; +import com.epmet.service.CustomerAgencyService; +import com.epmet.service.NeighborHoodService; +import com.epmet.service.ServiceProjectService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class ServiceProjectServiceImpl implements ServiceProjectService { + + @Autowired + private CustomerAgencyDao agencyDao; + + @Autowired + private CustomerGridDao gridDao; + + @Autowired + private IcNeighborHoodDao neighborHoodDao; + + @Autowired + private CustomerAgencyService customerAgencyService; + + public ServiceProjectServiceImpl() { + System.out.println(6); + } + + @Override + public ServiceProjectScopeResultDTO getServiceScopeTree(String staffId) { + AgencyTreeResultDTO orgTreeData = customerAgencyService.getOrgTreeData(staffId); + + ServiceProjectScopeResultDTO rootScope = new ServiceProjectScopeResultDTO(); + rootScope.setObjectId(orgTreeData.getAgencyId()); + rootScope.setObjectType(orgTreeData.getLevel()); + rootScope.setObjectName(orgTreeData.getAgencyName()); + rootScope.setChildren(convert2ServiceProjectScope(orgTreeData.getSubAgencyList())); + + return rootScope; + } + + private List convert2ServiceProjectScope(List oldChildren) { + + ArrayList scopes = new ArrayList<>(); + + for (AgencyTreeResultDTO oldChild : oldChildren) { + ServiceProjectScopeResultDTO scope = new ServiceProjectScopeResultDTO(); + scope.setObjectId(oldChild.getAgencyId()); + scope.setObjectType(oldChild.getLevel()); + scope.setObjectName(oldChild.getAgencyName()); + if ("grid".equals(oldChild.getLevel())) { + // 如果是网格,那么还要查询网格下的小区 + List neighborhoods = neighborHoodDao.selectNeighborList(oldChild.getAgencyId()); + + List neighborhoodScopes = neighborhoods.stream().map(n -> new ServiceProjectScopeResultDTO(n.getId(), + n.getNeighborHoodName(), + "neighborhood", + null)).collect(Collectors.toList()); + + scope.setChildren(neighborhoodScopes); + } else { + // 递归处理子级 + List subAgencyList = oldChild.getSubAgencyList(); + if (subAgencyList != null && !CollectionUtils.isEmpty(subAgencyList)) { + List subOrgScope = convert2ServiceProjectScope(subAgencyList); + scope.setChildren(subOrgScope); + } + } + + scopes.add(scope); + } + + return scopes; + } + + //public void recursiveFillChildren(ServiceProjectScopeResultDTO parentObject) { + // String parentObjectType = parentObject.getObjectType(); + // if ("grid".equals(parentObjectType)) { + // // 如果父级是网格,那么查询子级小区 + // neighborHoodService.listNeighborhood() + // } else if ("agency".equals(parentObjectType)) { + // // 如果父级是单位,那么查询子级单位或者网格 + // String parentObjectId = parentObject.getObjectId(); + // if ("community".equals(parentObject)) { + // gridDao.get + // } else { + // agencyDao.getSubAgencyList() + // } + // } + // + //} +} From 43bcadeffc931788520af9d16289fa9426388a8b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 15:50:50 +0800 Subject: [PATCH 212/416] =?UTF-8?q?dim=E8=A1=A8=E7=AD=9B=E9=80=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/stats/FactGridUserHouseDailyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 15caa333c3..bd511e14db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -147,6 +147,7 @@ ) t ON t.AGENCY = ag.id WHERE ag.CUSTOMER_ID = #{customerId} + AND ag.AGENCY_DIM_TYPE = 'all' AND ag.`LEVEL` = 'community' From 600097ae2823af76eaa14c3c79dcad61e7cc5413 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 30 May 2022 15:55:56 +0800 Subject: [PATCH 213/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ServiceProjectListFormDTO.java | 6 ++++++ .../controller/IcServiceProjectController.java | 13 +++++++++++++ .../epmet/service/IcServiceProjectService.java | 9 +++++++++ .../service/impl/IcServiceProjectServiceImpl.java | 15 +++++++++++++++ .../main/resources/mapper/IcServiceProjectDao.xml | 7 ++++++- 5 files changed, 49 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java index 19ecf87d87..ff265a8a44 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,6 +16,8 @@ public class ServiceProjectListFormDTO extends PageFormDTO implements Serializab private static final long serialVersionUID = -6508966695564469253L; + public interface ServiceProjectDetail{} + private String serviceCategoryKey; private String serviceName; private String serviceContent; @@ -23,4 +26,7 @@ public class ServiceProjectListFormDTO extends PageFormDTO implements Serializab private String userId; private String agencyId; + @NotBlank(message = "serviceProjectId不能为空",groups = ServiceProjectDetail.class) + private String serviceProjectId; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index 1a3b87b4f6..4a0ef50363 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -15,6 +15,7 @@ import com.epmet.dto.form.IcServiceEditFormDTO; import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.dto.result.IcServiceRecDetailRes; +import com.epmet.dto.result.ServiceProjectListResultDTO; import com.epmet.service.IcServiceProjectService; import com.epmet.service.IcServiceRecordService; import org.springframework.beans.factory.annotation.Autowired; @@ -107,6 +108,18 @@ public class IcServiceProjectController { return new Result().ok(icServiceProjectService.serviceProjectList(formDTO)); } + /** + * Desc: 服务项目详情 + * @param formDTO + * @author zxc + * @date 2022/5/30 15:46 + */ + @PostMapping("serviceProjectDetail") + public Result serviceProjectDetail(@RequestBody ServiceProjectListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceProjectListFormDTO.ServiceProjectDetail.class); + return new Result().ok(icServiceProjectService.serviceProjectDetail(formDTO)); + } + /** * Desc: 修改【服务项目】 * @param formDTO diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java index d81be7f0f2..aa02487cab 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO; +import com.epmet.dto.result.ServiceProjectListResultDTO; import com.epmet.entity.IcServiceProjectEntity; import java.util.List; @@ -94,6 +95,14 @@ public interface IcServiceProjectService extends BaseService serviceProjectList = baseDao.getServiceProjectList(formDTO); + if (CollectionUtils.isNotEmpty(serviceProjectList)){ + return serviceProjectList.get(NumConstant.ZERO); + } + return new ServiceProjectListResultDTO(); + } + /** * Desc: 修改【服务项目】 * @param formDTO 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 0a7e0183fb..f702b0c98a 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 @@ -37,7 +37,12 @@ FROM ic_service_project WHERE DEL_FLAG = 0 AND ENABLED = 0 - AND AGENCY_ID = #{agencyId} + + AND ID = #{serviceProjectId} + + + AND AGENCY_ID = #{agencyId} + AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey} From c3ec06ec2c2c0f798e98038ca51caf86bb42c596 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 16:16:25 +0800 Subject: [PATCH 214/416] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=88=A4=E6=96=ADdel?= =?UTF-8?q?=3D0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/org/IcHouseDao.xml | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index e2dacf96e8..e6f28fc433 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -25,12 +25,14 @@ LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id WHERE h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) + AND n.DEL_FLAG = '0' + AND h.DEL_FLAG = '0' ) t ON t.GRID_ID = g.ID - - - AND g.CUSTOMER_ID = #{customerId} - - + WHERE + g.DEL_FLAG = '0' + + AND g.CUSTOMER_ID = #{customerId} + GROUP BY g.CUSTOMER_ID, g.id @@ -47,11 +49,12 @@ customer_grid g LEFT JOIN ic_neighbor_hood n ON n.GRID_ID = g.id AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) - - - AND g.CUSTOMER_ID = #{customerId} - - + AND n.DEL_FLAG = '0' + WHERE + g.DEL_FLAG = '0' + + AND g.CUSTOMER_ID = #{customerId} + GROUP BY g.CUSTOMER_ID, g.id; From a21ecb1ef9e5557820447683e845adb75aa47cde Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 30 May 2022 16:25:10 +0800 Subject: [PATCH 215/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=8A=A0=E4=BA=86=E4=B8=AA=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ServiceProjectListResultDTO.java | 1 + .../src/main/resources/mapper/IcServiceProjectDao.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java index f954047512..c47eaecca4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java @@ -47,6 +47,7 @@ public class ServiceProjectListResultDTO implements Serializable { * 政策级别 */ private String policyLevel; + private String policyLevelKey; private List attachmentList; 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 f702b0c98a..470ca57820 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 @@ -21,6 +21,7 @@ + @@ -31,11 +31,11 @@ SERVICE_CATEGORY_KEY AS serviceCategoryKey, ID AS serviceProjectId, POLICY_GROUND AS policyGround, - POLICY_LEVEL AS policyLevelKey, + POLICY_LEVEL AS policyLevel, (CASE WHEN POLICY_LEVEL = '0' THEN '市级' WHEN POLICY_LEVEL = '0' THEN '区级' WHEN POLICY_LEVEL = '0' THEN '街道级' - ELSE '' end) AS policyLevel + ELSE '' end) AS policyLevelName FROM ic_service_project WHERE DEL_FLAG = 0 AND ENABLED = 0 From b783eb4b01d0e018f703dc9ebc7ef1ebdb7110af Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 30 May 2022 16:41:41 +0800 Subject: [PATCH 217/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/FactAgencyUserHouseDailyDao.xml | 38 ++++++++++++++++--- .../stats/FactGridUserHouseDailyDao.xml | 33 +++++++++++----- 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml index 2be091d038..fbb98d5727 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml @@ -33,8 +33,19 @@ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index bd511e14db..5807a0b07f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -32,27 +32,40 @@ + + DELETE FROM diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 5807a0b07f..301d4e8dfa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -52,9 +52,12 @@ AND g.CUSTOMER_ID = #{customerId} AND d.CUSTOMER_ID = #{customerId} - + AND d.GRID_ID = #{agencyId} + + AND d.PID = #{agencyId} + AND d.DATE_ID = #{dateId} @@ -68,6 +71,43 @@ GRID_ID + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index d7765a73ef..57d72c45ac 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -104,12 +104,6 @@ AND d.DATE_ID = #{dateId} - - AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' ) - - - AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' ) - + select record.SERVICE_CATEGORY_KEY, + record.SERVICE_PROJECT_ID, + record.SERVICE_PROJECT_NAME, + record.SERVICE_ORG_ID, + record.SERVICE_ORG_NAME, + record.SERVICE_TIME_START, + record.SERVICE_TIME_END, + record.SERVICE_STATUS, + feedback.SERVICE_PEOPLE_NUMBER + from ic_service_record record + left join ic_service_feedback feedback on (record.ID = feedback.SERVICE_RECORD_ID) + + + and record.SERVICE_CATEGORY_KEY = #{serviceCategoryKey} + + + and record.SERVICE_PROJECT_NAME like CONCAT('%',#{serviceProjectName},'%') + + + and record.SERVICE_ORG_NAME like CONCAT('%',#{serviceOrgName},'%') + + + and ( + (record.SERVICE_TIME_START between #{serviceTimeStart} and #{serviceTimeEnd}) + or (record.SERVICE_TIME_END between #{serviceTimeStart} and #{serviceTimeEnd}) + ) + + + and record.SERVICE_STATUS = #{serviceStatus} + + + and feedback.SATISFACTION = #{satisfaction} + + + order by record.CREATED_TIME desc + \ No newline at end of file From 11ca6505d589e70cad8199d489f242ae5f44590b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 31 May 2022 09:19:22 +0800 Subject: [PATCH 225/416] detail --- .../epmet/dto/form/MyReportIcEvFormDTO.java | 4 +- .../epmet/controller/IcEventController.java | 16 +++++- .../com/epmet/service/IcEventService.java | 7 +++ .../service/impl/IcEventServiceImpl.java | 50 +++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java index 032a0c5b65..f313f6b406 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -29,6 +29,8 @@ public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { } public interface RemoveRedGroup { } - @NotBlank(message = "事件id不能为空", groups = {ReplyListGroup.class,RemoveRedGroup.class}) + public interface DetailGroup { + } + @NotBlank(message = "事件id不能为空", groups = {ReplyListGroup.class,RemoveRedGroup.class,DetailGroup.class}) private String icEventId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 24e4fc16f4..8e65d4273d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -8,11 +8,9 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; -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.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -346,6 +344,20 @@ public class IcEventController { return new Result>().ok(icEventService.myReport(formDTO).getList()); } + /** + * 居民端我上报的事件, 消息列表跳转详情 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("myreport-detail") + public Result myReportDetail(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.DetailGroup.class); + return new Result().ok(icEventService.myReportDetail(formDTO)); + } + /** * 居民端小程序我上报的事件详情页面-回复列表 * http://yapi.elinkservice.cn/project/102/interface/api/7783 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index acffa5765c..d7b548aca9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -208,4 +208,11 @@ public interface IcEventService extends BaseService { * @param formDTO */ void resiReply(ResiReplyIcEventFormDTO formDTO); + + /** + * 居民端我上报的事件, 消息列表跳转详情 + * @param formDTO + * @return + */ + MyReportIcEvResDTO myReportDetail(MyReportIcEvFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index a05d3d731d..5d1c2f9fbd 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1454,6 +1454,56 @@ public class IcEventServiceImpl extends BaseServiceImpl list=baseDao.selectMyReport(formDTO); + if (!CollectionUtils.isEmpty(list)) { + //封装数据 + for (MyReportIcEvResDTO dto : list) { + //每个事件对应的图片数据 + if (!CollectionUtils.isEmpty(dto.getAttachmentList())) { + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + for (IcEventAttachmentDTO file : dto.getAttachmentList()) { + if ("image".equals(file.getAttachmentType())) { + imageList.add(file.getAttachmentUrl()); + } else if ("voice".equals(file.getAttachmentType())) { + voiceList.add(file); + } + } + dto.setImageList(imageList); + dto.setVoiceList(voiceList); + } + + //分类信息 + if(StringUtils.isNotBlank(dto.getCategoryId())){ + List categoryList = new ArrayList<>(); + categoryList.add(dto.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(dto.getCategoryId())) { + if(StringUtils.isNotBlank(ca.getParentCategoryName())){ + //大类-子类 + dto.setCategoryName(ca.getParentCategoryName().concat(StrConstant.HYPHEN).concat(ca.getCategoryName())); + }else{ + dto.setCategoryName(ca.getCategoryName()); + } + } + } + } + + } + } + return list.get(NumConstant.ZERO); + } + private IcEventEntity checkReply(String icEventId) { //:0:已回复 1:已转项目 1:已转需求 IcEventEntity entity = baseDao.selectById(icEventId); From 37272083915b7e19246a8cb69c8e0131c23fb04b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 31 May 2022 09:41:35 +0800 Subject: [PATCH 226/416] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=9A=84=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/FactAgencyUserHouseDailyDao.java | 2 +- .../dao/stats/FactGridUserHouseDailyDao.java | 2 +- .../FactAgencyUserHouseDailyServiceImpl.java | 27 +++++++++--- .../FactGridUserHouseDailyServiceImpl.java | 32 ++++++++++---- .../stats/impl/FactUserHouseServiceImpl.java | 44 +++---------------- .../stats/FactAgencyUserHouseDailyDao.xml | 10 +++++ .../stats/FactGridUserHouseDailyDao.xml | 10 +++++ 7 files changed, 74 insertions(+), 53 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java index 068843b062..3bbdef4df6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyUserHouseDailyDao.java @@ -20,7 +20,7 @@ public interface FactAgencyUserHouseDailyDao extends BaseDao listPage(Map params); - FactUserHouseResultDTO getTotal(Map params); + List getTotal(Map params); void deleteByDateId(FactUserHouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java index 72d9c58c23..515333fc6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridUserHouseDailyDao.java @@ -20,7 +20,7 @@ public interface FactGridUserHouseDailyDao extends BaseDao listPage(Map params); - FactUserHouseResultDTO getTotal(Map params); + List getTotal(Map params); List statAgency(FactUserHouseFormDTO formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java index f2511e6e3d..2f9a3bd605 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java @@ -3,12 +3,12 @@ package com.epmet.service.stats.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.constant.NumConstant; 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.constant.FieldConstant; import com.epmet.dao.stats.FactAgencyUserHouseDailyDao; -import com.epmet.dto.ChangeDeathDTO; import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; import com.epmet.dto.stats.form.FactUserHouseFormDTO; import com.epmet.dto.stats.result.FactUserHouseResultDTO; @@ -46,7 +46,22 @@ public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl params) { params.put("customerId", loginUserUtil.getLoginUserCustomerId()); - return baseDao.getTotal(params); + List list = baseDao.getTotal(params); + + if (list.size() == NumConstant.ZERO) { + return null; + } else if (list.size() == NumConstant.ONE) { + return list.get(0); + } else { + FactUserHouseResultDTO first = list.get(0); + FactUserHouseResultDTO last = list.get(list.size() - 1); + FactUserHouseResultDTO dto = last; + dto.setHouseIncr(last.getHouseIncr() - first.getHouseIncr()); + dto.setHouseModify(last.getHouseModify() - first.getHouseModify()); + dto.setUserIncr(last.getUserIncr() - first.getUserIncr()); + dto.setUserModify(last.getUserModify() - first.getUserModify()); + return dto; + } } @Override @@ -56,8 +71,8 @@ public class FactAgencyUserHouseDailyServiceImpl 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); @@ -93,7 +108,7 @@ public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl params) { params.put("customerId", loginUserUtil.getLoginUserCustomerId()); - return baseDao.getTotal(params); + List list = baseDao.getTotal(params); + + if (list.size() == NumConstant.ZERO) { + return null; + } else if (list.size() == NumConstant.ONE) { + return list.get(0); + } else { + FactUserHouseResultDTO first = list.get(0); + FactUserHouseResultDTO last = list.get(list.size() - 1); + FactUserHouseResultDTO dto = last; + dto.setHouseIncr(last.getHouseIncr() - first.getHouseIncr()); + dto.setHouseModify(last.getHouseModify() - first.getHouseModify()); + dto.setUserIncr(last.getUserIncr() - first.getUserIncr()); + dto.setUserModify(last.getUserModify() - first.getUserModify()); + return dto; + } } @Override @@ -55,10 +71,10 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - String dateId = (String)params.get("dateId"); - String customerId = (String)params.get("customerId"); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String dateId = (String) params.get("dateId"); + String customerId = (String) params.get("customerId"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); @@ -96,12 +112,12 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl statAgency(FactUserHouseFormDTO formDTO){ + public List statAgency(FactUserHouseFormDTO formDTO) { return baseDao.statAgency(formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index c4bf83da0d..dfe659b250 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -73,50 +73,20 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { FactUserHouseResultDTO dto = null; if (params.containsKey("startTime") && params.containsKey("endTime")) { if (StringUtils.isNotBlank(params.get("startTime").toString()) && StringUtils.isNotBlank(params.get("endTime").toString())) { - if (params.containsKey("level")) { - if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { - params.put("dateId", params.get("startTime").toString().replaceAll("-", "")); - FactUserHouseResultDTO dtoStart = factGridUserHouseDailyService.getTotal(params); - params.put("dateId", params.get("endTime").toString().replaceAll("-", "")); - FactUserHouseResultDTO dtoEnd = factGridUserHouseDailyService.getTotal(params); - dto = dtoEnd; - dto.setHouseIncr(dtoEnd.getHouseIncr() - dtoStart.getHouseIncr()); - dto.setHouseModify(dtoEnd.getHouseModify() - dtoStart.getHouseModify()); - dto.setUserIncr(dtoEnd.getUserIncr() - dtoStart.getUserIncr()); - dto.setUserModify(dtoEnd.getUserModify() - dtoStart.getUserModify()); - } else { - params.put("dateId", params.get("startTime").toString().replaceAll("-", "")); - FactUserHouseResultDTO dtoStart = factAgencyUserHouseDailyService.getTotal(params); - params.put("dateId", params.get("endTime").toString().replaceAll("-", "")); - FactUserHouseResultDTO dtoEnd = factAgencyUserHouseDailyService.getTotal(params); - dto = dtoEnd; - dto.setHouseIncr(dtoEnd.getHouseIncr() - dtoStart.getHouseIncr()); - dto.setHouseModify(dtoEnd.getHouseModify() - dtoStart.getHouseModify()); - dto.setUserIncr(dtoEnd.getUserIncr() - dtoStart.getUserIncr()); - dto.setUserModify(dtoEnd.getUserModify() - dtoStart.getUserModify()); - } - } + params.put("dateId", StringUtils.EMPTY); } else { params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); - if (params.containsKey("level")) { - if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { - dto = factGridUserHouseDailyService.getTotal(params); - } else { - dto = factAgencyUserHouseDailyService.getTotal(params); - } - } } } else { params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); - if (params.containsKey("level")) { - if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { - dto = factGridUserHouseDailyService.getTotal(params); - } else { - dto = factAgencyUserHouseDailyService.getTotal(params); - } + } + if (params.containsKey("level")) { + if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { + dto = factGridUserHouseDailyService.getTotal(params); + } else { + dto = factAgencyUserHouseDailyService.getTotal(params); } } - return dto; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml index 50ca4b5ddf..9752b42407 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml @@ -114,6 +114,16 @@ AND a.DATE_ID = #{dateId} + + AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' ) + + + AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' ) + + GROUP BY + a.DATE_ID + ORDER BY + a.DATE_ID ASC diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index 57d72c45ac..b46b9467eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -104,6 +104,16 @@ AND d.DATE_ID = #{dateId} + + AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' ) + + + AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' ) + + GROUP BY + d.DATE_ID + ORDER BY + d.DATE_ID ASC - select record.SERVICE_CATEGORY_KEY, + select record.ID as serviceRecordId, + record.SERVICE_CATEGORY_KEY, record.SERVICE_PROJECT_ID, record.SERVICE_PROJECT_NAME, record.SERVICE_ORG_ID, From 3dfe378ae09b68fcfd2c2e1e1d15249fc5457e18 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 31 May 2022 14:37:49 +0800 Subject: [PATCH 240/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=BE=AE=E8=B0=83=E9=99=84=E4=BB=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcServiceProjectAttachmentDTO.java | 4 ++++ .../service/impl/IcServiceProjectServiceImpl.java | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java index c137d874e3..c7bbb863e8 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java @@ -35,21 +35,25 @@ public class IcServiceProjectAttachmentDTO implements Serializable { * 附件名 */ private String attachmentName; + private String name; /** * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) */ private String attachmentFormat; + private String format; /** * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) */ private String attachmentType; + private String type; /** * 附件地址 */ private String attachmentUrl; + private String url; /** * 排序字段 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 d7cc0fdefb..4ca63ab100 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 @@ -178,6 +178,15 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl serviceProjectList = baseDao.getServiceProjectList(formDTO); if (CollectionUtils.isNotEmpty(serviceProjectList)){ + DictListFormDTO dictListFormDTO = new DictListFormDTO(); + dictListFormDTO.setDictType("ic_service_type"); + Result> listResult = adminOpenFeignClient.dictList(dictListFormDTO); + if (!listResult.success()){ + throw new EpmetException("获取字典表数据失败,类型为:ic_service_type"); + } + if (CollectionUtils.isNotEmpty(listResult.getData())){ + serviceProjectList.forEach(p -> listResult.getData().stream().filter(l -> l.getValue().equals(p.getServiceCategoryKey())).forEach(l -> p.setServiceCategory(l.getLabel()))); + } return serviceProjectList.get(NumConstant.ZERO); } return new ServiceProjectListResultDTO(); @@ -226,6 +235,12 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl attachmentList,String customerId,String serviceId){ + attachmentList.forEach(a -> { + a.setAttachmentName(a.getName()); + a.setAttachmentFormat(a.getFormat()); + a.setAttachmentType(a.getType()); + a.setAttachmentUrl(a.getUrl()); + }); List entities = ConvertUtils.sourceToTarget(attachmentList, IcServiceProjectAttachmentEntity.class); Integer sort = NumConstant.ZERO; for (IcServiceProjectAttachmentEntity e : entities) { From 0fd601fd4ac77b3072ffa1e2435b80e0e6a87cf6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 31 May 2022 14:48:13 +0800 Subject: [PATCH 241/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=BE=AE=E8=B0=83=E9=99=84=E4=BB=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcServiceProjectDao.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 a0902d3568..ea4ae4a34b 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 @@ -61,10 +61,10 @@ + SELECT ID FROM ic_building_unit WHERE DEL_FLAG = '0' AND BUILDING_ID = #{buildingId} ORDER BY UNIT_NUM+0 DESC LIMIT #{size} + \ No newline at end of file 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 7df81d921a..a8222a88bb 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 @@ -380,4 +380,11 @@ WHERE h.ID = #{houseId} + + + From bacb611129c74f77e75c9789b12f24fef85ecf15 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 31 May 2022 16:24:04 +0800 Subject: [PATCH 248/416] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=AE=B6=E5=BA=AD?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/MyHomeController.java | 16 ++++++++++++++++ .../java/com/epmet/service/MyHomeService.java | 12 ++++++++++++ .../epmet/service/impl/MyHomeServiceImpl.java | 15 +++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java new file mode 100644 index 0000000000..97e28bd89f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -0,0 +1,16 @@ +package com.epmet.controller; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/5/31 16:20 + */ +@Slf4j +@RestController +@RequestMapping("myHome") +public class MyHomeController { +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java new file mode 100644 index 0000000000..6b5cc6c5e9 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java @@ -0,0 +1,12 @@ +package com.epmet.service; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/5/31 16:21 + */ +public interface MyHomeService { +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java new file mode 100644 index 0000000000..d6e4ef65ab --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -0,0 +1,15 @@ +package com.epmet.service.impl; + +import com.epmet.service.MyHomeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/5/31 16:22 + */ +@Service +@Slf4j +public class MyHomeServiceImpl implements MyHomeService { +} From 3890c7da3e903425be1301149cfc14dbfb3574e7 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 31 May 2022 16:29:17 +0800 Subject: [PATCH 249/416] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=90=88=E8=AE=A1?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/impl/FactAgencyUserHouseDailyServiceImpl.java | 6 +----- .../stats/impl/FactGridUserHouseDailyServiceImpl.java | 6 +----- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 3 +++ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java index 0da74e4358..8fbf82b671 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java @@ -74,11 +74,7 @@ public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl listExport(Map params) { - List list = baseDao.listPage(params); - FactUserHouseResultDTO dto = getTotal(params); - dto.setAgencyName("合计"); - list.add(dto); - return list; + return baseDao.listPage(params); } private QueryWrapper getWrapper(Map params) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java index 3a0ee91299..0aaa1f0c2e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java @@ -74,11 +74,7 @@ public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl listExport(Map params) { - List list = baseDao.listPage(params); - FactUserHouseResultDTO dto = getTotal(params); - dto.setAgencyName("合计"); - list.add(dto); - return list; + return baseDao.listPage(params); } private QueryWrapper getWrapper(Map params) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 4d8a39348d..9a2851cf83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -102,6 +102,9 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { list = factAgencyUserHouseDailyService.listExport(params); } } + FactUserHouseResultDTO dto = total(params); + dto.setAgencyName("合计"); + list.add(dto); return list; } From 64875de03c14995a3604bec9148d9448106e1eb7 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 31 May 2022 16:35:33 +0800 Subject: [PATCH 250/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A1=B9=E7=9B=AE=E6=9A=82=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=81=9A=E6=9C=8D=E5=8A=A1=E6=AC=A1=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcServiceRecordServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 3ade6e9c26..c93c53f0f5 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 @@ -163,13 +163,14 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); - query.eq(IcServiceRecordEntity::getServiceProjectId, input.getServiceProjectId()); - - if (serviceRecordDao.selectCount(query) > 0) { - String msg = "该项目已经发起服务,不能重复发起"; - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); - } + // 同一个项目暂时不做服务次数限制 + //LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + //query.eq(IcServiceRecordEntity::getServiceProjectId, input.getServiceProjectId()); + // + //if (serviceRecordDao.selectCount(query) > 0) { + // String msg = "该项目已经发起服务,不能重复发起"; + // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); + //} IcServiceProjectEntity serviceProject = serviceProjectDao.selectById(input.getServiceProjectId()); IcServiceOrgEntity serviceOrg = serviceOrgDao.selectById(input.getServiceOrgId()); From 96a1ee758d661d8440530745b8e5308c31a41cc0 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 16:56:38 +0800 Subject: [PATCH 251/416] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/opendata/dao/CaLoudongDao.java | 6 +++++- .../service/impl/CaLoudongServiceImpl.java | 20 ++++++++++++++----- .../main/resources/mapper/CaLoudongDao.xml | 3 +++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index 4ba0de48b3..a19fc1d264 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -2,9 +2,12 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.entity.CaLoudongEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 楼栋基本信息表 * @@ -13,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CaLoudongDao extends BaseDao { - + + List getList(); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 92baafb116..800dc1036c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -11,6 +11,8 @@ import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.redis.CaLoudongRedis; import com.epmet.opendata.service.CaLoudongService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,13 +34,21 @@ public class CaLoudongServiceImpl extends BaseServiceImpl page(Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, CaLoudongDTO.class); +// } + @Override public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, CaLoudongDTO.class); + PageHelper.startPage((int)(params.get("limit")),(int)(params.get("pageSize"))); + List list = baseDao.getList(); + PageInfo info = new PageInfo<>(list); + return new PageData<>(list, info.getTotal()); } @Override diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index a8c9a073a0..19b1635357 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -48,6 +48,9 @@ + \ No newline at end of file From 1549134785b90677998833545bf8b55b0b21ccd9 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 31 May 2022 17:07:19 +0800 Subject: [PATCH 252/416] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89feedback=E9=BB=98=E8=AE=A4=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcServiceRecordServiceImpl.java | 8 +++++++- 1 file changed, 7 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 c93c53f0f5..88d5559a34 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 @@ -188,7 +188,13 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl Date: Tue, 31 May 2022 17:45:28 +0800 Subject: [PATCH 253/416] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 9a2851cf83..218524d9a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -103,7 +103,9 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { } } FactUserHouseResultDTO dto = total(params); - dto.setAgencyName("合计"); + if (dto != null) { + dto.setAgencyName("合计"); + } list.add(dto); return list; } From 6860ef2fd8ea75e06245220886cf84cc4954089e Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 18:03:14 +0800 Subject: [PATCH 254/416] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/CaLoudongFormDTO.java | 20 +++ .../dto/result/CaLoudongResultDTO.java | 144 ++++++++++++++++++ .../controller/CaLoudongController.java | 9 +- .../com/epmet/opendata/dao/CaLoudongDao.java | 5 + .../opendata/service/CaLoudongService.java | 4 + .../service/impl/CaLoudongServiceImpl.java | 12 +- .../main/resources/mapper/CaLoudongDao.xml | 38 +++++ 7 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java new file mode 100644 index 0000000000..0246137ec3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.opendata.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaLoudongFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -5277855973512833181L; + + /** + * 小区名称 + */ + private String communityName; + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java new file mode 100644 index 0000000000..71f91a0aee --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongResultDTO.java @@ -0,0 +1,144 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaLoudongResultDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 2835612060476537433L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 94747e6d85..0b26ecc7da 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.excel.CaLoudongExcel; import com.epmet.opendata.service.CaLoudongService; import org.springframework.beans.factory.annotation.Autowired; @@ -77,6 +80,10 @@ public class CaLoudongController { ExcelUtils.exportExcelToTarget(response, null, list, CaLoudongExcel.class); } - + @PostMapping("getPage") + public Result getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto){ + PageData data = caLoudongService.getPage(dto); + return new Result().ok(data); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index a19fc1d264..ea07f329c4 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -2,9 +2,12 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.VolunteerPolyListResultDTO; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -18,4 +21,6 @@ import java.util.List; public interface CaLoudongDao extends BaseDao { List getList(); + + List getPage(@Param("communityName") String communityName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index 7ca6cf5071..5582d4ca7c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -4,6 +4,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.entity.CaLoudongEntity; @@ -77,4 +78,7 @@ public interface CaLoudongService extends BaseService { * @date 2022-05-31 */ void delete(String[] ids); + + PageData getPage(CaLoudongFormDTO dto); + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 800dc1036c..2cecd97795 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -1,13 +1,14 @@ package com.epmet.opendata.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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.opendata.dao.CaLoudongDao; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.redis.CaLoudongRedis; import com.epmet.opendata.service.CaLoudongService; @@ -94,4 +95,13 @@ public class CaLoudongServiceImpl extends BaseServiceImpl result = baseDao.getPage(dto.getCommunityName()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index 19b1635357..dfbfa7e6f1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -51,6 +51,44 @@ + \ No newline at end of file From 76fc621b46a468c35648cbb9468cdd11dc226ebd Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 18:05:06 +0800 Subject: [PATCH 255/416] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java | 5 ++++- .../epmet/opendata/service/impl/CaLoudongServiceImpl.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java index 0246137ec3..a027ab6492 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java @@ -6,7 +6,7 @@ import lombok.Data; import java.io.Serializable; @Data -public class CaLoudongFormDTO extends PageFormDTO implements Serializable { +public class CaLoudongFormDTO implements Serializable { private static final long serialVersionUID = -5277855973512833181L; @@ -15,6 +15,9 @@ public class CaLoudongFormDTO extends PageFormDTO implements Serializable { */ private String communityName; + private Integer page; + private Integer limit; + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 2cecd97795..72e12beb85 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -97,7 +97,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl result = baseDao.getPage(dto.getCommunityName()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); From 22b6ecc167958bbb52cf7035498c717ace4cf606 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 18:26:47 +0800 Subject: [PATCH 256/416] =?UTF-8?q?=E5=B9=B3=E6=88=BF=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/CaPingfangFormDTO.java | 18 +++ .../dto/result/CaPingfangResultDTO.java | 149 ++++++++++++++++++ .../controller/CaLoudongController.java | 5 +- .../controller/CaPingfangController.java | 8 + .../com/epmet/opendata/dao/CaPingfangDao.java | 7 +- .../opendata/service/CaLoudongService.java | 3 +- .../opendata/service/CaPingfangService.java | 3 + .../service/impl/CaLoudongServiceImpl.java | 2 +- .../service/impl/CaPingfangServiceImpl.java | 13 ++ .../main/resources/mapper/CaPingfangDao.xml | 38 +++++ 10 files changed, 241 insertions(+), 5 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java new file mode 100644 index 0000000000..d0b71aaf67 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaPingfangFormDTO implements Serializable { + + private static final long serialVersionUID = 7714897295294884648L; + + private String buildingName; + + private Integer page; + + private Integer limit; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java new file mode 100644 index 0000000000..21500d78d6 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaPingfangResultDTO.java @@ -0,0 +1,149 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CaPingfangResultDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 3689421598802326474L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 数据来源 + */ + private String platCode; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 0b26ecc7da..4af4b03fe0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.excel.CaLoudongExcel; import com.epmet.opendata.service.CaLoudongService; import org.springframework.beans.factory.annotation.Autowired; @@ -81,9 +82,9 @@ public class CaLoudongController { } @PostMapping("getPage") - public Result getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto){ + public Result> getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto){ PageData data = caLoudongService.getPage(dto); - return new Result().ok(data); + return new Result>().ok(data); } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java index 9a711482d1..8965ee4172 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; import com.epmet.opendata.excel.CaPingfangExcel; import com.epmet.opendata.service.CaPingfangService; import org.springframework.beans.factory.annotation.Autowired; @@ -77,6 +80,11 @@ public class CaPingfangController { ExcelUtils.exportExcelToTarget(response, null, list, CaPingfangExcel.class); } + @PostMapping("getPage") + public Result getPage(@RequestBody CaPingfangFormDTO dto, @LoginUser TokenDto tokenDto){ + PageData data = caPingfangService.getPage(dto); + return new Result().ok(data); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java index 1da89700be..c04d893cde 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -1,8 +1,12 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaPingfangResultDTO; import com.epmet.opendata.entity.CaPingfangEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CaPingfangDao extends BaseDao { - + + List getPage(@Param("buildingName") String buildingName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index 5582d4ca7c..14f743e0bd 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -5,6 +5,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; @@ -79,6 +80,6 @@ public interface CaLoudongService extends BaseService { */ void delete(String[] ids); - PageData getPage(CaLoudongFormDTO dto); + PageData getPage(CaLoudongFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java index 7000448d74..cbd6df414f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java @@ -4,6 +4,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; import com.epmet.opendata.entity.CaPingfangEntity; @@ -77,4 +78,6 @@ public interface CaPingfangService extends BaseService { * @date 2022-05-31 */ void delete(String[] ids); + + PageData getPage(CaPingfangFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 72e12beb85..e52f2ebab8 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -96,7 +96,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl getPage(CaLoudongFormDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); List result = baseDao.getPage(dto.getCommunityName()); PageInfo info = new PageInfo<>(result); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index eabae1b5a0..98e8cca469 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -8,9 +8,14 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.opendata.dao.CaPingfangDao; import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaPingfangResultDTO; import com.epmet.opendata.entity.CaPingfangEntity; import com.epmet.opendata.redis.CaPingfangRedis; import com.epmet.opendata.service.CaPingfangService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -84,4 +89,12 @@ public class CaPingfangServiceImpl extends BaseServiceImpl result = baseDao.getPage(dto.getBuildingName()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml index dc026dac51..6da205998e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -48,6 +48,44 @@ + \ No newline at end of file From 6e954ca9d1e2182889f3a3225892e2018b4e22e3 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 31 May 2022 18:34:26 +0800 Subject: [PATCH 257/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E3=80=90?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E5=AF=BC=E5=85=A5=E3=80=91?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E6=94=AF=E9=83=A8=E7=9A=84=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/ResiPartyMemberOpenFeignClient.java | 7 ++++++ ...esiPartyMemberOpenFeignClientFallback.java | 8 +++++++ .../impl/IcResiUserImportServiceImpl.java | 22 ++++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java index d88cd797b3..de18151595 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java @@ -1,7 +1,11 @@ package com.epmet.resi.partymember.feign; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberBaseInfoDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -124,4 +128,7 @@ public interface ResiPartyMemberOpenFeignClient { */ @PostMapping("/resi/partymember/icPartyMember/icPartyMemberSync") Result icPartyMemberSync(@RequestBody IcPartyMemberDTO dto); + + @PostMapping("/resi/partymember/icPartyOrg/branchlist") + public Result> branchlist(); } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java index 3a10c64914..69215d5380 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java @@ -1,8 +1,11 @@ package com.epmet.resi.partymember.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberBaseInfoDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -88,4 +91,9 @@ public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOp public Result icPartyMemberSync(IcPartyMemberDTO dto) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "icPartyMemberSync", dto); } + + @Override + public Result> branchlist() { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "branchlist", null); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index aabc11c092..1dada92bc1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -50,6 +50,7 @@ import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.handler.IcResiImportDynamicExcelListener; import com.epmet.excel.handler.IcResiVirtualSheetImportListener; import com.epmet.feign.*; +import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import com.epmet.service.IcResiUserImportService; import com.epmet.service.UserService; import com.google.common.cache.Cache; @@ -90,7 +91,7 @@ import java.util.stream.Collectors; public class IcResiUserImportServiceImpl implements IcResiUserImportService, ResultDataResolver { public static final List controlGroup1 = Arrays.asList("input", "textarea", "datepicker", "daterange"); - public static final List controlGroup2 = Arrays.asList("select", "radio"); + public static final List controlGroup2 = Arrays.asList("select", "radio", "cascader"); /** * 15位身份证号的正则表达式 @@ -168,6 +169,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @Autowired private OssFeignClient ossFeignClient; + @Autowired + private ResiPartyMemberOpenFeignClient partyMemberOpenFeignClient; /** * 子表中不需要的列。因为主表中需要身份证号,网格等信息,但子表中不需要这些列必填,只要有身份证号即可,因此字表判断的时候需要排除这些列 @@ -1341,6 +1344,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res case "/sys/dict/data/relationship": options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; + case "/resi/partymember/icPartyOrg/branchlist": + options = this.listBranchOptions(); + break; default: log.warn("listRemoteOptions url is not supported"); @@ -1383,6 +1389,20 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } + /** + * 支部列表选项 + * @return + */ + private List listBranchOptions() { + String msg = "查询支部列表失败"; + List branchList = getResultDataOrThrowsException(partyMemberOpenFeignClient.branchlist(), + ServiceConstant.RESI_PARTYMEMBER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); + //结果平铺展开 + Map resultMap = new HashMap<>(); + branchList.forEach(option-> option.getCurrenNodeAllChild(option,resultMap)); + return branchList; + } + @Override public Map listRemoteCascadeOptions(String pureUri, String cascadeItemId, Map columnWrappers, String currentStaffAgencyId, String query) { ColumnWrapper cascadeItemColumnWrapper = null; From e380c423429da1d3b67316ceefe1e9febefead2e Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 18:39:50 +0800 Subject: [PATCH 258/416] =?UTF-8?q?=E5=87=BA=E7=A7=9F=E6=88=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=88=86=E9=A1=B5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/CaRentalFormtDTO.java | 17 +++ .../dto/result/CaRentalResultDTO.java | 128 ++++++++++++++++++ .../controller/CaLoudongController.java | 2 +- .../controller/CaRentalController.java | 21 ++- .../com/epmet/opendata/dao/CaRentalDao.java | 8 +- .../opendata/service/CaRentalService.java | 4 + .../service/impl/CaRentalServiceImpl.java | 13 ++ .../src/main/resources/mapper/CaRentalDao.xml | 34 +++++ 8 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java new file mode 100644 index 0000000000..4626cb8b9e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRentalFormtDTO implements Serializable { + + private static final long serialVersionUID = -6052280300032032361L; + + private String residentName; + + private Integer page; + + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java new file mode 100644 index 0000000000..9264d24aac --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalResultDTO.java @@ -0,0 +1,128 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class CaRentalResultDTO implements Serializable { + + private static final long serialVersionUID = -1721373620271590333L; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 4af4b03fe0..4a410f7f8d 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -83,7 +83,7 @@ public class CaLoudongController { @PostMapping("getPage") public Result> getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto){ - PageData data = caLoudongService.getPage(dto); + PageData data = caLoudongService.getPage(dto); return new Result>().ok(data); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java index 3839f5dda6..46feab889e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.excel.CaRentalExcel; import com.epmet.opendata.service.CaRentalService; import org.springframework.beans.factory.annotation.Autowired; @@ -77,6 +83,19 @@ public class CaRentalController { ExcelUtils.exportExcelToTarget(response, null, list, CaRentalExcel.class); } - + /** + * 出租房信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:38 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaRentalFormtDTO dto, @LoginUser TokenDto tokenDto){ + PageData data = caRentalService.getPage(dto); + return new Result>().ok(data); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java index 74a16733c2..678d7f6880 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -2,8 +2,13 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaRentalEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 出租房信息表 @@ -13,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CaRentalDao extends BaseDao { - + + List getPage(@Param("residentName") String residentName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java index ab0ecc06ff..42d6184de3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java @@ -3,6 +3,8 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaRentalEntity; @@ -76,4 +78,6 @@ public interface CaRentalService extends BaseService { * @date 2022-05-31 */ void delete(String[] ids); + + PageData getPage(CaRentalFormtDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index 02fe9d27d0..67dfbe80e6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -9,9 +9,14 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.opendata.dao.CaRentalDao; import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalFormtDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaRentalEntity; import com.epmet.opendata.redis.CaRentalRedis; import com.epmet.opendata.service.CaRentalService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -85,4 +90,12 @@ public class CaRentalServiceImpl extends BaseServiceImpl getPage(CaRentalFormtDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getResidentName()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml index 851c086a46..72a4981833 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml @@ -44,6 +44,40 @@ + \ No newline at end of file From 4e444ad84f6ff28c8c4e9061b6f7a35cd23e4106 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 19:01:15 +0800 Subject: [PATCH 259/416] =?UTF-8?q?=E5=90=84=E7=A7=8D=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BB=A5=E5=8F=8A=E8=A1=A5=E5=85=85=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/CaResidentFormDTO.java | 17 ++ .../opendata/dto/form/CaRotatorsFormDTO.java | 17 ++ .../dto/result/CaResidentResultDTO.java | 197 +++++++++++++++++ .../dto/result/CaRotatorsResultDTO.java | 202 ++++++++++++++++++ .../controller/CaLoudongController.java | 23 +- .../controller/CaPingfangController.java | 25 ++- .../controller/CaRentalController.java | 16 +- .../controller/CaResidentController.java | 34 ++- .../controller/CaRotatorsController.java | 32 ++- .../com/epmet/opendata/dao/CaLoudongDao.java | 8 + .../com/epmet/opendata/dao/CaPingfangDao.java | 8 +- .../com/epmet/opendata/dao/CaRentalDao.java | 6 + .../com/epmet/opendata/dao/CaResidentDao.java | 13 +- .../com/epmet/opendata/dao/CaRotatorsDao.java | 13 +- .../opendata/service/CaLoudongService.java | 8 + .../opendata/service/CaPingfangService.java | 8 +- .../opendata/service/CaRentalService.java | 6 + .../opendata/service/CaResidentService.java | 10 + .../opendata/service/CaRotatorsService.java | 10 + .../service/impl/CaLoudongServiceImpl.java | 6 +- .../service/impl/CaPingfangServiceImpl.java | 6 +- .../service/impl/CaRentalServiceImpl.java | 4 +- .../service/impl/CaResidentServiceImpl.java | 13 ++ .../service/impl/CaRotatorsServiceImpl.java | 13 ++ .../main/resources/mapper/CaResidentDao.xml | 48 +++++ .../main/resources/mapper/CaRotatorsDao.xml | 49 +++++ 26 files changed, 739 insertions(+), 53 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java new file mode 100644 index 0000000000..24c57c4748 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaResidentFormDTO implements Serializable { + + private static final long serialVersionUID = 7243033732302561487L; + + private Integer page; + + private Integer limit; + + private String residentName; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java new file mode 100644 index 0000000000..7e704f8794 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.net.Inet4Address; + +@Data +public class CaRotatorsFormDTO implements Serializable { + + private static final long serialVersionUID = 3356808153818385932L; + + private String rotatorsName; + + private Integer page; + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java new file mode 100644 index 0000000000..8fac0b7cba --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentResultDTO.java @@ -0,0 +1,197 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaResidentResultDTO implements Serializable { + + private static final long serialVersionUID = 3876909002181822355L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java new file mode 100644 index 0000000000..7736d81e41 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsResultDTO.java @@ -0,0 +1,202 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaRotatorsResultDTO implements Serializable { + + private static final long serialVersionUID = -5388784241677803257L; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 4a410f7f8d..7ba9fc88db 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -38,20 +38,20 @@ public class CaLoudongController { private CaLoudongService caLoudongService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = caLoudongService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { CaLoudongDTO data = caLoudongService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody CaLoudongDTO dto){ + public Result save(@RequestBody CaLoudongDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); caLoudongService.save(dto); @@ -60,7 +60,7 @@ public class CaLoudongController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody CaLoudongDTO dto){ + public Result update(@RequestBody CaLoudongDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); caLoudongService.update(dto); @@ -68,7 +68,7 @@ public class CaLoudongController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); caLoudongService.delete(ids); @@ -81,8 +81,17 @@ public class CaLoudongController { ExcelUtils.exportExcelToTarget(response, null, list, CaLoudongExcel.class); } + /** + * 楼栋基本信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:57 + */ @PostMapping("getPage") - public Result> getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto){ + public Result> getPage(@RequestBody CaLoudongFormDTO dto, @LoginUser TokenDto tokenDto) { PageData data = caLoudongService.getPage(dto); return new Result>().ok(data); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java index 8965ee4172..5c5f592d43 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java @@ -24,8 +24,6 @@ import java.util.Map; /** - * - * * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-31 */ @@ -37,20 +35,20 @@ public class CaPingfangController { private CaPingfangService caPingfangService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = caPingfangService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { CaPingfangDTO data = caPingfangService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody CaPingfangDTO dto){ + public Result save(@RequestBody CaPingfangDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); caPingfangService.save(dto); @@ -59,7 +57,7 @@ public class CaPingfangController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody CaPingfangDTO dto){ + public Result update(@RequestBody CaPingfangDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); caPingfangService.update(dto); @@ -67,7 +65,7 @@ public class CaPingfangController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); caPingfangService.delete(ids); @@ -80,8 +78,17 @@ public class CaPingfangController { ExcelUtils.exportExcelToTarget(response, null, list, CaPingfangExcel.class); } + /** + * 平房基础信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/5/31 18:58 + */ @PostMapping("getPage") - public Result getPage(@RequestBody CaPingfangFormDTO dto, @LoginUser TokenDto tokenDto){ + public Result getPage(@RequestBody CaPingfangFormDTO dto, @LoginUser TokenDto tokenDto) { PageData data = caPingfangService.getPage(dto); return new Result().ok(data); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java index 46feab889e..3f207be576 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java @@ -40,20 +40,20 @@ public class CaRentalController { private CaRentalService caRentalService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = caRentalService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { CaRentalDTO data = caRentalService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody CaRentalDTO dto){ + public Result save(@RequestBody CaRentalDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); caRentalService.save(dto); @@ -62,7 +62,7 @@ public class CaRentalController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody CaRentalDTO dto){ + public Result update(@RequestBody CaRentalDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); caRentalService.update(dto); @@ -70,7 +70,7 @@ public class CaRentalController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); caRentalService.delete(ids); @@ -88,12 +88,12 @@ public class CaRentalController { * * @param dto * @param tokenDto - * @return com.epmet.commons.tools.utils.Result> + * @return com.epmet.commons.tools.utils.Result> * @author LZN * @date 2022/5/31 18:38 */ @PostMapping("getPage") - public Result> getPage(@RequestBody CaRentalFormtDTO dto, @LoginUser TokenDto tokenDto){ + public Result> getPage(@RequestBody CaRentalFormtDTO dto, @LoginUser TokenDto tokenDto) { PageData data = caRentalService.getPage(dto); return new Result>().ok(data); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java index 16a71987f9..1db7f53c20 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.excel.CaResidentExcel; import com.epmet.opendata.service.CaResidentService; import org.springframework.beans.factory.annotation.Autowired; @@ -34,20 +40,20 @@ public class CaResidentController { private CaResidentService caResidentService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = caResidentService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { CaResidentDTO data = caResidentService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody CaResidentDTO dto){ + public Result save(@RequestBody CaResidentDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); caResidentService.save(dto); @@ -56,7 +62,7 @@ public class CaResidentController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody CaResidentDTO dto){ + public Result update(@RequestBody CaResidentDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); caResidentService.update(dto); @@ -64,7 +70,7 @@ public class CaResidentController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); caResidentService.delete(ids); @@ -77,6 +83,18 @@ public class CaResidentController { ExcelUtils.exportExcelToTarget(response, null, list, CaResidentExcel.class); } - - + /** + * 人口基本信息分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 18:59 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaResidentFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caResidentService.getPage(dto); + return new Result>().ok(data); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java index d9cecee1d1..17c4bbd0ee 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -10,6 +12,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.excel.CaRotatorsExcel; import com.epmet.opendata.service.CaRotatorsService; import org.springframework.beans.factory.annotation.Autowired; @@ -34,20 +40,20 @@ public class CaRotatorsController { private CaRotatorsService caRotatorsService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = caRotatorsService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { CaRotatorsDTO data = caRotatorsService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody CaRotatorsDTO dto){ + public Result save(@RequestBody CaRotatorsDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); caRotatorsService.save(dto); @@ -56,7 +62,7 @@ public class CaRotatorsController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody CaRotatorsDTO dto){ + public Result update(@RequestBody CaRotatorsDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); caRotatorsService.update(dto); @@ -64,7 +70,7 @@ public class CaRotatorsController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); caRotatorsService.delete(ids); @@ -77,6 +83,20 @@ public class CaRotatorsController { ExcelUtils.exportExcelToTarget(response, null, list, CaRotatorsExcel.class); } + /** + * 流动人口分页 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/5/31 19:00 + */ + @PostMapping("getPage") + public Result> getPage(@RequestBody CaRotatorsFormDTO dto, @LoginUser TokenDto tokenDto) { + PageData data = caRotatorsService.getPage(dto); + return new Result>().ok(data); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index ea07f329c4..a481cfe5c6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -22,5 +22,13 @@ public interface CaLoudongDao extends BaseDao { List getList(); + /** + * 楼栋基本信息分页 + * + * @param communityName + * @return java.util.List + * @author LZN + * @date 2022/5/31 18:57 + */ List getPage(@Param("communityName") String communityName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java index c04d893cde..a07282a7b9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -9,13 +9,17 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * - * * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-31 */ @Mapper public interface CaPingfangDao extends BaseDao { + /** + * 平房基础信息分页 + * + * @param buildingName + * @return + */ List getPage(@Param("buildingName") String buildingName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java index 678d7f6880..0445a21752 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -19,5 +19,11 @@ import java.util.List; @Mapper public interface CaRentalDao extends BaseDao { + /** + * 出租房信息分页 + * + * @param residentName + * @return + */ List getPage(@Param("residentName") String residentName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index 1d9b7d32a9..c4a692f7f0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -2,8 +2,12 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 人口基本信息表 @@ -13,5 +17,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CaResidentDao extends BaseDao { - + + /** + * 人口基本信息分页 + * + * @param residentName + * @return + */ + List getPage(@Param("residentName") String residentName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java index 1a2c621df8..75222cdac9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -2,8 +2,12 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 流动人口表 @@ -13,5 +17,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CaRotatorsDao extends BaseDao { - + + /** + * 流动人口表 + * + * @param rotatorsName + * @return + */ + List getPage(@Param("rotatorsName") String rotatorsName); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index 14f743e0bd..34184648c8 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -80,6 +80,14 @@ public interface CaLoudongService extends BaseService { */ void delete(String[] ids); + /** + * 楼栋基本信息分页 + * + * @param dto + * @return com.epmet.commons.tools.page.PageData + * @author LZN + * @date 2022/5/31 18:57 + */ PageData getPage(CaLoudongFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java index cbd6df414f..7bd16e9185 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java @@ -12,8 +12,6 @@ import java.util.List; import java.util.Map; /** - * - * * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-31 */ @@ -79,5 +77,11 @@ public interface CaPingfangService extends BaseService { */ void delete(String[] ids); + /** + * 平房基础信息分页 + * + * @param dto + * @return + */ PageData getPage(CaPingfangFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java index 42d6184de3..2bda029408 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java @@ -79,5 +79,11 @@ public interface CaRentalService extends BaseService { */ void delete(String[] ids); + /** + * 出租房信息分页 + * + * @param dto + * @return + */ PageData getPage(CaRentalFormtDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java index 88aea32a41..7366edc7a7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -3,6 +3,8 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; @@ -76,4 +78,12 @@ public interface CaResidentService extends BaseService { * @date 2022-05-31 */ void delete(String[] ids); + + /** + * 人口基本信息分页 + * + * @param dto + * @return + */ + PageData getPage(CaResidentFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java index f483fc139e..c4bd0fcd1b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java @@ -3,6 +3,8 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; import java.util.List; @@ -75,4 +77,12 @@ public interface CaRotatorsService extends BaseService { * @date 2022-05-31 */ void delete(String[] ids); + + /** + * 流动人口表 + * + * @param dto + * @return + */ + PageData getPage(CaRotatorsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index e52f2ebab8..4c2e391b9a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -46,7 +46,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl page(Map params) { - PageHelper.startPage((int)(params.get("limit")),(int)(params.get("pageSize"))); + PageHelper.startPage((int) (params.get("limit")), (int) (params.get("pageSize"))); List list = baseDao.getList(); PageInfo info = new PageInfo<>(list); return new PageData<>(list, info.getTotal()); @@ -59,8 +59,8 @@ public class CaLoudongServiceImpl 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); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 98e8cca469..0b8f85c23f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -26,8 +26,6 @@ import java.util.List; import java.util.Map; /** - * - * * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-31 */ @@ -53,8 +51,8 @@ public class CaPingfangServiceImpl 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); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index 67dfbe80e6..0e2c5fa5b2 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -54,8 +54,8 @@ public class CaRentalServiceImpl 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); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index ccb5ebf7d8..89cb903a97 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -8,9 +8,14 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.opendata.dao.CaResidentDao; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; import com.epmet.opendata.redis.CaResidentRedis; import com.epmet.opendata.service.CaResidentService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -84,4 +89,12 @@ public class CaResidentServiceImpl extends BaseServiceImpl getPage(CaResidentFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getResidentName()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java index d7de043517..8c543ee45c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -8,9 +8,14 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.opendata.dao.CaRotatorsDao; import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; import com.epmet.opendata.redis.CaRotatorsRedis; import com.epmet.opendata.service.CaRotatorsService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -84,4 +89,12 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl getPage(CaRotatorsFormDTO dto) { + PageHelper.startPage(dto.getPage(), dto.getLimit()); + List result = baseDao.getPage(dto.getRotatorsName()); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index f631ecc5da..d04d1a282e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -58,6 +58,54 @@ + \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml index 2f764bcc53..a8bb0a1556 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -61,6 +61,55 @@ + \ No newline at end of file From d6052e66c0236d05e24921100ca9908eeff1520f Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 09:37:50 +0800 Subject: [PATCH 260/416] =?UTF-8?q?=E6=A5=BC=E6=A0=8B=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CaLoudongDetailsFormDTO.java | 17 +++ .../dto/result/CaLoudongDetailsResultDTO.java | 140 ++++++++++++++++++ .../controller/CaLoudongController.java | 17 +++ .../com/epmet/opendata/dao/CaLoudongDao.java | 10 ++ .../opendata/service/CaLoudongService.java | 9 ++ .../service/impl/CaLoudongServiceImpl.java | 8 + .../main/resources/mapper/CaLoudongDao.xml | 38 +++++ 7 files changed, 239 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java new file mode 100644 index 0000000000..eab041919e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongDetailsFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; + +@Data +public class CaLoudongDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = -496629781476101758L; + + /** + * 楼栋id + */ + private BigInteger buildingId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java new file mode 100644 index 0000000000..26c96888fe --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java @@ -0,0 +1,140 @@ +package com.epmet.opendata.dto.result; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class CaLoudongDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -8076699273641714744L; + + /** + * 楼栋ID + */ + private Long buildingId; + + /** + * 楼宇类型 + */ + private String buildingType; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 楼宇名称 + */ + private String buildingName; + + /** + * 用途分类 + */ + private String buildingUse; + + /** + * 楼宇状态 + */ + private String buildingStatus; + + /** + * 楼宇结构 + */ + private String buildingStructure; + + /** + * 使用现状 + */ + private String buildingUseage; + + /** + * 建筑时间 + */ + private Date constructionTime; + + /** + * 所处位置 + */ + private String buildingAddr; + + /** + * 小区(单位)名称 + */ + private String communityName; + + /** + * 楼栋长 + */ + private String buildingLeader; + + /** + * 楼层数 + */ + private Integer layerCount; + + /** + * 地下楼层数 + */ + private Integer basementLayerCount; + + /** + * 住宅开始层数 + */ + private Integer houseBeginLayer; + + /** + * 单元数 + */ + private Integer unitCount; + + /** + * 每层每单元户数 + */ + private Integer layerRoomCount; + + /** + * 总房屋数 + */ + private Integer roomCount; + + /** + * 电梯数量 + */ + private String elevatorCount; + + /** + * 建筑面积 + */ + private String buildingArea; + + /** + * 物业公司 + */ + private String buildingPmc; + + /** + * 介绍 + */ + private String buildingDesc; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 小区主键 + */ + private String communityId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 7ba9fc88db..275199a634 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -12,7 +12,9 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.excel.CaLoudongExcel; import com.epmet.opendata.service.CaLoudongService; @@ -96,4 +98,19 @@ public class CaLoudongController { return new Result>().ok(data); } + /** + * 楼栋基本信息详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/1 9:37 + */ + @PostMapping("getDetails") + public Result getLouDongDetails(@RequestBody CaLoudongDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaLoudongDetailsResultDTO result = caLoudongService.getLouDongDetails(dto); + return new Result().ok(result); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index a481cfe5c6..b0fff00b58 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -4,11 +4,13 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.VolunteerPolyListResultDTO; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.math.BigInteger; import java.util.List; /** @@ -31,4 +33,12 @@ public interface CaLoudongDao extends BaseDao { * @date 2022/5/31 18:57 */ List getPage(@Param("communityName") String communityName); + + /** + * 楼栋基本信息详情 + * + * @param buildingId + * @return + */ + CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index 34184648c8..6527e0dcc5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -4,7 +4,9 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; @@ -90,4 +92,11 @@ public interface CaLoudongService extends BaseService { */ PageData getPage(CaLoudongFormDTO dto); + /** + * 楼栋基本信息详情 + * + * @param dto + * @return + */ + CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 4c2e391b9a..9cc53db593 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -7,7 +7,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.opendata.dao.CaLoudongDao; import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.redis.CaLoudongRedis; @@ -103,5 +105,11 @@ public class CaLoudongServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + @Override + public CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto) { + CaLoudongDetailsResultDTO result = baseDao.getLouDongDetails(dto.getBuildingId()); + return result; + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index dfbfa7e6f1..e277fe991c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -89,6 +89,44 @@ + \ No newline at end of file From b0b5b6ee95f724a5bfe1af889a84817a4b91cfe9 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 10:09:55 +0800 Subject: [PATCH 261/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B1=8F=E8=94=BD=E5=B7=B2=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcServiceRecordDao.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml index 33c9d5ce0f..69838a2b91 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml @@ -37,6 +37,8 @@ from ic_service_record record left join ic_service_feedback feedback on (record.ID = feedback.SERVICE_RECORD_ID) + record.DEL_FLAG = '0' + and feedback.DEL_FLAG = '0' and record.SERVICE_CATEGORY_KEY = #{serviceCategoryKey} From 085ba123726af2e4d91be6713c9d5b1087305dac Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 10:16:45 +0800 Subject: [PATCH 262/416] emm --- .../constant/ImportErrorMsgConstants.java | 1 + .../model/ImportBuildingInfoListener.java | 2 +- .../impl/IcNeighborHoodServiceImpl.java | 26 +++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java index 0156f0e042..85f0d846f7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java @@ -9,6 +9,7 @@ public interface ImportErrorMsgConstants { String EXIST_ERROR = "数据已存在"; String UNIT_ERROR = "暂不支持单元数减小"; + String UNIT_EXIST_HOUSES_ERROR = "单元下存在房屋,不可修改单元数"; String DOCUMENT_EXIST_ERROR = "文件中存在重复数据"; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 94de07dbbc..e567bf017d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -188,7 +188,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener page(Map params) { @@ -598,7 +599,22 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl ids = icBuildingUnitDao.getUnitIdByBuildingId(building.getId(), size); + if (!org.springframework.util.CollectionUtils.isEmpty(ids)){ + Integer houseCount = icHouseDao.getHouseCountByUnitIds(ids); + if (houseCount.compareTo(NumConstant.ZERO) != NumConstant.ZERO){ + info.setBuildingUnitNumStatus(true); + }else { + icBuildingUnitDao.delUnit(ids); + icBuildingService.updateBuilding(info); + } + } }else { info.setBuildingId(building.getId()); icBuildingService.updateBuilding(info); From 2e0263fa3514696a7327ca032d165c96f949c69e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 10:20:11 +0800 Subject: [PATCH 263/416] remark --- .../main/java/com/epmet/dto/result/IcHouseListResultDTO.java | 2 ++ .../gov-org-server/src/main/resources/mapper/IcHouseDao.xml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java index 4c1b40288f..03a3431b68 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java @@ -79,6 +79,8 @@ public class IcHouseListResultDTO implements Serializable { */ private String ownerIdCard; + private String remark; + private Double sort; 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 a8222a88bb..54a455eac0 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 @@ -112,7 +112,8 @@ ag.ORGANIZATION_NAME agencyName, c.GRID_ID as gridId, gr.GRID_NAME, - IFNULL(a.sort,0) as sort + IFNULL(a.sort,0) as sort, + IFNULL(a.REMARK,'') AS remark 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' From 19f6e548ef85afde388b8bb2c80fed91e2b9601c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 1 Jun 2022 10:20:45 +0800 Subject: [PATCH 264/416] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9Aremark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/IcHouseListResultDTO.java | 2 +- .../gov-org-server/src/main/resources/mapper/IcHouseDao.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java index 4c1b40288f..1bcb7e45e9 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java @@ -80,6 +80,6 @@ public class IcHouseListResultDTO implements Serializable { private String ownerIdCard; private Double sort; - + private String remark; } 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 a8222a88bb..a1a37d1bc0 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 @@ -112,7 +112,8 @@ ag.ORGANIZATION_NAME agencyName, c.GRID_ID as gridId, gr.GRID_NAME, - IFNULL(a.sort,0) as sort + IFNULL(a.sort,0) as sort, + a.REMARK as remark 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' From 4a9d85f6c68f2c94196448172ca841c6c3b229c4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 1 Jun 2022 10:21:53 +0800 Subject: [PATCH 265/416] =?UTF-8?q?=E5=86=B2=E7=AA=81=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java index 966514bec9..069318849c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java @@ -82,6 +82,5 @@ public class IcHouseListResultDTO implements Serializable { private String remark; private Double sort; - private String remark; } From bacc04733495685a4d357179017cfe4985e4e52b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 1 Jun 2022 10:41:11 +0800 Subject: [PATCH 266/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.17__ic_service_project.sql | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql index 8544e93c1e..2e57e7ac20 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql @@ -40,4 +40,28 @@ CREATE TABLE `ic_service_project_attachment` ( `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; + +CREATE TABLE `ic_service_org` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '所属组织机构Id', + `AGENCY_ID_PATH` varchar(256) NOT NULL COMMENT 'agencyId的所有上级,包含自己', + `SERVICE_TYPE` varchar(64) NOT NULL COMMENT '服务类别【字典表 ic_service_type】多个值逗号分隔', + `ORG_NAME` varchar(64) NOT NULL COMMENT '服务组织名称', + `ORG_DESCRIBE` varchar(512) DEFAULT NULL COMMENT '组织描述', + `PRINCIPAL_NAME` varchar(64) NOT NULL COMMENT '负责人姓名', + `PRINCIPAL_MOBILE` varchar(11) NOT NULL COMMENT '负责人电话', + `LONGITUDE` varchar(64) DEFAULT NULL COMMENT '经度', + `LATITUDE` varchar(64) DEFAULT NULL COMMENT '纬度', + `ADDRESS` varchar(256) DEFAULT NULL COMMENT '地址', + `REMARK` varchar(512) DEFAULT NULL COMMENT '备注', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_pid` (`AGENCY_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='服务组织表'; From a3fd5d51c2704c235a7e93dd7844a89ee5c2dc96 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 10:44:37 +0800 Subject: [PATCH 267/416] building --- .../service/impl/IcNeighborHoodServiceImpl.java | 1 + .../src/main/resources/mapper/IcBuildingDao.xml | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) 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 7520503af6..c54ea3a436 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 @@ -604,6 +604,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl ids = icBuildingUnitDao.getUnitIdByBuildingId(building.getId(), size); if (!org.springframework.util.CollectionUtils.isEmpty(ids)){ 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 7e0d3bde18..92c486f24a 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 @@ -48,10 +48,18 @@ SET TOTAL_UNIT_NUM = #{totalUnitNum}, TOTAL_FLOOR_NUM = #{totalFloorNum}, TOTAL_HOUSE_NUM = #{totalHouseNum}, - BUILDING_LEADER_NAME = #{buildingLeaderName}, - BUILDING_LEADER_MOBILE = #{buildingLeaderMobile}, - SORT = #{sort}, - TYPE = #{type}, + + BUILDING_LEADER_NAME = #{buildingLeaderName}, + + + BUILDING_LEADER_MOBILE = #{buildingLeaderMobile}, + + + SORT = #{sort}, + + + TYPE = #{type}, + UPDATED_TIME = NOW() WHERE ID = #{buildingId} From 451c189bc3b04546b42f79c45bea464e85cc7ed2 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 11:01:07 +0800 Subject: [PATCH 268/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E5=92=8C=E5=8F=91=E8=B5=B7=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java | 3 +++ .../java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java | 2 ++ .../java/com/epmet/controller/IcServiceProjectController.java | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java index 83ad440628..231ab79b95 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; +import javax.validation.Valid; import javax.validation.constraints.NotBlank; import java.util.List; @@ -37,6 +38,8 @@ public class ServiceProjectFeedbackFormDTO { private String longitude; private String latitude; private String address; + + @Valid private List attachmentList; @Data diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java index 11b2c188ef..59d86bfac5 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.Valid; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @@ -56,6 +57,7 @@ public class ServiceProjectRecordFormDTO { */ private String remark; + @Valid private ServiceProjectFeedbackFormDTO feedback; private Integer pageNo = 1; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java index 654594f7d8..abcf757f89 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java @@ -206,7 +206,7 @@ public class IcServiceProjectController { @PostMapping("/service/initiate") public Result initiateService(@RequestBody ServiceProjectRecordFormDTO input) { - ValidatorUtils.validateEntity(input, ServiceProjectRecordFormDTO.Initiate.class); + ValidatorUtils.validateEntity(input, ServiceProjectRecordFormDTO.Initiate.class, ServiceProjectFeedbackFormDTO.InitiateGroup.class); icServiceRecordService.initiateService(input); return new Result(); From f9e1b30f56130584caf68469441651fff556fcbf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 1 Jun 2022 14:09:53 +0800 Subject: [PATCH 269/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4d215c16d9..1f36306bf0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -658,6 +658,7 @@ INNER JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID ) WHERE r.CUSTOMER_ID = #{customerId} + AND r.DEL_FLAG = '0' AND r.STATUS = 'finished' s.SERVER_ID = #{serverId} From 62b84a208c37b874ca7cc7bbec0ccfd9d03c924d Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 14:11:56 +0800 Subject: [PATCH 270/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E6=A1=A3?= =?UTF-8?q?=E5=8D=95=E4=B8=AA=E4=BA=8C=E7=BB=B4=E7=A0=81=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=EF=BC=9B=E5=8F=8A=E6=89=B9=E9=87=8F=E6=89=93=E5=8C=85zip?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/HouseQrcodeEnum.java | 40 +++++++++ .../epmet/dto/form/HouseQrcodeFormDTO.java | 19 +++++ .../dto/result/IcHouseListResultDTO.java | 5 ++ .../com/epmet/controller/HouseController.java | 72 +++++++++++++++- .../main/java/com/epmet/dao/IcHouseDao.java | 8 ++ .../java/com/epmet/entity/IcHouseEntity.java | 5 ++ .../java/com/epmet/service/HouseService.java | 9 ++ .../epmet/service/impl/HouseServiceImpl.java | 82 ++++++++++++++++++- .../src/main/resources/mapper/IcHouseDao.xml | 16 ++++ 9 files changed, 253 insertions(+), 3 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseQrcodeFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java new file mode 100644 index 0000000000..2cc8b464cb --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java @@ -0,0 +1,40 @@ +package com.epmet.commons.tools.enums; + +/** +* @describe: 一户一档二维码信息 +* @author wangtong +* @date 2022/6/1 13:34 +* @params +* @return +*/ +public enum HouseQrcodeEnum { + + SUFFIX(".png", "二维码格式的后缀"), + PREFIX("http://localhost:8080/epmet-oper-gov", "二维码地址的前缀"); + + + private String code; + private String name; + + + HouseQrcodeEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseQrcodeFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseQrcodeFormDTO.java new file mode 100644 index 0000000000..85925ec8f0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseQrcodeFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-01 13:44 + **/ +@Data +public class HouseQrcodeFormDTO implements Serializable { + + @NotNull(message = "id不可为空") + private String id; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java index 4c1b40288f..d3fa0c0576 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java @@ -81,5 +81,10 @@ public class IcHouseListResultDTO implements Serializable { private Double sort; + /** + * 房屋编码 + */ + private String houseCode; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index c79551d32a..38a243e368 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -30,13 +30,16 @@ import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.IcHouseFormDTO; +import com.epmet.commons.tools.enums.HouseQrcodeEnum; 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.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.BarcodeUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -44,6 +47,7 @@ import com.epmet.commons.tools.utils.poi.excel.handler.ExcelFillRowMergeStrategy import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; +import com.epmet.dao.IcHouseDao; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -61,9 +65,12 @@ import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import javax.imageio.ImageIO; +import javax.imageio.stream.ImageOutputStream; import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; -import java.io.PrintWriter; +import java.awt.image.BufferedImage; +import java.io.*; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -90,6 +97,9 @@ public class HouseController implements ResultDataResolver { @Autowired private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + @Autowired + private IcHouseDao icHouseDao; + @PostMapping("houselist") @MaskResponse(fieldNames = {"ownerIdCard", "ownerPhone"}, fieldsMaskType = { MaskResponse.MASK_TYPE_ID_CARD, MaskResponse.MASK_TYPE_MOBILE }) @@ -415,4 +425,62 @@ public class HouseController implements ResultDataResolver { } } + /** + * Desc: 生成某类型下的二维码 + * @param formDTO + * @author zxc + * @date 2022/3/2 10:32 上午 + */ + @PostMapping("createHouseQrcode") + public void createQrCode(@RequestBody HouseQrcodeFormDTO formDTO, HttpServletResponse response){ + ValidatorUtils.validateEntity(formDTO); + try { + IcHouseListResultDTO house = icHouseDao.selectHouseQrcodeById(formDTO.getId()); + if(null == house){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息","未查到房屋信息"); + } + //url组成:小程序地址?房屋编码 + String url = HouseQrcodeEnum.PREFIX.getCode()+"?houseCode="+house.getHouseCode(); + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName(), url); + //BufferedImage 转 InputStream + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream); + ImageIO.write(image, "png", imageOutput); + InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); + long length = imageOutput.length(); + String fileName = house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName()+".png"; + response.setContentType("application/octet-stream"); + response.setContentLength((int)length); + response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(fileName, StrConstant.UTF_8)); + + //输出流 + byte[] bytes = new byte[1024]; + OutputStream outputStream = response.getOutputStream(); + long count = 0; + while(count < length){ + int len = inputStream.read(bytes, 0, 1024); + count +=len; + outputStream.write(bytes, 0, len); + } + outputStream.flush(); + } catch (Exception e) { + log.error("method exception", e); + } + } + + /** + * @describe: 批量下载一户一档的二维码 + * @author wangtong + * @date 2022/5/31 17:58 + * @params [loginUser, formDTO, response] + * @return void + */ + @PostMapping(value = "/downloadZip") + public void downloadZip(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO, HttpServletResponse response) throws Exception { + //效验数据 + LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); + formDTO.setAgencyId(loginUserDetail.getAgencyId()); + ValidatorUtils.validateEntity(formDTO); + houseService.downloadZip(response,formDTO); + } } 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 e1cb4de562..4983e09e52 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 @@ -102,4 +102,12 @@ public interface IcHouseDao extends BaseDao { */ HouseAgencyInfoResultDTO getHouseAgencyInfo(@Param("houseId") String houseId); + /** + * @describe: 通过id查询房屋信息 + * @author wangtong + * @date 2022/6/1 13:56 + * @params [id] + * @return com.epmet.dto.result.IcHouseListResultDTO + */ + IcHouseListResultDTO selectHouseQrcodeById(@Param("id") String id); } 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 9383210f9c..73d6dfb77d 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 @@ -112,4 +112,9 @@ public class IcHouseEntity extends BaseEpmetEntity { */ private String remark; + /** + * 房屋编码 + */ + private String houseCode; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index e60bfb50ae..f663027f15 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -117,4 +117,13 @@ public interface HouseService { * @return */ PageData getHouseUser(TokenDto tokenDto, IcHouseListFormDTO formDTO, Cache haveSearchCache); + + /** + * @describe: 批量下载一户一档的二维码 + * @author wangtong + * @date 2022/5/31 18:00 + * @params [formDTO] + * @return void + */ + void downloadZip(HttpServletResponse response,IcHouseListFormDTO formDTO) throws Exception; } 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 0d23fd40fa..8a66ed40ea 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 @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.HouseQrcodeEnum; import com.epmet.commons.tools.enums.OrgTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; @@ -18,6 +19,7 @@ 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.security.dto.TokenDto; +import com.epmet.commons.tools.utils.BarcodeUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; @@ -52,14 +54,19 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; +import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; +import java.awt.image.BufferedImage; +import java.io.*; +import java.net.URLEncoder; import java.text.NumberFormat; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; @Slf4j @Service @@ -760,4 +767,77 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { return list; } + + @Override + public void downloadZip(HttpServletResponse response,IcHouseListFormDTO formDTO) throws Exception { + // 查询pids + String pids = null; + if (StringUtils.isNotBlank(formDTO.getAgencyId())) { + pids = getPids(formDTO.getAgencyId()); + } + if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())){ + pids = getPids(formDTO.getAgencyId()); + } + formDTO.setPids(pids); + + //response + response.reset(); + //文件的名称 + String downloadFilename = "二维码压缩包.zip"; + //转换中文否则可能会产生乱码 + downloadFilename = URLEncoder.encode(downloadFilename, "UTF-8"); + // 指明response的返回对象是文件流 + response.setContentType("application/octet-stream; charset=UTF-8"); + //设置下载格式和名称 + response.setHeader("Content-Disposition", "attachment;filename=" + downloadFilename); + ZipOutputStream zip = new ZipOutputStream(response.getOutputStream()); + + List houseList = icHouseDao.searchHouseByPage(formDTO); + + for(IcHouseListResultDTO house : houseList){ + + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName(), + HouseQrcodeEnum.PREFIX.getCode()+"?houseCode="+house.getHouseCode()); + + try { + byte[] buf = new byte[8192]; + int len; + //添加到zip + zip.putNextEntry(new ZipEntry(getFileName(house))); + InputStream inputStream = bufferedImageToInputStream(image); + //输出压缩包 + while ((len = inputStream.read(buf)) > 0) { + zip.write(buf, 0, len); + } + inputStream.close(); + } catch (IOException e) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "组装zip信息有误","组装zip信息有误"); + } + } + zip.close(); + } + + /** + * 将BufferedImage转换为InputStream + * + * @param image: 图片流 + * @date 2022/4/8 15:29 + * @author YD + */ + public static InputStream bufferedImageToInputStream(BufferedImage image) throws IOException { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + ImageIO.write(image, "png", os); + try (InputStream input = new ByteArrayInputStream(os.toByteArray())) { + return input; + } + } + + /** + * 获取文件名 + */ + public static String getFileName(IcHouseListResultDTO house) { + return house.getNeighborHoodName() + File.separator +house.getBuildingName() + File.separator +house.getUnitNum() + File.separator + house.getDoorName() + HouseQrcodeEnum.SUFFIX.getCode(); + } + + } 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 5fe411e6ee..1eaa2327bd 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 @@ -100,6 +100,7 @@ a.OWNER_NAME as ownerName, a.OWNER_PHONE as ownerPhone, a.OWNER_ID_CARD as ownerIdCard, + a.HOUSE_CODE, a.ID as houseId, c.ID as neighborHoodId, @@ -373,5 +374,20 @@ INNER JOIN ic_neighbor_hood nh ON (nh.ID = h.NEIGHBOR_HOOD_ID AND nh.DEL_FLAG = '0') WHERE h.ID = #{houseId} + From 6847bccdcd11b76ebb73e7e6484e1d4389c8d65b Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 14:18:27 +0800 Subject: [PATCH 271/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=AF=BC=E5=87=BA=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=94=AF=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 1dada92bc1..dedb6b1f20 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1418,6 +1418,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res options = getResultDataOrThrowsException(epmetHeartOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; + case "/resi/partymember/icPartyOrg/branchlist": + options = this.listBranchOptions(); + break; } if (options == null) { return null; From db2ea6e75c56e6e2d9f0e47cd93bbd38b2a04822 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 14:22:40 +0800 Subject: [PATCH 272/416] =?UTF-8?q?=E9=81=BF=E5=85=8D=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index dedb6b1f20..8562af6077 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1423,7 +1423,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res break; } if (options == null) { - return null; + return new HashMap<>(); } //结果平铺展开 Map resultMap = new HashMap<>(); From a3ac6358f2cb3cbf41580471807483d3bca4aa3b Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 14:36:07 +0800 Subject: [PATCH 273/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BD=BF=E7=94=A8=E4=BA=86rocketmq=E7=9A=84=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E9=83=BD=E5=8A=A0=E4=B8=8Arocketmq=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E7=9A=84=E6=97=A5=E5=BF=97appender=E3=80=82=E8=A7=A3?= =?UTF-8?q?=E5=86=B3mq=E6=97=A5=E5=BF=97=E8=BF=87=E5=A4=A7=EF=BC=8C?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E5=8D=A0=E7=94=A8=E7=A3=81=E7=9B=98=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ .../src/main/resources/logback-spring.xml | 27 ++++++++++++++++++ .../src/main/resources/logback-spring.xml | 28 +++++++++++++++++++ 8 files changed, 223 insertions(+) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml b/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml index ab8ee06fa8..94112d1c19 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml +++ b/epmet-admin/epmet-admin-server/src/main/resources/logback-spring.xml @@ -133,12 +133,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -152,6 +176,10 @@ + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml index 90d3242709..1a92303138 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml @@ -138,11 +138,35 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -166,6 +190,10 @@ + + + + diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml index c6a2ee5d59..63a188f67c 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/logback-spring.xml @@ -137,12 +137,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -156,6 +180,10 @@ + + + + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml index ffc7e45335..10b38db4be 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml @@ -138,12 +138,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -157,6 +181,10 @@ + + + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml index d6eb972115..49d364c747 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml @@ -138,12 +138,36 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -157,6 +181,10 @@ + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml index f985020aa1..9b1c2efa20 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml @@ -145,12 +145,36 @@ --> + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + + + + @@ -164,6 +188,10 @@ + + + + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml index d809abcfd7..594456d25f 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml @@ -108,6 +108,25 @@ DENY + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + @@ -144,6 +163,10 @@ + + + + @@ -157,6 +180,10 @@ + + + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml index a496703051..3eb3b4432f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml @@ -138,6 +138,26 @@ + + + + ${log.path}/rocketmqclient.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + @@ -147,6 +167,10 @@ + + + + @@ -164,6 +188,10 @@ + + + + From 36177f2c11989cf231e3ea49b295235ba008df42 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Wed, 1 Jun 2022 14:53:34 +0800 Subject: [PATCH 274/416] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=A1=A5=E5=85=85=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/org/IcHouseDao.xml | 27 ++++++++++--------- .../resources/mapper/user/IcResiUserDao.xml | 4 ++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index e6f28fc433..99aa5aa4e9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -12,21 +12,24 @@ sum( CASE WHEN t.RENT_FLAG = '0' THEN 1 ELSE 0 END ) AS houseSelfCount, sum( CASE WHEN t.RENT_FLAG = '1' THEN 1 ELSE 0 END ) AS houseLeaseCount, sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, - sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount + sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, + sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, + sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM customer_grid g LEFT JOIN ( - SELECT - h.id, - h.RENT_FLAG, - n.GRID_ID - FROM - ic_house h - LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id - WHERE - h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) - AND n.DEL_FLAG = '0' - AND h.DEL_FLAG = '0' + SELECT + h.id, + h.RENT_FLAG, + n.GRID_ID, + h.CREATED_TIME, + h.UPDATED_TIME + FROM + ic_house h + LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id + WHERE h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) + AND n.DEL_FLAG = '0' + AND h.DEL_FLAG = '0' ) t ON t.GRID_ID = g.ID WHERE g.DEL_FLAG = '0' diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index e83103a79a..ab80642698 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -9,7 +9,9 @@ GRID_ID, sum( CASE WHEN IS_FLOATING = '0' THEN 1 ELSE 0 END ) AS userResiCount, sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, - sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount + sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, + sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, + sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE From b4734ce3348134914227588cd8453e92eb924922 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 15:13:52 +0800 Subject: [PATCH 275/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9B=B8=E5=85=B3flyway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.17__ic_service_project.sql | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql index 2e57e7ac20..ed18a5dfb9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql @@ -65,3 +65,72 @@ CREATE TABLE `ic_service_org` ( PRIMARY KEY (`ID`) USING BTREE, KEY `idx_pid` (`AGENCY_ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='服务组织表'; + + +CREATE TABLE `ic_service_record` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_PROJECT_NAME` varchar(255) NOT NULL COMMENT '服务项目名称', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_ORG_NAME` varchar(255) NOT NULL COMMENT '服务组织名称', + `PRINCIPAL_NAME` varchar(32) DEFAULT NULL COMMENT '经办人姓名', + `PRINCIPAL_CONTACT` varchar(64) DEFAULT NULL COMMENT '联系方式', + `SERVICE_TIME_START` datetime NOT NULL COMMENT '服务时间', + `SERVICE_TIME_END` datetime NOT NULL COMMENT '服务截止时间', + `SERVICE_STATUS` varchar(32) NOT NULL COMMENT 'in_service服务中;completed:已完成', + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务项目记录表'; + +CREATE TABLE `ic_service_feedback` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_GOAL` varchar(255) DEFAULT NULL COMMENT '服务目标', + `SERVICE_EFFECT` varchar(255) DEFAULT NULL COMMENT '服务效果', + `SERVICE_PEOPLE_NUMBER` int(10) DEFAULT NULL COMMENT '服务人数', + `SATISFACTION` varchar(30) DEFAULT NULL COMMENT '满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect', + `LONGITUDE` varchar(255) DEFAULT NULL COMMENT '地址经度', + `LATITUDE` varchar(255) DEFAULT NULL COMMENT '地址纬度', + `address` varchar(64) DEFAULT NULL COMMENT '地址', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_RECORD_ID` varchar(64) NOT NULL, + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务项目反馈信息'; + + +CREATE TABLE `ic_service_scope` ( + `ID` varchar(64) NOT NULL, + `CUSTOMER_ID` varchar(64) NOT NULL, + `SERVICE_PROJECT_ID` varchar(64) NOT NULL COMMENT '服务项目ID', + `SERVICE_ORG_ID` varchar(64) NOT NULL COMMENT '服务组织ID', + `SERVICE_RECORD_ID` varchar(64) NOT NULL COMMENT '服务记录的ID', + `OBJECT_TYPE` varchar(32) NOT NULL COMMENT 'agency单位;grid网格;neighborhood小区', + `OBJECT_ID` varchar(64) NOT NULL COMMENT '选中的组织的ID', + `OBJECT_ID_PATH` varchar(255) NOT NULL COMMENT '发布范围的组织ID PATH', + `OBJECT_NAME` varchar(32) DEFAULT NULL, + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `SERVICE_CATEGORY_KEY` varchar(64) NOT NULL COMMENT '服务类别ID', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '服务范围表' \ No newline at end of file From 49eb26d653eec81814ca99a0cc9ef2005b8ef2d0 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 15:19:12 +0800 Subject: [PATCH 276/416] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E8=A1=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcResiUserConfirmDTO.java | 164 ++++++++++++++++++ .../IcResiUserConfirmController.java | 82 +++++++++ .../com/epmet/dao/IcResiUserConfirmDao.java | 16 ++ .../epmet/entity/IcResiUserConfirmEntity.java | 131 ++++++++++++++ .../epmet/excel/IcResiUserConfirmExcel.java | 105 +++++++++++ .../epmet/redis/IcResiUserConfirmRedis.java | 30 ++++ .../service/IcResiUserConfirmService.java | 78 +++++++++ .../impl/IcResiUserConfirmServiceImpl.java | 87 ++++++++++ .../resources/mapper/IcResiUserConfirmDao.xml | 39 +++++ 9 files changed, 732 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserConfirmExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcResiUserConfirmRedis.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml 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 new file mode 100644 index 0000000000..04cef90792 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java @@ -0,0 +1,164 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民信息审核表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class IcResiUserConfirmDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 网格ID + */ + private String gridId; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 户籍所在地地区码 + */ + private String hjszdCode; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地地区码 + */ + private String xjzdCode; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 民族【字典表】 + */ + private String mz; + + /** + * 与户主关系 + */ + private String yhzgx; + + /** + * 审核状态0未审核,1审核通过,2审核不通过 + */ + private String confirmResult; + + /** + * 审核不通过的原因 + */ + private String reason; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * ic_resi_user表id + */ + private String icUserId; + + /** + * 操作类型:新增add 修改 update 删除 delete + */ + private String submitType; + + /** + * 删除原因 + */ + private String deleteReason; + + /** + * 操作说明 + */ + private String operationDescribe; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java new file mode 100644 index 0000000000..0c2ca8bb4c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.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.IcResiUserConfirmDTO; +import com.epmet.excel.IcResiUserConfirmExcel; +import com.epmet.service.IcResiUserConfirmService; +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-01 + */ +@RestController +@RequestMapping("icResiUserConfirm") +public class IcResiUserConfirmController { + + @Autowired + private IcResiUserConfirmService icResiUserConfirmService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icResiUserConfirmService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcResiUserConfirmDTO data = icResiUserConfirmService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcResiUserConfirmDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icResiUserConfirmService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcResiUserConfirmDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icResiUserConfirmService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icResiUserConfirmService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icResiUserConfirmService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcResiUserConfirmExcel.class); + } + + + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java new file mode 100644 index 0000000000..b75a795424 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcResiUserConfirmEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民信息审核表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Mapper +public interface IcResiUserConfirmDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java new file mode 100644 index 0000000000..5fa0f886c9 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java @@ -0,0 +1,131 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 居民信息审核表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_resi_user_confirm") +public class IcResiUserConfirmEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 网格ID + */ + private String gridId; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 户籍所在地地区码 + */ + private String hjszdCode; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地地区码 + */ + private String xjzdCode; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 民族【字典表】 + */ + private String mz; + + /** + * 与户主关系 + */ + private String yhzgx; + + /** + * 审核状态0未审核,1审核通过,2审核不通过 + */ + private String confirmResult; + + /** + * 审核不通过的原因 + */ + private String reason; + + /** + * ic_resi_user表id + */ + private String icUserId; + + /** + * 操作类型:新增add 修改 update 删除 delete + */ + private String submitType; + + /** + * 删除原因 + */ + private String deleteReason; + + /** + * 操作说明 + */ + private String operationDescribe; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserConfirmExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserConfirmExcel.java new file mode 100644 index 0000000000..be302d0a35 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcResiUserConfirmExcel.java @@ -0,0 +1,105 @@ +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-01 + */ +@Data +public class IcResiUserConfirmExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id customer.id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "组织的pids") + private String pids; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "姓") + private String surname; + + @Excel(name = "名") + private String name; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "性别") + private String gender; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "出生日期") + private String birthday; + + @Excel(name = "户籍所在地地区码") + private String hjszdCode; + + @Excel(name = "户籍所在地") + private String hjszd; + + @Excel(name = "现居住地地区码") + private String xjzdCode; + + @Excel(name = "现居住地") + private String xjzd; + + @Excel(name = "民族【字典表】") + private String mz; + + @Excel(name = "与户主关系") + private String yhzgx; + + @Excel(name = "审核状态0未审核,1审核通过,2审核不通过") + private String confirmResult; + + @Excel(name = "审核不通过的原因") + private String reason; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "ic_resi_user表id") + private String icUserId; + + @Excel(name = "操作类型:新增add 修改 update 删除 delete") + private String submitType; + + @Excel(name = "删除原因") + private String deleteReason; + + @Excel(name = "操作说明") + private String operationDescribe; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcResiUserConfirmRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcResiUserConfirmRedis.java new file mode 100644 index 0000000000..7d94a32386 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcResiUserConfirmRedis.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-01 + */ +@Component +public class IcResiUserConfirmRedis { + @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-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java new file mode 100644 index 0000000000..49ee7ab60e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.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.IcResiUserConfirmDTO; +import com.epmet.entity.IcResiUserConfirmEntity; + +import java.util.List; +import java.util.Map; + +/** + * 居民信息审核表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +public interface IcResiUserConfirmService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcResiUserConfirmDTO + * @author generator + * @date 2022-06-01 + */ + IcResiUserConfirmDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void save(IcResiUserConfirmDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void update(IcResiUserConfirmDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-01 + */ + void delete(String[] ids); +} \ No newline at end of file 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 new file mode 100644 index 0000000000..2b8e58ceff --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserConfirmServiceImpl.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.IcResiUserConfirmDao; +import com.epmet.dto.IcResiUserConfirmDTO; +import com.epmet.entity.IcResiUserConfirmEntity; +import com.epmet.redis.IcResiUserConfirmRedis; +import com.epmet.service.IcResiUserConfirmService; +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-01 + */ +@Service +public class IcResiUserConfirmServiceImpl extends BaseServiceImpl implements IcResiUserConfirmService { + + @Autowired + private IcResiUserConfirmRedis icResiUserConfirmRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcResiUserConfirmDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcResiUserConfirmDTO.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 IcResiUserConfirmDTO get(String id) { + IcResiUserConfirmEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcResiUserConfirmDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcResiUserConfirmDTO dto) { + IcResiUserConfirmEntity entity = ConvertUtils.sourceToTarget(dto, IcResiUserConfirmEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcResiUserConfirmDTO dto) { + IcResiUserConfirmEntity entity = ConvertUtils.sourceToTarget(dto, IcResiUserConfirmEntity.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-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml new file mode 100644 index 0000000000..8d84dc6b0b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From d86036cb3bdec97db885d0af09680c01cb2f8ed8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 1 Jun 2022 15:39:10 +0800 Subject: [PATCH 277/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactNeighborhoodUserHouseDailyDTO.java | 144 ++++++++++++++++++ .../stats/result/FactUserHouseResultDTO.java | 10 ++ ...tNeighborhoodUserHouseDailyController.java | 73 +++++++++ .../FactNeighborhoodUserHouseDailyDao.java | 16 ++ .../FactNeighborhoodUserHouseDailyEntity.java | 114 ++++++++++++++ ...FactNeighborhoodUserHouseDailyService.java | 78 ++++++++++ ...NeighborhoodUserHouseDailyServiceImpl.java | 83 ++++++++++ .../FactNeighborhoodUserHouseDailyDao.xml | 35 +++++ 8 files changed, 553 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java new file mode 100644 index 0000000000..a491bbdd3d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactNeighborhoodUserHouseDailyDTO.java @@ -0,0 +1,144 @@ +package com.epmet.dto.stats; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class FactNeighborhoodUserHouseDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,customer_id+grid_id+date_id只有一条记录 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java index 67c5da0a6b..37c080deee 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/FactUserHouseResultDTO.java @@ -47,6 +47,16 @@ public class FactUserHouseResultDTO implements Serializable { */ private String agencyName; + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + /** * agency_id所属的机关级别(社区级:community, 乡(镇、街道)级:street, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java new file mode 100644 index 0000000000..d50d8faf1f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java @@ -0,0 +1,73 @@ +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.stats.FactNeighborhoodUserHouseDailyDTO; +import com.epmet.service.stats.FactNeighborhoodUserHouseDailyService; +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-01 + */ +@RestController +@RequestMapping("factNeighborhoodUserHouseDaily") +public class FactNeighborhoodUserHouseDailyController { + + @Autowired + private FactNeighborhoodUserHouseDailyService factNeighborhoodUserHouseDailyService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = factNeighborhoodUserHouseDailyService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + FactNeighborhoodUserHouseDailyDTO data = factNeighborhoodUserHouseDailyService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody FactNeighborhoodUserHouseDailyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + factNeighborhoodUserHouseDailyService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody FactNeighborhoodUserHouseDailyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + factNeighborhoodUserHouseDailyService.update(dto); + return new Result(); + } + + @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + factNeighborhoodUserHouseDailyService.delete(ids); + return new Result(); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java new file mode 100644 index 0000000000..f5b26bc331 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactNeighborhoodUserHouseDailyDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Mapper +public interface FactNeighborhoodUserHouseDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java new file mode 100644 index 0000000000..53b963b560 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java @@ -0,0 +1,114 @@ +package com.epmet.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_neighborhood_user_house_daily") +public class FactNeighborhoodUserHouseDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd; + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格所属的组织id + */ + private String pid; + + /** + * 网格所有上级id + */ + private String pids; + + /** + * 小区ID + */ + private String neighbourhoodsId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * 房屋总数 + */ + private Integer houseCount; + + /** + * 自住房屋总数 + */ + private Integer houseSelfCount; + + /** + * 出租房屋总数 + */ + private Integer houseLeaseCount; + + /** + * 闲置房屋总数 + */ + private Integer houseIdleCount; + + /** + * 居民总数 + */ + private Integer userCount; + + /** + * 常住居民总数 + */ + private Integer userResiCount; + + /** + * 流动居民总数 + */ + private Integer userFloatCount; + + /** + * 当日新增房屋数 + */ + private Integer houseIncr; + + /** + * 当日修改房屋数 + */ + private Integer houseModify; + + /** + * 当日新增居民数 + */ + private Integer userIncr; + + /** + * 当日修改居民数 + */ + private Integer userModify; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java new file mode 100644 index 0000000000..2b8f79e32c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java @@ -0,0 +1,78 @@ +package com.epmet.service.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格的人房信息统计数,按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +public interface FactNeighborhoodUserHouseDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactNeighborhoodUserHouseDailyDTO + * @author generator + * @date 2022-06-01 + */ + FactNeighborhoodUserHouseDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void save(FactNeighborhoodUserHouseDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void update(FactNeighborhoodUserHouseDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-01 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java new file mode 100644 index 0000000000..ad6e7f152c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.stats.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.stats.FactNeighborhoodUserHouseDailyDao; +import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO; +import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; +import com.epmet.service.stats.FactNeighborhoodUserHouseDailyService; +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-01 + */ +@Service +public class FactNeighborhoodUserHouseDailyServiceImpl extends BaseServiceImpl implements FactNeighborhoodUserHouseDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactNeighborhoodUserHouseDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactNeighborhoodUserHouseDailyDTO.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 FactNeighborhoodUserHouseDailyDTO get(String id) { + FactNeighborhoodUserHouseDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactNeighborhoodUserHouseDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactNeighborhoodUserHouseDailyDTO dto) { + FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactNeighborhoodUserHouseDailyDTO dto) { + FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.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/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml new file mode 100644 index 0000000000..41e6a25a05 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 36247a936372da631a0d18032f3bcb2015e357cc Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 15:40:35 +0800 Subject: [PATCH 278/416] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA=20=E5=88=A9=E7=94=A8?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E5=99=A8=E7=BB=9F=E4=B8=80=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/AgencyServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index c07985347c..f984f295b4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -161,6 +161,9 @@ public class AgencyServiceImpl implements AgencyService { originalEntity.setCode(formDTO.getCode()); originalEntity.setContacts(formDTO.getContacts()); originalEntity.setMobile(formDTO.getMobile()); + //利用mybatis 拦截器填充值 + originalEntity.setUpdatedTime(null); + originalEntity.setUpdatedBy(null); if(StringUtils.isNotBlank(formDTO.getLatitude())){ originalEntity.setLatitude(formDTO.getLatitude()); } From 7e8876b08eb864c372321331f67a688ed9e3de94 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 1 Jun 2022 15:42:12 +0800 Subject: [PATCH 279/416] =?UTF-8?q?=E5=86=97=E4=BD=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tNeighborhoodUserHouseDailyController.java | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java deleted file mode 100644 index d50d8faf1f..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactNeighborhoodUserHouseDailyController.java +++ /dev/null @@ -1,73 +0,0 @@ -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.stats.FactNeighborhoodUserHouseDailyDTO; -import com.epmet.service.stats.FactNeighborhoodUserHouseDailyService; -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-01 - */ -@RestController -@RequestMapping("factNeighborhoodUserHouseDaily") -public class FactNeighborhoodUserHouseDailyController { - - @Autowired - private FactNeighborhoodUserHouseDailyService factNeighborhoodUserHouseDailyService; - - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = factNeighborhoodUserHouseDailyService.page(params); - return new Result>().ok(page); - } - - @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - FactNeighborhoodUserHouseDailyDTO data = factNeighborhoodUserHouseDailyService.get(id); - return new Result().ok(data); - } - - @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody FactNeighborhoodUserHouseDailyDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - factNeighborhoodUserHouseDailyService.save(dto); - return new Result(); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody FactNeighborhoodUserHouseDailyDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - factNeighborhoodUserHouseDailyService.update(dto); - return new Result(); - } - - @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - factNeighborhoodUserHouseDailyService.delete(ids); - return new Result(); - } - -} From 2997a4ae55ee1eb4d69ce03874245f2e5eaa5dff Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 1 Jun 2022 15:45:26 +0800 Subject: [PATCH 280/416] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=80=9F=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/FactUserHouseController.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java index cd7fb580db..6dfe03236b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactUserHouseController.java @@ -72,6 +72,20 @@ public class FactUserHouseController { return new Result(); } + /** + * 统计小区纬度 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/31 9:48 + */ + @PostMapping("userHouseStatNeighborhood") + public Result userHouseStatNeighborhood(@RequestBody FactUserHouseFormDTO formDTO) { +// factUserHouseService.statNeighborhood(formDTO); + return new Result(); + } + /** * 统计组织纬度 * From 4cd7e07fffa6d0b24f4fbd3b54255305e7c75594 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 15:56:32 +0800 Subject: [PATCH 281/416] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E5=99=A8=E9=87=8C=E9=9D=A2=E7=9A=84=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BA=BA=E5=92=8C=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=8F=96=E5=88=9B=E5=BB=BA=E9=87=8C=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E5=BE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/handler/FieldMetaObjectHandler.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java index 3c0b35ff4d..749eef2360 100644 --- a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java +++ b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java @@ -147,12 +147,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { updatedTime = metaObject.getValue(FieldConstant.UPDATED_TIME_HUMP); } if (updatedTime == null) { - if(metaObject.hasGetter(FieldConstant.CREATED_TIME_HUMP)) { - updatedTime = metaObject.getValue(FieldConstant.CREATED_TIME_HUMP); - } - if(updatedTime == null) { - updatedTime = new Date(); - } + updatedTime = new Date(); } return updatedTime; } @@ -165,13 +160,7 @@ public class FieldMetaObjectHandler implements MetaObjectHandler { } if (value == null) { - if(metaObject.hasGetter(FieldConstant.CREATED_BY_HUMP)) { - value = metaObject.getValue(FieldConstant.CREATED_BY_HUMP); - } - - if(null == value) { - value = Optional.ofNullable(loginUserUtil.getLoginUserId()).orElse(Constant.APP_USER_FLAG); - } + value = Optional.ofNullable(loginUserUtil.getLoginUserId()).orElse(Constant.APP_USER_FLAG); } return value; From 13db16a786e9e3a8a8e5f17685c3e116fa110159 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 16:05:15 +0800 Subject: [PATCH 282/416] =?UTF-8?q?=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.17__ic_service_project.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql index ed18a5dfb9..f1e2ac5675 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql @@ -24,7 +24,7 @@ CREATE TABLE `ic_service_project` ( CREATE TABLE `ic_service_project_attachment` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', - `IC_SERVICE_ID` varchar(64) NOT NULL COMMENT '事件Id', + `IC_SERVICE_ID` varchar(64) NOT NULL COMMENT '服务记录id,服务项目id', `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名', `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', From f9b0a8bd250a2362a92ec6a02ae3da29346c64b6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 16:26:23 +0800 Subject: [PATCH 283/416] emm --- .../java/com/epmet/dto/IcServiceProjectAttachmentDTO.java | 2 ++ .../com/epmet/entity/IcServiceProjectAttachmentEntity.java | 5 +++++ .../resources/db/migration/V0.0.17__ic_service_project.sql | 1 + 3 files changed, 8 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java index c7bbb863e8..6919112fde 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java @@ -31,6 +31,8 @@ public class IcServiceProjectAttachmentDTO implements Serializable { */ private String icServiceId; + private String attachTo; + /** * 附件名 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java index c6a2858c86..966b5a6d94 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java @@ -34,6 +34,11 @@ public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity { */ private String icServiceId; + /** + * 隶属于。feedback:反馈;service:服务本身 + */ + private String attachTo; + /** * 附件名 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql index f1e2ac5675..8882e7c143 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.17__ic_service_project.sql @@ -25,6 +25,7 @@ CREATE TABLE `ic_service_project_attachment` ( `ID` varchar(64) NOT NULL COMMENT '主键', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', `IC_SERVICE_ID` varchar(64) NOT NULL COMMENT '服务记录id,服务项目id', + `ATTACH_TO` varchar(32) DEFAULT NULL COMMENT '隶属于。feedback:反馈;service:服务本身', `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名', `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', From 01a447e875bfc238f4e2b580211b761d62cbb257 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 1 Jun 2022 16:30:11 +0800 Subject: [PATCH 284/416] attachTo --- .../java/com/epmet/service/impl/IcServiceProjectServiceImpl.java | 1 + 1 file changed, 1 insertion(+) 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 1dd59ab19b..ecc399cfb3 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 @@ -250,6 +250,7 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 16:42:12 +0800 Subject: [PATCH 285/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/HomeMemberOperationEnum.java | 42 +++++ .../com/epmet/dto/IcResiUserConfirmDTO.java | 7 +- .../dto/form/IcResiUserConfirmGetDTO.java | 25 +++ .../dto/form/IcResiUserConfirmSubmitDTO.java | 165 ++++++++++++++++++ .../epmet/controller/MyHomeController.java | 75 ++++++++ .../com/epmet/dao/IcResiUserConfirmDao.java | 13 +- .../java/com/epmet/dao/IcResiUserDao.java | 10 ++ .../epmet/entity/IcResiUserConfirmEntity.java | 2 +- .../service/IcResiUserConfirmService.java | 41 ++++- .../impl/IcResiUserConfirmServiceImpl.java | 59 ++++++- .../resources/mapper/IcResiUserConfirmDao.xml | 9 +- .../main/resources/mapper/IcResiUserDao.xml | 17 ++ 12 files changed, 454 insertions(+), 11 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HomeMemberOperationEnum.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmGetDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HomeMemberOperationEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HomeMemberOperationEnum.java new file mode 100644 index 0000000000..9009bdb141 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HomeMemberOperationEnum.java @@ -0,0 +1,42 @@ +package com.epmet.commons.tools.enums; + +/** + * 组织级别枚举类 + * dev|test|prod + * + * @author jianjun liu + * @date 2020-07-03 11:14 + **/ +public enum HomeMemberOperationEnum { + + + ADD("add", "新增"), + UPDATE("update", "修改"), + DELETE("delele", "删除"); + + + private String code; + private String name; + + + HomeMemberOperationEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} 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 04cef90792..4c6749ced7 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 @@ -1,8 +1,9 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -144,7 +145,7 @@ public class IcResiUserConfirmDTO implements Serializable { /** * ic_resi_user表id */ - private String icUserId; + private String icResiUserId; /** * 操作类型:新增add 修改 update 删除 delete @@ -161,4 +162,4 @@ public class IcResiUserConfirmDTO implements Serializable { */ private String operationDescribe; -} \ No newline at end of file +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmGetDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmGetDTO.java new file mode 100644 index 0000000000..10e36979f5 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmGetDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 查询家庭成员信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class IcResiUserConfirmGetDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ic_resi_user表id + */ + private String icResiUserId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java new file mode 100644 index 0000000000..11cb831f9b --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java @@ -0,0 +1,165 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民信息审核表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class IcResiUserConfirmSubmitDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 网格ID + */ + private String gridId; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 户籍所在地地区码 + */ + private String hjszdCode; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地地区码 + */ + private String xjzdCode; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 民族【字典表】 + */ + private String mz; + + /** + * 与户主关系 + */ + private String yhzgx; + + /** + * 审核状态0未审核,1审核通过,2审核不通过 + */ + private String confirmResult; + + /** + * 审核不通过的原因 + */ + private String reason; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * ic_resi_user表id + */ + private String icResiUserId; + + /** + * 操作类型:新增add 修改 update 删除 delete + */ + private String submitType; + + /** + * 删除原因 + */ + private String deleteReason; + + /** + * 操作说明 + */ + private String operationDescribe; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 97e28bd89f..66eba278c4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -1,6 +1,18 @@ package com.epmet.controller; +import com.epmet.commons.tools.enums.HomeMemberOperationEnum; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcResiUserConfirmDTO; +import com.epmet.dto.form.IcResiUserConfirmGetDTO; +import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.service.IcResiUserConfirmService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -13,4 +25,67 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("myHome") public class MyHomeController { + + @Autowired + private IcResiUserConfirmService icResiUserConfirmService; + + /** + * @describe: 新增家庭成员 + * @author wangtong + * @date 2022/6/1 15:50 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("addMember") + public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setOperationDescribe(HomeMemberOperationEnum.ADD.getCode()); + return icResiUserConfirmService.addMember(dto); + } + + /** + * @describe: 修改家庭成员 + * @author wangtong + * @date 2022/6/1 15:27 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("editMember") + public Result save(@RequestBody IcResiUserConfirmSubmitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setOperationDescribe(HomeMemberOperationEnum.UPDATE.getCode()); + return icResiUserConfirmService.editMember(dto); + } + + /** + * @describe: 删除家庭成员 + * @author wangtong + * @date 2022/6/1 16:10 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("delMember") + public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setOperationDescribe(HomeMemberOperationEnum.DELETE.getCode()); + return icResiUserConfirmService.delMember(dto); + } + + /** + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:14 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("getMemberDetail") + public Result getMemberDetail(@RequestBody IcResiUserConfirmGetDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + return icResiUserConfirmService.getMemberDetail(dto); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java index b75a795424..beb7ae9d77 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java @@ -3,6 +3,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcResiUserConfirmEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 居民信息审核表 @@ -12,5 +13,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcResiUserConfirmDao extends BaseDao { - -} \ No newline at end of file + + /** + * @describe: 根据icResiUserId查询 + * @author wangtong + * @date 2022/6/1 16:01 + * @params [icResiUserId] + * @return com.epmet.entity.IcResiUserConfirmEntity + */ + IcResiUserConfirmEntity selectByIcResiUserId(@Param("icResiUserId") String icResiUserId); +} 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 1a0d5c82d1..73a3f48cdb 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 @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; 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; @@ -328,4 +329,13 @@ public interface IcResiUserDao extends BaseDao { * @Date 2022/5/19 10:40 */ List getVolunteerList(@Param("customerId") String customerId, @Param("userId") String userId); + + /** + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:16 + * @params [icResiUserId] + * @return com.epmet.dto.IcResiUserConfirmDTO + */ + IcResiUserConfirmDTO selectMemberDetail(@Param("icResiUserId") String icResiUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java index 5fa0f886c9..c11aa5e18b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java @@ -111,7 +111,7 @@ public class IcResiUserConfirmEntity extends BaseEpmetEntity { /** * ic_resi_user表id */ - private String icUserId; + private String icResiUserId; /** * 操作类型:新增add 修改 update 删除 delete diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java index 49ee7ab60e..e49f0e2ac2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java @@ -2,7 +2,10 @@ 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.IcResiUserConfirmDTO; +import com.epmet.dto.form.IcResiUserConfirmGetDTO; +import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; import com.epmet.entity.IcResiUserConfirmEntity; import java.util.List; @@ -75,4 +78,40 @@ public interface IcResiUserConfirmService extends BaseService getMemberDetail(IcResiUserConfirmGetDTO dto); +} 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 2b8e58ceff..1623f17943 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 @@ -3,12 +3,17 @@ 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiUserConfirmDao; +import com.epmet.dao.IcResiUserDao; import com.epmet.dto.IcResiUserConfirmDTO; +import com.epmet.dto.form.IcResiUserConfirmGetDTO; +import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; import com.epmet.entity.IcResiUserConfirmEntity; +import com.epmet.entity.IcResiUserEntity; import com.epmet.redis.IcResiUserConfirmRedis; import com.epmet.service.IcResiUserConfirmService; import org.apache.commons.lang3.StringUtils; @@ -32,6 +37,9 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -84,4 +92,51 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl getMemberDetail(IcResiUserConfirmGetDTO dto) { + IcResiUserConfirmDTO result = icResiUserDao.selectMemberDetail(dto.getIcResiUserId()); + return new Result().ok(result); + } + +} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml index 8d84dc6b0b..4c46257dc1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml @@ -29,11 +29,16 @@ - + + - \ No newline at end of file + 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 13de5c56e1..85650573e2 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 @@ -1059,5 +1059,22 @@ AND a.ID = #{userId} + From 49f63b83fd84731fbc0e133dcb54ea7448b7384f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 16:45:09 +0800 Subject: [PATCH 286/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9B=B8=E5=85=B3flyway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcServiceRecordServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) 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 88d5559a34..13eaff0445 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 @@ -307,6 +307,8 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 16:46:39 +0800 Subject: [PATCH 287/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovOrgOpenFeignClient.java | 112 ++++++++++-------- .../GovOrgOpenFeignClientFallback.java | 30 +++-- .../epmet/controller/IcHouseController.java | 4 + .../com/epmet/service/IcHouseService.java | 15 ++- .../service/impl/IcHouseServiceImpl.java | 36 ++++-- .../epmet/controller/MyHomeController.java | 20 ++++ .../java/com/epmet/service/MyHomeService.java | 14 +++ .../epmet/service/impl/MyHomeServiceImpl.java | 28 +++++ 8 files changed, 185 insertions(+), 74 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 7e21d51a83..30fd05cc68 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -94,17 +94,17 @@ public interface GovOrgOpenFeignClient { * @param partyBranchId * @return com.epmet.commons.tools.utils.Result * @author yinzuomei - * @description 根据党支部id,查询党支部信息 + * @description 根据党支部id, 查询党支部信息 * @Date 2020/6/17 18:01 **/ @GetMapping(value = "gov/org/customerpartybranch/get/{id}") Result getPartyBranchById(@PathVariable("id") String partyBranchId); /** - * @return com.epmet.commons.tools.utils.Result * @param partyBranchId + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei - * @description 根据党支部id,删除党支部(存在党员的不允许删除) + * @description 根据党支部id, 删除党支部(存在党员的不允许删除) * @Date 2020/6/17 18:08 **/ @GetMapping(value = "gov/org/customerpartybranch/delete/{id}") @@ -121,8 +121,8 @@ public interface GovOrgOpenFeignClient { Result queryGridInfo(@PathVariable("gridId") String gridId); /** - * @return com.epmet.commons.tools.utils.Result * @param partyBranchId + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei * @description 党支部宗人数-1 * @Date 2020/6/18 18:28 @@ -158,8 +158,8 @@ public interface GovOrgOpenFeignClient { Result> listGridsbystaffid(@PathVariable("staffId") String staffId); /** - * @return com.epmet.commons.tools.utils.Result * @param staffId + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei * @description 发布活动-主办方列表 * @Date 2020/7/23 20:47 @@ -168,7 +168,6 @@ public interface GovOrgOpenFeignClient { Result querySponsorList(@PathVariable("staffId") String staffId); /** - * * @Description 根据网格id查询网格名称 * @Author zxc * @CreatedTime 2020/4/27 9:22 @@ -177,20 +176,19 @@ public interface GovOrgOpenFeignClient { Result getGridNameByGridId(@RequestBody BelongGridNameFormDTO formDTO); /** - * @return com.epmet.commons.tools.utils.Result> * @param staffOrgFormDTO + * @return com.epmet.commons.tools.utils.Result> * @Author yinzuomei * @Description 获取客户对应的根级组织名称 * @Date 2020/4/20 21:37 **/ - @PostMapping(value = "/gov/org/customeragency/getStaffOrgList",consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/gov/org/customeragency/getStaffOrgList", consumes = MediaType.APPLICATION_JSON_VALUE) Result> getStaffOrgList(StaffOrgFormDTO staffOrgFormDTO); /** - * @description 通过staffId查询跟组织列表 - * * @param input * @return + * @description 通过staffId查询跟组织列表 * @author wxz * @date 2021.10.25 14:53:53 */ @@ -198,8 +196,8 @@ public interface GovOrgOpenFeignClient { Result> getStaffOrgListByStaffId(@RequestBody RootOrgListByStaffIdFormDTO input); /** - * @Description 查询一个网格下的所有工作人员 * @param gridIdFormDTO + * @Description 查询一个网格下的所有工作人员 * @author zxc * @date 2020/8/13 10:46 上午 */ @@ -207,8 +205,8 @@ public interface GovOrgOpenFeignClient { Result> getGridStaffs(@RequestBody CommonGridIdFormDTO gridIdFormDTO); /** - * @Description 查询部门下工作人员 * @param formDTO + * @Description 查询部门下工作人员 * @author zxc * @date 2020/8/13 2:46 下午 */ @@ -216,8 +214,8 @@ public interface GovOrgOpenFeignClient { Result> getDepartmentStaffs(@RequestBody DepartmentIdFormDTO formDTO); /** - * @Description 查询客户下的网格数量 * @param customerIdFormDTO + * @Description 查询客户下的网格数量 * @author zxc * @date 2020/8/14 9:31 上午 */ @@ -225,8 +223,8 @@ public interface GovOrgOpenFeignClient { Result selectGridCount(@RequestBody CustomerIdFormDTO customerIdFormDTO); /** - * @Description 查询机关下工作人员 * @param formDTO + * @Description 查询机关下工作人员 * @author zxc * @date 2020/8/17 */ @@ -234,19 +232,19 @@ public interface GovOrgOpenFeignClient { Result> getAgencyStaffs(@RequestBody AgencyIdFormDTO formDTO); /** - * @Description User模块调用gov-org查询工作人员所在机关的信息以及客户信息 * @param result * @return + * @Description User模块调用gov-org查询工作人员所在机关的信息以及客户信息 * @author wangc * @date 2020.08.17 14:11 - **/ + **/ @PostMapping("/gov/org/customeragency/staffinfoext") Result staffInfoExt(@RequestBody ExtStaffInfoResultDTO result); /** - * @Description 根据staffId,查询当前这个用户的数据权限,对外接口 * @param staffId * @return + * @Description 根据staffId,查询当前这个用户的数据权限,对外接口 * @author wangc * @date 2020.08.17 17:30 **/ @@ -254,9 +252,9 @@ public interface GovOrgOpenFeignClient { Result staffPermissionExt(@PathVariable(value = "staffId") String staffId); /** + * @param result ExtStaffInfoResultDTO.class + * @return Result * @Description User模块调用gov-org查询用户所在机关的信息以及客户信息 - * @param result ExtStaffInfoResultDTO.class - * @return Result * @author wangc * @date 2020.08.17 13:52 **/ @@ -289,7 +287,7 @@ public interface GovOrgOpenFeignClient { Result organizeTree(@PathVariable("agencyId") String agencyId); /** - * @Description 查询org信息 + * @Description 查询org信息 * @Param orgInfoFormDTO * @author zxc * @date 2020/11/10 2:55 下午 @@ -307,8 +305,8 @@ public interface GovOrgOpenFeignClient { Result> getGridListByGridIds(List gridIdList); /** - * @Description 查询网格名 不限制是否同步条件 SYNC_FLAG * @param gridIdList + * @Description 查询网格名 不限制是否同步条件 SYNC_FLAG * @author zxc * @date 2022/1/12 9:37 上午 */ @@ -316,9 +314,9 @@ public interface GovOrgOpenFeignClient { Result> getAllGridListByGridIds(List gridIdList); /** - * @Description 根据网格Id查询用户数据 * @param customerGridFormDTO * @return com.epmet.commons.tools.utils.Result + * @Description 根据网格Id查询用户数据 * @Author liushaowen * @Date 2020/11/18 15:34 */ @@ -337,8 +335,9 @@ public interface GovOrgOpenFeignClient { /** * 根据 网格id,查询同属于一个社区下的所有网格id + * * @param gridId - * @return com.epmet.commons.tools.utils.Result> + * @return com.epmet.commons.tools.utils.Result> * @Author zhangyong * @Date 17:44 2020-12-28 **/ @@ -355,7 +354,7 @@ public interface GovOrgOpenFeignClient { Result getProcessorList(@PathVariable("agencyId") String agencyId); /** - * @Description 查询网格下的网格员 + * @Description 查询网格下的网格员 * @Param gridIds * @author zxc * @date 2021/6/8 3:36 下午 @@ -364,17 +363,17 @@ public interface GovOrgOpenFeignClient { Result> selectGridStaffByGridIds(@RequestBody List gridIds); /** - * @return com.epmet.commons.tools.utils.Result * @param customerId + * @return com.epmet.commons.tools.utils.Result * @author yinzuomei - * @description 根据customerId查询参数(area_code_switch)值open: 选择地区编码必填;closed: 无需选择地区编码;;0409新增返参;没配置,返回closed + * @description 根据customerId查询参数(area_code_switch)值open: 选择地区编码必填;closed: 无需选择地区编码;;0409新增返参;没配置,返回closed * @Date 2021/6/24 16:11 **/ @GetMapping(value = "/gov/org/customeragency/getareacodeswitch/{customerId}") - Result getAreaCodeSwitch(@PathVariable("customerId")String customerId); + Result getAreaCodeSwitch(@PathVariable("customerId") String customerId); /** - * @Description 根据网格ID查询pids + * @Description 根据网格ID查询pids * @Param gridId * @author zxc * @date 2021/7/16 9:52 上午 @@ -384,6 +383,7 @@ public interface GovOrgOpenFeignClient { /** * 工作人员的个人信息 + * * @param fromDTO * @return */ @@ -391,25 +391,25 @@ public interface GovOrgOpenFeignClient { Result queryStaffProfile(@RequestBody StaffInfoFromDTO fromDTO); /** - * @Description 查询工作人员名字 【xx组织-章三】 + * @Description 查询工作人员名字 【xx组织-章三】 * @Param userId * @author zxc * @date 2021/8/4 4:23 下午 */ @PostMapping("/gov/org/staff/staffname") - Result staffName(@RequestParam("userId")String userId); + Result staffName(@RequestParam("userId") String userId); /** - * @Description 查询网格名字 + * @Description 查询网格名字 * @Param gridName * @author zxc * @date 2021/8/4 4:26 下午 */ @PostMapping("/gov/org/customergrid/selectgridname") - Result gridName(@RequestParam("gridId")String gridId); + Result gridName(@RequestParam("gridId") String gridId); /** - * @Description 根据类型查询组织名称 + * @Description 根据类型查询组织名称 * @Param formList * @author zxc * @date 2021/8/4 6:14 下午 @@ -418,19 +418,19 @@ public interface GovOrgOpenFeignClient { Result> selectOrgNameByType(@RequestBody List formList); /** - * @Description 根据人查询所在组织 + * @Description 根据人查询所在组织 * @Param userId * @author zxc * @date 2021/8/5 10:08 上午 */ @PostMapping("/gov/org/customergrid/selectorgsbyuserid") - Result> selectOrgsByUserId(@RequestParam("userId")String userId); + Result> selectOrgsByUserId(@RequestParam("userId") String userId); /** * 架构里面的人 * * @param formDTO - * @return com.epmet.commons.tools.utils.Result> + * @return com.epmet.commons.tools.utils.Result> * @author yinzuomei * @date 2021/8/19 2:27 下午 */ @@ -459,9 +459,8 @@ public interface GovOrgOpenFeignClient { @PostMapping("/gov/org/grid/getbaseinfo") Result getGridBaseInfoByGridId(CustomerGridFormDTO customerGridFormDTO); - @PostMapping(value = "/gov/org/house/queryListHouseInfo",consumes = MediaType.APPLICATION_JSON_VALUE) - Result> queryListHouseInfo(@RequestBody Set houseIds, @RequestParam("customerId") String customerId); - + @PostMapping(value = "/gov/org/house/queryListHouseInfo", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> queryListHouseInfo(@RequestBody Set houseIds, @RequestParam("customerId") String customerId); /** @@ -476,6 +475,7 @@ public interface GovOrgOpenFeignClient { /** * 获取网格下支部小组 + * * @Param formDTO * @Return {@link Result>} * @Author zhaoqifeng @@ -518,13 +518,13 @@ public interface GovOrgOpenFeignClient { Result> getNeighborHoodOptions(IcNeighborHoodDTO dto); /** - * @Description 查询房屋信息 * @param idCard + * @Description 查询房屋信息 * @author zxc * @date 2021/11/3 3:30 下午 */ @PostMapping("/gov/org/ichouse/selecthouseinfobyidcard") - Result> selectHouseInfoByIdCard(@RequestParam("idCard")String idCard,@RequestParam("customerId")String customerId); + Result> selectHouseInfoByIdCard(@RequestParam("idCard") String idCard, @RequestParam("customerId") String customerId); @GetMapping("/gov/org/ichouse/{id}") Result get(@PathVariable("id") String id); @@ -533,7 +533,7 @@ public interface GovOrgOpenFeignClient { Result> buildingListByIds(@RequestBody List buildingIdList); @PostMapping("/gov/org/building/buildinglistbyidsPage/{pageNo}/{pageSize}") - Result buildinglistbyidsPage(@RequestBody List buildingIdList,@PathVariable("pageNo") Integer pageNo,@PathVariable("pageSize")Integer pageSize); + Result buildinglistbyidsPage(@RequestBody List buildingIdList, @PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize); @PostMapping("/gov/org/icneighborhood/getlistbyids") Result> getListByIds(@RequestBody List ids); @@ -542,18 +542,19 @@ public interface GovOrgOpenFeignClient { Result> getGridIListByAgency(@PathVariable("agencyId") String agencyId); /** - * @Description 查询下级agencyId * @param orgId + * @Description 查询下级agencyId * @author zxc * @date 2021/12/9 4:42 下午 */ @PostMapping("/gov/org/agency/getsonagencyid") - Result> getSonAgencyId(@RequestParam("orgId")String orgId,@RequestParam("type")String type); + Result> getSonAgencyId(@RequestParam("orgId") String orgId, @RequestParam("type") String type); // /icbuilding/{id}?id=demoData /** * 根据ID查询楼栋信息 + * * @param id * @return */ @@ -562,6 +563,7 @@ public interface GovOrgOpenFeignClient { /** * 通过ID查询小区信息 + * * @param id * @return */ @@ -571,6 +573,7 @@ public interface GovOrgOpenFeignClient { /** * 运营端-客户管理,修改客户信息,调用gov-org服务,修改组织区划开关,修改根组织areaCode入参。 + * * @param formDTO * @return */ @@ -591,6 +594,7 @@ public interface GovOrgOpenFeignClient { /** * 查询单元 + * * @param id * @return */ @@ -599,15 +603,17 @@ public interface GovOrgOpenFeignClient { /** * Desc: 查询网格下所有的工作人员 + * * @param gridId * @author zxc * @date 2022/3/21 16:02 */ @PostMapping("/gov/org/customerstaffgrid/getallstaffbygridid") - Result> getAllStaffByGridId(@RequestParam("gridId")String gridId); + Result> getAllStaffByGridId(@RequestParam("gridId") String gridId); /** * Desc: 根据身份证查询房屋名 + * * @param idCards * @author zxc * @date 2022/4/12 16:42 @@ -617,7 +623,7 @@ public interface GovOrgOpenFeignClient { /** * Desc: 房屋更新 - * @param tokenDTO + * * @param formDTO * @author zxc * @date 2022/5/11 09:46 @@ -627,9 +633,21 @@ public interface GovOrgOpenFeignClient { /** * 直属网格+下一级组织 + * * @param agencyId * @return */ @GetMapping("/gov/org/customeragency/subOrgList/{agencyId}") - Result> subOrgList(@PathVariable("agencyId")String agencyId); + Result> subOrgList(@PathVariable("agencyId") String agencyId); + + /** + * 根据房屋编码查询房屋信息 + * + * @param houseCode + * @return com.epmet.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2022/6/1/0001 16:18 + */ + @GetMapping("/gov/org/ichouse/getbyhousecode/{houseCode}") + Result getByHouseCode(@PathVariable("houseCode") String houseCode); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index adac11545a..8f0cab1bb1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -67,12 +67,12 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { @Override public Result queryGridInfo(String gridId) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo",gridId); + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", gridId); } @Override public Result decrPartyBranchMember(String partyBranchId) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "decrPartyBranchMember",partyBranchId); + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "decrPartyBranchMember", partyBranchId); } @Override @@ -276,7 +276,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { } @Override - public Result> queryListHouseInfo(Set houseIds ,String customerId) { + public Result> queryListHouseInfo(Set houseIds, String customerId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "queryListHouseInfo", houseIds, customerId); } @@ -311,7 +311,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { } @Override - public Result> selectHouseInfoByIdCard(String idCard,String customerId) { + public Result> selectHouseInfoByIdCard(String idCard, String customerId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectHouseInfoByIdCard", idCard, customerId); } @@ -324,9 +324,10 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result> buildingListByIds(List buildingIdList) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "buildingListByIds", buildingIdList); } + @Override - public Result buildinglistbyidsPage(List buildingIdList,Integer pageNo,Integer pageSize) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "buildinglistbyidsPage", buildingIdList,pageNo,pageSize); + public Result buildinglistbyidsPage(List buildingIdList, Integer pageNo, Integer pageSize) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "buildinglistbyidsPage", buildingIdList, pageNo, pageSize); } @Override @@ -340,8 +341,8 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { } @Override - public Result> getSonAgencyId(String orgId,String type) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getSonAgencyId", orgId,type); + public Result> getSonAgencyId(String orgId, String type) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getSonAgencyId", orgId, type); } @Override @@ -372,7 +373,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { @Override public Result> getStaffGridList(String customerId, String orgId, String orgType) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getStaffGridList",customerId, orgId, orgType); + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getStaffGridList", customerId, orgId, orgType); } /** @@ -400,8 +401,8 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { } @Override - public Result houseUpdate( IcHouseAddFormDTO formDTO) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "houseUpdate",formDTO); + public Result houseUpdate(IcHouseAddFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "houseUpdate", formDTO); } /** @@ -412,6 +413,11 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { */ @Override public Result> subOrgList(String agencyId) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList",agencyId); + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList", agencyId); + } + + @Override + public Result getByHouseCode(String houseCode) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getByHouseCode", houseCode); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java index edbdde8625..e6f1522353 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java @@ -90,4 +90,8 @@ public class IcHouseController { return new Result>().ok(icHouseService.getHousesNameByIdCards(idCards)); } + @GetMapping("getbyhousecode/{houseCode}") + public Result getByHouseCode(@PathVariable("houseCode") String houseCode){ + return new Result().ok(icHouseService.getByHouseCode(houseCode)); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java index bd82a396c1..161aad6c4e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java @@ -92,12 +92,12 @@ public interface IcHouseService extends BaseService { List getHouseOption(HouseFormDTO formDTO); /** - * @Description 查询房屋信息 * @param idCard + * @Description 查询房屋信息 * @author zxc * @date 2021/11/3 3:30 下午 */ - List selectHouseInfoByIdCard(String idCard,String customerId); + List selectHouseInfoByIdCard(String idCard, String customerId); /** * @Description 楼栋下房屋列表 @@ -111,6 +111,7 @@ public interface IcHouseService extends BaseService { /** * Desc: 批量更新房屋信息 + * * @param houses * @author zxc * @date 2022/3/25 10:22 @@ -119,10 +120,20 @@ public interface IcHouseService extends BaseService { /** * Desc: 根据身份证查询房屋名 + * * @param idCards * @author zxc * @date 2022/4/12 16:42 */ List getHousesNameByIdCards(List idCards); + /** + * 根据房屋编码查询房屋信息 + * + * @param houseCode + * @return com.epmet.dto.IcHouseDTO + * @author work@yujt.net.cn + * @date 2022/6/1/0001 16:21 + */ + IcHouseDTO getByHouseCode(String houseCode); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index e884a6904c..1e8ef58148 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -1,8 +1,10 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.Wrapper; 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.baomidou.mybatisplus.core.toolkit.Wrappers; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; @@ -78,8 +80,8 @@ public class IcHouseServiceImpl 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); @@ -152,7 +154,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl list = baseDao.selectList(wrapper); - if(CollectionUtils.isEmpty(list)) { + if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list.stream().map(item -> { @@ -165,15 +167,15 @@ public class IcHouseServiceImpl extends BaseServiceImpl selectHouseInfoByIdCard(String idCard,String customerId) { - List result = baseDao.selectHouseInfoByIdCard(idCard,customerId); - if (CollectionUtils.isEmpty(result)){ + public List selectHouseInfoByIdCard(String idCard, String customerId) { + List result = baseDao.selectHouseInfoByIdCard(idCard, customerId); + if (CollectionUtils.isEmpty(result)) { return new ArrayList<>(); } return result; @@ -189,19 +191,19 @@ public class IcHouseServiceImpl extends BaseServiceImpl getHouseList(TokenDto tokenDto, HouseFormDTO formDTO) { + public List getHouseList(TokenDto tokenDto, HouseFormDTO formDTO) { //查询楼栋下房屋列表 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId()); wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC"); List list = baseDao.selectList(wrapper); - if(CollectionUtils.isEmpty(list)) { + if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } //获取居民分类列表 IcResiCategoryStatsConfigDTO categoryDto = new IcResiCategoryStatsConfigDTO(); categoryDto.setCustomerId(tokenDto.getCustomerId()); - Result> categoryResult = operCustomizeOpenFeignClient.getCategoryList(categoryDto); + Result> categoryResult = operCustomizeOpenFeignClient.getCategoryList(categoryDto); if (!categoryResult.success()) { throw new RenException(categoryResult.getCode(), categoryResult.getMsg()); } @@ -220,7 +222,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl getHousesNameByIdCards(List idCards) { - if (CollectionUtils.isEmpty(idCards)){ + if (CollectionUtils.isEmpty(idCards)) { return new ArrayList<>(); } return baseDao.getHousesNameByIdCards(idCards); } + @Override + public IcHouseDTO getByHouseCode(String houseCode) { + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(IcHouseEntity::getHouseCode, houseCode); + return ConvertUtils.sourceToTarget(baseDao.selectOne(lqw), IcHouseDTO.class); + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 97e28bd89f..21166bb191 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -1,9 +1,20 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.HomeUserBriefResultDTO; +import com.epmet.service.MyHomeService; import lombok.extern.slf4j.Slf4j; +import oracle.jdbc.proxy.annotation.Post; +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 java.util.List; + /** * @Description * @Author zhaoqifeng @@ -13,4 +24,13 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("myHome") public class MyHomeController { + + @Autowired + private MyHomeService myHomeService; + + + @PostMapping("memberList/{houseCode}") + public Result> selectListHomeMember(@PathVariable("houseCode") String houseCode, @LoginUser TokenDto tokenDto) { + return new Result().ok(myHomeService.selectListHomeMember(houseCode, tokenDto.getCustomerId())); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java index 6b5cc6c5e9..1eae402d2f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java @@ -1,12 +1,26 @@ package com.epmet.service; +import com.epmet.dto.result.HomeUserBriefResultDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.List; + /** * @Description * @Author zhaoqifeng * @Date 2022/5/31 16:21 */ public interface MyHomeService { + + /** + * 查询家庭成员 + * + * @param houseCode 房屋编码 + * @param customerId + * @return java.util.List + * @author work@yujt.net.cn + * @date 2022/6/1/0001 16:12 + */ + List selectListHomeMember(String houseCode, String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index d6e4ef65ab..6bf9364dd9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -1,9 +1,19 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.result.HomeUserBriefResultDTO; +import com.epmet.feign.GovOrgFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.service.IcResiUserService; import com.epmet.service.MyHomeService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.utils.Lists; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @Description * @Author zhaoqifeng @@ -12,4 +22,22 @@ import org.springframework.stereotype.Service; @Service @Slf4j public class MyHomeServiceImpl implements MyHomeService { + + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + + @Autowired + private IcResiUserService icResiUserService; + + @Override + public List selectListHomeMember(String houseCode, String customerId) { + + Result byHouseCode = govOrgOpenFeignClient.getByHouseCode(houseCode); + + if (byHouseCode.success() && null != byHouseCode.getData()) { + return icResiUserService.listHomeUserBrief(byHouseCode.getData().getId(), customerId); + } + + return Lists.newArrayList(); + } } From dce674b84443c9d3d47f3cf9eb64ee772cdbe208 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 16:54:28 +0800 Subject: [PATCH 288/416] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E8=BE=85=E5=8A=A9=E8=A1=A8=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcHouseCodeInfoDTO.java | 39 +++++++++ .../controller/IcHouseCodeInfoController.java | 82 +++++++++++++++++ .../com/epmet/dao/IcHouseCodeInfoDao.java | 16 ++++ .../epmet/entity/IcHouseCodeInfoEntity.java | 44 ++++++++++ .../com/epmet/excel/IcHouseCodeInfoExcel.java | 30 +++++++ .../com/epmet/redis/IcHouseCodeInfoRedis.java | 30 +++++++ .../epmet/service/IcHouseCodeInfoService.java | 78 +++++++++++++++++ .../impl/IcHouseCodeInfoServiceImpl.java | 87 +++++++++++++++++++ .../resources/mapper/IcHouseCodeInfoDao.xml | 14 +++ 9 files changed, 420 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseCodeInfoController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseCodeInfoExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseCodeInfoRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseCodeInfoService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseCodeInfoServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java new file mode 100644 index 0000000000..b2f77dc49b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +public class IcHouseCodeInfoDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 最大的楼栋编码序列号 + */ + private Integer buildingMaxNum; + + /** + * 该楼栋下最大的房屋编码序列号 + */ + private Integer houseMaxNum; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseCodeInfoController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseCodeInfoController.java new file mode 100644 index 0000000000..c063dd3256 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseCodeInfoController.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.IcHouseCodeInfoDTO; +import com.epmet.excel.IcHouseCodeInfoExcel; +import com.epmet.service.IcHouseCodeInfoService; +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-01 + */ +@RestController +@RequestMapping("icHouseCodeInfo") +public class IcHouseCodeInfoController { + + @Autowired + private IcHouseCodeInfoService icHouseCodeInfoService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icHouseCodeInfoService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcHouseCodeInfoDTO data = icHouseCodeInfoService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcHouseCodeInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icHouseCodeInfoService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcHouseCodeInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icHouseCodeInfoService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icHouseCodeInfoService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icHouseCodeInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcHouseCodeInfoExcel.class); + } + + + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java new file mode 100644 index 0000000000..5a31066fee --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcHouseCodeInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Mapper +public interface IcHouseCodeInfoDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java new file mode 100644 index 0000000000..6b656623ef --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java @@ -0,0 +1,44 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_house_code_info") +public class IcHouseCodeInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 最大的楼栋编码序列号 + */ + private Integer buildingMaxNum; + + /** + * 该楼栋下最大的房屋编码序列号 + */ + private Integer houseMaxNum; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseCodeInfoExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseCodeInfoExcel.java new file mode 100644 index 0000000000..8e7d11bbed --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseCodeInfoExcel.java @@ -0,0 +1,30 @@ +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-01 + */ +@Data +public class IcHouseCodeInfoExcel { + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "所属楼栋id") + private String buildingId; + + @Excel(name = "最大的楼栋编码序列号") + private Integer buildingMaxNum; + + @Excel(name = "该楼栋下最大的房屋编码序列号") + private Integer houseMaxNum; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseCodeInfoRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseCodeInfoRedis.java new file mode 100644 index 0000000000..112f7b69ca --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseCodeInfoRedis.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-01 + */ +@Component +public class IcHouseCodeInfoRedis { + @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/IcHouseCodeInfoService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseCodeInfoService.java new file mode 100644 index 0000000000..2b424e9fbe --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseCodeInfoService.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.IcHouseCodeInfoDTO; +import com.epmet.entity.IcHouseCodeInfoEntity; + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-01 + */ +public interface IcHouseCodeInfoService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcHouseCodeInfoDTO + * @author generator + * @date 2022-06-01 + */ + IcHouseCodeInfoDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void save(IcHouseCodeInfoDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-01 + */ + void update(IcHouseCodeInfoDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-01 + */ + 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/IcHouseCodeInfoServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseCodeInfoServiceImpl.java new file mode 100644 index 0000000000..aa9f67bc10 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseCodeInfoServiceImpl.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.IcHouseCodeInfoDao; +import com.epmet.dto.IcHouseCodeInfoDTO; +import com.epmet.entity.IcHouseCodeInfoEntity; +import com.epmet.redis.IcHouseCodeInfoRedis; +import com.epmet.service.IcHouseCodeInfoService; +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-01 + */ +@Service +public class IcHouseCodeInfoServiceImpl extends BaseServiceImpl implements IcHouseCodeInfoService { + + @Autowired + private IcHouseCodeInfoRedis icHouseCodeInfoRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcHouseCodeInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcHouseCodeInfoDTO.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 IcHouseCodeInfoDTO get(String id) { + IcHouseCodeInfoEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcHouseCodeInfoDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcHouseCodeInfoDTO dto) { + IcHouseCodeInfoEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseCodeInfoEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcHouseCodeInfoDTO dto) { + IcHouseCodeInfoEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseCodeInfoEntity.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/IcHouseCodeInfoDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml new file mode 100644 index 0000000000..6fcac58bed --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file From 1291fef486478af00dcf81bf98bc4955374e131f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 1 Jun 2022 17:16:41 +0800 Subject: [PATCH 289/416] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=EF=BC=8C=E6=88=BF=E5=B1=8B=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/RegisterAndBindFormDTO.java | 70 +++++++++ .../epmet/dto/result/HomeInfoResultDTO.java | 22 +++ .../epmet/controller/MyHomeController.java | 41 +++-- .../java/com/epmet/service/MyHomeService.java | 24 ++- .../epmet/service/impl/MyHomeServiceImpl.java | 147 +++++++++++++++++- 5 files changed, 287 insertions(+), 17 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterAndBindFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterAndBindFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterAndBindFormDTO.java new file mode 100644 index 0000000000..5869490ead --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterAndBindFormDTO.java @@ -0,0 +1,70 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/1 9:39 + */ +@NoArgsConstructor +@Data +public class RegisterAndBindFormDTO implements Serializable { + + private static final long serialVersionUID = 7068763631425911170L; + private String customerId; + private String userId; + /** + * 姓 + */ + private String surname; + /** + * 名 + */ + private String name; + /** + * 昵称 + */ + private String nickname; + /** + * 头像 + */ + private String headImgUrl; + /** + * 身份证 + */ + private String idCard; + /** + * 手机号 + */ + private String mobile; + /** + * 网格 + */ + private String gridId; + /** + * 小区 + */ + private String villageId; + /** + * 楼栋 + */ + private String buildId; + /** + * 单元 + */ + private String unitId; + /** + * 房屋 + */ + private String homeId; + /** + * 路牌号 + */ + private String address; + + private String visitId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.java new file mode 100644 index 0000000000..5ff591455f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/HomeInfoResultDTO.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/1 16:49 + */ +@NoArgsConstructor +@Data +public class HomeInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -6109420020924607393L; + private String icResiUserId; + private String houseName; + private String houseCode; + private String qrCodeUrl; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 64da6e6e16..87ef1f64d8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -1,16 +1,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.result.HomeUserBriefResultDTO; -import com.epmet.service.MyHomeService; -import lombok.extern.slf4j.Slf4j; -import oracle.jdbc.proxy.annotation.Post; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; import com.epmet.commons.tools.enums.HomeMemberOperationEnum; +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.AddGroup; @@ -18,13 +10,14 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.RegisterAndBindFormDTO; +import com.epmet.dto.result.HomeInfoResultDTO; +import com.epmet.dto.result.HomeUserBriefResultDTO; import com.epmet.service.IcResiUserConfirmService; +import com.epmet.service.MyHomeService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -110,4 +103,26 @@ public class MyHomeController { return icResiUserConfirmService.getMemberDetail(dto); } + /** + * 注册绑定家庭信息 + * + * @Param tokenDto + * @Param formDTO + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/1 10:26 + */ + @PostMapping("registerAndBind") + public Result registerAndBind(@LoginUser TokenDto tokenDto, RegisterAndBindFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + myHomeService.registerAndBind(formDTO); + return new Result(); + } + + @PostMapping("homeInfo") + public Result getHomeInfo(@LoginUser TokenDto tokenDto) { + HomeInfoResultDTO result = myHomeService.getHomeInfo(tokenDto); + return new Result().ok(result); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java index 1eae402d2f..0d1667b03d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java @@ -1,8 +1,9 @@ package com.epmet.service; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dto.form.RegisterAndBindFormDTO; +import com.epmet.dto.result.HomeInfoResultDTO; import com.epmet.dto.result.HomeUserBriefResultDTO; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; import java.util.List; @@ -12,6 +13,25 @@ import java.util.List; * @Date 2022/5/31 16:21 */ public interface MyHomeService { + /** + * 注册绑定房屋信息 + * + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2022/6/1 16:33 + */ + void registerAndBind(RegisterAndBindFormDTO formDTO); + + /** + * 获取用户绑定的房屋信息 + * + * @Param tokenDto + * @Return {@link HomeInfoResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/1 16:52 + */ + HomeInfoResultDTO getHomeInfo(TokenDto tokenDto); /** * 查询家庭成员 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index 6bf9364dd9..741e3fd82b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -1,17 +1,41 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcResiUserDao; +import com.epmet.dao.UserBaseInfoDao; +import com.epmet.dao.UserResiInfoDao; +import com.epmet.dao.UserRoleDao; import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.UserResiInfoDTO; +import com.epmet.dto.form.GetRoleKeyListFormDTO; +import com.epmet.dto.form.RegisterAndBindFormDTO; +import com.epmet.dto.result.HomeInfoResultDTO; import com.epmet.dto.result.HomeUserBriefResultDTO; -import com.epmet.feign.GovOrgFeignClient; +import com.epmet.dto.result.ResiUserBaseInfoResultDTO; +import com.epmet.entity.IcResiUserEntity; +import com.epmet.entity.UserBaseInfoEntity; +import com.epmet.entity.UserResiInfoEntity; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcResiUserService; import com.epmet.service.MyHomeService; +import com.epmet.service.UserBaseInfoService; +import com.epmet.service.UserResiInfoService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.compress.utils.Lists; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; /** @@ -25,9 +49,20 @@ public class MyHomeServiceImpl implements MyHomeService { @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; - @Autowired private IcResiUserService icResiUserService; + @Resource + private UserRoleDao userRoleDao; + @Resource + private UserResiInfoService userResiInfoService; + @Resource + private UserResiInfoDao userResiInfoDao; + @Resource + private UserBaseInfoService userBaseInfoService; + @Resource + private UserBaseInfoDao userBaseInfoDao; + @Resource + private IcResiUserDao icResiUserDao; @Override public List selectListHomeMember(String houseCode, String customerId) { @@ -40,4 +75,112 @@ public class MyHomeServiceImpl implements MyHomeService { return Lists.newArrayList(); } + + /** + * 注册绑定房屋信息 + * + * @Param formDTO + * @Return + * @Author zhaoqifeng + * @Date 2022/6/1 16:33 + */ + @Override + public void registerAndBind(RegisterAndBindFormDTO formDTO) { + //TODO 是否走进入网格(entergrid)流程 + //1.判断是否是居民,如果不是则注册居民,如果是则更新居民信息 + GetRoleKeyListFormDTO getRoleKeyListFormDTO = new GetRoleKeyListFormDTO(); + getRoleKeyListFormDTO.setUserId(formDTO.getUserId()); + getRoleKeyListFormDTO.setGridId(formDTO.getGridId()); + List roleList = userRoleDao.selectUserRoleKeyList(getRoleKeyListFormDTO); + + if (CollectionUtils.isNotEmpty(roleList) && roleList.contains("registered_resi")) { + //更新user_resi_info和user_base_info的信息 + UserResiInfoEntity userResiInfo = new UserResiInfoEntity(); + userResiInfo.setSurname(formDTO.getSurname()); + userResiInfo.setName(formDTO.getName()); + userResiInfo.setIdNum(formDTO.getIdCard()); + userResiInfo.setRegMobile(formDTO.getMobile()); + userResiInfo.setResiVisitId(formDTO.getVisitId()); + userResiInfo.setDistrict(formDTO.getAddress()); + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(UserResiInfoEntity::getCustomerId, formDTO.getCustomerId()); + wrapper.eq(UserResiInfoEntity::getUserId, formDTO.getUserId()); + userResiInfoDao.update(userResiInfo, wrapper); + + UserBaseInfoEntity userBaseInfoEntity = ConvertUtils.sourceToTarget(userResiInfo, UserBaseInfoEntity.class); + userBaseInfoService.insertOrUpdate(userBaseInfoEntity); + } else { + //注册居民 + UserResiInfoDTO userResiInfoDTO = ConvertUtils.sourceToTarget(formDTO, UserResiInfoDTO.class); + userResiInfoDTO.setIdNum(formDTO.getIdCard()); + userResiInfoDTO.setRegMobile(formDTO.getMobile()); + userResiInfoDTO.setResiVisitId(formDTO.getVisitId()); + userResiInfoDTO.setDistrict(formDTO.getAddress()); + userResiInfoDTO.setCustomerId(formDTO.getCustomerId()); + userResiInfoDTO.setApp("resi"); + userResiInfoService.saveResiInfo(userResiInfoDTO); + } + //2.添加ic_resi_user信息 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, formDTO.getCustomerId()); + wrapper.eq(IcResiUserEntity::getIdCard, formDTO.getIdCard()); + IcResiUserEntity icUser = icResiUserDao.selectOne(wrapper); + + HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), formDTO.getHomeId()); + if (null == houseInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); + } + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); + if (null == agencyInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取组织信息失败", "获取组织信息失败"); + } + IcResiUserEntity icUserEntity = ConvertUtils.sourceToTarget(formDTO, IcResiUserEntity.class); + icUserEntity.setName(formDTO.getSurname() + formDTO.getName()); + icUserEntity.setAgencyId(houseInfo.getAgencyId()); + icUserEntity.setPids(agencyInfo.getPids()); + if (null != icUser) { + icUserEntity.setId(icUser.getId()); + icResiUserDao.updateById(icUserEntity); + } else { + icResiUserDao.insert(icUserEntity); + } + } + + /** + * 获取用户绑定的房屋信息 + * + * @param tokenDto + * @Param tokenDto + * @Return {@link HomeInfoResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/1 16:52 + */ + @Override + public HomeInfoResultDTO getHomeInfo(TokenDto tokenDto) { + HomeInfoResultDTO resultDto = new HomeInfoResultDTO(); + ResiUserBaseInfoResultDTO baseInfo = userBaseInfoDao.selecUserBaseInfoByUserId(tokenDto.getUserId()); + if (null == baseInfo) { + return resultDto; + } + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(IcResiUserEntity::getIdCard, baseInfo.getIdNum()); + IcResiUserEntity icUser = icResiUserDao.selectOne(wrapper); + + if (null == icUser) { + return resultDto; + } + resultDto.setIcResiUserId(icUser.getId()); + //TODO 获取房屋信息 + HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(tokenDto.getCustomerId(), icUser.getHomeId()); + if (null == houseInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); + } + resultDto.setHouseName(houseInfo.getAllName()); + resultDto.setHouseCode(null); + resultDto.setQrCodeUrl(null); + return resultDto; + } } From 9a3a02a80c16ef9d2540b1bc3216aaf8629a0729 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 17:23:28 +0800 Subject: [PATCH 290/416] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcHouseCodeInfoDTO.java | 12 ++--- .../com/epmet/dao/IcHouseCodeInfoDao.java | 24 +++++++-- .../epmet/entity/IcHouseCodeInfoEntity.java | 9 ++-- .../java/com/epmet/service/HouseService.java | 10 ++++ .../epmet/service/impl/HouseServiceImpl.java | 50 +++++++++++++++++++ .../resources/mapper/IcHouseCodeInfoDao.xml | 12 ++++- 6 files changed, 101 insertions(+), 16 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java index b2f77dc49b..7189bcfee0 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseCodeInfoDTO.java @@ -1,12 +1,12 @@ package com.epmet.dto; -import java.io.Serializable; -import java.util.Date; import lombok.Data; +import java.io.Serializable; + /** - * + * * * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-01 @@ -29,11 +29,11 @@ public class IcHouseCodeInfoDTO implements Serializable { /** * 最大的楼栋编码序列号 */ - private Integer buildingMaxNum; + private String buildingMaxNum; /** * 该楼栋下最大的房屋编码序列号 */ - private Integer houseMaxNum; + private String houseMaxNum; -} \ No newline at end of file +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java index 5a31066fee..60767589c2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java @@ -3,14 +3,32 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcHouseCodeInfoEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** - * + * * * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-01 */ @Mapper public interface IcHouseCodeInfoDao extends BaseDao { - -} \ No newline at end of file + + /** + * @describe: 通过客户id和楼栋id查询 + * @author wangtong + * @date 2022/6/1 17:01 + * @params [customerId, buildingId] + * @return com.epmet.entity.IcHouseCodeInfoEntity + */ + IcHouseCodeInfoEntity selectByCuIdAndBuilId(@Param("customerId") String customerId,@Param("buildingId") String buildingId); + + /** + * @describe: 查询数据库里最大的楼栋编号 + * @author wangtong + * @date 2022/6/1 17:15 + * @params [] + * @return com.epmet.entity.IcHouseCodeInfoEntity + */ + IcHouseCodeInfoEntity selectMaxHouseMaxNum(); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java index 6b656623ef..5be7707802 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java @@ -1,15 +1,12 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** - * + * * * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-01 @@ -34,11 +31,11 @@ public class IcHouseCodeInfoEntity extends BaseEpmetEntity { /** * 最大的楼栋编码序列号 */ - private Integer buildingMaxNum; + private String buildingMaxNum; /** * 该楼栋下最大的房屋编码序列号 */ - private Integer houseMaxNum; + private String houseMaxNum; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index f663027f15..ac466900c2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -126,4 +126,14 @@ public interface HouseService { * @return void */ void downloadZip(HttpServletResponse response,IcHouseListFormDTO formDTO) throws Exception; + + /** + * @describe: 生成自增的房屋编码,编码规则: + * 国家统计局社区区划代码(370211010042)12位数字+楼栋序列码(5位数字自增)+房屋码(5位数字自增) + * @author wangtong + * @date 2022/6/1 16:58 + * @params [customerId-客户id, buildingId-楼栋id, areaCode-区划代码] + * @return java.lang.String + */ + String createHouseCode(String customerId,String buildingId,String areaCode); } 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 8a66ed40ea..f9d10fa601 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 @@ -30,6 +30,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcHouseChangeDetailEntity; import com.epmet.entity.IcHouseChangeRecordEntity; +import com.epmet.entity.IcHouseCodeInfoEntity; import com.epmet.entity.IcHouseEntity; import com.epmet.enums.HouseChangeEnums; import com.epmet.enums.HousePurposeEnums; @@ -111,6 +112,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { private IcHouseChangeDetailService changeDetailService; @Autowired private HouseService houseService; + @Autowired + private IcHouseCodeInfoDao icHouseCodeInfoDao; @Override @@ -839,5 +842,52 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { return house.getNeighborHoodName() + File.separator +house.getBuildingName() + File.separator +house.getUnitNum() + File.separator + house.getDoorName() + HouseQrcodeEnum.SUFFIX.getCode(); } + @Override + public String createHouseCode(String customerId, String buildingId, String areaCode) { + String result = ""; + IcHouseCodeInfoEntity codeEntity = icHouseCodeInfoDao.selectByCuIdAndBuilId(customerId, buildingId); + if (null == codeEntity) { + //查询数据库里最大的楼栋编号 + IcHouseCodeInfoEntity maxCodeEntity = icHouseCodeInfoDao.selectMaxHouseMaxNum(); + //新增楼栋信息 + IcHouseCodeInfoEntity newEntity = new IcHouseCodeInfoEntity(); + if (null != maxCodeEntity) { + Integer buildingMaxNum = Integer.valueOf(maxCodeEntity.getBuildingMaxNum()) + 1; + result = areaCode + getNewMaxIndex(buildingMaxNum) + "00001"; + } else { + //数据库里面的第一条数据 + result = areaCode + "00001" + "00001"; + newEntity.setBuildingMaxNum("00001"); + newEntity.setHouseMaxNum("00001"); + } + newEntity.setCustomerId(customerId); + newEntity.setBuildingId(buildingId); + icHouseCodeInfoDao.insert(newEntity); + } else { + Integer houseMaxNum = Integer.valueOf(codeEntity.getHouseMaxNum()) + 1; + result = areaCode + codeEntity.getBuildingMaxNum() + getNewMaxIndex(houseMaxNum); + //更新该楼栋下最大的房间编号 + codeEntity.setHouseMaxNum(getNewMaxIndex(houseMaxNum)); + icHouseCodeInfoDao.updateById(codeEntity); + } + return result; + } + + + /** + * @return java.lang.String + * @describe: 把数字转换成5位的字符串,不够的前面补0 + * @author wangtong + * @date 2022/6/1 14:27 + * @params [maxIndex] + */ + private String getNewMaxIndex(Integer maxIndex) { + String result = maxIndex.toString(); + while (result.length() < 5) { + result = "0" + result; + } + return result; + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml index 6fcac58bed..b57ef127a2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml @@ -9,6 +9,16 @@ + + - \ No newline at end of file + From 1899f79c5b2ac27dc2e5c71b1ba723637ae3db79 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 1 Jun 2022 17:44:43 +0800 Subject: [PATCH 291/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcResiUserConfirmController.java | 15 ++++++++- .../epmet/controller/MyHomeController.java | 2 +- .../service/IcResiUserConfirmService.java | 10 ++++++ .../impl/IcResiUserConfirmServiceImpl.java | 33 +++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java index 0c2ca8bb4c..fc1e27a907 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserConfirmController.java @@ -7,8 +7,8 @@ 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.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.excel.IcResiUserConfirmExcel; import com.epmet.service.IcResiUserConfirmService; @@ -78,5 +78,18 @@ public class IcResiUserConfirmController { } + /** + * 审核 + * + * @Param tokenDto + * @Return {@link Result} + * @Author zhaoqifeng + * @Date 2022/6/1 17:26 + */ + @PostMapping("confirm") + public Result confirm(@RequestBody IcResiUserConfirmDTO dto) { + icResiUserConfirmService.confirm(dto); + return new Result(); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 87ef1f64d8..9aff52b474 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -113,7 +113,7 @@ public class MyHomeController { * @Date 2022/6/1 10:26 */ @PostMapping("registerAndBind") - public Result registerAndBind(@LoginUser TokenDto tokenDto, RegisterAndBindFormDTO formDTO) { + public Result registerAndBind(@LoginUser TokenDto tokenDto, @RequestBody RegisterAndBindFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); myHomeService.registerAndBind(formDTO); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java index e49f0e2ac2..692b12e514 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java @@ -114,4 +114,14 @@ public interface IcResiUserConfirmService extends BaseService getMemberDetail(IcResiUserConfirmGetDTO dto); + + /** + * 审核 + * + * @Param dto + * @Return + * @Author zhaoqifeng + * @Date 2022/6/1 17:27 + */ + void confirm(IcResiUserConfirmDTO dto); } 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 1623f17943..11da6a1409 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 @@ -4,6 +4,7 @@ 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -139,4 +140,36 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 17:55:20 +0800 Subject: [PATCH 292/416] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=80=E6=88=B7?= =?UTF-8?q?=E4=B8=80=E6=A1=A3=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/HouseController.java | 12 ++-- .../java/com/epmet/service/HouseService.java | 9 +++ .../epmet/service/impl/HouseServiceImpl.java | 39 +++++++++++ .../impl/IcNeighborHoodServiceImpl.java | 3 +- .../epmet/util/ConvertToMultipartFile.java | 64 +++++++++++++++++++ 5 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/util/ConvertToMultipartFile.java diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 38a243e368..163d56fc7c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -52,6 +52,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.OssFeignClient; import com.epmet.service.HouseService; import com.epmet.util.ExcelPoiUtils; import com.google.common.cache.Cache; @@ -426,11 +427,12 @@ public class HouseController implements ResultDataResolver { } /** - * Desc: 生成某类型下的二维码 - * @param formDTO - * @author zxc - * @date 2022/3/2 10:32 上午 - */ + * @describe: 下载房屋编码 + * @author wangtong + * @date 2022/6/1 17:24 + * @params [formDTO, response] + * @return void + */ @PostMapping("createHouseQrcode") public void createQrCode(@RequestBody HouseQrcodeFormDTO formDTO, HttpServletResponse response){ ValidatorUtils.validateEntity(formDTO); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index ac466900c2..157c124b7d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -136,4 +136,13 @@ public interface HouseService { * @return java.lang.String */ String createHouseCode(String customerId,String buildingId,String areaCode); + + /** + * @describe: 生成一户一码的二维码地址 + * @author wangtong + * @date 2022/6/1 17:41 + * @params [houseId] + * @return java.lang.String + */ + String createHouseQrcodeUrl(String houseId); } 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 f9d10fa601..8e011f6685 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 @@ -12,6 +12,7 @@ import com.epmet.commons.tools.enums.HouseQrcodeEnum; import com.epmet.commons.tools.enums.OrgTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; @@ -38,10 +39,12 @@ import com.epmet.enums.HouseRentFlagEnums; import com.epmet.enums.HouseTypeEnums; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.OssFeignClient; import com.epmet.model.HouseInfoModel; import com.epmet.model.ImportHouseInfoListener; import com.epmet.redis.IcHouseRedis; import com.epmet.service.*; +import com.epmet.util.ConvertToMultipartFile; import com.epmet.util.ExcelPoiUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -53,6 +56,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.imageio.ImageIO; @@ -114,6 +118,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { private HouseService houseService; @Autowired private IcHouseCodeInfoDao icHouseCodeInfoDao; + @Autowired + private OssFeignClient ossFeignClient; @Override @@ -873,6 +879,39 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { return result; } + @Override + public String createHouseQrcodeUrl(String houseId) { + if (StringUtils.isBlank(houseId)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "房屋id不可为空", "房屋id不可为空"); + } + try { + IcHouseListResultDTO house = icHouseDao.selectHouseQrcodeById(houseId); + if (null == house) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); + } + //url组成:小程序地址?房屋编码 + String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + + //BufferedImage 转化为 ByteArrayOutputStream + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ImageIO.write(image, "jpg", out); + //ByteArrayOutputStream 转化为 byte[] + byte[] imageByte = out.toByteArray(); + //将 byte[] 转为 MultipartFile + MultipartFile multipartFile = new ConvertToMultipartFile(imageByte, "newNamepic", "pic1", "jpg", imageByte.length); + Result uploadResult = ossFeignClient.uploadImportTaskDescFile(multipartFile); + if (uploadResult == null || !uploadResult.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败", "上传一户一档二维码失败"); + } else { + return uploadResult.getData().getUrl(); + } + } catch (Exception e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败" + errormsg, "上传一户一档二维码失败" + errormsg); + } + } + /** * @return java.lang.String 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 ee0d37afef..d8cfccb001 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 @@ -58,7 +58,6 @@ import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.*; import com.epmet.excel.IcNeighborHoodExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; -import com.epmet.feign.OssFeignClient; import com.epmet.model.ImportNeighborHoodInfoListener; import com.epmet.model.NeighborHoodInfoModel; import com.epmet.redis.IcHouseRedis; @@ -118,7 +117,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 17:58:30 +0800 Subject: [PATCH 293/416] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=80=E6=88=B7?= =?UTF-8?q?=E4=B8=80=E6=A1=A3=E4=BA=8C=E7=BB=B4=E7=A0=81-=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=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/service/impl/HouseServiceImpl.java | 4 ++-- .../com/epmet/service/impl/IcNeighborHoodServiceImpl.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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 8e011f6685..e12de14a5c 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 @@ -895,11 +895,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { //BufferedImage 转化为 ByteArrayOutputStream ByteArrayOutputStream out = new ByteArrayOutputStream(); - ImageIO.write(image, "jpg", out); + ImageIO.write(image, "png", out); //ByteArrayOutputStream 转化为 byte[] byte[] imageByte = out.toByteArray(); //将 byte[] 转为 MultipartFile - MultipartFile multipartFile = new ConvertToMultipartFile(imageByte, "newNamepic", "pic1", "jpg", imageByte.length); + MultipartFile multipartFile = new ConvertToMultipartFile(imageByte, "newNamepic", "pic1", "png", imageByte.length); Result uploadResult = ossFeignClient.uploadImportTaskDescFile(multipartFile); if (uploadResult == null || !uploadResult.success()) { 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/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index d8cfccb001..ee0d37afef 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 @@ -58,6 +58,7 @@ import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.*; import com.epmet.excel.IcNeighborHoodExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.OssFeignClient; import com.epmet.model.ImportNeighborHoodInfoListener; import com.epmet.model.NeighborHoodInfoModel; import com.epmet.redis.IcHouseRedis; @@ -117,7 +118,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 18:12:44 +0800 Subject: [PATCH 294/416] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/redis/common/bean/HouseInfoCache.java | 17 +++++++++++++++++ .../java/com/epmet/dto/result/HouseInfoDTO.java | 16 ++++++++++++++++ .../com/epmet/controller/HouseController.java | 1 - .../src/main/resources/mapper/IcHouseDao.xml | 7 ++++++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java index 4c6551b881..075a954290 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java @@ -89,4 +89,21 @@ public class HouseInfoCache implements Serializable { * 组织的area_code */ private String areaCode; + + /** + * 网格id + */ + private String gridId; + /** + * 网格名称 + */ + private String gridName; + /** + * 房屋编码 + */ + private String houseCode; + /** + * 二维码地址 + */ + private String houseQrcodeUrl; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java index ae5a6d07ba..aa2b2fffca 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java @@ -91,4 +91,20 @@ public class HouseInfoDTO implements Serializable { * 组织的area_code */ private String areaCode; + /** + * 网格id + */ + private String gridId; + /** + * 网格名称 + */ + private String gridName; + /** + * 房屋编码 + */ + private String houseCode; + /** + * 二维码地址 + */ + private String houseQrcodeUrl; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 163d56fc7c..935da2cf85 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -52,7 +52,6 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.OssFeignClient; import com.epmet.service.HouseService; import com.epmet.util.ExcelPoiUtils; import com.google.common.cache.Cache; 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 1eaa2327bd..b65aefc261 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 @@ -256,11 +256,16 @@ IFNULL(ib.LATITUDE,'') as buildingLatitude, ih.CUSTOMER_ID AS customerId, concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.DOOR_NAME,'')) AS allName, - n.AGENCY_ID as agencyId + n.AGENCY_ID as agencyId, + n.GRID_ID, + gr.GRID_NAME, + ih.HOUSE_CODE, + ih.HOUSE_QRCODE_URL FROM ic_house ih left JOIN ic_neighbor_hood n ON ( ih.NEIGHBOR_HOOD_ID = n.id AND n.DEL_FLAG = '0') left JOIN ic_building ib ON ( ih.BUILDING_ID = ib.id AND ib.DEL_FLAG = '0') left JOIN ic_building_unit u ON ( ih.BUILDING_UNIT_ID = u.ID AND u.DEL_FLAG = '0') + left join customer_grid gr ON (gr.id=n.GRID_ID and gr.ABANDON_FLAG=0 and gr.DEL_FLAG=0) WHERE ih.DEL_FLAG = '0' AND ih.ID = #{houseId} From 0133151a74c9083f657c521be5d5491a9407d306 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 1 Jun 2022 18:24:07 +0800 Subject: [PATCH 295/416] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=EF=BC=8C=E6=88=BF=E5=B1=8B=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/MyHomeServiceImpl.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index 741e3fd82b..4b79844581 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -16,6 +16,7 @@ import com.epmet.dao.UserResiInfoDao; import com.epmet.dao.UserRoleDao; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.UserResiInfoDTO; +import com.epmet.dto.form.EnterGridFormDTO; import com.epmet.dto.form.GetRoleKeyListFormDTO; import com.epmet.dto.form.RegisterAndBindFormDTO; import com.epmet.dto.result.HomeInfoResultDTO; @@ -25,15 +26,13 @@ import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserResiInfoEntity; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.service.IcResiUserService; -import com.epmet.service.MyHomeService; -import com.epmet.service.UserBaseInfoService; -import com.epmet.service.UserResiInfoService; +import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.compress.utils.Lists; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; @@ -63,6 +62,8 @@ public class MyHomeServiceImpl implements MyHomeService { private UserBaseInfoDao userBaseInfoDao; @Resource private IcResiUserDao icResiUserDao; + @Resource + private RegisterRelationService registerRelationService; @Override public List selectListHomeMember(String houseCode, String customerId) { @@ -85,8 +86,15 @@ public class MyHomeServiceImpl implements MyHomeService { * @Date 2022/6/1 16:33 */ @Override + @Transactional(rollbackFor = Exception.class) public void registerAndBind(RegisterAndBindFormDTO formDTO) { //TODO 是否走进入网格(entergrid)流程 + EnterGridFormDTO userInfoParams = new EnterGridFormDTO(); + userInfoParams.setUserId(formDTO.getUserId()); + userInfoParams.setCustomerId(formDTO.getCustomerId()); + userInfoParams.setGridId(formDTO.getGridId()); + registerRelationService.getUserInfoAndRoles(userInfoParams); + //1.判断是否是居民,如果不是则注册居民,如果是则更新居民信息 GetRoleKeyListFormDTO getRoleKeyListFormDTO = new GetRoleKeyListFormDTO(); getRoleKeyListFormDTO.setUserId(formDTO.getUserId()); @@ -173,14 +181,13 @@ public class MyHomeServiceImpl implements MyHomeService { return resultDto; } resultDto.setIcResiUserId(icUser.getId()); - //TODO 获取房屋信息 HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(tokenDto.getCustomerId(), icUser.getHomeId()); if (null == houseInfo) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); } resultDto.setHouseName(houseInfo.getAllName()); - resultDto.setHouseCode(null); - resultDto.setQrCodeUrl(null); + resultDto.setHouseCode(houseInfo.getHouseCode()); + resultDto.setQrCodeUrl(houseInfo.getHouseQrcodeUrl()); return resultDto; } } From 040ffefbc086fd6623b5d1827e52c4dea43c040a Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 18:36:25 +0800 Subject: [PATCH 296/416] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=8E=B7=E5=8F=96=E6=88=BF=E5=B1=8B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcHouseInfoFormDTO.java | 26 +++++++++ .../dto/result/IcHouseInfoResultDTO.java | 55 +++++++++++++++++++ .../com/epmet/controller/HouseController.java | 16 ++++++ .../main/java/com/epmet/dao/IcHouseDao.java | 9 +++ .../java/com/epmet/service/HouseService.java | 9 +++ .../epmet/service/impl/HouseServiceImpl.java | 10 ++++ .../src/main/resources/mapper/IcHouseDao.xml | 5 ++ 7 files changed, 130 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseInfoFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseInfoFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseInfoFormDTO.java new file mode 100644 index 0000000000..adde362546 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseInfoFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** +* @describe: 根据房屋编码获取房屋信息 +* @author wangtong +* @date 2022/6/1 18:17 +* @params +* @return +*/ +@Data +public class IcHouseInfoFormDTO extends PageFormDTO { + + private static final long serialVersionUID = -1L; + + + @NotNull(message = "房屋编码不可为空") + private String houseCode; + + private String customerId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java new file mode 100644 index 0000000000..dd619a55bb --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java @@ -0,0 +1,55 @@ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:房屋列表结果类 + * + * @author liujianjun + */ +@Data +public class IcHouseInfoResultDTO implements Serializable { + + + private static final long serialVersionUID = 4963952996288796744L; + + /** + * 所属网格 + */ + private String gridName; + private String gridId; + + /** + * 所属小区 + */ + private String neighborHoodId; + private String neighborHoodName; + + /** + * 所属楼栋 + */ + private String buildingId; + private String buildingName; + + /** + * 所属单元id + */ + private String buildingUnitId; + private String unitName; + + /** + * 房间名称 + */ + private String houseName; + + /** + * 门牌号 + */ + private String doorName; + + + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 935da2cf85..55b756a111 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -484,4 +484,20 @@ public class HouseController implements ResultDataResolver { ValidatorUtils.validateEntity(formDTO); houseService.downloadZip(response,formDTO); } + + /** + * @describe: 根据房屋编码获取信息 + * @author wangtong + * @date 2022/6/1 18:24 + * @params [formDTO] + * @return com.epmet.dto.result.IcHouseInfoResultDTO + */ + @PostMapping("getHouseInfoByCode") + public Result getHouseInfoByCode(@LoginUser TokenDto loginUser,@RequestBody IcHouseInfoFormDTO formDTO) { + //效验数据 + ValidatorUtils.validateEntity(formDTO); + formDTO.setCustomerId(loginUser.getCustomerId()); + return houseService.getHouseInfoByCode(formDTO); + + } } 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 4983e09e52..a08467a716 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 @@ -110,4 +110,13 @@ public interface IcHouseDao extends BaseDao { * @return com.epmet.dto.result.IcHouseListResultDTO */ IcHouseListResultDTO selectHouseQrcodeById(@Param("id") String id); + + /** + * @describe: 通过房屋编码获取信息 + * @author wangtong + * @date 2022/6/1 18:29 + * @params [houseCode] + * @return com.epmet.entity.IcHouseEntity + */ + IcHouseEntity selectByHouseCode(@Param("houseCode") String houseCode); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 157c124b7d..ce3de8fbb5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -145,4 +145,13 @@ public interface HouseService { * @return java.lang.String */ String createHouseQrcodeUrl(String houseId); + + /** + * @describe: 根据房屋编码获取信息 + * @author wangtong + * @date 2022/6/1 18:24 + * @params [formDTO] + * @return com.epmet.commons.tools.utils.Result + */ + Result getHouseInfoByCode(IcHouseInfoFormDTO formDTO); } 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 e12de14a5c..dbf68d3ba7 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 @@ -16,9 +16,11 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; 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.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.BarcodeUtils; import com.epmet.commons.tools.utils.ConvertUtils; @@ -912,6 +914,14 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } } + @Override + public Result getHouseInfoByCode(IcHouseInfoFormDTO formDTO) { + IcHouseEntity house = icHouseDao.selectByHouseCode(formDTO.getHouseCode()); + HouseInfoCache cache = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(),house.getId()); + IcHouseInfoResultDTO resut = ConvertUtils.sourceToTarget(cache, IcHouseInfoResultDTO.class); + return new Result().ok(resut); + } + /** * @return java.lang.String 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 b65aefc261..79ac70a335 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 @@ -394,5 +394,10 @@ where a.id=#{id} and a.del_flag = '0' + From d16de7541eefe28e2efb38dd53915d0757f55d04 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 2 Jun 2022 09:12:00 +0800 Subject: [PATCH 297/416] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcHouseDao.xml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 54a455eac0..e907804e12 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 @@ -122,6 +122,7 @@ LEFT JOIN customer_agency ag on ag.ID = c.AGENCY_ID and d.DEL_FLAG = '0' 1 = 1 + and a.del_flag = '0' and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%') else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end @@ -171,13 +172,16 @@ AND a.REMARK like CONCAT('%',#{remark},'%') - - AND ((DATE_FORMAT(a.CREATED_TIME,'%Y%m%d')) >= #{updateStartDate} OR (DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) >= #{updateStartDate}) + + AND ((DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') >= #{updateStartDate} AND DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') #{updateEndDate}) + OR (DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d') >= #{updateStartDate} AND DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d') #{updateEndDate})) - - AND ((DATE_FORMAT(a.CREATED_TIME,'%Y%m%d')) #{updateEndDate} OR (DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) #{updateEndDate}) + + AND (DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') #{updateEndDate}) OR ((DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) #{updateEndDate}) + + + AND (DATE_FORMAT(a.CREATED_TIME,'%Y%m%d') =]]> #{updateStartDate}) OR ((DATE_FORMAT(a.UPDATED_TIME,'%Y%m%d')) =]]> #{updateStartDate}) - and a.del_flag = '0' #排序规则:根据小区、楼栋、单元、门牌号(分别按照数字和中文)分别升序排序 ORDER BY From b5551f57c500a130a4e3e167e1abe80e048c2a99 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 10:01:47 +0800 Subject: [PATCH 298/416] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/HouseQrcodeEnum.java | 2 +- .../java/com/epmet/dto/form/TestFormDTO.java | 28 +++++++++++++++++++ .../dto/result/IcHouseListResultDTO.java | 2 ++ .../com/epmet/controller/HouseController.java | 13 +++++++++ .../com/epmet/dao/IcHouseCodeInfoDao.java | 9 ++++++ .../epmet/entity/IcHouseCodeInfoEntity.java | 3 +- .../epmet/service/impl/HouseServiceImpl.java | 9 ++++-- .../resources/mapper/IcHouseCodeInfoDao.xml | 6 ++++ .../src/main/resources/mapper/IcHouseDao.xml | 3 +- 9 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/TestFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java index 2cc8b464cb..1682e79beb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java @@ -10,7 +10,7 @@ package com.epmet.commons.tools.enums; public enum HouseQrcodeEnum { SUFFIX(".png", "二维码格式的后缀"), - PREFIX("http://localhost:8080/epmet-oper-gov", "二维码地址的前缀"); + PREFIX("/subpages/mine/pages/family/register", "二维码地址的前缀"); private String code; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/TestFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/TestFormDTO.java new file mode 100644 index 0000000000..2443e66a94 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/TestFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** +* @describe: 根据房屋编码获取房屋信息 +* @author wangtong +* @date 2022/6/1 18:17 +* @params +* @return +*/ +@Data +public class TestFormDTO extends PageFormDTO { + + private static final long serialVersionUID = -1L; + + private String buildingId; + + private String customerId; + + private String areaCode; + + private String houseId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java index d3fa0c0576..d380e32e14 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java @@ -16,6 +16,8 @@ public class IcHouseListResultDTO implements Serializable { private static final long serialVersionUID = 4963952996288796744L; + private String customerId; + private String houseId; private String doorName; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 55b756a111..eb892c5d8c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -500,4 +500,17 @@ public class HouseController implements ResultDataResolver { return houseService.getHouseInfoByCode(formDTO); } + + @PostMapping("createHouseCode") + public String createHouseCode(@RequestBody TestFormDTO formDTO) { + //效验数据 + return houseService.createHouseCode(formDTO.getCustomerId(),formDTO.getBuildingId(),formDTO.getAreaCode()); + + } + + @PostMapping("createHouseQrcodeUrl") + public String createHouseQrcodeUrl(@RequestBody TestFormDTO formDTO) { + return houseService.createHouseQrcodeUrl(formDTO.getHouseId()); + + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java index 60767589c2..fd67785cb4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseCodeInfoDao.java @@ -31,4 +31,13 @@ public interface IcHouseCodeInfoDao extends BaseDao { * @return com.epmet.entity.IcHouseCodeInfoEntity */ IcHouseCodeInfoEntity selectMaxHouseMaxNum(); + + /** + * @describe: 根据客户id和楼栋id更新房屋最大编码 + * @author wangtong + * @date 2022/6/2 9:37 + * @params [codeEntity] + * @return void + */ + void updateByCuIdAndBuId(IcHouseCodeInfoEntity codeEntity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java index 5be7707802..73fd19862c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseCodeInfoEntity.java @@ -1,7 +1,6 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -14,7 +13,7 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper=false) @TableName("ic_house_code_info") -public class IcHouseCodeInfoEntity extends BaseEpmetEntity { +public class IcHouseCodeInfoEntity { private static final long serialVersionUID = 1L; 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 dbf68d3ba7..27489590cc 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 @@ -852,6 +852,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public String createHouseCode(String customerId, String buildingId, String areaCode) { + if(StringUtils.isBlank(customerId) || StringUtils.isBlank(buildingId) ||StringUtils.isBlank(areaCode)){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); + } String result = ""; IcHouseCodeInfoEntity codeEntity = icHouseCodeInfoDao.selectByCuIdAndBuilId(customerId, buildingId); if (null == codeEntity) { @@ -862,6 +865,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (null != maxCodeEntity) { Integer buildingMaxNum = Integer.valueOf(maxCodeEntity.getBuildingMaxNum()) + 1; result = areaCode + getNewMaxIndex(buildingMaxNum) + "00001"; + newEntity.setBuildingMaxNum(getNewMaxIndex(buildingMaxNum)); + newEntity.setHouseMaxNum("00001"); } else { //数据库里面的第一条数据 result = areaCode + "00001" + "00001"; @@ -876,7 +881,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { result = areaCode + codeEntity.getBuildingMaxNum() + getNewMaxIndex(houseMaxNum); //更新该楼栋下最大的房间编号 codeEntity.setHouseMaxNum(getNewMaxIndex(houseMaxNum)); - icHouseCodeInfoDao.updateById(codeEntity); + icHouseCodeInfoDao.updateByCuIdAndBuId(codeEntity); } return result; } @@ -902,7 +907,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { byte[] imageByte = out.toByteArray(); //将 byte[] 转为 MultipartFile MultipartFile multipartFile = new ConvertToMultipartFile(imageByte, "newNamepic", "pic1", "png", imageByte.length); - Result uploadResult = ossFeignClient.uploadImportTaskDescFile(multipartFile); + Result uploadResult = ossFeignClient.uploadQrCodeV2(multipartFile,house.getCustomerId()); if (uploadResult == null || !uploadResult.success()) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败", "上传一户一档二维码失败"); } else { diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml index b57ef127a2..385a13b216 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseCodeInfoDao.xml @@ -19,6 +19,12 @@ order by BUILDING_MAX_NUM desc limit 1 + + update ic_house_code_info + set HOUSE_MAX_NUM=#{houseMaxNum} + where CUSTOMER_ID = #{customerId} + and BUILDING_ID = #{buildingId} + 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 79ac70a335..12cc0ccd16 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 @@ -386,7 +386,8 @@ b.BUILDING_NAME as buildingName, CONCAT(d.UNIT_NUM,'单元') as unitNum, a.DOOR_NAME as doorName, - a.HOUSE_CODE + a.HOUSE_CODE, + a.CUSTOMER_ID 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' From 3e780435d5cbe9023aa8801c6d249faab2ec1863 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 10:07:37 +0800 Subject: [PATCH 299/416] =?UTF-8?q?=E6=A5=BC=E6=A0=8B=E8=B0=83=E7=94=A8ruo?= =?UTF-8?q?yi=E6=8E=A5=E5=8F=A3=E5=AD=98=E5=82=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/PreserVationFormDTO.java | 41 ++++++++ .../controller/CaLoudongController.java | 15 +++ .../com/epmet/opendata/dao/CaLoudongDao.java | 2 + .../opendata/entity/CaResidentEntity.java | 10 ++ .../opendata/entity/CaRotatorsEntity.java | 10 ++ .../opendata/service/CaLoudongService.java | 8 ++ .../service/impl/CaLoudongServiceImpl.java | 94 ++++++++++++++++++- .../main/resources/mapper/CaLoudongDao.xml | 3 + 8 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java new file mode 100644 index 0000000000..e2cb679bf7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/PreserVationFormDTO.java @@ -0,0 +1,41 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class PreserVationFormDTO implements Serializable { + + private static final long serialVersionUID = 3489407841261413891L; + + /** + * 表名 + */ + private String tableSchema; + + /** + * 表名 + */ + private String tableName; + + /** + * 页码 + */ + private Integer pageNo; + + /** + * 每页条数 + */ + private Integer pageSize; + + /** + * 查询条件 + */ + private String whereCase; + + /** + *排序字段 + */ + private String orderBy; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index 275199a634..8ef1103201 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.excel.CaLoudongExcel; @@ -113,4 +114,18 @@ public class CaLoudongController { return new Result().ok(result); } + /** + * 楼栋调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:02 + */ + @PostMapping("/preserLouDongVation") + public Result getPreserLouDongVation(@RequestBody PreserVationFormDTO dto) { + caLoudongService.preserLouDongVation(dto); + return new Result(); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index b0fff00b58..27c2774580 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -41,4 +41,6 @@ public interface CaLoudongDao extends BaseDao { * @return */ CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId); + + void deleteAll(); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java index eededd096d..56fe30731c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java @@ -26,6 +26,16 @@ public class CaResidentEntity extends BaseEpmetEntity { */ private Long residentId; + /** + * homeId + */ + private String homeId; + + /** + * 对应的ic_resi_user主表Id + */ + private String icResiUser; + /** * 网格ID */ diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java index 81bff265cc..8f6cc57b8f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java @@ -26,6 +26,16 @@ public class CaRotatorsEntity extends BaseEpmetEntity { */ private Long rotatorsId; + /** + * homeId + */ + private String homeId; + + /** + * 对应的ic_resi_user主表Id + */ + private String icResiUser; + /** * 公民身份证号 */ diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index 6527e0dcc5..f1e30c76e3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; @@ -99,4 +100,11 @@ public interface CaLoudongService extends BaseService { * @return */ CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto); + + /** + * 楼栋调用ruoyi接口存储数据 + * + * @param dto + */ + void preserLouDongVation(PreserVationFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 9cc53db593..87909e4097 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -1,14 +1,21 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaLoudongDao; import com.epmet.opendata.dto.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; @@ -16,14 +23,14 @@ import com.epmet.opendata.redis.CaLoudongRedis; import com.epmet.opendata.service.CaLoudongService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.google.gson.JsonObject; 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; +import java.text.SimpleDateFormat; +import java.util.*; /** * 楼栋基本信息表 @@ -111,5 +118,86 @@ public class CaLoudongServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); + } + + enum loudongEnum { + + LD("unicom", "ca_loudong"), + ; + + private String name; + private String code; + + + loudongEnum(String name, String code) { + this.name = name; + this.code = code; + } + + } + + private int listLouDong(PreserVationFormDTO dto) { + String data = HttpClientManager.getInstance().sendPostByJSON("http://120.221.72.83:9090/bridge/unicom/page", JSON.toJSONString(dto)).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index e277fe991c..afb1702310 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -48,6 +48,9 @@ + + delete from ca_loudong + From 4b4857f849a4e048e1b66a9980d91ea7e8dde40d Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 10:24:01 +0800 Subject: [PATCH 300/416] =?UTF-8?q?=E5=B9=B3=E6=88=BF=E8=B0=83=E7=94=A8ruo?= =?UTF-8?q?yi=E6=8E=A5=E5=8F=A3=E5=AD=98=E5=82=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CaPingfangController.java | 15 ++++ .../com/epmet/opendata/dao/CaPingfangDao.java | 2 + .../opendata/service/CaPingfangService.java | 8 ++ .../service/impl/CaPingfangServiceImpl.java | 88 +++++++++++++++++++ .../main/resources/mapper/CaPingfangDao.xml | 3 + 5 files changed, 116 insertions(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java index 5c5f592d43..99adb55e93 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.excel.CaPingfangExcel; import com.epmet.opendata.service.CaPingfangService; import org.springframework.beans.factory.annotation.Autowired; @@ -93,5 +94,19 @@ public class CaPingfangController { return new Result().ok(data); } + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:20 + */ + @PostMapping("/preserPingFangVation") + public Result getPreserPingFangVation(@RequestBody PreserVationFormDTO dto) { + caPingfangService.preserPingFangVation(dto); + return new Result(); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java index a07282a7b9..14ec80b58a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -22,4 +22,6 @@ public interface CaPingfangDao extends BaseDao { * @return */ List getPage(@Param("buildingName") String buildingName); + + void deleteAll(); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java index 7bd16e9185..2fbc007254 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java @@ -5,6 +5,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.entity.CaPingfangEntity; @@ -84,4 +85,11 @@ public interface CaPingfangService extends BaseService { * @return */ PageData getPage(CaPingfangFormDTO dto); + + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + */ + void preserPingFangVation(PreserVationFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 0b8f85c23f..9b986ca2a1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -1,16 +1,23 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaPingfangDao; import com.epmet.opendata.dto.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaPingfangResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaPingfangEntity; import com.epmet.opendata.redis.CaPingfangRedis; import com.epmet.opendata.service.CaPingfangService; @@ -95,4 +102,85 @@ public class CaPingfangServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 平房调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:21 + */ + @Override + public void preserPingFangVation(PreserVationFormDTO dto) { + baseDao.deleteAll(); + + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(pingFangEnum.PF.name); + dto.setTableName(pingFangEnum.PF.code); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date desc"); + + int pageNo = 1; + + int total = 0; + + do { + total = listPingFang(dto); + pageNo++; + dto.setPageNo(pageNo); + } while (total > (pageNo * NumConstant.FIFTY)); + } + + enum pingFangEnum { + + PF("unicom", "ca_pingfang"), + ; + + pingFangEnum(String name, String code) { + this.name = name; + this.code = code; + } + + private String name; + private String code; + } + + private int listPingFang(PreserVationFormDTO dto) { + String data = HttpClientManager.getInstance().sendPostByJSON("http://120.221.72.83:9090/bridge/unicom/page", JSON.toJSONString(dto)).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml index 6da205998e..27711e5ff6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -48,6 +48,9 @@ + + delete from ca_pingfang + SELECT rental_id, From 4440deb44e7d8b8e8d9d61f90c0423bc8e4a7ea5 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 2 Jun 2022 10:36:27 +0800 Subject: [PATCH 304/416] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/MyHomeServiceImpl.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index 4b79844581..dc0c4e3ee4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -10,10 +10,7 @@ import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.IcResiUserDao; -import com.epmet.dao.UserBaseInfoDao; -import com.epmet.dao.UserResiInfoDao; -import com.epmet.dao.UserRoleDao; +import com.epmet.dao.*; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.EnterGridFormDTO; @@ -25,6 +22,7 @@ import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserResiInfoEntity; +import com.epmet.entity.UserResiRegisterVisitEntity; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; @@ -35,6 +33,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.Date; import java.util.List; /** @@ -64,6 +63,8 @@ public class MyHomeServiceImpl implements MyHomeService { private IcResiUserDao icResiUserDao; @Resource private RegisterRelationService registerRelationService; + @Resource + private UserResiRegisterVisitDao userResiRegisterVisitDao; @Override public List selectListHomeMember(String houseCode, String customerId) { @@ -88,7 +89,7 @@ public class MyHomeServiceImpl implements MyHomeService { @Override @Transactional(rollbackFor = Exception.class) public void registerAndBind(RegisterAndBindFormDTO formDTO) { - //TODO 是否走进入网格(entergrid)流程 + //进入网格(entergrid)流程 EnterGridFormDTO userInfoParams = new EnterGridFormDTO(); userInfoParams.setUserId(formDTO.getUserId()); userInfoParams.setCustomerId(formDTO.getCustomerId()); @@ -119,11 +120,20 @@ public class MyHomeServiceImpl implements MyHomeService { UserBaseInfoEntity userBaseInfoEntity = ConvertUtils.sourceToTarget(userResiInfo, UserBaseInfoEntity.class); userBaseInfoService.insertOrUpdate(userBaseInfoEntity); } else { + //visit表添加数据 + UserResiRegisterVisitEntity visit = new UserResiRegisterVisitEntity(); + visit.setCustomerId(formDTO.getCustomerId()); + visit.setGridId(formDTO.getGridId()); + visit.setUserId(formDTO.getUserId()); + visit.setVisitFrom("register_and_bind"); + visit.setLastOperateVisit("success"); + visit.setVisitTime(new Date()); + userResiRegisterVisitDao.insert(visit); //注册居民 UserResiInfoDTO userResiInfoDTO = ConvertUtils.sourceToTarget(formDTO, UserResiInfoDTO.class); userResiInfoDTO.setIdNum(formDTO.getIdCard()); userResiInfoDTO.setRegMobile(formDTO.getMobile()); - userResiInfoDTO.setResiVisitId(formDTO.getVisitId()); + userResiInfoDTO.setResiVisitId(visit.getId()); userResiInfoDTO.setDistrict(formDTO.getAddress()); userResiInfoDTO.setCustomerId(formDTO.getCustomerId()); userResiInfoDTO.setApp("resi"); From 7137426cfa74d2fd8321dbccb6c7d7e7cb4275ae Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 10:52:00 +0800 Subject: [PATCH 305/416] =?UTF-8?q?=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=B0=83=E7=94=A8ruoyi=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CaResidentController.java | 15 +++ .../com/epmet/opendata/dao/CaResidentDao.java | 2 + .../opendata/service/CaResidentService.java | 8 ++ .../service/impl/CaResidentServiceImpl.java | 108 +++++++++++++++++- .../main/resources/mapper/CaResidentDao.xml | 3 + 5 files changed, 134 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java index 1db7f53c20..b3a8c1fc2b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaResidentDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.excel.CaResidentExcel; @@ -97,4 +98,18 @@ public class CaResidentController { PageData data = caResidentService.getPage(dto); return new Result>().ok(data); } + + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 10:47 + */ + @PostMapping("/preserResidentVation") + public Result getPreserResidentVation(@RequestBody PreserVationFormDTO dto) { + caResidentService.preserResidentVation(dto); + return new Result(); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index c4a692f7f0..fbff708430 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -25,4 +25,6 @@ public interface CaResidentDao extends BaseDao { * @return */ List getPage(@Param("residentName") String residentName); + + void deleteAll(); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java index 7366edc7a7..334df1771c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaResidentDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; @@ -86,4 +87,11 @@ public interface CaResidentService extends BaseService { * @return */ PageData getPage(CaResidentFormDTO dto); + + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + */ + void preserResidentVation(PreserVationFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 89cb903a97..98a29ba6fb 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -1,16 +1,25 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IcResiUserDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.CaResidentDao; import com.epmet.opendata.dto.CaResidentDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaResidentEntity; import com.epmet.opendata.redis.CaResidentRedis; import com.epmet.opendata.service.CaResidentService; @@ -37,6 +46,9 @@ public class CaResidentServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -53,8 +65,8 @@ public class CaResidentServiceImpl 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); @@ -97,4 +109,96 @@ public class CaResidentServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 人口基本信息调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 10:47 + */ + @Override + public void preserResidentVation(PreserVationFormDTO dto) { + baseDao.deleteAll(); + + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(residentEnum.RK.name); + dto.setTableName(residentEnum.RK.code); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date desc"); + + int pageNo = 1; + + int total = 0; + + do { + total = listResident(dto); + pageNo++; + dto.setPageNo(pageNo); + } while (total > (pageNo * NumConstant.FIFTY)); + } + + enum residentEnum { + + RK("unicom", "ca_resident"), + ; + + private String name; + private String code; + + + residentEnum(String name, String code) { + this.name = name; + this.code = code; + } + } + + private int listResident(PreserVationFormDTO dto) { + String data = HttpClientManager.getInstance().sendPostByJSON("http://120.221.72.83:9090/bridge/unicom/page", JSON.toJSONString(dto)).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + + returnDate.getList().forEach(item -> { + if(StringUtils.isNotBlank(item.getIdCard())) { + Result client = openFeignClient.getByResiIdCard(item.getIdCard()); + IcResiUserDTO clientData = client.getData(); + item.setIcResiUser(clientData.getId()); + item.setHomeId(clientData.getHomeId()); + } + }); + + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index d04d1a282e..a9f0d436cc 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -58,6 +58,9 @@ + + delete from ca_resident + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml index 41e6a25a05..94a5b3af01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml @@ -31,5 +31,97 @@ + + DELETE + FROM + fact_neighborhood_user_house_daily + WHERE + DATE_ID = #{dateId} + AND CUSTOMER_ID = #{customerId} + - \ No newline at end of file + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index ab80642698..b3a62ea928 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -22,4 +22,24 @@ AGENCY_ID + + From 29825586e603bf89165cb91efc335137510f7c78 Mon Sep 17 00:00:00 2001 From: YUJT Date: Thu, 2 Jun 2022 11:20:20 +0800 Subject: [PATCH 309/416] append --- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index af84965ac4..4c8ce4ec92 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -324,6 +324,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Thu, 2 Jun 2022 13:47:48 +0800 Subject: [PATCH 310/416] =?UTF-8?q?=E6=B5=81=E5=8A=A8=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E7=94=A8ruoyi=E6=8E=A5=E5=8F=A3=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CaRotatorsController.java | 15 +++ .../com/epmet/opendata/dao/CaRotatorsDao.java | 2 + .../opendata/entity/CaLoudongEntity.java | 2 +- .../opendata/entity/CaPingfangEntity.java | 2 +- .../epmet/opendata/entity/CaRentalEntity.java | 2 +- .../opendata/entity/CaResidentEntity.java | 2 +- .../opendata/entity/CaRotatorsEntity.java | 2 +- .../opendata/service/CaRotatorsService.java | 8 ++ .../service/impl/CaLoudongServiceImpl.java | 10 +- .../service/impl/CaPingfangServiceImpl.java | 2 +- .../service/impl/CaRentalServiceImpl.java | 2 +- .../service/impl/CaResidentServiceImpl.java | 2 +- .../service/impl/CaRotatorsServiceImpl.java | 108 +++++++++++++++++- .../main/resources/mapper/CaLoudongDao.xml | 28 +---- .../main/resources/mapper/CaRotatorsDao.xml | 3 + 15 files changed, 152 insertions(+), 38 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java index 17c4bbd0ee..54073e5d2a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.excel.CaRotatorsExcel; @@ -98,5 +99,19 @@ public class CaRotatorsController { return new Result>().ok(data); } + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 11:00 + */ + @PostMapping("/preserRotatorsVation") + public Result getPreserRotatorsVation(@RequestBody PreserVationFormDTO dto) { + caRotatorsService.preserRotatorsVation(dto); + return new Result(); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java index 75222cdac9..672cee993c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -25,4 +25,6 @@ public interface CaRotatorsDao extends BaseDao { * @return */ List getPage(@Param("rotatorsName") String rotatorsName); + + void deleteAll(); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java index 879bf86351..820a670b38 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaLoudongEntity.java @@ -18,7 +18,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("ca_loudong") -public class CaLoudongEntity extends BaseEpmetEntity { +public class CaLoudongEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java index dbbcda32d9..ae008d7585 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaPingfangEntity.java @@ -18,7 +18,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("ca_pingfang") -public class CaPingfangEntity extends BaseEpmetEntity { +public class CaPingfangEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java index 9b8b3cc854..d3a22ce419 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRentalEntity.java @@ -18,7 +18,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("ca_rental") -public class CaRentalEntity extends BaseEpmetEntity { +public class CaRentalEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java index 56fe30731c..a65dcc6574 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("ca_resident") -public class CaResidentEntity extends BaseEpmetEntity { +public class CaResidentEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java index 8f6cc57b8f..77e27c75fd 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaRotatorsEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("ca_rotators") -public class CaRotatorsEntity extends BaseEpmetEntity { +public class CaRotatorsEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java index c4bd0fcd1b..cc44fefa78 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; @@ -85,4 +86,11 @@ public interface CaRotatorsService extends BaseService { * @return */ PageData getPage(CaRotatorsFormDTO dto); + + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + */ + void preserRotatorsVation(PreserVationFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 87909e4097..c75e1874a4 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -112,6 +112,14 @@ public class CaLoudongServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 楼栋基本信息详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO + * @author LZN + * @date 2022/6/2 13:40 + */ @Override public CaLoudongDetailsResultDTO getLouDongDetails(CaLoudongDetailsFormDTO dto) { CaLoudongDetailsResultDTO result = baseDao.getLouDongDetails(dto.getBuildingId()); @@ -177,7 +185,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl list; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 9b986ca2a1..f3ec5e1ff0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -160,7 +160,7 @@ public class CaPingfangServiceImpl extends BaseServiceImpl list; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index 22e687dde2..b5f40fb19f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -166,7 +166,7 @@ public class CaRentalServiceImpl extends BaseServiceImpl list; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 98a29ba6fb..32c7fa2593 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -178,7 +178,7 @@ public class CaResidentServiceImpl extends BaseServiceImpl list; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java index 8c543ee45c..c5a5dc01f1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -1,16 +1,25 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; 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.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IcResiUserDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.CaRotatorsDao; import com.epmet.opendata.dto.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; +import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; +import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaRotatorsEntity; import com.epmet.opendata.redis.CaRotatorsRedis; import com.epmet.opendata.service.CaRotatorsService; @@ -37,6 +46,9 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -53,8 +65,8 @@ public class CaRotatorsServiceImpl 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); @@ -97,4 +109,96 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 流动人口调用ruoyi接口存储数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/6/2 11:01 + */ + @Override + public void preserRotatorsVation(PreserVationFormDTO dto) { + baseDao.deleteAll(); + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(rotatorsEnum.LDRK.name); + dto.setTableName(rotatorsEnum.LDRK.code); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date desc"); + + int pageNo = 1; + + int total = 0; + + do { + total = listRotators(dto); + pageNo++; + dto.setPageNo(pageNo); + } while (total > (pageNo * NumConstant.FIFTY)); + } + + enum rotatorsEnum { + + LDRK("unicom", "ca_rotators"), + ; + + private String name; + private String code; + + + rotatorsEnum(String name, String code) { + this.name = name; + this.code = code; + } + + } + + private int listRotators(PreserVationFormDTO dto) { + String data = HttpClientManager.getInstance().sendPostByJSON("http://120.221.72.83:9090/bridge/unicom/page", JSON.toJSONString(dto)).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + + returnDate.getList().forEach(item -> { + if (StringUtils.isNotBlank(item.getIdCard())) { + Result client = openFeignClient.getByResiIdCard(item.getIdCard()); + IcResiUserDTO clientData = client.getData(); + item.setIcResiUser(clientData.getId()); + item.setHomeId(clientData.getHomeId()); + } + }); + + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index afb1702310..907fb4628f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -94,33 +94,7 @@ SELECT rotators_id, From 1b43bf529dbd13ad3566e34f275b0fa16cd28469 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 13:51:12 +0800 Subject: [PATCH 311/416] =?UTF-8?q?=E6=A5=BC=E6=A0=8B=E7=9A=84=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E8=AF=A2=E5=92=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java | 5 +++++ .../src/main/java/com/epmet/opendata/dao/CaLoudongDao.java | 3 ++- .../epmet/opendata/service/impl/CaLoudongServiceImpl.java | 2 +- .../src/main/resources/mapper/CaLoudongDao.xml | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java index a027ab6492..0822a5fcf1 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java @@ -15,6 +15,11 @@ public class CaLoudongFormDTO implements Serializable { */ private String communityName; + /** + * 楼宇名字 + */ + private String buildingName; + private Integer page; private Integer limit; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index 27c2774580..c1b44056dd 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -32,7 +32,8 @@ public interface CaLoudongDao extends BaseDao { * @author LZN * @date 2022/5/31 18:57 */ - List getPage(@Param("communityName") String communityName); + List getPage(@Param("communityName") String communityName, + @Param("buildingName") String buildingName); /** * 楼栋基本信息详情 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index c75e1874a4..067fc1dd85 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -107,7 +107,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl getPage(CaLoudongFormDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); - List result = baseDao.getPage(dto.getCommunityName()); + List result = baseDao.getPage(dto.getCommunityName(),dto.getBuildingName()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index 907fb4628f..fac929e4d5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -90,6 +90,9 @@ AND community_name = #{communityName} + + AND building_name = #{buildingName} + + From b7f3202024953548e8dedc07fecf0eb4e7a5278b Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 14:17:21 +0800 Subject: [PATCH 313/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E6=A1=A3?= =?UTF-8?q?=E5=8D=95=E4=B8=AA=E4=BA=8C=E7=BB=B4=E7=A0=81=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/HouseController.java | 2 +- .../java/com/epmet/service/HouseService.java | 2 +- .../epmet/service/impl/HouseServiceImpl.java | 66 ++++++++++++------- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index eb892c5d8c..d5f3d48530 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -509,7 +509,7 @@ public class HouseController implements ResultDataResolver { } @PostMapping("createHouseQrcodeUrl") - public String createHouseQrcodeUrl(@RequestBody TestFormDTO formDTO) { + public String createHouseQrcodeUrl(@RequestBody TestFormDTO formDTO) throws Exception { return houseService.createHouseQrcodeUrl(formDTO.getHouseId()); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index ce3de8fbb5..2e6aa8cf7f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -144,7 +144,7 @@ public interface HouseService { * @params [houseId] * @return java.lang.String */ - String createHouseQrcodeUrl(String houseId); + String createHouseQrcodeUrl(String houseId) throws Exception; /** * @describe: 根据房屋编码获取信息 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 181b289e33..addc1324db 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 @@ -24,6 +24,7 @@ import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.BarcodeUtils; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; import com.epmet.constants.ImportTaskConstants; @@ -46,19 +47,21 @@ import com.epmet.model.HouseInfoModel; import com.epmet.model.ImportHouseInfoListener; import com.epmet.redis.IcHouseRedis; import com.epmet.service.*; -import com.epmet.util.ConvertToMultipartFile; import com.epmet.util.ExcelPoiUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; +import org.apache.http.entity.ContentType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.annotation.Resource; import javax.imageio.ImageIO; @@ -887,35 +890,48 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } @Override - public String createHouseQrcodeUrl(String houseId) { + public String createHouseQrcodeUrl(String houseId) throws Exception { if (StringUtils.isBlank(houseId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "房屋id不可为空", "房屋id不可为空"); } + IcHouseListResultDTO house = icHouseDao.selectHouseQrcodeById(houseId); + if (null == house) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); + } + //url组成:小程序地址?房屋编码 + String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); + String fileName = house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName()+".png"; + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + + + FileItem fileItem = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, FileUtils.getAndCreateDirUnderEpmetFilesDir("temp").toFile()) + .createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), false, fileName); + OutputStream os = fileItem.getOutputStream(); + Result uploadResult = null; try { - IcHouseListResultDTO house = icHouseDao.selectHouseQrcodeById(houseId); - if (null == house) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); - } - //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); - - //BufferedImage 转化为 ByteArrayOutputStream - ByteArrayOutputStream out = new ByteArrayOutputStream(); - ImageIO.write(image, "png", out); - //ByteArrayOutputStream 转化为 byte[] - byte[] imageByte = out.toByteArray(); - //将 byte[] 转为 MultipartFile - MultipartFile multipartFile = new ConvertToMultipartFile(imageByte, "newNamepic", "pic1", "png", imageByte.length); - Result uploadResult = ossFeignClient.uploadQrCodeV2(multipartFile,house.getCustomerId()); - if (uploadResult == null || !uploadResult.success()) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败", "上传一户一档二维码失败"); - } else { - return uploadResult.getData().getUrl(); - } + ImageIO.write(image, "png", os); + uploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); } catch (Exception e) { String errormsg = ExceptionUtils.getErrorStackTrace(e); - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败" + errormsg, "上传一户一档二维码失败" + errormsg); + log.error("上传一户一档二维码:{}", errormsg); + } finally { + try { + os.close(); + } catch (IOException e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + log.error("上传一户一档二维码关闭输出流:{}", errormsg); + } + try { + fileItem.delete(); + } catch (Exception e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + log.error("上传一户一档二维码删除临时文件:{}", errormsg); + } + } + if (uploadResult == null || !uploadResult.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "上传一户一档二维码失败", "上传一户一档二维码失败"); + } else { + return uploadResult.getData().getUrl(); } } From f13a370cc10bd4e8f43aa49053faaeec67639d2b Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 2 Jun 2022 14:44:35 +0800 Subject: [PATCH 314/416] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E3=80=90?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=9D=E5=A7=8B=E5=8C=96=E3=80=91sort?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=8D=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=8F=8D=E5=B0=84=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=BE=97=E5=88=B0=E5=AD=97=E6=AE=B5=E5=80=BC?= =?UTF-8?q?=E4=B8=BAnull=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java index bbdba74e4b..0cd96df6cf 100755 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java @@ -67,7 +67,7 @@ public class GovStaffRoleTemplateDTO implements Serializable { /** * 排序 */ - private String sort; + private Integer sort; /** * From 331ce25868c0a561a5a4fa7147d6993774d7ba25 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 14:55:44 +0800 Subject: [PATCH 315/416] =?UTF-8?q?=E5=87=BA=E7=A7=9F=E6=88=BF=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=9F=A5=E8=AF=A2=E5=92=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CaRentalDetailsFormDTO.java | 16 +++ .../opendata/dto/form/CaRentalFormtDTO.java | 13 ++ .../dto/result/CaRentalDetailsResultDTO.java | 128 ++++++++++++++++++ .../controller/CaRentalController.java | 17 +++ .../com/epmet/opendata/dao/CaRentalDao.java | 12 +- .../opendata/service/CaRentalService.java | 10 ++ .../service/impl/CaRentalServiceImpl.java | 12 +- .../src/main/resources/mapper/CaRentalDao.xml | 18 +++ 8 files changed, 224 insertions(+), 2 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java new file mode 100644 index 0000000000..f949721e55 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalDetailsFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRentalDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = 5574325462597735500L; + + /** + * 出租房id + */ + private String rentalId; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java index 4626cb8b9e..e268304026 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java @@ -9,8 +9,21 @@ public class CaRentalFormtDTO implements Serializable { private static final long serialVersionUID = -6052280300032032361L; + /** + * 房主姓名 + */ private String residentName; + /** + * 房屋编号 + */ + private String houseName; + + /** + * 承租人姓名 + */ + private String renterName; + private Integer page; private Integer limit; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java new file mode 100644 index 0000000000..8bd5acca1c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRentalDetailsResultDTO.java @@ -0,0 +1,128 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class CaRentalDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = 163050940482300773L; + + /** + * 出租房ID + */ + private Long rentalId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 房屋ID + */ + private Long houseId; + + /** + * 房屋编号 + */ + private String houseName; + + /** + * 房屋地址 + */ + private String houseAddress; + + /** + * 建筑用途 + */ + private String houseUse; + + /** + * 建筑面积(平方米) + */ + private BigDecimal houseArea; + + /** + * 证件代码 + */ + private String idType; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 房主姓名 + */ + private String residentName; + + /** + * 房主联系方式 + */ + private String telephone; + + /** + * 房主现居详址 + */ + private String curliveAddress; + + /** + * 出租用途 + */ + private String rentUse; + + /** + * 隐患类型 + */ + private String troubleType; + + /** + * 承租人ID + */ + private Long renterId; + + /** + * 承租人公民身份证号码 + */ + private String renterCardNumber; + + /** + * 承租人证件类型 + */ + private Long renterCardType; + + /** + * 承租人姓名 + */ + private String renterName; + + /** + * 承租人联系方式 + */ + private String renterPhone; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 标绘状态 + */ + private String pointStatus; + + /** + * 数据来源 + */ + private String platCode; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java index 54931b49d0..83147a20ef 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java @@ -13,9 +13,11 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaRentalDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.excel.CaRentalExcel; import com.epmet.opendata.service.CaRentalService; @@ -99,6 +101,21 @@ public class CaRentalController { return new Result>().ok(data); } + /** + * 出租房详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 14:53 + */ + @PostMapping("getRentalDetails") + public Result getRentalDetails(@RequestBody CaRentalDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaRentalDetailsResultDTO result = caRentalService.getRentalDetails(dto); + return new Result().ok(result); + } + /** * 出租房调用ruoyi接口存储数据 * diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java index e9889638fd..36490a9bf0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -3,6 +3,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaRentalEntity; import org.apache.ibatis.annotations.Mapper; @@ -25,8 +26,17 @@ public interface CaRentalDao extends BaseDao { * @param residentName * @return */ - List getPage(@Param("residentName") String residentName); + List getPage(@Param("residentName") String residentName, + @Param("houseName") String houseName, + @Param("renterName") String renterName); void deleteAll(); + /** + * 出租房详情 + * + * @param rentalId + * @return + */ + CaRentalDetailsResultDTO getRentalDetails(@Param("rentalId") String rentalId); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java index b0c54c3fd7..ff4a59d1a4 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java @@ -3,8 +3,10 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaRentalEntity; @@ -94,4 +96,12 @@ public interface CaRentalService extends BaseService { * @param dto */ void preserRentalVation(PreserVationFormDTO dto); + + /** + * 出租房详情 + * + * @param dto + * @return + */ + CaRentalDetailsResultDTO getRentalDetails(CaRentalDetailsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index b5f40fb19f..c47acfd3dd 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -14,9 +14,11 @@ import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaRentalDao; import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaRentalEntity; @@ -100,7 +102,9 @@ public class CaRentalServiceImpl extends BaseServiceImpl getPage(CaRentalFormtDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); - List result = baseDao.getPage(dto.getResidentName()); + List result = baseDao.getPage(dto.getResidentName(), + dto.getHouseName(), + dto.getRenterName()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } @@ -137,6 +141,12 @@ public class CaRentalServiceImpl extends BaseServiceImpl AND resident_name = #{residentName} + + AND house_name = #{houseName} + + + AND renter_name = #{renterName} + + + + From 649a7d183811100710e33f83fd66cdc9445573b3 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 15:05:50 +0800 Subject: [PATCH 316/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcResiUserConfirmDTO.java | 82 +++++---- .../dto/form/IcResiUserConfirmSubmitDTO.java | 82 +++++---- .../epmet/entity/IcResiUserConfirmEntity.java | 157 ++++++++++-------- 3 files changed, 191 insertions(+), 130 deletions(-) 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 4c6749ced7..eb5adec674 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 @@ -20,146 +20,166 @@ public class IcResiUserConfirmDTO implements Serializable { /** * 主键 */ - private String id; + private String id; /** * 客户Id customer.id */ - private String customerId; + private String customerId; /** * 组织Id */ - private String agencyId; + private String agencyId; /** * 组织的pids */ - private String pids; + private String pids; /** * 网格ID */ - private String gridId; + private String gridId; /** * 姓 */ - private String surname; + private String surname; /** * 名 */ - private String name; + private String name; /** * 手机号 */ - private String mobile; + private String mobile; /** * 性别 */ - private String gender; + private String gender; /** * 身份证号 */ - private String idCard; + private String idCard; /** * 出生日期 */ - private String birthday; + private String birthday; + + /** + * 户籍所在地 + */ + private String hjszd; /** * 户籍所在地地区码 */ - private String hjszdCode; + private String hjszdCode; /** - * 户籍所在地 + * 户籍所在地层级编码 + */ + private String hjszdPathCode; + + /** + * 现居住地 */ - private String hjszd; + private String xjzd; /** * 现居住地地区码 */ - private String xjzdCode; + private String xjzdCode; /** - * 现居住地 + * 现居住地层级编码 */ - private String xjzd; + private String xjzdPathCode; /** * 民族【字典表】 */ - private String mz; + private String mz; + + /** + * 名族名称 + */ + private String mzName; /** * 与户主关系 */ - private String yhzgx; + private String yhzgx; + + /** + * 与户主关系名称 + */ + private String yhzgxName; /** * 审核状态0未审核,1审核通过,2审核不通过 */ - private String confirmResult; + private String confirmResult; /** * 审核不通过的原因 */ - private String reason; + private String reason; /** * 删除标识 0.未删除 1.已删除 */ - private Integer delFlag; + private Integer delFlag; /** * 乐观锁 */ - private Integer revision; + private Integer revision; /** * 创建人 */ - private String createdBy; + private String createdBy; /** * 创建时间 */ - private Date createdTime; + private Date createdTime; /** * 更新人 */ - private String updatedBy; + private String updatedBy; /** * 更新时间 */ - private Date updatedTime; + private Date updatedTime; /** * ic_resi_user表id */ - private String icResiUserId; + private String icResiUserId; /** * 操作类型:新增add 修改 update 删除 delete */ - private String submitType; + private String submitType; /** * 删除原因 */ - private String deleteReason; + private String deleteReason; /** * 操作说明 */ - private String operationDescribe; + private String operationDescribe; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java index 11cb831f9b..09431509ac 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java @@ -20,146 +20,166 @@ public class IcResiUserConfirmSubmitDTO implements Serializable { /** * 主键 */ - private String id; + private String id; /** * 客户Id customer.id */ - private String customerId; + private String customerId; /** * 组织Id */ - private String agencyId; + private String agencyId; /** * 组织的pids */ - private String pids; + private String pids; /** * 网格ID */ - private String gridId; + private String gridId; /** * 姓 */ - private String surname; + private String surname; /** * 名 */ - private String name; + private String name; /** * 手机号 */ - private String mobile; + private String mobile; /** * 性别 */ - private String gender; + private String gender; /** * 身份证号 */ - private String idCard; + private String idCard; /** * 出生日期 */ - private String birthday; + private String birthday; + + /** + * 户籍所在地 + */ + private String hjszd; /** * 户籍所在地地区码 */ - private String hjszdCode; + private String hjszdCode; /** - * 户籍所在地 + * 户籍所在地层级编码 + */ + private String hjszdPathCode; + + /** + * 现居住地 */ - private String hjszd; + private String xjzd; /** * 现居住地地区码 */ - private String xjzdCode; + private String xjzdCode; /** - * 现居住地 + * 现居住地层级编码 */ - private String xjzd; + private String xjzdPathCode; /** * 民族【字典表】 */ - private String mz; + private String mz; + + /** + * 名族名称 + */ + private String mzName; /** * 与户主关系 */ - private String yhzgx; + private String yhzgx; + + /** + * 与户主关系名称 + */ + private String yhzgxName; /** * 审核状态0未审核,1审核通过,2审核不通过 */ - private String confirmResult; + private String confirmResult; /** * 审核不通过的原因 */ - private String reason; + private String reason; /** * 删除标识 0.未删除 1.已删除 */ - private Integer delFlag; + private Integer delFlag; /** * 乐观锁 */ - private Integer revision; + private Integer revision; /** * 创建人 */ - private String createdBy; + private String createdBy; /** * 创建时间 */ - private Date createdTime; + private Date createdTime; /** * 更新人 */ - private String updatedBy; + private String updatedBy; /** * 更新时间 */ - private Date updatedTime; + private Date updatedTime; /** * ic_resi_user表id */ - private String icResiUserId; + private String icResiUserId; /** * 操作类型:新增add 修改 update 删除 delete */ - private String submitType; + private String submitType; /** * 删除原因 */ - private String deleteReason; + private String deleteReason; /** * 操作说明 */ - private String operationDescribe; + private String operationDescribe; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java index c11aa5e18b..15f5751bf1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java @@ -18,114 +18,135 @@ public class IcResiUserConfirmEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; - /** - * 客户Id customer.id - */ + /** + * 客户Id customer.id + */ private String customerId; - /** - * 组织Id - */ + /** + * 组织Id + */ private String agencyId; - /** - * 组织的pids - */ + /** + * 组织的pids + */ private String pids; - /** - * 网格ID - */ + /** + * 网格ID + */ private String gridId; - /** - * 姓 - */ + /** + * 姓 + */ private String surname; - /** - * 名 - */ + /** + * 名 + */ private String name; - /** - * 手机号 - */ + /** + * 手机号 + */ private String mobile; - /** - * 性别 - */ + /** + * 性别 + */ private String gender; - /** - * 身份证号 - */ + /** + * 身份证号 + */ private String idCard; - /** - * 出生日期 - */ + /** + * 出生日期 + */ private String birthday; - /** - * 户籍所在地地区码 - */ + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 户籍所在地地区码 + */ private String hjszdCode; - /** - * 户籍所在地 - */ - private String hjszd; + /** + * 户籍所在地层级编码 + */ + private String hjszdPathCode; + + /** + * 现居住地 + */ + private String xjzd; - /** - * 现居住地地区码 - */ + /** + * 现居住地地区码 + */ private String xjzdCode; - /** - * 现居住地 - */ - private String xjzd; + /** + * 现居住地层级编码 + */ + private String xjzdPathCode; - /** - * 民族【字典表】 - */ + /** + * 民族【字典表】 + */ private String mz; - /** - * 与户主关系 - */ + /** + * 名族名称 + */ + private String mzName; + + /** + * 与户主关系 + */ private String yhzgx; - /** - * 审核状态0未审核,1审核通过,2审核不通过 - */ + /** + * 与户主关系名称 + */ + private String yhzgxName; + + /** + * 审核状态0未审核,1审核通过,2审核不通过 + */ private String confirmResult; - /** - * 审核不通过的原因 - */ + /** + * 审核不通过的原因 + */ private String reason; - /** - * ic_resi_user表id - */ + /** + * ic_resi_user表id + */ private String icResiUserId; - /** - * 操作类型:新增add 修改 update 删除 delete - */ + /** + * 操作类型:新增add 修改 update 删除 delete + */ private String submitType; - /** - * 删除原因 - */ + /** + * 删除原因 + */ private String deleteReason; - /** - * 操作说明 - */ + /** + * 操作说明 + */ private String operationDescribe; } + From 652d998373510376ff76823c83d941abddaee325 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 15:18:17 +0800 Subject: [PATCH 317/416] =?UTF-8?q?=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CaResidentDetailsFormDTO.java | 13 ++ .../opendata/dto/form/CaResidentFormDTO.java | 14 ++ .../result/CaResidentDetailsResultDTO.java | 198 ++++++++++++++++++ .../controller/CaResidentController.java | 17 ++ .../com/epmet/opendata/dao/CaResidentDao.java | 13 +- .../opendata/service/CaResidentService.java | 10 + .../service/impl/CaResidentServiceImpl.java | 12 +- .../main/resources/mapper/CaResidentDao.xml | 18 ++ 8 files changed, 293 insertions(+), 2 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java new file mode 100644 index 0000000000..b8a88b5cd5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java @@ -0,0 +1,13 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaResidentDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = 1936067831073936603L; + + private String idCard; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java index 24c57c4748..dc7972f46c 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java @@ -13,5 +13,19 @@ public class CaResidentFormDTO implements Serializable { private Integer limit; + /** + * 姓名 + */ private String residentName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 联系方式 + */ + private String telephone; + } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java new file mode 100644 index 0000000000..20f5c86f93 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java @@ -0,0 +1,198 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaResidentDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -7745222285619853846L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java index b3a8c1fc2b..4ebd4138e7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -13,9 +13,11 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaResidentDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.excel.CaResidentExcel; import com.epmet.opendata.service.CaResidentService; @@ -99,6 +101,21 @@ public class CaResidentController { return new Result>().ok(data); } + /** + * 人口基本信息详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 15:17 + */ + @PostMapping("getResidentDetails") + public Result getResidentDetails(@RequestBody CaResidentDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaResidentDetailsResultDTO result = caResidentService.getResidentDetails(dto); + return new Result().ok(result); + } + /** * 人口基本信息调用ruoyi接口存储数据 * diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index fbff708430..8838273b8f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -2,6 +2,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; import org.apache.ibatis.annotations.Mapper; @@ -24,7 +25,17 @@ public interface CaResidentDao extends BaseDao { * @param residentName * @return */ - List getPage(@Param("residentName") String residentName); + List getPage(@Param("residentName") String residentName, + @Param("idCard") String idCard, + @Param("telephone") String telephone); void deleteAll(); + + /** + * 人口基本信息详情 + * + * @param idCard + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(@Param("idCard") String idCard); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java index 334df1771c..e3bb6c6db9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -3,8 +3,10 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; @@ -94,4 +96,12 @@ public interface CaResidentService extends BaseService { * @param dto */ void preserResidentVation(PreserVationFormDTO dto); + + /** + * 人口基本信息详情 + * + * @param dto + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 32c7fa2593..e92a47b03f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -15,9 +15,11 @@ import com.epmet.dto.IcResiUserDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.CaResidentDao; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaResidentEntity; @@ -104,7 +106,9 @@ public class CaResidentServiceImpl extends BaseServiceImpl getPage(CaResidentFormDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); - List result = baseDao.getPage(dto.getResidentName()); + List result = baseDao.getPage(dto.getResidentName(), + dto.getIdCard(), + dto.getTelephone()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } @@ -140,6 +144,12 @@ public class CaResidentServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } + @Override + public CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto) { + CaResidentDetailsResultDTO result = baseDao.getResidentDetails(dto.getIdCard()); + return result; + } + enum residentEnum { RK("unicom", "ca_resident"), diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index a9f0d436cc..9c207100eb 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -107,6 +107,24 @@ AND resident_name = #{residentName} + + AND id_card = #{idCard} + + + AND telephone = #{telephone} + + + + From 3c4fb17f60bc1ea417c2fab20b95f89a67f8e369 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 2 Jun 2022 15:23:11 +0800 Subject: [PATCH 318/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91=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/org/IcHouseDao.xml | 4 ++-- .../src/main/resources/mapper/user/IcResiUserDao.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 76312ce72c..dd14c8aee2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -14,7 +14,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM customer_grid g LEFT JOIN ( @@ -53,7 +53,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM fact_neighborhood_user_house_daily nd left join customer_grid g on g.id = nd.GRID_ID and g.DEL_FLAG = '0' LEFT JOIN ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 9b1a30f4ed..e39d8f23e9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -11,7 +11,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE @@ -31,7 +31,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE From 1440688d2704127255f9eee5b5ca8a13b386ac21 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 2 Jun 2022 15:25:27 +0800 Subject: [PATCH 319/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=EF=BC=88=E5=9B=9E=E6=BB=9A?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/org/IcHouseDao.xml | 4 ++-- .../src/main/resources/mapper/user/IcResiUserDao.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index dd14c8aee2..76312ce72c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -14,7 +14,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM customer_grid g LEFT JOIN ( @@ -53,7 +53,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM fact_neighborhood_user_house_daily nd left join customer_grid g on g.id = nd.GRID_ID and g.DEL_FLAG = '0' LEFT JOIN ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index e39d8f23e9..9b1a30f4ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -11,7 +11,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE @@ -31,7 +31,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE From e710197eeb3d4048d64c325fe10b005654021248 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 2 Jun 2022 15:29:46 +0800 Subject: [PATCH 320/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91=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/org/IcHouseDao.xml | 2 +- .../src/main/resources/mapper/user/IcResiUserDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 4404dc5503..eb15b27feb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -14,7 +14,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM customer_grid g LEFT JOIN ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 60c64cf0d7..6b1a1d4f35 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -11,7 +11,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE From 5a0151cb62b1f8743a3f47bbd85e5bc4081a3cfd Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 2 Jun 2022 15:35:28 +0800 Subject: [PATCH 321/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91=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/org/IcHouseDao.xml | 2 +- .../src/main/resources/mapper/user/IcResiUserDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index 76312ce72c..07d7cdaaee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -53,7 +53,7 @@ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount, sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, - sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify + sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify FROM fact_neighborhood_user_house_daily nd left join customer_grid g on g.id = nd.GRID_ID and g.DEL_FLAG = '0' LEFT JOIN ( diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 9b1a30f4ed..7a74cf712b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -31,7 +31,7 @@ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount, sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount, sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr, - sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify + sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify FROM ic_resi_user WHERE From d3f249a21ac9cc6fcdca20f163c4d4f497431194 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 15:36:18 +0800 Subject: [PATCH 322/416] =?UTF-8?q?=E6=B5=81=E5=8A=A8=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CaRotatorsDetailsFormDTO.java | 16 ++ .../opendata/dto/form/CaRotatorsFormDTO.java | 13 ++ .../result/CaRotatorsDetailsResultDTO.java | 213 ++++++++++++++++++ .../controller/CaRotatorsController.java | 17 ++ .../com/epmet/opendata/dao/CaRotatorsDao.java | 14 +- .../opendata/service/CaRotatorsService.java | 10 + .../service/impl/CaRotatorsServiceImpl.java | 12 +- .../main/resources/mapper/CaRotatorsDao.xml | 18 ++ 8 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java new file mode 100644 index 0000000000..4861ef6627 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsDetailsFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaRotatorsDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = -536489426327498665L; + + /** + * 身份证号 + */ + private String idCard; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java index 7e704f8794..322c9783b3 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java @@ -10,8 +10,21 @@ public class CaRotatorsFormDTO implements Serializable { private static final long serialVersionUID = 3356808153818385932L; + /** + * 姓名 + */ private String rotatorsName; + /** + * 身份证号 + */ + private String idCard; + + /** + * 联系方式 + */ + private String telephone; + private Integer page; private Integer limit; } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java new file mode 100644 index 0000000000..7d91a14322 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaRotatorsDetailsResultDTO.java @@ -0,0 +1,213 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaRotatorsDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = 6450956000162367591L; + + /** + * 主键id + */ + private Long rotatorsId; + + /** + * 公民身份证号 + */ + private String idCard; + + /** + * 证件类型 + */ + private String idType; + + /** + * 姓名 + */ + private String rotatorsName; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCountry; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 学历 + */ + private String education; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 职业 + */ + private String occupation; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍地省 + */ + private String householdAddressProv; + + /** + * 户籍地市 + */ + private String householdAddressCity; + + /** + * 户籍地县(区) + */ + private String householdAddressCountry; + + /** + * 户籍地镇街 + */ + private String householdAddressTown; + + /** + * 户籍地社区/村 + */ + private String householdAddressVillage; + + /** + * 户籍门(楼)详址 + */ + private String householdAddressDetail; + + /** + * 现住地省 + */ + private String curliveAddressProv; + + /** + * 现住地市 + */ + private String curliveAddressCity; + + /** + * 现住地县(区) + */ + private String curliveAddressCountry; + + /** + * 现住地镇街 + */ + private String curliveAddressTown; + + /** + * 现住地社区/村 + */ + private String curliveAddressVillage; + + /** + * 现住门(楼)详址 + */ + private String curliveAddressDetail; + + /** + * 流入原因 + */ + private String inflowReason; + + /** + * 办证类型 + */ + private String certificateType; + + /** + * 证件号码 + */ + private String certificateNumber; + + /** + * 登记日期 + */ + private Date signDate; + + /** + * 证件到期日期 + */ + private Date endDate; + + /** + * 住所类型 + */ + private String residenceType; + + /** + * 是否重点关注人员 + */ + private String isFocusPerson; + + /** + * 数据来源编码 + */ + private String platcode; + + /** + * 网格id + */ + private Long gridId; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java index 54073e5d2a..c38d3c23e5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java @@ -13,9 +13,11 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.excel.CaRotatorsExcel; import com.epmet.opendata.service.CaRotatorsService; @@ -99,6 +101,21 @@ public class CaRotatorsController { return new Result>().ok(data); } + /** + * 流动人口详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 15:33 + */ + @PostMapping("getRotatorsDetails") + public Result getRotatorsDetails(@RequestBody CaRotatorsDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaRotatorsDetailsResultDTO result = caRotatorsService.getRotatorsDetails(dto); + return new Result().ok(result); + } + /** * 流动人口调用ruoyi接口存储数据 * diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java index 672cee993c..8cc71a30cc 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -2,8 +2,10 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; +import com.sun.tracing.dtrace.ProviderAttributes; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -24,7 +26,17 @@ public interface CaRotatorsDao extends BaseDao { * @param rotatorsName * @return */ - List getPage(@Param("rotatorsName") String rotatorsName); + List getPage(@Param("rotatorsName") String rotatorsName, + @Param("idCard") String idCard, + @Param("telephone") String telephone); void deleteAll(); + + /** + * 流动人口详情 + * + * @param idCard + * @return + */ + CaRotatorsDetailsResultDTO getRotatorsDetails(@Param("idCard") String idCard); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java index cc44fefa78..ed39cecad7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java @@ -3,8 +3,10 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaRotatorsEntity; @@ -93,4 +95,12 @@ public interface CaRotatorsService extends BaseService { * @param dto */ void preserRotatorsVation(PreserVationFormDTO dto); + + /** + * 流动人口详情 + * + * @param dto + * @return + */ + CaRotatorsDetailsResultDTO getRotatorsDetails(CaRotatorsDetailsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java index c5a5dc01f1..895f055a30 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -15,9 +15,11 @@ import com.epmet.dto.IcResiUserDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.CaRotatorsDao; import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaRotatorsEntity; @@ -104,7 +106,9 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl getPage(CaRotatorsFormDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); - List result = baseDao.getPage(dto.getRotatorsName()); + List result = baseDao.getPage(dto.getRotatorsName(), + dto.getIdCard(), + dto.getTelephone()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } @@ -139,6 +143,12 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } + @Override + public CaRotatorsDetailsResultDTO getRotatorsDetails(CaRotatorsDetailsFormDTO dto) { + CaRotatorsDetailsResultDTO result = baseDao.getRotatorsDetails(dto.getIdCard()); + return result; + } + enum rotatorsEnum { LDRK("unicom", "ca_rotators"), diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml index 051793b56a..46f954e3c2 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -111,6 +111,24 @@ AND rotators_name = #{rotatorsName} + + AND id_card = #{idCard} + + + AND telephone = #{telephone} + + + + From 73c32cebde20725e6d6bbc0dce72c0c00ca441da Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 15:45:50 +0800 Subject: [PATCH 323/416] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/HouseController.java | 91 ++++----- .../epmet/service/impl/HouseServiceImpl.java | 191 +++++++++--------- .../src/main/resources/mapper/IcHouseDao.xml | 6 +- 3 files changed, 149 insertions(+), 139 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index d5f3d48530..3a7d221a29 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -102,7 +102,7 @@ public class HouseController implements ResultDataResolver { @PostMapping("houselist") @MaskResponse(fieldNames = {"ownerIdCard", "ownerPhone"}, - fieldsMaskType = { MaskResponse.MASK_TYPE_ID_CARD, MaskResponse.MASK_TYPE_MOBILE }) + fieldsMaskType = {MaskResponse.MASK_TYPE_ID_CARD, MaskResponse.MASK_TYPE_MOBILE}) public Result> houseList(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO) { //效验数据 LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); @@ -331,12 +331,13 @@ public class HouseController implements ResultDataResolver { /** * Desc: 根据类型更新排序 + * * @param formDTO * @author zxc * @date 2022/5/6 08:50 */ @PostMapping("update-sort") - public Result updateSort(@RequestBody UpdateSortFormDTO formDTO){ + public Result updateSort(@RequestBody UpdateSortFormDTO formDTO) { houseService.updateSort(formDTO); return new Result(); } @@ -358,7 +359,7 @@ public class HouseController implements ResultDataResolver { formDTO.setIsPage(false); formDTO.setPageSize(NumConstant.TEN_THOUSAND); //效验数据 - if (StringUtils.isBlank(formDTO.getAgencyId())){ + if (StringUtils.isBlank(formDTO.getAgencyId())) { LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(tokenDto, "【查询房屋】查询当前staff所在组织信息失败"); formDTO.setAgencyId(loginUserDetail.getAgencyId()); } @@ -378,34 +379,34 @@ public class HouseController implements ResultDataResolver { .registerWriteHandler(horizontalCellStyleStrategy) .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) .build(); - int[] mergeRowArr = new int[]{0,1,2,3,4,5,6,7,8,9,10,11,12}; + int[] mergeRowArr = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; //冻结表头 2行 FreezeAndFilter writeHandler = new FreezeAndFilter(); writeHandler.rowSplit = 2; //ExcelFillCellMergeStrategy mergeStrategy = new ExcelFillCellMergeStrategy(2,mergeRowArr,false); - ExcelFillRowMergeStrategy mergeStrategy2 = new ExcelFillRowMergeStrategy(mergeRowArr,false); + ExcelFillRowMergeStrategy mergeStrategy2 = new ExcelFillRowMergeStrategy(mergeRowArr, false); WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1") .head(HouseMemberResultDTO.class) .registerWriteHandler(mergeStrategy2) .registerWriteHandler(writeHandler) .build(); PageData dataList = null; - Cache haveSearchCache = CacheBuilder.newBuilder().maximumSize(NumConstant.ONE_HUNDRED).expireAfterWrite(NumConstant.THIRTY, TimeUnit.MINUTES).build(); + Cache haveSearchCache = CacheBuilder.newBuilder().maximumSize(NumConstant.ONE_HUNDRED).expireAfterWrite(NumConstant.THIRTY, TimeUnit.MINUTES).build(); do { - dataList = houseService.getHouseUser(tokenDto,formDTO,haveSearchCache); + dataList = houseService.getHouseUser(tokenDto, formDTO, haveSearchCache); formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); long start = System.currentTimeMillis(); //设置合并策略中的 本次数据的总条数 - mergeStrategy2.setSecTotalCount(dataList.getList().size()+1); + mergeStrategy2.setSecTotalCount(dataList.getList().size() + 1); excelWriter.write(dataList.getList(), writeSheet); - log.info("getHouseUser doWrite cost:{}ms",System.currentTimeMillis() - start); - if (CollectionUtils.isEmpty(dataList.getList())){ + log.info("getHouseUser doWrite cost:{}ms", System.currentTimeMillis() - start); + if (CollectionUtils.isEmpty(dataList.getList())) { break; } - }while (dataList.getTotal() == formDTO.getPageSize()); + } while (dataList.getTotal() == formDTO.getPageSize()); //获取导出配置 haveSearchCache.invalidateAll(); @@ -414,53 +415,53 @@ public class HouseController implements ResultDataResolver { response.setCharacterEncoding("UTF-8"); response.setHeader("content-type", "application/json; charset=UTF-8"); PrintWriter printWriter = response.getWriter(); - Result result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); + Result result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg()); printWriter.write(JSON.toJSONString(result)); printWriter.close(); } finally { - if (excelWriter != null){ + if (excelWriter != null) { excelWriter.finish(); } - log.info("getHouseUser final cost:{}ms",System.currentTimeMillis() - startTime); + log.info("getHouseUser final cost:{}ms", System.currentTimeMillis() - startTime); } } /** - * @describe: 下载房屋编码 - * @author wangtong - * @date 2022/6/1 17:24 - * @params [formDTO, response] - * @return void - */ + * @return void + * @describe: 下载房屋编码 + * @author wangtong + * @date 2022/6/1 17:24 + * @params [formDTO, response] + */ @PostMapping("createHouseQrcode") - public void createQrCode(@RequestBody HouseQrcodeFormDTO formDTO, HttpServletResponse response){ + public void createQrCode(@RequestBody HouseQrcodeFormDTO formDTO, HttpServletResponse response) { ValidatorUtils.validateEntity(formDTO); try { IcHouseListResultDTO house = icHouseDao.selectHouseQrcodeById(formDTO.getId()); - if(null == house){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息","未查到房屋信息"); + if (null == house) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode()+"?houseCode="+house.getHouseCode(); - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName(), url); + String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode() + "&customerId=" + house.getCustomerId() + "&gridId=" + house.getGridId(); + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); //BufferedImage 转 InputStream ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream); ImageIO.write(image, "png", imageOutput); InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); long length = imageOutput.length(); - String fileName = house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName()+".png"; + String fileName = house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; response.setContentType("application/octet-stream"); - response.setContentLength((int)length); - response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(fileName, StrConstant.UTF_8)); + response.setContentLength((int) length); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, StrConstant.UTF_8)); //输出流 byte[] bytes = new byte[1024]; OutputStream outputStream = response.getOutputStream(); long count = 0; - while(count < length){ + while (count < length) { int len = inputStream.read(bytes, 0, 1024); - count +=len; + count += len; outputStream.write(bytes, 0, len); } outputStream.flush(); @@ -470,30 +471,30 @@ public class HouseController implements ResultDataResolver { } /** - * @describe: 批量下载一户一档的二维码 - * @author wangtong - * @date 2022/5/31 17:58 - * @params [loginUser, formDTO, response] - * @return void - */ + * @return void + * @describe: 批量下载一户一档的二维码 + * @author wangtong + * @date 2022/5/31 17:58 + * @params [loginUser, formDTO, response] + */ @PostMapping(value = "/downloadZip") public void downloadZip(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO, HttpServletResponse response) throws Exception { //效验数据 LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); formDTO.setAgencyId(loginUserDetail.getAgencyId()); ValidatorUtils.validateEntity(formDTO); - houseService.downloadZip(response,formDTO); + houseService.downloadZip(response, formDTO); } /** - * @describe: 根据房屋编码获取信息 - * @author wangtong - * @date 2022/6/1 18:24 - * @params [formDTO] - * @return com.epmet.dto.result.IcHouseInfoResultDTO - */ + * @return com.epmet.dto.result.IcHouseInfoResultDTO + * @describe: 根据房屋编码获取信息 + * @author wangtong + * @date 2022/6/1 18:24 + * @params [formDTO] + */ @PostMapping("getHouseInfoByCode") - public Result getHouseInfoByCode(@LoginUser TokenDto loginUser,@RequestBody IcHouseInfoFormDTO formDTO) { + public Result getHouseInfoByCode(@LoginUser TokenDto loginUser, @RequestBody IcHouseInfoFormDTO formDTO) { //效验数据 ValidatorUtils.validateEntity(formDTO); formDTO.setCustomerId(loginUser.getCustomerId()); @@ -504,7 +505,7 @@ public class HouseController implements ResultDataResolver { @PostMapping("createHouseCode") public String createHouseCode(@RequestBody TestFormDTO formDTO) { //效验数据 - return houseService.createHouseCode(formDTO.getCustomerId(),formDTO.getBuildingId(),formDTO.getAreaCode()); + return houseService.createHouseCode(formDTO.getCustomerId(), formDTO.getBuildingId(), formDTO.getAreaCode()); } 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 addc1324db..7c4200feae 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 @@ -85,7 +85,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { /** * 导出房屋内家庭成员时本地缓存 */ - private static final Cache> memberCacheMap = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.MINUTES).expireAfterWrite(30,TimeUnit.MINUTES).build(); + private static final Cache> memberCacheMap = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.MINUTES).expireAfterWrite(30, TimeUnit.MINUTES).build(); @Autowired private IcHouseService icHouseService; @@ -131,28 +131,29 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Transactional(rollbackFor = Exception.class) public void addHouse(String customerId, IcHouseAddFormDTO formDTO) { //同一楼栋,单元内,房屋名称唯一 - Integer count = icHouseDao.checkDoorNameUq(formDTO.getNeighborHoodId(), formDTO.getBuildingId(), formDTO.getBuildingUnitId(), formDTO.getDoorName(),null); + Integer count = icHouseDao.checkDoorNameUq(formDTO.getNeighborHoodId(), formDTO.getBuildingId(), formDTO.getBuildingUnitId(), formDTO.getDoorName(), null); if (null != count && count > 0) { throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg()); } - IcHouseDTO icHouseDTO= ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); + IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); icHouseDTO.setCustomerId(customerId); icHouseDTO.setHouseName(getHouseName(formDTO)); icHouseService.save(icHouseDTO); } - private String getHouseName(IcHouseAddFormDTO formDTO){ + private String getHouseName(IcHouseAddFormDTO formDTO) { //设置房间名 楼栋-单元号-门牌号 IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingId()); IcBuildingUnitDTO icBuildingUnit = icBuildingUnitService.get(formDTO.getBuildingUnitId()); String doorName = formDTO.getDoorName(); - String buildingName = Optional.ofNullable(icBuilding).map(u->u.getBuildingName()).orElse(""); - String unitName = Optional.ofNullable(icBuildingUnit).map(u->u.getUnitNum()).orElse(""); - return new StringBuilder().append(buildingName).append("-").append(unitName).append("-").append(doorName).toString(); + String buildingName = Optional.ofNullable(icBuilding).map(u -> u.getBuildingName()).orElse(""); + String unitName = Optional.ofNullable(icBuildingUnit).map(u -> u.getUnitNum()).orElse(""); + return new StringBuilder().append(buildingName).append("-").append(unitName).append("-").append(doorName).toString(); } /** * 更新 + * * @param customerId * @param formDTO */ @@ -160,7 +161,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Transactional(rollbackFor = Exception.class) public void updateHouse(String customerId, IcHouseAddFormDTO formDTO) { //同一楼栋,单元内,房屋名称唯一 - Integer count = icHouseDao.checkDoorNameUq(formDTO.getNeighborHoodId(), formDTO.getBuildingId(), formDTO.getBuildingUnitId(),formDTO.getDoorName(), formDTO.getHouseId()); + Integer count = icHouseDao.checkDoorNameUq(formDTO.getNeighborHoodId(), formDTO.getBuildingId(), formDTO.getBuildingUnitId(), formDTO.getDoorName(), formDTO.getHouseId()); if (null != count && count > 0) { throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg()); } @@ -176,11 +177,12 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { houseChangeRecord(formDTO.getHouseId(), customerId, icHouseDTO); icHouseService.update(icHouseDTO); //删除房屋缓存 - icHouseRedis.delHouseInfo(formDTO.getHouseId(),customerId); + icHouseRedis.delHouseInfo(formDTO.getHouseId(), customerId); } /** * Desc: 房屋变更记录 + * * @param houseId * @param customerId * @param houseDTO @@ -189,18 +191,18 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { */ @Transactional(rollbackFor = Exception.class) @Override - public void houseChangeRecord(String houseId, String customerId, IcHouseDTO houseDTO){ + public void houseChangeRecord(String houseId, String customerId, IcHouseDTO houseDTO) { IcHouseEntity entity = icHouseService.selectById(houseId); entity.setOwnerName(null == entity.getOwnerName() ? "" : entity.getOwnerName()); entity.setOwnerPhone(null == entity.getOwnerPhone() ? "" : entity.getOwnerPhone()); entity.setOwnerIdCard(null == entity.getOwnerIdCard() ? "" : entity.getOwnerIdCard()); - if (null == entity){ + if (null == entity) { throw new EpmetException("不存在此房屋..."); } StringBuilder sbBefore = new StringBuilder(); StringBuilder sbAfter = new StringBuilder(); List entityList = new ArrayList<>(); - if (!houseDTO.getHouseType().equals(entity.getHouseType())){ + if (!houseDTO.getHouseType().equals(entity.getHouseType())) { sbAfter.append(HouseChangeEnums.HOUSE_TYPE.getColumnName()).append(":").append(null == houseDTO.getHouseTypeName() ? HouseTypeEnums.getTypeValue(houseDTO.getHouseType()) : houseDTO.getHouseTypeName()).append(";"); sbBefore.append(HouseChangeEnums.HOUSE_TYPE.getColumnName()).append(":").append(HouseTypeEnums.getTypeValue(entity.getHouseType())).append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -209,7 +211,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeAfter(null == houseDTO.getHouseTypeName() ? HouseTypeEnums.getTypeValue(houseDTO.getHouseType()) : houseDTO.getHouseTypeName()); entityList.add(e); } - if (!houseDTO.getPurpose().equals(entity.getPurpose())){ + if (!houseDTO.getPurpose().equals(entity.getPurpose())) { sbAfter.append(HouseChangeEnums.PURPOSE.getColumnName()).append(":").append(null == houseDTO.getPurposeName() ? HousePurposeEnums.getTypeValue(houseDTO.getPurpose()) : houseDTO.getPurposeName()).append(";"); sbBefore.append(HouseChangeEnums.PURPOSE.getColumnName()).append(":").append(HousePurposeEnums.getTypeValue(entity.getPurpose())).append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -218,7 +220,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(HousePurposeEnums.getTypeValue(entity.getPurpose())); entityList.add(e); } - if (!houseDTO.getRentFlag().equals(entity.getRentFlag())){ + if (!houseDTO.getRentFlag().equals(entity.getRentFlag())) { sbAfter.append(HouseChangeEnums.RENT_FLAG.getColumnName()).append(":").append(null == houseDTO.getRentName() ? HouseRentFlagEnums.getTypeValue(houseDTO.getRentFlag()) : houseDTO.getRentName()).append(";"); sbBefore.append(HouseChangeEnums.RENT_FLAG.getColumnName()).append(":").append(HouseRentFlagEnums.getTypeValue(entity.getRentFlag())).append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -227,7 +229,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(HouseRentFlagEnums.getTypeValue(entity.getRentFlag())); entityList.add(e); } - if (null != houseDTO.getOwnerName() && !houseDTO.getOwnerName().equals(entity.getOwnerName())){ + if (null != houseDTO.getOwnerName() && !houseDTO.getOwnerName().equals(entity.getOwnerName())) { sbAfter.append(HouseChangeEnums.OWNER_NAME.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerName()) ? houseDTO.getOwnerName() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_NAME.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerName()) ? entity.getOwnerName() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -236,7 +238,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(StringUtils.isNotBlank(entity.getOwnerName()) ? entity.getOwnerName() : "无"); entityList.add(e); } - if (null != houseDTO.getOwnerPhone() && !houseDTO.getOwnerPhone().equals(entity.getOwnerPhone())){ + if (null != houseDTO.getOwnerPhone() && !houseDTO.getOwnerPhone().equals(entity.getOwnerPhone())) { sbAfter.append(HouseChangeEnums.OWNER_PHONE.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerPhone()) ? houseDTO.getOwnerPhone() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_PHONE.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerPhone()) ? entity.getOwnerPhone() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -245,7 +247,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(StringUtils.isNotBlank(entity.getOwnerPhone()) ? entity.getOwnerPhone() : "无"); entityList.add(e); } - if (null != houseDTO.getOwnerIdCard() && !houseDTO.getOwnerIdCard().equals(entity.getOwnerIdCard())){ + if (null != houseDTO.getOwnerIdCard() && !houseDTO.getOwnerIdCard().equals(entity.getOwnerIdCard())) { sbAfter.append(HouseChangeEnums.OWNER_ID_CARD.getColumnName()).append(":").append(StringUtils.isNotBlank(houseDTO.getOwnerIdCard()) ? houseDTO.getOwnerIdCard() : "无").append(";"); sbBefore.append(HouseChangeEnums.OWNER_ID_CARD.getColumnName()).append(":").append(StringUtils.isNotBlank(entity.getOwnerIdCard()) ? entity.getOwnerIdCard() : "无").append(";"); IcHouseChangeDetailEntity e = new IcHouseChangeDetailEntity(); @@ -254,7 +256,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { e.setChangeBefore(StringUtils.isNotBlank(entity.getOwnerIdCard()) ? entity.getOwnerIdCard() : "无"); entityList.add(e); } - if (StringUtils.isNotBlank(sbAfter)){ + if (StringUtils.isNotBlank(sbAfter)) { String before = sbBefore.substring(NumConstant.ZERO, sbBefore.length() - NumConstant.ONE); String after = sbAfter.substring(NumConstant.ZERO, sbAfter.length() - NumConstant.ONE); HouseAgencyInfoResultDTO houseAgencyInfo = icHouseDao.getHouseAgencyInfo(houseId); @@ -280,15 +282,16 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { /** * 删除 + * * @param houseId */ @Override @Transactional(rollbackFor = Exception.class) public void delHouse(String houseId) { //单个删除房屋,房屋内有居民不允许删除 - NeighborHoodManageDelFormDTO formDTO=new NeighborHoodManageDelFormDTO(); + NeighborHoodManageDelFormDTO formDTO = new NeighborHoodManageDelFormDTO(); formDTO.setType(CustomerGridConstant.HOUSE); - List ids=new ArrayList<>(); + List ids = new ArrayList<>(); ids.add(houseId); formDTO.setIds(ids); allDelete(formDTO); @@ -302,24 +305,25 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (StringUtils.isNotBlank(formDTO.getAgencyId())) { pids = getPids(formDTO.getAgencyId()); } - if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())){ + if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())) { pids = getPids(formDTO.getAgencyId()); } formDTO.setPids(pids); - PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()) - .doSelectPageInfo(() -> icHouseDao.searchHouseByPage(formDTO)); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) + .doSelectPageInfo(() -> icHouseDao.searchHouseByPage(formDTO)); List records = pageInfo.getList(); - records.forEach(item->{ + records.forEach(item -> { item.setHouseType(HouseTypeEnums.getTypeValue(item.getHouseTypeKey())); item.setPurpose(HousePurposeEnums.getTypeValue(item.getPurposeKey())); }); - return new PageData<>(records == null? new ArrayList<>():records,pageInfo.getTotal()); + return new PageData<>(records == null ? new ArrayList<>() : records, pageInfo.getTotal()); } - public String getPids(String agencyId){ + + public String getPids(String agencyId) { String pids = null; CustomerAgencyDTO agency = agencyservice.getAgencyById(agencyId); @@ -340,33 +344,33 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { public void exportBuildinginfo(IcHouseListFormDTO formDTO, HttpServletResponse response) throws Exception { //如果类型是house 查房屋 //导出房屋 - PageData icHouseExcels = new PageData<>(new ArrayList<>(),NumConstant.ZERO); + PageData icHouseExcels = new PageData<>(new ArrayList<>(), NumConstant.ZERO); List list = new ArrayList<>(); Integer pageNo = NumConstant.ONE; do { formDTO.setPageNo(pageNo); icHouseExcels = getHouseList(formDTO); - if (CollectionUtils.isEmpty(icHouseExcels.getList())){ + if (CollectionUtils.isEmpty(icHouseExcels.getList())) { break; } list.addAll(icHouseExcels.getList()); pageNo++; - }while (icHouseExcels.getList().size() == formDTO.getPageSize()); + } while (icHouseExcels.getList().size() == formDTO.getPageSize()); TemplateExportParams templatePath = new TemplateExportParams("excel/house_export.xlsx"); - Map map = new HashMap<>(); + Map map = new HashMap<>(); map.put("maplist", list); - ExcelPoiUtils.exportExcel(templatePath ,map,"房屋信息录入表",response); + ExcelPoiUtils.exportExcel(templatePath, map, "房屋信息录入表", response); } @Override public List queryListHouseInfo(Set houseIdList, String customerId) { - if(org.apache.commons.collections4.CollectionUtils.isEmpty(houseIdList)){ + if (org.apache.commons.collections4.CollectionUtils.isEmpty(houseIdList)) { return new ArrayList<>(); } List result = new ArrayList<>(); houseIdList.forEach(h -> { HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(h, customerId); - if (null != houseInfo){ + if (null != houseInfo) { result.add(houseInfo); } }); @@ -381,11 +385,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { excelReader = EasyExcel.read(inputStream).build(); // 这里为了简单 所以注册了 同样的head 和Listener 自己使用功能必须不同的Listener ReadSheet readSheet = EasyExcel.readSheet(0).head(HouseInfoModel.class) - .registerReadListener(new ImportHouseInfoListener(formDTO,icBuildingDao,icHouseRedis,neighborHoodService,icHouseService,epmetCommonServiceOpenFeignClient,importTask.getData().getTaskId(),houseService)) + .registerReadListener(new ImportHouseInfoListener(formDTO, icBuildingDao, icHouseRedis, neighborHoodService, icHouseService, epmetCommonServiceOpenFeignClient, importTask.getData().getTaskId(), houseService)) .build(); excelReader.read(readSheet); - } catch (Exception e){ - log.error("dispose exception",e); + } catch (Exception e) { + log.error("dispose exception", e); ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); input.setOperatorId(formDTO.getUserId()); input.setTaskId(importTask.getData().getTaskId()); @@ -402,79 +406,80 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { /** * Desc 小区管理中批量删除 + * * @param formDTO * @author zxc * @date 2022/3/1 4:57 下午 */ @Override public void allDelete(NeighborHoodManageDelFormDTO formDTO) { - if (CollectionUtils.isEmpty(formDTO.getIds())){ + if (CollectionUtils.isEmpty(formDTO.getIds())) { return; } List ids = formDTO.getIds(); - if (formDTO.getType().equals(CustomerGridConstant.NEIGHBORHOOD)){ + if (formDTO.getType().equals(CustomerGridConstant.NEIGHBORHOOD)) { List exists = icHouseDao.selectExistBuildingByNeighborHoodIds(ids); - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { exists.forEach(e -> { for (int i = NumConstant.ZERO; i < ids.size(); i++) { - if (ids.get(i).equals(e.getNeighborHoodId())){ + if (ids.get(i).equals(e.getNeighborHoodId())) { ids.remove(i); continue; } } }); } - if (!CollectionUtils.isEmpty(ids)){ + if (!CollectionUtils.isEmpty(ids)) { icNeighborHoodDao.deleteBatchIds(ids); } - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { String collect = exists.stream().map(m -> m.getName()).collect(Collectors.joining(",")); - EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含楼栋信息,暂无法删除",collect)); + EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含楼栋信息,暂无法删除", collect)); throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode()); } - }else if (formDTO.getType().equals(CustomerGridConstant.BUILDING)){ + } else if (formDTO.getType().equals(CustomerGridConstant.BUILDING)) { List exists = icHouseDao.selectExistHouseByBuildingIds(ids); - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { exists.forEach(e -> { for (int i = NumConstant.ZERO; i < ids.size(); i++) { - if (ids.get(i).equals(e.getBuildingId())){ + if (ids.get(i).equals(e.getBuildingId())) { ids.remove(i); continue; } } }); } - if (!CollectionUtils.isEmpty(ids)){ + if (!CollectionUtils.isEmpty(ids)) { icBuildingDao.deleteBatchIds(ids); } - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { String collect = exists.stream().map(m -> m.getName()).collect(Collectors.joining(",")); - EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含房屋信息,暂无法删除",collect)); + EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含房屋信息,暂无法删除", collect)); throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode()); } - }else if (formDTO.getType().equals(CustomerGridConstant.HOUSE)){ + } else if (formDTO.getType().equals(CustomerGridConstant.HOUSE)) { Result> existUsers = epmetUserOpenFeignClient.getExistUserByHouseIds(ids); - if (!existUsers.success()){ + if (!existUsers.success()) { throw new EpmetException("根据房屋IDs查询房屋下是否有存在居民失败..."); } List exists = existUsers.getData(); - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { exists.forEach(e -> { for (int i = NumConstant.ZERO; i < ids.size(); i++) { - if (ids.get(i).equals(e)){ + if (ids.get(i).equals(e)) { ids.remove(i); continue; } } }); } - if (!CollectionUtils.isEmpty(ids)){ + if (!CollectionUtils.isEmpty(ids)) { icHouseDao.deleteBatchIds(ids); } - if (!CollectionUtils.isEmpty(exists)){ + if (!CollectionUtils.isEmpty(exists)) { List list = icHouseDao.selectHouseNames(exists); String collect = list.stream().collect(Collectors.joining(",")); - EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含居民信息,暂无法删除",collect)); + EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含居民信息,暂无法删除", collect)); throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode()); } } @@ -485,8 +490,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(houseId, customerId); if (null != houseInfo && StringUtils.isNotBlank(houseInfo.getAgencyId())) { AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); - houseInfo.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName())?agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()):agencyInfoCache.getOrganizationName()); - houseInfo.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode())?agencyInfoCache.getAreaCode():StrConstant.EPMETY_STR); + houseInfo.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName()) ? agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()) : agencyInfoCache.getOrganizationName()); + houseInfo.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode()) ? agencyInfoCache.getAreaCode() : StrConstant.EPMETY_STR); } else { houseInfo.setAgencyPathName(StrConstant.EPMETY_STR); houseInfo.setAreaCode(StrConstant.EPMETY_STR); @@ -596,6 +601,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { /** * Desc: 根据类型更新排序 + * * @param formDTO * @author zxc * @date 2022/5/6 08:50 @@ -603,10 +609,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override @Transactional(rollbackFor = Exception.class) public void updateSort(UpdateSortFormDTO formDTO) { - if (formDTO.getType().equals(CustomerGridConstant.HOUSE)){ + if (formDTO.getType().equals(CustomerGridConstant.HOUSE)) { IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); icHouseService.update(icHouseDTO); - }else if(formDTO.getType().equals(CustomerGridConstant.BUILDING)){ + } else if (formDTO.getType().equals(CustomerGridConstant.BUILDING)) { IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); icBuildingService.update(icBuildingDTO); } @@ -625,53 +631,53 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { int searchLevel = 0; //如果小区id不为空 则直接查询小区内的居民 - if (StringUtils.isNotEmpty(formDTO.getNeighborHoodId())){ + if (StringUtils.isNotEmpty(formDTO.getNeighborHoodId())) { searchLevel = 1; } //如果楼宇id不为空 则直接查询楼宇内的居民 - if (StringUtils.isNotEmpty(formDTO.getBuildingId())){ + if (StringUtils.isNotEmpty(formDTO.getBuildingId())) { searchLevel = 2; } //如果有具体的查询套件 则直接按照房屋Id 来查 - if (StringUtils.isNotEmpty(formDTO.getOwnerName()) || StringUtils.isNotEmpty(formDTO.getOwnerPhone()) || StringUtils.isNotEmpty(formDTO.getRentFlag())){ + if (StringUtils.isNotEmpty(formDTO.getOwnerName()) || StringUtils.isNotEmpty(formDTO.getOwnerPhone()) || StringUtils.isNotEmpty(formDTO.getRentFlag())) { searchLevel = 3; } - long start = System.currentTimeMillis(); + long start = System.currentTimeMillis(); PageData houseData = this.getHouseList(formDTO); - log.info("getHouseUser getHoseList cost:{}ms",System.currentTimeMillis() - start); + log.info("getHouseUser getHoseList cost:{}ms", System.currentTimeMillis() - start); List resultList = new ArrayList<>(); - PageData result = new PageData<>(resultList,houseData.getList().size()); + PageData result = new PageData<>(resultList, houseData.getList().size()); int finalSearchLevel = searchLevel; - AtomicInteger num = new AtomicInteger((formDTO.getPageNo()-1) * formDTO.getPageSize()); + AtomicInteger num = new AtomicInteger((formDTO.getPageNo() - 1) * formDTO.getPageSize()); - houseData.getList().forEach(o ->{ + houseData.getList().forEach(o -> { resiParam.setAgencyId(o.getAgencyId()); - if (finalSearchLevel == 1){ + if (finalSearchLevel == 1) { resiParam.setNeighborHoodId(o.getNeighborHoodId()); } - if (finalSearchLevel == 2){ + if (finalSearchLevel == 2) { resiParam.setBuildingId(o.getBuildingId()); } - if (finalSearchLevel == 3){ + if (finalSearchLevel == 3) { resiParam.setHouseId(o.getHouseId()); } - this.getHouseMembers(resiParam, memberCacheMap,haveSearchCache); + this.getHouseMembers(resiParam, memberCacheMap, haveSearchCache); List members = memberCacheMap.getIfPresent(o.getHouseId()); //序号 一个houseId为一个序号 int n = num.incrementAndGet(); //没有住户 则直接写房屋 - if (CollectionUtils.isEmpty(members)){ + if (CollectionUtils.isEmpty(members)) { HouseMemberResultDTO resultDTO = ConvertUtils.sourceToTarget(o, HouseMemberResultDTO.class); resultDTO.setNum(n); resultList.add(resultDTO); return; } //有住户 房屋信息是重复的 - members.forEach(m->{ + members.forEach(m -> { HouseMemberResultDTO resultDTO = ConvertUtils.sourceToTarget(m, HouseMemberResultDTO.class); resultDTO.setNum(n); resultDTO.setAgencyName(o.getAgencyName()); @@ -694,37 +700,38 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { /** * desc:分情况获取 房屋内居民 + * * @param resiParam * @param memberMap * @param haveSearchCache */ public void getHouseMembers(RentTenantDataFormDTO resiParam, Cache> memberMap, Cache haveSearchCache) { - String searchKey = resiParam.getHouseId()+resiParam.getBuildingId()+resiParam.getNeighborHoodId()+resiParam.getGridId()+resiParam.getAgencyId(); + String searchKey = resiParam.getHouseId() + resiParam.getBuildingId() + resiParam.getNeighborHoodId() + resiParam.getGridId() + resiParam.getAgencyId(); Boolean haveSearch = haveSearchCache.getIfPresent(searchKey); //log.info("getHouseUser getHouseMembers searchKey:"+searchKey); - if (haveSearch!= null && haveSearch){ + if (haveSearch != null && haveSearch) { return; } long startT = System.currentTimeMillis(); - haveSearchCache.put(searchKey,true); + haveSearchCache.put(searchKey, true); List memberListTemp = null; resiParam.setPageNo(NumConstant.ONE); do { Result> memberResult = epmetUserOpenFeignClient.getHouseMemberList(resiParam); - log.debug("=======查询居民:"+ resiParam.getPageNo()+",size:"+resiParam.getPageSize()+",result:"+memberResult.getData().size()); + log.debug("=======查询居民:" + resiParam.getPageNo() + ",size:" + resiParam.getPageSize() + ",result:" + memberResult.getData().size()); if (!memberResult.success()) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "调用user服务失败"); } memberListTemp = memberResult.getData(); - log.debug("=======查询居民结果:"+ JSON.toJSONString(memberListTemp)); + log.debug("=======查询居民结果:" + JSON.toJSONString(memberListTemp)); if (CollectionUtils.isEmpty(memberListTemp)) { break; } - resiParam.setPageNo(resiParam.getPageNo()+1); + resiParam.setPageNo(resiParam.getPageNo() + 1); memberListTemp.forEach(h -> memberMap.put(h.getHomeId(), h.getHouseMemberList())); } while (memberListTemp.size() == resiParam.getPageSize()); - log.info("getHouseUser getHouseMembers cost:{}ms,param:{}",System.currentTimeMillis() - startT,JSON.toJSONString(resiParam)); + log.info("getHouseUser getHouseMembers cost:{}ms,param:{}", System.currentTimeMillis() - startT, JSON.toJSONString(resiParam)); } /** @@ -783,13 +790,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override - public void downloadZip(HttpServletResponse response,IcHouseListFormDTO formDTO) throws Exception { + public void downloadZip(HttpServletResponse response, IcHouseListFormDTO formDTO) throws Exception { // 查询pids String pids = null; if (StringUtils.isNotBlank(formDTO.getAgencyId())) { pids = getPids(formDTO.getAgencyId()); } - if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())){ + if (StringUtils.isNotBlank(formDTO.getLevel()) && OrgTypeEnum.AGENCY.getCode().equals(formDTO.getLevel())) { pids = getPids(formDTO.getAgencyId()); } formDTO.setPids(pids); @@ -808,10 +815,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { List houseList = icHouseDao.searchHouseByPage(formDTO); - for(IcHouseListResultDTO house : houseList){ + for (IcHouseListResultDTO house : houseList) { - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName(), - HouseQrcodeEnum.PREFIX.getCode()+"?houseCode="+house.getHouseCode()); + BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), + HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode() + "&customerId=" + house.getCustomerId() + "&gridId=" + house.getGridId()); try { byte[] buf = new byte[8192]; @@ -825,7 +832,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } inputStream.close(); } catch (IOException e) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "组装zip信息有误","组装zip信息有误"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "组装zip信息有误", "组装zip信息有误"); } } zip.close(); @@ -850,12 +857,12 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { * 获取文件名 */ public static String getFileName(IcHouseListResultDTO house) { - return house.getNeighborHoodName() + File.separator +house.getBuildingName() + File.separator +house.getUnitNum() + File.separator + house.getDoorName() + HouseQrcodeEnum.SUFFIX.getCode(); + return house.getNeighborHoodName() + File.separator + house.getBuildingName() + File.separator + house.getUnitNum() + File.separator + house.getDoorName() + HouseQrcodeEnum.SUFFIX.getCode(); } @Override public String createHouseCode(String customerId, String buildingId, String areaCode) { - if(StringUtils.isBlank(customerId) || StringUtils.isBlank(buildingId) ||StringUtils.isBlank(areaCode)){ + if (StringUtils.isBlank(customerId) || StringUtils.isBlank(buildingId) || StringUtils.isBlank(areaCode)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所有字段不可为空", "所有字段不可为空"); } String result = ""; @@ -899,8 +906,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); - String fileName = house.getNeighborHoodName() + house.getBuildingName() +house.getUnitNum()+ house.getDoorName()+".png"; + String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode() + "&customerId=" + house.getCustomerId() + "&gridId=" + house.getGridId(); + String fileName = house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); @@ -938,7 +945,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public Result getHouseInfoByCode(IcHouseInfoFormDTO formDTO) { IcHouseEntity house = icHouseDao.selectByHouseCode(formDTO.getHouseCode()); - HouseInfoCache cache = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(),house.getId()); + HouseInfoCache cache = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), house.getId()); IcHouseInfoResultDTO resut = ConvertUtils.sourceToTarget(cache, IcHouseInfoResultDTO.class); resut.setHouseId(cache.getHomeId()); return new Result().ok(resut); 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 12cc0ccd16..2ec0234444 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 @@ -113,7 +113,8 @@ ag.ORGANIZATION_NAME agencyName, c.GRID_ID as gridId, gr.GRID_NAME, - IFNULL(a.sort,0) as sort + IFNULL(a.sort,0) as sort, + a.CUSTOMER_ID 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' @@ -387,7 +388,8 @@ CONCAT(d.UNIT_NUM,'单元') as unitNum, a.DOOR_NAME as doorName, a.HOUSE_CODE, - a.CUSTOMER_ID + a.CUSTOMER_ID, + c.GRID_ID 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' From d674dd23607f96c5c79a9f1c628279ded64af4a9 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 15:50:40 +0800 Subject: [PATCH 324/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=A6=E7=BB=86=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcResiUserConfirmDTO.java | 5 +++++ .../java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java | 5 +++++ .../main/java/com/epmet/controller/MyHomeController.java | 6 +++--- .../main/java/com/epmet/entity/IcResiUserConfirmEntity.java | 5 +++++ 4 files changed, 18 insertions(+), 3 deletions(-) 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 eb5adec674..39ee709284 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 @@ -102,6 +102,11 @@ public class IcResiUserConfirmDTO implements Serializable { */ private String xjzdPathCode; + /** + * 详细地址 + */ + private String xxdz; + /** * 民族【字典表】 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java index 09431509ac..b66f734cdf 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java @@ -102,6 +102,11 @@ public class IcResiUserConfirmSubmitDTO implements Serializable { */ private String xjzdPathCode; + /** + * 详细地址 + */ + private String xxdz; + /** * 民族【字典表】 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 9aff52b474..a1d0ffc813 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -55,7 +55,7 @@ public class MyHomeController { public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setOperationDescribe(HomeMemberOperationEnum.ADD.getCode()); + dto.setSubmitType(HomeMemberOperationEnum.ADD.getCode()); return icResiUserConfirmService.addMember(dto); } @@ -70,7 +70,7 @@ public class MyHomeController { public Result save(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setOperationDescribe(HomeMemberOperationEnum.UPDATE.getCode()); + dto.setSubmitType(HomeMemberOperationEnum.UPDATE.getCode()); return icResiUserConfirmService.editMember(dto); } @@ -85,7 +85,7 @@ public class MyHomeController { public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setOperationDescribe(HomeMemberOperationEnum.DELETE.getCode()); + dto.setSubmitType(HomeMemberOperationEnum.DELETE.getCode()); return icResiUserConfirmService.delMember(dto); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java index 15f5751bf1..5c06a854e7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserConfirmEntity.java @@ -98,6 +98,11 @@ public class IcResiUserConfirmEntity extends BaseEpmetEntity { */ private String xjzdPathCode; + /** + * 详细地址 + */ + private String xxdz; + /** * 民族【字典表】 */ From a01f100063b8cb07eae7eec3dc2486108f512a69 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 2 Jun 2022 16:42:46 +0800 Subject: [PATCH 325/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcResiUserServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 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 1dba65df68..eeb6ccc7a6 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 @@ -544,6 +544,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl tableMap = new HashMap<>(); formDTO.forEach(d -> { if (!"ic_resi_user".equals(d.getTableName())) { for (LinkedHashMap hash : d.getList()) { @@ -554,7 +556,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl Date: Thu, 2 Jun 2022 16:46:42 +0800 Subject: [PATCH 326/416] =?UTF-8?q?get=E5=92=8Cset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java index 26c96888fe..d79b6884c4 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaLoudongDetailsResultDTO.java @@ -1,9 +1,12 @@ package com.epmet.opendata.dto.result; +import lombok.Data; + import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +@Data public class CaLoudongDetailsResultDTO implements Serializable { private static final long serialVersionUID = -8076699273641714744L; From ded7a4429ca697bf858db591f60d7c5a145ebbb7 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 2 Jun 2022 16:49:18 +0800 Subject: [PATCH 327/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E8=AF=A6=E6=83=85=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 --- .../src/main/resources/mapper/IcResiUserDao.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 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 85650573e2..39a54f02b2 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 @@ -1068,10 +1068,9 @@ birthday, MOBILE, mz, - HJSZD as hjszdCode, + HJSZD, yhzgx, - XJZD as xjzdCode, - xjzd + XJZD from ic_resi_user where DEL_FLAG='0' and id=#{icResiUserId} From f4420d4be4f650462b250769a3ff953c79d7d7d8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Thu, 2 Jun 2022 16:52:40 +0800 Subject: [PATCH 328/416] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/user/IcResiUserDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index 6b1a1d4f35..fa7bacbfc7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -19,7 +19,7 @@ AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) GROUP BY CUSTOMER_ID, - AGENCY_ID + GRID_ID From eea41226069c84637a5a7566089beb4d2085ec78 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 2 Jun 2022 17:03:46 +0800 Subject: [PATCH 329/416] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8E=92=E9=99=A4=E8=BF=81=E5=87=BA=E5=92=8C?= =?UTF-8?q?=E6=AD=BB=E4=BA=A1=E4=BA=BA=E5=91=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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 67dd042930..59a6297624 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 @@ -948,6 +948,7 @@ ic_resi_user WHERE del_flag = '0' + AND sub_status not in('11','21') AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) From 0f85367ff0f8e8aa0971683c325e903cc05ec5af Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Thu, 2 Jun 2022 17:18:01 +0800 Subject: [PATCH 330/416] FIX --- .../src/main/resources/mapper/user/IcResiUserDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml index fa7bacbfc7..0c0d3c76ce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml @@ -16,10 +16,11 @@ ic_resi_user WHERE del_flag = '0' + AND STATUS = '0' AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) GROUP BY CUSTOMER_ID, - GRID_ID + AGENCY_ID From 0c89c9bc3bbe4c10a0e103d5b3a1fd76dd6ffbdd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 2 Jun 2022 17:25:47 +0800 Subject: [PATCH 331/416] .. --- .../src/main/resources/mapper/IcResiUserDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 59a6297624..9843a33f63 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 @@ -948,7 +948,7 @@ ic_resi_user WHERE del_flag = '0' - AND sub_status not in('11','21') + AND status = '0' AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) From 8580bfd26d92e7cb197d5de933057215c1199ae3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 2 Jun 2022 17:48:50 +0800 Subject: [PATCH 332/416] =?UTF-8?q?=E5=AD=97=E5=85=B8=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.19__add_dict.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql new file mode 100644 index 0000000000..70705df799 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql @@ -0,0 +1,11 @@ +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000014', 'ic_service_type', '服务类别', '', '20', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000000', '1000000000000000014', '社区养老', '00', '0', '', '0', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000001', '1000000000000000014', '社会保障', '01', '0', '', '1', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000002', '1000000000000000014', '社区救助', '02', '0', '', '2', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000003', '1000000000000000014', '健康医疗', '03', '0', '', '3', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000004', '1000000000000000014', '社区安全', '04', '0', '', '4', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000005', '1000000000000000014', '社区卫生', '05', '0', '', '5', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000006', '1000000000000000014', '社区环境', '06', '0', '', '6', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000007', '1000000000000000014', '社区治安', '07', '0', '', '7', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000008', '1000000000000000014', '社区文化', '08', '0', '', '8', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27'); From 1ac5429c3e1780a5318b2eae67484cab96fb342a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 6 Jun 2022 09:35:55 +0800 Subject: [PATCH 333/416] =?UTF-8?q?=E7=BB=84=E7=BB=87IDs=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BuildingServiceImpl.java | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 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 c1863e5cd0..6a95c20596 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 @@ -19,18 +19,18 @@ 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.common.CustomerIcHouseRedis; +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.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.CustomerAgencyConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.*; import com.epmet.dto.BuildingTreeLevelDTO; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.BuildingResultDTO; -import com.epmet.dto.result.BuildingResultPagedDTO; -import com.epmet.dto.result.IcBuildingListResultDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.enums.BuildingTypeEnums; import com.epmet.excel.IcBuildingExcel; @@ -264,6 +264,14 @@ public class BuildingServiceImpl implements BuildingService { } + /** + * Desc: + * 2022-06-06 需求变动,只返回当前组织下级ID + * @param customerId + * @param staffId + * @author zxc + * @date 2022/6/6 09:19 + */ @Override public List treeIds(String customerId, String staffId) { List result = new ArrayList<>(); @@ -272,34 +280,25 @@ public class BuildingServiceImpl implements BuildingService { log.error("com.epmet.service.impl.BuildingServiceImpl.treeIds,没有找到工作人员所属的机关信息,用户Id:{}", staffId); return new ArrayList<>(); } - //1.获取所在组织及下级组织 - CustomerAgencyEntity customerAgency = customerAgencyDao.selectById(agency.getAgencyId()); - List customerAgencyList = icBuildingDao.selectAgencyChildrenList(agency.getAgencyId()); - customerAgencyList.add(customerAgency); - if (CollectionUtils.isEmpty(customerAgencyList)) { - return new ArrayList<>(); + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agency.getAgencyId()); + if (null == agencyInfo){ + throw new EpmetException("未查询到组织信息"+agency.getAgencyId()); } - result.addAll(customerAgencyList.stream().map(m -> m.getId()).collect(Collectors.toList())); - List agencyList = customerAgencyList.stream().map(item -> { - BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); - buildingTreeLevelDTO.setId(item.getId()); - buildingTreeLevelDTO.setPId(item.getPid()); - buildingTreeLevelDTO.setLabel(item.getOrganizationName()); - buildingTreeLevelDTO.setLevel(item.getLevel()); - buildingTreeLevelDTO.setLongitude(item.getLongitude()); - buildingTreeLevelDTO.setLatitude(item.getLatitude()); - buildingTreeLevelDTO.setChildren(new ArrayList<>()); - //当前组织有几个下级组织 - buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); - return buildingTreeLevelDTO; - }).collect(Collectors.toList()); - //2.获取组织所在网格 - List agencyIdList = customerAgencyList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList()); - List customerGridList = customerGridDao.selectList(new QueryWrapper().lambda().in(CustomerGridEntity::getPid, agencyIdList)); - if (CollectionUtils.isEmpty(customerGridList)) { - return result; + if (agencyInfo.getLevel().equals(CustomerAgencyConstant.COMMUNITY_LEVEL)){ + // 查询所属组织的下级网格 + List agencyGridListResultDTOS = customerGridDao.selectAgencyGridList(agency.getAgencyId()); + if (!CollectionUtils.isEmpty(agencyGridListResultDTOS)){ + result.addAll(agencyGridListResultDTOS.stream().map(m -> m.getGridId()).collect(Collectors.toList())); + result.add(agency.getAgencyId()); + } + }else { + // 查询组织下的组织 + List sonAgencyId = customerAgencyDao.getSonAgencyId(agency.getAgencyId()); + if (!CollectionUtils.isEmpty(sonAgencyId)){ + result.addAll(sonAgencyId.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); + result.add(agency.getAgencyId()); + } } - result.addAll(customerGridList.stream().map(m -> m.getId()).collect(Collectors.toList())); return result; } From 003034ea4ec01f458fb4fa0d0150b0cff0a26288 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 6 Jun 2022 09:39:26 +0800 Subject: [PATCH 334/416] . --- .../resources/db/migration/V0.0.18__alter_service_org.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql new file mode 100644 index 0000000000..32cb514da9 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.18__alter_service_org.sql @@ -0,0 +1,6 @@ +ALTER TABLE `ic_service_org` +MODIFY COLUMN `ORG_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '服务组织名称' AFTER `SERVICE_TYPE`, +MODIFY COLUMN `ORG_DESCRIBE` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织描述' AFTER `ORG_NAME`, +MODIFY COLUMN `PRINCIPAL_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '负责人姓名' AFTER `ORG_DESCRIBE`, +MODIFY COLUMN `PRINCIPAL_MOBILE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '负责人电话' AFTER `PRINCIPAL_NAME`; + From d391d1dee5024ad779a985e074dcd647fa6fa39b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 6 Jun 2022 09:40:53 +0800 Subject: [PATCH 335/416] . --- .../java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java index 9b691c71bb..3b95afef3f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java @@ -44,9 +44,9 @@ public class IcServiceOrgAddEditFormDTO implements Serializable { @NotBlank(message = "负责人姓名不能为空", groups = {AddGroup.class}) private String principalName; /** - * 负责人说手机号 + * 联系方式 */ - @NotBlank(message = "负责人说手机号不能为空", groups = {AddGroup.class}) + @NotBlank(message = "联系方式不能为空", groups = {AddGroup.class}) private String principalMobile; /** * 经度 From a9ced408036dd1d92225effe52549c84d376fa29 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Jun 2022 10:00:16 +0800 Subject: [PATCH 336/416] =?UTF-8?q?=E5=A4=9A=E5=85=83=E4=B8=BB=E4=BD=93?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E5=9C=B0=E5=9B=BE=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcCommunitySelfOrganizationServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 833f93d900..1fdc20516d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -769,9 +769,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryCoordinateList(CategorySelfOrgFormDTO formDTO) { CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); formDTO.setAgencyId(staffInfo.getAgencyId()); - PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), - formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); - List list=pageInfo.getList(); + List list=baseDao.queryCoordinateList(formDTO); for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); if (StringUtils.isNotBlank(dto.getCategoryCode())) { @@ -779,7 +777,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); + return new PageData<>(list, NumConstant.ONE_NEG); } } From 43634f14a6637ddb24eed2399a7e05894906d7aa Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 6 Jun 2022 11:19:23 +0800 Subject: [PATCH 337/416] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=88=BF=E5=B1=8B=E7=94=9F=E6=88=90code=E5=92=8C?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/IcHouseDTO.java | 6 +++ .../com/epmet/controller/HouseController.java | 2 +- .../java/com/epmet/dao/IcNeighborHoodDao.java | 2 + .../java/com/epmet/entity/IcHouseEntity.java | 2 +- .../epmet/service/impl/HouseServiceImpl.java | 18 ++++++++- .../db/migration/V0.0.21__alter_ic_house.sql | 10 +++++ .../resources/mapper/IcNeighborHoodDao.xml | 7 ++++ .../V0.0.52__ic_resi_user_confirm.sql | 39 +++++++++++++++++++ 8 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.21__alter_ic_house.sql create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql 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 2e0484f6b7..42163539ce 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 @@ -111,6 +111,12 @@ public class IcHouseDTO implements Serializable { */ private BigDecimal sort; + /** + * 房屋编码 + */ + private String houseCode; + private String houseQrcodeUrl; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 3a7d221a29..472f3cb615 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -159,7 +159,7 @@ public class HouseController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("houseadd") - public Result houseAdd(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseAddFormDTO formDTO) { + public Result houseAdd(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseAddFormDTO formDTO) throws Exception { //效验数据 ValidatorUtils.validateEntity(formDTO, IcHouseAddFormDTO.AddShowGroup.class); String customerId = tokenDTO.getCustomerId(); 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 d835e2e65d..ca929081cc 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 @@ -89,4 +89,6 @@ public interface IcNeighborHoodDao extends BaseDao { void delProperty(@Param("neighborHoodIds")List neighborHoodIds); void updateOneNeighborHood(ImportGeneralDTO info); + + String getAreaCode(@Param("neighborHoodId")String neighborHoodId); } 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 73d6dfb77d..5940608292 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 @@ -116,5 +116,5 @@ public class IcHouseEntity extends BaseEpmetEntity { * 房屋编码 */ private String houseCode; - + private String houseQrcodeUrl; } 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 7c4200feae..fa74cdb6bb 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 @@ -135,10 +135,24 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if (null != count && count > 0) { throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg()); } - IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); + + IcHouseEntity icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); icHouseDTO.setCustomerId(customerId); icHouseDTO.setHouseName(getHouseName(formDTO)); - icHouseService.save(icHouseDTO); + //获取所属组织地区码 + String areaCode = icNeighborHoodDao.getAreaCode(formDTO.getNeighborHoodId()); + if (StringUtils.isNotBlank(areaCode)) { + icHouseDTO.setHouseCode(createHouseCode(customerId, formDTO.getBuildingId(), areaCode)); + } + icHouseDao.insert(icHouseDTO); + IcHouseEntity entity = new IcHouseEntity(); + entity.setId(icHouseDTO.getId()); + try { + entity.setHouseQrcodeUrl(createHouseQrcodeUrl(icHouseDTO.getId())); + } catch (Exception e) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败","二维码生成失败"); + } + icHouseDao.updateById(entity); } private String getHouseName(IcHouseAddFormDTO formDTO) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.21__alter_ic_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.21__alter_ic_house.sql new file mode 100644 index 0000000000..88dbfe6db5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.21__alter_ic_house.sql @@ -0,0 +1,10 @@ +alter table ic_house add COLUMN `HOUSE_CODE` varchar(32) DEFAULT NULL COMMENT '房屋编码'; +alter table ic_house add COLUMN `HOUSE_QRCODE_URL` varchar(255) DEFAULT NULL COMMENT '一户一码的二维码地址'; + + +CREATE TABLE `ic_house_code_info` ( + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `BUILDING_ID` varchar(64) NOT NULL COMMENT '所属楼栋id', + `BUILDING_MAX_NUM` varchar(10) NOT NULL COMMENT '最大的楼栋编码序列号', + `HOUSE_MAX_NUM` varchar(10) NOT NULL COMMENT '该楼栋下最大的房屋编码序列号' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房屋编码辅助表'; \ No newline at end of file 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 0f1cf1b84b..7fc0827667 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 @@ -301,4 +301,11 @@ del_flag = '0' AND grid_id = #{gridId} + diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql new file mode 100644 index 0000000000..02d603bb55 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql @@ -0,0 +1,39 @@ +CREATE TABLE `ic_resi_user_confirm` +( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', + `PIDS` varchar(255) NOT NULL COMMENT '组织的pids', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', + `SURNAME` varchar(64) NOT NULL COMMENT '姓', + `NAME` varchar(64) NOT NULL COMMENT '名', + `MOBILE` varchar(15) DEFAULT NULL COMMENT '手机号', + `GENDER` char(2) DEFAULT NULL COMMENT '性别', + `ID_CARD` varchar(18) NOT NULL COMMENT '身份证号', + `BIRTHDAY` varchar(64) DEFAULT NULL COMMENT '出生日期', + `HJSZD` varchar(256) DEFAULT NULL COMMENT '户籍所在地', + `HJSZD_CODE` varchar(256) DEFAULT NULL COMMENT '户籍所在地地区码', + `HJSZD_PATH_CODE` varchar(255) DEFAULT NULL COMMENT '户籍所在地层级编码', + `XJZD` varchar(256) DEFAULT NULL COMMENT '现居住地', + `XJZD_CODE` varchar(256) DEFAULT NULL COMMENT '现居住地地区码', + `XJZD_PATH_CODE` varchar(255) DEFAULT NULL COMMENT '现居住地层级编码', + `XXDZ` varchar(255) DEFAULT NULL COMMENT '详细地址', + `MZ` varchar(64) DEFAULT NULL COMMENT '民族【字典表】', + `MZ_NAME` varchar(255) DEFAULT NULL COMMENT '名族名称', + `YHZGX` varchar(64) DEFAULT NULL COMMENT '与户主关系', + `YHZGX_NAME` varchar(255) DEFAULT NULL COMMENT '与户主关系名称', + `CONFIRM_RESULT` varchar(64) DEFAULT '0' COMMENT '审核状态0未审核,1审核通过,2审核不通过', + `REASON` varchar(64) DEFAULT NULL COMMENT '审核不通过的原因', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `IC_RESI_USER_ID` varchar(64) DEFAULT NULL COMMENT 'ic_resi_user表id', + `SUBMIT_TYPE` varchar(255) DEFAULT NULL COMMENT '操作类型:新增add 修改 update 删除 delete', + `DELETE_REASON` varchar(255) DEFAULT NULL COMMENT '删除原因', + `OPERATION_DESCRIBE` varchar(255) DEFAULT NULL COMMENT '操作说明', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='居民信息审核表'; \ No newline at end of file From 9794fbcaffdced69342fa91b413509553466cc36 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 6 Jun 2022 13:39:32 +0800 Subject: [PATCH 338/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E5=89=94=E9=99=A4=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/IcResiUserConfirmSubmitDTO.java | 22 ++++- .../epmet/controller/MyHomeController.java | 86 +++++++++++++------ .../com/epmet/service/IcResiUserService.java | 19 ++++ .../service/impl/IcResiUserServiceImpl.java | 64 ++++++++++++++ .../V0.0.52__ic_resi_user_confirm.sql | 6 +- 5 files changed, 167 insertions(+), 30 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java index b66f734cdf..429852ff04 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserConfirmSubmitDTO.java @@ -42,13 +42,33 @@ public class IcResiUserConfirmSubmitDTO implements Serializable { */ private String gridId; + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 单元id + */ + private String unitId; + + /** + * 所属家庭Id + */ + private String homeId; + /** * 姓 */ private String surname; /** - * 名 + * 姓名 */ private String name; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index a1d0ffc813..f54d4d6a03 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -14,6 +14,7 @@ import com.epmet.dto.form.RegisterAndBindFormDTO; import com.epmet.dto.result.HomeInfoResultDTO; import com.epmet.dto.result.HomeUserBriefResultDTO; import com.epmet.service.IcResiUserConfirmService; +import com.epmet.service.IcResiUserService; import com.epmet.service.MyHomeService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -37,6 +38,9 @@ public class MyHomeController { @Autowired private IcResiUserConfirmService icResiUserConfirmService; + @Autowired + private IcResiUserService icResiUserService; + @PostMapping("memberList/{houseCode}") public Result> selectListHomeMember(@PathVariable("houseCode") String houseCode, @LoginUser TokenDto tokenDto) { @@ -44,51 +48,81 @@ public class MyHomeController { } +// /** +// * @describe: 新增家庭成员 +// * @author wangtong +// * @date 2022/6/1 15:50 +// * @params [dto] +// * @return com.epmet.commons.tools.utils.Result +// */ +// @PostMapping("addMember") +// public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ +// //效验数据 +// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); +// dto.setSubmitType(HomeMemberOperationEnum.ADD.getCode()); +// return icResiUserConfirmService.addMember(dto); +// } +// +// /** +// * @describe: 修改家庭成员 +// * @author wangtong +// * @date 2022/6/1 15:27 +// * @params [dto] +// * @return com.epmet.commons.tools.utils.Result +// */ +// @PostMapping("editMember") +// public Result save(@RequestBody IcResiUserConfirmSubmitDTO dto){ +// //效验数据 +// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); +// dto.setSubmitType(HomeMemberOperationEnum.UPDATE.getCode()); +// return icResiUserConfirmService.editMember(dto); +// } +// /** - * @describe: 新增家庭成员 + * @describe: 删除家庭成员 * @author wangtong - * @date 2022/6/1 15:50 + * @date 2022/6/1 16:10 * @params [dto] * @return com.epmet.commons.tools.utils.Result */ - @PostMapping("addMember") - public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + @PostMapping("delMember") + public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setSubmitType(HomeMemberOperationEnum.ADD.getCode()); - return icResiUserConfirmService.addMember(dto); + dto.setSubmitType(HomeMemberOperationEnum.DELETE.getCode()); + return icResiUserConfirmService.delMember(dto); } /** - * @describe: 修改家庭成员 - * @author wangtong - * @date 2022/6/1 15:27 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - @PostMapping("editMember") - public Result save(@RequestBody IcResiUserConfirmSubmitDTO dto){ + * @describe: 新增家庭成员 + * @author wangtong + * @date 2022/6/1 15:50 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("addMember") + public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setSubmitType(HomeMemberOperationEnum.UPDATE.getCode()); - return icResiUserConfirmService.editMember(dto); + return icResiUserService.addMember(dto); } /** - * @describe: 删除家庭成员 - * @author wangtong - * @date 2022/6/1 16:10 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - @PostMapping("delMember") - public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + * @describe: 修改家庭成员 + * @author wangtong + * @date 2022/6/1 15:27 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("editMember") + public Result editMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - dto.setSubmitType(HomeMemberOperationEnum.DELETE.getCode()); - return icResiUserConfirmService.delMember(dto); + return icResiUserService.editMember(dto); } + + /** * @describe: 查询家庭成员信息 * @author wangtong 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 561ddf9e2b..4452769f21 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 @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; 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.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -374,4 +375,22 @@ public interface IcResiUserService extends BaseService { * @Date 2022/5/20 9:59 */ IcResiUserInfoDTO getUserByIdCard(IcResiUserDTO formDTO); + + /** + * @describe: 新增家庭成员 + * @author wangtong + * @date 2022/6/6 10:36 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + Result addMember(IcResiUserConfirmSubmitDTO dto); + + /** + * @describe: 修改家庭成员 + * @author wangtong + * @date 2022/6/6 10:36 + * @params [dto] + * @return com.epmet.commons.tools.utils.Result + */ + Result editMember(IcResiUserConfirmSubmitDTO dto); } 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 665653b1d8..873c90c39a 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 @@ -2261,6 +2261,70 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getHomeId, user.getHomeId()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { + String errorMsg = "房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + } + } + + + dto.setCustomerId(user.getCustomerId()); + dto.setAgencyId(user.getAgencyId()); + dto.setPids(user.getPids()); + dto.setGridId(user.getGridId()); + dto.setVillageId(user.getVillageId()); + dto.setBuildId(user.getBuildId()); + dto.setUnitId(user.getUnitId()); + dto.setHomeId(user.getHomeId()); + + IcResiUserEntity entity = ConvertUtils.sourceToTarget(dto, IcResiUserEntity.class); + insert(entity); + + return new Result().ok("新增成功"); + } + + @Override + public Result editMember(IcResiUserConfirmSubmitDTO dto) { + IcResiUserEntity user = icResiUserDao.selectById(dto.getIcResiUserId()); + + IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(dto.getIdCard(), user.getCustomerId()); + if (null != userDTO && null != userDTO.getIdCard()) { + String errorMsg = "修改居民信息失败,身份证号已存在!"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); + } + //这个房屋下已经设置了户主后,再次选择户主时提示提示“房屋下已存在户主” PS.户主指与户主关系是本人的用户 + if (RelationshipEnum.SELF.getCode().equals(dto.getYhzgx())) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getHomeId, user.getHomeId()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { + String errorMsg = "房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + } + } + + IcResiUserEntity entity = ConvertUtils.sourceToTarget(dto, IcResiUserEntity.class); + entity.setId(dto.getIcResiUserId()); + updateById(entity); + return new Result().ok("修改成功"); + } + /** * desc:根据字段值获取 options * @param customerId diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql index 02d603bb55..5be9280308 100644 --- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.52__ic_resi_user_confirm.sql @@ -5,8 +5,8 @@ CREATE TABLE `ic_resi_user_confirm` `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', `PIDS` varchar(255) NOT NULL COMMENT '组织的pids', `GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', - `SURNAME` varchar(64) NOT NULL COMMENT '姓', - `NAME` varchar(64) NOT NULL COMMENT '名', + `SURNAME` varchar(64) COMMENT '姓', + `NAME` varchar(64) COMMENT '名', `MOBILE` varchar(15) DEFAULT NULL COMMENT '手机号', `GENDER` char(2) DEFAULT NULL COMMENT '性别', `ID_CARD` varchar(18) NOT NULL COMMENT '身份证号', @@ -36,4 +36,4 @@ CREATE TABLE `ic_resi_user_confirm` `OPERATION_DESCRIBE` varchar(255) DEFAULT NULL COMMENT '操作说明', PRIMARY KEY (`ID`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='居民信息审核表'; \ No newline at end of file + DEFAULT CHARSET = utf8mb4 COMMENT ='居民信息审核表'; From 7d24260527b829c92ac7b562d9d8920da3567910 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 6 Jun 2022 14:10:40 +0800 Subject: [PATCH 339/416] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=88=BF=E5=B1=8B=E7=94=9F=E6=88=90code=E5=92=8C?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/IcNeighborHoodDao.xml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 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 7fc0827667..8d6e24b5f7 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 @@ -302,10 +302,14 @@ AND grid_id = #{gridId} From a7fb2d886220727f0d1a10e15dc02163bbc4b9ec Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 6 Jun 2022 14:23:31 +0800 Subject: [PATCH 340/416] =?UTF-8?q?area=20code=E8=A1=A50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/HouseServiceImpl.java | 12 ++++++++++++ 1 file changed, 12 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 fa74cdb6bb..b36df05988 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 @@ -142,6 +142,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { //获取所属组织地区码 String areaCode = icNeighborHoodDao.getAreaCode(formDTO.getNeighborHoodId()); if (StringUtils.isNotBlank(areaCode)) { + areaCode = numberAfterFillZero(areaCode, NumConstant.TWELVE); icHouseDTO.setHouseCode(createHouseCode(customerId, formDTO.getBuildingId(), areaCode)); } icHouseDao.insert(icHouseDTO); @@ -981,5 +982,16 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { return result; } + private String numberAfterFillZero(String str, int length) { + StringBuilder buffer = new StringBuilder(str); + if (buffer.length() >= length) { + return buffer.toString(); + } else { + while (buffer.length() < length) { + buffer.append("0"); + } + } + return buffer.toString(); + } } From c14734e1f3ef270a59d621e66952f9fb0f9c65d4 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 6 Jun 2022 14:36:33 +0800 Subject: [PATCH 341/416] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=8E=B7=E5=8F=96=E6=88=BF=E5=B1=8B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=A1=A5=E5=85=85customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java index 8f60e24d37..d958f1494b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseInfoResultDTO.java @@ -55,6 +55,11 @@ public class IcHouseInfoResultDTO implements Serializable { */ private String houseId; + /** + * 客户id + */ + private String customerId; + } From 85492a25efe489636f8712d1ac871472d2acdc48 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 6 Jun 2022 14:55:20 +0800 Subject: [PATCH 342/416] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/DataStatisticalOpenFeignClient.java | 3 +++ .../impl/DataStatisticalOpenFeignClientFallBack.java | 5 +++++ .../java/com/epmet/service/StatsUserHouseService.java | 10 ++++++++++ .../epmet/service/impl/StatsUserHouseServiceImpl.java | 5 +++++ .../main/java/com/epmet/task/StatsUserHouseTask.java | 7 +++++++ 5 files changed, 30 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 0aedb1d83e..67f56957dc 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -375,4 +375,7 @@ public interface DataStatisticalOpenFeignClient { @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatAgency") Result userHouseStatAgency(@RequestBody FactUserHouseFormDTO formDTO); + + @PostMapping("/data/stats/factAgencyUserHouseDaily/userHouseStatNeighborhood") + Result userHouseStatNeighborhood(@RequestBody FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index 6ebe9d5004..b5bb0013c4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -362,4 +362,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result userHouseStatAgency(FactUserHouseFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatAgency", formDTO); } + + @Override + public Result userHouseStatNeighborhood(FactUserHouseFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "userHouseStatNeighborhood", formDTO); + } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java index 58c930e1a1..7a1537bdd1 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/StatsUserHouseService.java @@ -24,4 +24,14 @@ public interface StatsUserHouseService { * @date 2022/5/30 10:25 */ Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO); + + /** + * 人房信息统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/5/30 10:25 + */ + Result execUserHouseNeighborhoodStatistical(FactUserHouseFormDTO formDTO); } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java index 30875e947b..653c0ae7e8 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsUserHouseServiceImpl.java @@ -27,4 +27,9 @@ public class StatsUserHouseServiceImpl implements StatsUserHouseService { public Result execUserHouseAgencyStatistical(FactUserHouseFormDTO formDTO) { return dataStatisticalOpenFeignClient.userHouseStatAgency(formDTO); } + + @Override + public Result execUserHouseNeighborhoodStatistical(FactUserHouseFormDTO formDTO) { + return dataStatisticalOpenFeignClient.userHouseStatNeighborhood(formDTO); + } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java index 1a32b7c1c7..9925ed4391 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsUserHouseTask.java @@ -44,5 +44,12 @@ public class StatsUserHouseTask implements ITask { } else { logger.error("StatsUserHouseTask-agency定时任务执行失败:" + result.getMsg()); } + + result = statsUserHouseService.execUserHouseNeighborhoodStatistical(formDTO); + if (result.success()) { + logger.info("StatsUserHouseTask-neighborhood定时任务执行成功"); + } else { + logger.error("StatsUserHouseTask-neighborhood定时任务执行失败:" + result.getMsg()); + } } } From b9c87a502884ee1ac53332da683a4b32a15886e5 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Mon, 6 Jun 2022 15:13:33 +0800 Subject: [PATCH 343/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 3cb2f98d7b..933e891774 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -60,7 +60,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); } if (params.containsKey("level")) { - if("neighborhoodCode".equals(params.get("level").toString())){ + if("neighborhood".equals(params.get("level").toString())){ page = factNeighborhoodUserHouseDailyService.page(params); }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { @@ -87,7 +87,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { } // 网格纬度查询网格统计表,其余纬度查询组织统计表 if (params.containsKey("level")) { - if("neighborhoodCode".equals(params.get("level").toString())){ + if("neighborhood".equals(params.get("level").toString())){ dto = factNeighborhoodUserHouseDailyService.getTotal(params); }else if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) { dto = factGridUserHouseDailyService.getTotal(params); @@ -102,7 +102,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { public List list(Map params) { List list = new ArrayList<>(); if (params.containsKey("level")) { - if("neighborhoodCode".equals(params.get("level").toString())){ + if("neighborhood".equals(params.get("level").toString())){ list = factNeighborhoodUserHouseDailyService.listExport(params); }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { list = factGridUserHouseDailyService.listExport(params); From 2dd8565ab69114f6527fcc67bd578ef98844a867 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 6 Jun 2022 15:58:48 +0800 Subject: [PATCH 344/416] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcServiceProjectDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ea4ae4a34b..17f4de965a 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 @@ -33,8 +33,8 @@ POLICY_GROUND AS policyGround, POLICY_LEVEL AS policyLevel, (CASE WHEN POLICY_LEVEL = '0' THEN '市级' - WHEN POLICY_LEVEL = '0' THEN '区级' - WHEN POLICY_LEVEL = '0' THEN '街道级' + WHEN POLICY_LEVEL = '1' THEN '区级' + WHEN POLICY_LEVEL = '2' THEN '街道级' ELSE '' end) AS policyLevelName FROM ic_service_project WHERE DEL_FLAG = 0 From be5d46c1854e44d36bb021f9d58e0d438e46e9f5 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 6 Jun 2022 16:09:37 +0800 Subject: [PATCH 345/416] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E3=80=90?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A1=B9=E7=9B=AE=E3=80=91=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=E6=95=B0=E4=BB=8Efeedback=E4=B8=AD=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/epmet-heart/epmet-heart-server/pom.xml | 8 ++++++++ .../java/com/epmet/entity/IcServiceFeedbackEntity.java | 2 +- .../main/java/com/epmet/entity/IcServiceRecordEntity.java | 5 +++++ .../epmet/service/impl/IcServiceRecordServiceImpl.java | 4 +++- .../migration/V0.0.19__service_move_people_to_record.sql | 2 ++ .../src/main/resources/mapper/IcServiceFeedbackDao.xml | 2 +- .../src/main/resources/mapper/IcServiceRecordDao.xml | 5 +++-- 7 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.19__service_move_people_to_record.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index bc2955d8b7..af7bb32c5d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -132,6 +132,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + ${project.basedir}/src/main/java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java index 608d2ab7a3..df89735b5b 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java @@ -53,7 +53,7 @@ public class IcServiceFeedbackEntity extends BaseEpmetEntity { /** * 服务人数 */ - private Integer servicePeopleNumber; + //private Integer servicePeopleNumber; /** * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java index 1a452f575b..4156c60604 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java @@ -81,4 +81,9 @@ public class IcServiceRecordEntity extends BaseEpmetEntity { */ private String remark; + /** + * 服务人数 + */ + private Integer servicePeopleNumber; + } 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 13eaff0445..49d54329a2 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 @@ -194,6 +194,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl - + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml index 69838a2b91..ad5df068ef 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml @@ -22,6 +22,7 @@ + + From 6489abb63b2b6798661d3e36c9ae97d0ff2d1e7c Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Mon, 6 Jun 2022 16:28:18 +0800 Subject: [PATCH 348/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=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/org/IcHouseDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index dd14c8aee2..9656f876b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -103,7 +103,7 @@ SELECT - nd.NEIGHBOURHOODS_ID, + t.NEIGHBOR_HOOD_ID as NEIGHBOURHOODS_ID, g.CUSTOMER_ID, g.id AS GRID_ID, g.PID, @@ -54,24 +54,23 @@ sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount, sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr, sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify - FROM fact_neighborhood_user_house_daily nd - left join customer_grid g on g.id = nd.GRID_ID and g.DEL_FLAG = '0' - LEFT JOIN ( + FROM ( SELECT h.id, h.RENT_FLAG, n.GRID_ID, h.CREATED_TIME, - h.UPDATED_TIME + h.UPDATED_TIME, + h.NEIGHBOR_HOOD_ID FROM ic_house h LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id WHERE h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) AND n.DEL_FLAG = '0' AND h.DEL_FLAG = '0' - ) t ON t.GRID_ID = g.ID - WHERE - nd.DEL_FLAG = '0' + ) t + left join customer_grid g on g.id = t.GRID_ID and g.DEL_FLAG = '0' + WHERE 1=1 AND g.CUSTOMER_ID = #{customerId} From 4c2a676557c78d12f12f68fbc87936dd00879f0a Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Mon, 6 Jun 2022 17:27:38 +0800 Subject: [PATCH 351/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/stats/impl/FactUserHouseServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 933e891774..3551554b67 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -218,6 +218,8 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { dto.setPid(item.getPid()); dto.setPids(item.getPids()); dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); + dto.setNeighbourhoodsId(item.getNeighbourhoodsId()); + dto.setNeighborHoodName(item.getNeighborHoodName()); Optional houseOptional = houseList.stream().filter(house -> neighborHoodsId.equals(house.getNeighbourhoodsId()) && customerId.equals(house.getCustomerId())).findFirst(); if (houseOptional.isPresent()) { From 54746551bca7c0b175f2c2df6befb2356794d092 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 6 Jun 2022 17:34:47 +0800 Subject: [PATCH 352/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E6=A1=A3?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=9C=B0=E5=9D=80=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/HouseController.java | 6 +++--- .../java/com/epmet/service/impl/HouseServiceImpl.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 9f86eed2c9..6099d6e147 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -442,15 +442,15 @@ public class HouseController implements ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); + BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); //BufferedImage 转 InputStream ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream); ImageIO.write(image, "png", imageOutput); InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); long length = imageOutput.length(); - String fileName = house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; + String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; response.setContentType("application/octet-stream"); response.setContentLength((int) length); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, StrConstant.UTF_8)); 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 85d18c4591..62d25cad3e 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 @@ -832,8 +832,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { for (IcHouseListResultDTO house : houseList) { - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), - HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode()); + BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), + HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode()); try { byte[] buf = new byte[8192]; @@ -921,9 +921,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + "?houseCode=" + house.getHouseCode(); - String fileName = house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; - BufferedImage image = BarcodeUtils.drawQRImage(house.getNeighborHoodName() + house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); + String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; + BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); FileItem fileItem = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, FileUtils.getAndCreateDirUnderEpmetFilesDir("temp").toFile()) From 11b9970b5f1f99e718c8258cef4b0eadc0c00630 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 09:42:54 +0800 Subject: [PATCH 353/416] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-job/epmet-job-server/pom.xml | 6 +++ .../epmet/task/GuardarDatosLouDongTask.java | 41 +++++++++++++++++++ .../epmet/task/GuardarDatosPingFangTask.java | 41 +++++++++++++++++++ .../epmet/task/GuardarDatosRentalTask.java | 40 ++++++++++++++++++ .../epmet/task/GuardarDatosResidentTask.java | 41 +++++++++++++++++++ .../epmet/task/GuardarDatosRotatorsTask.java | 40 ++++++++++++++++++ .../feign/GuardarDatosFeignClient.java | 26 ++++++++++++ .../impl/GuardarDatosFeignClientFallBack.java | 37 +++++++++++++++++ 8 files changed, 272 insertions(+) create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index b0a4d6f1e5..30bdb6016d 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -114,6 +114,12 @@ 2.0.0 compile + + com.epmet + open-data-worker-server + 0.3.31 + compile + diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java new file mode 100644 index 0000000000..03ec5b5ad2 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java @@ -0,0 +1,41 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 获取楼栋的数据存入ca_开头的表 + * + * @param + * @return + * @author LZN + * @date 2022/6/6 14:37 + */ +@Slf4j +@Component("getPreserLouDongVation") +public class GuardarDatosLouDongTask implements ITask { + + @Autowired + private GuardarDatosFeignClient guardarDatosFeignClient; + + @Override + public void run(String params) { + log.info("LouDong定时任务执行,参数为:" + params); + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = guardarDatosFeignClient.getPreserLouDongVation(formDTO); + if (result.success()){ + log.debug("LouDong执行成功"); + }else{ + log.debug("LouDong执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java new file mode 100644 index 0000000000..6f56f8e7ad --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java @@ -0,0 +1,41 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * 获取平房的数据存入ca_开头的表 + * + * @param + * @return + * @author LZN + * @date 2022/6/6 14:37 + */ +@Component("getPreserPingFangVation") +@Slf4j +public class GuardarDatosPingFangTask implements ITask { + + @Resource + private GuardarDatosFeignClient feignClient; + + @Override + public void run(String params) { + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = feignClient.getPreserPingFangVation(formDTO); + if (result.success()) { + log.debug("pingfang执行成功"); + } else { + log.debug("pingfang执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java new file mode 100644 index 0000000000..efed6268e3 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java @@ -0,0 +1,40 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 获取出租房的数据存入ca_开头的表 + * + * @param + * @return + * @author LZN + * @date 2022/6/6 14:38 + */ +@Component("getPreserRentalVation") +@Slf4j +public class GuardarDatosRentalTask implements ITask { + + @Autowired + private GuardarDatosFeignClient feignClient; + + @Override + public void run(String params) { + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = feignClient.getPreserRentalVation(formDTO); + if (result.success()) { + log.debug("Rental执行成功"); + }else{ + log.debug("Rental执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java new file mode 100644 index 0000000000..b52aff94f6 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java @@ -0,0 +1,41 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * 获取人口的数据存入ca_开头的表 + * + * @param + * @return + * @author LZN + * @date 2022/6/6 14:39 + */ +@Component("getPreserResidentVation") +@Slf4j +public class GuardarDatosResidentTask implements ITask { + + @Resource + private GuardarDatosFeignClient feignClient; + + @Override + public void run(String params) { + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = feignClient.getPreserResidentVation(formDTO); + if (result.success()) { + log.debug("Resident执行成功"); + } else { + log.debug("Resident执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java new file mode 100644 index 0000000000..b8414eaa56 --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java @@ -0,0 +1,40 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 获取流动人口的数据存入ca_开头的表 + * + * @param + * @return + * @author LZN + * @date 2022/6/6 14:39 + */ +@Component("getPreserRotatorsVation") +@Slf4j +public class GuardarDatosRotatorsTask implements ITask { + + @Autowired + private GuardarDatosFeignClient guardarDatosFeignClient; + + @Override + public void run(String params) { + PreserVationFormDTO formDTO = new PreserVationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, PreserVationFormDTO.class); + } + Result result = guardarDatosFeignClient.getPreserRotatorsVation(formDTO); + if (result.success()) { + log.debug("Rotators执行成功"); + } else { + log.debug("Rotators执行失败" + result.getMsg()); + } + } +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java new file mode 100644 index 0000000000..cc884d2a12 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java @@ -0,0 +1,26 @@ +package com.epmet.opendata.feign; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.impl.GuardarDatosFeignClientFallBack; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; + +@FeignClient(name = "open-data-worker-server",fallback = GuardarDatosFeignClientFallBack.class) +public interface GuardarDatosFeignClient { + + @PostMapping(value = "/opendata/caLoudong/preserLouDongVation") + Result getPreserLouDongVation(PreserVationFormDTO dto); + + @PostMapping(value = "/opendata/caPingfang/preserPingFangVation") + Result getPreserPingFangVation(PreserVationFormDTO dto); + + @PostMapping("/opendata/caRental/preserRentalVation") + Result getPreserRentalVation(PreserVationFormDTO dto); + + @PostMapping("/opendata/caResident/preserResidentVation") + Result getPreserResidentVation(PreserVationFormDTO dto); + + @PostMapping("/opendata/caRotators/preserRotatorsVation") + Result getPreserRotatorsVation(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java new file mode 100644 index 0000000000..9dc6f57393 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java @@ -0,0 +1,37 @@ +package com.epmet.opendata.feign.impl; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.feign.GuardarDatosFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class GuardarDatosFeignClientFallBack implements GuardarDatosFeignClient { + + @Override + public Result getPreserLouDongVation(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "getPreserLouDongVation", dto); + } + + @Override + public Result getPreserPingFangVation(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "getPreserPingFangVation", dto); + } + + @Override + public Result getPreserRentalVation(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "getPreserRentalVation", dto); + } + + @Override + public Result getPreserResidentVation(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "getPreserResidentVation", dto); + } + + @Override + public Result getPreserRotatorsVation(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "getPreserRotatorsVation", dto); + } +} From 88bb4aa5992d231c949586613ac2a653818978c9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 09:47:28 +0800 Subject: [PATCH 354/416] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E6=8E=92=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=BB=84=E7=BB=87=E3=80=81=E7=BD=91=E6=A0=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/DelAgencyGridIdResultDTO.java | 20 +++++++++++++++++++ .../epmet/feign/GovOrgOpenFeignClient.java | 9 ++++++++- .../GovOrgOpenFeignClientFallback.java | 5 +++++ .../controller/CustomerAgencyController.java | 9 +++++++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 2 ++ .../java/com/epmet/dao/CustomerGridDao.java | 2 ++ .../epmet/service/CustomerAgencyService.java | 6 ++++++ .../impl/CustomerAgencyServiceImpl.java | 16 +++++++++++++++ .../resources/mapper/CustomerAgencyDao.xml | 11 ++++++++++ .../main/resources/mapper/CustomerGridDao.xml | 11 ++++++++++ .../src/main/resources/mapper/IcHouseDao.xml | 9 ++++++--- .../com/epmet/dto/form/UserChartFormDTO.java | 4 ++++ .../java/com/epmet/dao/IcResiUserDao.java | 2 +- .../service/impl/IcResiUserServiceImpl.java | 13 +++++++++++- .../main/resources/mapper/IcResiUserDao.xml | 10 ++++++++++ 15 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelAgencyGridIdResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelAgencyGridIdResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelAgencyGridIdResultDTO.java new file mode 100644 index 0000000000..b11a7b6a00 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelAgencyGridIdResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + + +/** + * 无效组织、网格Id列表 + */ +@Data +public class DelAgencyGridIdResultDTO implements Serializable { + + //组织Id集合 + private List agencyIdList; + //网格Id集合 + private List gridIdList; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 7e21d51a83..9a116b84db 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -617,7 +617,6 @@ public interface GovOrgOpenFeignClient { /** * Desc: 房屋更新 - * @param tokenDTO * @param formDTO * @author zxc * @date 2022/5/11 09:46 @@ -632,4 +631,12 @@ public interface GovOrgOpenFeignClient { */ @GetMapping("/gov/org/customeragency/subOrgList/{agencyId}") Result> subOrgList(@PathVariable("agencyId")String agencyId); + + /** + * @Author sun + * @Description 获取当前组织及下级无效组织、网格Id列表 + **/ + @PostMapping(value = "/gov/org/customeragency/getDelAgencyGridIdList/{agencyId}") + Result getDelAgencyGridIdList(@PathVariable("agencyId") String agencyId); + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index adac11545a..7f4c559c61 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -414,4 +414,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result> subOrgList(String agencyId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList",agencyId); } + + @Override + public Result getDelAgencyGridIdList(String agencyId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getDelAgencyGridIdList", agencyId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 4cf6f529c3..9600c3e9ab 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -440,5 +440,14 @@ public class CustomerAgencyController { return new Result>().ok(list); } + /** + * @Author sun + * @Description 获取当前组织及下级无效组织、网格Id列表 + **/ + @GetMapping("getDelAgencyGridIdList/{agencyId}") + public Result getDelAgencyGridIdList(@PathVariable("agencyId") String agencyId) { + return new Result().ok(customerAgencyService.getDelAgencyGridIdList(agencyId)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index e6dd70dbd1..a63c7e0ff7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -342,5 +342,7 @@ public interface CustomerAgencyDao extends BaseDao { */ List getAddressTree(@Param("name") String name, @Param("customerId") String customerId); + + List getDelAgencyIdList(@Param("agencyId") String agencyId); } 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 3de988ec2c..737e579fa5 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 @@ -382,4 +382,6 @@ public interface CustomerGridDao extends BaseDao { * @return */ int updateTotalUser(@Param("gridId") String gridId, @Param("incrCount") long incrCount); + + List getDelGridIdList(@Param("agencyId") String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 15694bcc6d..f3ac3c7212 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -304,4 +304,10 @@ public interface CustomerAgencyService extends BaseService * @return com.epmet.commons.tools.utils.Result> */ Result> getOrgTreeByUserAndType(OrgTreeByUserAndTypeFormDTO formDto); + + /** + * @Author sun + * @Description 获取当前组织及下级无效组织、网格Id列表 + **/ + DelAgencyGridIdResultDTO getDelAgencyGridIdList(String agencyId); } 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 4dbf5a20bb..f21337742e 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 @@ -1526,4 +1526,20 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl agencyIdList = baseDao.getDelAgencyIdList(agencyId); + //查询当做组织及下级无效网格列表 + List gridIdList = customerGridDao.getDelGridIdList(agencyId); + resultDTO.setAgencyIdList(agencyIdList); + resultDTO.setGridIdList(gridIdList); + return resultDTO; + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 883f8b4d31..37169a21a4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -857,4 +857,15 @@ order by CREATED_TIME desc + + + 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 0f08fce996..e428bc42c6 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 @@ -846,6 +846,17 @@ ) + + + 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/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index e907804e12..feb192454c 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 @@ -347,9 +347,12 @@ AND neighbor_hood_id IN ( - select id from ic_neighbor_hood - where del_flag = '0' - and (agency_id = #{orgId} OR agency_pids LIKE CONCAT('%', #{orgId}, '%')) + select a.id from ic_neighbor_hood a + + inner join customer_agency b on a.agency_id = b.id and b.del_flag = '0' + inner join customer_grid c on a.grid_id = c.id and c.del_flag = '0' + where a.del_flag = '0' + and (a.agency_id = #{orgId} OR a.agency_pids LIKE CONCAT('%', #{orgId}, '%')) ) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java index 14675f3046..ff71263f95 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java @@ -29,5 +29,9 @@ public class UserChartFormDTO implements Serializable { //token这信息 private String customerId; private String userId; + //无效组织Id集合 + private List agencyIdList; + //无效网格Id集合 + private List gridIdList; } 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 3eb59cb1c4..4aba7d9699 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 @@ -306,7 +306,7 @@ public interface IcResiUserDao extends BaseDao { IcResiUserEntity selectResiNoDelFlag(@Param("icResiUserId") String icResiUserId); - List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType); + List userChart(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("agencyIdList") List agencyIdList, @Param("gridIdList") List gridIdList); /** * desc:根据维度获取居民信息表的数据[正常状态的居民] 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 eeb6ccc7a6..db12400875 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 @@ -1842,8 +1842,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getDelAgencyGridIdList(formDTO.getOrgId()); + if (!result.success()) { + throw new EpmetException(String.format("获取当前组织及下级已删除组织、网格列表失败,组织Id->%s", formDTO.getUserId())); + } + formDTO.setAgencyIdList(result.getData().getAgencyIdList()); + formDTO.setGridIdList(result.getData().getGridIdList()); + } + //2.根据入参值查询对应的房屋统计数据 - List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType()); + List list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType(), formDTO.getAgencyIdList(), formDTO.getGridIdList()); //3.汇总数据 AtomicInteger userTotal = new AtomicInteger(); list.forEach(l -> { 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 9843a33f63..5df7599a4a 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 @@ -952,6 +952,16 @@ AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) + + + #{agencyId} + + + + + #{gridId} + + AND grid_id = #{orgId} From 3f4110c7edb4e8f03a7fad2feea9da606ed36567 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 10:03:19 +0800 Subject: [PATCH 355/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=BB=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C=E7=AB=AF?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcEventDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/IcEventEntity.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java index fb86222967..2bccf515e9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -121,6 +121,11 @@ public class IcEventDTO implements Serializable { */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; + /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index db3fc54536..a8e83bcf7c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -121,6 +121,11 @@ public class IcEventEntity extends BaseEpmetEntity { */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; + /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ From 7022c4f73fcd1954f518d9b3e3cb6e1752bb1305 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Jun 2022 10:04:19 +0800 Subject: [PATCH 356/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E6=9C=89?= =?UTF-8?q?=E4=BA=86=E6=96=B0=E5=9B=9E=E5=A4=8D=EF=BC=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E7=BA=A2=E7=82=B9=E7=BD=AE=E4=B8=BA=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 1 + .../src/main/java/com/epmet/dto/IcEventDTO.java | 5 +++-- .../src/main/java/com/epmet/entity/IcEventEntity.java | 5 +++++ .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index add7341a75..d4bdb13bb2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -203,6 +203,7 @@ INNER JOIN screen_customer_dept org ON org.CUSTOMER_ID = u.CUSTOMER_ID AND org.DEPT_ID = u.ORG_ID AND org.DEL_FLAG = '0' + WHERE diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java index fb86222967..9d5d6c2f0c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -1,8 +1,9 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -182,7 +183,7 @@ approved:人工审核通过) private String createdBy; /** - * 展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示 + * 创建时间 */ private Date createdTime; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index db3fc54536..98677eaf19 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -121,6 +121,11 @@ public class IcEventEntity extends BaseEpmetEntity { */ private Integer redDot; + /** + * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 + */ + private Integer govRedDot; + /** * 最近一次操作时间(回复、立项、转需求、办结更新此列) */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5d1c2f9fbd..53b4b2f8e0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1426,7 +1426,10 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Tue, 7 Jun 2022 10:07:38 +0800 Subject: [PATCH 357/416] govRedDot --- .../src/main/java/com/epmet/entity/IcEventEntity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index 0d077b9d4c..a8e83bcf7c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -121,11 +121,6 @@ public class IcEventEntity extends BaseEpmetEntity { */ private Integer redDot; - /** - * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 - */ - private Integer govRedDot; - /** * 工作端的红点:展示1;不展示:0;【居民报事、回复更新为1】 */ From 7b83929a6cf8e3658a05afc25ae6672124765607 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Jun 2022 10:08:58 +0800 Subject: [PATCH 358/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E7=9A=84=E4=BA=8B=E4=BB=B6=EF=BC=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E9=BB=98=E8=AE=A4=E5=B1=95=E7=A4=BA=E7=BA=A2=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 53b4b2f8e0..b26263b97b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1270,6 +1270,8 @@ public class IcEventServiceImpl extends BaseServiceImpl attachmentEntityList = new ArrayList<>(); From f1bc05228cdb3492e9303f2f06abb6e8200d0c56 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Jun 2022 10:09:45 +0800 Subject: [PATCH 359/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E7=9A=84=E4=BA=8B=E4=BB=B6=EF=BC=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E9=BB=98=E8=AE=A4=E5=B1=95=E7=A4=BA=E7=BA=A2=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index b26263b97b..56a83fae27 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1267,6 +1267,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Tue, 7 Jun 2022 10:26:43 +0800 Subject: [PATCH 360/416] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E7=BA=A2=E7=82=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/IcEventListFormDTO.java | 4 +++- .../java/com/epmet/controller/IcEventController.java | 11 +++++++++++ .../main/java/com/epmet/service/IcEventService.java | 5 +++++ .../com/epmet/service/impl/IcEventServiceImpl.java | 7 +++++++ .../db/migration/V0.0.24__alter_ic_event.sql | 6 ++++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.24__alter_ic_event.sql diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index ad88c1ce36..7d8187c110 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -17,11 +17,13 @@ public class IcEventListFormDTO implements Serializable { public interface Detail extends CustomerClientShowGroup { } + public interface GovRedDot extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = Detail.class) + @NotBlank(message = "事件ID不能为空", groups = {Detail.class, GovRedDot.class}) private String icEventId; /** * 所属组织 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 8e65d4273d..ac46560dc7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -449,4 +449,15 @@ public class IcEventController { } } + /** + * @Author sun + * @Description 工作端事件红点消除 + **/ + @PostMapping("govRedDot") + public Result govRedDot(@RequestBody IcEventListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.GovRedDot.class); + icEventService.govRedDot(formDTO.getIcEventId()); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index d7b548aca9..2a3545fc9c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -215,4 +215,9 @@ public interface IcEventService extends BaseService { * @return */ MyReportIcEvResDTO myReportDetail(MyReportIcEvFormDTO formDTO); + + /** + * @Description 工作端事件红点消除 + **/ + void govRedDot(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 56a83fae27..7a43bf8e82 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1522,5 +1522,12 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Tue, 7 Jun 2022 10:29:15 +0800 Subject: [PATCH 361/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 3551554b67..57d2bb1817 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -14,6 +14,7 @@ import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; import com.epmet.service.org.HouseService; import com.epmet.service.stats.*; import com.epmet.service.user.IcResiUserService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -27,6 +28,7 @@ import java.util.*; * @since v1.0.0 2022-05-27 */ @Service +@Slf4j public class FactUserHouseServiceImpl implements FactUserHouseService { @Autowired @@ -192,6 +194,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { */ @Override public void statNeighborhood(FactUserHouseFormDTO formDTO) { + log.info("$$$进入业务逻辑"); if (StringUtils.isBlank(formDTO.getDateId())) { formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); } @@ -200,7 +203,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { // 先删除历史 factNeighborhoodUserHouseDailyService.deleteByDateId(formDTO); - + log.info("$$$删除历史完成"); // 保证小区是全部网格后,其余数据进行循环匹配 List neiList = houseService.neighborhoodStatNew(formDTO); List houseList = houseService.houseStatNew(formDTO); @@ -246,7 +249,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { } addList.add(dto); }); - + log.info("$$$addList:::::" + addList); List entityList = ConvertUtils.sourceToTarget(addList, FactNeighborhoodUserHouseDailyEntity.class); factNeighborhoodUserHouseDailyService.insertBatch(entityList); } From e708c508e976ae47253ce3e31e1327fd1b408daf Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Jun 2022 10:43:09 +0800 Subject: [PATCH 362/416] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E8=83=BD=E5=86=8D=E7=BB=91=E5=AE=9A=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E6=88=BF=E5=B1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/MyHomeServiceImpl.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index dc0c4e3ee4..8184dbcfae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -89,6 +89,16 @@ public class MyHomeServiceImpl implements MyHomeService { @Override @Transactional(rollbackFor = Exception.class) public void registerAndBind(RegisterAndBindFormDTO formDTO) { + + LambdaQueryWrapper userWrapper = new LambdaQueryWrapper<>(); + userWrapper.eq(IcResiUserEntity::getCustomerId, formDTO.getCustomerId()); + userWrapper.eq(IcResiUserEntity::getIdCard, formDTO.getIdCard()); + IcResiUserEntity icUser = icResiUserDao.selectOne(userWrapper); + + if (null != icUser && !icUser.getHomeId().equals(formDTO.getHomeId())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "已绑定其他房屋", "已绑定其他房屋"); + } + //进入网格(entergrid)流程 EnterGridFormDTO userInfoParams = new EnterGridFormDTO(); userInfoParams.setUserId(formDTO.getUserId()); @@ -140,11 +150,6 @@ public class MyHomeServiceImpl implements MyHomeService { userResiInfoService.saveResiInfo(userResiInfoDTO); } //2.添加ic_resi_user信息 - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(IcResiUserEntity::getCustomerId, formDTO.getCustomerId()); - wrapper.eq(IcResiUserEntity::getIdCard, formDTO.getIdCard()); - IcResiUserEntity icUser = icResiUserDao.selectOne(wrapper); - HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(formDTO.getCustomerId(), formDTO.getHomeId()); if (null == houseInfo) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); From 05ec87c4c6730599d76de4308ae6d422829c0b7b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 11:01:10 +0800 Subject: [PATCH 363/416] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/CustomerAgencyController.java | 2 +- .../com/epmet/service/impl/IcResiUserServiceImpl.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 9600c3e9ab..557a987c09 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -444,7 +444,7 @@ public class CustomerAgencyController { * @Author sun * @Description 获取当前组织及下级无效组织、网格Id列表 **/ - @GetMapping("getDelAgencyGridIdList/{agencyId}") + @PostMapping("getDelAgencyGridIdList/{agencyId}") public Result getDelAgencyGridIdList(@PathVariable("agencyId") String agencyId) { return new Result().ok(customerAgencyService.getDelAgencyGridIdList(agencyId)); } 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 db12400875..4b33bc5e71 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 @@ -1857,15 +1857,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl list = baseDao.userChart(formDTO.getOrgId(), formDTO.getOrgType(), formDTO.getAgencyIdList(), formDTO.getGridIdList()); //3.汇总数据 AtomicInteger userTotal = new AtomicInteger(); + AtomicInteger czUserTotal = new AtomicInteger(); + AtomicInteger ldUserTotal = new AtomicInteger(); list.forEach(l -> { userTotal.addAndGet(l.getNum()); if ("0".equals(l.getIsFloating())) { - resultDTO.setCzUserTotal(l.getNum()); + czUserTotal.addAndGet(l.getNum()); } else { - resultDTO.setLdUserTotal(l.getNum()); + ldUserTotal.addAndGet(l.getNum()); } }); resultDTO.setUserTotal(userTotal.get()); + resultDTO.setCzUserTotal(czUserTotal.get()); + resultDTO.setLdUserTotal(ldUserTotal.get()); resultDTO.setCzUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100))); resultDTO.setLdUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100))); resultDTO.setOrgId(formDTO.getOrgId()); From 88e98b41cf76dba45a434a5d745dead053660103 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 11:15:10 +0800 Subject: [PATCH 364/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E7=AD=9B=E9=80=89=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=9B=E4=B8=80=E6=88=B7=E4=B8=80=E7=A0=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/utils/HouseQRcodeUtils.java | 170 ++++++++++++++++++ .../com/epmet/controller/HouseController.java | 4 +- .../epmet/service/impl/HouseServiceImpl.java | 9 +- .../service/impl/IcResiUserServiceImpl.java | 1 + 4 files changed, 176 insertions(+), 8 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java new file mode 100644 index 0000000000..88faf497e3 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java @@ -0,0 +1,170 @@ +package com.epmet.commons.tools.utils; + + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.EncodeHintType; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.client.j2se.MatrixToImageConfig; +import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.common.CharacterSetECI; +import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import lombok.extern.slf4j.Slf4j; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; + +/** + * Date: 2022/06/7 10:01 + * Description:房屋一户一码生成工具类 + */ +@Slf4j +public class HouseQRcodeUtils { + /** + * 二维码颜色 默认是黑色 + */ + private static final Color QRCOLOR = Color.black; + /** + * 背景颜色 + */ + private static final Color BGWHITE = Color.white; + public static final int WIDTH = 800; + public static final int HEIGHT = 800; + public static final int MARGIN = 2; + public static final int FONTSIZE = 20; + + + + /** + * 房屋一户一码生成-指定像素 + * + * @param contents 说明 + * @return BufferedImage + * @throws Exception + */ + public static BufferedImage drawHouseQRImage(String pressText, String contents) throws Exception { + BufferedImage qRImage = null; + if (contents == null || "".equals(contents)) { + throw new Exception("content说明不能为空"); + } + // 二维码参数设置 + HashMap hints = new HashMap<>(); + hints.put(EncodeHintType.CHARACTER_SET, CharacterSetECI.UTF8); // 编码设置 + hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); // 安全等级,最高h + hints.put(EncodeHintType.MARGIN, MARGIN); // 设置margin=0-10 + + // 二维码图片的生成 + BarcodeFormat format = BarcodeFormat.QR_CODE; + // 创建矩阵容器 + BitMatrix matrix = null; + try { + matrix = new MultiFormatWriter().encode(contents, format, WIDTH, HEIGHT, hints); + } catch (WriterException e) { + log.error("method exception", e); + } + + // 设置矩阵转为图片的参数 + MatrixToImageConfig toImageConfig = new MatrixToImageConfig(QRCOLOR.getRGB(), BGWHITE.getRGB()); + + // 矩阵转换图像 + qRImage = MatrixToImageWriter.toBufferedImage(matrix, toImageConfig); + return pressHouseText(pressText, qRImage); + } + + /** + * @param pressText 二维码下方插入文字 + * @param image 需要添加文字的图片 + * @为图片添加文字 + */ + private static BufferedImage pressHouseText(String pressText, BufferedImage image) throws Exception { + + BufferedImage outImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); + //计算文字开始的位置 + //x开始的位置:(图片宽度-字体大小*字的个数)/2 + int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; + //y开始的位置:图片高度-(图片高度-图片宽度)/2 + int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; + + int imageW = outImage.getWidth(); + int imageH = outImage.getHeight(); + Graphics2D g = outImage.createGraphics(); + g.drawImage(image, 0, 0, imageW, imageH, null); + g.setColor(QRCOLOR); + g.setFont(new Font("Noto Sans SC Light", Font.BOLD, FONTSIZE)); + g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + g.setBackground(Color.white); +// 获取文字数量 按照字节展示 + int size = pressText.getBytes("GBK").length; +// 获取一行最多能容纳多少文字 按照文字字节展示 + int maxSize = (WIDTH / FONTSIZE - 2) * 2; + if (size > maxSize) { + int v = size % maxSize; + for (int a = 0; a < (size / maxSize); a++) { + String s = outStringByByte(pressText, maxSize); + g.drawString(s, (WIDTH - (FONTSIZE * (WIDTH / FONTSIZE - 2))) / 2, startY); + pressText = pressText.substring(s.length(), pressText.length()); + startY = startY + 35; + } + if (v != 0) { + g.drawString(pressText, (WIDTH - (FONTSIZE * v)) / 2, startY); + } + } else { + g.drawString(pressText, (WIDTH - ((pressText.getBytes("GBK").length) / 2) * FONTSIZE) / 2, startY); + } + + g.dispose(); + return outImage; + } + + + + /** + * 保存二维码图片到本地 + * + * @param contents + * @throws Exception + */ + public static void createImg(String pressText, String contents, String filename, String filePath) throws Exception { + BufferedImage qRImageWithLogo = drawHouseQRImage(pressText, contents); + // 写入返回 + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageIO.write(qRImageWithLogo, "jpg", baos); + //图片类型 + String imageType = "jpg"; + //生成二维码存放文件 + File file = new File(filePath + filename + ".jpg"); + if (!file.exists()) { + file.mkdirs(); + } + ImageIO.write(qRImageWithLogo, imageType, file); + baos.close(); + } + + + private static String outStringByByte(String str, int len) throws IOException { + byte[] btf = str.getBytes("GBK"); + int count = 0; + + for (int j = len - 1; j >= 0; j--) { + if (btf[j] < 0) { + count++; + } else { + break; + } + } + + if (count % 2 == 0) { + return new String(btf, 0, len, "GBK"); + } else { + return new String(btf, 0, len - 1, "GBK"); + } + } + +} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 6099d6e147..da6101ff99 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -39,9 +39,9 @@ import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.BarcodeUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.HouseQRcodeUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.poi.excel.handler.ExcelFillRowMergeStrategy; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; @@ -443,7 +443,7 @@ public class HouseController implements ResultDataResolver { } //url组成:小程序地址?房屋编码 String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); - BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); //BufferedImage 转 InputStream ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream); 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 62d25cad3e..f621c136dd 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 @@ -22,10 +22,7 @@ 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.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.BarcodeUtils; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.FileUtils; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.*; import com.epmet.constant.CustomerGridConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.*; @@ -832,7 +829,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { for (IcHouseListResultDTO house : houseList) { - BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), + BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode()); try { @@ -923,7 +920,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { //url组成:小程序地址?房屋编码 String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; - BufferedImage image = BarcodeUtils.drawQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); + BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); FileItem fileItem = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, FileUtils.getAndCreateDirUnderEpmetFilesDir("temp").toFile()) 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 873c90c39a..f00be57253 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 @@ -1872,6 +1872,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl lqw = new LambdaQueryWrapper<>(); lqw.eq(IcResiUserEntity::getCustomerId, customerId) .eq(IcResiUserEntity::getHomeId, houseId) + .eq(IcResiUserEntity::getSubStatus,"0") .select( IcResiUserEntity::getId, IcResiUserEntity::getHomeId, From 1c70f609af2bd57bc67bce13ac374cfedb494d23 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 13:54:20 +0800 Subject: [PATCH 365/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CaLoudongServiceImpl.java | 2 +- .../service/impl/CaPingfangServiceImpl.java | 2 +- .../service/impl/CaRentalServiceImpl.java | 2 +- .../service/impl/CaResidentServiceImpl.java | 18 +++++++++--------- .../service/impl/CaRotatorsServiceImpl.java | 18 +++++++++--------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 98a9dfaedd..1ef35b3c10 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -156,7 +156,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 03e4e0c592..08775ad1f9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -135,7 +135,7 @@ public class CaPingfangServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index 1f4974077f..a60a897e6c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -140,7 +140,7 @@ public class CaRentalServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 03fd1b3bef..d239145286 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -144,7 +144,7 @@ public class CaResidentServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } @@ -184,14 +184,14 @@ public class CaResidentServiceImpl extends BaseServiceImpl { - if (StringUtils.isNotBlank(item.getIdCard())) { - Result client = openFeignClient.getByResiIdCard(item.getIdCard()); - IcResiUserDTO clientData = client.getData(); - item.setIcResiUser(clientData.getId()); - item.setHomeId(clientData.getHomeId()); - } - }); +// returnDate.getList().forEach(item -> { +// if (StringUtils.isNotBlank(item.getIdCard())) { +// Result client = openFeignClient.getByResiIdCard(item.getIdCard()); +// IcResiUserDTO clientData = client.getData(); +// item.setIcResiUser(clientData.getId()); +// item.setHomeId(clientData.getHomeId()); +// } +// }); this.insertBatch(returnDate.getList()); return returnDate.getTotal(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java index a1bedc6f17..1b29d1c417 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -143,7 +143,7 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } @@ -184,14 +184,14 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl { - if (StringUtils.isNotBlank(item.getIdCard())) { - Result client = openFeignClient.getByResiIdCard(item.getIdCard()); - IcResiUserDTO clientData = client.getData(); - item.setIcResiUser(clientData.getId()); - item.setHomeId(clientData.getHomeId()); - } - }); +// returnDate.getList().forEach(item -> { +// if (StringUtils.isNotBlank(item.getIdCard())) { +// Result client = openFeignClient.getByResiIdCard(item.getIdCard()); +// IcResiUserDTO clientData = client.getData(); +// item.setIcResiUser(clientData.getId()); +// item.setHomeId(clientData.getHomeId()); +// } +// }); this.insertBatch(returnDate.getList()); return returnDate.getTotal(); From 853ca0f0f1fb981584df558f7fd9929c87da9c78 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 14:03:27 +0800 Subject: [PATCH 366/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E7=A0=81?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E8=B0=83=E6=95=B4=E4=B8=BA=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/HouseQrcodeEnum.java | 4 ++-- .../com/epmet/controller/HouseController.java | 12 +++++++++-- .../epmet/service/impl/HouseServiceImpl.java | 21 ++++++++++++++++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java index f448cce254..a188a82a3e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/HouseQrcodeEnum.java @@ -9,8 +9,8 @@ package com.epmet.commons.tools.enums; */ public enum HouseQrcodeEnum { - SUFFIX(".png", "二维码格式的后缀"), - PREFIX("https://epmet-dev.elinkservice.cn/cqrcode-ty/", "二维码地址的前缀"); + SUFFIX(".png", "二维码格式的后缀"); +// PREFIX("https://epmet-dev.elinkservice.cn/cqrcode-ty/", "二维码地址的前缀"); private String code; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index da6101ff99..d9884e4f92 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -32,7 +32,6 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.IcHouseFormDTO; -import com.epmet.commons.tools.enums.HouseQrcodeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.feign.ResultDataResolver; @@ -48,8 +47,10 @@ import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcHouseDao; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HouseService; @@ -97,6 +98,9 @@ public class HouseController implements ResultDataResolver { @Autowired private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired private IcHouseDao icHouseDao; @@ -442,7 +446,11 @@ public class HouseController implements ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); + Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); + if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + } + String url = dict.getData().get(0).getDictValue() + house.getHouseCode(); BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); //BufferedImage 转 InputStream ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); 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 f621c136dd..eb3d957f5b 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 @@ -22,7 +22,10 @@ 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.HouseInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.*; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.FileUtils; +import com.epmet.commons.tools.utils.HouseQRcodeUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.*; @@ -37,6 +40,7 @@ import com.epmet.enums.HouseChangeEnums; import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HouseRentFlagEnums; import com.epmet.enums.HouseTypeEnums; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OssFeignClient; @@ -122,6 +126,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { private IcHouseCodeInfoDao icHouseCodeInfoDao; @Autowired private OssFeignClient ossFeignClient; + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; @Override @@ -827,10 +833,15 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { List houseList = icHouseDao.searchHouseByPage(formDTO); + //获取一户一码前缀地址 + Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); + if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + } for (IcHouseListResultDTO house : houseList) { BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), - HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode()); + dict.getData().get(0).getDictValue() + house.getHouseCode()); try { byte[] buf = new byte[8192]; @@ -918,7 +929,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); + Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); + if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + } + String url = dict.getData().get(0).getDictValue() + house.getHouseCode(); String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); From 9ff372bb7d3a39ea6208c7eb5d5d67de7e0606bb Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 14:49:20 +0800 Subject: [PATCH 367/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= 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 f00be57253..1fc7662a7f 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 @@ -1872,7 +1872,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl lqw = new LambdaQueryWrapper<>(); lqw.eq(IcResiUserEntity::getCustomerId, customerId) .eq(IcResiUserEntity::getHomeId, houseId) - .eq(IcResiUserEntity::getSubStatus,"0") + .eq(IcResiUserEntity::getStatus,"0") .select( IcResiUserEntity::getId, IcResiUserEntity::getHomeId, From de9010d67652f313156f35f8447a9cd7bbd81449 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 15:14:57 +0800 Subject: [PATCH 368/416] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 eeb6ccc7a6..32c4aa9095 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 @@ -441,11 +441,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(IcResiUserEntity::getIdCard, map.get("ID_CARD")); + wrapper.ne(IcResiUserEntity::getId, map.get("ID")); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { String errorMsg = "修改居民信息失败,身份证号已存在!"; throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); } From 1ab1d8a0184963e4db956664f0ed2f004a52f324 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 15:28:49 +0800 Subject: [PATCH 369/416] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=AE=B6=E5=BA=AD?= =?UTF-8?q?=E6=88=90=E5=91=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 1fc7662a7f..5319171d16 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 @@ -2303,8 +2303,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl userWrapper = new LambdaQueryWrapper<>(); + userWrapper.ne(IcResiUserEntity::getId, dto.getIcResiUserId()); + userWrapper.eq(IcResiUserEntity::getIdCard, dto.getIdCard()); + userWrapper.eq(IcResiUserEntity::getCustomerId, user.getCustomerId()); + List userList = baseDao.selectList(userWrapper); + if (CollectionUtils.isNotEmpty(userList)) { String errorMsg = "修改居民信息失败,身份证号已存在!"; throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg); } From 7289344d5fb52030d660d845c20186cb930ec906 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 15:51:31 +0800 Subject: [PATCH 370/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 57d2bb1817..36f990d5f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -62,7 +62,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE)); } if (params.containsKey("level")) { - if("neighborhood".equals(params.get("level").toString())){ + if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){ page = factNeighborhoodUserHouseDailyService.page(params); }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { @@ -104,7 +104,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { public List list(Map params) { List list = new ArrayList<>(); if (params.containsKey("level")) { - if("neighborhood".equals(params.get("level").toString())){ + if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){ list = factNeighborhoodUserHouseDailyService.listExport(params); }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { list = factGridUserHouseDailyService.listExport(params); From e865e821ac42a90ad6ec8e8939d09997d0485c8e Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 15:51:31 +0800 Subject: [PATCH 371/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E7=A0=81?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=83=8F=E7=B4=A0=E5=8F=8A=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/utils/HouseQRcodeUtils.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java index 88faf497e3..45f93cb84f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java @@ -36,8 +36,8 @@ public class HouseQRcodeUtils { private static final Color BGWHITE = Color.white; public static final int WIDTH = 800; public static final int HEIGHT = 800; - public static final int MARGIN = 2; - public static final int FONTSIZE = 20; + public static final int MARGIN = 10; + public static final int FONTSIZE = 40; @@ -89,7 +89,8 @@ public class HouseQRcodeUtils { //x开始的位置:(图片宽度-字体大小*字的个数)/2 int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; //y开始的位置:图片高度-(图片高度-图片宽度)/2 - int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; +// int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; + int startY = 720; int imageW = outImage.getWidth(); int imageH = outImage.getHeight(); From 390c9a83b46f2c0cea8d2d632ca428bb2efbf724 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 16:04:20 +0800 Subject: [PATCH 372/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=BA=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CaLoudongDao.xml | 4 ++-- .../src/main/resources/mapper/CaPingfangDao.xml | 4 ++-- .../src/main/resources/mapper/CaRentalDao.xml | 6 +++--- .../src/main/resources/mapper/CaResidentDao.xml | 6 +++--- .../src/main/resources/mapper/CaRotatorsDao.xml | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index fac929e4d5..47b2954655 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -88,10 +88,10 @@ delete_flag = 'normal' - AND community_name = #{communityName} + AND community_name like '%${communityName}%' - AND building_name = #{buildingName} + AND building_name like '%${buildingName}%' diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml index 25e605a38c..9bf92f78ab 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -85,10 +85,10 @@ delete_flag = 'normal' - AND building_name = #{buildingName} + AND building_name like '%${buildingName}%' - AND community_name = #{communityName} + AND community_name like '%${communityName}%' diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml index 1238e6adcb..c7dda007dc 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml @@ -77,13 +77,13 @@ delete_flag = 'normal' - AND resident_name = #{residentName} + AND resident_name like '%${residentName}%' - AND house_name = #{houseName} + AND house_name like '%${houseName}%' - AND renter_name = #{renterName} + AND renter_name like '%${renterName}%' diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index 9c207100eb..33041e3a96 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -105,13 +105,13 @@ delete_flag = 'normal' - AND resident_name = #{residentName} + AND resident_name like '%${residentName}%' - AND id_card = #{idCard} + AND id_card like '%${idCard}%' - AND telephone = #{telephone} + AND telephone like '%${telephone}%' diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml index 46f954e3c2..d54fe39738 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -109,13 +109,13 @@ delete_flag = 'normal' - AND rotators_name = #{rotatorsName} + AND rotators_name like '%${rotatorsName}%' - AND id_card = #{idCard} + AND id_card like '%${idCard}%' - AND telephone = #{telephone} + AND telephone like '%${telephone}%' From 2749506ba07f3a15aa76cd8c1c65529e6898a8c2 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 16:13:06 +0800 Subject: [PATCH 373/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/stats/FactNeighborhoodUserHouseDailyDao.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml index 94a5b3af01..08a72a2197 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml @@ -66,6 +66,9 @@ AND g.CUSTOMER_ID = #{customerId} AND d.CUSTOMER_ID = #{customerId} + + AND d.NEIGHBOURHOODS_ID = #{agencyId} + AND d.GRID_ID = #{agencyId} @@ -106,7 +109,7 @@ AND d.CUSTOMER_ID = #{customerId} - AND d.GRID_ID = #{agencyId} + AND d.NEIGHBOURHOODS_ID = #{agencyId} AND d.DATE_ID = #{dateId} From a1b2b4928f0e0f609d76e30f92c2f395b83da154 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 16:29:12 +0800 Subject: [PATCH 374/416] =?UTF-8?q?=E5=AD=98=E5=82=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/task/GuardarDatosLouDongTask.java | 41 --------- .../epmet/task/GuardarDatosPingFangTask.java | 41 --------- .../epmet/task/GuardarDatosRentalTask.java | 40 -------- .../epmet/task/GuardarDatosResidentTask.java | 41 --------- ...otatorsTask.java => GuardarDatosTask.java} | 17 ++-- .../opendata/controller/CaTaskController.java | 33 +++++++ .../feign/GuardarDatosFeignClient.java | 16 +--- .../impl/GuardarDatosFeignClientFallBack.java | 24 +---- .../service/GuardarDatosTaskService.java | 16 ++++ .../impl/GuardarDatosTaskServiceImpl.java | 91 +++++++++++++++++++ 10 files changed, 153 insertions(+), 207 deletions(-) delete mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java delete mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java delete mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java delete mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java rename epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/{GuardarDatosRotatorsTask.java => GuardarDatosTask.java} (70%) create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java deleted file mode 100644 index 03ec5b5ad2..0000000000 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosLouDongTask.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.epmet.task; - -import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.feign.GuardarDatosFeignClient; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 获取楼栋的数据存入ca_开头的表 - * - * @param - * @return - * @author LZN - * @date 2022/6/6 14:37 - */ -@Slf4j -@Component("getPreserLouDongVation") -public class GuardarDatosLouDongTask implements ITask { - - @Autowired - private GuardarDatosFeignClient guardarDatosFeignClient; - - @Override - public void run(String params) { - log.info("LouDong定时任务执行,参数为:" + params); - PreserVationFormDTO formDTO = new PreserVationFormDTO(); - if (StringUtils.isNotBlank(params)) { - formDTO = JSON.parseObject(params, PreserVationFormDTO.class); - } - Result result = guardarDatosFeignClient.getPreserLouDongVation(formDTO); - if (result.success()){ - log.debug("LouDong执行成功"); - }else{ - log.debug("LouDong执行失败" + result.getMsg()); - } - } -} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java deleted file mode 100644 index 6f56f8e7ad..0000000000 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosPingFangTask.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.epmet.task; - -import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.feign.GuardarDatosFeignClient; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -/** - * 获取平房的数据存入ca_开头的表 - * - * @param - * @return - * @author LZN - * @date 2022/6/6 14:37 - */ -@Component("getPreserPingFangVation") -@Slf4j -public class GuardarDatosPingFangTask implements ITask { - - @Resource - private GuardarDatosFeignClient feignClient; - - @Override - public void run(String params) { - PreserVationFormDTO formDTO = new PreserVationFormDTO(); - if (StringUtils.isNotBlank(params)) { - formDTO = JSON.parseObject(params, PreserVationFormDTO.class); - } - Result result = feignClient.getPreserPingFangVation(formDTO); - if (result.success()) { - log.debug("pingfang执行成功"); - } else { - log.debug("pingfang执行失败" + result.getMsg()); - } - } -} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java deleted file mode 100644 index efed6268e3..0000000000 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRentalTask.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.epmet.task; - -import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.feign.GuardarDatosFeignClient; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 获取出租房的数据存入ca_开头的表 - * - * @param - * @return - * @author LZN - * @date 2022/6/6 14:38 - */ -@Component("getPreserRentalVation") -@Slf4j -public class GuardarDatosRentalTask implements ITask { - - @Autowired - private GuardarDatosFeignClient feignClient; - - @Override - public void run(String params) { - PreserVationFormDTO formDTO = new PreserVationFormDTO(); - if (StringUtils.isNotBlank(params)) { - formDTO = JSON.parseObject(params, PreserVationFormDTO.class); - } - Result result = feignClient.getPreserRentalVation(formDTO); - if (result.success()) { - log.debug("Rental执行成功"); - }else{ - log.debug("Rental执行失败" + result.getMsg()); - } - } -} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java deleted file mode 100644 index b52aff94f6..0000000000 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosResidentTask.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.epmet.task; - -import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.feign.GuardarDatosFeignClient; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -/** - * 获取人口的数据存入ca_开头的表 - * - * @param - * @return - * @author LZN - * @date 2022/6/6 14:39 - */ -@Component("getPreserResidentVation") -@Slf4j -public class GuardarDatosResidentTask implements ITask { - - @Resource - private GuardarDatosFeignClient feignClient; - - @Override - public void run(String params) { - PreserVationFormDTO formDTO = new PreserVationFormDTO(); - if (StringUtils.isNotBlank(params)) { - formDTO = JSON.parseObject(params, PreserVationFormDTO.class); - } - Result result = feignClient.getPreserResidentVation(formDTO); - if (result.success()) { - log.debug("Resident执行成功"); - } else { - log.debug("Resident执行失败" + result.getMsg()); - } - } -} diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java similarity index 70% rename from epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java rename to epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java index b8414eaa56..4a1376a5fd 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosRotatorsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/GuardarDatosTask.java @@ -6,22 +6,23 @@ import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.feign.GuardarDatosFeignClient; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.annotation.Resource; + /** * 获取流动人口的数据存入ca_开头的表 * * @param - * @return * @author LZN + * @return * @date 2022/6/6 14:39 */ -@Component("getPreserRotatorsVation") +@Component("guardarDatosTask") @Slf4j -public class GuardarDatosRotatorsTask implements ITask { +public class GuardarDatosTask implements ITask { - @Autowired + @Resource private GuardarDatosFeignClient guardarDatosFeignClient; @Override @@ -30,11 +31,11 @@ public class GuardarDatosRotatorsTask implements ITask { if (StringUtils.isNotBlank(params)) { formDTO = JSON.parseObject(params, PreserVationFormDTO.class); } - Result result = guardarDatosFeignClient.getPreserRotatorsVation(formDTO); + Result result = guardarDatosFeignClient.guardarDatosTask(formDTO); if (result.success()) { - log.debug("Rotators执行成功"); + log.debug("定时任务执行成功"); } else { - log.debug("Rotators执行失败" + result.getMsg()); + log.debug("定时任务执行失败" + result.getMsg()); } } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java new file mode 100644 index 0000000000..97c77cd539 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaTaskController.java @@ -0,0 +1,33 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.service.GuardarDatosTaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 定时任务 + * + * @param + * @author LZN + * @return + * @date 2022/6/7 15:54 + */ +@RestController +@RequestMapping("caTask") +public class CaTaskController { + + @Autowired + private GuardarDatosTaskService taskService; + + @PostMapping("guardarDatosTask") + public Result guardarDatosTask(@RequestBody PreserVationFormDTO dto) { + taskService.guardarDatosTask(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java index cc884d2a12..faac32189f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java @@ -9,18 +9,6 @@ import org.springframework.web.bind.annotation.PostMapping; @FeignClient(name = "open-data-worker-server",fallback = GuardarDatosFeignClientFallBack.class) public interface GuardarDatosFeignClient { - @PostMapping(value = "/opendata/caLoudong/preserLouDongVation") - Result getPreserLouDongVation(PreserVationFormDTO dto); - - @PostMapping(value = "/opendata/caPingfang/preserPingFangVation") - Result getPreserPingFangVation(PreserVationFormDTO dto); - - @PostMapping("/opendata/caRental/preserRentalVation") - Result getPreserRentalVation(PreserVationFormDTO dto); - - @PostMapping("/opendata/caResident/preserResidentVation") - Result getPreserResidentVation(PreserVationFormDTO dto); - - @PostMapping("/opendata/caRotators/preserRotatorsVation") - Result getPreserRotatorsVation(PreserVationFormDTO dto); + @PostMapping("/opendata/caTask/guardarDatosTask") + Result guardarDatosTask(PreserVationFormDTO dto); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java index 9dc6f57393..4a688e5ae5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java @@ -1,6 +1,5 @@ package com.epmet.opendata.feign.impl; -import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dto.form.PreserVationFormDTO; @@ -11,27 +10,8 @@ import org.springframework.stereotype.Component; public class GuardarDatosFeignClientFallBack implements GuardarDatosFeignClient { @Override - public Result getPreserLouDongVation(PreserVationFormDTO dto) { - return ModuleUtils.feignConError("open-data-worker", "getPreserLouDongVation", dto); + public Result guardarDatosTask(PreserVationFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "guardarDatosTask", dto); } - @Override - public Result getPreserPingFangVation(PreserVationFormDTO dto) { - return ModuleUtils.feignConError("open-data-worker", "getPreserPingFangVation", dto); - } - - @Override - public Result getPreserRentalVation(PreserVationFormDTO dto) { - return ModuleUtils.feignConError("open-data-worker", "getPreserRentalVation", dto); - } - - @Override - public Result getPreserResidentVation(PreserVationFormDTO dto) { - return ModuleUtils.feignConError("open-data-worker", "getPreserResidentVation", dto); - } - - @Override - public Result getPreserRotatorsVation(PreserVationFormDTO dto) { - return ModuleUtils.feignConError("open-data-worker", "getPreserRotatorsVation", dto); - } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java new file mode 100644 index 0000000000..fbd89caa2f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GuardarDatosTaskService.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.service; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; + +/** + * 定时任务 + * + * @param + * @author LZN + * @return + * @date 2022/6/7 15:54 + */ +public interface GuardarDatosTaskService { + + void guardarDatosTask(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java new file mode 100644 index 0000000000..54c5b0b231 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java @@ -0,0 +1,91 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.service.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { + + @Autowired + private CaLoudongService caLoudongService; + + @Autowired + private CaPingfangService pingfangService; + + @Autowired + private CaRentalService rentalService; + + @Autowired + private CaResidentService residentService; + + @Autowired + private CaRotatorsService rotatorsService; + + @Override + public void guardarDatosTask(PreserVationFormDTO dto) { + if (StringUtils.isBlank(dto.getTableName())) { + caLoudongService.preserLouDongVation(dto); + pingfangService.preserPingFangVation(dto); + rentalService.preserRentalVation(dto); + residentService.preserResidentVation(dto); + rotatorsService.preserRotatorsVation(dto); + } + TableName name = TableName.getTableByOutSide(dto.getTableName()); + if (null == name) { + throw new Error(); + } + + switch (name) { + case LD: + caLoudongService.preserLouDongVation(dto); + break; + case PF: + pingfangService.preserPingFangVation(dto); + break; + case RK: + residentService.preserResidentVation(dto); + break; + case CZF: + rentalService.preserRentalVation(dto); + break; + case LDRK: + rotatorsService.preserRotatorsVation(dto); + break; + } + } + + enum TableName { + LD("ca_loudong"), + PF("ca_pingfang"), + RK("ca_resident"), + LDRK("ca_rotators"), + CZF("ca_rental"); + + private String tableName; + + TableName(String tableOs) { + + this.tableName = tableOs; + } + + + public String getTableName() { + return tableName; + } + + static TableName getTableByOutSide(String outSideName) { + if (StringUtils.isNotBlank(outSideName)) { + TableName[] values = TableName.values(); + for (TableName value : values) { + if (value.getTableName().equals(outSideName)) { + return value; + } + } + } + return null; + } + } +} From 32f014afe2d7b27a77ce767cd70cf052014c008f Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 16:39:14 +0800 Subject: [PATCH 375/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=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/org/IcHouseDao.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml index de4b58c7f7..297d15dbd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml @@ -104,23 +104,21 @@ SELECT n.ID as NEIGHBOURHOODS_ID, n.NEIGHBOR_HOOD_NAME, - g.CUSTOMER_ID, + n.CUSTOMER_ID, g.id AS GRID_ID, g.PID, g.PIDS, 1 AS neighbourhoodsCount FROM ic_neighbor_hood n - LEFT JOIN customer_grid g ON n.GRID_ID = g.id + LEFT JOIN customer_grid g ON n.GRID_ID = g.id and g.DEL_FLAG = '0' AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY ) - AND n.DEL_FLAG = '0' - WHERE - g.DEL_FLAG = '0' + WHERE n.DEL_FLAG = '0' - AND g.CUSTOMER_ID = #{customerId} + AND n.CUSTOMER_ID = #{customerId} GROUP BY - g.CUSTOMER_ID; + n.CUSTOMER_ID,n.ID; From 5774bdf11a91673625cfe0b78c0ff2557c43a312 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 16:51:24 +0800 Subject: [PATCH 376/416] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=BC=96=E7=A0=81=E5=8F=8Aurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/HouseController.java | 6 ++++-- .../src/main/java/com/epmet/dao/IcHouseDao.java | 2 +- .../src/main/java/com/epmet/service/HouseService.java | 2 +- .../main/java/com/epmet/service/impl/HouseServiceImpl.java | 4 ++-- .../gov-org-server/src/main/resources/mapper/IcHouseDao.xml | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index d9884e4f92..edc1629219 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -485,6 +485,7 @@ public class HouseController implements ResultDataResolver { * @date 2022/5/31 17:58 * @params [loginUser, formDTO, response] */ + @NoRepeatSubmit @PostMapping(value = "/downloadZip") public void downloadZip(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO, HttpServletResponse response) throws Exception { //效验数据 @@ -517,9 +518,10 @@ public class HouseController implements ResultDataResolver { * @params [] * @return java.lang.String */ + @NoRepeatSubmit @PostMapping("createBatchHouseCodeAndUrl") - public Result createBatchHouseCodeAndUrl() { - return houseService.createBatchHouseCodeAndUrl( ); + public Result createBatchHouseCodeAndUrl(@LoginUser TokenDto loginUser) { + return houseService.createBatchHouseCodeAndUrl(loginUser); } 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 ac8a59be8c..138c892445 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 @@ -127,5 +127,5 @@ public interface IcHouseDao extends BaseDao { * @params [] * @return java.util.List */ - List selectBatchHouseCodeAndUrl(); + List selectBatchHouseCodeAndUrl(@Param("customerId") String customerId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 850817812c..5aa9ee6986 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -162,5 +162,5 @@ public interface HouseService { * @params [] * @return com.epmet.commons.tools.utils.Result */ - Result createBatchHouseCodeAndUrl(); + Result createBatchHouseCodeAndUrl(TokenDto loginUser); } 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 eb3d957f5b..20ad6c218a 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 @@ -983,8 +983,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override - public Result createBatchHouseCodeAndUrl() { - List houseList = icHouseDao.selectBatchHouseCodeAndUrl(); + public Result createBatchHouseCodeAndUrl(TokenDto loginUser) { + List houseList = icHouseDao.selectBatchHouseCodeAndUrl(loginUser.getCustomerId()); houseList.forEach(house->{ IcHouseEntity entity = icHouseDao.selectById(house.getHouseId()); if(StringUtils.isNotBlank(house.getAreaCode())){ 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 bb36540854..dba8738dab 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 @@ -411,7 +411,8 @@ left join ic_neighbor_hood n on h.NEIGHBOR_HOOD_ID=n.id left join customer_agency b ON n.agency_Id = b.ID where h.DEL_FLAG='0' - and(h.HOUSE_CODE is null or h.HOUSE_CODE = '') + and h.CUSTOMER_ID = #{customerId} + and(h.HOUSE_CODE is null or h.HOUSE_CODE = '') order by h.CREATED_TIME desc From 1c39a3ee5b3dded3795097a2ff4272970f493dbb Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 16:54:41 +0800 Subject: [PATCH 377/416] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/FactUserHouseServiceImpl.java | 6 +++--- .../mapper/stats/FactNeighborhoodUserHouseDailyDao.xml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java index 36f990d5f4..db20e4ccc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java @@ -212,14 +212,14 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { List addList = new ArrayList<>(); neiList.forEach(item -> { - String gridId = item.getGridId(); + String gridId = item.getGridId() == null ? "" : item.getGridId(); String neighborHoodsId = item.getNeighbourhoodsId(); FactUserHouseResultDTO dto = new FactUserHouseResultDTO(); dto.setCustomerId(formDTO.getCustomerId()); dto.setDateId(dateId); dto.setGridId(gridId); - dto.setPid(item.getPid()); - dto.setPids(item.getPids()); + dto.setPid(item.getPid() == null ? "" : item.getPid()); + dto.setPids(item.getPids() == null ? "" : item.getPids()); dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount()); dto.setNeighbourhoodsId(item.getNeighbourhoodsId()); dto.setNeighborHoodName(item.getNeighborHoodName()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml index 08a72a2197..4ff079453d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml @@ -72,9 +72,6 @@ AND d.GRID_ID = #{agencyId} - - AND d.PID = #{agencyId} - AND d.DATE_ID = #{dateId} From 2708d4f17d7be7dcdbdf355adf2e224a80195913 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 17:10:55 +0800 Subject: [PATCH 378/416] =?UTF-8?q?=E6=9B=B4=E6=96=B0flyway=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.2__add_id.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql new file mode 100644 index 0000000000..abd86f22d0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql @@ -0,0 +1,7 @@ +ALTER TABLE `epmet_open_data`.`ca_resident` +ADD COLUMN `home_id` varchar(64) NULL COMMENT 'homeId' AFTER `attribute10`, +ADD COLUMN `ic_resi_user` varchar(64) NULL COMMENT '对应的ic_resi_user主表Id' AFTER `home_id`; + +ALTER TABLE `epmet_open_data`.`ca_rotators` +ADD COLUMN `home_id` varchar(64) NULL COMMENT 'homeId' AFTER `attribute10`, +ADD COLUMN `ic_resi_user` varchar(64) NULL COMMENT '对应的ic_resi_user主表Id' AFTER `home_id`; From ed2bc686ddf16b66d13294a7068980e7c2c1c5d6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Jun 2022 17:22:20 +0800 Subject: [PATCH 379/416] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=88=BF=E5=B1=8Bbug?= =?UTF-8?q?=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/service/impl/MyHomeServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index 8184dbcfae..eba820dc92 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -115,12 +115,13 @@ public class MyHomeServiceImpl implements MyHomeService { if (CollectionUtils.isNotEmpty(roleList) && roleList.contains("registered_resi")) { //更新user_resi_info和user_base_info的信息 UserResiInfoEntity userResiInfo = new UserResiInfoEntity(); + userResiInfo.setUserId(formDTO.getUserId()); userResiInfo.setSurname(formDTO.getSurname()); userResiInfo.setName(formDTO.getName()); userResiInfo.setIdNum(formDTO.getIdCard()); userResiInfo.setRegMobile(formDTO.getMobile()); userResiInfo.setResiVisitId(formDTO.getVisitId()); - userResiInfo.setDistrict(formDTO.getAddress()); + userResiInfo.setStreet(formDTO.getAddress()); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(UserResiInfoEntity::getCustomerId, formDTO.getCustomerId()); @@ -141,10 +142,11 @@ public class MyHomeServiceImpl implements MyHomeService { userResiRegisterVisitDao.insert(visit); //注册居民 UserResiInfoDTO userResiInfoDTO = ConvertUtils.sourceToTarget(formDTO, UserResiInfoDTO.class); + userResiInfoDTO.setUserId(formDTO.getUserId()); userResiInfoDTO.setIdNum(formDTO.getIdCard()); userResiInfoDTO.setRegMobile(formDTO.getMobile()); userResiInfoDTO.setResiVisitId(visit.getId()); - userResiInfoDTO.setDistrict(formDTO.getAddress()); + userResiInfoDTO.setStreet(formDTO.getAddress()); userResiInfoDTO.setCustomerId(formDTO.getCustomerId()); userResiInfoDTO.setApp("resi"); userResiInfoService.saveResiInfo(userResiInfoDTO); From 607152ba0d6b2aaf081e4de6ce0468dfc48cbdec Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 7 Jun 2022 17:29:30 +0800 Subject: [PATCH 380/416] =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E7=A0=81?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=A0=BC=E5=BC=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/commons/tools/utils/HouseQRcodeUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java index 45f93cb84f..bb667af0c9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HouseQRcodeUtils.java @@ -90,7 +90,7 @@ public class HouseQRcodeUtils { int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; //y开始的位置:图片高度-(图片高度-图片宽度)/2 // int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; - int startY = 720; + int startY = 740; int imageW = outImage.getWidth(); int imageH = outImage.getHeight(); From d28f4a170d1d494c70391476b804922d6fb0aca4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Jun 2022 17:47:56 +0800 Subject: [PATCH 381/416] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=88=BF=E5=B1=8Bbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mine/service/impl/PersonalCenterServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java index a508fffe31..5c4788f7b7 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java @@ -28,11 +28,14 @@ public class PersonalCenterServiceImpl implements PersonalCenterService { @Override public InitInfoResultDTO initInfo(TokenDto tokenDto) { + InitInfoResultDTO resultDTO = new InitInfoResultDTO(); Result baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto); - if (!baseInfoResult.success() || null == baseInfoResult.getData()) { + if (!baseInfoResult.success()) { throw new RenException(baseInfoResult.getCode(), baseInfoResult.getMsg()); } - InitInfoResultDTO resultDTO = new InitInfoResultDTO(); + if (null == baseInfoResult.getData()) { + return resultDTO; + } resultDTO.setHeadImgUrl(baseInfoResult.getData().getHeadImgUrl()); resultDTO.setSurname(baseInfoResult.getData().getSurname()); resultDTO.setName(baseInfoResult.getData().getName()); From c70066224dbdfcab8c04c47a9fd43f7c5e68f761 Mon Sep 17 00:00:00 2001 From: YUJT Date: Tue, 7 Jun 2022 18:07:43 +0800 Subject: [PATCH 382/416] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E5=AD=97=E6=AE=B5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcResiUserConfirmServiceImpl.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 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 11da6a1409..ed2bd8e05d 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 @@ -5,6 +5,7 @@ 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.enums.GenderEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -57,8 +58,8 @@ public class IcResiUserConfirmServiceImpl 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); @@ -96,11 +97,11 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl getMemberDetail(IcResiUserConfirmGetDTO dto) { IcResiUserConfirmDTO result = icResiUserDao.selectMemberDetail(dto.getIcResiUserId()); + if (null != result && StringUtils.isBlank(result.getGender())) { + result.setGender(GenderEnum.UN_KNOWN.getCode()); + } return new Result().ok(result); } @@ -161,7 +165,7 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl Date: Tue, 7 Jun 2022 18:44:15 +0800 Subject: [PATCH 383/416] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=80=E6=88=B7?= =?UTF-8?q?=E4=B8=80=E7=A0=81=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=89=8D=E7=BC=80?= =?UTF-8?q?=E6=96=B9=E5=BC=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/IcHouseListFormDTO.java | 2 ++ .../dto/result/IcHouseQrcodeConfigDTO.java | 19 +++++++++++++++++++ .../com/epmet/controller/HouseController.java | 10 +++++----- .../main/java/com/epmet/dao/IcHouseDao.java | 9 +++++++++ .../epmet/service/impl/HouseServiceImpl.java | 16 ++++++++-------- .../src/main/resources/mapper/IcHouseDao.xml | 4 ++++ 6 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseQrcodeConfigDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java index cec2d19994..166511d55f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java @@ -79,4 +79,6 @@ public class IcHouseListFormDTO extends PageFormDTO { * 备注 */ private String remark; + + private String customerId; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseQrcodeConfigDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseQrcodeConfigDTO.java new file mode 100644 index 0000000000..d1b837b86f --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseQrcodeConfigDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-07 18:34 + **/ +@Data +public class IcHouseQrcodeConfigDTO implements Serializable { + + private String customerId; + + private String qrcodePre; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index edc1629219..e2cd44b8dd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -47,7 +47,6 @@ import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcHouseDao; -import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetAdminOpenFeignClient; @@ -446,11 +445,11 @@ public class HouseController implements ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); - if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + IcHouseQrcodeConfigDTO codePre = icHouseDao.selectByCustomerId(house.getCustomerId()); + if(null == codePre){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "请先维护二维码前缀信息", "请先维护二维码前缀信息"); } - String url = dict.getData().get(0).getDictValue() + house.getHouseCode(); + String url = codePre.getQrcodePre() + house.getHouseCode(); BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); //BufferedImage 转 InputStream ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); @@ -491,6 +490,7 @@ public class HouseController implements ResultDataResolver { //效验数据 LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败"); formDTO.setAgencyId(loginUserDetail.getAgencyId()); + formDTO.setCustomerId(loginUser.getCustomerId()); ValidatorUtils.validateEntity(formDTO); houseService.downloadZip(response, formDTO); } 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 138c892445..2c4511348b 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 @@ -128,4 +128,13 @@ public interface IcHouseDao extends BaseDao { * @return java.util.List */ List selectBatchHouseCodeAndUrl(@Param("customerId") String customerId); + + /** + * @describe: 通过客户id查询 + * @author wangtong + * @date 2022/6/7 18:36 + * @params [customerId] + * @return com.epmet.dto.result.IcHouseQrcodeConfigDTO + */ + IcHouseQrcodeConfigDTO selectByCustomerId(@Param("customerId") String 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 20ad6c218a..acc13729bd 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 @@ -834,14 +834,14 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { List houseList = icHouseDao.searchHouseByPage(formDTO); //获取一户一码前缀地址 - Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); - if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + IcHouseQrcodeConfigDTO codePre = icHouseDao.selectByCustomerId(formDTO.getCustomerId()); + if(null == codePre){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "请先维护二维码前缀信息", "请先维护二维码前缀信息"); } for (IcHouseListResultDTO house : houseList) { BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), - dict.getData().get(0).getDictValue() + house.getHouseCode()); + codePre.getQrcodePre() + house.getHouseCode()); try { byte[] buf = new byte[8192]; @@ -929,11 +929,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); } //url组成:小程序地址?房屋编码 - Result> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); - if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); + IcHouseQrcodeConfigDTO codePre = icHouseDao.selectByCustomerId(house.getCustomerId()); + if(null == codePre){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "请先维护二维码前缀信息", "请先维护二维码前缀信息"); } - String url = dict.getData().get(0).getDictValue() + house.getHouseCode(); + String url = codePre.getQrcodePre() + house.getHouseCode(); String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); 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 dba8738dab..504e3829a3 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 @@ -415,5 +415,9 @@ and(h.HOUSE_CODE is null or h.HOUSE_CODE = '') order by h.CREATED_TIME desc + From 40243292b76b6f26328b87d879da262cb7ba40e3 Mon Sep 17 00:00:00 2001 From: YUJT Date: Wed, 8 Jun 2022 10:07:45 +0800 Subject: [PATCH 384/416] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/{ => ca}/CaLoudongDTO.java | 2 +- .../opendata/dto/{ => ca}/CaPingfangDTO.java | 2 +- .../opendata/dto/{ => ca}/CaRentalDTO.java | 2 +- .../opendata/dto/{ => ca}/CaResidentDTO.java | 2 +- .../opendata/dto/{ => ca}/CaRotatorsDTO.java | 2 +- .../dto/constant/CaWghDataConstant.java | 24 +++++++++ .../controller/CaLoudongController.java | 2 +- .../controller/CaPingfangController.java | 2 +- .../controller/CaRentalController.java | 4 +- .../controller/CaResidentController.java | 4 +- .../controller/CaRotatorsController.java | 4 +- .../com/epmet/opendata/dao/CaLoudongDao.java | 3 +- .../opendata/service/CaLoudongService.java | 2 +- .../opendata/service/CaPingfangService.java | 2 +- .../opendata/service/CaRentalService.java | 2 +- .../opendata/service/CaResidentService.java | 2 +- .../opendata/service/CaRotatorsService.java | 2 +- .../service/impl/CaLoudongServiceImpl.java | 5 +- .../service/impl/CaPingfangServiceImpl.java | 4 +- .../service/impl/CaRentalServiceImpl.java | 30 +++--------- .../service/impl/CaResidentServiceImpl.java | 5 +- .../service/impl/CaRotatorsServiceImpl.java | 5 +- .../impl/GuardarDatosTaskServiceImpl.java | 49 +++---------------- .../main/resources/mapper/CaLoudongDao.xml | 2 +- 24 files changed, 58 insertions(+), 105 deletions(-) rename epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/{ => ca}/CaLoudongDTO.java (98%) rename epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/{ => ca}/CaPingfangDTO.java (98%) rename epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/{ => ca}/CaRentalDTO.java (98%) rename epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/{ => ca}/CaResidentDTO.java (99%) rename epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/{ => ca}/CaRotatorsDTO.java (99%) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaLoudongDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java similarity index 98% rename from epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaLoudongDTO.java rename to epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java index c85be257f5..09d3628f2a 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaLoudongDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaLoudongDTO.java @@ -1,4 +1,4 @@ -package com.epmet.opendata.dto; +package com.epmet.opendata.dto.ca; import java.io.Serializable; import java.util.Date; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaPingfangDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java similarity index 98% rename from epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaPingfangDTO.java rename to epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java index 62c36e7aac..39456014b9 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaPingfangDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaPingfangDTO.java @@ -1,4 +1,4 @@ -package com.epmet.opendata.dto; +package com.epmet.opendata.dto.ca; import java.io.Serializable; import java.util.Date; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRentalDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java similarity index 98% rename from epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRentalDTO.java rename to epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java index 8a01f45655..597b46c5ae 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRentalDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRentalDTO.java @@ -1,4 +1,4 @@ -package com.epmet.opendata.dto; +package com.epmet.opendata.dto.ca; import java.io.Serializable; import java.util.Date; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaResidentDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java similarity index 99% rename from epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaResidentDTO.java rename to epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java index b9e428f371..6b2e8c4c86 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaResidentDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentDTO.java @@ -1,4 +1,4 @@ -package com.epmet.opendata.dto; +package com.epmet.opendata.dto.ca; import java.io.Serializable; import java.util.Date; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRotatorsDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java similarity index 99% rename from epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRotatorsDTO.java rename to epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java index 26865b1a19..9bd29a4dea 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/CaRotatorsDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaRotatorsDTO.java @@ -1,4 +1,4 @@ -package com.epmet.opendata.dto; +package com.epmet.opendata.dto.ca; import java.io.Serializable; import java.util.Date; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java new file mode 100644 index 0000000000..42862e1b37 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java @@ -0,0 +1,24 @@ +package com.epmet.opendata.dto.constant; + +/*** + * 综治及网格化常量 + * @author work@yujt.net.cn + * @date 2022/6/8/0008 10:00 + */ +public interface CaWghDataConstant { + + + String AESKEY = "hriajrutnbghajsd"; + + String TABLESCHEMA_UNICOM = "unicom"; + + String UNICOM_PINGFANG = "ca_pingfang"; + + + String UNICOM_LOUDONG = "ca_loudong"; + String UNICOM_RESIDENT = "ca_resident"; + String UNICOM_ROTATORS = "ca_rotators"; + String UNICOM_RENTAL = "ca_rental"; + + String DATA_URL_UNICON = "http://120.221.72.83:9090/bridge/unicom/page"; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java index b23424bdf3..c349b17ae0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java @@ -11,7 +11,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.ca.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java index 6e07b6b855..3ef18ebada 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaPingfangController.java @@ -11,7 +11,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.ca.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java index 83147a20ef..ac31858960 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRentalController.java @@ -11,12 +11,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.CaRentalDTO; -import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.ca.CaRentalDTO; import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; import com.epmet.opendata.excel.CaRentalExcel; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java index 4ebd4138e7..ac27374d80 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -11,12 +11,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.CaResidentDTO; -import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.ca.CaResidentDTO; import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.excel.CaResidentExcel; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java index c38d3c23e5..8072b7fbb5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaRotatorsController.java @@ -11,12 +11,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.CaRotatorsDTO; -import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.ca.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO; import com.epmet.opendata.dto.result.CaRotatorsResultDTO; import com.epmet.opendata.excel.CaRotatorsExcel; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index c1b44056dd..6d3682d52f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -2,8 +2,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.VolunteerPolyListResultDTO; -import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.ca.CaLoudongDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java index f1e30c76e3..19a067ebe6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java @@ -3,7 +3,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.ca.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java index 360ae6cab2..26f6501df3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaPingfangService.java @@ -3,7 +3,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.ca.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java index ff4a59d1a4..ae1f631b54 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRentalService.java @@ -2,7 +2,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.ca.CaRentalDTO; import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java index e3bb6c6db9..0f1406b524 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -2,7 +2,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.ca.CaResidentDTO; import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java index ed39cecad7..f114134bf7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaRotatorsService.java @@ -2,7 +2,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.opendata.dto.CaRotatorsDTO; +import com.epmet.opendata.dto.ca.CaRotatorsDTO; import com.epmet.opendata.dto.form.CaRotatorsDetailsFormDTO; import com.epmet.opendata.dto.form.CaRotatorsFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 1ef35b3c10..d0ef055332 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.opendata.service.impl; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -12,7 +11,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaLoudongDao; -import com.epmet.opendata.dto.CaLoudongDTO; +import com.epmet.opendata.dto.ca.CaLoudongDTO; import com.epmet.opendata.dto.form.CaLoudongDetailsFormDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; @@ -24,13 +23,11 @@ import com.epmet.opendata.service.CaLoudongService; import com.epmet.opendata.util.AesUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.google.gson.JsonObject; 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.text.SimpleDateFormat; import java.util.*; /** diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 08775ad1f9..a807cd973e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -12,14 +12,12 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaPingfangDao; -import com.epmet.opendata.dto.CaPingfangDTO; +import com.epmet.opendata.dto.ca.CaPingfangDTO; import com.epmet.opendata.dto.form.CaPingFangDetailsFormDTO; import com.epmet.opendata.dto.form.CaPingfangFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO; import com.epmet.opendata.dto.result.CaPingfangResultDTO; -import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaPingfangEntity; import com.epmet.opendata.redis.CaPingfangRedis; import com.epmet.opendata.service.CaPingfangService; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index a60a897e6c..01f262fa0d 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -13,14 +13,13 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.CaRentalDao; -import com.epmet.opendata.dto.CaRentalDTO; +import com.epmet.opendata.dto.ca.CaRentalDTO; +import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.CaRentalDetailsFormDTO; import com.epmet.opendata.dto.form.CaRentalFormtDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaRentalDetailsResultDTO; import com.epmet.opendata.dto.result.CaRentalResultDTO; -import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaRentalEntity; import com.epmet.opendata.redis.CaRentalRedis; import com.epmet.opendata.service.CaRentalService; @@ -124,8 +123,8 @@ public class CaRentalServiceImpl extends BaseServiceImpl delete from ca_loudong - select * from ca_loudong where delete_flag = 'normal' - + select * from customer_org_parameter where CUSTOMER_ID = #{customerId} + and PARAMETER_KEY=#{preKey} + and DEL_FLAG='0' diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index f54d4d6a03..4b28ce6ac2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -1,6 +1,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.enums.HomeMemberOperationEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -42,6 +43,7 @@ public class MyHomeController { private IcResiUserService icResiUserService; + @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @PostMapping("memberList/{houseCode}") public Result> selectListHomeMember(@PathVariable("houseCode") String houseCode, @LoginUser TokenDto tokenDto) { return new Result().ok(myHomeService.selectListHomeMember(houseCode, tokenDto.getCustomerId())); From 1e67caa81f71a3190d93c7ca46bb8c530537b7ed Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 8 Jun 2022 14:20:44 +0800 Subject: [PATCH 391/416] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=BC=96=E7=A0=81=E5=8F=8Aurl=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/HouseController.java | 2 +- .../java/com/epmet/service/HouseService.java | 2 +- .../epmet/service/impl/HouseServiceImpl.java | 26 ++++++++++++------- .../V0.0.22__alter_customer_org_parameter.sql | 4 +++ 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index af59fdad95..bb960749f5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -550,7 +550,7 @@ public class HouseController implements ResultDataResolver { */ @PostMapping("createHouseQrcodeUrl") public String createHouseQrcodeUrl(@RequestBody TestFormDTO formDTO) throws Exception { - return houseService.createHouseQrcodeUrl(formDTO.getHouseId()); + return houseService.createHouseQrcodeUrl(formDTO.getHouseId(),null); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 5aa9ee6986..701f164790 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -144,7 +144,7 @@ public interface HouseService { * @params [houseId] * @return java.lang.String */ - String createHouseQrcodeUrl(String houseId) throws Exception; + String createHouseQrcodeUrl(String houseId,String houseCode) throws Exception; /** * @describe: 根据房屋编码获取信息 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 26baf12fdf..3887f57c1b 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 @@ -149,7 +149,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { IcHouseEntity entity = new IcHouseEntity(); entity.setId(icHouseDTO.getId()); try { - entity.setHouseQrcodeUrl(createHouseQrcodeUrl(icHouseDTO.getId())); + entity.setHouseQrcodeUrl(createHouseQrcodeUrl(icHouseDTO.getId(),null)); } catch (Exception e) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败","二维码生成失败"); } @@ -917,7 +917,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } @Override - public String createHouseQrcodeUrl(String houseId) throws Exception { + public String createHouseQrcodeUrl(String houseId,String houseCode) throws Exception { if (StringUtils.isBlank(houseId)) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "房屋id不可为空", "房屋id不可为空"); } @@ -930,7 +930,14 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if(null == codePre){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "请先维护二维码前缀信息", "请先维护二维码前缀信息"); } - String url = codePre.getParameterValue() + house.getHouseCode(); + //默认使用传参的houseCode,如果没有则使用数据库查询到的houseCode + String url = ""; + if(StringUtils.isBlank(houseCode)){ + url = codePre.getParameterValue() + house.getHouseCode(); + }else{ + url = codePre.getParameterValue() + houseCode; + } + String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); @@ -987,12 +994,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { if(StringUtils.isNotBlank(house.getAreaCode())){ String areaCode = numberAfterFillZero(house.getAreaCode(), NumConstant.TWELVE); entity.setHouseCode(createHouseCode(house.getCustomerId(),house.getBuildingId(),areaCode)); - } - try { - entity.setHouseQrcodeUrl(createHouseQrcodeUrl(house.getHouseId())); - } catch (Exception e) { - e.printStackTrace(); - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败:"+house.getHouseId(),"二维码生成失败:"+house.getHouseId()); + + try { + entity.setHouseQrcodeUrl(createHouseQrcodeUrl(house.getHouseId(),entity.getHouseCode())); + } catch (Exception e) { + e.printStackTrace(); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败:"+house.getHouseId(),"二维码生成失败:"+house.getHouseId()); + } } icHouseDao.updateById(entity); }); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql index b6487b7855..814fcf514a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql @@ -5,3 +5,7 @@ alter table customer_org_parameter modify column PARAMETER_VALUE varchar(256); INSERT INTO `epmet_gov_org`.`customer_org_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', '3fdd0380deff5b30f45376cdf995d1c1', 'house_qrcode_pre', '一户一码前缀', 'https://epmet-cloud.elinkservice.cn/cqrcode-wxls/', '', '0', 0, 'APP_USER', '2022-06-08 09:22:52', 'APP_USER', '2022-06-08 09:22:52'); INSERT INTO `epmet_gov_org`.`customer_org_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', '1530123370795233281', 'house_qrcode_pre', '一户一码前缀', 'https://epmet-cloud.elinkservice.cn/cqrcode-sjt/', '', '0', 0, 'APP_USER', '2022-06-08 09:22:52', 'APP_USER', '2022-06-08 09:22:52'); + +update `ic_house` + set HOUSE_CODE = null, + HOUSE_QRCODE_URL = null; From 6fc630b27f7d45bf656a45dfa3e38ab2d921adf1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Jun 2022 14:42:13 +0800 Subject: [PATCH 392/416] =?UTF-8?q?=E5=8F=8D=E9=A6=88=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IcServiceFeedbackResDTO.java | 64 +++++++++++++++++++ .../dto/result/IcServiceRecDetailRes.java | 9 +++ .../com/epmet/dao/IcServiceFeedbackDao.java | 9 ++- .../impl/IcServiceRecordServiceImpl.java | 2 +- .../resources/mapper/IcServiceFeedbackDao.xml | 48 ++++++++++++++ 5 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java new file mode 100644 index 0000000000..c5fa0c3cbf --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java @@ -0,0 +1,64 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 服务记录反馈 + */ +@Data +public class IcServiceFeedbackResDTO implements Serializable { + + /** + * 服务项目ID + */ + private String serviceProjectId; + + /** + * 服务目标 + */ + private String serviceGoal; + + /** + * 服务效果 + */ + private String serviceEffect; + + /** + * 服务人数 + */ + // private Integer servicePeopleNumber; + + /** + * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect + */ + private String satisfaction; + + /** + * 地址经度 + */ + private String longitude; + + /** + * 地址纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + private List attachmentList; + + @Data + public static class Attachment { + private String attachmentName; + private String attachmentFormat; + private String attachmentType; + private String attachmentUrl; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java index d5243ff89a..d1ef78ab5f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java @@ -78,4 +78,13 @@ public class IcServiceRecDetailRes implements Serializable { */ private List serviceScope; + /** + * 服务人数 + */ + private Integer servicePeopleNumber; + + /** + * 反馈详情 + */ + private IcServiceFeedbackResDTO feedBack; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java index 677e73b731..4e0e660571 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcServiceFeedbackResDTO; import com.epmet.entity.IcServiceFeedbackEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @@ -12,5 +16,8 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcServiceFeedbackDao extends BaseDao { - + + IcServiceFeedbackResDTO selectByRecId(@Param("serviceRecordId") String serviceRecordId); + + List getAttachmentList(String serviceProjectId); } \ 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 49d54329a2..85766e1002 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 @@ -1,6 +1,5 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.enums.DictTypeEnum; @@ -100,6 +99,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + \ No newline at end of file From 7c1d6e8b395d620b4f182bee2bf5df67c53f621d Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 8 Jun 2022 14:44:03 +0800 Subject: [PATCH 393/416] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=BE=85=E5=8A=A9=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.22__alter_customer_org_parameter.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql index 814fcf514a..40b17e3ae3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.22__alter_customer_org_parameter.sql @@ -9,3 +9,7 @@ INSERT INTO `epmet_gov_org`.`customer_org_parameter`(`ID`, `CUSTOMER_ID`, `PARAM update `ic_house` set HOUSE_CODE = null, HOUSE_QRCODE_URL = null; + +delete + FROM `ic_house_code_info` + where 1=1; From a3e2c8c2a05bf73bc43d33dcc1997a3827ae3b75 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 8 Jun 2022 14:45:12 +0800 Subject: [PATCH 394/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9flyway=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.2__add_id.sql | 7 - ...0.0.2__create_resident_rotators_tables.sql | 135 ++++++++++++++++++ .../db/migration/V0.0.3__create_table.sql | 135 ------------------ 3 files changed, 135 insertions(+), 142 deletions(-) delete mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql deleted file mode 100644 index abd86f22d0..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__add_id.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `epmet_open_data`.`ca_resident` -ADD COLUMN `home_id` varchar(64) NULL COMMENT 'homeId' AFTER `attribute10`, -ADD COLUMN `ic_resi_user` varchar(64) NULL COMMENT '对应的ic_resi_user主表Id' AFTER `home_id`; - -ALTER TABLE `epmet_open_data`.`ca_rotators` -ADD COLUMN `home_id` varchar(64) NULL COMMENT 'homeId' AFTER `attribute10`, -ADD COLUMN `ic_resi_user` varchar(64) NULL COMMENT '对应的ic_resi_user主表Id' AFTER `home_id`; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql new file mode 100644 index 0000000000..e56a702e99 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.2__create_resident_rotators_tables.sql @@ -0,0 +1,135 @@ +CREATE TABLE `ca_resident` ( + `resident_id` bigint(20) DEFAULT NULL COMMENT '人口ID', + `grid_id` bigint(20) DEFAULT NULL COMMENT '网格ID', + `resident_property` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '人口性质', + `resident_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '居民分类', + `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', + `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码(公民身份证号)', + `resident_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', + `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', + `birthday` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '出生日期', + `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', + `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', + `household_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍省', + `household_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍市', + `household_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍县(区)', + `household_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍镇街', + `household_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍社区/村', + `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍详址', + `curlive_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住省', + `curlive_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住市', + `curlive_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住县(区)', + `curlive_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住镇街', + `curlive_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住社区/村', + `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住详址', + `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', + `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', + `native_address_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', + `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', + `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', + `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', + `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT '' COMMENT '职业类别', + `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', + `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', + `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', + `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', + `conversion_state` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '有无皈依(已受洗)', + `nationality` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '国籍', + `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(50) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', + `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段6', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', + `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', + `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', + KEY `IDX_ID_CARD` (`id_card`) USING BTREE, + KEY `IDX_RESIDENT_ID` (`resident_id`) USING BTREE, + KEY `IDX_GRID_ID` (`grid_id`) USING BTREE, + KEY `IDX_DELETE_FLAG` (`delete_flag`) USING BTREE, + KEY `IDX_RESIDENT_NAME` (`resident_name`) USING BTREE, + KEY `IDX_BIRTHDAY` (`grid_id`,`birthday`) USING BTREE, + KEY `inx_gridDelete` (`grid_id`,`delete_flag`) USING BTREE, + KEY `IDX_UPDATE_DATE` (`update_date`,`create_date`) USING BTREE, + KEY `idx_resident_property` (`resident_property`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='人口基本信息表'; + +CREATE TABLE `ca_rotators` ( + `rotators_id` bigint(20) DEFAULT NULL COMMENT '主键id', + `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '公民身份证号', + `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', + `rotators_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', + `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', + `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', + `birthday` datetime DEFAULT NULL COMMENT '出生日期', + `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', + `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', + `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', + `native_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', + `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', + `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', + `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', + `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', + `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业类别', + `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', + `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', + `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', + `household_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地省', + `household_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地市', + `household_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地县(区)', + `household_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地镇街', + `household_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地社区/村', + `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍门(楼)详址', + `curlive_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地省', + `curlive_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地市', + `curlive_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地县(区)', + `curlive_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地镇街', + `curlive_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地社区/村', + `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住门(楼)详址', + `inflow_reason` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '流入原因', + `certificate_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '办证类型', + `certificate_number` varchar(30) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码', + `sign_date` datetime DEFAULT NULL COMMENT '登记日期', + `end_date` datetime DEFAULT NULL COMMENT '证件到期日期', + `residence_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '住所类型', + `is_focus_person` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '是否重点关注人员', + `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', + `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', + `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除标识(正常的数据存:normal,逻辑删除的标识为:delete)', + `platcode` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源编码', + `grid_id` bigint(20) DEFAULT NULL COMMENT '网格id', + `versions` int(11) DEFAULT '1' COMMENT '乐观锁', + `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '是否注销', + `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '注销原因', + `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL, + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL, + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT '', + `attribute6` bigint(20) DEFAULT NULL, + `attribute7` bigint(20) DEFAULT NULL, + `attribute8` bigint(20) DEFAULT NULL, + `attribute9` datetime DEFAULT NULL, + `attribute10` datetime DEFAULT NULL, + `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', + `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', + KEY `idx_rotators_id` (`rotators_id`) USING BTREE, + KEY `idx_id_card` (`id_card`) USING BTREE, + KEY `idx_rotators_name` (`rotators_name`) USING BTREE, + KEY `idx_telephone` (`telephone`) USING BTREE, + KEY `IDX_UPDATE_DATE` (`update_date`) USING BTREE, + KEY `idx_rotators_create_date` (`create_date`) USING BTREE, + KEY `idx_data` (`update_date`,`create_date`) USING BTREE, + KEY `idx_platcode` (`platcode`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='流动人口表'; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql index ad52a5bc32..7093472799 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.3__create_table.sql @@ -139,138 +139,3 @@ CREATE TABLE `ca_rental` ( `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='出租房信息表'; -CREATE TABLE `ca_resident` ( - `resident_id` bigint(20) DEFAULT NULL COMMENT '人口ID', - `grid_id` bigint(20) DEFAULT NULL COMMENT '网格ID', - `resident_property` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '人口性质', - `resident_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '居民分类', - `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', - `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码(公民身份证号)', - `resident_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', - `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', - `birthday` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '出生日期', - `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', - `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', - `household_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍省', - `household_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍市', - `household_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍县(区)', - `household_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍镇街', - `household_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍社区/村', - `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍详址', - `curlive_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住省', - `curlive_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住市', - `curlive_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住县(区)', - `curlive_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住镇街', - `curlive_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住社区/村', - `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住详址', - `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', - `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', - `native_address_county` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', - `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', - `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', - `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', - `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT '' COMMENT '职业类别', - `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', - `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', - `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', - `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', - `conversion_state` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '有无皈依(已受洗)', - `nationality` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '国籍', - `plat_code` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', - `create_date` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', - `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', - `delete_flag` varchar(50) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除状态', - `versions` int(11) DEFAULT '1' COMMENT '乐观锁', - `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段1', - `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段2', - `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段3', - `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段4', - `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段5', - `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段6', - `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段7', - `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段8', - `attribute9` datetime DEFAULT NULL COMMENT '扩展字段9', - `attribute10` datetime DEFAULT NULL COMMENT '扩展字段10', - `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', - `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', - KEY `IDX_ID_CARD` (`id_card`) USING BTREE, - KEY `IDX_RESIDENT_ID` (`resident_id`) USING BTREE, - KEY `IDX_GRID_ID` (`grid_id`) USING BTREE, - KEY `IDX_DELETE_FLAG` (`delete_flag`) USING BTREE, - KEY `IDX_RESIDENT_NAME` (`resident_name`) USING BTREE, - KEY `IDX_BIRTHDAY` (`grid_id`,`birthday`) USING BTREE, - KEY `inx_gridDelete` (`grid_id`,`delete_flag`) USING BTREE, - KEY `IDX_UPDATE_DATE` (`update_date`,`create_date`) USING BTREE, - KEY `idx_resident_property` (`resident_property`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='人口基本信息表'; - -CREATE TABLE `ca_rotators` ( - `rotators_id` bigint(20) DEFAULT NULL COMMENT '主键id', - `id_card` varchar(18) COLLATE utf8_bin DEFAULT NULL COMMENT '公民身份证号', - `id_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '证件类型', - `rotators_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名', - `former_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '曾用名', - `sex` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '性别', - `birthday` datetime DEFAULT NULL COMMENT '出生日期', - `nation` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '民族', - `native_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯省', - `native_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯市', - `native_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '籍贯县(区)', - `marriage_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '婚姻状况', - `party` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '政治面貌', - `education` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '学历', - `religious` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '宗教信仰', - `occupation_type` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业类别', - `occupation` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '职业', - `service_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '服务处所', - `telephone` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '联系方式', - `household_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地省', - `household_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地市', - `household_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地县(区)', - `household_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地镇街', - `household_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍地社区/村', - `household_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '户籍门(楼)详址', - `curlive_address_prov` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地省', - `curlive_address_city` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地市', - `curlive_address_country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地县(区)', - `curlive_address_town` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地镇街', - `curlive_address_village` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '现住地社区/村', - `curlive_address_detail` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '现住门(楼)详址', - `inflow_reason` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '流入原因', - `certificate_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '办证类型', - `certificate_number` varchar(30) COLLATE utf8_bin DEFAULT NULL COMMENT '证件号码', - `sign_date` datetime DEFAULT NULL COMMENT '登记日期', - `end_date` datetime DEFAULT NULL COMMENT '证件到期日期', - `residence_type` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '住所类型', - `is_focus_person` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '是否重点关注人员', - `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', - `create_date` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '最后修改人', - `update_date` datetime DEFAULT NULL COMMENT '最后修改时间', - `delete_flag` varchar(10) COLLATE utf8_bin DEFAULT 'normal' COMMENT '删除标识(正常的数据存:normal,逻辑删除的标识为:delete)', - `platcode` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '数据来源编码', - `grid_id` bigint(20) DEFAULT NULL COMMENT '网格id', - `versions` int(11) DEFAULT '1' COMMENT '乐观锁', - `attribute1` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '是否注销', - `attribute2` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '注销原因', - `attribute3` varchar(240) COLLATE utf8_bin DEFAULT NULL, - `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL, - `attribute5` varchar(240) COLLATE utf8_bin DEFAULT '', - `attribute6` bigint(20) DEFAULT NULL, - `attribute7` bigint(20) DEFAULT NULL, - `attribute8` bigint(20) DEFAULT NULL, - `attribute9` datetime DEFAULT NULL, - `attribute10` datetime DEFAULT NULL, - `home_id` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'homeId', - `ic_resi_user` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '对应的ic_resi_user主表Id', - KEY `idx_rotators_id` (`rotators_id`) USING BTREE, - KEY `idx_id_card` (`id_card`) USING BTREE, - KEY `idx_rotators_name` (`rotators_name`) USING BTREE, - KEY `idx_telephone` (`telephone`) USING BTREE, - KEY `IDX_UPDATE_DATE` (`update_date`) USING BTREE, - KEY `idx_rotators_create_date` (`create_date`) USING BTREE, - KEY `idx_data` (`update_date`,`create_date`) USING BTREE, - KEY `idx_platcode` (`platcode`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='流动人口表'; \ No newline at end of file From 9f3f9b12714b7e295f66a565ae0fdd497eb30c47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Jun 2022 15:18:21 +0800 Subject: [PATCH 395/416] =?UTF-8?q?=E5=8F=8D=E9=A6=88=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/IcServiceFeedbackResDTO.java | 4 ++-- .../java/com/epmet/dao/IcServiceFeedbackDao.java | 12 +++++++++++- .../main/resources/mapper/IcServiceFeedbackDao.xml | 10 +++++----- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java index c5fa0c3cbf..394b5b6b40 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java @@ -12,9 +12,9 @@ import java.util.List; public class IcServiceFeedbackResDTO implements Serializable { /** - * 服务项目ID + * 反馈记录id */ - private String serviceProjectId; + private String feedBackId; /** * 服务目标 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java index 4e0e660571..301a261fb1 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java @@ -17,7 +17,17 @@ import java.util.List; @Mapper public interface IcServiceFeedbackDao extends BaseDao { + /** + * 根据服务记录id,查询反馈记录 + * @param serviceRecordId + * @return + */ IcServiceFeedbackResDTO selectByRecId(@Param("serviceRecordId") String serviceRecordId); - List getAttachmentList(String serviceProjectId); + /** + * 根据服务反馈id,查询附件列表 + * @param feedBackId + * @return + */ + List getAttachmentList(String feedBackId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml index 6592e2d11c..2f58637231 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml @@ -31,8 +31,8 @@ - - + @@ -50,12 +50,12 @@ f.LATITUDE, f.LONGITUDE, f.address, - f.SERVICE_PROJECT_ID + f.id as feedBackId FROM ic_service_feedback f WHERE f.DEL_FLAG = '0' - and f.SERVICE_RECORD_ID=#{serviceRecordId} + and f.SERVICE_RECORD_ID = #{serviceRecordId} From d73a87d40ac09e447405d24c65c3fde5b367b311 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Jun 2022 15:20:12 +0800 Subject: [PATCH 396/416] =?UTF-8?q?=E5=8F=8D=E9=A6=88=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E8=A1=A8=E5=AD=98=E5=82=A8=E5=8F=8D=E9=A6=88=E8=AE=B0=E5=BD=95?= =?UTF-8?q?id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcServiceRecordServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 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 85766e1002..214b762cfc 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 @@ -312,7 +312,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl Date: Wed, 8 Jun 2022 16:25:21 +0800 Subject: [PATCH 397/416] =?UTF-8?q?=E5=8D=95=E7=8B=AC=E5=88=86=E5=87=BA?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/UserHouseScopeResultDTO.java | 20 +++++ .../controller/UserHouseScopeController.java | 32 ++++++++ .../epmet/service/UserHouseScopeService.java | 7 ++ .../impl/UserHouseScopeServiceImpl.java | 79 +++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UserHouseScopeResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/UserHouseScopeController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/UserHouseScopeService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/UserHouseScopeServiceImpl.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UserHouseScopeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UserHouseScopeResultDTO.java new file mode 100644 index 0000000000..b36cace1e1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UserHouseScopeResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class UserHouseScopeResultDTO { + + private String objectId; + private String objectName; + private String objectType; + + private List children; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/UserHouseScopeController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/UserHouseScopeController.java new file mode 100644 index 0000000000..3a5e67704f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/UserHouseScopeController.java @@ -0,0 +1,32 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.UserHouseScopeResultDTO; +import com.epmet.service.UserHouseScopeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务项目 + */ +@RestController +@RequestMapping("userhouse") +public class UserHouseScopeController { + + @Autowired + public UserHouseScopeService userHouseScopeService; + + + /** + * 服务范围树查询 + * @return + */ + @RequestMapping("service/serviceScopeTree") + public Result getServiceScopeTree(@LoginUser TokenDto loginInfo) { + UserHouseScopeResultDTO r = userHouseScopeService.getServiceScopeTree(loginInfo.getUserId()); + return new Result().ok(r); + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/UserHouseScopeService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/UserHouseScopeService.java new file mode 100644 index 0000000000..31fb3be5b8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/UserHouseScopeService.java @@ -0,0 +1,7 @@ +package com.epmet.service; + +import com.epmet.dto.result.UserHouseScopeResultDTO; + +public interface UserHouseScopeService { + UserHouseScopeResultDTO getServiceScopeTree(String staffId); +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/UserHouseScopeServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/UserHouseScopeServiceImpl.java new file mode 100644 index 0000000000..8ccaa5a32a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/UserHouseScopeServiceImpl.java @@ -0,0 +1,79 @@ +package com.epmet.service.impl; + +import com.epmet.dao.IcNeighborHoodDao; +import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.dto.result.AgencyTreeResultDTO; +import com.epmet.dto.result.UserHouseScopeResultDTO; +import com.epmet.service.CustomerAgencyService; +import com.epmet.service.UserHouseScopeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class UserHouseScopeServiceImpl implements UserHouseScopeService { + + @Autowired + private IcNeighborHoodDao neighborHoodDao; + + @Autowired + private CustomerAgencyService customerAgencyService; + + public UserHouseScopeServiceImpl() { + System.out.println(6); + } + + @Override + public UserHouseScopeResultDTO getServiceScopeTree(String staffId) { + AgencyTreeResultDTO orgTreeData = customerAgencyService.getOrgTreeData(staffId); + + UserHouseScopeResultDTO rootScope = new UserHouseScopeResultDTO(); + rootScope.setObjectId(orgTreeData.getAgencyId()); + rootScope.setObjectType(orgTreeData.getLevel()); + rootScope.setObjectName(orgTreeData.getAgencyName()); + rootScope.setChildren(convert2ServiceProjectScope(orgTreeData.getSubAgencyList())); + + return rootScope; + } + + private List convert2ServiceProjectScope(List oldChildren) { + + ArrayList scopes = new ArrayList<>(); + + for (AgencyTreeResultDTO oldChild : oldChildren) { + UserHouseScopeResultDTO scope = new UserHouseScopeResultDTO(); + scope.setObjectId(oldChild.getAgencyId()); + scope.setObjectType(oldChild.getLevel()); + scope.setObjectName(oldChild.getAgencyName()); + if ("grid".equals(oldChild.getLevel())) { + // 如果是网格,那么还要查询网格下的小区 + List neighborhoods = neighborHoodDao.selectNeighborList(oldChild.getAgencyId()); + + List neighborhoodScopes = neighborhoods.stream().map(n -> new UserHouseScopeResultDTO(n.getId(), + n.getNeighborHoodName(), + "neighborhood", + null)).collect(Collectors.toList()); + + scope.setChildren(neighborhoodScopes); + } else { + // 递归处理子级 + List subAgencyList = oldChild.getSubAgencyList(); + if (subAgencyList != null && !CollectionUtils.isEmpty(subAgencyList)) { + List subOrgScope = convert2ServiceProjectScope(subAgencyList); + scope.setChildren(subOrgScope); + } + } + + scopes.add(scope); + } + + return scopes; + } + +} From b8f6e82ca07cbe2b6d1580c54fde3a9b705d81ab Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 8 Jun 2022 16:27:22 +0800 Subject: [PATCH 398/416] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=88=BF=E5=B1=8Bbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/UserResiInfoDTO.java | 2 ++ .../src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java | 1 + 2 files changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java index d8b5c10495..9ebc12d681 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java @@ -142,5 +142,7 @@ public class UserResiInfoDTO implements Serializable { */ private String mobileCode; + private String nickname; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index eba820dc92..b167e98c14 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -129,6 +129,7 @@ public class MyHomeServiceImpl implements MyHomeService { userResiInfoDao.update(userResiInfo, wrapper); UserBaseInfoEntity userBaseInfoEntity = ConvertUtils.sourceToTarget(userResiInfo, UserBaseInfoEntity.class); + userBaseInfoEntity.setNickname(formDTO.getNickname()); userBaseInfoService.insertOrUpdate(userBaseInfoEntity); } else { //visit表添加数据 From daedfe78271f85e909fb0b4839196b7422ad5307 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 8 Jun 2022 16:45:44 +0800 Subject: [PATCH 399/416] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=B8=80=E6=88=B7=E4=B8=80=E7=A0=81=E5=9C=B0=E5=9D=80=E5=8F=8A?= =?UTF-8?q?=E6=88=BF=E5=B1=8B=E7=BC=96=E7=A0=81=E4=BC=A0=E5=8F=82=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/controller/HouseController.java | 2 +- .../src/main/java/com/epmet/service/HouseService.java | 2 +- .../main/java/com/epmet/service/impl/HouseServiceImpl.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index bb960749f5..ebe0a4ae1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -523,7 +523,7 @@ public class HouseController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("createBatchHouseCodeAndUrl") public Result createBatchHouseCodeAndUrl(@LoginUser TokenDto loginUser) { - return houseService.createBatchHouseCodeAndUrl(loginUser); + return houseService.createBatchHouseCodeAndUrl(loginUser.getCustomerId()); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 701f164790..6316690b89 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -162,5 +162,5 @@ public interface HouseService { * @params [] * @return com.epmet.commons.tools.utils.Result */ - Result createBatchHouseCodeAndUrl(TokenDto loginUser); + Result createBatchHouseCodeAndUrl(String 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 3887f57c1b..1bacf11513 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 @@ -987,8 +987,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override - public Result createBatchHouseCodeAndUrl(TokenDto loginUser) { - List houseList = icHouseDao.selectBatchHouseCodeAndUrl(loginUser.getCustomerId()); + public Result createBatchHouseCodeAndUrl(String customerId) { + List houseList = icHouseDao.selectBatchHouseCodeAndUrl(customerId); houseList.forEach(house->{ IcHouseEntity entity = icHouseDao.selectById(house.getHouseId()); if(StringUtils.isNotBlank(house.getAreaCode())){ From b2ae5d0206b8231ec0184b4c5dc6eb8577ff8dd9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Jun 2022 17:17:11 +0800 Subject: [PATCH 400/416] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E8=87=AA=E7=BB=84=E7=BB=87=E6=97=B6=E5=AD=98=E5=9C=A8=E6=9C=AA?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=9A=84=E6=9C=8D=E5=8A=A1=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dao/IcUserDemandRecDao.java | 7 +++++++ .../IcCommunitySelfOrganizationServiceImpl.java | 4 ++++ .../main/resources/mapper/IcUserDemandRecDao.xml | 13 +++++++++++++ 3 files changed, 24 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index 01ab0ad96d..f3ac1eb80b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -140,4 +140,11 @@ public interface IcUserDemandRecDao extends BaseDao { List getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType); List queryServiceList(ServiceListFormDTO formDTO); + + /** + * 根据服务方id查询已派单的服务记录数 + * @param serverId + * @return + */ + Integer selectCountByServerId(String serverId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 833f93d900..3e834ce7ec 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -362,6 +362,10 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未完成的服务", "存在未完成的服务,不能删除"); + } baseDao.deleteById(formDTO.getOrgId()); personnelService.deleteByOrgId(formDTO.getOrgId()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4d215c16d9..46b8580e22 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -664,4 +664,17 @@ order by r.REPORT_TIME desc + + From 6f8dab6bf6e3d5894957649e8428c42d95cd44e8 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 8 Jun 2022 17:29:38 +0800 Subject: [PATCH 401/416] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=88=90=E5=91=98?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=B8=BA=E7=A9=BA=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserConfirmServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 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 ed2bd8e05d..dcd75a7d99 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 @@ -5,7 +5,6 @@ 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.enums.GenderEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -139,7 +138,7 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl getMemberDetail(IcResiUserConfirmGetDTO dto) { IcResiUserConfirmDTO result = icResiUserDao.selectMemberDetail(dto.getIcResiUserId()); if (null != result && StringUtils.isBlank(result.getGender())) { - result.setGender(GenderEnum.UN_KNOWN.getCode()); + result.setGender(""); } return new Result().ok(result); } From d1f90696ddd10edc85aa22daab60c29506d1571a Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 8 Jun 2022 18:01:14 +0800 Subject: [PATCH 402/416] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/opendata/service/impl/CaResidentServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index e66d249fa9..642a984a24 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -130,7 +130,7 @@ public class CaResidentServiceImpl extends BaseServiceImpl Date: Wed, 8 Jun 2022 18:12:56 +0800 Subject: [PATCH 403/416] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/opendata/service/impl/CaLoudongServiceImpl.java | 4 ++-- .../epmet/opendata/service/impl/CaPingfangServiceImpl.java | 4 ++-- .../com/epmet/opendata/service/impl/CaRentalServiceImpl.java | 4 ++-- .../epmet/opendata/service/impl/CaRotatorsServiceImpl.java | 4 ++-- .../src/main/resources/mapper/CaLoudongDao.xml | 3 ++- .../src/main/resources/mapper/CaPingfangDao.xml | 3 ++- .../src/main/resources/mapper/CaRentalDao.xml | 3 ++- .../src/main/resources/mapper/CaResidentDao.xml | 3 ++- .../src/main/resources/mapper/CaRotatorsDao.xml | 3 ++- 9 files changed, 18 insertions(+), 13 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index bd2f41b004..1a6635ce15 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -142,7 +142,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl + order by grid_id,building_id,community_id desc - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml index 9bf92f78ab..99c8195b49 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -91,6 +91,7 @@ AND community_name like '%${communityName}%' + order by grid_id,building_id,community_id desc - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml index c7dda007dc..280159ef30 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml @@ -86,6 +86,7 @@ AND renter_name like '%${renterName}%' + order by grid_id,rental_id,id_card desc - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index 33041e3a96..233e2cea5f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -114,6 +114,7 @@ AND telephone like '%${telephone}%' + order by grid_id,resident_id,id_card desc - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml index d54fe39738..77146469c5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -118,6 +118,7 @@ AND telephone like '%${telephone}%' + order by grid_id,rotators_id,id_card desc - \ No newline at end of file + From 83c5fb3a0e4d62aaaebb2cf92e2286acf6cf0188 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 8 Jun 2022 18:18:32 +0800 Subject: [PATCH 404/416] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=CB=9A?= 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, 3 insertions(+), 1 deletion(-) 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 0d23fd40fa..7267860432 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 @@ -275,7 +275,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { @Override public PageData getHouseList(IcHouseListFormDTO formDTO) { - + if (StringUtils.isBlank(formDTO.getAgencyId())){ + formDTO.setAgencyId(formDTO.getId()); + } // 查询pids String pids = null; if (StringUtils.isNotBlank(formDTO.getAgencyId())) { From 8ddadd948e240921d8c5704d65598d416dbb0622 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 8 Jun 2022 18:23:02 +0800 Subject: [PATCH 405/416] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/opendata/dao/CaLoudongDao.java | 4 +- .../com/epmet/opendata/dao/CaPingfangDao.java | 4 +- .../com/epmet/opendata/dao/CaRentalDao.java | 4 +- .../com/epmet/opendata/dao/CaResidentDao.java | 4 +- .../com/epmet/opendata/dao/CaRotatorsDao.java | 4 +- .../service/impl/CaLoudongServiceImpl.java | 47 +++++++++--------- .../service/impl/CaPingfangServiceImpl.java | 48 +++++++++--------- .../service/impl/CaRentalServiceImpl.java | 39 ++++++++------- .../service/impl/CaResidentServiceImpl.java | 49 ++++++++++--------- .../service/impl/CaRotatorsServiceImpl.java | 47 +++++++++--------- .../main/resources/mapper/CaResidentDao.xml | 1 + 11 files changed, 132 insertions(+), 119 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index 6d3682d52f..d5d87db881 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -42,5 +42,5 @@ public interface CaLoudongDao extends BaseDao { */ CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId); - void deleteAll(); -} \ No newline at end of file + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java index 4aa4f98439..ad48accf01 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -25,7 +25,7 @@ public interface CaPingfangDao extends BaseDao { List getPage(@Param("buildingName") String buildingName, @Param("communityName") String communityName); - void deleteAll(); + int deleteAll(); /** * 平房详情 @@ -34,4 +34,4 @@ public interface CaPingfangDao extends BaseDao { * @return */ CaPingFangDetailsResultDTO getPingFangDetails(@Param("buildingId") String buildingId); -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java index 36490a9bf0..67ecfe2cbd 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -30,7 +30,7 @@ public interface CaRentalDao extends BaseDao { @Param("houseName") String houseName, @Param("renterName") String renterName); - void deleteAll(); + int deleteAll(); /** * 出租房详情 @@ -39,4 +39,4 @@ public interface CaRentalDao extends BaseDao { * @return */ CaRentalDetailsResultDTO getRentalDetails(@Param("rentalId") String rentalId); -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index 8838273b8f..5c83b1e4d0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -29,7 +29,7 @@ public interface CaResidentDao extends BaseDao { @Param("idCard") String idCard, @Param("telephone") String telephone); - void deleteAll(); + int deleteAll(); /** * 人口基本信息详情 @@ -38,4 +38,4 @@ public interface CaResidentDao extends BaseDao { * @return */ CaResidentDetailsResultDTO getResidentDetails(@Param("idCard") String idCard); -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java index 8cc71a30cc..8a8787171d 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -30,7 +30,7 @@ public interface CaRotatorsDao extends BaseDao { @Param("idCard") String idCard, @Param("telephone") String telephone); - void deleteAll(); + int deleteAll(); /** * 流动人口详情 @@ -39,4 +39,4 @@ public interface CaRotatorsDao extends BaseDao { * @return */ CaRotatorsDetailsResultDTO getRotatorsDetails(@Param("idCard") String idCard); -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 1a6635ce15..a5e55fa6c6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -135,28 +135,31 @@ public class CaLoudongServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_LOUDONG); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,building_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listLouDong(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 0548e945b2..dcb8823872 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -114,29 +114,31 @@ public class CaPingfangServiceImpl extends BaseServiceImpl= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_PINGFANG); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,building_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listPingFang(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } - do { - try { - total = listPingFang(dto); - pageNo++; - dto.setPageNo(pageNo); - } catch (Exception e) { - e.printStackTrace(); - } - } while (total > (pageNo * NumConstant.FIFTY)); } @@ -149,7 +151,7 @@ public class CaPingfangServiceImpl extends BaseServiceImpl= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_RENTAL); - dto.setWhereCase("delete_flag = 'normal'"); - dto.setOrderBy("grid_id,update_date,rental_id desc"); + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,rental_id desc"); - int pageNo = 1; + int pageNo = 1; - int total = 0; + int total = 0; - do { - try { - total = listRental(dto); - pageNo++; - dto.setPageNo(pageNo); - } catch (Exception e) { - e.printStackTrace(); - } - } while (total > (pageNo * NumConstant.FIFTY)); + do { + try { + total = listRental(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 642a984a24..8a6648b5fc 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -122,29 +122,30 @@ public class CaResidentServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_RESIDENT); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,resident_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listResident(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } } @Override @@ -157,7 +158,7 @@ public class CaResidentServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); + dto.setTableName(CaWghDataConstant.UNICOM_ROTATORS); + + dto.setWhereCase("delete_flag = 'normal'"); + dto.setOrderBy("grid_id,update_date,rotators_id desc"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listRotators(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } @Override diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index 233e2cea5f..bf5c94b4c6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -61,6 +61,7 @@ delete from ca_resident + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index 38316f51c1..c1800190cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -183,4 +183,14 @@ where del_flag='0' and id=#{partyUnitId} + + \ No newline at end of file From d465503f58756b5c80901eb71bdb57aff9879159 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 9 Jun 2022 10:33:03 +0800 Subject: [PATCH 412/416] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcCommunitySelfOrganizationServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 5bc83dcfd9..cb063772c0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -182,7 +182,6 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl Date: Thu, 9 Jun 2022 14:34:20 +0800 Subject: [PATCH 413/416] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=B8=8E=E6=88=BF?= =?UTF-8?q?=E5=B1=8B=E4=BF=A1=E6=81=AF=E4=B8=8D=E5=8C=B9=E9=85=8Derror=20c?= =?UTF-8?q?ode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 +- .../src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 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 ed274b2c28..cecd853b9c 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 @@ -256,7 +256,7 @@ public enum EpmetErrorCode { RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"), IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"), NOT_REGEIST_RESI(8927,"未注册居民"), - + MISMATCH(10086,"人员与房屋信息不匹配,请与工作人员联系。"), //通用错误码 start //通用的 错误消息自己定义返回 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java index b57a4e006b..6fb98f8b7a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java @@ -93,7 +93,7 @@ public class MyHomeServiceImpl implements MyHomeService { userWrapper.eq(IcResiUserEntity::getIdCard, formDTO.getIdCard()); IcResiUserEntity icUser = icResiUserDao.selectOne(userWrapper); if (null == icUser || !icUser.getHomeId().equals(formDTO.getHomeId())) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + throw new EpmetException(EpmetErrorCode.MISMATCH.getCode(), "人员与房屋信息不匹配,请与工作人员联系。", "人员与房屋信息不匹配,请与工作人员联系。"); } From 48c2aa20ed871d14f35f32abf1b08b6477054942 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 10 Jun 2022 09:49:06 +0800 Subject: [PATCH 414/416] =?UTF-8?q?=E6=95=B0=E5=AD=97=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6groupId=20=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcFormServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java index 6002398fbd..0523b83600 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java @@ -175,6 +175,7 @@ public class IcFormServiceImpl extends BaseServiceImpl if (CollectionUtils.isEmpty(itemList)) { return "默认配置错误"; } + String defaultBaseInfoGroupId = "default_0"; //设置ic_form_item itemList.forEach(item -> { item.setId(newPrefixed + item.getId()); @@ -183,7 +184,10 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setAreaCode(areaCode); item.setParentItemId(newPrefixed + item.getParentItemId()); //分组Id 为0 说明不村子分组 则直接不设置 仍然为0 - if (!NumConstant.ZERO_STR.equals(item.getItemGroupId())){ + //基础信息分组id:default_0;默认是客户id_0 + if (defaultBaseInfoGroupId.equals(item.getItemGroupId())) { + item.setItemGroupId(customerId.concat("_0")); + } else { item.setItemGroupId(newPrefixed + item.getItemGroupId()); } String optionSourceValue = item.getOptionSourceValue(); @@ -227,7 +231,12 @@ public class IcFormServiceImpl extends BaseServiceImpl wrapperGroup.eq(IcFormItemGroupEntity::getFormCode, formCode); List groupList = icFormItemGroupDao.selectList(wrapperGroup); groupList.forEach(item -> { - item.setId(newPrefixed + item.getId()); + if (defaultBaseInfoGroupId.equals(item.getId())) { + //基础信息分组id默认客户id_0 + item.setId(customerId.concat("_0")); + } else { + item.setId(newPrefixed + item.getId()); + } item.setCustomerId(customerId); item.setFormId(newFormId); item.setCreatedBy("init_user"); From 6c0de8bd2b606b15271a5fe8be3f06f4c22bbb00 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 10 Jun 2022 16:00:36 +0800 Subject: [PATCH 415/416] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=8D=95=E9=80=89=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=90=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.29__radio_default.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql new file mode 100644 index 0000000000..f23b014497 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.29__radio_default.sql @@ -0,0 +1,6 @@ +UPDATE ic_form_item +SET DEFAULT_VALUE = '0',UPDATED_TIME=NOW() +WHERE + ITEM_TYPE = 'radio' + AND DEL_FLAG = '0' + AND ( DEFAULT_VALUE IS NULL OR DEFAULT_VALUE = '' ); From 111c5d4f59a9cac60f400ca7c5b2f75baa1b4a12 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 10 Jun 2022 17:32:50 +0800 Subject: [PATCH 416/416] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=99=90=E5=88=B6?= =?UTF-8?q?=EF=BC=9A=E6=B4=BB=E5=8A=A8=E6=8A=A5=E5=90=8D=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=BA=94=E8=AF=A5=E5=A4=A7=E4=BA=8E=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/WorkActServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 ee3924bdb5..7c4f924e20 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 @@ -162,9 +162,9 @@ public class WorkActServiceImpl implements WorkActService { //校验参数 //校验 活动报名截止时间应该大于当前时间 - if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ - throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); - } + // if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ + // throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); + // } this.checkPublishFormDTO(actInfoEntity); PublishActResultDTO publishActResultDTO=new PublishActResultDTO(); //内容审核(活动标题、招募要求、活动内容图文) @@ -202,10 +202,10 @@ public class WorkActServiceImpl implements WorkActService { ActInfoEntity actInfoEntity=this.constructActInfo(formDTO); //校验参数 - //校验 活动报名截止时间应该大于当前时间 - if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ - throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); - } + // //校验 活动报名截止时间应该大于当前时间 + // if (actInfoEntity.getSignUpEndTime().before(DateUtils.minStrToSecondDate(DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)))){ + // throw new RenException(EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getCode(),EpmetErrorCode.ACT_SIGN_UP_END_TIME_EARLIER_NOW_EERROR.getMsg()); + // } this.checkPublishFormDTO(actInfoEntity); PublishActResultDTO publishActResultDTO=new PublishActResultDTO(); //内容审核(活动标题、招募要求、活动内容图文)