From 5e3fedc849ba52a931a8b372c57c90f4bc1a77b8 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 28 Aug 2023 14:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java | 2 ++ .../main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java | 6 ++++-- .../com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java index 49f8d24..bf4c321 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java @@ -12,6 +12,8 @@ public interface BizProjectContant { String NOT_EFFECTIVE_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective"; String NOT_EFFECTIVE_CODE = "1"; + String EFFECTIVE_CODE = "2"; + class ProjectCollection { //有效 public static final String IS_EFFECTIVE = "02"; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java index 84eb77b..4157196 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java @@ -2,6 +2,7 @@ package com.ningdatech.pmapi.gov.convert; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; +import com.ningdatech.pmapi.gov.contants.BizProjectContant; import com.ningdatech.pmapi.gov.model.dto.*; import com.ningdatech.pmapi.gov.model.req.*; @@ -25,7 +26,7 @@ public class ProjectConvert { */ public static ProjectPushReq convert(GovBizProjectSaveDTO saveDTO) { ProjectPushReq req = new ProjectPushReq(); - req.setBaseinfo(convertBase(saveDTO.getBaseinfo())); + req.setBaseinfo(convertBase(saveDTO.getBaseinfo(),BizProjectContant.EFFECTIVE_CODE)); req.setApply(convertApply(saveDTO.getApply())); req.setApprove(convertApprove(saveDTO.getApprove())); req.setCimplement(convertCimplement(saveDTO.getCimplement())); @@ -126,8 +127,9 @@ public class ProjectConvert { return req; } - public static ProjectBaseInfoReq convertBase(GovBizProjectBaseinfoDTO baseinfo) { + public static ProjectBaseInfoReq convertBase(GovBizProjectBaseinfoDTO baseinfo,String isEffective) { ProjectBaseInfoReq req = BeanUtil.copyProperties(baseinfo,ProjectBaseInfoReq.class); + baseinfo.setIsEffective(isEffective); return req; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java index 7c417a0..361bf7e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java @@ -230,6 +230,7 @@ public class GovProjectCollectionManage { GovBizProjectBaseinfoDTO baseinfo = saveDTO.getBaseinfo(); baseinfo.setBaseProjId(baseProjId); baseinfo.setBaseProjName(baseProjName); + baseinfo.setIsEffective(BizProjectContant.ProjectCollection.IS_EFFECTIVE); GovBizProjectBaseinfo oldBaseInfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) .eq(GovBizProjectBaseinfo::getBaseProjId, baseProjId) .last(BizConst.LIMIT_1)); @@ -439,7 +440,7 @@ public class GovProjectCollectionManage { private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { String url = noEffectiveUrl; baseinfo.setIsEffective(BizProjectContant.NOT_EFFECTIVE_CODE); - ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo); + ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo,BizProjectContant.NOT_EFFECTIVE_CODE); try{ log.info("推送消息体 {},{},{}",baseinfo.getBaseProjId(),url, JSON.toJSONString(req)); HttpHeaders headers = new HttpHeaders();