Commit eafa54a0 by liuyang

2024-08-21 文档库 没有附件无法发布

parent ce1327c2
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.tools;
import com.baosight.hggp.common.AccountPeriodStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.constant.S3Constant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001;
......@@ -1175,7 +1176,7 @@ public class HGCWTools {
List<HGCW999> results = new ArrayList<>();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
results = DaoBase.getInstance().query("HGCW999.queryRun",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
......@@ -1189,6 +1190,23 @@ public class HGCWTools {
return results;
}
public static List<HGCW999> queryByBiz(String bizType) {
AssertUtils.isNull(bizType, "业务类型不能为空!");
List<HGCW999> results = new ArrayList<>();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
results = DaoBase.getInstance().query("HGCW999.queryRun",new HashMap<String,Object>(){
{put("bizType",bizType);}
});
} else {
results = DaoBase.getInstance().query("HGCW999.queryDev",new HashMap<String,Object>(){
{put("bizType",bizType);}
});
}
return results;
}
}
public static class HgCw051{
......
......@@ -37,6 +37,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author LiuYang
......@@ -175,10 +176,12 @@ public class ServiceHGWD001 extends ServiceEPBase {
try {
HGWD001 hgwd001 = new HGWD001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<HGCW999> list = HGCWTools.HgCw999.queryByBiz("WD");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgwd001.fromMap(map);
List<HGCW999> cw999List =list.stream().filter(hgwcw999 -> hgwcw999.getMatId().equals(hgwd001.getId())).collect(Collectors.toList());
AssertUtils.isEmpty(cw999List, String.format("未找到[%s]所属项目有关的附件, 发布失败!", hgwd001.getProjName()));
//HGWD001 wd001 =HGWDTools.HgWd001.get(hgwd001.getId());
HGWD001A hgwd001a = new HGWD001A();
hgwd001a.setCompanyCode(hgwd001.getCompanyCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment