Parcourir la source

绩效评价增加事务

tags/24080901
WendyYang il y a 9 mois
Parent
révision
b4bb2f9aa3
14 fichiers modifiés avec 83 ajouts et 116 suppressions
  1. +0
    -13
      hz-pm-api/src/main/java/com/hz/pm/api/common/util/BizUtils.java
  2. +4
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/datascope/utils/DataScopeUtil.java
  3. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/external/sms/SmsServiceClient.java
  4. +56
    -56
      hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/AppAppraisalManage.java
  5. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/portrait/model/vo/TagVO.java
  6. +5
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ReviewChecklistManage.java
  7. +6
    -7
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ApplicationManage.java
  8. +3
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java
  9. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/provincial/controller/TestController.java
  10. +2
    -22
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/contants/TaskContant.java
  11. +0
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/staging/utils/WorkNoticeFlowMapUtil.java
  12. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java
  13. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java
  14. +7
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserInfoDetails.java

+ 0
- 13
hz-pm-api/src/main/java/com/hz/pm/api/common/util/BizUtils.java Voir le fichier

@@ -66,19 +66,6 @@ public class BizUtils {
}
}

public static boolean getJSONType(String str) {
boolean result = false;
if (StringUtils.isNotBlank(str)) {
str = str.trim();
if (str.startsWith("{") && str.endsWith("}")) {
result = true;
} else if (str.startsWith("[") && str.endsWith("]")) {
result = true;
}
}
return result;
}

public static String uuid32() {
return UUID.randomUUID().toString().replace("-", "");
}


+ 4
- 1
hz-pm-api/src/main/java/com/hz/pm/api/datascope/utils/DataScopeUtil.java Voir le fichier

@@ -17,6 +17,9 @@ import java.util.Optional;
*/
public class DataScopeUtil {

private DataScopeUtil() {
}

public static Optional<DataScopeDTO> getCurrentUserDataScope(UserFullInfoDTO user) {
if (Objects.isNull(user) || Objects.isNull(user.getRoleCode())) {
return Optional.empty();
@@ -28,7 +31,7 @@ public class DataScopeUtil {
if (Objects.isNull(user) || Objects.isNull(user.getRoleCode())) {
return Optional.empty();
}
return DataScopeContext.getDataScopeHasUserId(user.getRoleCode().name(),user.getUserId());
return DataScopeContext.getDataScopeHasUserId(user.getRoleCode().name(), user.getUserId());
}

public static Optional<DataScopeDTO> getCurrentUserDataScope() {


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/external/sms/SmsServiceClient.java Voir le fichier

@@ -72,7 +72,6 @@ public class SmsServiceClient {
* @return
*/
public SmsReceipt smsReceipt(String result) {
SmsReceipt smsReceipt = null;
String refreshUrl = smsUrl + SMS_RECEIPT;
HashMap<String,Object> map = new HashMap<>();
map.put("result",result);


+ 56
- 56
hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/AppAppraisalManage.java Voir le fichier

@@ -4,10 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.map.MapUtil;
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.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.performance.constant.ProjectBizConst;
import com.hz.pm.api.performance.enumration.AppIndexTypeEnum;
import com.hz.pm.api.performance.model.dto.AppAppraisalInfoDTO;
@@ -25,11 +26,13 @@ import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -68,26 +71,25 @@ public class AppAppraisalManage {
public PageVo<PerformanceAppraisalVO> list(PerformanceAppraisalListReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();
// 获取当前登录用户的角色列表,只有绩效复评人员才能查看该列表
List<Role> userRoleList = user.getUserRoleList();
List<Long> roleIdList = userRoleList.stream().map(Role::getId).collect(Collectors.toList());
List<Long> roleIdList = user.getRoleIds();
if (roleIdList.isEmpty()) {
return PageVo.empty();
}
Role role = roleService.getOne(Wrappers.lambdaQuery(Role.class)
.eq(Role::getName, ProjectBizConst.REAPPRAISAL_ROLE));
if (Objects.isNull(role)) {
throw new BizException("登录用户没有复评员角色!");
}

// 登录用户不是复评员,不能查看复评计划列表
if (!roleIdList.contains(role.getId())) {
if (Objects.isNull(role) || !roleIdList.contains(role.getId())) {
return PageVo.empty();
}

// 获取所有已添加到评价计划中的应用信息
List<PerformanceAppraisalApplication> paas = performanceAppraisalApplicationService.list();
Wrapper<PerformanceAppraisalApplication> query = Wrappers.lambdaQuery(PerformanceAppraisalApplication.class)
.select(PerformanceAppraisalApplication::getAppraisalId);
List<PerformanceAppraisalApplication> paas = performanceAppraisalApplicationService.list(query);
// 没有包含应用的评价计划
if (CollUtil.isEmpty(paas)) {
if (paas.isEmpty()) {
return PageVo.empty();
}
Set<Long> paIds = paas.stream().map(PerformanceAppraisalApplication::getAppraisalId).collect(Collectors.toSet());
Set<Long> paIds = CollUtils.fieldSet(paas, PerformanceAppraisalApplication::getAppraisalId);
Page<PerformanceAppraisal> page = req.page();
LambdaQueryWrapper<PerformanceAppraisal> wrapper = Wrappers.lambdaQuery(PerformanceAppraisal.class)
.in(PerformanceAppraisal::getId, paIds)
@@ -102,40 +104,42 @@ public class AppAppraisalManage {

public PageVo<PerformanceAppraisalAppVO> unEvaluateList(Long planId, PerformanceAppraisalListReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();
String employeeCode = user.getEmployeeCode();
String userIdStr = user.getUserIdStr();

PerformanceAppraisal plan = performanceAppraisalService.getById(planId);
VUtils.isTrue(Objects.isNull(plan)).throwMessage("该评价计划不存在!");

// 获取分组所在评价计划添加的未完成评价的应用信息
List<PerformanceAppraisalApplication> paas = performanceAppraisalApplicationService.list(Wrappers.lambdaQuery(PerformanceAppraisalApplication.class)
Wrapper<PerformanceAppraisalApplication> query = Wrappers.lambdaQuery(PerformanceAppraisalApplication.class)
.select(PerformanceAppraisalApplication::getApplicationId)
.eq(PerformanceAppraisalApplication::getAppraisalId, planId)
.eq(PerformanceAppraisalApplication::getIsCompleteAppraisal, Boolean.FALSE));
.eq(PerformanceAppraisalApplication::getIsCompleteAppraisal, Boolean.FALSE);
List<PerformanceAppraisalApplication> paas = performanceAppraisalApplicationService.list(query);
// 没有当前用户待评价的应用信息
if (CollUtil.isEmpty(paas)) {
return PageVo.empty();
}
List<Long> ids = paas.stream().map(PerformanceAppraisalApplication::getApplicationId).collect(Collectors.toList());
List<Long> ids = CollUtils.fieldList(paas, PerformanceAppraisalApplication::getApplicationId);
// 从绩效评价打分信息表中获取上述绩效评价计划应用的打分信息
List<PerformanceAppraisalAppScoreInfo> appraisalScoreInfos = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class)
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalId, planId));
List<Long> appIds;
Wrapper<PerformanceAppraisalAppScoreInfo> paaiQuery = Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class)
.select(PerformanceAppraisalAppScoreInfo::getApplicationId, PerformanceAppraisalAppScoreInfo::getAppraisalEmployeeCode)
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalId, planId);
List<PerformanceAppraisalAppScoreInfo> appraisalScoreInfos = performanceAppraisalAppScoreInfoService.list(paaiQuery);
if (CollUtil.isNotEmpty(appraisalScoreInfos)) {
// 筛选出当前登录用户已进行打分的应用信息
List<Long> scoredAppIds = appraisalScoreInfos.stream()
.filter(a -> employeeCode.equals(a.getAppraisalEmployeeCode()))
.map(PerformanceAppraisalAppScoreInfo::getApplicationId)
.collect(Collectors.toList());
ids.removeAll(scoredAppIds);
appraisalScoreInfos.forEach(w -> {
if (userIdStr.equals(w.getAppraisalEmployeeCode())) {
ids.remove(w.getApplicationId());
}
});
}
appIds = ids;
// 没有当前用户待评价的应用信息
if (CollUtil.isEmpty(appIds)) {
if (CollUtil.isEmpty(ids)) {
return PageVo.empty();
}
Page<ProjectApplication> page = req.page();
LambdaQueryWrapper<ProjectApplication> wrapper = Wrappers.lambdaQuery(ProjectApplication.class)
.in(ProjectApplication::getId, appIds)
.in(ProjectApplication::getId, ids)
.like(StringUtils.isNotBlank(req.getApplicationName()), ProjectApplication::getApplicationName, req.getApplicationName());
projectApplicationService.page(page, wrapper);

@@ -146,12 +150,11 @@ public class AppAppraisalManage {
List<PerformanceAppraisalAppVO> res = page.getRecords().stream()
.map(p -> {
PerformanceAppraisalAppVO vo = BeanUtil.copyProperties(p, PerformanceAppraisalAppVO.class);
vo.setCanAppraisal(checkCanAppraisal(employeeCode, p.getId(), planId));
vo.setCanAppraisal(checkCanAppraisal(userIdStr, p.getId(), planId));
vo.setApplicationName(StringUtils.isNotBlank(p.getApplicationName()) ? p.getApplicationName() : p.getRelatedExistsApplication());
vo.setAppraisalId(planId);
return vo;
})
.collect(Collectors.toList());
}).collect(Collectors.toList());

return PageVo.of(res, page.getTotal());
}
@@ -174,14 +177,15 @@ public class AppAppraisalManage {
// 从绩效评价打分信息表中获取上述绩效评价计划应用的打分信息
List<PerformanceAppraisalAppScoreInfo> appraisalScoreInfos = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class)
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalId, planId));
List<Long> appIds = Lists.newArrayList();
if (CollUtil.isNotEmpty(appraisalScoreInfos)) {
// 筛选出当前登录用户已进行打分的应用信息
appIds = appraisalScoreInfos.stream()
.filter(a -> employeeCode.equals(a.getAppraisalEmployeeCode()))
.map(PerformanceAppraisalAppScoreInfo::getApplicationId)
.collect(Collectors.toList());

if (CollUtil.isEmpty(appraisalScoreInfos)) {
return PageVo.empty();
}
// 筛选出当前登录用户已进行打分的应用信息
List<Long> appIds = appraisalScoreInfos.stream()
.filter(a -> employeeCode.equals(a.getAppraisalEmployeeCode()))
.map(PerformanceAppraisalAppScoreInfo::getApplicationId)
.collect(Collectors.toList());

// 没有当前用户已评价的应用信息
if (CollUtil.isEmpty(appIds)) {
@@ -219,17 +223,16 @@ public class AppAppraisalManage {
* @param appraisalId
* @return
*/
private Boolean checkCanAppraisal(String employeeCode, Long appId, Long appraisalId) {
private boolean checkCanAppraisal(String employeeCode, Long appId, Long appraisalId) {
// 从绩效评价应用打分信息表中查询打分人员为当前登录复评用户的打分信息
// 如果没有相关的打分信息,说明是当前登录复评用户是首次评价
List<PerformanceAppraisalAppScoreInfo> scoreInfos = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class)
Wrapper<PerformanceAppraisalAppScoreInfo> query = Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class)
.eq(PerformanceAppraisalAppScoreInfo::getApplicationId, appId)
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalId, appraisalId)
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalEmployeeCode, employeeCode));
if (CollUtil.isEmpty(scoreInfos)) {
return true;
}
return Boolean.FALSE;
.eq(PerformanceAppraisalAppScoreInfo::getAppraisalEmployeeCode, employeeCode)
.last(BizConst.LIMIT_1);
long scoreInfoNum = performanceAppraisalAppScoreInfoService.count(query);
return scoreInfoNum == 0;
}


@@ -319,9 +322,10 @@ public class AppAppraisalManage {
return resVo;
}

@Transactional(rollbackFor = Exception.class)
public String saveAppraisal(ProjectAppraisalDTO param) {
UserInfoDetails userDetail = LoginUserUtil.loginUserDetail();
String employeeCode = userDetail.getEmployeeCode();
String userIdStr = userDetail.getUserIdStr();
String username = userDetail.getUsername();

Long applicationId = param.getApplicationId();
@@ -344,38 +348,34 @@ public class AppAppraisalManage {
// 查出通用、辅助应用指标分数信息
Map<Long, PerformanceAppraisalAppIndicator> indexMap = MapUtil.newHashMap();
if (CollUtil.isNotEmpty(indexIds)) {
List<PerformanceAppraisalAppIndicator> indexList = performanceAppraisalAppIndicatorService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppIndicator.class)
.in(PerformanceAppraisalAppIndicator::getId, indexIds));
List<PerformanceAppraisalAppIndicator> indexList = performanceAppraisalAppIndicatorService.listByIds(indexIds);
if (CollUtil.isEmpty(indexList)) {
throw new BizException("通用/辅助评价指标不存在!");
}
indexMap = indexList.stream().collect(Collectors.toMap(PerformanceAppraisalAppIndicator::getId, d -> d));
indexList.forEach(w -> indexMap.put(w.getId(), w));
}

// 查出应用业务指标分数信息
Map<Long, ProjectCoreBusinessIndicators> businessIndexMap = MapUtil.newHashMap();
if (CollUtil.isNotEmpty(businessIndexIds)) {
List<ProjectCoreBusinessIndicators> businessIndexList = projectCoreBusinessIndicatorsService.list(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getId, businessIndexIds));
List<ProjectCoreBusinessIndicators> businessIndexList = projectCoreBusinessIndicatorsService.listByIds(businessIndexIds);
if (CollUtil.isEmpty(businessIndexList)) {
throw new BizException("核心业务评价指标不存在!");
}
businessIndexMap = businessIndexList.stream().collect(Collectors.toMap(ProjectCoreBusinessIndicators::getId, d -> d));
businessIndexList.forEach(w -> businessIndexMap.put(w.getId(), w));
}

Map<Long, PerformanceAppraisalAppIndicator> finalIndexMap = indexMap;
Map<Long, ProjectCoreBusinessIndicators> finalBusinessIndexMap = businessIndexMap;
List<PerformanceAppraisalAppScoreInfo> scoreInfos = appAppraisalInfoList.stream().map(a -> {
if (AppIndexTypeEnum.COMMON.getCode().equals(a.getIndexType()) ||
AppIndexTypeEnum.AUX.getCode().equals(a.getIndexType())) {
PerformanceAppraisalAppIndicator appIndicator = finalIndexMap.get(a.getIndexId());
PerformanceAppraisalAppIndicator appIndicator = indexMap.get(a.getIndexId());
BigDecimal score = a.getScore();
BigDecimal indexScore = appIndicator.getIndexScore();
if (score.compareTo(indexScore) > 0 || score.compareTo(BigDecimal.ZERO) < 0) {
throw new BizException("评价得分必须大于等于0且小于等于指标分值!");
}
} else if (AppIndexTypeEnum.BUSINESS.getCode().equals(a.getIndexType())) {
ProjectCoreBusinessIndicators coreBusinessIndicators = finalBusinessIndexMap.get(a.getIndexId());
ProjectCoreBusinessIndicators coreBusinessIndicators = businessIndexMap.get(a.getIndexId());
BigDecimal score = a.getScore();
BigDecimal indexScore = coreBusinessIndicators.getScore();
if (score.compareTo(indexScore) > 0 || score.compareTo(BigDecimal.ZERO) < 0) {
@@ -386,7 +386,7 @@ public class AppAppraisalManage {
PerformanceAppraisalAppScoreInfo scoreInfo = new PerformanceAppraisalAppScoreInfo();
scoreInfo.setAppraisalScore(a.getScore());
scoreInfo.setAppraisalId(appraisalId);
scoreInfo.setAppraisalEmployeeCode(employeeCode);
scoreInfo.setAppraisalEmployeeCode(userIdStr);
scoreInfo.setAppraisalEmployeeName(username);
scoreInfo.setApplicationId(applicationId);
scoreInfo.setIndexId(a.getIndexId());


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/portrait/model/vo/TagVO.java Voir le fichier

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**


+ 5
- 8
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ReviewChecklistManage.java Voir le fichier

@@ -5,23 +5,23 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.RegionConst;
import com.hz.pm.api.common.helper.RegionCacheHelper;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.datascope.model.DataScopeDTO;
import com.hz.pm.api.datascope.utils.DataScopeUtil;
import com.hz.pm.api.projectdeclared.contants.DeclaredProjectConst;
import com.hz.pm.api.projectdeclared.model.dto.ReviewChecklistApproveDTO;
import com.hz.pm.api.projectdeclared.model.entity.ReviewChecklistApprove;
import com.hz.pm.api.projectdeclared.service.IReviewChecklistApproveService;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.helper.ProjectHelper;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectReviewCheckListItemVO;
import com.hz.pm.api.projectlib.service.IProjectService;
@@ -61,8 +61,6 @@ public class ReviewChecklistManage {

private final IProjectService projectService;

private final RegionCacheHelper regionCacheHelper;

private final IReviewChecklistApproveService reviewChecklistApproveService;

private final UserInfoHelper userInfoHelper;
@@ -302,9 +300,8 @@ public class ReviewChecklistManage {
public String summary(String projectCode) {
// 修改到 项目里去
Project project = projectService.getProjectByCode(projectCode);
VUtils.isTrue(Objects.isNull(project)).throwMessage("项目不存在");
VUtils.isTrue(Objects.nonNull(project.getReviewCheckFinish()) && project.getReviewCheckFinish())
.throwMessage("项目的审查清单已经合并过了!");
Assert.notNull(project, "项目不存在");
Assert.isFalse(Boolean.TRUE.equals(project.getReviewCheckFinish()), "项目的审查清单已经合并过了!");

List<ReviewChecklistApprove> approves = reviewChecklistApproveService.list(Wrappers.lambdaQuery(ReviewChecklistApprove.class)
.eq(ReviewChecklistApprove::getProjectCode, projectCode)


+ 6
- 7
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ApplicationManage.java Voir le fichier

@@ -8,16 +8,12 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.ApiResponse;
import com.ningdatech.basic.model.PageVo;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.util.HmacAuthUtil;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.model.dto.ApplicationAppCodeSaveDTO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectApplicationVO;
import com.hz.pm.api.projectlib.model.vo.ProjectDetailVO;
@@ -25,6 +21,9 @@ import com.hz.pm.api.projectlib.service.IProjectApplicationService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.user.security.model.UserInfoDetails;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.model.ApiResponse;
import com.ningdatech.basic.model.PageVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -109,8 +108,8 @@ public class ApplicationManage {
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<ApiResponse> forEntity = restTemplate.exchange(appUrl, HttpMethod.GET, formEntity, ApiResponse.class);

log.info("forEntity:", JSON.toJSONString(forEntity));
log.info("body:", forEntity.getBody());
log.info("forEntity:{}", JSON.toJSONString(forEntity));
log.info("body:{}", forEntity.getBody());
ApiResponse body = forEntity.getBody();

if (!body.getCode().equals(HttpStatus.OK.value())) {


+ 3
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java Voir le fichier

@@ -1,5 +1,7 @@
package com.hz.pm.api.projectlib.model.vo;

import cn.hutool.json.JSONNull;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.ningdatech.basic.util.NdDateUtils;
@@ -472,7 +474,7 @@ public class ProjectDetailVO {
}

public void buildDynamicForm(String dynamicFormStr) {
if (StringUtils.isNotBlank(dynamicFormStr) && BizUtils.getJSONType(dynamicFormStr)) {
if (JSONUtil.isTypeJSON(dynamicFormStr)) {
this.dynamicForm = JSON.parseObject(dynamicFormStr, Map.class);
}
}


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/provincial/controller/TestController.java Voir le fichier

@@ -8,7 +8,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


+ 2
- 22
hz-pm-api/src/main/java/com/hz/pm/api/scheduler/contants/TaskContant.java Voir le fichier

@@ -10,28 +10,7 @@ import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum;
*/
public interface TaskContant {

class Host {
public static final String HOST_ZPF = "LAPTOP-NQGEQP03";
public static final String HOST_CMM2 = "DESKTOP-KN1L6HL";
public static final String HOST_CMM = "LAPTOP-PCISPN2O";

public static final String HOST_207 = "iZbp13nwyvib53j4j1p2xoZ";
}

class Wflow {
public static final String DEFAULT_FORM_NAME = "丽水申报项目表单";

public static final String[] DEFAULT_PROCESS_LIST = {"单位内部审批流程","项目预审审批流程","部门联合审批流程","建设方案审批流程","验收申报审批流程"};

public static final Integer[] DEFAULT_PROCESS_TYPE_LIST = {
ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode(),
ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode(),
ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode(),
ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode(),
ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode(),
ProjectProcessStageEnum.APPLY_DELAY.getCode(),
ProjectProcessStageEnum.APPLY_BORROW.getCode()
};

public static final Integer[] APPLY_PROCESS_TYPE_LIST = {
ProjectProcessStageEnum.APPLY_DELAY.getCode(),
@@ -39,9 +18,10 @@ public interface TaskContant {
};
}

class ProvinceReview{
class ProvinceReview {
public static final String END_NODE_ID = "结束";

public static final String END_STEP = "流程结束";
}

}

+ 0
- 3
hz-pm-api/src/main/java/com/hz/pm/api/staging/utils/WorkNoticeFlowMapUtil.java Voir le fichier

@@ -1,9 +1,6 @@
package com.hz.pm.api.staging.utils;

import com.google.common.collect.Maps;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Map;



+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java Voir le fichier

@@ -1,6 +1,5 @@
package com.hz.pm.api.sys.controller;

import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.RegionConst;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/user/manage/SyncMhUserOrgManage.java Voir le fichier

@@ -62,7 +62,6 @@ public class SyncMhUserOrgManage {
private final IMhCompanyService mhCompanyService;
private final DictionaryCache dictionaryCache;
private final IExpertDictionaryService expertDictionaryService;
private final MhUnitCache mhUnitCache;

public void syncUsers(LocalDateTime syncDateTime) {
MhRetDTO<List<MhUserDTO>> mhRet = mhApiClient.queryUsers(syncDateTime);


+ 7
- 0
hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserInfoDetails.java Voir le fichier

@@ -149,4 +149,11 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails {
return Boolean.FALSE;
}

public List<Long> getRoleIds(){
if (this.userRoleList != null && !this.userRoleList.isEmpty()) {
return this.userRoleList.stream().map(Role::getId).collect(Collectors.toList());
}
return Collections.emptyList();
}

}

Chargement…
Annuler
Enregistrer