From e2c2acf80e7e6f795df375301e07e149c7d0ca61 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 7 Jun 2023 14:26:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=A2=86=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectlib/enumeration/BizDomainEnum.java | 49 ++++++++++++++++++++++ .../pmapi/todocenter/manage/TodoCenterManage.java | 20 ++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/BizDomainEnum.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/BizDomainEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/BizDomainEnum.java new file mode 100644 index 0000000..abe2b0c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/BizDomainEnum.java @@ -0,0 +1,49 @@ +package com.ningdatech.pmapi.projectlib.enumeration; + +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +/** + * 综合业务领域枚举 + * + * @return + * @author CMM + * @since 2023/03/16 16:27 + */ +@Getter +@AllArgsConstructor +@NoArgsConstructor +public enum BizDomainEnum { + /** + * 项目类型 + */ + PARTY_GOV_ORG_OVERALL(1, "党政机关整体智治"), + DIG_GOV(2, "数字政府"), + DIG_ECO(3, "数字经济"), + DIG_SOC(4, "数字社会"), + DIG_LAW(5, "数字法治"), + ALL_INTEL_PUB_DATA_PLAT(6, "一体化智能化公共数据平台"), + DIG_CUL(7, "数字文化"), + GRA_WISE(8, "基层智治"); + + + private Integer code; + private String desc; + + public static String getDescByCode(Integer code) { + if (Objects.isNull(code)) { + return StringUtils.EMPTY; + } + for (BizDomainEnum t : BizDomainEnum.values()) { + if (code.equals(t.getCode())) { + return t.desc; + } + } + return StringUtils.EMPTY; + } +} 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 9f49256..2422ea7 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 @@ -11,6 +11,8 @@ import java.util.stream.Stream; import javax.servlet.http.HttpServletResponse; import cn.hutool.core.util.ObjectUtil; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.pmapi.projectlib.enumeration.BizDomainEnum; import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; import com.ningdatech.pmapi.todocenter.handle.PassHandle; import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; @@ -482,7 +484,12 @@ public class TodoCenterManage { Integer signType = req.getSignType(); signReq.setSignType(signType); // 调用盖章接口,获取盖章后返回的pdf文件字符数组 - byte[] signPdf = IRSAPIRequest.createSignPdf(signReq); + byte[] signPdf = new byte[0]; + try { + signPdf = IRSAPIRequest.createSignPdf(signReq); + } catch (Exception e) { + throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn); + } // 转换成MultipartFile MultipartFile multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf); // 上传OSS @@ -1128,10 +1135,19 @@ public class TodoCenterManage { paramsMap.put("fourSystems", fourSystem); // 获取是否数字化改革项目 String isDigitalReform = IsOrNotEnum.getDescByCode(project.getIsDigitalReform()); - paramsMap.put("isDigitalReform", isDigitalReform); + if (IsOrNotEnum.NOT.getDesc().equals(isDigitalReform)){ + paramsMap.put("bizDomain", null); + }else { + paramsMap.put("bizDomain", BizDomainEnum.getDescByCode(project.getBizDomain())); + } // 获取是否上云 String isCloud = IsOrNotEnum.getDescByCode(project.getIsCloud()); paramsMap.put("isCloud", isCloud); + if (IsOrNotEnum.NOT.getDesc().equals(isCloud)){ + paramsMap.put("cloudType", null); + }else { + paramsMap.put("cloudType",project.getCloudType()); + } // 获取本年计划投资金额 BigDecimal yearPlanInvest = project.getAnnualPlanAmount(); paramsMap.put("yearPlanInvest",yearPlanInvest); From f83098b2bd9a12e7dd5a6d2a571e55da0a0cc743 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 7 Jun 2023 14:38:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8D=B0=E7=AB=A0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/src/main/resources/application-dev.yml | 10 +++++----- pmapi/src/main/resources/application-prod.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml index cf0242e..cb0c3c5 100644 --- a/pmapi/src/main/resources/application-dev.yml +++ b/pmapi/src/main/resources/application-dev.yml @@ -203,10 +203,10 @@ provincial: #天印服务器接口信息 irs: seal-platform: - project-id: 1 - project-secret: 2 - access-key: 3 - secret-key: 4 - api-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf + project-id: 330001110 + project-secret: 70e512d40c8f440484db4acab181570a + access-key: 42bcb49bea174986a3bfdfba7d005566 + secret-key: bebff29877d4443abd67fc4f8fb335d8 + api-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf hostname: iZbp13nwyvib53j4j1p2xoZ diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml index eea9c26..022c0a3 100644 --- a/pmapi/src/main/resources/application-prod.yml +++ b/pmapi/src/main/resources/application-prod.yml @@ -203,10 +203,10 @@ provincial: #天印服务器接口信息 irs: seal-platform: - project-id: 1 - project-secret: 2 - access-key: 3 - secret-key: 4 - api-url: https://ibcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf + project-id: 330001110 + project-secret: 70e512d40c8f440484db4acab181570a + access-key: 42bcb49bea174986a3bfdfba7d005566 + secret-key: bebff29877d4443abd67fc4f8fb335d8 + api-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf hostname: iZ6mx01gyeodd80imxd2gbZ \ No newline at end of file From 66d6314b59657371929f2292cc65502e97baffe1 Mon Sep 17 00:00:00 2001 From: liushuai Date: Wed, 7 Jun 2023 15:37:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95/=E9=80=80?= =?UTF-8?q?=E5=87=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java index fcb51a1..5c356e6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java @@ -78,9 +78,9 @@ public class CommonLogTask { commonLog.setUserRole("政府工作人员"); commonLog.setAreaCode(userInfo.getRegionCode()); String description = optLog.getDescription(); - if (description.equals("登录")){ + if ("登陆".equals(description)){ commonLog.setActionType(1); - }else if (description.equals("退出登录")){ + }else if ("退出登陆".equals(description)){ commonLog.setActionType(2); }else { commonLog.setActionType(3);