From 8b65a38b7802edc02415a979e5d624144646a988 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 10:00:27 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B5=99=E6=94=BF=E9=92=89=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E5=8F=96=E7=A4=BE=E4=BC=9A=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../irs/controller/OrganizationController.java | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java new file mode 100644 index 0000000..fe0ecd9 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.irs.controller; + +import com.ningdatech.zwdd.client.ZwddClient; +import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * @Classname OrganizationController + * @Description + * @Date 2023/8/16 9:57 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/irs/org") +@Api(value = "Organization", tags = "irs-企业信息") +@RequiredArgsConstructor +public class OrganizationController { + + private final ZwddClient zwddClient; + + @ApiOperation(value = "获取企业信息", notes = "获取企业信息") + @GetMapping("/getOrganizationByCode/{code}") + public DingOrgInfoDTO getOrganizationByCode(@PathVariable String code) { + return zwddClient.getOrganizationByCode(code).getData(); + } + +} From 5e9c64462b0ec6306e47afe6b894a5da73260169 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 10:26:08 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9D=A1=E7=BA=BF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/irs/controller/OrganizationController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java index fe0ecd9..0f40b6f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/OrganizationController.java @@ -2,6 +2,7 @@ package com.ningdatech.pmapi.irs.controller; import com.ningdatech.zwdd.client.ZwddClient; import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; +import com.ningdatech.zwdd.model.dto.SubGovBusinessStripsDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -9,6 +10,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname OrganizationController * @Description @@ -31,4 +34,9 @@ public class OrganizationController { return zwddClient.getOrganizationByCode(code).getData(); } + @ApiOperation(value = "获取条线列表", notes = "获取条线列表") + @GetMapping("/getGovBusinessStripLine/{code}") + public List getGovBusinessStripLine(@PathVariable String code) { + return zwddClient.getGovBusinessStripLine(code).getData(); + } } From fc82b02de61ff78472ab66177cec33552e4bae00 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 11:19:33 +0800 Subject: [PATCH 3/6] =?UTF-8?q?debug=20=E7=BB=AD=E5=BB=BA=E8=B5=84?= =?UTF-8?q?=E9=87=91=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ProjectRenewalFundDeclarationMapper.xml | 12 ++++++------ .../pmapi/projectlib/model/req/ProjectRenewalListReq.java | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml index ef954f1..b550e0b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml @@ -26,8 +26,8 @@ and p.project_type = #{param.projectType} - - and p.project_year = #{param.projectYear} + + and p.project_year = #{param.year} and p.stage = #{param.stage} @@ -35,11 +35,11 @@ and p.status = #{param.status} - - and p.create_on >= #{param.createOnMin} + + and p.create_on >= #{param.startTime} - - and p.create_on <= #{param.createOnMax} + + and p.create_on <= #{param.endTime} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java index 2dd6409..486fa9f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java @@ -32,7 +32,7 @@ public class ProjectRenewalListReq extends PagePo { private Integer projectType; @ApiModelProperty("预算年度") - private Integer projectYear; + private Integer year; @ApiModelProperty("项目阶段") private Integer stage; @@ -42,11 +42,11 @@ public class ProjectRenewalListReq extends PagePo { @ApiModelProperty("创建时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime createOnMin; + private LocalDateTime startTime; @ApiModelProperty("创建时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime createOnMax; + private LocalDateTime endTime; @ApiModelProperty("用户ID") private Long userId; From e89a3fbbdcb745ec7dbb39b718b8f1e7c3e8462d Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 11:29:08 +0800 Subject: [PATCH 4/6] =?UTF-8?q?debug=20=E7=BB=AD=E5=BB=BA=E8=B5=84?= =?UTF-8?q?=E9=87=91=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml index b550e0b..96afa09 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectRenewalFundDeclarationMapper.xml @@ -41,5 +41,9 @@ and p.create_on <= #{param.endTime} + + and prfd.approval_status = #{param.approvalStatus} + + From b45fa21f54b356a8d8ae4b78520472d0cedec16b Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 11:34:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?debug=20=E7=BB=AD=E5=BB=BA=E8=B5=84?= =?UTF-8?q?=E9=87=91=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java index 486fa9f..0cd3855 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectRenewalListReq.java @@ -59,4 +59,7 @@ public class ProjectRenewalListReq extends PagePo { @ApiModelProperty("项目状态 多个") private List statusList; + + @ApiModelProperty("审核状态") + private String approvalStatus; } From 9798a6ca0d34fd27be006babc052f2ca7b84000a Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 16 Aug 2023 15:29:12 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9D=A1=E7=BA=BF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ding/controller/DingInfoPullController.java | 6 ++++++ .../pmapi/organization/manage/ProcDefManage.java | 23 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java index 056343a..f5d3233 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java @@ -255,6 +255,12 @@ public class DingInfoPullController { return "推送失败"; } + @ApiOperation(value = "同步企业信息 条线", notes = "同步企业信息 条线") + @GetMapping("/synchronouOrgBiz") + public String synchronouOrgBiz() { + return procDefManage.synchronouOrgBiz(); + } + public static Workbook readExcel(InputStream is, String extString){ Workbook wb = null; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/ProcDefManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/ProcDefManage.java index 60acd33..6d5ca27 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/ProcDefManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/ProcDefManage.java @@ -4,11 +4,14 @@ import cn.hutool.core.util.IdUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Lists; +import com.ningdatech.basic.model.GenericResult; import com.ningdatech.basic.util.StrPool; import com.ningdatech.pmapi.ding.constants.DingOrganizationContant; import com.ningdatech.pmapi.organization.model.entity.DingOrganization; import com.ningdatech.pmapi.organization.service.IDingOrganizationService; import com.ningdatech.pmapi.organization.constants.ProcDefContant; +import com.ningdatech.zwdd.client.ZwddClient; +import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; import com.wflow.bean.entity.WflowOrgModelHistorys; import com.wflow.bean.entity.WflowOrgModels; import com.wflow.enums.ProcessDefTypeEnum; @@ -16,6 +19,7 @@ import com.wflow.service.OrgProcdefHistoryService; import com.wflow.service.OrgProcdefService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import java.time.LocalDateTime; @@ -38,6 +42,8 @@ public class ProcDefManage { private final OrgProcdefHistoryService orgProcdefHistoryService; + private final ZwddClient zwddClient; + /** * 初始化 单位配置 * @return @@ -140,4 +146,21 @@ public class ProcDefManage { return "初始化成功"; } + + public String synchronouOrgBiz() { + List orgs = organizationService.list(); + //同步所有的 企业条线 + for(DingOrganization org : orgs){ + GenericResult organization = zwddClient.getOrganizationByCode(org.getOrganizationCode()); + if(organization.isSuccess()){ + DingOrgInfoDTO data = organization.getData(); + String businessStripCodes = data.getBusinessStripCodes(); + if(StringUtils.isNotBlank(businessStripCodes)){ + org.setBusinessStripCodes(businessStripCodes); + organizationService.updateById(org); + } + } + } + return "更新完成"; + } }