Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-dj-pe-analysis
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3782c7d0
authored
Mar 30, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]新增根据商户号获取门店信息和根据省份获取门店信息接口
1 parent
46bf7a18
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
1 deletions
src/main/java/cn/com/glsx/dj/controller/ReportSubscribeController.java
src/main/java/cn/com/glsx/dj/request/biAnalyse/MerchantRequestRop.java
src/main/java/cn/com/glsx/dj/controller/ReportSubscribeController.java
View file @
3782c7d
...
@@ -5,13 +5,19 @@ import cn.com.glsx.dj.mindworkplate.model.warning.CoefficientListMsgDTO;
...
@@ -5,13 +5,19 @@ import cn.com.glsx.dj.mindworkplate.model.warning.CoefficientListMsgDTO;
import
cn.com.glsx.dj.mindworkplate.model.warning.MonitoringMsgDTO
;
import
cn.com.glsx.dj.mindworkplate.model.warning.MonitoringMsgDTO
;
import
cn.com.glsx.dj.mindworkplate.remote.MonitoringRemote
;
import
cn.com.glsx.dj.mindworkplate.remote.MonitoringRemote
;
import
cn.com.glsx.dj.peanalysis.model.DjReportSubscribeConfig
;
import
cn.com.glsx.dj.peanalysis.model.DjReportSubscribeConfig
;
import
cn.com.glsx.dj.request.biAnalyse.MerchantRequestRop
;
import
cn.com.glsx.dj.request.biAnalyse.MonitorBaseRequestRop
;
import
cn.com.glsx.dj.request.biAnalyse.MonitorBaseRequestRop
;
import
cn.com.glsx.dj.util.CommonUtil
;
import
cn.com.glsx.dj.util.CommonUtil
;
import
cn.com.glsx.merchants.dto.merchant.CarBrandProvinceRequestDTO
;
import
cn.com.glsx.merchants.model.response.MerchantProvinceDTO
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java
fx.scene.control.ComboBox
;
import
java
.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -46,6 +52,9 @@ public class ReportSubscribeController {
...
@@ -46,6 +52,9 @@ public class ReportSubscribeController {
@Autowired
@Autowired
private
MonitoringRemote
monitoringRemote
;
private
MonitoringRemote
monitoringRemote
;
@Autowired
private
MerchantRemote
merchantRemote
;
/**
/**
* 更新展业周报订阅状态
* 更新展业周报订阅状态
* @param req UpdateWeeklyReportSubscribeRequest
* @param req UpdateWeeklyReportSubscribeRequest
...
@@ -160,4 +169,63 @@ public class ReportSubscribeController {
...
@@ -160,4 +169,63 @@ public class ReportSubscribeController {
return
RopResponse
.
error
(
"获取系数列表失败"
);
return
RopResponse
.
error
(
"获取系数列表失败"
);
}
}
}
}
@ServiceMethod
(
method
=
"org.ore.api.report.subscribe.getCoefficientListByCondition"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"根据条件获取系数列表"
)
public
RopResponse
<
List
<
CoefficientListMsgDTO
>>
getCoefficientListByCondition
()
{
MonitorBaseRequest
request
=
CommonUtil
.
convertRequest
(
MonitorBaseRequest
.
class
);
try
{
RpcResponse
<
List
<
CoefficientListMsgDTO
>>
coefficientListByCondition
=
monitoringRemote
.
getCoefficientListByCondition
(
request
);
return
RopResponse
.
success
(
coefficientListByCondition
.
getResult
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取系数列表失败: {}"
,
e
);
return
RopResponse
.
error
(
"获取系数列表失败"
);
}
}
@ServiceMethod
(
method
=
"org.ore.api.report.subscribe.getAllMerchantList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"根据商户号获取门店信息"
)
public
RopResponse
<
List
<
MerchantProvinceDTO
>>
getAllMerchantList
(
MerchantRequestRop
request
)
{
try
{
if
(
request
==
null
||
request
.
getMerchantNos
()
==
null
)
{
return
RopResponse
.
error
(
"商户号不能为空"
);
}
List
<
Integer
>
merchantIds
=
Arrays
.
stream
(
request
.
getMerchantNos
().
split
(
","
))
.
distinct
()
.
map
(
Integer:
:
valueOf
)
.
collect
(
Collectors
.
toList
());
RpcResponse
<
List
<
MerchantProvinceDTO
>>
merchantProvinceListByIds
=
merchantRemote
.
findMerchantProvinceListByIds
(
merchantIds
);
return
RopResponse
.
success
(
merchantProvinceListByIds
.
getResult
());
}
catch
(
NumberFormatException
e
)
{
logger
.
error
(
"商户号格式错误: {}"
,
e
);
return
RopResponse
.
error
(
"商户号格式错误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取门店信息失败: {}"
,
e
);
return
RopResponse
.
error
(
"获取门店信息失败"
);
}
}
@ServiceMethod
(
method
=
"org.ore.api.report.subscribe.getAllMerchantListByProvince"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"根据省份获取门店信息"
)
public
RopResponse
<
List
<
MerchantProvinceDTO
>>
getAllMerchantListByProvince
(
MerchantRequestRop
request
)
{
try
{
if
(
request
==
null
||
request
.
getProvinceIds
()
==
null
)
{
return
RopResponse
.
error
(
"省份ID不能为空"
);
}
CarBrandProvinceRequestDTO
carBrandProvinceRequestDTO
=
new
CarBrandProvinceRequestDTO
();
carBrandProvinceRequestDTO
.
setProvinceIds
(
request
.
getProvinceIds
());
RpcResponse
<
List
<
MerchantProvinceDTO
>>
merchantListByBrandIdsProvince
=
merchantRemote
.
findMerchantListByBrandIdsProvince
(
carBrandProvinceRequestDTO
);
return
RopResponse
.
success
(
merchantListByBrandIdsProvince
.
getResult
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"根据省份获取门店信息失败: {}"
,
e
);
return
RopResponse
.
error
(
"根据省份获取门店信息失败"
);
}
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/dj/request/biAnalyse/MerchantRequestRop.java
0 → 100644
View file @
3782c7d
package
cn
.
com
.
glsx
.
dj
.
request
.
biAnalyse
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
import
javax.validation.constraints.NotNull
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* 盯防指标筛选请求参数
*/
@Data
@Accessors
(
chain
=
true
)
public
class
MerchantRequestRop
extends
AbstractRopRequest
{
/**
* merchantNos
*/
@ApiModelProperty
(
value
=
"merchantNos"
)
private
String
merchantNos
;
@ApiModelProperty
(
notes
=
"省份"
)
private
List
<
Integer
>
provinceIds
;
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment