From a5f04bae6408c99f5e11a8481fc410199f7a15ea Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 16 Jun 2022 17:02:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ResiCategoryStatsConfigController.java | 1 - .../epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java index 3c2004e714..8d16dfdb23 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java @@ -75,7 +75,6 @@ public class ResiCategoryStatsConfigController { @PostMapping("list") public Result> list(@LoginUser TokenDto tokenDTO,@RequestBody ResiCategoryStatsConfigListFormDTO formDTO){ String customerId = tokenDTO.getCustomerId(); -// String customerId = "123123"; return new Result>().ok(resiCategoryStatsConfigService.list(customerId,formDTO)); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java index e95f209aba..a21534cdce 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java @@ -81,6 +81,9 @@ public class ResiCategoryStatsConfigServiceImpl implements ResiCategoryStatsConf //2.获取ic_resi_category_stats_config 和 ic_resi_category_warn_config 表中的数据 List statsConfigEntityList = icResiCategoryStatsConfigDao.selectList(new QueryWrapper().lambda().eq(IcResiCategoryStatsConfigEntity::getCustomerId,customerId)); + if (!CollectionUtils.isEmpty(statsConfigEntityList)){ + return icResiCategoryStatsConfigDao.listInfo(customerId,formDTO.getIsWarn(),formDTO.getLevel()); + } List warnConfigEntityList = icResiCategoryWarnConfigDao.selectList(new QueryWrapper().lambda().eq(IcResiCategoryWarnConfigEntity::getCustomerId,customerId)); //3.新增不存在的,删除不在tableColumnMap的 From 22cc7c450786395674e0199aa96a68c25f78259f Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 16 Jun 2022 17:04:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E6=B7=BB=E5=8A=A0=203:?= =?UTF-8?q?=E6=9C=AA=E5=87=BA=E5=94=AE=20=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/ImportGeneralDTO.java | 2 +- .../com/epmet/dto/form/IcHouseAddFormDTO.java | 2 +- .../com/epmet/dto/form/IcHouseListFormDTO.java | 2 +- .../epmet/dto/result/HouseChartResultDTO.java | 2 +- .../com/epmet/enums/HouseRentFlagEnums.java | 5 +++-- .../java/com/epmet/entity/IcHouseEntity.java | 2 +- .../epmet/model/ImportHouseInfoListener.java | 6 ++++-- .../epmet/service/impl/IcHouseServiceImpl.java | 18 +++--------------- .../src/main/resources/mapper/IcHouseDao.xml | 2 ++ 9 files changed, 17 insertions(+), 24 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java index 1bfeb17521..ca5408d581 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java @@ -98,7 +98,7 @@ public class ImportGeneralDTO implements Serializable { private String purpose; /** - * 房屋状态 1:出租 0:自住 2:闲置 + * 房屋状态 1:出租 0:自住 2:闲置 3:未出售 */ private String rentFlagString; private Integer rentFlag; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java index 8882060a2e..a07f4fe886 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java @@ -81,7 +81,7 @@ public class IcHouseAddFormDTO implements Serializable { private String purpose; /** - * 1:出租 0:自住 2:闲置 + * 1:出租 0:自住 2:闲置 3: 未出售 */ @NotNull(message = "房屋状态不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) private Integer rentFlag; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java index 0e2e25a049..bfff2b0709 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java @@ -48,7 +48,7 @@ public class IcHouseListFormDTO extends PageFormDTO { */ private String ownerPhone; /** - * 房屋状态 【1:出租 0:自住 2:闲置】 + * 房屋状态 【1:出租 0:自住 2:闲置 3:未出售】 */ private String rentFlag; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java index 7a4e974162..aed43f1b0c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java @@ -50,7 +50,7 @@ public class HouseChartResultDTO implements Serializable { @JsonIgnore private Integer num; - //1:出租 0:自住 2:闲置 + //1:出租 0:自住 2:闲置 3:未出售 @JsonIgnore private Integer rentFlag; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java index 27cd699bf3..32337f847d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java @@ -8,7 +8,8 @@ public enum HouseRentFlagEnums { NO(0,"否");*/ HOUSE_ZZ(0,"自住"), HOUSE_CZ(1,"出租"), - HOUSE_XZ(2,"闲置"); + HOUSE_XZ(2,"闲置"), + HOUSE_WCS(3,"未出售"); @@ -41,7 +42,7 @@ public enum HouseRentFlagEnums { public static Integer getCodeByName(String name){ if(StringUtils.isEmpty(name)){ - return 0; + return null; } for (HouseRentFlagEnums e : HouseRentFlagEnums.values()) { if (e.getName().equals(name)) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java index 5940608292..a535667426 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java @@ -83,7 +83,7 @@ public class IcHouseEntity extends BaseEpmetEntity { private String purpose; /** - * 1出租;0未出租 + * 1:出租 0:自住 2:闲置 3:未出售 */ private Integer rentFlag; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java index b070543014..2d9bb999e8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java @@ -191,12 +191,14 @@ public class ImportHouseInfoListener extends AnalysisEventListener categories = new ArrayList<>(); if (null != countMap && CollectionUtils.isNotEmpty(categoryList)) { for (IcResiCategoryStatsConfigDTO category : categoryList) { @@ -302,4 +290,4 @@ public class IcHouseServiceImpl extends BaseServiceImpl Date: Thu, 16 Jun 2022 18:33:45 +0800 Subject: [PATCH 3/4] =?UTF-8?q?"my-subagency-list"=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98=E6=89=80=E5=B1=9E=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=8F=8A=E4=B8=8B=E7=BA=A7=E7=BB=84=E7=BB=87=E6=A0=91?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=8C=85=E5=90=AB=E7=BD=91=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/GetAgencyListFormDTO.java | 4 +++ .../controller/CustomerAgencyController.java | 14 ++++++++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 2 +- .../epmet/service/CustomerAgencyService.java | 7 +++++ .../impl/CustomerAgencyServiceImpl.java | 26 ++++++++++++++++++- .../resources/mapper/CustomerAgencyDao.xml | 11 ++++++-- 6 files changed, 60 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java index 0d97988fd7..95c371ad83 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java @@ -15,4 +15,8 @@ public class GetAgencyListFormDTO implements Serializable { private static final long serialVersionUID = -5846836779036328298L; private String customerId; + + + //当前登录用户id,从tokenDto中获取 + private String userId; } 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 557a987c09..5325163074 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 @@ -354,6 +354,20 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.getAgencyList(formDTO)); } + /** + * 工作端,获取当前登录用户所属组织及下级的组织树(不包括网格!!!!!!!!!!) + * @param tokenDTO + * @param formDTO + * @return + */ + @PostMapping("my-subagency-list") + public Result getMySubAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); + formDTO.setUserId(tokenDTO.getUserId()); + return new Result().ok(customerAgencyService.getMySubAgencyList(formDTO)); + } + + /** * @description 通过staffId查询跟组织列表 * 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 892ef61681..02e483d9f2 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 @@ -250,7 +250,7 @@ public interface CustomerAgencyDao extends BaseDao { */ OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType); - AgencyTreeResultDTO getAllAgency(@Param("customerId") String customerId); + AgencyTreeResultDTO getAllAgency(@Param("customerId") String customerId,@Param("staffAgencyId")String staffAgencyId); List getSubAgencyList(@Param("pid") String pid); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index f3ac3c7212..dcdc1d44a8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -255,6 +255,13 @@ public interface CustomerAgencyService extends BaseService */ AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO); + /** + * 工作端,获取当前登录用户所属组织及下级的组织树(不包括网格!!!!!!!!!!) + * @param formDTO + * @return + */ + AgencyTreeResultDTO getMySubAgencyList(GetAgencyListFormDTO formDTO); + List getStaffOrgListByStaffId(String staffId); /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index f21337742e..adaf547abf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -24,6 +24,7 @@ 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.constant.StrConstant; +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; @@ -32,6 +33,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; 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; @@ -1136,7 +1138,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl - select ID AS agencyId, ORGANIZATION_NAME AS agencyName, @@ -630,8 +632,13 @@ customer_agency where DEL_FLAG = 0 - AND PID ='0' AND CUSTOMER_ID = #{customerId} + + AND id = #{staffAgencyId} + + + AND PID ='0' +