diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java index d769fef..41acf08 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java @@ -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(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 06280b2..99c369c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -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); } // 获取本年计划投资金额