Commit 4d05f5fd by wuwenlong

产品模版bugfix

parent 134e5ec2
...@@ -50,11 +50,11 @@ public class ServiceHPPZ015A extends ServiceBase { ...@@ -50,11 +50,11 @@ public class ServiceHPPZ015A extends ServiceBase {
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID, DdynamicEnum.CODESET_CODE_BLOCK_ID), map, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID, DdynamicEnum.CODESET_CODE_BLOCK_ID), map,
false); false);
Map queryMap = EiInfoUtils.getFirstRow(inInfo); // Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String id = MapUtils.getString(queryMap, "projId"); // String id = MapUtils.getString(queryMap, "projId");
HPSC001 hpsc001 = HPSCTools.HpSc001.getId(id); // HPPZ015 hppz015 = HPPZTools.HpPz015.getId(id);
HPPZ015A hppz015A = new HPPZ015A(); // HPPZ015A hppz015A = new HPPZ015A();
hppz015A.setProjCode(hpsc001.getProjCode()); // hppz015A.setProjCode(hppz015.getProjCode());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ015A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ015A().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -699,6 +699,23 @@ public class HPPZTools { ...@@ -699,6 +699,23 @@ public class HPPZTools {
AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param id
* @return
*/
public static HPPZ015 getId(String id) {
AssertUtils.isEmpty(id, "项目编码不能为空");
String companyCode = UserSessionUtils.getCompanyCode();
Map queryMap = new HashMap();
queryMap.put("id", id);
queryMap.put("companyCode", companyCode);
List<HPPZ015> results = DaoBase.getInstance().query(HPPZ015.QUERY, queryMap);
AssertUtils.isNull(results.get(0).getProjCode(), String.format("项目名[%s]信息不存在", id));
return results.get(0);
}
} }
/** /**
......
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