/** * 卡片调配,通过资产id查找资产信息 * * @return */ public JyzcXx findJyzcXxByZcId(String zcId) { String[] strs = new String[1]; strs[0] = zcId; JyzcXx xx = (JyzcXx) publicDao.findSingleResult( "from JyzcXx x where x.id = ?", strs); // publicDao.findById(JyzcXx.class, zcId); return xx; }
/** * 根据ID查询新增卡片表头信息 * * @param id */ public CaShead findCaSheadById(String id) { Long[] strs = new Long[1]; strs[0] = Long.valueOf(id); return (CaShead) publicDao.findSingleResult("from CaShead o where o.id = ?", strs); }
/** * 根据id,得到数据字典表INDIVIDUALTREE里的数据, * * @return */ public Individualtree getIndividualtreeById(String id) { String sql = "from Individualtree t where t.categoryid = ?"; String[] strs = new String[1]; strs[0] = id; return (Individualtree) publicDao.findSingleResult(sql, strs); }
/** 根据bodyId查找record记录 */ public Recordhistory findRecordBybodyId(String bodyId) { String[] strs = new String[1]; strs[0] = bodyId; return (Recordhistory) publicDao.findSingleResult("from Recordhistory re where re.zcId = ?", strs); }
/** 根据卡片id查询卡片信息 */ public Cardinfo findCardinfoByCardId(String cardId) { Long[] strs = new Long[1]; strs[0] = Long.valueOf("null".equals(cardId) ? "0" : cardId); return (Cardinfo) publicDao.findSingleResult("from Cardinfo ci where ci.id = ?", strs); }
/** * 根据ID查询新增卡片表体信息 * * @param id */ public LcCardtemp findLcCardtempById(String id) { Long[] strs = new Long[1]; strs[0] = Long.valueOf(id); return (LcCardtemp) publicDao.findSingleResult("from LcCardtemp o where o.id = ?", strs); }
public static void QuerySpState( PublicDao dao, PTTodoBS ptBs, WorkflowBS workflowBS, IERPCommonUCC erpCommonUCC, ICardQueryUCC cardQueryUCCImpl, String erpNotice) { try { String sql = "select t.fbyz ,t.erpcode ,t.eamcode from erp_cardcfsend t where t.sfcode is null"; List list = dao.queryForList(sql, new ArrayList()); if (list.size() > 0) { for (int i = 0; i < list.size(); i++) { Map erp = (Map) list.get(i); StringBuffer erpxml = new StringBuffer(); String billid = (String) erp.get("fbyz"); String billcode = (String) erp.get("erpcode"); String eamcode = (String) erp.get("eamcode"); erpxml.append(Comment_SplitSpd.CardReduceHead()); erpxml.append(Comment_SplitSpd.ufdQueryhead()); erpxml.append(Comment_SplitSpd.QuerybillHead(billid, billcode)); // 得到发送xml的头信息 erpxml.append(Comment_SplitSpd.geterpcode(billid, billcode, dao)); // 得到erpcode erpxml.append(Comment_SplitSpd.Querybillend()); erpxml.append(Comment_SplitSpd.esbend()); String input = new Comment().sender(erpxml); // 拼装xml后返回信息 CaShead pojo1 = (CaShead) dao.findSingleResult( "from CaShead t where t.id = ?", new Object[] { Long.parseLong(eamcode) }); // add by lantianbo 2010-12-01根据表单号,得到表单信息, // 插入erp_history表,备份发送记录 if (pojo1 != null) { new OA_Database() .insertClob( pojo1.getId().toString(), String.valueOf(pojo1.getId()), pojo1.getNgrmc(), pojo1.getBdlx() // TODO 这个需要确认 , String.valueOf(erpxml), String.valueOf(input), dao); } Comment_SplitSpd.Queryspstate( Comment.geterp(input, "<ufinterface", "</ufinterface>"), dao, ptBs, workflowBS, erpCommonUCC, cardQueryUCCImpl, erpNotice); // 返回信息操作主方法 } } // session.close(); } catch (Exception ex) { ex.printStackTrace(); } }