@@ -255,6 +255,12 @@ public class DingInfoPullController { | |||||
return "推送失败"; | return "推送失败"; | ||||
} | } | ||||
@ApiOperation(value = "同步企业信息 条线", notes = "同步企业信息 条线") | |||||
@GetMapping("/synchronouOrgBiz") | |||||
public String synchronouOrgBiz() { | |||||
return procDefManage.synchronouOrgBiz(); | |||||
} | |||||
public static Workbook readExcel(InputStream is, String extString){ | public static Workbook readExcel(InputStream is, String extString){ | ||||
Workbook wb = null; | Workbook wb = null; | ||||
@@ -0,0 +1,42 @@ | |||||
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; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
/** | |||||
* @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(); | |||||
} | |||||
@ApiOperation(value = "获取条线列表", notes = "获取条线列表") | |||||
@GetMapping("/getGovBusinessStripLine/{code}") | |||||
public List<SubGovBusinessStripsDTO> getGovBusinessStripLine(@PathVariable String code) { | |||||
return zwddClient.getGovBusinessStripLine(code).getData(); | |||||
} | |||||
} |
@@ -4,11 +4,14 @@ import cn.hutool.core.util.IdUtil; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.basic.model.GenericResult; | |||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import com.ningdatech.pmapi.ding.constants.DingOrganizationContant; | import com.ningdatech.pmapi.ding.constants.DingOrganizationContant; | ||||
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | ||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | ||||
import com.ningdatech.pmapi.organization.constants.ProcDefContant; | 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.WflowOrgModelHistorys; | ||||
import com.wflow.bean.entity.WflowOrgModels; | import com.wflow.bean.entity.WflowOrgModels; | ||||
import com.wflow.enums.ProcessDefTypeEnum; | import com.wflow.enums.ProcessDefTypeEnum; | ||||
@@ -16,6 +19,7 @@ import com.wflow.service.OrgProcdefHistoryService; | |||||
import com.wflow.service.OrgProcdefService; | import com.wflow.service.OrgProcdefService; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
@@ -38,6 +42,8 @@ public class ProcDefManage { | |||||
private final OrgProcdefHistoryService orgProcdefHistoryService; | private final OrgProcdefHistoryService orgProcdefHistoryService; | ||||
private final ZwddClient zwddClient; | |||||
/** | /** | ||||
* 初始化 单位配置 | * 初始化 单位配置 | ||||
* @return | * @return | ||||
@@ -140,4 +146,21 @@ public class ProcDefManage { | |||||
return "初始化成功"; | return "初始化成功"; | ||||
} | } | ||||
public String synchronouOrgBiz() { | |||||
List<DingOrganization> orgs = organizationService.list(); | |||||
//同步所有的 企业条线 | |||||
for(DingOrganization org : orgs){ | |||||
GenericResult<DingOrgInfoDTO> 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 "更新完成"; | |||||
} | |||||
} | } |
@@ -26,8 +26,8 @@ | |||||
<if test="param.projectType != null"> | <if test="param.projectType != null"> | ||||
and p.project_type = #{param.projectType} | and p.project_type = #{param.projectType} | ||||
</if> | </if> | ||||
<if test="param.projectYear != null"> | |||||
and p.project_year = #{param.projectYear} | |||||
<if test="param.year != null"> | |||||
and p.project_year = #{param.year} | |||||
</if> | </if> | ||||
<if test="param.stage != null"> | <if test="param.stage != null"> | ||||
and p.stage = #{param.stage} | and p.stage = #{param.stage} | ||||
@@ -35,11 +35,15 @@ | |||||
<if test="param.status != null"> | <if test="param.status != null"> | ||||
and p.status = #{param.status} | and p.status = #{param.status} | ||||
</if> | </if> | ||||
<if test="param.createOnMin != null"> | |||||
and p.create_on >= #{param.createOnMin} | |||||
<if test="param.startTime != null"> | |||||
and p.create_on >= #{param.startTime} | |||||
</if> | </if> | ||||
<if test="param.createOnMax != null"> | |||||
and p.create_on <= #{param.createOnMax} | |||||
<if test="param.endTime != null"> | |||||
and p.create_on <= #{param.endTime} | |||||
</if> | </if> | ||||
<if test="param.approvalStatus != null"> | |||||
and prfd.approval_status = #{param.approvalStatus} | |||||
</if> | |||||
</select> | </select> | ||||
</mapper> | </mapper> |
@@ -32,7 +32,7 @@ public class ProjectRenewalListReq extends PagePo { | |||||
private Integer projectType; | private Integer projectType; | ||||
@ApiModelProperty("预算年度") | @ApiModelProperty("预算年度") | ||||
private Integer projectYear; | |||||
private Integer year; | |||||
@ApiModelProperty("项目阶段") | @ApiModelProperty("项目阶段") | ||||
private Integer stage; | private Integer stage; | ||||
@@ -42,11 +42,11 @@ public class ProjectRenewalListReq extends PagePo { | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | ||||
private LocalDateTime createOnMin; | |||||
private LocalDateTime startTime; | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | ||||
private LocalDateTime createOnMax; | |||||
private LocalDateTime endTime; | |||||
@ApiModelProperty("用户ID") | @ApiModelProperty("用户ID") | ||||
private Long userId; | private Long userId; | ||||
@@ -59,4 +59,7 @@ public class ProjectRenewalListReq extends PagePo { | |||||
@ApiModelProperty("项目状态 多个") | @ApiModelProperty("项目状态 多个") | ||||
private List<Integer> statusList; | private List<Integer> statusList; | ||||
@ApiModelProperty("审核状态") | |||||
private String approvalStatus; | |||||
} | } |