Browse Source

列表bug

dev_shibei_match
yinzuomei 4 years ago
parent
commit
630b65dc35
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java
  3. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java
  4. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  5. 27
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  6. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
  7. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  8. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml
  9. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java

@ -15,6 +15,7 @@ public class OptionResultDTO implements Serializable {
private static final long serialVersionUID = 8618231166600518980L; private static final long serialVersionUID = 8618231166600518980L;
private String label; private String label;
private String value; private String value;
private String pValue;
private String sysDictDataId; private String sysDictDataId;
private List<OptionResultDTO> children; private List<OptionResultDTO> children;
} }

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java

@ -39,6 +39,4 @@ public class ServiceQueryFormDTO implements Serializable {
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId; private String customerId;
private String demandRecId;
} }

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java

@ -17,6 +17,7 @@ public class DemandRecResultDTO implements Serializable {
@JsonIgnore @JsonIgnore
private String gridId; private String gridId;
private String gridName; private String gridName;
private String agencyId;
@JsonIgnore @JsonIgnore
private String categoryCode; private String categoryCode;

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -256,6 +256,9 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}else{
//当前用户属于第二级组织的人,不会有:
agencyIds.add(staffInfoCacheResult.getAgencyPIds());
} }
} }
agencyIds.add(staffInfoCacheResult.getAgencyId()); agencyIds.add(staffInfoCacheResult.getAgencyId());

27
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -21,16 +21,19 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; 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.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcPartyUnitDao; import com.epmet.dao.IcPartyUnitDao;
import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.demand.SubCodeFormDTO;
@ -177,17 +180,21 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
*/ */
@Override @Override
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) { public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) {
List<OptionDTO> resultList=new ArrayList<>(); List<OptionDTO> resultList = new ArrayList<>();
IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) {
return resultList; throw new RenException("工作人员所属组织信息查询异常");
} }
List<String> agencyIds=new ArrayList<>(); List<String> agencyIds = new ArrayList<>();
if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) {
}else{ agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
agencyIds.add(icUserDemandRecDTO.getGridPids()); }else{
//当前用户属于第二级组织的人,不会有:
agencyIds.add(staffInfoCacheResult.getAgencyPIds());
}
} }
agencyIds.add(staffInfoCacheResult.getAgencyId());
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId());
return resultList; return resultList;
} }

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java

@ -154,6 +154,9 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) {
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}else{
//当前用户属于第二级组织的人,不会有:
agencyIds.add(staffInfoCacheResult.getAgencyPIds());
} }
} }
agencyIds.add(staffInfoCacheResult.getAgencyId()); agencyIds.add(staffInfoCacheResult.getAgencyId());

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; 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.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -205,12 +206,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
if (null == staffInfo) { if (null == staffInfo) {
throw new RenException("工作人员所属组织信息查询异常"); throw new RenException("工作人员所属组织信息查询异常");
} }
if (StringUtils.isBlank(staffInfo.getAgencyPIds())) { if (StringUtils.isBlank(staffInfo.getAgencyPIds())|| NumConstant.ZERO_STR.equals(staffInfo.getAgencyPIds())) {
//当前用户属于根组织下的人
formDTO.setGridPids(staffInfo.getAgencyId()); formDTO.setGridPids(staffInfo.getAgencyId());
} else { } else {
if (staffInfo.getAgencyPIds().contains(StrConstant.COLON)) { formDTO.setGridPids(staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()));
formDTO.setGridPids(staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()));
}
} }
PageInfo<DemandRecResultDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(), PageInfo<DemandRecResultDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO)); formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO));

7
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml

@ -23,6 +23,7 @@
<result column="customerId"/> <result column="customerId"/>
<result column="value" property="value"/> <result column="value" property="value"/>
<result column="label" property="label"/> <result column="label" property="label"/>
<result column="PARENT_CODE" property="pValue"/>
<collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO" <collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO"
select="selectChildDemands" column="customerId=customerId,parentCode=value"> select="selectChildDemands" column="customerId=customerId,parentCode=value">
</collection> </collection>
@ -31,7 +32,8 @@
SELECT SELECT
CUSTOMER_ID AS customerId, CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value", CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label" CATEGORY_NAME AS "label",
PARENT_CODE as pValue
FROM FROM
ic_resi_demand_dict ic_resi_demand_dict
WHERE WHERE
@ -45,7 +47,8 @@
SELECT SELECT
CUSTOMER_ID AS customerId, CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value", CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label" CATEGORY_NAME AS "label",
PARENT_CODE as pValue
FROM FROM
ic_resi_demand_dict ic_resi_demand_dict
WHERE WHERE

1
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -39,6 +39,7 @@
SELECT SELECT
r.ID as demandRecId, r.ID as demandRecId,
r.GRID_ID as gridId, r.GRID_ID as gridId,
r.agency_id as agencyId,
r.CATEGORY_CODE as categoryCode, r.CATEGORY_CODE as categoryCode,
r.CONTENT, r.CONTENT,
r.REPORT_TYPE as reportType, r.REPORT_TYPE as reportType,

Loading…
Cancel
Save