@@ -1,6 +1,8 @@ | |||||
package com.ningdatech.pmapi.irs.sign; | package com.ningdatech.pmapi.irs.sign; | ||||
import com.alibaba.fastjson.JSONObject; | 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.irs.config.IrsSealPlatformProperties; | ||||
import com.ningdatech.pmapi.todocenter.model.dto.SignReqDTO; | import com.ningdatech.pmapi.todocenter.model.dto.SignReqDTO; | ||||
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; | import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; | ||||
@@ -69,7 +71,7 @@ public class IRSAPIRequest { | |||||
//String signFileB64 = jsondata.getString("signFileB64"); | //String signFileB64 = jsondata.getString("signFileB64"); | ||||
//IRSAPIRequest.base64StringToPdf(signFileB64, "D:\\test21.pdf"); | //IRSAPIRequest.base64StringToPdf(signFileB64, "D:\\test21.pdf"); | ||||
} catch (Exception e) { | } catch (Exception e) { | ||||
e.printStackTrace(); | |||||
throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn + StrPool.SEMICOLON + e.getMessage()); | |||||
} | } | ||||
// return obj; | // return obj; | ||||
return resp.getBytes(); | return resp.getBytes(); | ||||
@@ -493,11 +493,9 @@ public class TodoCenterManage { | |||||
signReq.setSignType(signType); | signReq.setSignType(signType); | ||||
// 调用盖章接口,获取盖章后返回的pdf文件字符数组 | // 调用盖章接口,获取盖章后返回的pdf文件字符数组 | ||||
byte[] signPdf = new byte[0]; | 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 multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf); | MultipartFile multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf); | ||||
// 上传OSS | // 上传OSS | ||||
@@ -1156,7 +1154,16 @@ public class TodoCenterManage { | |||||
paramsMap.put("cloudType", null); | paramsMap.put("cloudType", null); | ||||
}else { | }else { | ||||
String cloudType = project.getCloudType(); | 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); | paramsMap.put("cloudType",cloudTypeName); | ||||
} | } | ||||
// 获取本年计划投资金额 | // 获取本年计划投资金额 | ||||
@@ -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 cn.hutool.core.date.LocalDateTimeUtil; | ||||
import com.ningdatech.log.model.OptLogDTO; | import com.ningdatech.log.model.OptLogDTO; |
@@ -5,7 +5,6 @@ import cn.hutool.extra.servlet.ServletUtil; | |||||
import org.springframework.security.web.authentication.WebAuthenticationDetails; | import org.springframework.security.web.authentication.WebAuthenticationDetails; | ||||
import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
import java.time.LocalDateTime; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -19,8 +18,6 @@ public class WebRequestDetails extends WebAuthenticationDetails { | |||||
private static final long serialVersionUID = -4466339683132696235L; | private static final long serialVersionUID = -4466339683132696235L; | ||||
private LocalDateTime requestTime; | |||||
private final String requestIp; | private final String requestIp; | ||||
private final String requestUri; | private final String requestUri; | ||||
@@ -49,10 +46,6 @@ public class WebRequestDetails extends WebAuthenticationDetails { | |||||
this.userAgent = StrUtil.sub(request.getHeader("user-agent"), 0, 500); | this.userAgent = StrUtil.sub(request.getHeader("user-agent"), 0, 500); | ||||
} | } | ||||
public LocalDateTime getRequestTime() { | |||||
return requestTime; | |||||
} | |||||
public String getRequestIp() { | public String getRequestIp() { | ||||
return requestIp; | return requestIp; | ||||
} | } | ||||