PoffyZhang пре 1 година
родитељ
комит
5e3fedc849
3 измењених фајлова са 8 додато и 3 уклоњено
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/gov/contants/BizProjectContant.java
  2. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/gov/convert/ProjectConvert.java
  3. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java

+ 2
- 0
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";


+ 4
- 2
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;
}
}

+ 2
- 1
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();


Loading…
Откажи
Сачувај