Commit 194755d1 by yukang

处理数组下标越界

parent 06ec3643
......@@ -18,6 +18,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
......@@ -40,11 +41,13 @@ public class ServiceHPSC002A extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
if (CollectionUtils.isNotEmpty(dbSc002s)) {
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC002B;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
......@@ -9,6 +10,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.List;
import java.util.Map;
......@@ -30,11 +32,13 @@ public class ServiceHPSC002B extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002B().eiMetadata);
if (CollectionUtils.isNotEmpty(dbSc002s)) {
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
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