@@ -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_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective"; | ||||
String NOT_EFFECTIVE_CODE = "1"; | String NOT_EFFECTIVE_CODE = "1"; | ||||
String EFFECTIVE_CODE = "2"; | |||||
class ProjectCollection { | class ProjectCollection { | ||||
//有效 | //有效 | ||||
public static final String IS_EFFECTIVE = "02"; | public static final String IS_EFFECTIVE = "02"; | ||||
@@ -2,6 +2,7 @@ package com.ningdatech.pmapi.gov.convert; | |||||
import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||
import cn.hutool.core.collection.CollUtil; | 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.dto.*; | ||||
import com.ningdatech.pmapi.gov.model.req.*; | import com.ningdatech.pmapi.gov.model.req.*; | ||||
@@ -25,7 +26,7 @@ public class ProjectConvert { | |||||
*/ | */ | ||||
public static ProjectPushReq convert(GovBizProjectSaveDTO saveDTO) { | public static ProjectPushReq convert(GovBizProjectSaveDTO saveDTO) { | ||||
ProjectPushReq req = new ProjectPushReq(); | ProjectPushReq req = new ProjectPushReq(); | ||||
req.setBaseinfo(convertBase(saveDTO.getBaseinfo())); | |||||
req.setBaseinfo(convertBase(saveDTO.getBaseinfo(),BizProjectContant.EFFECTIVE_CODE)); | |||||
req.setApply(convertApply(saveDTO.getApply())); | req.setApply(convertApply(saveDTO.getApply())); | ||||
req.setApprove(convertApprove(saveDTO.getApprove())); | req.setApprove(convertApprove(saveDTO.getApprove())); | ||||
req.setCimplement(convertCimplement(saveDTO.getCimplement())); | req.setCimplement(convertCimplement(saveDTO.getCimplement())); | ||||
@@ -126,8 +127,9 @@ public class ProjectConvert { | |||||
return req; | return req; | ||||
} | } | ||||
public static ProjectBaseInfoReq convertBase(GovBizProjectBaseinfoDTO baseinfo) { | |||||
public static ProjectBaseInfoReq convertBase(GovBizProjectBaseinfoDTO baseinfo,String isEffective) { | |||||
ProjectBaseInfoReq req = BeanUtil.copyProperties(baseinfo,ProjectBaseInfoReq.class); | ProjectBaseInfoReq req = BeanUtil.copyProperties(baseinfo,ProjectBaseInfoReq.class); | ||||
baseinfo.setIsEffective(isEffective); | |||||
return req; | return req; | ||||
} | } | ||||
} | } |
@@ -230,6 +230,7 @@ public class GovProjectCollectionManage { | |||||
GovBizProjectBaseinfoDTO baseinfo = saveDTO.getBaseinfo(); | GovBizProjectBaseinfoDTO baseinfo = saveDTO.getBaseinfo(); | ||||
baseinfo.setBaseProjId(baseProjId); | baseinfo.setBaseProjId(baseProjId); | ||||
baseinfo.setBaseProjName(baseProjName); | baseinfo.setBaseProjName(baseProjName); | ||||
baseinfo.setIsEffective(BizProjectContant.ProjectCollection.IS_EFFECTIVE); | |||||
GovBizProjectBaseinfo oldBaseInfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) | GovBizProjectBaseinfo oldBaseInfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) | ||||
.eq(GovBizProjectBaseinfo::getBaseProjId, baseProjId) | .eq(GovBizProjectBaseinfo::getBaseProjId, baseProjId) | ||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
@@ -439,7 +440,7 @@ public class GovProjectCollectionManage { | |||||
private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { | private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { | ||||
String url = noEffectiveUrl; | String url = noEffectiveUrl; | ||||
baseinfo.setIsEffective(BizProjectContant.NOT_EFFECTIVE_CODE); | baseinfo.setIsEffective(BizProjectContant.NOT_EFFECTIVE_CODE); | ||||
ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo); | |||||
ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo,BizProjectContant.NOT_EFFECTIVE_CODE); | |||||
try{ | try{ | ||||
log.info("推送消息体 {},{},{}",baseinfo.getBaseProjId(),url, JSON.toJSONString(req)); | log.info("推送消息体 {},{},{}",baseinfo.getBaseProjId(),url, JSON.toJSONString(req)); | ||||
HttpHeaders headers = new HttpHeaders(); | HttpHeaders headers = new HttpHeaders(); | ||||