@@ -0,0 +1,46 @@ | |||||
package com.hz.pm.api.external.controller; | |||||
import com.hz.pm.api.external.MhUserOrgClient; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.format.annotation.DateTimeFormat; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RequestParam; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* MhSyncController | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 09:56 2023/12/22 | |||||
*/ | |||||
@RestController | |||||
@RequiredArgsConstructor | |||||
@RequestMapping("/api/v1/mh/sync") | |||||
public class MhSyncController { | |||||
private final MhUserOrgClient mhUserOrgClient; | |||||
@GetMapping("/users") | |||||
public Object getUsers(@RequestParam(value = "syncTime", required = false) | |||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime syncTime) { | |||||
return mhUserOrgClient.queryUsers(syncTime); | |||||
} | |||||
@GetMapping("/orges") | |||||
public Object getOrges() { | |||||
return mhUserOrgClient.queryOrges(); | |||||
} | |||||
@GetMapping("/experts") | |||||
public Object getExperts(@RequestParam(value = "syncTime", required = false) | |||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime syncTime) { | |||||
return mhUserOrgClient.queryExperts(syncTime); | |||||
} | |||||
} |
@@ -35,9 +35,9 @@ public class MeetingExpertJudgeController { | |||||
} | } | ||||
@ApiOperation("查看履职评价") | @ApiOperation("查看履职评价") | ||||
@GetMapping("/detail/{expertJudgeId}") | |||||
public MeetingExpertJudgeReq expertJudgeDetail(@PathVariable Long expertJudgeId) { | |||||
return expertJudgeManage.expertJudgeDetail(expertJudgeId); | |||||
@GetMapping("/detail/{meetingExpertId}") | |||||
public MeetingExpertJudgeReq expertJudgeDetail(@PathVariable Long meetingExpertId) { | |||||
return expertJudgeManage.expertJudgeDetail(meetingExpertId); | |||||
} | } | ||||
} | } |
@@ -83,8 +83,8 @@ public class MeetingExpertJudgeManage { | |||||
} | } | ||||
} | } | ||||
public MeetingExpertJudgeReq expertJudgeDetail(Long expertJudgeId) { | |||||
MeetingExpertJudge judge = expertJudgeService.getById(expertJudgeId); | |||||
public MeetingExpertJudgeReq expertJudgeDetail(Long meetingExpertId) { | |||||
MeetingExpertJudge judge = expertJudgeService.getByMeetingExpertId(meetingExpertId); | |||||
if (judge == null) { | if (judge == null) { | ||||
throw BizException.wrap("履职评价未提交"); | throw BizException.wrap("履职评价未提交"); | ||||
} | } | ||||
@@ -1,9 +1,11 @@ | |||||
package com.hz.pm.api.meeting.service; | package com.hz.pm.api.meeting.service; | ||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.hz.pm.api.common.constant.BizConst; | |||||
import com.hz.pm.api.meeting.entity.domain.MeetingExpertJudge; | import com.hz.pm.api.meeting.entity.domain.MeetingExpertJudge; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
@@ -32,6 +34,13 @@ public interface IMeetingExpertJudgeService extends IService<MeetingExpertJudge> | |||||
return CollUtils.fieldList(list(query), MeetingExpertJudge::getMeetingExpertId); | return CollUtils.fieldList(list(query), MeetingExpertJudge::getMeetingExpertId); | ||||
} | } | ||||
default MeetingExpertJudge getByMeetingExpertId(Long meetingExpertId) { | |||||
Wrapper<MeetingExpertJudge> query = Wrappers.lambdaQuery(MeetingExpertJudge.class) | |||||
.eq(MeetingExpertJudge::getMeetingExpertId, meetingExpertId) | |||||
.last(BizConst.LIMIT_1); | |||||
return getOne(query); | |||||
} | |||||
default Map<Long, Long> getExpertJudgeIdMap(Long meetingId) { | default Map<Long, Long> getExpertJudgeIdMap(Long meetingId) { | ||||
LambdaQueryWrapper<MeetingExpertJudge> query = Wrappers.lambdaQuery(MeetingExpertJudge.class) | LambdaQueryWrapper<MeetingExpertJudge> query = Wrappers.lambdaQuery(MeetingExpertJudge.class) | ||||
.select(MeetingExpertJudge::getExpertId, MeetingExpertJudge::getId) | .select(MeetingExpertJudge::getExpertId, MeetingExpertJudge::getId) | ||||
@@ -1,5 +1,5 @@ | |||||
server: | server: | ||||
port: 38888 | |||||
port: 8002 | |||||
servlet: | servlet: | ||||
context-path: /hzpm | context-path: /hzpm | ||||
#最大并发数,默认200 | #最大并发数,默认200 | ||||
@@ -19,7 +19,7 @@ spring: | |||||
host: localhost | host: localhost | ||||
port: 6379 | port: 6379 | ||||
database: 0 | database: 0 | ||||
password: Ndkj1234 | |||||
password: | |||||
jedis: | jedis: | ||||
pool: | pool: | ||||
max-active: 200 | max-active: 200 | ||||
@@ -27,7 +27,7 @@ spring: | |||||
min-idle: 8 | min-idle: 8 | ||||
max-wait: 10000 | max-wait: 10000 | ||||
application: | application: | ||||
name: pm | |||||
name: hzpm | |||||
jackson: | jackson: | ||||
default-property-inclusion: non_null | default-property-inclusion: non_null | ||||
time-zone: GMT+8 | time-zone: GMT+8 | ||||
@@ -44,18 +44,18 @@ spring: | |||||
ddl-auto: update | ddl-auto: update | ||||
datasource: | datasource: | ||||
type: com.zaxxer.hikari.HikariDataSource | type: com.zaxxer.hikari.HikariDataSource | ||||
driverClassName: com.kingbase8.Driver | |||||
url: jdbc:kingbase8://10.53.172.221:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
driverClassName: dm.jdbc.driver.DmDriver | |||||
url: jdbc:dm://10.54.38.191:5236/HZ_PROJECT_MANAGEMENT?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 | |||||
username: XMXTGL | |||||
password: XMXTGL@2023 | |||||
# 数据源 | # 数据源 | ||||
hikari: | hikari: | ||||
# 是客户端等待连接池连接的最大毫秒数 | # 是客户端等待连接池连接的最大毫秒数 | ||||
connection-timeout: 30000 | connection-timeout: 30000 | ||||
# 是允许连接在连接池中空闲的最长时间 | # 是允许连接在连接池中空闲的最长时间 | ||||
minimum-idle: 10 | |||||
minimum-idle: 20 | |||||
# 配置最大池大小 | # 配置最大池大小 | ||||
maximum-pool-size: 300 | |||||
maximum-pool-size: 200 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | # 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | ||||
idle-timeout: 60000 | idle-timeout: 60000 | ||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | # 池中连接关闭后的最长生命周期(以毫秒为单位) | ||||
@@ -100,11 +100,12 @@ nd: | |||||
storage-type: ALI_OSS | storage-type: ALI_OSS | ||||
ali: | ali: | ||||
protocol: http:// | protocol: http:// | ||||
bucket: projectmangmentoss | |||||
urlPrefix: oss-cn-lishui-gov-d01-a.ops.lsdx-zw.gov.cn | |||||
endpoint: oss-cn-lishui-gov-d01-a.ops.lsdx-zw.gov.cn | |||||
accessKeyId: XS3kNLtfW5i41SaC | |||||
accessKeySecret: 2cywvSZWANml7pZXxRAeAiHfisIhqm | |||||
bucket: szxcxtoss | |||||
urlPrefix: oss-cn-hangzhou-hzltzwy-d01-a.ops.hzegcxc.cn | |||||
endpoint: oss-cn-hangzhou-hzltzwy-d01-a.ops.hzegcxc.cn | |||||
accessKeyId: LNoIzKV82OvTJrKI | |||||
accessKeySecret: QI9y9jGqAbPXGn3oz1JHlbvsJQEnUo | |||||
# 日志文件配置 | # 日志文件配置 | ||||
log: | log: | ||||
path: ./logs | path: ./logs | ||||
@@ -155,6 +156,7 @@ sa-token: | |||||
token-style: uuid | token-style: uuid | ||||
# 是否输出操作日志 | # 是否输出操作日志 | ||||
is-log: false | is-log: false | ||||
#浙政钉公司顶级organizationCode | #浙政钉公司顶级organizationCode | ||||
organization: | organization: | ||||
dept-visible-scopes: | dept-visible-scopes: | ||||
@@ -178,12 +180,6 @@ provincial: | |||||
domainUrl: /api/v1/foreign/dominantUnit | domainUrl: /api/v1/foreign/dominantUnit | ||||
key: b5b2096953534a53991be4ea95f8cffa | key: b5b2096953534a53991be4ea95f8cffa | ||||
secret: 1bec9b77134d4962ac466fbe9696b897 | secret: 1bec9b77134d4962ac466fbe9696b897 | ||||
# host: http://223.4.72.75/prometheus-zhejiang_foreign | |||||
# pushUrl: /api/v1/foreign/importantPro | |||||
# detailUrl: /api/v1/foreign/importantProView | |||||
# key: b5b2096953534a53991be4ea95f8cffa | |||||
# secret: 1bec9b77134d4962ac466fbe9696b897 | |||||
#天印服务器接口信息 | #天印服务器接口信息 | ||||
irs: | irs: | ||||
@@ -39,6 +39,7 @@ security: | |||||
- /api/v1/wps-convert/** | - /api/v1/wps-convert/** | ||||
- /api/v1/belong-org/business-strip/list | - /api/v1/belong-org/business-strip/list | ||||
- /expert/ephemeral/*/registration | - /expert/ephemeral/*/registration | ||||
- /api/v1/mh/sync/** | |||||
ignore-csrf-urls: | ignore-csrf-urls: | ||||
- /api/v1/user/auth/** | - /api/v1/user/auth/** | ||||
- /v2/api-docs | - /v2/api-docs | ||||