From a5a30794eac3cec902f5253704c2269ba763a063 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 17 May 2022 09:31:26 +0800 Subject: [PATCH 001/319] =?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/319] =?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 bc37531718815ea529428a07d56be7ad2102a8a4 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 25 May 2022 13:35:05 +0800 Subject: [PATCH 003/319] =?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 dd5d2b94df10fa63f0af802b63cf66223c210500 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 26 May 2022 15:45:06 +0800 Subject: [PATCH 004/319] =?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 013/319] =?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 014/319] =?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 015/319] =?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 016/319] ... --- .../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 017/319] ... --- .../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 018/319] =?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 c5149b3f9ddd4df2c119c42b5365f84ef399fd72 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 30 May 2022 10:26:27 +0800 Subject: [PATCH 019/319] =?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 020/319] =?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 021/319] =?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 022/319] =?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 023/319] =?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 024/319] =?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 025/319] =?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 026/319] 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 027/319] =?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 028/319] 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 029/319] =?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 030/319] =?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 033/319] 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 034/319] =?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 035/319] 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 036/319] =?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 037/319] =?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 038/319] =?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 039/319] =?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 040/319] =?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 042/319] =?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 37272083915b7e19246a8cb69c8e0131c23fb04b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 31 May 2022 09:41:35 +0800 Subject: [PATCH 050/319] =?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 066/319] =?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 067/319] =?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 3890c7da3e903425be1301149cfc14dbfb3574e7 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 31 May 2022 16:29:17 +0800 Subject: [PATCH 075/319] =?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 63efac033c0001a2c968cf1b3deb2947ae190c71 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 16:32:41 +0800 Subject: [PATCH 076/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcPartyMemberPointServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index ca72c7feeb..a0cf982bb4 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -83,17 +83,17 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); } else { From 64875de03c14995a3604bec9148d9448106e1eb7 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 31 May 2022 16:35:33 +0800 Subject: [PATCH 077/319] =?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 078/319] =?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 079/319] =?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:19:00 +0800 Subject: [PATCH 080/319] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC0=E7=AD=89?= =?UTF-8?q?=E7=AD=89=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/partymember/IcPartyMemberPointDTO.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java index 1663f19881..4d299c24e0 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java @@ -44,7 +44,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 基础积分分值 */ - private Integer basePoint; + private Integer basePoint = 0; /** * 基础积分选项 英文逗号隔开 @@ -54,7 +54,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 民主评议积分分值 */ - private Integer reviewPoint; + private Integer reviewPoint = 0; /** * 民主评议积分选项 @@ -64,7 +64,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 激励积分分值 */ - private Integer inspirePoint; + private Integer inspirePoint = 0; /** * 激励积分选项 @@ -74,7 +74,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 警示扣分分值 */ - private Integer warnPoint; + private Integer warnPoint = 0; /** * 警示扣分选项 @@ -84,7 +84,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 总分 */ - private Integer totalScore; + private Integer totalScore = 0; /** * 删除标识:0.未删除 1.已删除 From 04b39e176823c74b00e61ba2aa616e79f96a009d Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 31 May 2022 17:28:25 +0800 Subject: [PATCH 081/319] =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcPartyMemberPointServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index a0cf982bb4..d89811d029 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -83,17 +83,17 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); } else { From 3be8476f5d08f6f6f18c498159fcd7ca4736a711 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 31 May 2022 17:45:28 +0800 Subject: [PATCH 082/319] =?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 083/319] =?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 084/319] =?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 085/319] =?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 086/319] =?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 087/319] =?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 088/319] =?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 846a8a281b8429760346bba3bd9e568d2c96fdb6 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 09:08:53 +0800 Subject: [PATCH 089/319] =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/partymember/IcPartyMemberPointDTO.java | 8 ++++---- .../service/impl/IcPartyMemberPointServiceImpl.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java index 4d299c24e0..90879a74f4 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java @@ -44,7 +44,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 基础积分分值 */ - private Integer basePoint = 0; + private Integer basePoint; /** * 基础积分选项 英文逗号隔开 @@ -54,7 +54,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 民主评议积分分值 */ - private Integer reviewPoint = 0; + private Integer reviewPoint; /** * 民主评议积分选项 @@ -64,7 +64,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 激励积分分值 */ - private Integer inspirePoint = 0; + private Integer inspirePoint; /** * 激励积分选项 @@ -74,7 +74,7 @@ public class IcPartyMemberPointDTO implements Serializable { /** * 警示扣分分值 */ - private Integer warnPoint = 0; + private Integer warnPoint; /** * 警示扣分选项 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index d89811d029..ae25295b44 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -83,17 +83,17 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); } else { From d6052e66c0236d05e24921100ca9908eeff1520f Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 09:37:50 +0800 Subject: [PATCH 090/319] =?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 a183ef5e4fba752b1c2c1ae83da5b4a794f77a36 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 09:42:50 +0800 Subject: [PATCH 091/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9set=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/service/impl/IcPartyMemberPointServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index ae25295b44..7a98e0f328 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -87,7 +87,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl Date: Wed, 1 Jun 2022 09:46:35 +0800 Subject: [PATCH 092/319] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyMemberPointServiceImpl.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index 7a98e0f328..77e92a2eb7 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -112,11 +112,24 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { - dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + if(dto.getWarnPoint() != null) { + if (dto.getWarnPoint() > 0) { + dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + } else { + dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + } } else { - dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + dto.setWarnPoint(NumConstant.ZERO); } IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); if(dto.getYear().equals(Year.now().toString())){ From b0b5b6ee95f724a5bfe1af889a84817a4b91cfe9 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 1 Jun 2022 10:09:55 +0800 Subject: [PATCH 093/319] =?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 094/319] 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 a139a36a5566965a65cf66b6a95ae01be24ee0cb Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 10:18:11 +0800 Subject: [PATCH 095/319] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8F=E5=8C=96?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=BB=9F=E8=AE=A1=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/IcPartyMemberPointDao.java | 5 ++ .../impl/IcPartyMemberPointServiceImpl.java | 55 ++++++++++--------- .../partymember/IcPartyMemberPointDao.xml | 11 ++++ 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java index f7a36ea435..12e8ea95dc 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java @@ -42,4 +42,9 @@ public interface IcPartyMemberPointDao extends BaseDao @Param("customerId") String customerId); void updateMember(@Param("partyMemberId") String partyMemberId, @Param("totalScore") Integer totalScore); + + boolean getPoint(@Param("year") String year, + @Param("quarter") String quarter, + @Param("customerId") String customerId, + @Param("partyMemberId") String partyMemberId); } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index 77e92a2eb7..b28ef1727e 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -83,17 +83,17 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); } else { @@ -103,7 +103,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl 0) { - dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + if (baseDao.getPoint(dto.getYear(), dto.getQuarter(), dto.getCustomerId(), dto.getPartyMemberId())) { + if (dto.getBasePoint() == null) { + dto.setBasePoint(NumConstant.ZERO); + } + if (dto.getReviewPoint() == null) { + dto.setReviewPoint(NumConstant.ZERO); + } + if (dto.getInspirePoint() == null) { + dto.setInspirePoint(NumConstant.ZERO); + } + dto.setTotalScore(dto.getBasePoint() + dto.getInspirePoint() + dto.getReviewPoint()); + if (dto.getWarnPoint() != null) { + if (dto.getWarnPoint() > 0) { + dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); + } else { + dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + } } else { - dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); + dto.setWarnPoint(NumConstant.ZERO); } + IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); + if (dto.getYear().equals(Year.now().toString())) { + baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); + } + updateById(entity); } else { - dto.setWarnPoint(NumConstant.ZERO); + save(dto); } - IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); - if(dto.getYear().equals(Year.now().toString())){ - baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); - } - updateById(entity); + } @Override diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml index 3876ddf432..12ffe7a854 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml @@ -154,6 +154,17 @@ a.total_score ASC, a.CREATED_TIME + \ No newline at end of file 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 096/319] 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 097/319] =?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 098/319] =?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 9da96bc9acaafcf5c0926b75e6782e203b98463e Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 10:30:32 +0800 Subject: [PATCH 099/319] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/partymember/dao/IcPartyMemberPointDao.java | 2 +- .../service/impl/IcPartyMemberPointServiceImpl.java | 2 +- .../resources/mapper/partymember/IcPartyMemberPointDao.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java index 12e8ea95dc..9e44e7d2b6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java @@ -43,7 +43,7 @@ public interface IcPartyMemberPointDao extends BaseDao void updateMember(@Param("partyMemberId") String partyMemberId, @Param("totalScore") Integer totalScore); - boolean getPoint(@Param("year") String year, + int getPoint(@Param("year") String year, @Param("quarter") String quarter, @Param("customerId") String customerId, @Param("partyMemberId") String partyMemberId); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index b28ef1727e..e17339ad22 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -112,7 +112,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl - SELECT - id + count(id) FROM ic_party_member_point WHERE From cc2a4be89cd598310f585aa6b382987297d23baa Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 1 Jun 2022 10:32:11 +0800 Subject: [PATCH 100/319] sql --- .../main/resources/mapper/partymember/IcPartyMemberPointDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml index c320bf9b25..60fa191f70 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml @@ -164,6 +164,7 @@ AND CUSTOMER_ID = #{customerId} AND YEAR = #{year} AND QUARTER = #{quarter} + AND del_flag = '0' From bacc04733495685a4d357179017cfe4985e4e52b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 1 Jun 2022 10:41:11 +0800 Subject: [PATCH 101/319] =?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 102/319] 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 103/319] =?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 104/319] =?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 6847bccdcd11b76ebb73e7e6484e1d4389c8d65b Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 14:18:27 +0800 Subject: [PATCH 105/319] =?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 d95758e09760671ed069c54e2f4f7e4f6f90f988 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 1 Jun 2022 14:20:10 +0800 Subject: [PATCH 106/319] =?UTF-8?q?branchlist=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partyOrg/service/impl/IcPartyOrgServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java index b0925ffd7d..789d94bbca 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.modules.partymember.entity.IcPartyMemberEntity; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; +import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -220,7 +221,12 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl orgList = baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(),tokenDto.getCustomerId()); + if(CollectionUtils.isEmpty(orgList)){ + return new Result>().ok(resultList); + } + result.setChildren(orgList); resultList.add(result); return new Result>().ok(resultList); } From db2ea6e75c56e6e2d9f0e47cd93bbd38b2a04822 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jun 2022 14:22:40 +0800 Subject: [PATCH 107/319] =?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 108/319] =?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 e05070323915bd4556ed57de33404a61db173a90 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 1 Jun 2022 14:36:38 +0800 Subject: [PATCH 109/319] =?UTF-8?q?=E5=85=9A=E5=91=98=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E6=9F=A5=E8=AF=A2bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/partymember/form/IcPartyMemberFromDTO.java | 1 + .../partymember/service/impl/IcPartyMemberServiceImpl.java | 4 +++- .../main/resources/mapper/partymember/IcPartyMemberDao.xml | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java index 42da9bdf94..5ded6b154c 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java @@ -81,4 +81,5 @@ public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable { */ private String payEndDate; private String year; + private String month; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 122212ccfd..922c6ca35a 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -121,7 +121,9 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl list = baseDao.selectList(formDTO); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml index d71cdbd883..21ea480cca 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml @@ -51,7 +51,7 @@ a.LDZH, a.PARTY_ZW, a.ADDRESS, - IF( b.PAY_DATE IS NULL, 0, 1 ) AS isPay, + IF( e.MONEY IS NULL, 0, 1 ) AS isPay, b.PAY_DATE, a.CULTURE, a.TOTAL_SCORE AS point, @@ -73,6 +73,8 @@ AND b.CUSTOMER_ID = #{customerId} INNER JOIN ic_party_org d ON a.SSZB = d.ID AND d.DEL_FLAG = 0 + LEFT JOIN ic_party_member_pay_record_detail e ON a.ID = e.PARTY_MEMBER_ID + AND e.DEL_FLAG = 0 AND e.`YEAR` = #{year} AND e.`MONTH` = #{month} WHERE a.DEL_FLAG = 0 AND a.CUSTOMER_ID = #{customerId} 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 110/319] =?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 111/319] =?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 d86036cb3bdec97db885d0af09680c01cb2f8ed8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 1 Jun 2022 15:39:10 +0800 Subject: [PATCH 112/319] =?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 113/319] =?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 114/319] =?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 115/319] =?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 116/319] =?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 117/319] =?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 118/319] 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 119/319] 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:45:09 +0800 Subject: [PATCH 120/319] =?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: Thu, 2 Jun 2022 09:12:00 +0800 Subject: [PATCH 121/319] =?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 3e780435d5cbe9023aa8801c6d249faab2ec1863 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 10:07:37 +0800 Subject: [PATCH 122/319] =?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 123/319] =?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 7137426cfa74d2fd8321dbccb6c7d7e7cb4275ae Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 10:52:00 +0800 Subject: [PATCH 126/319] =?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 130/319] 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 131/319] =?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 132/319] =?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 f13a370cc10bd4e8f43aa49053faaeec67639d2b Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 2 Jun 2022 14:44:35 +0800 Subject: [PATCH 134/319] =?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 135/319] =?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 652d998373510376ff76823c83d941abddaee325 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 2 Jun 2022 15:18:17 +0800 Subject: [PATCH 136/319] =?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 137/319] =?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 138/319] =?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 139/319] =?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 140/319] =?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 141/319] =?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 a01f100063b8cb07eae7eec3dc2486108f512a69 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 2 Jun 2022 16:42:46 +0800 Subject: [PATCH 142/319] =?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 143/319] =?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 f4420d4be4f650462b250769a3ff953c79d7d7d8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Thu, 2 Jun 2022 16:52:40 +0800 Subject: [PATCH 144/319] =?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 145/319] =?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 146/319] 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 147/319] .. --- .../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 148/319] =?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 149/319] =?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 150/319] . --- .../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 151/319] . --- .../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 152/319] =?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 85492a25efe489636f8712d1ac871472d2acdc48 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 6 Jun 2022 14:55:20 +0800 Subject: [PATCH 153/319] =?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 154/319] =?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 155/319] =?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 156/319] =?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 @@ + SELECT - n.NEIGHBOURHOODS_ID, + n.ID as NEIGHBOURHOODS_ID, n.NEIGHBOR_HOOD_NAME, g.CUSTOMER_ID, g.id AS GRID_ID, From 39a8afbbe20feadac955247e500caa0433e14674 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Mon, 6 Jun 2022 17:09:17 +0800 Subject: [PATCH 159/319] =?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 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 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 9656f876b6..de4b58c7f7 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 @@ -43,7 +43,7 @@ + + + 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 163/319] =?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 164/319] =?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 165/319] 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 166/319] =?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 167/319] =?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 168/319] =?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 169/319] =?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 05ec87c4c6730599d76de4308ae6d422829c0b7b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 11:01:10 +0800 Subject: [PATCH 170/319] =?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 1c70f609af2bd57bc67bce13ac374cfedb494d23 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 13:54:20 +0800 Subject: [PATCH 171/319] =?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 de9010d67652f313156f35f8447a9cd7bbd81449 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Jun 2022 15:14:57 +0800 Subject: [PATCH 172/319] =?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 7289344d5fb52030d660d845c20186cb930ec906 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 15:51:31 +0800 Subject: [PATCH 173/319] =?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 390c9a83b46f2c0cea8d2d632ca428bb2efbf724 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 7 Jun 2022 16:04:20 +0800 Subject: [PATCH 174/319] =?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 175/319] =?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 176/319] =?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 177/319] =?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 1c39a3ee5b3dded3795097a2ff4272970f493dbb Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 7 Jun 2022 16:54:41 +0800 Subject: [PATCH 178/319] =?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 179/319] =?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 40243292b76b6f26328b87d879da262cb7ba40e3 Mon Sep 17 00:00:00 2001 From: YUJT Date: Wed, 8 Jun 2022 10:07:45 +0800 Subject: [PATCH 180/319] =?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 + f.SERVICE_GOAL, + f.SERVICE_EFFECT, + f.SERVICE_PEOPLE_NUMBER, + f.SATISFACTION, + f.LATITUDE, + f.LONGITUDE, + f.address, + f.SERVICE_PROJECT_ID + FROM + ic_service_feedback f + WHERE + f.DEL_FLAG = '0' + and f.SERVICE_RECORD_ID=#{serviceRecordId} + + + \ No newline at end of file From a3e2c8c2a05bf73bc43d33dcc1997a3827ae3b75 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 8 Jun 2022 14:45:12 +0800 Subject: [PATCH 187/319] =?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 188/319] =?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 189/319] =?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 190/319] =?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 b2ae5d0206b8231ec0184b4c5dc6eb8577ff8dd9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Jun 2022 17:17:11 +0800 Subject: [PATCH 191/319] =?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 d1f90696ddd10edc85aa22daab60c29506d1571a Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 8 Jun 2022 18:01:14 +0800 Subject: [PATCH 192/319] =?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 193/319] =?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 194/319] =?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 195/319] =?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 200/319] =?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 10:36:39 +0800 Subject: [PATCH 201/319] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E8=8E=B7=E5=8F=96=E5=85=9A=E5=91=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/ResiPartyMemberOpenFeignClient.java | 3 +++ ...ResiPartyMemberOpenFeignClientFallback.java | 5 +++++ .../controller/IcPartyMemberController.java | 6 ++++++ .../service/IcPartyMemberService.java | 10 ++++++++++ .../service/impl/IcPartyMemberServiceImpl.java | 18 ++++++++++++++++++ .../epmet/dto/result/IcUserRoleResultDTO.java | 7 +++++++ .../service/impl/IcResiUserServiceImpl.java | 11 ++++++++++- 7 files changed, 59 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..ba6e36ecb3 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 @@ -124,4 +124,7 @@ public interface ResiPartyMemberOpenFeignClient { */ @PostMapping("/resi/partymember/icPartyMember/icPartyMemberSync") Result icPartyMemberSync(@RequestBody IcPartyMemberDTO dto); + + @PostMapping("/resi/partymember/icPartyMember/getPartyMemberByIdCard") + Result getPartyMemberByIdCard(@RequestBody IcPartyMemberDTO dto); } 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..f4545ee638 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 @@ -88,4 +88,9 @@ public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOp public Result icPartyMemberSync(IcPartyMemberDTO dto) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "icPartyMemberSync", dto); } + + @Override + public Result getPartyMemberByIdCard(IcPartyMemberDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getPartyMemberByIdCard", dto); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java index 3390d45acc..a1fdca4c49 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java @@ -112,6 +112,12 @@ public class IcPartyMemberController implements ResultDataResolver { return new Result(); } + @PostMapping("getPartyMemberByIdCard") + public Result getPartyMemberByIdCard(@RequestBody IcPartyMemberDTO dto){ + IcPartyMemberDTO result = icPartyMemberService.getPartyMemberByIdCard(dto); + return new Result().ok(result); + } + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFromDTO formDTO, HttpServletResponse response) throws Exception { diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java index 0d84d90723..20373c3ca5 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberService.java @@ -85,6 +85,16 @@ public interface IcPartyMemberService extends BaseService { */ void delete(String[] ids); + /** + * 根据身份证获取党员信息 + * + * @Param dto + * @Return {@link IcPartyMemberDTO} + * @Author zhaoqifeng + * @Date 2022/6/9 10:07 + */ + IcPartyMemberDTO getPartyMemberByIdCard(IcPartyMemberDTO dto); + /** * 党员信息同步 * diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 922c6ca35a..3045e59b24 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -333,6 +333,24 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyMemberEntity::getCustomerId, dto.getCustomerId()); + wrapper.eq(IcPartyMemberEntity::getIdCard, dto.getIdCard()); + IcPartyMemberEntity partyMember = baseDao.selectOne(wrapper); + return ConvertUtils.sourceToTarget(partyMember, IcPartyMemberDTO.class); + } + /** * 党员信息同步 * diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java index cfcd9da6aa..2daa69618e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserRoleResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; import lombok.Data; import java.io.Serializable; @@ -16,4 +17,10 @@ public class IcUserRoleResultDTO implements Serializable { * 是否是志愿者0否,1是 */ private String isVolunteer; + /** + * 是否是党员0否,1是 + */ + private String isPartyMember; + + private IcPartyMemberDTO partyMemberInfo; } 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 a5ecb108e3..748bcd6950 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 @@ -2238,6 +2238,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl baseInfoWrapper = new LambdaQueryWrapper<>(); baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, formDTO.getCustomerId()); @@ -2257,7 +2258,15 @@ public class IcResiUserServiceImpl extends BaseServiceImpl memberInfoResult = resiPartyMemberOpenFeignClient.getPartyMemberByIdCard(memberFormDTO); + if (memberInfoResult.success() && null != memberInfoResult.getData()) { + result.setIsPartyMember(NumConstant.ONE_STR); + result.setPartyMemberInfo(memberInfoResult.getData()); + } return result; } From 7ece978f44b5540c0da5ba5763037363f6d1254f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Jun 2022 11:01:39 +0800 Subject: [PATCH 202/319] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E8=8E=B7=E5=8F=96=E5=85=9A=E5=91=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/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 748bcd6950..b26bb760e8 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,7 +2261,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl memberInfoResult = resiPartyMemberOpenFeignClient.getPartyMemberByIdCard(memberFormDTO); if (memberInfoResult.success() && null != memberInfoResult.getData()) { result.setIsPartyMember(NumConstant.ONE_STR); From 24afd594235a9b7781a39460dc243f2e3edd1d11 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 9 Jun 2022 11:15:00 +0800 Subject: [PATCH 203/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8F=E5=8C=96?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E4=BF=AE=E6=94=B9=E6=97=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/IcPartyMemberPointDao.java | 4 ++- .../impl/IcPartyMemberPointServiceImpl.java | 4 +-- .../partymember/IcPartyMemberPointDao.xml | 27 +++++++++++++++---- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java index 9e44e7d2b6..ed745c2b90 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyMemberPointDao.java @@ -47,4 +47,6 @@ public interface IcPartyMemberPointDao extends BaseDao @Param("quarter") String quarter, @Param("customerId") String customerId, @Param("partyMemberId") String partyMemberId); -} \ No newline at end of file + + void updateByPartyMemberId(@Param("entity") IcPartyMemberPointEntity entity); +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index e17339ad22..b9dc97951c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -136,7 +136,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl + + UPDATE ic_party_member_point + SET BASE_POINT = #{entity.basePoint}, + BASE_OPTIONS = #{entity.baseOptions}, + REVIEW_POINT = #{entity.reviewPoint}, + REVIEW_OPTIONS = #{entity.reviewOptions}, + INSPIRE_POINT = #{entity.inspirePoint}, + INSPIRE_OPTIONS = #{entity.inspireOptions}, + WARN_POINT = #{entity.warnPoint}, + WARN_OPTIONS = #{entity.warnOptions} + WHERE + PARTY_MEMBER_ID = #{entity.partyMemberId} + AND YEAR = #{entity.year}, + AND QUARTER = #{entity.quarter} + AND DEL_FLAG = '0' + AND CUSTOMER_ID = #{entity.customerId} + + 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 212/319] =?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 213/319] =?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(); //内容审核(活动标题、招募要求、活动内容图文) From 49791964ffbbbe07844780fa6d7117dd3533387e Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 10 Jun 2022 17:45:44 +0800 Subject: [PATCH 214/319] =?UTF-8?q?=E5=85=9A=E7=BB=84=E7=BB=87=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=B0=83=E6=95=B4=E4=B8=BA=E5=8F=AA=E7=9C=8B=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9C=AC=E7=BB=84=E7=BB=87=E5=8F=8A=E4=B8=8B=E7=BA=A7?= =?UTF-8?q?=E5=85=9A=E7=BB=84=E7=BB=87=EF=BC=8C=E4=B8=8D=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=90=8C=E7=BA=A7=E5=8F=8A=E4=B8=8A=E7=BA=A7=EF=BC=9B=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E7=BB=84=E7=BB=87=E9=80=89=E9=A1=B9=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partyOrg/form/GetParentOrgFormDTO.java | 33 +++++ .../controller/IcPartyOrgController.java | 16 ++- .../modules/partyOrg/dao/IcPartyOrgDao.java | 20 +++ .../partyOrg/service/IcPartyOrgService.java | 10 ++ .../service/impl/IcPartyOrgServiceImpl.java | 131 +++++++++++------- .../mapper/partyOrg/IcPartyOrgDao.xml | 56 +++++--- 6 files changed, 196 insertions(+), 70 deletions(-) create mode 100644 epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java new file mode 100644 index 0000000000..fa1534fc65 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/GetParentOrgFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.resi.partymember.dto.partyOrg.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @program: epmet-cloud + * @description: + * @author: wangtong + * @create: 2022-06-10 16:02 + **/ +@Data +public class GetParentOrgFormDTO implements Serializable { + /** + * 党组织类型 + */ + @NotNull(message = "党组织类型不可为空") + private String partyOrgType; + + /** + * 行政组织 机关ID + */ + @NotNull(message = "行政组织id不可为空") + private String agencyId; + + /** + * 客户Id (customer.id) + */ + private String customerId; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java index 1d5cbcda24..499c2a1d70 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel; import com.epmet.modules.partyOrg.service.IcPartyOrgService; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; @@ -121,6 +122,19 @@ public class IcPartyOrgController { return icPartyOrgService.branchlist(tokenDto); } - + /** + * @describe: 上级党组织列表 + * @author wangtong + * @date 2022/6/10 15:59 + * @params [tokenDto, formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + @GetMapping("getParentOrgList") + public Result> getParentOrgList(@LoginUser TokenDto tokenDto, GetParentOrgFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return icPartyOrgService.getParentOrgList(formDTO); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java index 49574a4af6..c70ca0d728 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java @@ -83,4 +83,24 @@ public interface IcPartyOrgDao extends BaseDao { * @return java.util.List */ List getSearchTreelist(PartyOrgTreeListDTO formDTO); + + /** + * @describe: 获取上级党组织 + * @author wangtong + * @date 2022/6/10 16:48 + * @params [agencyPid, customerId, code] + * @return java.util.List + */ + List selectParentOrgByAgencyPid(@Param("agencyPid") String agencyPid, + @Param("customerId") String customerId, + @Param("partyOrgType") String partyOrgType); + + /** + * @describe: 查询该客户下的一级组织 + * @author wangtong + * @date 2022/6/10 17:29 + * @params [customerId] + * @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity + */ + IcPartyOrgEntity selectByCustomerIdAndFirstOrg(@Param("customerId") String customerId); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java index 7e1b6ad24c..6397916cc6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; @@ -107,4 +108,13 @@ public interface IcPartyOrgService extends BaseService { * @return com.epmet.commons.tools.utils.Result> */ Result> getSearchTreelist(PartyOrgTreeListDTO formDTO); + + /** + * @describe: 上级党组织列表 + * @author wangtong + * @date 2022/6/10 16:01 + * @params [formDTO] + * @return com.epmet.commons.tools.utils.Result> + */ + Result> getParentOrgList(GetParentOrgFormDTO formDTO); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java index e0105c65fe..d41d9eaa8b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java @@ -6,6 +6,7 @@ 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.PartyOrgTypeEnum; +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.CustomerOrgRedis; @@ -14,13 +15,16 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; 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.dto.CustomerAgencyDTO; import com.epmet.enums.OrgLevelEnums; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partyOrg.service.IcPartyOrgService; import com.epmet.modules.partymember.dao.IcPartyMemberDao; import com.epmet.modules.partymember.entity.IcPartyMemberEntity; import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; +import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; @@ -48,6 +52,9 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl page(Map params) { @@ -65,8 +72,8 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); @@ -84,47 +91,47 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl orgList = baseDao.selectAllByOrgId(id); - if(!CollectionUtils.isEmpty(orgList)){ + if (!CollectionUtils.isEmpty(orgList)) { throw new EpmetException("请先删除下级党组织!"); } //判断该组织下是否有党员 List memberList = icPartyMemberDao.selectAllByOrgId(id); - if(!CollectionUtils.isEmpty(memberList)){ + if (!CollectionUtils.isEmpty(memberList)) { throw new EpmetException("该组织下有党员信息暂时不可删除!"); } baseDao.deleteById(id); @@ -215,15 +222,15 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl> branchlist(TokenDto tokenDto) { - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); List resultList = new ArrayList<>(); BranchlistTreeDTO result = new BranchlistTreeDTO(); result.setValue(staffInfo.getAgencyId()); // result.setOrgPids(staffInfo.getAgencyPIds()); result.setLabel(staffInfo.getAgencyName()); //该行政组织下的所有类型为支部的党组织 - List orgList = baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(),tokenDto.getCustomerId()); - if(CollectionUtils.isEmpty(orgList)){ + List orgList = baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(), tokenDto.getCustomerId()); + if (CollectionUtils.isEmpty(orgList)) { return new Result>().ok(resultList); } result.setChildren(orgList); @@ -237,6 +244,32 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl>().ok(build(list)); } + @Override + public Result> getParentOrgList(GetParentOrgFormDTO formDTO) { + Result agencyDTOResult = govOrgOpenFeignClient.getAgencyById(formDTO.getAgencyId()); + if (!agencyDTOResult.success() || null == agencyDTOResult || null == agencyDTOResult.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询行政组织信息错误", "查询行政组织信息错误"); + } + String agencyPid = agencyDTOResult.getData().getPid(); + List list = new ArrayList<>(); + //如果本工作人员的级别是该客户下的最高级别,并且没有一级组织时,添加一级组织选项 + IcPartyOrgEntity entity = baseDao.selectByCustomerIdAndFirstOrg(formDTO.getCustomerId()); + if("0".equals(agencyPid) && null == entity){ + IcPartyOrgTreeDTO firstOrg = new IcPartyOrgTreeDTO(); + firstOrg.setId("0"); + firstOrg.setPartyOrgName("一级组织"); + list.add(firstOrg); + } + //如果类型为支部,则查询该行政组织下的所有党委(列表) + if(PartyOrgTypeEnum.BRANCH.getCode().equals(formDTO.getPartyOrgType())){ + list.addAll(baseDao.selectParentOrgByAgencyPid(agencyPid,formDTO.getCustomerId(),PartyOrgTypeEnum.PARTY.getCode())); + }else{ + //查询该行政组织对应上级所关联的党组织(单个实体类) + list.addAll(baseDao.selectParentOrgByAgencyPid(agencyPid,formDTO.getCustomerId(),null)); + } + return new Result>().ok(list); + } + /** * 构建树节点 */ @@ -245,13 +278,13 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl nodeMap = new LinkedHashMap<>(treeNodes.size()); - for(IcPartyOrgTreeDTO treeNode : treeNodes){ + for (IcPartyOrgTreeDTO treeNode : treeNodes) { nodeMap.put(treeNode.getId(), treeNode); } - for(IcPartyOrgTreeDTO node : nodeMap.values()) { + for (IcPartyOrgTreeDTO node : nodeMap.values()) { IcPartyOrgTreeDTO parent = nodeMap.get(node.getPid()); - if(parent != null && !(node.getId().equals(parent.getId()))){ + if (parent != null && !(node.getId().equals(parent.getId()))) { parent.getChildren().add(node); continue; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml index 451da2c51a..959b99a790 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml @@ -98,31 +98,47 @@ + + From ea8c9a1dbda4f7869d61c4ab579f13178920050a Mon Sep 17 00:00:00 2001 From: HAHA Date: Mon, 13 Jun 2022 09:57:18 +0800 Subject: [PATCH 215/319] =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/partymember/IcPartyMemberPointDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml index 53ac16d111..b9712453a7 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml @@ -19,10 +19,10 @@ WARN_POINT = #{entity.warnPoint}, WARN_OPTIONS = #{entity.warnOptions} WHERE - PARTY_MEMBER_ID = #{entity.partyMemberId} - AND YEAR = #{entity.year}, + DEL_FLAG = '0' + AND PARTY_MEMBER_ID = #{entity.partyMemberId} + AND YEAR = #{entity.year} AND QUARTER = #{entity.quarter} - AND DEL_FLAG = '0' AND CUSTOMER_ID = #{entity.customerId} From d312746327366a7e49c2176423a41978f6e2bd5e Mon Sep 17 00:00:00 2001 From: HAHA Date: Mon, 13 Jun 2022 10:02:30 +0800 Subject: [PATCH 216/319] =?UTF-8?q?=E5=8E=BB=E6=8E=89id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/dto/partymember/IcPartyMemberPointDTO.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java index 90879a74f4..2fb53983a9 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberPointDTO.java @@ -16,10 +16,6 @@ public class IcPartyMemberPointDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 唯一标识 - */ - private String id; /** * 客户Id (customer.id) @@ -116,4 +112,4 @@ public class IcPartyMemberPointDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} From 0ea38237ced0b989701f8e9480dd9c5fb0bda25d Mon Sep 17 00:00:00 2001 From: HAHA Date: Mon, 13 Jun 2022 10:36:09 +0800 Subject: [PATCH 217/319] =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/service/impl/IcPartyMemberPointServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index b9dc97951c..0e228dfa95 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -161,7 +161,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { - PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); + PageHelper.startPage(form.getPageNo(), form.getPageSize()); List dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); PageInfo pageInfo = new PageInfo<>(dto); From 5e5a467b6334495ec2a9a3e16469e9be420cda73 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 13 Jun 2022 10:36:47 +0800 Subject: [PATCH 218/319] =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E8=AE=B0=E5=BD=95bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cPartyMemberPayRecordDetailController.java | 1 + ...PartyMemberPayRecordDetailServiceImpl.java | 42 ++++++++++++++----- .../IcPartyMemberPayRecordDetailDao.xml | 4 +- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java index 4c095ac243..68b1b5248b 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPayRecordDetailController.java @@ -52,6 +52,7 @@ public class IcPartyMemberPayRecordDetailController { @RequestMapping("page") public Result> page(@LoginUser TokenDto tokenDto, @RequestParam Map params){ params.put("customerId",tokenDto.getCustomerId()); + params.put("userId",tokenDto.getUserId()); // PageData page = icPartyMemberPayRecordDetailService.page(params); PageData page = icPartyMemberPayRecordDetailService.getPhrasePage(params); return new Result>().ok(page); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java index fb1d15b57e..ba21b74d5c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPayRecordDetailServiceImpl.java @@ -4,30 +4,29 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; 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.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; +import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; -import com.epmet.modules.partymember.entity.IcPartymemberStyleCategoryDictEntity; -import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordDetailRedis; import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; -import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; -import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; -import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; -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 javax.annotation.Resource; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -42,6 +41,8 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl page(Map params) { @@ -59,6 +60,25 @@ public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl getPhrasePage(Map params) { + String customerId = (String) params.get("customerId"); + String userId = (String) params.get("userId"); + String orgId = (String) params.get("orgId"); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); + if (null == staffInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取工作人员信息失败", "获取工作人员信息失败"); + } + if (StringUtils.isBlank(orgId)) { + //获取工作人员所属组织同级的党组织 + LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>(); + orgWrapper.eq(IcPartyOrgEntity::getCustomerId, customerId); + orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId()); + orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR); + IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper); + if (null == org) { + return new PageData<>(Collections.emptyList(), 0); + } + params.put("orgId",org.getId()); + } IPage page = getPage(params); List list = baseDao.selectListInfo(params); return new PageData<>(list, page.getTotal()); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml index aaf0abe2c1..f4898cea8a 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPayRecordDetailDao.xml @@ -33,6 +33,7 @@ left join ic_party_org org on org.ID = pm.SSZB and org.DEL_FLAG = 0 where prd.DEL_FLAG = 0 and prd.CUSTOMER_ID = #{customerId} + AND (pm.SSZB = #{orgId} OR pm.ORG_PIDS LIKE concat('%', #{orgId}, '%')) and pm.NAME like concat('%',#{name},'%') @@ -42,9 +43,6 @@ and pm.ID_CARD like concat('%',#{idCard},'%') - - and FIND_IN_SET(#{orgId},pm.ORG_PIDS) - and prd.YEAR = #{year} From 10640cad29c2c48a7f7ea013696a484988b8567e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 13 Jun 2022 10:54:04 +0800 Subject: [PATCH 219/319] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=92=8C=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=AE=BE=E7=BD=AE=20=E5=AF=B9=E5=BA=94=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=98=AF=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/RequirePermissionEnum.java | 8 +++++- .../epmet/controller/IcEventController.java | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 13b7d37057..17cb28a3f3 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -194,7 +194,13 @@ public enum RequirePermissionEnum { /** * 基层治理-群众直报 功能入口 */ - RESI_EVENT_MANAGE("resi_event_manage","基层治理:群众直报","基层治理-群众直报"); + RESI_EVENT_MANAGE("resi_event_manage","基层治理:群众直报","基层治理-群众直报"), + + /** + * 事件管理-工作端小程序列表、详情接口权限 + */ + IC_EVENT_LIST("ic_event_list","基层治理:事件管理","基层治理-事件管理列表"), + IC_EVENT_DETAIL("ic_event_detail","基层治理:事件管理","基层治理-事件管理详情"); private String key; private String name; 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 62c940ec5b..12416e4276 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 @@ -5,9 +5,11 @@ 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.annotation.RequirePermission; 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.enums.RequirePermissionEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -63,6 +65,17 @@ public class IcEventController { formDTO.setStaffId(tokenDto.getUserId()); return new Result>().ok(icEventService.list(formDTO)); } + /** + * @Author sun + * @Description 工作端小程序-事件管理-列表 + **/ + @RequestMapping("gov-list") + @RequirePermission(requirePermission = RequirePermissionEnum.IC_EVENT_LIST) + public Result> govList(@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){ @@ -268,6 +281,18 @@ public class IcEventController { ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); return new Result().ok(icEventService.detail(formDTO)); } + /** + * @Author sun + * @Description 工作端小程序-事件管理-详情 + **/ + @PostMapping("gov-detail") + @RequirePermission(requirePermission = RequirePermissionEnum.IC_EVENT_DETAIL) + public Result govDetail(@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)); + } /** * 事件分类分析- 饼图2,直属下级 事件数量 From 141f51186a8d212f9b341bab94034950ad372d04 Mon Sep 17 00:00:00 2001 From: HAHA Date: Mon, 13 Jun 2022 10:59:44 +0800 Subject: [PATCH 220/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/partymember/form/PartyMemberPointListFormDTO.java | 6 +++++- .../controller/IcPartyMemberPointController.java | 8 ++++---- .../service/impl/IcPartyMemberPointServiceImpl.java | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java index 5055126aec..4ca728461e 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberPointListFormDTO.java @@ -10,10 +10,14 @@ import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor -public class PartyMemberPointListFormDTO extends PageFormDTO implements Serializable { +public class PartyMemberPointListFormDTO implements Serializable { private static final long serialVersionUID = 5659445492756209830L; + private Integer page; + + private Integer limit; + /** * 所属党组织id */ diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java index 07af853ce1..fc7cdf2043 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java @@ -117,8 +117,8 @@ public class IcPartyMemberPointController { @PostMapping("export") public void export(@RequestBody PartyMemberPointListFormDTO formDto, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception { - formDto.setIsPage(false); - formDto.setPageSize(NumConstant.TEN_THOUSAND); + + formDto.setLimit(NumConstant.TEN_THOUSAND); ExcelWriter excelWriter = null; AtomicInteger i = new AtomicInteger(1); @@ -135,8 +135,8 @@ public class IcPartyMemberPointController { item.setIndex(i.getAndIncrement()); }); excelWriter.write(list, writeSheet); - formDto.setPageNo(formDto.getPageNo() + NumConstant.ONE); - } while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDto.getPageSize()); + formDto.setPage(formDto.getPage() + NumConstant.ONE); + } while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDto.getLimit()); } catch (EpmetException e) { response.reset(); response.setCharacterEncoding("UTF-8"); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index 0e228dfa95..5894ecd5b1 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -161,7 +161,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { - PageHelper.startPage(form.getPageNo(), form.getPageSize()); + PageHelper.startPage(form.getPage(), form.getLimit()); List dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); PageInfo pageInfo = new PageInfo<>(dto); @@ -192,7 +192,7 @@ public class IcPartyMemberPointServiceImpl extends BaseServiceImpl getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto) { - PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); + PageHelper.startPage(form.getPage(), form.getLimit()); List dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); PageInfo pageInfo = new PageInfo<>(dto); From 16e8fca1f9c5d75852d03ed5802d2c383ba54c46 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 13 Jun 2022 11:08:28 +0800 Subject: [PATCH 221/319] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=92=8C=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=AE=BE=E7=BD=AE=20=E5=AF=B9=E5=BA=94=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=98=AF=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/enums/RequirePermissionEnum.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 17cb28a3f3..d03143dd81 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -199,8 +199,8 @@ public enum RequirePermissionEnum { /** * 事件管理-工作端小程序列表、详情接口权限 */ - IC_EVENT_LIST("ic_event_list","基层治理:事件管理","基层治理-事件管理列表"), - IC_EVENT_DETAIL("ic_event_detail","基层治理:事件管理","基层治理-事件管理详情"); + IC_EVENT_LIST("ic_event_list","基层治理:事件管理:列表","基层治理-事件管理-列表"), + IC_EVENT_DETAIL("ic_event_detail","基层治理:事件管理:详情","基层治理-事件管理-详情"); private String key; private String name; From 21f9aed5aabcb920cfc318a7d627fca310d71749 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 13 Jun 2022 14:19:54 +0800 Subject: [PATCH 222/319] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=92=8C=E5=85=9A?= =?UTF-8?q?=E5=91=98=E4=BF=A1=E6=81=AF=E5=90=8C=E6=AD=A5bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 1 + 1 file changed, 1 insertion(+) 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 91f8e01f0a..07cf788fbc 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 @@ -306,6 +306,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl Date: Mon, 13 Jun 2022 14:35:43 +0800 Subject: [PATCH 223/319] =?UTF-8?q?=E9=9C=80=E6=B1=82=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BB=93=E6=A1=88=E6=97=B6=E6=9D=A5=E6=BA=90=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E7=AB=AF=E7=9A=84=E4=BA=8B=E4=BB=B6=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E4=B8=BA=E5=B1=85=E6=B0=91=E7=AB=AF=E6=8E=A8=E9=80=81=E7=AB=99?= =?UTF-8?q?=E5=86=85=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 21 +++++++++++++++++++ 1 file changed, 21 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 438cbc54ae..f1f10b52c5 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 @@ -1212,6 +1212,27 @@ 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("您上报的事件已完成,请查看。")); + 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())); + } + } + } /** From 5d1e05579c22c05da877af7910ffe5154cf712b4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 13 Jun 2022 14:37:59 +0800 Subject: [PATCH 224/319] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=BB=99=E5=B7=A5=E4=BD=9C=E7=AB=AF=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E7=9A=84=E4=BA=BA=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 29 +++++++++++++++++++ 1 file changed, 29 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 438cbc54ae..86a3a7a1b7 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 @@ -1458,6 +1458,35 @@ 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); + } } /** From 6fda7a5d57d35e15426a23a1534e26c60443d781 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 13 Jun 2022 15:05:54 +0800 Subject: [PATCH 225/319] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8A=E7=BA=A7?= =?UTF-8?q?=E5=85=9A=E7=BB=84=E7=BB=87=E5=88=97=E8=A1=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java | 3 ++- .../partyOrg/service/impl/IcPartyOrgServiceImpl.java | 4 ++-- .../src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml | 7 ++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java index c70ca0d728..93fa4d8a64 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java @@ -91,7 +91,8 @@ public interface IcPartyOrgDao extends BaseDao { * @params [agencyPid, customerId, code] * @return java.util.List */ - List selectParentOrgByAgencyPid(@Param("agencyPid") String agencyPid, + List selectParentOrgByAgencyPid(@Param("agencyId") String agencyId, + @Param("agencyPid") String agencyPid, @Param("customerId") String customerId, @Param("partyOrgType") String partyOrgType); diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java index d41d9eaa8b..70cb443864 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java @@ -262,10 +262,10 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl>().ok(list); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml index 959b99a790..1af1738da2 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml @@ -128,7 +128,12 @@ from ic_party_org where DEL_FLAG = 0 and CUSTOMER_ID=#{customerId} - and AGENCY_ID=#{agencyPid} + + AND (AGENCY_ID = #{agencyId} or AGENCY_PIDS LIKE concat('%',#{agencyId}, '%' )) + + + and AGENCY_ID=#{agencyPid} + and PARTY_ORG_TYPE = #{partyOrgType} From d3113e6d437efb1bc12bfb0e86290eedbedf1c97 Mon Sep 17 00:00:00 2001 From: YUJT Date: Mon, 13 Jun 2022 17:05:30 +0800 Subject: [PATCH 226/319] =?UTF-8?q?=E9=87=8F=E5=8C=96=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcPartyMemberPointController.java | 11 ----------- .../service/impl/IcPartyMemberPointServiceImpl.java | 7 ------- .../mapper/partymember/IcPartyMemberPointDao.xml | 8 +++----- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java index fc7cdf2043..569f1098c6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberPointController.java @@ -21,23 +21,13 @@ 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.IcFollowUpRecordDTO; -import com.epmet.dto.result.IcMoveInListResultDTO; -import com.epmet.dto.result.IcVaccineListResultDTO; -import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; -import com.epmet.modules.partymember.excel.IcPartyMemberExcel; import com.epmet.modules.partymember.excel.IcPartyMemberPointExcel; import com.epmet.modules.partymember.service.IcPartyMemberPointService; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; -import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; -import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; -import jdk.nashorn.internal.parser.Token; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +35,6 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.PrintWriter; -import java.util.Date; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java index 5894ecd5b1..e52fe10436 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberPointServiceImpl.java @@ -14,26 +14,19 @@ import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; import com.epmet.modules.partymember.redis.IcPartyMemberPointRedis; import com.epmet.modules.partymember.service.IcPartyMemberPointService; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; -import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; -import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; -import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; -import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import jdk.nashorn.internal.parser.Token; 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.sql.Time; import java.time.Year; import java.util.Arrays; -import java.util.Calendar; import java.util.List; import java.util.Map; diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml index b9712453a7..c2b6857a10 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberPointDao.xml @@ -44,12 +44,10 @@ AVG( a.WARN_POINT ) AS warnPoint FROM ic_party_member_point a - LEFT JOIN ic_party_member u ON a.PARTY_MEMBER_ID = u.id - AND a.DEL_FLAG = '0' - LEFT JOIN ic_party_org c ON c.id = u.sszb - AND c.DEL_FLAG = '0' + LEFT JOIN ic_party_member u ON a.PARTY_MEMBER_ID = u.id + LEFT JOIN ic_party_org c ON c.id = u.sszb - u.DEL_FLAG = '0' + u.DEL_FLAG = '0' AND a.DEL_FLAG = '0' AND c.DEL_FLAG = '0' AND u.CUSTOMER_ID = #{customerId} AND u.NAME = #{name} From b5488fdf4eb6889ea40ea2499f0dd72cc0066ca5 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 13 Jun 2022 18:11:00 +0800 Subject: [PATCH 227/319] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=92=8C=E5=85=9A?= =?UTF-8?q?=E5=91=98=E4=BF=A1=E6=81=AF=E5=90=8C=E6=AD=A5bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E6=98=AF=E5=90=A6=E5=85=8D=E5=AD=A6=E4=B9=A0?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/IDCardUtil.java | 132 ++++++++++++++++++ .../impl/IcPartyMemberServiceImpl.java | 15 ++ 2 files changed, 147 insertions(+) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java new file mode 100644 index 0000000000..3ec57c53f5 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IDCardUtil.java @@ -0,0 +1,132 @@ +package com.epmet.commons.tools.utils; + +import com.epmet.commons.tools.enums.GenderEnum; +import org.apache.commons.lang3.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/6/13 17:53 + */ +public class IDCardUtil { + /** + * 15位身份证号 + */ + private static final Integer FIFTEEN_ID_CARD=15; + /** + * 18位身份证号 + */ + private static final Integer EIGHTEEN_ID_CARD=18; + private static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + + /** + * 根据身份证号获取性别 + * @param idCard + * @return + */ + public static String getSex(String idCard){ + String sex =""; + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + if (Integer.parseInt(idCard.substring(14, 15)) % 2 == 0) { + sex = GenderEnum.WOMAN.getCode(); + } else { + sex = GenderEnum.MAN.getCode(); + } + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 判断性别 + if (Integer.parseInt(idCard.substring(16).substring(0, 1)) % 2 == 0) { + sex = GenderEnum.WOMAN.getCode(); + } else { + sex = GenderEnum.MAN.getCode(); + } + } + } + return sex; + } + + /** + * 根据身份证号获取年龄 + * @param idCard + * @return + */ + public static Integer getAge(String idCard){ + int age = 0; + Date date = new Date(); + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + // 身份证上的年份(15位身份证为1980年前的) + String uyear = "19" + idCard.substring(6, 8); + // 身份证上的月份 + String uyue = idCard.substring(8, 10); + // 当前年份 + String fyear = format.format(date).substring(0, 4); + // 当前月份 + String fyue = format.format(date).substring(5, 7); + if (Integer.parseInt(uyue) <= Integer.parseInt(fyue)) { + age = Integer.parseInt(fyear) - Integer.parseInt(uyear) + 1; + // 当前用户还没过生 + } else { + age = Integer.parseInt(fyear) - Integer.parseInt(uyear); + } + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 身份证上的年份 + String year = idCard.substring(6).substring(0, 4); + // 身份证上的月份 + String yue = idCard.substring(10).substring(0, 2); + // 当前年份 + String fyear = format.format(date).substring(0, 4); + // 当前月份 + String fyue = format.format(date).substring(5, 7); + // 当前月份大于用户出身的月份表示已过生日 + if (Integer.parseInt(yue) <= Integer.parseInt(fyue)) { + age = Integer.parseInt(fyear) - Integer.parseInt(year) + 1; + // 当前用户还没过生日 + } else { + age = Integer.parseInt(fyear) - Integer.parseInt(year); + } + } + } + return age; + } + + /** + * 获取出生日期 yyyy年MM月dd日 + * @param idCard + * @return + */ + public static String getBirthday(String idCard){ + String birthday=""; + String year=""; + String month=""; + String day=""; + if (StringUtils.isNotBlank(idCard)){ + //15位身份证号 + if (idCard.length() == FIFTEEN_ID_CARD){ + // 身份证上的年份(15位身份证为1980年前的) + year = "19" + idCard.substring(6, 8); + //身份证上的月份 + month = idCard.substring(8, 10); + //身份证上的日期 + day= idCard.substring(10, 12); + //18位身份证号 + }else if(idCard.length() == EIGHTEEN_ID_CARD){ + // 身份证上的年份 + year = idCard.substring(6).substring(0, 4); + // 身份证上的月份 + month = idCard.substring(10).substring(0, 2); + //身份证上的日期 + day=idCard.substring(12).substring(0,2); + } + birthday=year+"-"+month+"-"+day; + } + return birthday; + } +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 3045e59b24..7e4ecfc6ac 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -381,6 +381,21 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl= 70) { + entity.setIsMxx(NumConstant.ONE_STR); + } else { + entity.setIsMxx(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsLd())) { + entity.setIsLd(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsDyzxh())) { + entity.setIsDyzxh(NumConstant.ZERO_STR); + } + if (StringUtils.isBlank(entity.getIsTx())) { + entity.setIsTx(NumConstant.ZERO_STR); + } //判断党员是否已存在,有则更新,没有则添加 if (null != partyMember) { From c5acdbb09e64fc9cbba7ae398c0775bf3410e2c5 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 14 Jun 2022 10:10:11 +0800 Subject: [PATCH 228/319] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E7=BB=9F=E8=AE=A1bug?= 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 297d15dbd3..1510478bc4 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 @@ -75,7 +75,7 @@ AND g.CUSTOMER_ID = #{customerId} GROUP BY - g.CUSTOMER_ID + g.CUSTOMER_ID,t.NEIGHBOR_HOOD_ID + 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 99c8195b49..102983e37c 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 @@ -53,45 +53,52 @@ SELECT - rental_id, - grid_id, - house_id, - house_name, - house_address, - house_use, - house_area, - id_type, - id_card, - resident_name, - telephone, - curlive_address, - rent_use, - trouble_type, - renter_id, - renter_card_number, - renter_card_type, - renter_name, - renter_phone, - longitude, - latitude, - point_status, - plat_code + ca.rental_id, + ca.grid_id, + ca.house_id, + ca.house_name, + ca.house_address, + ca.house_use, + ca.house_area, + ca.id_type, + ca.id_card, + ca.resident_name, + ca.telephone, + ca.curlive_address, + ca.rent_use, + ca.trouble_type, + ca.renter_id, + ca.renter_card_number, + ca.renter_card_type, + ca.renter_name, + ca.renter_phone, + ca.longitude, + ca.latitude, + ca.point_status, + ca.plat_code, + vs.grid_name, + vs.community_name, + vs.street_name FROM - ca_rental + ca_rental as ca + left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id - delete_flag = 'normal' + ca.delete_flag = 'normal' - AND resident_name like '%${residentName}%' + AND ca.resident_name like '%${residentName}%' - AND house_name like '%${houseName}%' + AND ca.house_name like '%${houseName}%' - AND renter_name like '%${renterName}%' + AND ca.renter_name like '%${renterName}%' + + + AND vs.grid_id_path like '%${gridId}%' - order by grid_id,rental_id,id_card desc + order by ca.grid_id,ca.rental_id,ca.id_card desc SELECT - resident_id, - grid_id, - resident_property, - resident_type, - id_type, - id_card, - resident_name, - sex, - birthday, - nation, - telephone, - household_prov, - household_city, - household_county, - household_town, - household_village, - household_address_detail, - curlive_prov, - curlive_city, - curlive_county, - curlive_town, - curlive_village, - curlive_address_detail, - native_address_prov, - native_address_city, - native_address_county, - former_name, - education, - occupation, - occupation_type, - service_address, - marriage_status, - party, - religious, - conversion_state, - nationality, - plat_code + ca.resident_id, + ca.grid_id, + ca.resident_property, + ca.resident_type, + ca.id_type, + ca.id_card, + ca.resident_name, + ca.sex, + ca.birthday, + ca.nation, + ca.telephone, + ca.household_prov, + ca.household_city, + ca.household_county, + ca.household_town, + ca.household_village, + ca.household_address_detail, + ca.curlive_prov, + ca.curlive_city, + ca.curlive_county, + ca.curlive_town, + ca.curlive_village, + ca.curlive_address_detail, + ca.native_address_prov, + ca.native_address_city, + ca.native_address_county, + ca.former_name, + ca.education, + ca.occupation, + ca.occupation_type, + ca.service_address, + ca.marriage_status, + ca.party, + ca.religious, + ca.conversion_state, + ca.nationality, + ca.plat_code, + vs.grid_name, + vs.community_name, + vs.street_name FROM - ca_resident + ca_resident as ca + left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id - delete_flag = 'normal' + ca.delete_flag = 'normal' - AND resident_name like '%${residentName}%' + AND ca.resident_name like '%${residentName}%' - AND id_card like '%${idCard}%' + AND ca.id_card like '%${idCard}%' - AND telephone like '%${telephone}%' + AND ca.telephone like '%${telephone}%' + + + AND vs.grid_id_path like '%${gridId}%' - order by grid_id,resident_id,id_card desc + order by ca.grid_id,ca.resident_id,ca.id_card desc SELECT - rotators_id, - id_card, - id_type, - rotators_name, - former_name, - sex, - birthday, - nation, - native_address_prov, - native_address_city, - native_address_country, - marriage_status, - party, - education, - religious, - occupation_type, - occupation, - service_address, - telephone, - household_address_prov, - household_address_city, - household_address_country, - household_address_town, - household_address_village, - household_address_detail, - curlive_address_prov, - curlive_address_city, - curlive_address_country, - curlive_address_town, - curlive_address_village, - curlive_address_detail, - inflow_reason, - certificate_type, - certificate_number, - sign_date, - end_date, - residence_type, - is_focus_person + ca.rotators_id, + ca.id_card, + ca.id_type, + ca.rotators_name, + ca.former_name, + ca.sex, + ca.birthday, + ca.nation, + ca.native_address_prov, + ca.native_address_city, + ca.native_address_country, + ca.marriage_status, + ca.party, + ca.education, + ca.religious, + ca.occupation_type, + ca.occupation, + ca.service_address, + ca.telephone, + ca.household_address_prov, + ca.household_address_city, + ca.household_address_country, + ca.household_address_town, + ca.household_address_village, + ca.household_address_detail, + ca.curlive_address_prov, + ca.curlive_address_city, + ca.curlive_address_country, + ca.curlive_address_town, + ca.curlive_address_village, + ca.curlive_address_detail, + ca.inflow_reason, + ca.certificate_type, + ca.certificate_number, + ca.sign_date, + ca.end_date, + ca.residence_type, + ca.is_focus_person, + vs.grid_name, + vs.community_name, + vs.street_name FROM - ca_rotators + ca_rotators as ca + left join view_grid_comm_street as vs on vs.grid_id = ca.grid_id - delete_flag = 'normal' + ca.delete_flag = 'normal' - AND rotators_name like '%${rotatorsName}%' + AND ca.rotators_name like '%${rotatorsName}%' - AND id_card like '%${idCard}%' + AND ca.id_card like '%${idCard}%' - AND telephone like '%${telephone}%' + AND ca.telephone like '%${telephone}%' + + + AND vs.grid_id_path like '%${gridId}%' - order by grid_id,rotators_id,id_card desc + order by ca.grid_id,ca.rotators_id,ca.id_card desc From 9d9260c4869eb74562d9ef507f07ceaa9e66f83c Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 15 Jun 2022 18:04:52 +0800 Subject: [PATCH 272/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CaLoudongDao.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 57f4c256c0..0ecbc89c1c 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 @@ -122,7 +122,9 @@ ca.grid_name as label, ca.parent_id as pid FROM - ca_bm_grid ca + ca_bm_grid ca + WHERE + ca.grid_level IN ('level2','level3','level4') From 737d4baca08b918593fd644e66901e08a47e821d Mon Sep 17 00:00:00 2001 From: YUJT Date: Wed, 15 Jun 2022 18:25:31 +0800 Subject: [PATCH 273/319] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyActivityServiceImpl.java | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index ce0b172893..c645ffbc55 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -179,8 +179,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(entity.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); List services = icActivityServiceRelationService.getServiceList(id); List serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); dto.setServiceMatterList(services); @@ -213,7 +213,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取联建单位 IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); unitDTO.setAgencyId(staffInfoCache.getAgencyId()); @@ -341,43 +341,43 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl%s", obj.getRowNum())); iterator.remove(); - } else if(StringUtils.isBlank(obj.getTarget())) { + } else if (StringUtils.isBlank(obj.getTarget())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动目标为空"); fileList.add(failed); log.warn(String.format("活动目标为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getContent())) { + } else if (StringUtils.isBlank(obj.getContent())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动内容为空"); fileList.add(failed); log.warn(String.format("活动内容为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getActivityTime())) { + } else if (StringUtils.isBlank(obj.getActivityTime())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动时间为空"); fileList.add(failed); log.warn(String.format("活动时间为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getAddress())) { + } else if (StringUtils.isBlank(obj.getAddress())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址为空"); fileList.add(failed); log.warn(String.format("活动地址为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getLatitude())) { + } else if (StringUtils.isBlank(obj.getLatitude())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址纬度为空"); fileList.add(failed); log.warn(String.format("活动地址纬度为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getLongitude())) { + } else if (StringUtils.isBlank(obj.getLongitude())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动地址经度为空"); fileList.add(failed); log.warn(String.format("活动地址经度为空,行号->%s", obj.getRowNum())); - } else if(StringUtils.isBlank(obj.getResult())) { + } else if (StringUtils.isBlank(obj.getResult())) { IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); failed.setErrorInfo("活动结果为空"); fileList.add(failed); @@ -540,7 +540,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO) { - if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) { + // unitId 不为空(按单位查询)时,不需要限制活动创建时间 + if (null == formDTO.getStartTime() && null == formDTO.getEndTime() && StringUtils.isBlank(formDTO.getUnitId())) { setDate(formDTO); } PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); @@ -554,8 +555,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 - List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //数据组装 dtoList.forEach(dto -> { //联建单位ID与单位名匹配 @@ -617,6 +618,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl Date: Wed, 15 Jun 2022 19:06:56 +0800 Subject: [PATCH 274/319] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java index b7a6a6374b..ebed45b18b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java @@ -157,7 +157,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { public WxResult getPrivacySetting(String accessToken) { WxResult result = new WxResult<>(); String url = WxMaCodeConstant.SET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; - Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, "{}"); + Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, "{\"privacy_ver\":2}"); log.info("getPrivacySetting result:{}", JSON.toJSONString(submitResult)); if (!submitResult.success()) { result.setErrorCode(submitResult.getCode()); @@ -168,7 +168,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { JSONArray jsonArray = jsonObject.getJSONArray(SETTING_LIST); - if (jsonArray.size() == 9){ + if (jsonArray != null || jsonArray.size() == 9){ result.setErrorCode(9999); result.setErrorMsg("用户隐私权限未设置或设置不完整"); return result; @@ -181,7 +181,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { @Override public WxResult setPrivacySetting(String accessToken) { //todo 目前设置9个隐私权限 - String param = "{\"owner_setting\":{\"contact_email\":\"eshitong@elink-cn.com\",\"contact_phone\":\"\",\"contact_qq\":\"\",\"contact_weixin\":\"\",\"ext_file_media_id\":\"\",\"notice_method\":\"通知\",\"store_expire_timestamp\":\"\"},\"setting_list\":[{\"privacy_key\":\"UserInfo\",\"privacy_text\":\"用户个人中心显示用户头像及昵称等\"},{\"privacy_key\":\"Location\",\"privacy_text\":\"发表话题等功能时获取位置信息\"},{\"privacy_key\":\"Record\",\"privacy_text\":\"录音发话题等\"},{\"privacy_key\":\"Album\",\"privacy_text\":\"上传照片发话题等\"},{\"privacy_key\":\"AlbumWriteOnly\",\"privacy_text\":\"下载党建声音图片或项目附近等\"},{\"privacy_key\":\"Camera\",\"privacy_text\":\"通过相机拍照发话题反应问题等\"},{\"privacy_key\":\"PhoneNumber\",\"privacy_text\":\"通过手机号为用户开通账号,更新用户基础信息\"},{\"privacy_key\":\"MessageFile\",\"privacy_text\":\"发表话题等可以选择文件上传\"},{\"privacy_key\":\"ChooseLocation\",\"privacy_text\":\"用户巡查上报\"}],\"privacy_ver\":2}\n"; + String param = "{\"owner_setting\":{\"contact_email\":\"eshitong@elink-cn.com\",\"contact_phone\":\"\",\"contact_qq\":\"\",\"contact_weixin\":\"\",\"ext_file_media_id\":\"\",\"notice_method\":\"通知\",\"store_expire_timestamp\":\"\"},\"setting_list\":[{\"privacy_key\":\"UserInfo\",\"privacy_text\":\"用户个人中心显示用户头像及昵称等\"},{\"privacy_key\":\"Location\",\"privacy_text\":\"发表话题等功能时获取位置信息\"},{\"privacy_key\":\"Record\",\"privacy_text\":\"录音发话题等\"},{\"privacy_key\":\"Album\",\"privacy_text\":\"上传照片发话题等\"},{\"privacy_key\":\"AlbumWriteOnly\",\"privacy_text\":\"下载党建声音图片或项目附近等\"},{\"privacy_key\":\"Camera\",\"privacy_text\":\"通过相机拍照发话题反应问题等\"},{\"privacy_key\":\"PhoneNumber\",\"privacy_text\":\"通过手机号为用户开通账号,更新用户基础信息\"},{\"privacy_key\":\"MessageFile\",\"privacy_text\":\"发表话题等可以选择文件上传\"},{\"privacy_key\":\"ChooseLocation\",\"privacy_text\":\"用户巡查上报\"}],\"privacy_ver\":2}"; WxResult result = new WxResult<>(); String url = WxMaCodeConstant.SET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, param); From c49f8d32caa59609eb0ba79dccdc9fe3122651c4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 15 Jun 2022 19:09:08 +0800 Subject: [PATCH 275/319] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=A1=E6=A0=B8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java index ebed45b18b..52d258308a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java @@ -156,7 +156,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { @Override public WxResult getPrivacySetting(String accessToken) { WxResult result = new WxResult<>(); - String url = WxMaCodeConstant.SET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; + String url = WxMaCodeConstant.GET_PRIVACY_SETTING_URL + "?" + "access_token=" + accessToken; Result submitResult = HttpClientManager.getInstance().sendPostByJSON(url, "{\"privacy_ver\":2}"); log.info("getPrivacySetting result:{}", JSON.toJSONString(submitResult)); if (!submitResult.success()) { From 58e4871df9be6642003b69cfa57b97dd668ba301 Mon Sep 17 00:00:00 2001 From: YUJT Date: Wed, 15 Jun 2022 19:41:37 +0800 Subject: [PATCH 276/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcPartyActivityDao.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index 1117174bcc..acfb99d309 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -163,7 +163,9 @@ AND ACTIVITY_TIME <= #{endTime} - AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + + AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + From 9d2acc102cd0c8e1d5ee1c1a3a98067afe5259f7 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 10:04:32 +0800 Subject: [PATCH 277/319] =?UTF-8?q?flyway=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.4__create_wgh_table.sql | 324 ++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql new file mode 100644 index 0000000000..d63a579232 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql @@ -0,0 +1,324 @@ +CREATE TABLE `ca_bm_grid` ( + `grid_id` bigint(20) NOT NULL COMMENT '网格ID', + `grid_code` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '网格编码。人工填写,编码规则业务规定,不允许重复。', + `grid_name` varchar(200) COLLATE utf8_bin NOT NULL COMMENT '网格名称', + `gb_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '行政区划的国标编码', + `parent_id` bigint(20) DEFAULT NULL COMMENT '上级网格ID', + `parent_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '上级网格编码', + `grid_classification` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等', + `grid_level` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '网格层级。网格层级表的层级\n根据【网格层级表】的层级关系动态展示。\n查询【网格层级表】层级 条件:上层级=网格树返回的网格层级', + `grid_property` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他', + `is_end` char(1) COLLATE utf8_bin NOT NULL COMMENT '是否最后一级:0否 1是', + `grid_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '网格地址', + `grid_introduce` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT '网格介绍', + `grid_picture` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '宣传图片', + `regin_scope_desc` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT '地图区域范围', + `grid_sort` int(10) DEFAULT NULL COMMENT '展示顺序', + `point_status` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '标绘状态', + `grid_em_center` bigint(10) DEFAULT NULL COMMENT '事件上报中心', + `grid_begin_time` datetime DEFAULT NULL COMMENT '初始日期', + `grid_end_time` datetime DEFAULT NULL COMMENT '终止日期', + `grid_area` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '面积', + `is_valid` varchar(10) COLLATE utf8_bin DEFAULT '1' COMMENT '是否有效', + `create_by` bigint(20) NOT NULL COMMENT '创建人', + `create_date` datetime NOT NULL COMMENT '创建时间', + `update_by` bigint(20) NOT NULL, + `update_date` datetime NOT NULL, + `delete_flag` varchar(10) COLLATE utf8_bin NOT NULL DEFAULT 'normal' COMMENT '删除状态: 字典值:normal正常,删除deleted', + `versions` int(10) 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 COMMENT '网格党组织类型', + `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '党组织编码', + `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段', + `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段', + `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段', + `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段', + `attribute9` datetime DEFAULT NULL COMMENT '扩展字段', + `attribute10` datetime DEFAULT NULL COMMENT '扩展字段', + PRIMARY KEY (`grid_id`) USING BTREE, + KEY `SELECT_PARENT` (`parent_id`) USING BTREE, + KEY `idx_grid_grid_id` (`grid_id`) USING BTREE, + KEY `idx_grid_grid_sort` (`grid_sort`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +CREATE TABLE `wgh_base_grid` ( + `coordinate_info` text, + `grid_name` varchar(100) DEFAULT NULL, + `sub_district_office` varchar(100) DEFAULT NULL, + `community` varchar(100) DEFAULT NULL, + `street_code` varchar(100) DEFAULT NULL, + `grid_code` varchar(100) DEFAULT NULL, + `community_code` varchar(100) DEFAULT NULL, + `longitude` varchar(100) DEFAULT NULL, + `latitude` varchar(100) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `wgh_community` ( + `coordinate_info` text, + `street_name` varchar(100) DEFAULT NULL, + `street_code` varchar(100) DEFAULT NULL, + `community_name` varchar(100) DEFAULT NULL, + `community_code` varchar(100) DEFAULT NULL, + `longitude` varchar(100) DEFAULT NULL, + `latitude` varchar(100) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `wgh_dywg` ( + `OBJECTID` int(11) NOT NULL, + `BGNAME` varchar(200) DEFAULT NULL COMMENT '网格名称', + `STREET` varchar(20) DEFAULT NULL COMMENT '所属街镇', + `COMMUNITY` varchar(50) DEFAULT NULL COMMENT '所属社区', + `BGSQUA` double DEFAULT NULL COMMENT '网格面积', + `ORDATE` datetime DEFAULT NULL COMMENT '初始时间', + `CHDATE` datetime DEFAULT NULL COMMENT '变更时间', + `NOTE` varchar(500) DEFAULT NULL COMMENT '备注', + `CONTACTS` varchar(50) DEFAULT NULL, + `TELPHONE` varchar(100) DEFAULT NULL COMMENT '联系电话', + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='单元网格'; + +CREATE TABLE `wgh_jdb` ( + `OBJECTID_1` varchar(50) DEFAULT NULL, + `OBJECTID` varchar(50) DEFAULT NULL, + `MC` varchar(60) DEFAULT NULL COMMENT '街道名称', + `person_in_charge` varchar(20) DEFAULT NULL COMMENT '责任人', + `phone` varchar(50) DEFAULT NULL COMMENT '联系电话', + `SHAPE_LENG` double DEFAULT NULL, + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='街道办'; + +CREATE TABLE `wgh_jqz` ( + `OBJECTID` int(11) DEFAULT NULL, + `XH` varchar(500) DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', + `AREA` double DEFAULT NULL, + `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) DEFAULT NULL COMMENT '等级', + `nature` varchar(500) DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) DEFAULT NULL, + `LAYER` varchar(50) DEFAULT NULL, + `SSJDB` varchar(50) DEFAULT NULL, + `AMOUNT` varchar(50) DEFAULT NULL COMMENT '数量', + `YJCS` varchar(100) DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='加气站信息'; + +CREATE TABLE `wgh_jxcs` ( + `OBJECTID` varchar(255) DEFAULT NULL, + `JSON_INFO` varchar(255) DEFAULT NULL, + `CREAT_TIME` varchar(255) DEFAULT NULL, + `SSJD` varchar(255) DEFAULT NULL COMMENT '所属街道', + `SSSQ` varchar(255) DEFAULT NULL COMMENT '所属社区', + `DLM` varchar(255) DEFAULT NULL COMMENT '道路名', + `MPH` varchar(255) DEFAULT NULL COMMENT '门牌号', + `NAME` varchar(255) DEFAULT NULL COMMENT '名称', + `ZTLX` varchar(255) DEFAULT NULL, + `TYPE` varchar(255) DEFAULT NULL COMMENT '子类型', + `XYDM` varchar(255) DEFAULT NULL COMMENT '统一社会信用代码', + `LXR` varchar(255) DEFAULT NULL COMMENT '联系人', + `LXDH` varchar(255) DEFAULT NULL COMMENT '联系电话', + `USER_NAME` varchar(255) DEFAULT NULL, + `BZ` varchar(255) DEFAULT NULL COMMENT '备注', + `AVAILABLE` varchar(255) DEFAULT NULL, + `ID` varchar(255) DEFAULT NULL, + `USER_ID` varchar(255) DEFAULT NULL COMMENT '编辑人ID', + `UPDATE_TIM` varchar(255) DEFAULT NULL COMMENT '编辑人姓名', + `INSERT_TIME` varchar(255) DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='九小场所信息'; + +CREATE TABLE `wgh_jyz` ( + `OBJECTID` int(11) DEFAULT NULL, + `XH` varchar(500) DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', + `AREA` double DEFAULT NULL, + `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) DEFAULT NULL COMMENT '等级', + `nature` varchar(500) DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) DEFAULT NULL, + `LAYER` varchar(50) DEFAULT NULL, + `SSJDB` varchar(50) DEFAULT NULL, + `AMOUNT` varchar(300) DEFAULT NULL COMMENT '数量', + `YJCS` varchar(260) DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='加油站'; + +CREATE TABLE `wgh_sjxxb` ( + `OBJECTID_1` int(11) DEFAULT NULL, + `OBJECTID` double DEFAULT NULL, + `INFOSOURCENAME` varchar(700) DEFAULT NULL COMMENT '事件来源', + `INFOTYPENAME` varchar(700) DEFAULT NULL COMMENT '事件类别', + `COMMUNITYNAME` varchar(700) DEFAULT NULL COMMENT '社区名称', + `DESCRIPTION` varchar(700) DEFAULT NULL COMMENT '事件描述', + `TASKID` varchar(500) DEFAULT NULL, + `CASESN` varchar(500) DEFAULT NULL, + `ADDRESS` varchar(700) DEFAULT NULL COMMENT '事件地址', + `STATUSNAME` varchar(700) DEFAULT NULL COMMENT '事件状态', + `INFOBCNAME` varchar(700) DEFAULT NULL, + `INFOSCNAME` varchar(700) DEFAULT NULL, + `STREETNAME` varchar(700) DEFAULT NULL COMMENT '街道名称', + `DISCOVERTIME` datetime DEFAULT NULL, + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件信息'; + +CREATE TABLE `wgh_sqxx` ( + `OBJECTID` int(11) DEFAULT NULL, + `COMMUAREA` double DEFAULT NULL, + `BELONGTO` varchar(100) DEFAULT NULL, + `CONTACTS` varchar(100) DEFAULT NULL, + `TELPHONE` varchar(100) DEFAULT NULL, + `number_of_grid` double DEFAULT NULL, + `street_code` varchar(100) DEFAULT NULL, + `community_code` varchar(100) DEFAULT NULL, + `COMMNAME` varchar(200) DEFAULT NULL, + `JDCJGB` varchar(200) DEFAULT NULL, + `WGZ` varchar(100) DEFAULT NULL, + `police_name` varchar(500) DEFAULT NULL, + `traffic_police_phone` double DEFAULT NULL, + `traffic_police_company` varchar(500) DEFAULT NULL, + `peo_police_name` varchar(500) DEFAULT NULL, + `peo_police_phone` varchar(500) DEFAULT NULL, + `police_station` varchar(500) DEFAULT NULL, + `WGY` varchar(200) DEFAULT NULL, + `JDLXKS` varchar(200) DEFAULT NULL, + `DDY` varchar(200) DEFAULT NULL, + `ZHZFXM` varchar(100) DEFAULT NULL, + `ZHZFDH` varchar(100) DEFAULT NULL, + `ZHZFBM` varchar(100) DEFAULT NULL, + `insert_time` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `wgh_subdistrict_office` ( + `coordinate_info` text, + `street_name` varchar(100) DEFAULT NULL, + `street_code` varchar(100) DEFAULT NULL, + `longitude` varchar(100) DEFAULT NULL, + `latitude` varchar(100) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `wgh_szcgwgh` ( + `OBJECTID` int(11) DEFAULT NULL, + `NOTE` varchar(200) DEFAULT NULL COMMENT '备注', + `SSSQ` varchar(200) DEFAULT NULL, + `SSJD` varchar(200) DEFAULT NULL, + `ID` varchar(200) DEFAULT NULL, + `insert_time` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数字城管网格化信息'; + +CREATE TABLE `wgh_szzrwg` ( + `OBJECTID` int(11) DEFAULT NULL, + `NOTE` varchar(100) DEFAULT NULL COMMENT '备注', + `NAME` varchar(100) DEFAULT NULL COMMENT '责任单位', + `PRINCIPAL` varchar(100) DEFAULT NULL COMMENT '监管人', + `PHONE` varchar(100) DEFAULT NULL COMMENT '联系方式', + `insert_time` datetime DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='市政责任网格信息'; + +CREATE TABLE `wgh_whpdw` ( + `OBJECTID` int(11) DEFAULT NULL, + `XH` varchar(500) DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', + `AREA` double DEFAULT NULL, + `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', + `PERSON` varchar(500) DEFAULT NULL COMMENT '安全负责人', + `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(500) DEFAULT NULL COMMENT '数量', + `GRADE` varchar(500) DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(500) DEFAULT NULL COMMENT '性质', + `YJCS` varchar(500) DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(500) DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) DEFAULT NULL, + `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '主要负责人', + `USER` varchar(500) DEFAULT NULL COMMENT '用途', + `LAYER` varchar(100) DEFAULT NULL, + `SSJDB` varchar(100) DEFAULT NULL, + `insert_time` timestamp NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='危化品单位信息'; + +CREATE TABLE `wgh_yjbmcs` ( + `OBJECTID` int(11) DEFAULT NULL, + `GRADE` varchar(500) DEFAULT NULL, + `ADRESS` varchar(500) DEFAULT NULL COMMENT '地址', + `AREA` varchar(500) DEFAULT NULL COMMENT '面积(㎡)', + `RNNS` varchar(500) DEFAULT NULL COMMENT '容纳人数', + `SFBSP` varchar(500) DEFAULT NULL, + `ZYSBCS` varchar(500) DEFAULT NULL, + `FZR` varchar(500) DEFAULT NULL, + `ZGDW` varchar(500) DEFAULT NULL, + `NAME` varchar(500) DEFAULT NULL, + `FZRTEL` varchar(100) DEFAULT NULL, + `SSJD` varchar(100) DEFAULT NULL, + `INSERT_TIME` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应急避难场所信息'; + +CREATE TABLE `wgh_yqhjz` ( + `OBJECTID` int(11) DEFAULT NULL, + `XH` varchar(1000) DEFAULT NULL COMMENT '序号', + `NAME` varchar(1000) DEFAULT NULL COMMENT '单位名称', + `AREA` double DEFAULT NULL, + `SPACE` varchar(1000) DEFAULT NULL COMMENT '周边安全间距', + `TYPE` varchar(1000) DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(1000) DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(1000) DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(1000) DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(1000) DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(1000) DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(1000) DEFAULT NULL COMMENT '数量', + `GRADE` varchar(1000) DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(1000) DEFAULT NULL COMMENT '性质', + `YJCS` varchar(1000) DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(1000) DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) DEFAULT NULL COMMENT '简称', + `LAYER` varchar(100) DEFAULT NULL COMMENT '所在图层', + `SSJDB` varchar(100) DEFAULT NULL COMMENT '所属街道办', + `PROBLEM` varchar(100) DEFAULT NULL COMMENT '存在问题', + `insert_time` timestamp NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='油气合建站信息'; + +CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT +`g4`.`grid_id` AS `grid_id`, +`g4`.`grid_name` AS `grid_name`, +`g3`.`grid_id` AS `community_id`, +`g3`.`grid_name` AS `community_name`, +`g2`.`grid_id` AS `street_id`, +`g2`.`grid_name` AS `street_name`, +concat( `g2`.`grid_id`, ':', `g3`.`grid_id`, ':', `g4`.`grid_id` ) AS `grid_id_path` +FROM + (( + `ca_bm_grid` `g4` + JOIN `ca_bm_grid` `g3` ON ((( + `g3`.`grid_id` = `g4`.`parent_id` + ) + AND ( `g3`.`grid_level` = 'level3' ) + AND ( `g3`.`delete_flag` = 'normal' )))) + JOIN `ca_bm_grid` `g2` ON ((( + `g2`.`grid_id` = `g3`.`parent_id` + ) + AND ( `g2`.`grid_level` = 'level2' ) + AND ( `g2`.`delete_flag` = 'normal' )))) +WHERE + (( + `g4`.`grid_level` = 'level4' + ) + AND ( `g4`.`delete_flag` = 'normal' )) From 7d0b4f24da9564b56dfba3fe7fd6ed6f48f3978f Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 10:16:56 +0800 Subject: [PATCH 278/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9flyway=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.4__create_wgh_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql index d63a579232..85dddfa3d3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql @@ -296,7 +296,7 @@ CREATE TABLE `wgh_yqhjz` ( `insert_time` timestamp NULL DEFAULT NULL COMMENT '插入日期' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='油气合建站信息'; -CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT +CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT `g4`.`grid_id` AS `grid_id`, `g4`.`grid_name` AS `grid_name`, `g3`.`grid_id` AS `community_id`, From 21979136d2115d7f3bf02b7e5b10eef71bc43440 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 10:44:57 +0800 Subject: [PATCH 279/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9flyway=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.5__create_view.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql new file mode 100644 index 0000000000..51ee2dd094 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.5__create_view.sql @@ -0,0 +1,26 @@ +CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT +`g4`.`grid_id` AS `grid_id`, +`g4`.`grid_name` AS `grid_name`, +`g3`.`grid_id` AS `community_id`, +`g3`.`grid_name` AS `community_name`, +`g2`.`grid_id` AS `street_id`, +`g2`.`grid_name` AS `street_name`, +concat( `g2`.`grid_id`, ':', `g3`.`grid_id`, ':', `g4`.`grid_id` ) AS `grid_id_path` +FROM + (( + `ca_bm_grid` `g4` + JOIN `ca_bm_grid` `g3` ON ((( + `g3`.`grid_id` = `g4`.`parent_id` + ) + AND ( `g3`.`grid_level` = 'level3' ) + AND ( `g3`.`delete_flag` = 'normal' )))) + JOIN `ca_bm_grid` `g2` ON ((( + `g2`.`grid_id` = `g3`.`parent_id` + ) + AND ( `g2`.`grid_level` = 'level2' ) + AND ( `g2`.`delete_flag` = 'normal' )))) +WHERE + (( + `g4`.`grid_level` = 'level4' + ) + AND ( `g4`.`delete_flag` = 'normal' )) From a7b09ff56fad4bcff7cd35178c62dd80e8a52041 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 11:02:27 +0800 Subject: [PATCH 280/319] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/opendata/dto/result/CaLoudongResultDTO.java | 6 ++++++ .../com/epmet/opendata/dto/result/CaPingfangResultDTO.java | 6 ++++++ .../com/epmet/opendata/dto/result/CaRentalResultDTO.java | 6 ++++++ .../com/epmet/opendata/dto/result/CaResidentResultDTO.java | 6 ++++++ .../com/epmet/opendata/dto/result/CaRotatorsResultDTO.java | 6 ++++++ .../src/main/resources/mapper/CaLoudongDao.xml | 2 +- .../src/main/resources/mapper/CaPingfangDao.xml | 2 +- .../src/main/resources/mapper/CaRentalDao.xml | 2 +- .../src/main/resources/mapper/CaResidentDao.xml | 2 +- .../src/main/resources/mapper/CaRotatorsDao.xml | 2 +- 10 files changed, 35 insertions(+), 5 deletions(-) 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 index 71f91a0aee..35b101ce32 100644 --- 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 @@ -12,6 +12,12 @@ public class CaLoudongResultDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = 2835612060476537433L; + private String gridName; + + private String comName; + + private String streetName; + /** * 楼栋ID */ 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 index 21500d78d6..c4f1bfe23e 100644 --- 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 @@ -12,6 +12,12 @@ public class CaPingfangResultDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = 3689421598802326474L; + private String gridName; + + private String comName; + + private String streetName; + /** * 楼栋ID */ 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 index 9264d24aac..b5c5b0bbd6 100644 --- 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 @@ -10,6 +10,12 @@ public class CaRentalResultDTO implements Serializable { private static final long serialVersionUID = -1721373620271590333L; + private String gridName; + + private String comName; + + private String streetName; + /** * 出租房ID */ 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 index 8fac0b7cba..a94247a9ba 100644 --- 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 @@ -10,6 +10,12 @@ public class CaResidentResultDTO implements Serializable { private static final long serialVersionUID = 3876909002181822355L; + private String gridName; + + private String comName; + + private String streetName; + /** * 人口ID */ 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 index 7736d81e41..04a5895ad8 100644 --- 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 @@ -10,6 +10,12 @@ public class CaRotatorsResultDTO implements Serializable { private static final long serialVersionUID = -5388784241677803257L; + private String gridName; + + private String comName; + + private String streetName; + /** * 主键id */ 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 0ecbc89c1c..325c224424 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 @@ -84,7 +84,7 @@ ca.plat_code, ca.community_id, vs.grid_name, - vs.community_name, + vs.community_name as comName, vs.street_name FROM ca_loudong as ca 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 102983e37c..f3c7bb973e 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 @@ -81,7 +81,7 @@ ca.plat_code, ca.community_id, vs.grid_name, - vs.community_name, + vs.community_name as comName, vs.street_name FROM ca_pingfang as ca 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 e65d1e64f1..c350e49bb1 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 @@ -73,7 +73,7 @@ ca.point_status, ca.plat_code, vs.grid_name, - vs.community_name, + vs.community_name as comName, vs.street_name FROM ca_rental as ca 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 3e42d02ef5..0f00defec3 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 @@ -102,7 +102,7 @@ ca.nationality, ca.plat_code, vs.grid_name, - vs.community_name, + vs.community_name as comName, vs.street_name FROM ca_resident as ca 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 a4628f4d65..0c109d744b 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 @@ -105,7 +105,7 @@ ca.residence_type, ca.is_focus_person, vs.grid_name, - vs.community_name, + vs.community_name as comName, vs.street_name FROM ca_rotators as ca From a4932fc1dac577b93ea60261ebbbc70861a99932 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 11:15:09 +0800 Subject: [PATCH 281/319] =?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 --- .../db/migration/V0.0.4__create_wgh_table.sql | 642 +++++++++--------- 1 file changed, 338 insertions(+), 304 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql index 85dddfa3d3..c8fb0c832d 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.4__create_wgh_table.sql @@ -1,324 +1,358 @@ -CREATE TABLE `ca_bm_grid` ( +DROP TABLE IF EXISTS `ca_bm_grid`; +CREATE TABLE `ca_bm_grid` ( `grid_id` bigint(20) NOT NULL COMMENT '网格ID', - `grid_code` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '网格编码。人工填写,编码规则业务规定,不允许重复。', - `grid_name` varchar(200) COLLATE utf8_bin NOT NULL COMMENT '网格名称', - `gb_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '行政区划的国标编码', - `parent_id` bigint(20) DEFAULT NULL COMMENT '上级网格ID', - `parent_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '上级网格编码', - `grid_classification` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等', - `grid_level` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '网格层级。网格层级表的层级\n根据【网格层级表】的层级关系动态展示。\n查询【网格层级表】层级 条件:上层级=网格树返回的网格层级', - `grid_property` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他', - `is_end` char(1) COLLATE utf8_bin NOT NULL COMMENT '是否最后一级:0否 1是', - `grid_address` varchar(200) COLLATE utf8_bin DEFAULT NULL COMMENT '网格地址', - `grid_introduce` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT '网格介绍', - `grid_picture` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '宣传图片', - `regin_scope_desc` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT '地图区域范围', - `grid_sort` int(10) DEFAULT NULL COMMENT '展示顺序', - `point_status` varchar(10) COLLATE utf8_bin NOT NULL COMMENT '标绘状态', - `grid_em_center` bigint(10) DEFAULT NULL COMMENT '事件上报中心', - `grid_begin_time` datetime DEFAULT NULL COMMENT '初始日期', - `grid_end_time` datetime DEFAULT NULL COMMENT '终止日期', - `grid_area` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '面积', - `is_valid` varchar(10) COLLATE utf8_bin DEFAULT '1' COMMENT '是否有效', + `grid_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格编码。人工填写,编码规则业务规定,不允许重复。', + `grid_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格名称', + `gb_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '行政区划的国标编码', + `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '上级网格ID', + `parent_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '上级网格编码', + `grid_classification` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格分类。1基础网格 2环保网格 3防火网格 4城管网格 5执法网格 6安监网格等', + `grid_level` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '网格层级。网格层级表的层级\n根据【网格层级表】的层级关系动态展示。\n查询【网格层级表】层级 条件:上层级=网格树返回的网格层级', + `grid_property` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格属性。01村庄、02小区、03企业、04学校(幼儿园)、05医院、06驻镇(街)单位、07其他', + `is_end` char(1) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '是否最后一级:0否 1是', + `grid_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格地址', + `grid_introduce` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格介绍', + `grid_picture` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '宣传图片', + `regin_scope_desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '地图区域范围', + `grid_sort` int(10) NULL DEFAULT NULL COMMENT '展示顺序', + `point_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '标绘状态', + `grid_em_center` bigint(10) NULL DEFAULT NULL COMMENT '事件上报中心', + `grid_begin_time` datetime(0) NULL DEFAULT NULL COMMENT '初始日期', + `grid_end_time` datetime(0) NULL DEFAULT NULL COMMENT '终止日期', + `grid_area` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '面积', + `is_valid` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '1' COMMENT '是否有效', `create_by` bigint(20) NOT NULL COMMENT '创建人', - `create_date` datetime NOT NULL COMMENT '创建时间', + `create_date` datetime(0) NOT NULL COMMENT '创建时间', `update_by` bigint(20) NOT NULL, - `update_date` datetime NOT NULL, - `delete_flag` varchar(10) COLLATE utf8_bin NOT NULL DEFAULT 'normal' COMMENT '删除状态: 字典值:normal正常,删除deleted', - `versions` int(10) 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 COMMENT '网格党组织类型', - `attribute4` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '党组织编码', - `attribute5` varchar(240) COLLATE utf8_bin DEFAULT NULL COMMENT '扩展字段', - `attribute6` bigint(20) DEFAULT NULL COMMENT '扩展字段', - `attribute7` bigint(20) DEFAULT NULL COMMENT '扩展字段', - `attribute8` bigint(20) DEFAULT NULL COMMENT '扩展字段', - `attribute9` datetime DEFAULT NULL COMMENT '扩展字段', - `attribute10` datetime DEFAULT NULL COMMENT '扩展字段', + `update_date` datetime(0) NOT NULL, + `delete_flag` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'normal' COMMENT '删除状态: 字典值:normal正常,删除deleted', + `versions` int(10) NULL DEFAULT 1 COMMENT '乐观锁', + `attribute1` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格内人口规模', + `attribute2` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '是否成立网格党支部或网格党小组', + `attribute3` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '网格党组织类型', + `attribute4` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '党组织编码', + `attribute5` varchar(240) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '扩展字段', + `attribute6` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute7` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute8` bigint(20) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute9` datetime(0) NULL DEFAULT NULL COMMENT '扩展字段', + `attribute10` datetime(0) NULL DEFAULT NULL COMMENT '扩展字段', PRIMARY KEY (`grid_id`) USING BTREE, - KEY `SELECT_PARENT` (`parent_id`) USING BTREE, - KEY `idx_grid_grid_id` (`grid_id`) USING BTREE, - KEY `idx_grid_grid_sort` (`grid_sort`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + INDEX `SELECT_PARENT`(`parent_id`) USING BTREE, + INDEX `idx_grid_grid_id`(`grid_id`) USING BTREE, + INDEX `idx_grid_grid_sort`(`grid_sort`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_base_grid` ( - `coordinate_info` text, - `grid_name` varchar(100) DEFAULT NULL, - `sub_district_office` varchar(100) DEFAULT NULL, - `community` varchar(100) DEFAULT NULL, - `street_code` varchar(100) DEFAULT NULL, - `grid_code` varchar(100) DEFAULT NULL, - `community_code` varchar(100) DEFAULT NULL, - `longitude` varchar(100) DEFAULT NULL, - `latitude` varchar(100) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +-- ---------------------------- +-- Table structure for wgh_base_grid +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_base_grid`; +CREATE TABLE `wgh_base_grid` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `grid_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `sub_district_office` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `grid_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_community` ( - `coordinate_info` text, - `street_name` varchar(100) DEFAULT NULL, - `street_code` varchar(100) DEFAULT NULL, - `community_name` varchar(100) DEFAULT NULL, - `community_code` varchar(100) DEFAULT NULL, - `longitude` varchar(100) DEFAULT NULL, - `latitude` varchar(100) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +-- ---------------------------- +-- Table structure for wgh_community +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_community`; +CREATE TABLE `wgh_community` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `street_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_dywg` ( +-- ---------------------------- +-- Table structure for wgh_dywg +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_dywg`; +CREATE TABLE `wgh_dywg` ( `OBJECTID` int(11) NOT NULL, - `BGNAME` varchar(200) DEFAULT NULL COMMENT '网格名称', - `STREET` varchar(20) DEFAULT NULL COMMENT '所属街镇', - `COMMUNITY` varchar(50) DEFAULT NULL COMMENT '所属社区', - `BGSQUA` double DEFAULT NULL COMMENT '网格面积', - `ORDATE` datetime DEFAULT NULL COMMENT '初始时间', - `CHDATE` datetime DEFAULT NULL COMMENT '变更时间', - `NOTE` varchar(500) DEFAULT NULL COMMENT '备注', - `CONTACTS` varchar(50) DEFAULT NULL, - `TELPHONE` varchar(100) DEFAULT NULL COMMENT '联系电话', - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='单元网格'; + `BGNAME` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格名称', + `STREET` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属街镇', + `COMMUNITY` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属社区', + `BGSQUA` double NULL DEFAULT NULL COMMENT '网格面积', + `ORDATE` datetime(0) NULL DEFAULT NULL COMMENT '初始时间', + `CHDATE` datetime(0) NULL DEFAULT NULL COMMENT '变更时间', + `NOTE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `CONTACTS` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `TELPHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '单元网格' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_jdb` ( - `OBJECTID_1` varchar(50) DEFAULT NULL, - `OBJECTID` varchar(50) DEFAULT NULL, - `MC` varchar(60) DEFAULT NULL COMMENT '街道名称', - `person_in_charge` varchar(20) DEFAULT NULL COMMENT '责任人', - `phone` varchar(50) DEFAULT NULL COMMENT '联系电话', - `SHAPE_LENG` double DEFAULT NULL, - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='街道办'; +-- ---------------------------- +-- Table structure for wgh_jdb +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jdb`; +CREATE TABLE `wgh_jdb` ( + `OBJECTID_1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `OBJECTID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `MC` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道名称', + `person_in_charge` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任人', + `phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `SHAPE_LENG` double NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '街道办' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_jqz` ( - `OBJECTID` int(11) DEFAULT NULL, - `XH` varchar(500) DEFAULT NULL COMMENT '序号', - `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', - `AREA` double DEFAULT NULL, - `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', - `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', - `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', - `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', - `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '负责人', - `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', - `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', - `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', - `level` varchar(500) DEFAULT NULL COMMENT '等级', - `nature` varchar(500) DEFAULT NULL COMMENT '性质', - `remarks` varchar(500) DEFAULT NULL COMMENT '备注', - `DWMCJC` varchar(50) DEFAULT NULL, - `LAYER` varchar(50) DEFAULT NULL, - `SSJDB` varchar(50) DEFAULT NULL, - `AMOUNT` varchar(50) DEFAULT NULL COMMENT '数量', - `YJCS` varchar(100) DEFAULT NULL COMMENT '应急措施', - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='加气站信息'; +-- ---------------------------- +-- Table structure for wgh_jqz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jqz`; +CREATE TABLE `wgh_jqz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `nature` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `LAYER` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `AMOUNT` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `YJCS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '加气站信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_jxcs` ( - `OBJECTID` varchar(255) DEFAULT NULL, - `JSON_INFO` varchar(255) DEFAULT NULL, - `CREAT_TIME` varchar(255) DEFAULT NULL, - `SSJD` varchar(255) DEFAULT NULL COMMENT '所属街道', - `SSSQ` varchar(255) DEFAULT NULL COMMENT '所属社区', - `DLM` varchar(255) DEFAULT NULL COMMENT '道路名', - `MPH` varchar(255) DEFAULT NULL COMMENT '门牌号', - `NAME` varchar(255) DEFAULT NULL COMMENT '名称', - `ZTLX` varchar(255) DEFAULT NULL, - `TYPE` varchar(255) DEFAULT NULL COMMENT '子类型', - `XYDM` varchar(255) DEFAULT NULL COMMENT '统一社会信用代码', - `LXR` varchar(255) DEFAULT NULL COMMENT '联系人', - `LXDH` varchar(255) DEFAULT NULL COMMENT '联系电话', - `USER_NAME` varchar(255) DEFAULT NULL, - `BZ` varchar(255) DEFAULT NULL COMMENT '备注', - `AVAILABLE` varchar(255) DEFAULT NULL, - `ID` varchar(255) DEFAULT NULL, - `USER_ID` varchar(255) DEFAULT NULL COMMENT '编辑人ID', - `UPDATE_TIM` varchar(255) DEFAULT NULL COMMENT '编辑人姓名', - `INSERT_TIME` varchar(255) DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='九小场所信息'; +-- ---------------------------- +-- Table structure for wgh_jxcs +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jxcs`; +CREATE TABLE `wgh_jxcs` ( + `OBJECTID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `JSON_INFO` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `CREAT_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `SSJD` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属街道', + `SSSQ` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属社区', + `DLM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '道路名', + `MPH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '门牌号', + `NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称', + `ZTLX` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `TYPE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '子类型', + `XYDM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码', + `LXR` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人', + `LXDH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `BZ` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', + `AVAILABLE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `USER_ID` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编辑人ID', + `UPDATE_TIM` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编辑人姓名', + `INSERT_TIME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '九小场所信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_jyz` ( - `OBJECTID` int(11) DEFAULT NULL, - `XH` varchar(500) DEFAULT NULL COMMENT '序号', - `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', - `AREA` double DEFAULT NULL, - `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', - `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', - `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', - `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', - `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '负责人', - `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', - `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', - `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', - `level` varchar(500) DEFAULT NULL COMMENT '等级', - `nature` varchar(500) DEFAULT NULL COMMENT '性质', - `remarks` varchar(500) DEFAULT NULL COMMENT '备注', - `DWMCJC` varchar(50) DEFAULT NULL, - `LAYER` varchar(50) DEFAULT NULL, - `SSJDB` varchar(50) DEFAULT NULL, - `AMOUNT` varchar(300) DEFAULT NULL COMMENT '数量', - `YJCS` varchar(260) DEFAULT NULL COMMENT '应急措施', - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='加油站'; +-- ---------------------------- +-- Table structure for wgh_jyz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_jyz`; +CREATE TABLE `wgh_jyz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `level` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `nature` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `remarks` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `LAYER` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `AMOUNT` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `YJCS` varchar(260) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '加油站' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_sjxxb` ( - `OBJECTID_1` int(11) DEFAULT NULL, - `OBJECTID` double DEFAULT NULL, - `INFOSOURCENAME` varchar(700) DEFAULT NULL COMMENT '事件来源', - `INFOTYPENAME` varchar(700) DEFAULT NULL COMMENT '事件类别', - `COMMUNITYNAME` varchar(700) DEFAULT NULL COMMENT '社区名称', - `DESCRIPTION` varchar(700) DEFAULT NULL COMMENT '事件描述', - `TASKID` varchar(500) DEFAULT NULL, - `CASESN` varchar(500) DEFAULT NULL, - `ADDRESS` varchar(700) DEFAULT NULL COMMENT '事件地址', - `STATUSNAME` varchar(700) DEFAULT NULL COMMENT '事件状态', - `INFOBCNAME` varchar(700) DEFAULT NULL, - `INFOSCNAME` varchar(700) DEFAULT NULL, - `STREETNAME` varchar(700) DEFAULT NULL COMMENT '街道名称', - `DISCOVERTIME` datetime DEFAULT NULL, - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件信息'; +-- ---------------------------- +-- Table structure for wgh_sjxxb +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_sjxxb`; +CREATE TABLE `wgh_sjxxb` ( + `OBJECTID_1` int(11) NULL DEFAULT NULL, + `OBJECTID` double NULL DEFAULT NULL, + `INFOSOURCENAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件来源', + `INFOTYPENAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件类别', + `COMMUNITYNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '社区名称', + `DESCRIPTION` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件描述', + `TASKID` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `CASESN` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ADDRESS` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件地址', + `STATUSNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件状态', + `INFOBCNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `INFOSCNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `STREETNAME` varchar(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道名称', + `DISCOVERTIME` datetime(0) NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '事件信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_sqxx` ( - `OBJECTID` int(11) DEFAULT NULL, - `COMMUAREA` double DEFAULT NULL, - `BELONGTO` varchar(100) DEFAULT NULL, - `CONTACTS` varchar(100) DEFAULT NULL, - `TELPHONE` varchar(100) DEFAULT NULL, - `number_of_grid` double DEFAULT NULL, - `street_code` varchar(100) DEFAULT NULL, - `community_code` varchar(100) DEFAULT NULL, - `COMMNAME` varchar(200) DEFAULT NULL, - `JDCJGB` varchar(200) DEFAULT NULL, - `WGZ` varchar(100) DEFAULT NULL, - `police_name` varchar(500) DEFAULT NULL, - `traffic_police_phone` double DEFAULT NULL, - `traffic_police_company` varchar(500) DEFAULT NULL, - `peo_police_name` varchar(500) DEFAULT NULL, - `peo_police_phone` varchar(500) DEFAULT NULL, - `police_station` varchar(500) DEFAULT NULL, - `WGY` varchar(200) DEFAULT NULL, - `JDLXKS` varchar(200) DEFAULT NULL, - `DDY` varchar(200) DEFAULT NULL, - `ZHZFXM` varchar(100) DEFAULT NULL, - `ZHZFDH` varchar(100) DEFAULT NULL, - `ZHZFBM` varchar(100) DEFAULT NULL, - `insert_time` datetime DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +-- ---------------------------- +-- Table structure for wgh_sqxx +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_sqxx`; +CREATE TABLE `wgh_sqxx` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `COMMUAREA` double NULL DEFAULT NULL, + `BELONGTO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `CONTACTS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `TELPHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `number_of_grid` double NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `community_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `COMMNAME` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `JDCJGB` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `WGZ` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `police_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `traffic_police_phone` double NULL DEFAULT NULL, + `traffic_police_company` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `peo_police_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `peo_police_phone` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `police_station` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `WGY` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `JDLXKS` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `DDY` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFXM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFDH` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZHZFBM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_subdistrict_office` ( - `coordinate_info` text, - `street_name` varchar(100) DEFAULT NULL, - `street_code` varchar(100) DEFAULT NULL, - `longitude` varchar(100) DEFAULT NULL, - `latitude` varchar(100) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +-- ---------------------------- +-- Table structure for wgh_subdistrict_office +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_subdistrict_office`; +CREATE TABLE `wgh_subdistrict_office` ( + `coordinate_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `street_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `street_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `latitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_szcgwgh` ( - `OBJECTID` int(11) DEFAULT NULL, - `NOTE` varchar(200) DEFAULT NULL COMMENT '备注', - `SSSQ` varchar(200) DEFAULT NULL, - `SSJD` varchar(200) DEFAULT NULL, - `ID` varchar(200) DEFAULT NULL, - `insert_time` datetime DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数字城管网格化信息'; +-- ---------------------------- +-- Table structure for wgh_szcgwgh +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_szcgwgh`; +CREATE TABLE `wgh_szcgwgh` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `NOTE` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `SSSQ` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJD` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ID` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` datetime(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数字城管网格化信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_szzrwg` ( - `OBJECTID` int(11) DEFAULT NULL, - `NOTE` varchar(100) DEFAULT NULL COMMENT '备注', - `NAME` varchar(100) DEFAULT NULL COMMENT '责任单位', - `PRINCIPAL` varchar(100) DEFAULT NULL COMMENT '监管人', - `PHONE` varchar(100) DEFAULT NULL COMMENT '联系方式', - `insert_time` datetime DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='市政责任网格信息'; +-- ---------------------------- +-- Table structure for wgh_szzrwg +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_szzrwg`; +CREATE TABLE `wgh_szzrwg` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `NOTE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任单位', + `PRINCIPAL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '监管人', + `PHONE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式', + `insert_time` datetime(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '市政责任网格信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_whpdw` ( - `OBJECTID` int(11) DEFAULT NULL, - `XH` varchar(500) DEFAULT NULL COMMENT '序号', - `NAME` varchar(500) DEFAULT NULL COMMENT '单位名称', - `AREA` double DEFAULT NULL, - `SPACE` varchar(500) DEFAULT NULL COMMENT '周边安全间距', - `PROBLEM` varchar(500) DEFAULT NULL COMMENT '存在问题', - `TYPE` varchar(500) DEFAULT NULL COMMENT '危险源类型', - `LOCATION` varchar(500) DEFAULT NULL COMMENT '经营地址', - `PERSON` varchar(500) DEFAULT NULL COMMENT '安全负责人', - `PHONE` varchar(500) DEFAULT NULL COMMENT '联系电话', - `QTYPE` varchar(500) DEFAULT NULL COMMENT '企业类型', - `WTYPE` varchar(500) DEFAULT NULL COMMENT '危化品种类', - `AMOUNT` varchar(500) DEFAULT NULL COMMENT '数量', - `GRADE` varchar(500) DEFAULT NULL COMMENT '等级', - `NATRUE` varchar(500) DEFAULT NULL COMMENT '性质', - `YJCS` varchar(500) DEFAULT NULL COMMENT '应急措施', - `NOTE` varchar(500) DEFAULT NULL COMMENT '备注', - `DWMCJC` varchar(100) DEFAULT NULL, - `PRINCIPAL` varchar(500) DEFAULT NULL COMMENT '主要负责人', - `USER` varchar(500) DEFAULT NULL COMMENT '用途', - `LAYER` varchar(100) DEFAULT NULL, - `SSJDB` varchar(100) DEFAULT NULL, - `insert_time` timestamp NULL DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='危化品单位信息'; +-- ---------------------------- +-- Table structure for wgh_whpdw +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_whpdw`; +CREATE TABLE `wgh_whpdw` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `PROBLEM` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `TYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PERSON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '安全负责人', + `PHONE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `GRADE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `YJCS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `PRINCIPAL` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主要负责人', + `USER` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用途', + `LAYER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJDB` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `insert_time` timestamp(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '危化品单位信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_yjbmcs` ( - `OBJECTID` int(11) DEFAULT NULL, - `GRADE` varchar(500) DEFAULT NULL, - `ADRESS` varchar(500) DEFAULT NULL COMMENT '地址', - `AREA` varchar(500) DEFAULT NULL COMMENT '面积(㎡)', - `RNNS` varchar(500) DEFAULT NULL COMMENT '容纳人数', - `SFBSP` varchar(500) DEFAULT NULL, - `ZYSBCS` varchar(500) DEFAULT NULL, - `FZR` varchar(500) DEFAULT NULL, - `ZGDW` varchar(500) DEFAULT NULL, - `NAME` varchar(500) DEFAULT NULL, - `FZRTEL` varchar(100) DEFAULT NULL, - `SSJD` varchar(100) DEFAULT NULL, - `INSERT_TIME` timestamp NULL DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应急避难场所信息'; +-- ---------------------------- +-- Table structure for wgh_yjbmcs +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_yjbmcs`; +CREATE TABLE `wgh_yjbmcs` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `GRADE` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ADRESS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `AREA` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '面积(㎡)', + `RNNS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '容纳人数', + `SFBSP` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZYSBCS` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `FZR` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `ZGDW` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `NAME` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `FZRTEL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `SSJD` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `INSERT_TIME` timestamp(0) NULL DEFAULT NULL +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应急避难场所信息' ROW_FORMAT = Dynamic; -CREATE TABLE `wgh_yqhjz` ( - `OBJECTID` int(11) DEFAULT NULL, - `XH` varchar(1000) DEFAULT NULL COMMENT '序号', - `NAME` varchar(1000) DEFAULT NULL COMMENT '单位名称', - `AREA` double DEFAULT NULL, - `SPACE` varchar(1000) DEFAULT NULL COMMENT '周边安全间距', - `TYPE` varchar(1000) DEFAULT NULL COMMENT '危险源类型', - `LOCATION` varchar(1000) DEFAULT NULL COMMENT '经营地址', - `PRINCIPAL` varchar(1000) DEFAULT NULL COMMENT '负责人', - `PHONE` varchar(1000) DEFAULT NULL COMMENT '联系电话', - `QTYPE` varchar(1000) DEFAULT NULL COMMENT '企业类型', - `WTYPE` varchar(1000) DEFAULT NULL COMMENT '危化品种类', - `AMOUNT` varchar(1000) DEFAULT NULL COMMENT '数量', - `GRADE` varchar(1000) DEFAULT NULL COMMENT '等级', - `NATRUE` varchar(1000) DEFAULT NULL COMMENT '性质', - `YJCS` varchar(1000) DEFAULT NULL COMMENT '应急措施', - `NOTE` varchar(1000) DEFAULT NULL COMMENT '备注', - `DWMCJC` varchar(100) DEFAULT NULL COMMENT '简称', - `LAYER` varchar(100) DEFAULT NULL COMMENT '所在图层', - `SSJDB` varchar(100) DEFAULT NULL COMMENT '所属街道办', - `PROBLEM` varchar(100) DEFAULT NULL COMMENT '存在问题', - `insert_time` timestamp NULL DEFAULT NULL COMMENT '插入日期' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='油气合建站信息'; - -CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_grid_comm_street` AS SELECT -`g4`.`grid_id` AS `grid_id`, -`g4`.`grid_name` AS `grid_name`, -`g3`.`grid_id` AS `community_id`, -`g3`.`grid_name` AS `community_name`, -`g2`.`grid_id` AS `street_id`, -`g2`.`grid_name` AS `street_name`, -concat( `g2`.`grid_id`, ':', `g3`.`grid_id`, ':', `g4`.`grid_id` ) AS `grid_id_path` -FROM - (( - `ca_bm_grid` `g4` - JOIN `ca_bm_grid` `g3` ON ((( - `g3`.`grid_id` = `g4`.`parent_id` - ) - AND ( `g3`.`grid_level` = 'level3' ) - AND ( `g3`.`delete_flag` = 'normal' )))) - JOIN `ca_bm_grid` `g2` ON ((( - `g2`.`grid_id` = `g3`.`parent_id` - ) - AND ( `g2`.`grid_level` = 'level2' ) - AND ( `g2`.`delete_flag` = 'normal' )))) -WHERE - (( - `g4`.`grid_level` = 'level4' - ) - AND ( `g4`.`delete_flag` = 'normal' )) +-- ---------------------------- +-- Table structure for wgh_yqhjz +-- ---------------------------- +DROP TABLE IF EXISTS `wgh_yqhjz`; +CREATE TABLE `wgh_yqhjz` ( + `OBJECTID` int(11) NULL DEFAULT NULL, + `XH` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '序号', + `NAME` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称', + `AREA` double NULL DEFAULT NULL, + `SPACE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周边安全间距', + `TYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危险源类型', + `LOCATION` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经营地址', + `PRINCIPAL` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人', + `PHONE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话', + `QTYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业类型', + `WTYPE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '危化品种类', + `AMOUNT` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数量', + `GRADE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级', + `NATRUE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质', + `YJCS` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应急措施', + `NOTE` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `DWMCJC` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '简称', + `LAYER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所在图层', + `SSJDB` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属街道办', + `PROBLEM` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在问题', + `insert_time` timestamp(0) NULL DEFAULT NULL COMMENT '插入日期' +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '油气合建站信息' ROW_FORMAT = Dynamic; From 35c68c2e18553a212dfaa0aa0530fb331037c2fa Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 14:18:59 +0800 Subject: [PATCH 282/319] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=85=A8=E9=87=8F?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E6=95=B0=E6=8D=AE=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GuardarDatosTaskServiceImpl.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) 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 index d819c24758..a619e082a3 100644 --- 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 @@ -73,28 +73,7 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { @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); - basegridService.preserBaseGridVation(dto); - bmGridService.getPreserBmGridVation(dto); - communityService.getPreserCommunityVation(dto); - wghDywgService.getPreserDywgVation(dto); - wghJqzService.getPreserWghjqzVation(dto); - wghJxcsService.preserWghJxcsVation(dto); - wghJyzService.getPreserWghJyzVation(dto); - wghSjxxbService.getPreserSjxxVation(dto); - wghSqxxService.getPreserWghSqxxVation(dto); - wghSzcgwghService.getPreserWghSzcgwghVation(dto); - wghSzzrwgService.getPreserWghSzzrwgVation(dto); - wghWhpdwService.getPreserWhpdwVation(dto); - wghYjbmcsService.getPreserWghYjbmcsVation(dto); - wghYqhjzService.getPreserWghYqhjzVation(dto); - } else { - + if (StringUtils.isNotBlank(dto.getTableName())) { switch (dto.getTableName()) { case CaWghDataConstant.UNICOM_LOUDONG: caLoudongService.preserLouDongVation(dto); @@ -157,6 +136,8 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { wghYqhjzService.getPreserWghYqhjzVation(dto); break; } + } else{ + throw new Error("没传名字"); } } } From c9e00dccf1c4cb1cb64b19cac210ef1aa864a45a Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 14:28:15 +0800 Subject: [PATCH 283/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9flyway=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/service/impl/GuardarDatosTaskServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) 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 index a619e082a3..447b7d7c5b 100644 --- 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 @@ -3,11 +3,13 @@ package com.epmet.opendata.service.impl; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.service.*; +import lombok.extern.slf4j.Slf4j; import net.bytebuddy.asm.Advice; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +@Slf4j @Service public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { @@ -73,6 +75,7 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { @Override public void guardarDatosTask(PreserVationFormDTO dto) { + log.error("传的对象",dto); if (StringUtils.isNotBlank(dto.getTableName())) { switch (dto.getTableName()) { case CaWghDataConstant.UNICOM_LOUDONG: From 2f4d9023dab654ab793bc76a5f19b5665d82fd41 Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 14:42:13 +0800 Subject: [PATCH 284/319] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=89=E5=8F=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=9A=84=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/dto/constant/CaWghDataConstant.java | 1 + .../com/epmet/opendata/service/impl/CaBmGridServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/CaLoudongServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/CaPingfangServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/CaRentalServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/CaResidentServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java | 2 +- .../epmet/opendata/service/impl/WghCommunityServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghDywgServiceImpl.java | 2 +- .../java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java | 2 +- .../java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghJxcsServiceImpl.java | 2 +- .../java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghSqxxServiceImpl.java | 2 +- .../opendata/service/impl/WghSubdistrictOfficeServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java | 2 +- .../com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java | 2 +- 22 files changed, 22 insertions(+), 21 deletions(-) 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 index 029f846273..bab005732b 100644 --- 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 @@ -7,6 +7,7 @@ package com.epmet.opendata.dto.constant; */ public interface CaWghDataConstant { + int PAGE_LIMIT = 200; String AESKEY = "hriajrutnbghajsd"; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java index ad44a7dda5..e15b7dfccb 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaBmGridServiceImpl.java @@ -108,7 +108,7 @@ public class CaBmGridServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.SHARE_BM_GRID); 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 77116d369d..8d7dc657fc 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 @@ -137,7 +137,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.UNICOM_LOUDONG); 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 c548a634c8..efd49ea4dd 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 @@ -117,7 +117,7 @@ public class CaPingfangServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.UNICOM_PINGFANG); 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 88066c6233..44dffcc7ee 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 @@ -124,7 +124,7 @@ public class CaRentalServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.UNICOM_RENTAL); 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 740375cf83..b0f71b2f42 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 @@ -126,7 +126,7 @@ public class CaResidentServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.UNICOM_RESIDENT); 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 3af2fd8013..2d76b56fc0 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 @@ -126,7 +126,7 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_UNICOM); dto.setTableName(CaWghDataConstant.UNICOM_ROTATORS); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java index e3105dab2e..9aaf2ae706 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java @@ -103,7 +103,7 @@ public class WghBaseGridServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_BASE_GRID); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java index c5de38730c..05a77768f8 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java @@ -104,7 +104,7 @@ public class WghCommunityServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_COMMUNITY); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java index b3c29d6f40..3f98dd5c40 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghDywgServiceImpl.java @@ -106,7 +106,7 @@ public class WghDywgServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_DYWG); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java index 6d55943eac..cb164432b0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJdbServiceImpl.java @@ -106,7 +106,7 @@ public class WghJdbServiceImpl extends BaseServiceImpl int i = baseDao.deleteAll(); if (i >= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_JDB); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java index a0d1526dea..1023edffa7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJqzServiceImpl.java @@ -106,7 +106,7 @@ public class WghJqzServiceImpl extends BaseServiceImpl int i = baseDao.deleteAll(); if (i >= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_JQZ); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java index c28fba0277..0e202ffa6b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJxcsServiceImpl.java @@ -106,7 +106,7 @@ public class WghJxcsServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_JXCS); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java index 9d14a3a6bf..f159e690de 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghJyzServiceImpl.java @@ -106,7 +106,7 @@ public class WghJyzServiceImpl extends BaseServiceImpl int i = baseDao.deleteAll(); if (i >= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_JYZ); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java index 387a4c7649..ad2dee773b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java @@ -106,7 +106,7 @@ public class WghSjxxbServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_SJXX); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java index 496cff2a62..e804f85a5c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSqxxServiceImpl.java @@ -106,7 +106,7 @@ public class WghSqxxServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_SQXX); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java index 8425427509..6c60f83523 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java @@ -98,7 +98,7 @@ public class WghSubdistrictOfficeServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_SUB); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java index 313001955d..e8b1a8d19c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzcgwghServiceImpl.java @@ -106,7 +106,7 @@ public class WghSzcgwghServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_SZCGWGH); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java index d8eaf54bcf..6a34e91255 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSzzrwgServiceImpl.java @@ -108,7 +108,7 @@ public class WghSzzrwgServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_SZZRWG); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java index 785493b305..c62f8689f4 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghWhpdwServiceImpl.java @@ -106,7 +106,7 @@ public class WghWhpdwServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_WHPDW); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java index 4652ee8906..550822bf20 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYjbmcsServiceImpl.java @@ -106,7 +106,7 @@ public class WghYjbmcsServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_YJBMCS); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java index f7ee3830b4..a32a484816 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghYqhjzServiceImpl.java @@ -106,7 +106,7 @@ public class WghYqhjzServiceImpl extends BaseServiceImpl= 0) { dto.setPageNo(NumConstant.ONE); - dto.setPageSize(NumConstant.FIFTY); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_WGH_YQHJZ); From 5fd92b20dcbd83e1b1ce2846a4b62cdcada6febb Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 16 Jun 2022 15:41:28 +0800 Subject: [PATCH 285/319] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/service/impl/GuardarDatosTaskServiceImpl.java | 1 - .../modules/partymember/service/IcPartyMemberPointService.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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 index 447b7d7c5b..bf60cdf4a1 100644 --- 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 @@ -75,7 +75,6 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { @Override public void guardarDatosTask(PreserVationFormDTO dto) { - log.error("传的对象",dto); if (StringUtils.isNotBlank(dto.getTableName())) { switch (dto.getTableName()) { case CaWghDataConstant.UNICOM_LOUDONG: diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java index 701ce482aa..026c402318 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyMemberPointService.java @@ -114,4 +114,4 @@ public interface IcPartyMemberPointService extends BaseService getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto); -} \ No newline at end of file +} From a49401ab96f6c453468d7ad8421bbc241269a461 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 16 Jun 2022 16:09:21 +0800 Subject: [PATCH 286/319] =?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 --- .../controller/IcUserDemandRecController.java | 52 +++++++++------- .../impl/VolunteerInfoServiceImpl.java | 51 ++++------------ .../resources/mapper/IcPartyActivityDao.xml | 1 + .../epmet/feign/EpmetUserOpenFeignClient.java | 7 +++ .../EpmetUserOpenFeignClientFallback.java | 11 ++++ .../controller/IcResiUserController.java | 27 +++++++++ .../com/epmet/service/IcResiUserService.java | 22 +++++++ .../service/impl/IcResiUserServiceImpl.java | 60 +++++++++++++++++++ .../resources/mapper/IcVolunteerPolyDao.xml | 8 +-- 9 files changed, 172 insertions(+), 67 deletions(-) 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 9c53742254..3405c0c019 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 @@ -44,9 +44,9 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -83,6 +83,7 @@ public class IcUserDemandRecController implements ResultDataResolver { @Autowired private EpmetUserOpenFeignClient userOpenFeignClient; + /** * 根据服务方类型查询 下拉框 * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; @@ -219,28 +220,33 @@ public class IcUserDemandRecController implements ResultDataResolver { && null != finishResultDTO.getAwardPoint() && finishResultDTO.getAwardPoint() > NumConstant.ZERO && UserDemandConstant.RESOLVED.equals(finishResultDTO.getFinishResult())) { - // 志愿者发放积分 - List actPointEventMsgList = new ArrayList<>(); - BasePointEventMsg actPointEventMsg = new BasePointEventMsg(); - actPointEventMsg.setCustomerId(formDTO.getCustomerId()); - actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND); - actPointEventMsg.setSourceId(formDTO.getDemandRecId()); - actPointEventMsg.setUserId(finishResultDTO.getServerId()); - actPointEventMsg.setActionFlag(MqConstant.PLUS); - actPointEventMsg.setIsCommon(false); - actPointEventMsg.setRemark(finishResultDTO.getRemark()); - actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag()); - actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass()); - actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName()); - actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode()); - actPointEventMsg.setPoint(finishResultDTO.getAwardPoint()); - actPointEventMsgList.add(actPointEventMsg); - SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); - sendMsgForm.setContent(actPointEventMsgList); - sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND); - Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); - if (!mqResult.success()) { - log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId())); + Result> userIdRes = userOpenFeignClient.getUserId(finishResultDTO.getServerId()); + if (userIdRes.success() && CollectionUtils.isNotEmpty(userIdRes.getData())) { + userIdRes.getData().forEach(userId -> { + // 志愿者发放积分 + List actPointEventMsgList = new ArrayList<>(); + BasePointEventMsg actPointEventMsg = new BasePointEventMsg(); + actPointEventMsg.setCustomerId(formDTO.getCustomerId()); + actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND); + actPointEventMsg.setSourceId(formDTO.getDemandRecId()); + actPointEventMsg.setUserId(userId); + actPointEventMsg.setActionFlag(MqConstant.PLUS); + actPointEventMsg.setIsCommon(false); + actPointEventMsg.setRemark(finishResultDTO.getRemark()); + actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag()); + actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass()); + actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName()); + actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode()); + actPointEventMsg.setPoint(finishResultDTO.getAwardPoint()); + actPointEventMsgList.add(actPointEventMsg); + SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO(); + sendMsgForm.setContent(actPointEventMsgList); + sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND); + Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm); + if (!mqResult.success()) { + log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId())); + } + }); } } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index b5aab903d0..c7d4d6139a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -21,11 +21,10 @@ import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.MqConstant; -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.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; @@ -45,7 +44,6 @@ import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; -import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO; @@ -64,8 +62,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.Collator; import java.util.*; -import java.util.function.Function; import java.util.stream.Collectors; /** @@ -337,43 +335,16 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl query=new LambdaQueryWrapper<>(); - query.eq(VolunteerInfoEntity::getCustomerId,customerId); - query.likeRight(VolunteerInfoEntity::getPids,pids); - query.select(VolunteerInfoEntity::getUserId); - query.orderByAsc(VolunteerInfoEntity::getCreatedTime); - Set userIds = baseDao.selectObjs(query).stream().map(o->o.toString()).collect(Collectors.toSet()); List resultList = new ArrayList<>(); - if (CollectionUtils.isEmpty(userIds)) { - return resultList; - } - Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIds)); - if (userInfoRes.success() && CollectionUtils.isNotEmpty(userInfoRes.getData())) { - Map userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); - for (String userId : userIds) { - if (userMap.containsKey(userId)) { - if (StringUtils.isNoneBlank(userRealName)) { - if (userMap.get(userId).getRealName().contains(userRealName)) { - OptionDTO optionDTO = new OptionDTO(); - optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); - optionDTO.setValue(userId); - resultList.add(optionDTO); - } - } else { - OptionDTO optionDTO = new OptionDTO(); - optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); - optionDTO.setValue(userId); - resultList.add(optionDTO); - } - } - } + IcResiUserDTO icUser = new IcResiUserDTO(); + icUser.setCustomerId(customerId); + icUser.setAgencyId(staffInfo.getAgencyId()); + Result> volunteerRes = epmetUserOpenFeignClient.getVolunteerList(icUser); + if (volunteerRes.success() && CollectionUtils.isNotEmpty(volunteerRes.getData())) { + resultList = ConvertUtils.sourceToTarget(volunteerRes.getData(), OptionDTO.class); + resultList = resultList.stream().sorted((o1, o2) -> + Collator.getInstance(Locale.TRADITIONAL_CHINESE).compare(o1.getLabel(),o2.getLabel())) + .collect(Collectors.toList()); } return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index acfb99d309..0c5c86d30d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -166,6 +166,7 @@ AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + ORDER BY ACTIVITY_TIME DESC 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 e5952a2726..b130cab02f 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 @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.*; @@ -806,4 +807,10 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/icVolunteerPoly/volunteerDataExtraction/{customerId}") Result volunteerDataExtraction(@PathVariable("customerId") String customerId); + + @PostMapping("/epmetuser/icresiuser/getVolunteerList") + Result> getVolunteerList(@RequestBody IcResiUserDTO formDTO); + + @PostMapping("/epmetuser/icresiuser/getUserId/{icUserId}") + Result> getUserId(@PathVariable("icUserId") String icUserId); } 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 404ba7d0c3..f93adfdd0e 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 @@ -1,6 +1,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; @@ -595,4 +596,14 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "volunteerDataExtraction", customerId); } + @Override + public Result> getVolunteerList(IcResiUserDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getVolunteerList", formDTO); + } + + @Override + public Result> getUserId(String icUserId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserId", icUserId); + } + } 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 ed4f055713..8e9e6a41c7 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 @@ -53,6 +53,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1161,4 +1162,30 @@ public class IcResiUserController implements ResultDataResolver { formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(icResiUserService.getUserRoleByIdCard(formDTO)); } + + /** + * 获取组织下的志愿者 + * + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/16 15:22 + */ + @PostMapping("getVolunteerList") + public Result> getVolunteerList(@RequestBody IcResiUserDTO formDTO) { + return new Result>().ok(icResiUserService.getVolunteerList(formDTO.getCustomerId(), formDTO.getAgencyId())); + } + + /** + * 获取居民信息对应的居民用户ID + * + * @Param icUserId + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2022/6/16 15:40 + */ + @PostMapping("getUserId/{icUserId}") + public Result> getUserId(@PathVariable("icUserId") String icUserId) { + return new Result>().ok(icResiUserService.getUserId(icUserId)); + } } 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 407e9e614e..86864a438f 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 @@ -25,6 +25,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiUserEntity; import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; @@ -405,4 +406,25 @@ public interface IcResiUserService extends BaseService { * @params [dto] */ Result editMember(IcResiUserConfirmSubmitDTO dto); + + /** + * 获取组织下志愿者列表 + * + * @Param customerId 客户 + * @Param agencyId 组织 + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/16 14:58 + */ + List getVolunteerList(String customerId, String agencyId); + + /** + * 获取居民信息对应的居民用户ID + * + * @Param icResiUserId + * @Return {@link String} + * @Author zhaoqifeng + * @Date 2022/6/16 15:30 + */ + List getUserId(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 4f1e856899..08411e39e2 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 @@ -61,6 +61,7 @@ import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.*; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import com.epmet.service.*; +import com.epmet.dto.result.demand.OptionDTO; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -2384,6 +2385,65 @@ public class IcResiUserServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/6/16 14:58 + */ + @Override + public List getVolunteerList(String customerId, String agencyId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getCustomerId, customerId); + wrapper.and(wq -> wq.eq(IcResiUserEntity::getAgencyId, agencyId).or().like(IcResiUserEntity::getPids, agencyId)); + wrapper.eq(IcResiUserEntity::getIsVolunteer, NumConstant.ONE_STR); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionDataResultDTO dto = new OptionDataResultDTO(); + dto.setValue(item.getId()); + if (StringUtils.isNotBlank(item.getMobile())) { + dto.setLabel(item.getName().concat("(").concat(item.getMobile().concat(")"))); + } else { + dto.setLabel(item.getName()); + } + return dto; + }).collect(Collectors.toList()); + } + + /** + * 获取居民信息对应的居民用户ID + * + * @param icResiUserId + * @Param icResiUserId + * @Return {@link String} + * @Author zhaoqifeng + * @Date 2022/6/16 15:30 + */ + @Override + public List getUserId(String icResiUserId) { + IcResiUserEntity entity = baseDao.selectById(icResiUserId); + if (null == entity) { + return null; + } + //根据身份证获取小程序端居民信息 + LambdaQueryWrapper baseInfoWrapper = new LambdaQueryWrapper<>(); + baseInfoWrapper.eq(UserBaseInfoEntity::getCustomerId, entity.getCustomerId()); + baseInfoWrapper.eq(UserBaseInfoEntity::getIdNum, entity.getIdCard()); + List baseInfoList = userBaseInfoDao.selectList(baseInfoWrapper); + if (CollectionUtils.isEmpty(baseInfoList)) { + return null; + } + return baseInfoList.stream().map(UserBaseInfoEntity::getUserId).collect(Collectors.toList()); + } + /** * 根据身份证获取居民角色(目前只有是否是志愿者) * diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml index acfca0cf16..68439048b8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml @@ -61,7 +61,7 @@ + + + - + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml index a87a72b682..2fe689c55c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/caBmGridDao.xml @@ -7,6 +7,17 @@ delete from ca_bm_grid + From 57e73a68fa3d68bb58521a2e58b74d9a7d9fab80 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 13:57:58 +0800 Subject: [PATCH 301/319] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E8=BF=94=E5=9B=9EMULTI=5FSELECT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/ConditionResultDTO.java | 5 +++++ .../java/com/epmet/entity/IcFormQueryBuilderEntity.java | 7 ++++++- .../src/main/resources/mapper/IcFormItemDao.xml | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java index 4d0a000b8a..386fffd4d5 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java @@ -96,5 +96,10 @@ public class ConditionResultDTO implements Serializable { * 这个表 是否支持添加 即是否是多对一 eg:居民需求是多个对一个 */ private boolean supportAdd; + + /** + * 是否为多选 1可以多选,0单选 + */ + private Integer multiSelect; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java index 22f83887ba..a6940e9499 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java @@ -76,7 +76,12 @@ public class IcFormQueryBuilderEntity extends BaseEpmetEntity { * 手机号:mobile; 身份证:id_card;只能输入数字:num */ private String validType; - + + /** + * 是否为多选 1可以多选,0单选 + */ + private Integer multiSelect; + /** * 排序 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml index b58666f21c..20974d2afa 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml @@ -85,7 +85,8 @@ IFNULL(i.PLACEHOLDER,'') as PLACEHOLDER, IFNULL(i.COLUMN_NAME,'')as COLUMN_NAME, b.QUERY_TYPE, - b.FUN_TYPE + b.FUN_TYPE, + b.MULTI_SELECT as multiSelect FROM ic_form_query_builder b inner join ic_form_item i on(i.id=b.FORM_ITEM_ID and i.DEL_FLAG='0') LEFT JOIN ic_form_item_group g ON ( i.ITEM_GROUP_ID = g.id ) From 98a769f34cd6a1e4c46bcb5c447884533e632899 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 14:28:21 +0800 Subject: [PATCH 302/319] queryType=resi_category --- .../src/main/resources/mapper/IcResiUserDao.xml | 6 ++++++ 1 file changed, 6 insertions(+) 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 81f3c65f49..8fa484805f 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 @@ -128,6 +128,12 @@ ${subCondition.tableName}.${subCondition.columnName} like concat('%',#{colValue},'%') + + + + ${subCondition.tableName}.${colValue} ='1' + + From 7961404fa7eb16fab2e1a8dfbbd38df0b8e44374 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 14:37:24 +0800 Subject: [PATCH 303/319] queryType=resi_category --- .../src/main/resources/mapper/IcResiUserDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 8fa484805f..caf51d1d3b 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 @@ -130,8 +130,8 @@ - - ${subCondition.tableName}.${colValue} ='1' + + and ${subCondition.tableName}.${colValue} ='1' From 2f5ec4e8bde982c763a797c2fed2ee305ef598f7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 14:47:12 +0800 Subject: [PATCH 304/319] =?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/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 caf51d1d3b..182caedcf6 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 @@ -130,7 +130,7 @@ - + and ${subCondition.tableName}.${colValue} ='1' From 2d29c8872e1464f09072d319f7fa97d329bcee08 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 16:00:51 +0800 Subject: [PATCH 305/319] =?UTF-8?q?sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.30__item_query.sql | 7 +++++++ .../src/main/resources/mapper/IcResiUserDao.xml | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql new file mode 100644 index 0000000000..5f8f565bed --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql @@ -0,0 +1,7 @@ +alter TABLE ic_form_query_builder add COLUMN `MULTI_SELECT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1可以多选,0单选,默认0' after VALID_TYPE; + +update ic_form_query_builder set MULTI_SELECT=( + select ic_form_item.MULTI_SELECT from ic_form_item where ic_form_item.CUSTOMER_ID=ic_form_query_builder.CUSTOMER_ID + and ic_form_item.ID=ic_form_query_builder.FORM_ITEM_ID +)where ic_form_query_builder.DEL_FLAG='0' +; 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 182caedcf6..934839a316 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 @@ -130,9 +130,11 @@ - - and ${subCondition.tableName}.${colValue} ='1' - + + + and ${subCondition.tableName}.${colValue} ='1' + + From 42d4d9d328ee8eda73c3ec65789f52323fd35caf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 17 Jun 2022 16:03:47 +0800 Subject: [PATCH 306/319] /latest-submit --- .../src/main/resources/mapper/IcResiMemberDao.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml index b9bc9300dd..13db077a3c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml @@ -14,7 +14,10 @@ m.HE_SUAN_COUNT, m.YMJZ, m.DOMICILE_PLACE, - m.WORK_PLACE + m.WORK_PLACE, + m.DOMICILE_PLACE_CODE, + m.DOMICILE_PLACE_CODE_PATH, + m.REMARK FROM ic_resi_member m WHERE From 5ed2d1c2fdb99ca34c276e98be52956058b851df Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 17 Jun 2022 22:36:06 +0800 Subject: [PATCH 307/319] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=20=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E7=B2=92=E5=BA=A6=E5=8F=8A=E5=88=86=E6=89=B9=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=B2=92=E5=BA=A6=E7=BC=A9=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserChangeRecordServiceImpl.java | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index bc88226da3..5e58019074 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -45,7 +46,6 @@ import com.epmet.service.IcUserChangeRecordService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -175,7 +175,6 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl"+customerId); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -205,8 +204,7 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl map : icUserList){ //存放一个人的类别为是的变更明细数据 - List subList = new ArrayList<>(); - String changeId = UUID.randomUUID().toString().replaceAll("-", ""); + String changeId = IdWorker.getIdStr(); for (IcResiCategoryStatsConfigDTO dto : categoryListResult.getData()){ if(map.containsKey(dto.getColumnName())&&"1".equals(map.get(dto.getColumnName()))){ detailed = new IcUserChangeDetailedEntity(); @@ -228,12 +226,10 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO) { - detailedList.addAll(subList); - } + if (!hash.containsKey(map.get("CREATED_BY"))) { CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(customerId, map.get("CREATED_BY")); //被删除或被移除的工作人员,名字为空 @@ -257,20 +253,34 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl= NumConstant.FIVE_HUNDRED){ + delAndInsertChangeRecord(customerId, changeList, detailedList); + } } while (icUserList.size() == NumConstant.ONE_THOUSAND); //4.批量新增数据,先删后增【只删除新增节点的历史数据】 //4-1.删除待处理的人员数据【这类人是指在变更记录表中不存在新增节点数据的人】 + //最后再处理一批 + delAndInsertChangeRecord(customerId, changeList, detailedList); + } + + @Transactional(rollbackFor = Exception.class) + public void delAndInsertChangeRecord(String customerId, List changeList, List detailedList) { + if (CollectionUtils.isEmpty(changeList)) { + log.info("customerId:{}初始变更记录数据 已完成!", customerId); + return; + } List icUserIdList = changeList.stream().map(IcUserChangeRecordEntity::getIcUserId).collect(Collectors.toList()); - List> partition = ListUtils.partition(icUserIdList, NumConstant.FIVE_HUNDRED); - partition.forEach(part -> { - baseDao.delByCustomerId(customerId, "add", part); - icUserChangeDetailedService.delByCustomerId(customerId, "add", part); - }); + baseDao.delByCustomerId(customerId, "add", icUserIdList); + icUserChangeDetailedService.delByCustomerId(customerId, "add", icUserIdList); log.info("初始变更记录数据,总条数->" + changeList.size()); icUserChangeRecordService.insertBatch(changeList); log.info("初始变更记录明细数据,总条数->" + detailedList.size()); icUserChangeDetailedService.insertBatch(detailedList); + changeList.clear(); + detailedList.clear(); + icUserIdList.clear(); } } From ba409827beb4114a5f55049b047a23ec5856f816 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 17 Jun 2022 23:09:50 +0800 Subject: [PATCH 308/319] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=20=E4=B8=8D?= =?UTF-8?q?=E8=A6=81count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcUserChangeRecordServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index 5e58019074..172e6b073b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -197,7 +197,7 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl> icUserList = new ArrayList<>(); do { //一千条一循环查询客户下居民数据 - PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND); + PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND,false); icUserList = icResiUserDao.getIcUserList(customerId, columns); pageNo++; From b763c0235b6a015c223937ba0f9d7cef84aee0d6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 17 Jun 2022 23:44:56 +0800 Subject: [PATCH 309/319] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=20=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcUserChangeRecordServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index 172e6b073b..ffd3a18389 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -252,10 +252,10 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl= NumConstant.FIVE_HUNDRED){ - delAndInsertChangeRecord(customerId, changeList, detailedList); + //每500个居民处理一批 + if (changeList.size()>= NumConstant.FIVE_HUNDRED){ + delAndInsertChangeRecord(customerId, changeList, detailedList); + } } } while (icUserList.size() == NumConstant.ONE_THOUSAND); //4.批量新增数据,先删后增【只删除新增节点的历史数据】 From 20c090046ad380151c542c291b66733b7ac14a6f Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 18 Jun 2022 00:08:16 +0800 Subject: [PATCH 310/319] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=20=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcUserChangeRecordServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index ffd3a18389..f72d695c5e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -199,7 +199,8 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl map : icUserList){ From df0489940ec6f6b4888311cc301714ae68748a53 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 19 Jun 2022 13:05:08 +0800 Subject: [PATCH 311/319] =?UTF-8?q?=EF=BC=81=3D''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiUserDao.xml | 4 +++- 1 file changed, 3 insertions(+), 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 934839a316..edb2455bee 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 @@ -132,7 +132,9 @@ - and ${subCondition.tableName}.${colValue} ='1' + + and ${subCondition.tableName}.${colValue} ='1' + From 62451d7338293db67d62e0cdae9ab71a7d4aac92 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 19 Jun 2022 15:16:04 +0800 Subject: [PATCH 312/319] change --- .../main/resources/db/migration/V0.0.30__item_query.sql | 5 ----- .../main/resources/db/migration/V0.0.31__item_query2.sql | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql index 5f8f565bed..cdf0174eab 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql @@ -1,7 +1,2 @@ alter TABLE ic_form_query_builder add COLUMN `MULTI_SELECT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1可以多选,0单选,默认0' after VALID_TYPE; -update ic_form_query_builder set MULTI_SELECT=( - select ic_form_item.MULTI_SELECT from ic_form_item where ic_form_item.CUSTOMER_ID=ic_form_query_builder.CUSTOMER_ID - and ic_form_item.ID=ic_form_query_builder.FORM_ITEM_ID -)where ic_form_query_builder.DEL_FLAG='0' -; diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql new file mode 100644 index 0000000000..32d8738bbc --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql @@ -0,0 +1,7 @@ +update ic_form_query_builder b set b.MULTI_SELECT=( + select i.MULTI_SELECT + from ic_form_item i + where i.CUSTOMER_ID=b.CUSTOMER_ID + and i.ID=b.FORM_ITEM_ID + and i.del_flag='0' +)where b.DEL_FLAG='0'; \ No newline at end of file From b73f2593f533e51f2309bb36543c4cc5898335d4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 19 Jun 2022 15:26:13 +0800 Subject: [PATCH 313/319] =?UTF-8?q?=E4=B8=8D=E6=9B=B4=E6=96=B0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.31__item_query2.sql | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql deleted file mode 100644 index 32d8738bbc..0000000000 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.31__item_query2.sql +++ /dev/null @@ -1,7 +0,0 @@ -update ic_form_query_builder b set b.MULTI_SELECT=( - select i.MULTI_SELECT - from ic_form_item i - where i.CUSTOMER_ID=b.CUSTOMER_ID - and i.ID=b.FORM_ITEM_ID - and i.del_flag='0' -)where b.DEL_FLAG='0'; \ No newline at end of file From 89443f9a9afc85a5a3fc828575777b46529669c3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 20 Jun 2022 09:40:43 +0800 Subject: [PATCH 314/319] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/CollectListResultDTO.java | 3 +++ .../java/com/epmet/dao/IcResiCollectDao.java | 2 ++ .../main/resources/mapper/IcResiCollectDao.xml | 17 +++++++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java index 6a23e0cc1c..0fcaa480d4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -38,6 +39,8 @@ public class CollectListResultDTO implements Serializable { */ private Integer totalResi; + private String domicilePlace; + private List list; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java index 547ef63ca8..db8eb3db7c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java @@ -34,6 +34,8 @@ public interface IcResiCollectDao extends BaseDao { */ List getCollectList(CollectListFormDTO formDTO); + List selectMemberList(@Param("id") String id, @Param("domicilePlace") String domicilePlace); + /** * 我上次提交的主表记录 * @param customerId diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 1269859264..d2ca4339c1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -16,16 +16,19 @@ - + + - select m.`NAME` AS memberName, m.ID_NUM AS memberIdNum, @@ -63,6 +65,9 @@ from ic_resi_member m where m.DEL_FLAG = 0 and m.IC_RESI_COLLECT_ID = #{id} + + AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%') + From 1030b6ff083856bbe8535b0f97cdce1c07690259 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 20 Jun 2022 09:51:12 +0800 Subject: [PATCH 315/319] =?UTF-8?q?=E8=8E=B7=E5=8F=96openId=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/WxmpMessageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 81edf12a9a..5a4b39f502 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -544,7 +544,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { throw new WxSubscribeException("clientType有误", "", openId); } } catch (Exception e) { - log.error("method exception", e); + log.warn("method exception,msg:{}", e.getMessage()); throw new WxSubscribeException("获取openId失败:" + e.getMessage(), "", ""); } return openId; From 3378796d56ccc17c594e619300e5b790b251eadf Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 20 Jun 2022 15:04:04 +0800 Subject: [PATCH 316/319] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=97=A5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=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/project/ProjectProcessDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index a1e6a233d0..2ee065b4b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -4,7 +4,7 @@