Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into 市北master

feature/teamB_zz_wgh
jianjun 3 years ago
parent
commit
bb38ffcd58
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
  2. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java
  3. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
  4. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
  5. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
  6. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java
  7. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  8. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
  10. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  11. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  12. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  13. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  14. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx
  15. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  16. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  17. 1
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java
  18. 3
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java

2
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;

4
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;
}

2
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;

2
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;
/**

2
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;

5
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)) {

14
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<AgencyTreeResultDTO>().ok(customerAgencyService.getAgencyList(formDTO));
}
/**
* 工作端获取当前登录用户所属组织及下级的组织树不包括网格
* @param tokenDTO
* @param formDTO
* @return
*/
@PostMapping("my-subagency-list")
public Result<AgencyTreeResultDTO> getMySubAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setUserId(tokenDTO.getUserId());
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getMySubAgencyList(formDTO));
}
/**
* @description 通过staffId查询跟组织列表
*

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -250,7 +250,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
*/
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<AgencyTreeResultDTO> getSubAgencyList(@Param("pid") String pid);

2
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;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -191,12 +191,14 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
return;
}
dto.setPurpose(HousePurposeEnums.getKeyByValue(dto.getPurpose()));
if (StringUtils.isNotBlank(dto.getRentFlagString()) && (!dto.getRentFlagString().equals("自住") && !dto.getRentFlagString().equals("出租") && !dto.getRentFlagString().equals("闲置"))){
//根据name 获取code 名字没有匹配返回null
Integer rentFlagCode = HouseRentFlagEnums.getCodeByName(dto.getRentFlagString());
if (StringUtils.isNotBlank(dto.getRentFlagString()) && rentFlagCode == null){
nums.add(num);
disposeErrorMsg(info,"房屋状态的值未填写或者所填写信息在系统中未找到");
return;
}
dto.setRentFlag(HouseRentFlagEnums.getCodeByName(dto.getRentFlagString()));
dto.setRentFlag(rentFlagCode);
dto.setHouseName(dto.getBuildingName()+"-"+dto.getBuildingUnit()+"-"+dto.getDoorName());
if (formDTO.getOrgType().equals(CustomerGridConstant.BUILDING)){
disposeBuildingHouse(dto);

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -255,6 +255,13 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
*/
AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO);
/**
* 工作端获取当前登录用户所属组织及下级的组织树不包括网格
* @param formDTO
* @return
*/
AgencyTreeResultDTO getMySubAgencyList(GetAgencyListFormDTO formDTO);
List<StaffOrgsResultDTO> getStaffOrgListByStaffId(String staffId);
/**

26
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<CustomerAgencyDao
*/
@Override
public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) {
AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId());
AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId(),null);
if (CollectionUtils.isEmpty(agency.getSubAgencyList())) {
agency.setSubAgencyList(null);
} else {
@ -1145,6 +1147,28 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return agency;
}
/**
* 工作端获取当前登录用户所属组织及下级的组织树不包括网格
* @param formDTO
* @return
*/
@Override
public AgencyTreeResultDTO getMySubAgencyList(GetAgencyListFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) {
log.warn("com.epmet.service.impl.CustomerAgencyServiceImpl.getMySubAgencyList,没有找到工作人员所属的机关信息,用户Id:{}", formDTO.getUserId());
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常");
}
AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId(),staffInfoCacheResult.getAgencyId());
if (CollectionUtils.isEmpty(agency.getSubAgencyList())) {
agency.setSubAgencyList(null);
} else {
setAgencyList(agency.getSubAgencyList());
}
return agency;
}
@Override
public AgencyTreeResultDTO getOrgTreeData(String staffId) {
AgencyTreeResultDTO result = new AgencyTreeResultDTO();

18
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -1,6 +1,5 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -222,19 +221,8 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
HouseListResultDTO dto = new HouseListResultDTO();
dto.setHouseId(item.getId());
dto.setHouseName(item.getHouseName());
switch (item.getRentFlag()) {
case NumConstant.ZERO:
dto.setRentFlag("自住");
break;
case NumConstant.ONE:
dto.setRentFlag("出租");
break;
case NumConstant.TWO:
dto.setRentFlag("闲置");
break;
default:
break;
}
String houseTypeName = HouseRentFlagEnums.getTypeValue(item.getRentFlag());
dto.setRentFlag(houseTypeName == null ? StrConstant.EPMETY_STR:houseTypeName);
List<HouseListResultDTO.CategoryListBean> categories = new ArrayList<>();
if (null != countMap && CollectionUtils.isNotEmpty(categoryList)) {
for (IcResiCategoryStatsConfigDTO category : categoryList) {
@ -302,4 +290,4 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
lqw.eq(IcHouseEntity::getHouseCode, houseCode);
return ConvertUtils.sourceToTarget(baseDao.selectOne(lqw), IcHouseDTO.class);
}
}
}

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx

Binary file not shown.

11
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -620,7 +620,9 @@
AND PID= #{pid}
ORDER BY ID
</select>
<select id="getAllAgency" resultMap="NodeTreeResult">
<!-- 如果传入了 staffAgencyId 查询当前组织及下级没有的话查询客户下所有组织 -->
<select id="getAllAgency" parameterType="map" resultMap="NodeTreeResult">
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}
<if test="staffAgencyId != null and staffAgencyId != ''">
AND id = #{staffAgencyId}
</if>
<if test="staffAgencyId == null || staffAgencyId == ''">
AND PID ='0'
</if>
</select>
<select id="getStaffOrgListByStaffId" resultType="com.epmet.dto.result.StaffOrgsResultDTO">

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -96,6 +96,7 @@
(case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租'
when a.RENT_FLAG = '2' then '闲置'
when a.RENT_FLAG = '3' then '未出售'
else '' end) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
@ -467,6 +468,7 @@
(case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租'
when a.RENT_FLAG = '2' then '闲置'
when a.RENT_FLAG = '3' then '未出售'
else '' end) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,

1
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<IcResiCategoryStatsConfigResultDTO>> list(@LoginUser TokenDto tokenDTO,@RequestBody ResiCategoryStatsConfigListFormDTO formDTO){
String customerId = tokenDTO.getCustomerId();
// String customerId = "123123";
return new Result<List<IcResiCategoryStatsConfigResultDTO>>().ok(resiCategoryStatsConfigService.list(customerId,formDTO));
}

3
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<IcResiCategoryStatsConfigEntity> statsConfigEntityList = icResiCategoryStatsConfigDao.selectList(new QueryWrapper<IcResiCategoryStatsConfigEntity>().lambda().eq(IcResiCategoryStatsConfigEntity::getCustomerId,customerId));
if (!CollectionUtils.isEmpty(statsConfigEntityList)){
return icResiCategoryStatsConfigDao.listInfo(customerId,formDTO.getIsWarn(),formDTO.getLevel());
}
List<IcResiCategoryWarnConfigEntity> warnConfigEntityList = icResiCategoryWarnConfigDao.selectList(new QueryWrapper<IcResiCategoryWarnConfigEntity>().lambda().eq(IcResiCategoryWarnConfigEntity::getCustomerId,customerId));
//3.新增不存在的,删除不在tableColumnMap的

Loading…
Cancel
Save