示例#1
0
 /**
  * 根据类型,得到数据字典表DIC_APP_ASSET_STATE里的数据
  *
  * @return
  */
 public List queryDicAppAssetState(String type) {
   String sql = "SELECT T.NAME FROM DIC_APP_ASSET_STATE T WHERE T.TYPE = ?";
   String[] strs = new String[1];
   strs[0] = type;
   List list = publicDao.queryForList(sql, strs);
   return list;
 }
示例#2
0
 /**
  * 根据类型,得到数据字典表INDIVIDUALTREE里的数据,
  *
  * @return
  */
 public List queryIndividualtree(String type) {
   String sql = "SELECT T.CATEGORYNAME FROM INDIVIDUALTREE T WHERE T.PARENTCATEGORYID = ?";
   String[] strs = new String[1];
   strs[0] = type;
   List list = publicDao.queryForList(sql, strs);
   return list;
 }
示例#3
0
  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();
    }
  }