Browse Source

增加抽取规避时间

master
WendyYang 10 months ago
parent
commit
7932894dd7
6 changed files with 77 additions and 25 deletions
  1. +46
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/external/controller/MhSyncController.java
  2. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java
  3. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java
  4. +9
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java
  5. +16
    -20
      hz-pm-api/src/main/resources/application-prod.yml
  6. +1
    -0
      hz-pm-api/src/main/resources/security/auth-prod.yml

+ 46
- 0
hz-pm-api/src/main/java/com/hz/pm/api/external/controller/MhSyncController.java View File

@@ -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);
}


}

+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingExpertJudgeController.java View File

@@ -35,9 +35,9 @@ public class MeetingExpertJudgeController {
}

@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);
}

}

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingExpertJudgeManage.java View File

@@ -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) {
throw BizException.wrap("履职评价未提交");
}


+ 9
- 0
hz-pm-api/src/main/java/com/hz/pm/api/meeting/service/IMeetingExpertJudgeService.java View File

@@ -1,9 +1,11 @@
package com.hz.pm.api.meeting.service;

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.toolkit.Wrappers;
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.ningdatech.basic.util.CollUtils;

@@ -32,6 +34,13 @@ public interface IMeetingExpertJudgeService extends IService<MeetingExpertJudge>
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) {
LambdaQueryWrapper<MeetingExpertJudge> query = Wrappers.lambdaQuery(MeetingExpertJudge.class)
.select(MeetingExpertJudge::getExpertId, MeetingExpertJudge::getId)


+ 16
- 20
hz-pm-api/src/main/resources/application-prod.yml View File

@@ -1,5 +1,5 @@
server:
port: 38888
port: 8002
servlet:
context-path: /hzpm
#最大并发数,默认200
@@ -19,7 +19,7 @@ spring:
host: localhost
port: 6379
database: 0
password: Ndkj1234
password:
jedis:
pool:
max-active: 200
@@ -27,7 +27,7 @@ spring:
min-idle: 8
max-wait: 10000
application:
name: pm
name: hzpm
jackson:
default-property-inclusion: non_null
time-zone: GMT+8
@@ -44,18 +44,18 @@ spring:
ddl-auto: update
datasource:
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:
# 是客户端等待连接池连接的最大毫秒数
connection-timeout: 30000
# 是允许连接在连接池中空闲的最长时间
minimum-idle: 10
minimum-idle: 20
# 配置最大池大小
maximum-pool-size: 300
maximum-pool-size: 200
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位)
idle-timeout: 60000
# 池中连接关闭后的最长生命周期(以毫秒为单位)
@@ -100,11 +100,12 @@ nd:
storage-type: ALI_OSS
ali:
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:
path: ./logs
@@ -155,6 +156,7 @@ sa-token:
token-style: uuid
# 是否输出操作日志
is-log: false

#浙政钉公司顶级organizationCode
organization:
dept-visible-scopes:
@@ -178,12 +180,6 @@ provincial:
domainUrl: /api/v1/foreign/dominantUnit
key: b5b2096953534a53991be4ea95f8cffa
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:


+ 1
- 0
hz-pm-api/src/main/resources/security/auth-prod.yml View File

@@ -39,6 +39,7 @@ security:
- /api/v1/wps-convert/**
- /api/v1/belong-org/business-strip/list
- /expert/ephemeral/*/registration
- /api/v1/mh/sync/**
ignore-csrf-urls:
- /api/v1/user/auth/**
- /v2/api-docs


Loading…
Cancel
Save