Browse Source

去其他网格看看,bug修改测试

dev_shibei_match
yinzuomei 4 years ago
parent
commit
fe65d9e3b9
  1. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  2. 47
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  3. 6
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -631,13 +631,13 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
//行政区 - 指定行政区在前,所属城市下其余行政区在后
Map<String, Object> map = new HashMap<>();
map.put("customerId", formDTO.getCustomerId());
//地区码格式 六位 [abcxyz]
/*//地区码格式 六位 [abcxyz]
//ab代表省
map.put("areaCode", areaCode);
//cx代表市
map.put("cityCode", areaCode.substring(NumConstant.ZERO, areaCode.length() - NumConstant.TWO));
//yz代表区
map.put("provinceCode", areaCode.substring(NumConstant.ZERO, areaCode.length() - NumConstant.FOUR));
map.put("provinceCode", areaCode.substring(NumConstant.ZERO, areaCode.length() - NumConstant.FOUR));*/
map.put("pageSize", formDTO.getPageSize());
map.put("pageNo", formDTO.getPageNo());

47
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -443,7 +443,6 @@
SELECT
c.*
FROM
(
(
SELECT
a.id AS grid_id,
@ -468,49 +467,9 @@
) agency ON a.PID = agency.ID
WHERE
a.del_flag = 0
<if test='areaCode != "" and areaCode != null'>
AND a.area_code = #{areaCode}
</if>
AND a.customer_id = #{customerId}
ORDER BY
CONVERT ( gridName USING gbk ) ASC
LIMIT 0,999999999999
)
UNION
(
SELECT
b.id AS grid_id,
b.customer_id,
concat(agency.fullname , '-' ,b.grid_name) as gridName
FROM
CUSTOMER_GRID b
LEFT JOIN (
SELECT
a1.id,
CASE
WHEN a2.ORGANIZATION_NAME IS NULL THEN
a1.ORGANIZATION_NAME ELSE concat( a2.ORGANIZATION_NAME, '-', a1.ORGANIZATION_NAME )
END AS fullname
FROM
customer_agency a1
LEFT JOIN customer_agency a2 ON a1.PID = a2.ID
AND a1.del_flag = '0'
WHERE
a1.del_flag = '0'
AND a1.customer_id = #{customerId}
) agency ON b.PID = agency.ID
WHERE
b.del_flag = 0
AND b.customer_id = #{customerId}
AND b.area_code LIKE CONCAT(#{cityCode},'%')
<if test='areaCode != "" and areaCode != null'>
AND <![CDATA[ b.area_code <> #{areaCode}]]>
</if>
ORDER BY
b.area_code DESC ,CONVERT ( gridName USING gbk ) ASC
LIMIT 0,999999999999
)
) AS c
AND a.customer_id = #{customerId}
) AS c
ORDER BY CONVERT ( gridName USING gbk ) ASC
LIMIT #{pageNo}, #{pageSize}
</select>

6
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/StrangerAccessRecordServiceImpl.java

@ -24,14 +24,12 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.CustomerGridForStrangerResultDTO;
import com.epmet.dto.result.HomeDesignByCustomerResultDTO;
import com.epmet.dto.result.PublicCustomerGridForStrangerResultDTO;
import com.epmet.dto.result.PublicCustomerResultDTO;
import com.epmet.entity.StrangerAccessRecordEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.OperCustomizeFeignClient;
import com.epmet.service.StrangerAccessRecordService;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -267,8 +265,8 @@ public class StrangerAccessRecordServiceImpl extends BaseServiceImpl<StrangerAcc
formDTO.getSelectedAreaCode() : formDTO.getAreaCode());
//分页参数设置
third.setPageNo(null == formDTO.getPageNo() ? ModuleConstant.MIN_CURRENT_PAGE_NO : formDTO.getPageNo());
//third.setPageSize(formDTO.getPageSize());
third.setPageSize(200);
third.setPageSize(formDTO.getPageSize());
// third.setPageSize(200);
//2.调用gov-org服务,查询客户网格列表数据
Result<List<PublicCustomerGridForStrangerResultDTO>> queryResult = govOrgFeignClient.queryCustomerGridList(third);

Loading…
Cancel
Save