|
|
|
@ -250,7 +250,7 @@ class OpportunityViewQueryImplTest { |
|
|
|
Opportunity opp = new Opportunity(); |
|
|
|
opp.setId(7001L); |
|
|
|
opp.setOppSource("lead_transfer"); |
|
|
|
opp.setIndustryCode("it"); |
|
|
|
opp.setIndustryCode("gov"); |
|
|
|
opp.setOwnerDeptId(300L); |
|
|
|
opp.setProvinceCode("440000"); |
|
|
|
opp.setCityCode("440300"); |
|
|
|
@ -258,13 +258,13 @@ class OpportunityViewQueryImplTest { |
|
|
|
page.setRecords(List.of(opp)); |
|
|
|
when(opportunityMapper.selectPage(any(), any())).thenReturn(page); |
|
|
|
|
|
|
|
// 字典:(opp_source, lead_transfer) / (industry_code, it)
|
|
|
|
// 字典:(opp_source, lead_transfer) / (industry, gov) — 行业商机只选到一级 code(票 09 Q7)
|
|
|
|
com.crm.dict.domain.entity.DictItem srcItem = new com.crm.dict.domain.entity.DictItem(); |
|
|
|
srcItem.setName("线索转入"); |
|
|
|
com.crm.dict.domain.entity.DictItem indItem = new com.crm.dict.domain.entity.DictItem(); |
|
|
|
indItem.setName("信息技术"); |
|
|
|
indItem.setName("政府机关"); |
|
|
|
when(dictQueryService.getItem("opp_source", "lead_transfer")).thenReturn(srcItem); |
|
|
|
when(dictQueryService.getItem("industry_code", "it")).thenReturn(indItem); |
|
|
|
when(dictQueryService.getItem("industry", "gov")).thenReturn(indItem); |
|
|
|
|
|
|
|
// 部门:300 -> 华南大区
|
|
|
|
com.crm.auth.domain.entity.SysDept dept = new com.crm.auth.domain.entity.SysDept(); |
|
|
|
@ -286,7 +286,7 @@ class OpportunityViewQueryImplTest { |
|
|
|
OpportunityDTO dto = query.pageOpportunities(param).getContent().get(0); |
|
|
|
|
|
|
|
assertThat(dto.getOppSourceName()).isEqualTo("线索转入"); |
|
|
|
assertThat(dto.getIndustryName()).isEqualTo("信息技术"); |
|
|
|
assertThat(dto.getIndustryName()).isEqualTo("政府机关"); |
|
|
|
assertThat(dto.getOwnerDeptName()).isEqualTo("华南大区"); |
|
|
|
assertThat(dto.getProvinceName()).isEqualTo("广东省"); |
|
|
|
assertThat(dto.getCityName()).isEqualTo("深圳市"); |
|
|
|
|