Browse Source

云类型多选修改

master
CMM 1 year ago
parent
commit
931a8fe852
2 changed files with 16 additions and 7 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
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);
}
// 获取本年计划投资金额


Loading…
Cancel
Save