Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
PoffyZhang 1 year ago
parent
commit
5a3ff80366
4 changed files with 17 additions and 15 deletions
  1. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java
  2. +13
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/lisenter/AuthorizationEventListener.java
  4. +0
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/WebRequestDetails.java

+ 3
- 1
pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java View File

@@ -1,6 +1,8 @@
package com.ningdatech.pmapi.irs.sign;

import com.alibaba.fastjson.JSONObject;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.pmapi.irs.config.IrsSealPlatformProperties;
import com.ningdatech.pmapi.todocenter.model.dto.SignReqDTO;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
@@ -69,7 +71,7 @@ public class IRSAPIRequest {
//String signFileB64 = jsondata.getString("signFileB64");
//IRSAPIRequest.base64StringToPdf(signFileB64, "D:\\test21.pdf");
} catch (Exception e) {
e.printStackTrace();
throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn + StrPool.SEMICOLON + e.getMessage());
}
// return obj;
return resp.getBytes();


+ 13
- 6
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -493,11 +493,9 @@ public class TodoCenterManage {
signReq.setSignType(signType);
// 调用盖章接口,获取盖章后返回的pdf文件字符数组
byte[] signPdf = new byte[0];
try {
signPdf = IRSAPIRequest.createSignPdf(signReq);
} catch (Exception e) {
throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn);
}

signPdf = IRSAPIRequest.createSignPdf(signReq);

// 转换成MultipartFile
MultipartFile multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf);
// 上传OSS
@@ -1156,7 +1154,16 @@ public class TodoCenterManage {
paramsMap.put("cloudType", null);
}else {
String cloudType = project.getCloudType();
String cloudTypeName = CloudTypeEnum.getDescByCode(Integer.valueOf(cloudType));
String cloudTypeName;
// 云类型为多选
if (cloudType.contains(StrPool.COMMA)){
cloudTypeName = Arrays.stream(cloudType.split(StrPool.COMMA))
.map(s -> CloudTypeEnum.getDescByCode(Integer.valueOf(s)))
.collect(Collectors.joining(StrPool.COMMA));

}else {
cloudTypeName = CloudTypeEnum.getDescByCode(Integer.valueOf(cloudType));
}
paramsMap.put("cloudType",cloudTypeName);
}
// 获取本年计划投资金额


pmapi/src/main/java/com/ningdatech/pmapi/user/controller/AuthorizationEventListener.java → pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/lisenter/AuthorizationEventListener.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.user.controller;
package com.ningdatech.pmapi.user.security.auth.lisenter;

import cn.hutool.core.date.LocalDateTimeUtil;
import com.ningdatech.log.model.OptLogDTO;

+ 0
- 7
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/WebRequestDetails.java View File

@@ -5,7 +5,6 @@ import cn.hutool.extra.servlet.ServletUtil;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;

/**
* <p>
@@ -19,8 +18,6 @@ public class WebRequestDetails extends WebAuthenticationDetails {

private static final long serialVersionUID = -4466339683132696235L;

private LocalDateTime requestTime;

private final String requestIp;

private final String requestUri;
@@ -49,10 +46,6 @@ public class WebRequestDetails extends WebAuthenticationDetails {
this.userAgent = StrUtil.sub(request.getHeader("user-agent"), 0, 500);
}

public LocalDateTime getRequestTime() {
return requestTime;
}

public String getRequestIp() {
return requestIp;
}


Loading…
Cancel
Save