From 516414b751859e13491f4415c6827677a0a73c6d Mon Sep 17 00:00:00 2001
From: PoffyZhang <99775271@qq.com>
Date: Wed, 12 Jul 2023 15:54:36 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=A7=E9=A1=B9=E7=9B=AE=E8=81=94?=
=?UTF-8?q?=E5=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ding/controller/DingInfoPullController.java | 47 --------
.../irs/controller/ApplicationController.java | 40 +++++++
.../ningdatech/pmapi/irs/manage/AppIrsManage.java | 121 ++++++++++++++++++++
.../pmapi/irs/model/dto/ApiApplyDTO.java | 28 +++++
.../pmapi/irs/model/dto/ApiApplySearchResult.java | 28 +++++
.../pmapi/irs/model/dto/ApiSearchResult.java | 17 +++
.../irs/model/dto/PushProjectAppToIrsDTO.java | 26 +++++
.../pmapi/irs/model/res/ApiResponse.java | 123 +++++++++++++++++++++
.../manage/DefaultDeclaredProjectManage.java | 8 +-
.../pmapi/projectlib/service/IProjectService.java | 2 +
.../service/impl/ProjectServiceImpl.java | 9 ++
pmapi/src/main/resources/application-dev.yml | 8 ++
pmapi/src/main/resources/application-prod.yml | 4 +
13 files changed, 413 insertions(+), 48 deletions(-)
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplyDTO.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiSearchResult.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/PushProjectAppToIrsDTO.java
create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/model/res/ApiResponse.java
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
index 2031b9d..79af862 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
@@ -1,18 +1,11 @@
package com.ningdatech.pmapi.ding.controller;
-import com.alibaba.fastjson.JSON;
-import com.ningdatech.pmapi.common.util.CryptUtils;
-import com.ningdatech.pmapi.common.util.RefreshKeyUtil;
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask;
import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask;
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
-import org.springframework.web.client.RestTemplate;
-
-import java.security.NoSuchAlgorithmException;
/**
*
@@ -68,46 +61,6 @@ public class DingInfoPullController {
employeeBatchGetTask.getBatchEmployeeByCode(orgCode);
}
- @GetMapping("/test-app")
- public void testApp() throws NoSuchAlgorithmException {
- long timestamp = System.currentTimeMillis();
- String areaCode = "331121";
- String appKey = "A331101453557202109017383";
- String appScret = "496f0f2a19994f76b4fd9dae087366c7";
-
- String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret);
- String capCode = CryptUtils.MD5Encode(timestamp + areaCode);
- String capTime = String.valueOf(timestamp);
- String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp);
- String url = "https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/94wbaL1I1Pbz0648.htm?requestTime=" + timestamp +
- "&sign=" + sign + "&appKey=" + appKey + "&capCode=" + capCode + "&capTime=" + capTime +
- "&baseProjSys=测试应用&areaCode=331121&baseProjName=nsl-丽水演示项目&baseProjId=331100230130112233001" +
- "&isEffective=1&baseProjSysCode=25083657";
- RestTemplate restTemplate = new RestTemplate();
- ResponseEntity forEntity = restTemplate.getForEntity(url, String.class);
-
- log.info("forEntity : {}",JSON.toJSONString(forEntity));
- }
-
- @GetMapping("/test-app2")
- public void testApp2() throws NoSuchAlgorithmException {
- long timestamp = System.currentTimeMillis();
- String areaCode = "331121";
- String appScret = "496f0f2a19994f76b4fd9dae087366c7";
- String appKey = "A331101453557202109017383";
- String appCode = "A331123467587202306014169";
-
- String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret);
- String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp);
- String url = "https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm?" +
- "requestTime=" + timestamp + "&sign=" + sign + "&appKey=" + appKey + "&name=abc&" +
- "pageSize=10&deptCode=abc&areaCode=" + areaCode + "&pageNum=1&appCode=" + appCode;
- RestTemplate restTemplate = new RestTemplate();
- ResponseEntity forEntity = restTemplate.getForEntity(url, String.class);
-
- log.info("forEntity : {}",JSON.toJSONString(forEntity));
- }
-
@GetMapping("/getToken")
public String getToken() {
return employeeBatchGetTask.getToken();
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java
new file mode 100644
index 0000000..bd6cf36
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java
@@ -0,0 +1,40 @@
+package com.ningdatech.pmapi.irs.controller;
+
+import com.ningdatech.log.annotation.WebLog;
+import com.ningdatech.pmapi.irs.manage.AppIrsManage;
+import com.ningdatech.pmapi.irs.model.dto.ApiApplyDTO;
+import com.ningdatech.pmapi.irs.model.dto.ApiApplySearchResult;
+import com.ningdatech.pmapi.irs.model.dto.PushProjectAppToIrsDTO;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import javax.validation.Valid;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * @Classname ApplicationController
+ * @Description
+ * @Date 2023/7/12 9:26
+ * @Author PoffyZhang
+ */
+@RestController
+@RequestMapping("/api/v1/app")
+@AllArgsConstructor
+@Slf4j
+@Valid
+public class ApplicationController {
+
+ private final AppIrsManage appIrsManage;
+
+ @PostMapping("/push-project-app")
+ @WebLog("推送项目和应用关系")
+ public Boolean pushProjectApp(@Valid @RequestBody PushProjectAppToIrsDTO dto) throws NoSuchAlgorithmException {
+ return appIrsManage.pushProjectApp(dto);
+ }
+
+ @GetMapping("/sreach-app")
+ public ApiApplySearchResult searchApp(ApiApplyDTO apply) throws NoSuchAlgorithmException {
+ return appIrsManage.searchApp(apply);
+ }
+
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java
new file mode 100644
index 0000000..0667095
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java
@@ -0,0 +1,121 @@
+package com.ningdatech.pmapi.irs.manage;
+
+import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSON;
+import com.ningdatech.basic.function.VUtils;
+import com.ningdatech.pmapi.common.util.CryptUtils;
+import com.ningdatech.pmapi.common.util.RefreshKeyUtil;
+import com.ningdatech.pmapi.irs.model.dto.ApiApplyDTO;
+import com.ningdatech.pmapi.irs.model.dto.ApiApplySearchResult;
+import com.ningdatech.pmapi.irs.model.dto.ApiSearchResult;
+import com.ningdatech.pmapi.irs.model.dto.PushProjectAppToIrsDTO;
+import com.ningdatech.pmapi.irs.model.res.ApiResponse;
+import com.ningdatech.pmapi.projectlib.model.entity.Project;
+import com.ningdatech.pmapi.projectlib.service.IProjectService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.security.NoSuchAlgorithmException;
+import java.util.Objects;
+
+/**
+ * @Classname AppIrsManage
+ * @Description
+ * @Date 2023/7/12 11:43
+ * @Author PoffyZhang
+ */
+@Component
+@Slf4j
+@RequiredArgsConstructor
+public class AppIrsManage {
+
+ private final IProjectService projectService;
+
+ @Value("${irs.push-app.appKey}")
+ private String pushAppKey;
+
+ @Value("${irs.push-app.appScret}")
+ private String pushAppScret;
+
+ @Value("${irs.push-app.url}")
+ private String pushUrl;
+
+ @Value("${irs.search-app.appKey}")
+ private String searchAppKey;
+
+ @Value("${irs.search-app.appScret}")
+ private String searchAppScret;
+
+ @Value("${irs.search-app.url}")
+ private String searchUrl;
+
+ /**
+ * 推送 项目和应用关系
+ * @param dto
+ * @return
+ * @throws NoSuchAlgorithmException
+ */
+ public Boolean pushProjectApp(PushProjectAppToIrsDTO dto) throws NoSuchAlgorithmException {
+ String appCode = dto.getAppCode();
+ String projectCode = dto.getProjectCode();
+ Project project = projectService.getProjectByCode(projectCode);
+ VUtils.isTrue(Objects.isNull(project)).throwMessage("项目不存在!");
+
+ ApiApplyDTO apiApply = new ApiApplyDTO();
+ apiApply.setAppId(appCode);
+ ApiApplySearchResult apiApplySearchResult = this.searchApp(apiApply);
+
+ VUtils.isTrue(Objects.isNull(apiApplySearchResult)).throwMessage("应用在IRS不存在!");
+
+ long timestamp = System.currentTimeMillis();
+ String areaCode = project.getAreaCode();
+ String projectName = project.getProjectName();
+ String requestSecret = RefreshKeyUtil.getRequestSecret(pushAppKey, pushAppScret);
+ String capCode = CryptUtils.MD5Encode(timestamp + areaCode);
+ String capTime = String.valueOf(timestamp);
+ String sign = CryptUtils.MD5Encode(pushAppKey + requestSecret + timestamp);
+ String url = pushUrl + "?requestTime=" + timestamp +
+ "&sign=" + sign + "&appKey=" + pushAppKey + "&capCode=" + capCode + "&capTime=" + capTime +
+ "&baseProjSys=" + apiApplySearchResult.getName() + "&areaCode=" + areaCode + "&baseProjName=" + projectName +
+ "&baseProjId=" + project.getProjectCode() +
+ "&isEffective=1&baseProjSysCode=" + appCode;
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity forEntity = restTemplate.getForEntity(url, ApiResponse.class);
+
+ log.info("推送 项目和应用结果 : {}", JSON.toJSONString(forEntity));
+
+ ApiResponse body = forEntity.getBody();
+
+ return body.getSuccess();
+ }
+
+ /**
+ * 查询app
+ * @param apply
+ * @return
+ * @throws NoSuchAlgorithmException
+ */
+ public ApiApplySearchResult searchApp(ApiApplyDTO apply) throws NoSuchAlgorithmException {
+ long timestamp = System.currentTimeMillis();
+ String appCode = apply.getAppId();
+
+ String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret);
+ String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp);
+ String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign +
+ "&appKey=" + searchAppKey + "&" +
+ "pageSize=10&pageNum=1&appCode=" + appCode;
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity forEntity = restTemplate.getForEntity(url, ApiSearchResult.class);
+
+ log.info("查询应用目录 : {}",JSON.toJSONString(forEntity));
+
+ if(Objects.nonNull(forEntity.getBody()) && CollUtil.isNotEmpty(forEntity.getBody().getApiApplySearchResult())){
+ return forEntity.getBody().getApiApplySearchResult().get(0);
+ }
+ return null;
+ }
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplyDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplyDTO.java
new file mode 100644
index 0000000..59c85e7
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplyDTO.java
@@ -0,0 +1,28 @@
+package com.ningdatech.pmapi.irs.model.dto;
+
+import lombok.Data;
+
+@Data
+public class ApiApplyDTO {
+ private int id;
+ private String orgId;
+ private String userId;
+ private String isDeleted;
+ private String name;
+ private String appId;
+ private String type;
+ private String status;
+ private String sysStateTime;
+ private String deptName;
+ private String deptCode;
+ private String fiveAreas;
+ private String constructionLevel;
+ private String isUnifiedConstruction;
+ private String deployType;
+ private String principal;
+ private String employeeCode;
+ private String areaName;
+ private String createTime;
+ private String modifiedTime;
+
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java
new file mode 100644
index 0000000..168109e
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java
@@ -0,0 +1,28 @@
+package com.ningdatech.pmapi.irs.model.dto;
+
+import lombok.Data;
+
+@Data
+public class ApiApplySearchResult {
+ private int id;
+ private String orgId;
+ private String userId;
+ private String isDeleted;
+ private String name;
+ private String appId;
+ private String type;
+ private String status;
+ private String sysStateTime;
+ private String deptName;
+ private String deptCode;
+ private String fiveAreas;
+ private String constructionLevel;
+ private String isUnifiedConstruction;
+ private String deployType;
+ private String principal;
+ private String employeeCode;
+ private String areaName;
+ private String createTime;
+ private String modifiedTime;
+
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiSearchResult.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiSearchResult.java
new file mode 100644
index 0000000..2a33fe7
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiSearchResult.java
@@ -0,0 +1,17 @@
+package com.ningdatech.pmapi.irs.model.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ApiSearchResult {
+ private Boolean success;
+ private Integer code;
+ private String message;
+ private Integer totalCount;
+ private Integer pageSize;
+ private Integer pageNum;
+ private List apiApplySearchResult;
+
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/PushProjectAppToIrsDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/PushProjectAppToIrsDTO.java
new file mode 100644
index 0000000..9be9651
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/PushProjectAppToIrsDTO.java
@@ -0,0 +1,26 @@
+package com.ningdatech.pmapi.irs.model.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Classname PushProjectAppToIrsDto
+ * @Description
+ * @Date 2023/7/12 11:39
+ * @Author PoffyZhang
+ */
+@Data
+@Builder
+public class PushProjectAppToIrsDTO {
+
+ @ApiModelProperty("app code")
+ @NotBlank(message = "appCode 不能为空")
+ private String appCode;
+
+ @ApiModelProperty("项目编码")
+ @NotBlank(message = "项目编码 不能为空")
+ private String projectCode;
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/res/ApiResponse.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/res/ApiResponse.java
new file mode 100644
index 0000000..8495580
--- /dev/null
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/res/ApiResponse.java
@@ -0,0 +1,123 @@
+package com.ningdatech.pmapi.irs.model.res;
+
+import com.ningdatech.basic.enumeration.Status;
+import com.ningdatech.basic.model.ApiStatus;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ *
+ * ApiResponse - 统一的接口返回值封装
+ *
+ *
+ * @author WendyYang
+ * @since 14:29 2022/9/29
+ */
+@Data
+@NoArgsConstructor
+public class ApiResponse implements Serializable {
+ private static final long serialVersionUID = 532384723325394156L;
+
+ public static final int SUCCESS_CODE = 200;
+
+ public static final String SUCCESS_MSG = "success";
+
+ public static final int ERROR_CODE = 500;
+
+ public static final String ERROR_MSG = "Internal server error";
+
+ /**
+ * 状态码
+ */
+ private Integer code;
+
+ /**
+ * 返回内容
+ */
+ private String message;
+
+ /**
+ * 返回数据
+ */
+ private T data;
+
+
+ private Boolean success;
+ /**
+ * 全参构造函数
+ *
+ * @param code 状态码
+ * @param message 返回内容
+ * @param data 返回数据
+ */
+ private ApiResponse(Integer code, String message, T data,Boolean success) {
+ this.code = code;
+ this.message = message;
+ this.data = data;
+ this.success = success;
+ }
+
+ /**
+ * 构造一个自定义的API返回
+ *
+ * @param code 状态码
+ * @param message 返回内容
+ * @param data 返回数据
+ * @return ApiResponse
+ */
+ public static ApiResponse of(Integer code, String message, T data,Boolean success) {
+ return new ApiResponse(code, message, data,success);
+ }
+
+ /**
+ * 构造一个成功且不带数据的API返回
+ *
+ * @return ApiResponse
+ */
+ public static ApiResponse ofSuccess() {
+ return ofSuccess(null);
+ }
+
+ /**
+ * 构造一个成功且带数据的API返回
+ *
+ * @param data 返回数据
+ * @return ApiResponse
+ */
+ public static ApiResponse ofSuccess(T data) {
+ return ofStatus(Status.OK, data,Boolean.TRUE);
+ }
+
+ /**
+ * 构造一个成功且自定义消息的API返回
+ *
+ * @param message 返回内容
+ * @return ApiResponse
+ */
+ public static ApiResponse ofMessage(String message) {
+ return of(Status.OK.getCode(), message, null,Boolean.TRUE);
+ }
+
+ /**
+ * 构造一个有状态的API返回
+ *
+ * @param status 状态 {@link Status}
+ * @return ApiResponse
+ */
+ public static ApiResponse ofStatus(ApiStatus status) {
+ return ofStatus(status, null,Boolean.TRUE);
+ }
+
+ /**
+ * 构造一个有状态且带数据的API返回
+ *
+ * @param status 状态 {@link Status}
+ * @param data 返回数据
+ * @return ApiResponse
+ */
+ public static ApiResponse ofStatus(ApiStatus status, T data,Boolean success) {
+ return of(status.getCode(), status.getReasonPhrase(), data,success);
+ }
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
index f7471dc..7b40d30 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
@@ -178,7 +178,8 @@ public class DefaultDeclaredProjectManage {
startOrgInfoDto.setOrgModelMap(orgModelsList.stream()
.filter(v -> v.getOrgCode().equals(startOrgCode)
&& Boolean.FALSE.equals(v.getIsDelete())
- && (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ && (ProcessDefTypeEnum.SEAL.name().equals(v.getType())||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
@@ -189,6 +190,7 @@ public class DefaultDeclaredProjectManage {
.filter(v -> v.getOrgCode().equals(startOrgParentCode)
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
@@ -211,6 +213,7 @@ public class DefaultDeclaredProjectManage {
.filter(v -> v.getOrgCode().equals(project.getHigherSuperOrgCode())
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
@@ -246,6 +249,7 @@ public class DefaultDeclaredProjectManage {
.filter(v -> v.getOrgCode().equals(startOrgCode)
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
@@ -256,6 +260,7 @@ public class DefaultDeclaredProjectManage {
.filter(v -> v.getOrgCode().equals(startOrgParentCode)
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
@@ -278,6 +283,7 @@ public class DefaultDeclaredProjectManage {
.filter(v -> v.getOrgCode().equals(project.getHigherSuperOrgCode())
&& Boolean.FALSE.equals(v.getIsDelete())
&& (ProcessDefTypeEnum.SEAL.name().equals(v.getType()) ||
+ ProcessDefTypeEnum.JOINT_REVIEW.name().equals(v.getType()) ||
ProcessDefTypeEnum.DEFAULT.name().equals(v.getType())))
.collect(Collectors.toMap(WflowOrgModels::getType, v -> v)));
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java
index 9c8031d..56ce4b5 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java
@@ -20,4 +20,6 @@ public interface IProjectService extends IService {
public List getAllVersionProjectId(Long projectId);
Project getNewProject(Long projectId);
+
+ Project getProjectByCode(String projectCode);
}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java
index c966ad5..fb995d4 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java
@@ -70,4 +70,13 @@ public class ProjectServiceImpl extends ServiceImpl impl
return newest;
}
+
+ @Override
+ public Project getProjectByCode(String projectCode) {
+ Project project = this.getOne(Wrappers.lambdaQuery(Project.class)
+ .eq(Project::getProjectCode, projectCode)
+ .eq(Project::getNewest,Boolean.TRUE)
+ .last(BizConst.LIMIT_1));
+ return project;
+ }
}
diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml
index 6db8da9..49d8e27 100644
--- a/pmapi/src/main/resources/application-dev.yml
+++ b/pmapi/src/main/resources/application-dev.yml
@@ -214,6 +214,14 @@ irs:
url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020230427000001/irs-res-bill/report/pdfUrl
appScret: BCDSGS_4ab4235d26a9a357170a39f3a13fd68c
appKey: BCDSGA_d874c8e46b541eb4e8aac6510fd3351b
+ push-app:
+ url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/94wbaL1I1Pbz0648.htm
+ appScret: 496f0f2a19994f76b4fd9dae087366c7
+ appKey: A331101453557202109017383
+ search-app:
+ url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
+ appScret: 496f0f2a19994f76b4fd9dae087366c7
+ appKey: A331101453557202109017383
hostname: iZbp13nwyvib53j4j1p2xoZ
login:
diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml
index b98c4ce..1948252 100644
--- a/pmapi/src/main/resources/application-prod.yml
+++ b/pmapi/src/main/resources/application-prod.yml
@@ -217,6 +217,10 @@ irs:
url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020230427000001/irs-res-bill/report/pdfUrl
appScret: BCDSGS_4ab4235d26a9a357170a39f3a13fd68c
appKey: BCDSGA_d874c8e46b541eb4e8aac6510fd3351b
+ push-app:
+ url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/94wbaL1I1Pbz0648.htm
+ appScret: 496f0f2a19994f76b4fd9dae087366c7
+ appKey: A331101453557202109017383
hostname: iZ6mx01gyeodd80imxd2gbZ
login:
phone-verify-code: