Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnooc_zydeepen-cggl_expert-manage-miniapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙德龙
cnooc_zydeepen-cggl_expert-manage-miniapp
Commits
a90b10d0
Commit
a90b10d0
authored
Nov 12, 2025
by
kenzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.12 sumbit
parent
12d7d5e1
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
894 additions
and
39 deletions
+894
-39
src/main/java/com/cnooc/expert/common/interceptor/WebAuthInterceptor.java
+1
-0
src/main/java/com/cnooc/expert/common/request/BasePageRequest.java
+25
-0
src/main/java/com/cnooc/expert/common/response/BasePageResp.java
+19
-0
src/main/java/com/cnooc/expert/config/RetrofitConfiguration.java
+21
-1
src/main/java/com/cnooc/expert/controller/expert/ExpertController.java
+97
-0
src/main/java/com/cnooc/expert/controller/expert/model/request/CompanyPageReq.java
+11
-0
src/main/java/com/cnooc/expert/controller/expert/model/request/DictNofilterListReq.java
+10
-0
src/main/java/com/cnooc/expert/controller/expert/model/request/PersonGetReq.java
+1
-1
src/main/java/com/cnooc/expert/controller/expert/model/response/CompanyPageResp.java
+26
-0
src/main/java/com/cnooc/expert/controller/expert/model/response/DictListResp.java
+25
-0
src/main/java/com/cnooc/expert/controller/expert/model/response/NofilterListResp.java
+23
-0
src/main/java/com/cnooc/expert/controller/expert/model/response/SecondaryUnitListResp.java
+23
-0
src/main/java/com/cnooc/expert/controller/person/PersonController.java
+0
-22
src/main/java/com/cnooc/expert/controller/portal/PortalController.java
+71
-0
src/main/java/com/cnooc/expert/controller/portal/model/request/AgentNumReq.java
+10
-0
src/main/java/com/cnooc/expert/controller/portal/model/request/AgentPageReq.java
+13
-0
src/main/java/com/cnooc/expert/controller/portal/model/request/MessageNumReq.java
+14
-0
src/main/java/com/cnooc/expert/controller/portal/model/request/MessagePageReq.java
+12
-0
src/main/java/com/cnooc/expert/controller/portal/model/response/AgentNumResp.java
+16
-0
src/main/java/com/cnooc/expert/controller/portal/model/response/AgentPageResp.java
+40
-0
src/main/java/com/cnooc/expert/controller/portal/model/response/MessageNumResp.java
+14
-0
src/main/java/com/cnooc/expert/controller/portal/model/response/MessagePageResp.java
+48
-0
src/main/java/com/cnooc/expert/controller/workflow/WorkflowController.java
+15
-0
src/main/java/com/cnooc/expert/external/expert/service/ExpertServiceClient.java
+2
-2
src/main/java/com/cnooc/expert/external/portal/api/PortalServiceApi.java
+7
-0
src/main/java/com/cnooc/expert/external/portal/service/PortalServiceClient.java
+18
-0
src/main/java/com/cnooc/expert/external/workflow/api/WorkflowServiceApi.java
+4
-0
src/main/java/com/cnooc/expert/external/workflow/service/WorkflowServiceClient.java
+17
-0
src/main/java/com/cnooc/expert/service/ExpertService.java
+170
-0
src/main/java/com/cnooc/expert/service/PortalService.java
+140
-0
src/main/java/com/cnooc/expert/service/WorkflowService.java
+1
-13
No files found.
src/main/java/com/cnooc/expert/common/interceptor/WebAuthInterceptor.java
View file @
a90b10d0
...
...
@@ -6,6 +6,7 @@ public class WebAuthInterceptor extends AbstractAuthInterceptor {
@Override
protected
boolean
valid
(
HttpServletRequest
request
)
{
// TODO 小程序认证逻辑
return
true
;
}
}
src/main/java/com/cnooc/expert/common/request/BasePageRequest.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
common
.
request
;
import
lombok.Getter
;
@Getter
public
class
BasePageRequest
{
private
static
final
int
DEFAULT_PAGE_NO
=
1
;
private
static
final
int
DEFAULT_PAGE_SIZE
=
10
;
private
Integer
pageNo
;
private
Integer
pageSize
;
public
void
setPageNo
(
Integer
pageNo
)
{
this
.
pageNo
=
(
pageNo
!=
null
)
?
pageNo
:
DEFAULT_PAGE_NO
;
}
public
void
setPageSize
(
Integer
pageSize
)
{
this
.
pageSize
=
(
pageSize
!=
null
)
?
pageSize
:
DEFAULT_PAGE_SIZE
;
}
}
src/main/java/com/cnooc/expert/common/response/BasePageResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
common
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Builder
public
class
BasePageResp
<
T
>
{
private
Integer
total
;
private
Integer
pages
;
private
Integer
current
;
private
List
<
T
>
data
;
}
src/main/java/com/cnooc/expert/config/RetrofitConfiguration.java
View file @
a90b10d0
...
...
@@ -13,15 +13,35 @@ import java.util.concurrent.TimeUnit;
@Configuration
public
class
RetrofitConfiguration
{
/**
* 专家服务
* @param gson
* @return
*/
@Bean
(
"retrofitExpert"
)
@Primary
public
Retrofit
RetrofitExpert
(
Gson
gson
)
{
return
createRetrofit
(
"https://randomuser.me/"
,
gson
);
}
/**
* 工作流服务
* @param gson
* @return
*/
@Bean
(
"retrofitWorkflow"
)
public
Retrofit
RetrofitWorkflow
(
Gson
gson
)
{
return
createRetrofit
(
"https://randomuser.com/api/"
,
gson
);
return
createRetrofit
(
"https://randomuser.com/"
,
gson
);
}
/**
* 平台服务
* @param gson
* @return
*/
@Bean
(
"retrofitPortal"
)
public
Retrofit
RetrofitPortal
(
Gson
gson
)
{
return
createRetrofit
(
"https://randomuser.cn/"
,
gson
);
}
private
Retrofit
createRetrofit
(
String
baseUrl
,
Gson
gson
)
{
...
...
src/main/java/com/cnooc/expert/controller/expert/ExpertController.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
;
import
com.cnooc.expert.common.response.ApiResult
;
import
com.cnooc.expert.common.response.BasePageResp
;
import
com.cnooc.expert.controller.expert.model.request.CompanyPageReq
;
import
com.cnooc.expert.controller.expert.model.request.DictNofilterListReq
;
import
com.cnooc.expert.controller.expert.model.response.DictListResp
;
import
com.cnooc.expert.controller.expert.model.response.NofilterListResp
;
import
com.cnooc.expert.controller.expert.model.response.SecondaryUnitListResp
;
import
com.cnooc.expert.service.ExpertService
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
lombok.AllArgsConstructor
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@AllArgsConstructor
@RestController
@RequestMapping
(
"/expert"
)
public
class
ExpertController
{
private
final
ExpertService
expertService
;
@GetMapping
(
"/get"
)
public
String
expertGet
()
throws
JsonProcessingException
{
return
expertService
.
getExpertDetail
(
1
);
}
// *** 数据字典 ***
/**
* 民族查询列表
*
* @param req
* @return
*/
@PostMapping
(
"/nofilter/list"
)
public
ApiResult
<
NofilterListResp
>
dictNofilterList
(
@RequestBody
@Validated
DictNofilterListReq
req
)
{
return
ApiResult
.
successWithResult
(
expertService
.
listDictNofilter
(
req
));
}
/**
* 集团二级单位列表
*
* @return
*/
@PostMapping
(
"/secondary-unit/list"
)
public
ApiResult
<
SecondaryUnitListResp
>
secondaryUnitList
()
{
return
ApiResult
.
successWithResult
(
expertService
.
listSecondaryUnit
());
}
/**
* 职称列表
*
* @return
*/
@PostMapping
(
"/dict/guid4/list"
)
public
ApiResult
<
DictListResp
>
dictGuiud4List
()
{
return
ApiResult
.
successWithResult
(
expertService
.
listDict4
());
}
/**
* 学历列表
*
* @return
*/
@PostMapping
(
"/dict/guid5/list"
)
public
ApiResult
<
DictListResp
>
dictGuiud5List
()
{
return
ApiResult
.
successWithResult
(
expertService
.
listDict5
());
}
/**
* 学位列表
*
* @return
*/
@PostMapping
(
"/dict/guid6/list"
)
public
ApiResult
<
DictListResp
>
dictGuiud6List
()
{
return
ApiResult
.
successWithResult
(
expertService
.
listDict6
());
}
/**
* 公司列表
* @return
*/
@PostMapping
(
"/company/page"
)
public
ApiResult
<
BasePageResp
<
Object
>>
companyPage
(
@RequestBody
@Validated
CompanyPageReq
req
)
{
return
ApiResult
.
successWithResult
(
expertService
.
pageCompany
(
req
));
}
}
src/main/java/com/cnooc/expert/controller/expert/model/request/CompanyPageReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
request
;
import
com.cnooc.expert.common.request.BasePageRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
CompanyPageReq
extends
BasePageRequest
{
}
src/main/java/com/cnooc/expert/controller/expert/model/request/DictNofilterListReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
request
;
import
lombok.Data
;
@Data
public
class
DictNofilterListReq
{
private
String
name
;
}
src/main/java/com/cnooc/expert/controller/
person
/model/request/PersonGetReq.java
→
src/main/java/com/cnooc/expert/controller/
expert
/model/request/PersonGetReq.java
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
person
.
model
.
request
;
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
request
;
import
lombok.Data
;
...
...
src/main/java/com/cnooc/expert/controller/expert/model/response/CompanyPageResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
public
class
CompanyPageResp
{
private
String
id
;
private
String
subjectId
;
private
String
subjectName
;
private
Integer
businessType
;
private
String
creditCode
;
private
String
contactPerson
;
private
String
contactPhone
;
private
String
contactEmail
;
}
src/main/java/com/cnooc/expert/controller/expert/model/response/DictListResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Builder
public
class
DictListResp
{
private
List
<
Item
>
data
;
@Data
@Builder
public
static
class
Item
{
private
String
dictGuid
;
private
String
key
;
private
String
value
;
}
}
src/main/java/com/cnooc/expert/controller/expert/model/response/NofilterListResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Builder
public
class
NofilterListResp
{
private
List
<
Item
>
data
;
@Data
@Builder
public
static
class
Item
{
private
String
id
;
private
String
text
;
}
}
src/main/java/com/cnooc/expert/controller/expert/model/response/SecondaryUnitListResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
expert
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Builder
public
class
SecondaryUnitListResp
{
private
List
<
Item
>
data
;
@Data
@Builder
public
static
class
Item
{
private
String
code
;
private
String
name
;
}
}
src/main/java/com/cnooc/expert/controller/person/PersonController.java
deleted
100644 → 0
View file @
12d7d5e1
package
com
.
cnooc
.
expert
.
controller
.
person
;
import
com.cnooc.expert.service.PersonService
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@AllArgsConstructor
@RestController
@RequestMapping
(
"/person"
)
public
class
PersonController
{
private
final
PersonService
personService
;
@GetMapping
(
"/get"
)
public
String
personGet
()
throws
JsonProcessingException
{
return
personService
.
getExpertDetail
(
1
);
}
}
src/main/java/com/cnooc/expert/controller/portal/PortalController.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
;
import
com.cnooc.expert.common.response.ApiResult
;
import
com.cnooc.expert.common.response.BasePageResp
;
import
com.cnooc.expert.controller.portal.model.request.AgentPageReq
;
import
com.cnooc.expert.controller.portal.model.request.MessagePageReq
;
import
com.cnooc.expert.controller.portal.model.response.AgentNumResp
;
import
com.cnooc.expert.controller.portal.model.response.MessageNumResp
;
import
com.cnooc.expert.service.PortalService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@AllArgsConstructor
@RestController
@RequestMapping
(
"/portal"
)
public
class
PortalController
{
private
final
PortalService
portalService
;
// *** 业务待办 ***
/**
* 已办待办数量
*
* @return
*/
@PostMapping
(
"/agent/num"
)
public
ApiResult
<
AgentNumResp
>
agentNum
()
{
return
ApiResult
.
successWithResult
(
portalService
.
getAgentNum
(
null
));
}
/**
* 已办待办分页列表
*
* @return
*/
@PostMapping
(
"/agent/page"
)
public
ApiResult
<
BasePageResp
<
Object
>>
agentPage
(
@RequestBody
@Validated
AgentPageReq
req
)
{
int
curUserId
=
1
;
return
ApiResult
.
successWithResult
(
portalService
.
pageAgentNum
(
req
));
}
// *** 我的消息 ***
/**
* 已读未读数量查询
*
* @return
*/
@PostMapping
(
"/message/num"
)
public
ApiResult
<
MessageNumResp
>
messageNum
()
{
return
ApiResult
.
successWithResult
(
portalService
.
getMessageNum
(
null
));
}
/**
* 消息列表查询
*
* @param req
* @return
*/
@PostMapping
(
"/message/page"
)
public
ApiResult
<
BasePageResp
<
Object
>>
messagePage
(
@RequestBody
@Validated
MessagePageReq
req
)
{
int
curUserId
=
1
;
return
ApiResult
.
successWithResult
(
portalService
.
pageMessageNum
(
req
));
}
}
src/main/java/com/cnooc/expert/controller/portal/model/request/AgentNumReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
request
;
import
lombok.Data
;
@Data
public
class
AgentNumReq
{
private
Integer
status
;
}
src/main/java/com/cnooc/expert/controller/portal/model/request/AgentPageReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
request
;
import
com.cnooc.expert.common.request.BasePageRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
AgentPageReq
extends
BasePageRequest
{
private
Integer
status
;
// 状态 1:待办 2:已办
}
src/main/java/com/cnooc/expert/controller/portal/model/request/MessageNumReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
request
;
import
lombok.Data
;
@Data
public
class
MessageNumReq
{
private
String
account
;
private
String
receivers
;
private
Integer
status
;
}
src/main/java/com/cnooc/expert/controller/portal/model/request/MessagePageReq.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
request
;
import
com.cnooc.expert.common.request.BasePageRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
MessagePageReq
extends
BasePageRequest
{
private
Integer
status
;
// 状态 1:未读 2:已读
}
src/main/java/com/cnooc/expert/controller/portal/model/response/AgentNumResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
response
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
@AllArgsConstructor
public
class
AgentNumResp
{
private
Integer
backlogNum
;
private
Integer
doneNum
;
}
src/main/java/com/cnooc/expert/controller/portal/model/response/AgentPageResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
public
class
AgentPageResp
{
private
Integer
id
;
private
String
account
;
private
String
agentType
;
private
String
content
;
private
String
createName
;
private
String
createTime
;
private
String
createdTime
;
private
String
infoId
;
private
String
modifyName
;
private
Integer
pushType
;
private
String
redirectUrl
;
private
Boolean
status
;
private
String
title
;
private
String
type
;
private
String
updatedTime
;
}
src/main/java/com/cnooc/expert/controller/portal/model/response/MessageNumResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
public
class
MessageNumResp
{
private
Integer
read
;
private
Integer
unRead
;
}
src/main/java/com/cnooc/expert/controller/portal/model/response/MessagePageResp.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
portal
.
model
.
response
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
public
class
MessagePageResp
{
private
Integer
id
;
private
String
contentId
;
private
String
createBy
;
private
String
createName
;
private
String
createTime
;
private
String
endTime
;
private
String
infoId
;
private
String
messageContent
;
private
String
messageHeader
;
private
String
modifyBy
;
private
String
modifyName
;
private
String
orgId
;
private
String
receiver
;
private
String
receivers
;
private
String
redirectUrl
;
private
String
startTime
;
private
Integer
status
;
private
String
updatedTime
;
private
String
visiblePosition
;
}
src/main/java/com/cnooc/expert/controller/workflow/WorkflowController.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
controller
.
workflow
;
import
com.cnooc.expert.service.WorkflowService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@AllArgsConstructor
@RestController
@RequestMapping
(
"/workflow"
)
public
class
WorkflowController
{
private
final
WorkflowService
workflowService
;
}
src/main/java/com/cnooc/expert/external/expert/service/ExpertService.java
→
src/main/java/com/cnooc/expert/external/expert/service/ExpertService
Client
.java
View file @
a90b10d0
...
...
@@ -12,11 +12,11 @@ import retrofit2.Retrofit;
import
java.util.Map
;
@Service
public
class
ExpertService
extends
AbstractRetrofitManager
{
public
class
ExpertService
Client
extends
AbstractRetrofitManager
{
private
final
ExpertServiceApi
expertServiceApi
;
public
ExpertService
(
@Qualifier
(
"retrofitExpert"
)
Retrofit
retrofit
)
{
public
ExpertService
Client
(
@Qualifier
(
"retrofitExpert"
)
Retrofit
retrofit
)
{
this
.
expertServiceApi
=
retrofit
.
create
(
ExpertServiceApi
.
class
);
}
...
...
src/main/java/com/cnooc/expert/external/portal/api/PortalServiceApi.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
external
.
portal
.
api
;
public
interface
PortalServiceApi
{
}
src/main/java/com/cnooc/expert/external/portal/service/PortalServiceClient.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
external
.
portal
.
service
;
import
com.cnooc.expert.external.common.AbstractRetrofitManager
;
import
com.cnooc.expert.external.portal.api.PortalServiceApi
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
retrofit2.Retrofit
;
@Service
public
class
PortalServiceClient
extends
AbstractRetrofitManager
{
private
final
PortalServiceApi
portalServiceApi
;
public
PortalServiceClient
(
@Qualifier
(
"retrofitPortal"
)
Retrofit
retrofit
)
{
this
.
portalServiceApi
=
retrofit
.
create
(
PortalServiceApi
.
class
);
}
}
src/main/java/com/cnooc/expert/external/workflow/api/WorkflowServiceApi.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
external
.
workflow
.
api
;
public
interface
WorkflowServiceApi
{
}
src/main/java/com/cnooc/expert/external/workflow/service/WorkflowServiceClient.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
external
.
workflow
.
service
;
import
com.cnooc.expert.external.common.AbstractRetrofitManager
;
import
com.cnooc.expert.external.workflow.api.WorkflowServiceApi
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
retrofit2.Retrofit
;
@Service
public
class
WorkflowServiceClient
extends
AbstractRetrofitManager
{
private
final
WorkflowServiceApi
workflowServiceApi
;
public
WorkflowServiceClient
(
@Qualifier
(
"retrofitWorkflow"
)
Retrofit
retrofit
)
{
this
.
workflowServiceApi
=
retrofit
.
create
(
WorkflowServiceApi
.
class
);
}
}
src/main/java/com/cnooc/expert/service/ExpertService.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
service
;
import
com.cnooc.expert.common.response.BasePageResp
;
import
com.cnooc.expert.controller.expert.model.request.CompanyPageReq
;
import
com.cnooc.expert.controller.expert.model.request.DictNofilterListReq
;
import
com.cnooc.expert.controller.expert.model.response.CompanyPageResp
;
import
com.cnooc.expert.controller.expert.model.response.DictListResp
;
import
com.cnooc.expert.controller.expert.model.response.NofilterListResp
;
import
com.cnooc.expert.controller.expert.model.response.SecondaryUnitListResp
;
import
com.cnooc.expert.controller.portal.model.response.MessagePageResp
;
import
com.cnooc.expert.external.expert.model.response.ExpertInfoGetResp
;
import
com.cnooc.expert.external.expert.service.ExpertServiceClient
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Lists
;
import
lombok.AllArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@AllArgsConstructor
@Service
public
class
ExpertService
{
private
ObjectMapper
objectMapper
;
private
final
ExpertServiceClient
expertServiceClient
;
public
String
getExpertDetail
(
int
id
)
throws
JsonProcessingException
{
ExpertInfoGetResp
result
=
expertServiceClient
.
getExpertInfo
(
id
);
return
objectMapper
.
writeValueAsString
(
result
);
}
public
NofilterListResp
listDictNofilter
(
DictNofilterListReq
req
)
{
ArrayList
<
NofilterListResp
.
Item
>
data
=
Lists
.
newArrayList
(
NofilterListResp
.
Item
.
builder
()
.
id
(
"1"
)
.
text
(
"汉族"
)
.
build
(),
NofilterListResp
.
Item
.
builder
()
.
id
(
"2"
)
.
text
(
"蒙古族"
)
.
build
()
);
NofilterListResp
result
=
NofilterListResp
.
builder
()
.
data
(
data
)
.
build
();
return
result
;
}
public
SecondaryUnitListResp
listSecondaryUnit
()
{
ArrayList
<
SecondaryUnitListResp
.
Item
>
data
=
Lists
.
newArrayList
(
SecondaryUnitListResp
.
Item
.
builder
()
.
code
(
"1"
)
.
name
(
"中海油研究总院有限责任公司"
)
.
build
(),
SecondaryUnitListResp
.
Item
.
builder
()
.
code
(
"2"
)
.
name
(
"中海石油化工进出口有限公司"
)
.
build
()
);
SecondaryUnitListResp
result
=
SecondaryUnitListResp
.
builder
()
.
data
(
data
)
.
build
();
return
result
;
}
public
DictListResp
listDict4
()
{
ArrayList
<
DictListResp
.
Item
>
data
=
Lists
.
newArrayList
(
DictListResp
.
Item
.
builder
()
.
key
(
"1"
)
.
value
(
"一级建造师(通信与广电工程)"
)
.
build
(),
DictListResp
.
Item
.
builder
()
.
key
(
"2"
)
.
value
(
"二级建造师(通信与广电工程)"
)
.
build
()
);
DictListResp
result
=
DictListResp
.
builder
()
.
data
(
data
)
.
build
();
return
result
;
}
public
DictListResp
listDict5
()
{
ArrayList
<
DictListResp
.
Item
>
data
=
Lists
.
newArrayList
(
DictListResp
.
Item
.
builder
()
.
dictGuid
(
"625ade01-00f0-4a1f-93d8-66d6b4c5a2b3"
)
.
key
(
""
)
.
value
(
"博士研究生"
)
.
build
(),
DictListResp
.
Item
.
builder
()
.
dictGuid
(
"708932cc-794c-4d1a-b30e-a16afd364495"
)
.
key
(
""
)
.
value
(
"硕士研究生"
)
.
build
()
);
DictListResp
result
=
DictListResp
.
builder
()
.
data
(
data
)
.
build
();
return
result
;
}
public
DictListResp
listDict6
()
{
ArrayList
<
DictListResp
.
Item
>
data
=
Lists
.
newArrayList
(
DictListResp
.
Item
.
builder
()
.
dictGuid
(
"28a0942a-84ad-4329-8be4-8196ed3164fe"
)
.
key
(
""
)
.
value
(
"学士"
)
.
build
(),
DictListResp
.
Item
.
builder
()
.
dictGuid
(
"5676942a-84ad-4329-8be4-8196ed3164fe"
)
.
key
(
""
)
.
value
(
"其他"
)
.
build
()
);
DictListResp
result
=
DictListResp
.
builder
()
.
data
(
data
)
.
build
();
return
result
;
}
public
BasePageResp
<
Object
>
pageCompany
(
CompanyPageReq
req
)
{
List
<
Object
>
data
=
Lists
.
newArrayList
(
CompanyPageResp
.
builder
()
.
id
(
"1420053958893662209"
)
.
subjectId
(
"1420053958767833088"
)
.
subjectName
(
"江苏瑞尔姆电器安安有限公司"
)
.
businessType
(
5
)
.
creditCode
(
"91320577MA4Y6K7H0F"
)
.
contactPerson
(
"张三"
)
.
contactPhone
(
"13800138000"
)
.
contactEmail
(
"zhangsan@cnooc.com.cn"
)
.
build
(),
CompanyPageResp
.
builder
()
.
id
(
"1420051042464067584"
)
.
subjectId
(
"1420051042065608705"
)
.
subjectName
(
"中海科技很大的公司"
)
.
businessType
(
5
)
.
creditCode
(
"91320507MA4Y6K7H0F"
)
.
contactPerson
(
"里斯"
)
.
contactPhone
(
"13333333333"
)
.
contactEmail
(
"lisi@cnooc.com.cn"
)
.
build
()
);
return
BasePageResp
.
builder
()
.
current
(
1
)
.
pages
(
1
)
.
total
(
2
)
.
data
(
data
)
.
build
();
}
}
src/main/java/com/cnooc/expert/service/PortalService.java
0 → 100644
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
service
;
import
com.cnooc.expert.common.response.BasePageResp
;
import
com.cnooc.expert.controller.portal.model.request.AgentNumReq
;
import
com.cnooc.expert.controller.portal.model.request.AgentPageReq
;
import
com.cnooc.expert.controller.portal.model.request.MessageNumReq
;
import
com.cnooc.expert.controller.portal.model.request.MessagePageReq
;
import
com.cnooc.expert.controller.portal.model.response.AgentNumResp
;
import
com.cnooc.expert.controller.portal.model.response.AgentPageResp
;
import
com.cnooc.expert.controller.portal.model.response.MessageNumResp
;
import
com.cnooc.expert.controller.portal.model.response.MessagePageResp
;
import
com.cnooc.expert.external.portal.service.PortalServiceClient
;
import
com.google.common.collect.Lists
;
import
lombok.AllArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@AllArgsConstructor
@Service
public
class
PortalService
{
private
final
PortalServiceClient
portalServiceClient
;
public
AgentNumResp
getAgentNum
(
AgentNumReq
req
)
{
AgentNumResp
result
=
AgentNumResp
.
builder
()
.
backlogNum
(
0
)
.
doneNum
(
3
)
.
build
();
return
result
;
}
public
BasePageResp
<
Object
>
pageAgentNum
(
AgentPageReq
req
)
{
List
<
Object
>
data
=
Lists
.
newArrayList
(
AgentPageResp
.
builder
()
.
id
(
182182
)
.
account
(
"wzzx18"
)
.
content
(
"供应商测试-资格审查评审"
)
.
createName
(
""
)
.
createTime
(
"2025-10-24T05:49:14.000+0000"
)
.
createdTime
(
""
)
.
infoId
(
"c0b939e87b29c7bd22197cd95f6e1e84"
)
.
modifyName
(
""
)
.
pushType
(
3
)
.
redirectUrl
(
"https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84"
)
.
status
(
true
)
.
title
(
"供应商测试-资格审查评审"
)
.
type
(
"资格审查评审"
)
.
updatedTime
(
""
)
.
build
(),
AgentPageResp
.
builder
()
.
id
(
121804
)
.
account
(
"wzzx18"
)
.
content
(
"AutoTest_新签单次合同_货物_生产经营_非集采_法定_邀请招标_20250508134836-资格审查评审"
)
.
createName
(
""
)
.
createTime
(
"2025-05-08T06:07:27.000+0000"
)
.
createdTime
(
""
)
.
infoId
(
"be027ac3f4a57accb850ae0b2b7fd293"
)
.
modifyName
(
""
)
.
pushType
(
3
)
.
redirectUrl
(
"https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=be027ac3f4a57accb850ae0b2b7fd293"
)
.
status
(
true
)
.
title
(
"AutoTest_新签单次合同_货物_生产经营_非集采_法定_邀请招标_20250508134836-资格审查评审"
)
.
type
(
"资格审查评审"
)
.
updatedTime
(
""
)
.
build
(),
AgentPageResp
.
builder
()
.
id
(
120738
)
.
account
(
"wzzx18"
)
.
content
(
"物装中心十八已被邀请入库,可进行申请"
)
.
createName
(
""
)
.
createTime
(
"2025-04-23T06:54:00.000+0000"
)
.
createdTime
(
""
)
.
infoId
(
"e499147e-ebee-4f3b-a3d4-58e897b8f841"
)
.
modifyName
(
""
)
.
pushType
(
3
)
.
redirectUrl
(
"https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84"
)
.
status
(
true
)
.
title
(
"物装中心十八-专家认证"
)
.
type
(
"专家认证"
)
.
updatedTime
(
""
)
.
build
()
);
return
BasePageResp
.
builder
()
.
current
(
1
)
.
pages
(
1
)
.
total
(
3
)
.
data
(
data
)
.
build
();
}
public
MessageNumResp
getMessageNum
(
MessageNumReq
req
)
{
MessageNumResp
result
=
MessageNumResp
.
builder
()
.
read
(
1
)
.
unRead
(
1
)
.
build
();
return
result
;
}
public
BasePageResp
<
Object
>
pageMessageNum
(
MessagePageReq
req
)
{
List
<
Object
>
data
=
Lists
.
newArrayList
(
MessagePageResp
.
builder
()
.
id
(
182182
)
.
contentId
(
""
)
.
createBy
(
""
)
.
createName
(
""
)
.
createTime
(
"2024-12-30 14:53:49"
)
.
endTime
(
""
)
.
infoId
(
"c0b939e87b29c7bd22197cd95f6e1e84"
)
.
messageContent
(
"专家状态已修改为: 手动冻结"
)
.
messageHeader
(
"专家状态已修改为: 手动冻结"
)
.
modifyBy
(
""
)
.
modifyName
(
""
)
.
orgId
(
""
)
.
receiver
(
""
)
.
receivers
(
""
)
.
redirectUrl
(
"https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84"
)
.
startTime
(
""
)
.
status
(
1
)
.
updatedTime
(
""
)
.
visiblePosition
(
""
)
.
build
()
);
return
BasePageResp
.
builder
()
.
current
(
1
)
.
pages
(
1
)
.
total
(
1
)
.
data
(
data
)
.
build
();
}
}
src/main/java/com/cnooc/expert/service/
Person
Service.java
→
src/main/java/com/cnooc/expert/service/
Workflow
Service.java
View file @
a90b10d0
package
com
.
cnooc
.
expert
.
service
;
import
com.cnooc.expert.external.expert.service.ExpertService
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.AllArgsConstructor
;
import
org.springframework.stereotype.Service
;
@AllArgsConstructor
@Service
public
class
PersonService
{
private
ObjectMapper
objectMapper
;
private
final
ExpertService
expertService
;
public
String
getExpertDetail
(
int
id
)
throws
JsonProcessingException
{
return
objectMapper
.
writeValueAsString
(
expertService
.
getExpertInfo
(
id
));
}
public
class
WorkflowService
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment