예제 #1
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;
 }
예제 #2
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;
 }
예제 #3
0
 /**
  * 卡片调配,通过资产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;
 }
예제 #4
0
 public Cardinfo findCardinfoByCardCode(String cardcode) {
   String hql = "from Cardinfo x where x.cardcode = ?";
   List params = new ArrayList();
   params.add(cardcode);
   Cardinfo xx = new Cardinfo();
   List cardinfoList = publicDao.find(hql, params);
   if (cardinfoList != null && cardinfoList.size() > 0) {
     xx = (Cardinfo) cardinfoList.get(0);
   }
   return xx;
 }
예제 #5
0
 /**
  * 保存新增卡片表头
  *
  * @param caShead
  */
 public void save(CaShead caShead) {
   publicDao.save(caShead);
 }
예제 #6
0
 /**
  * 更新新增卡片表体
  *
  * @param LcCardtemp
  */
 public void update(LcCardtemp lcCardtemp) {
   publicDao.update(lcCardtemp);
 }
예제 #7
0
 /** 保存办理依据 */
 public void saveCA(CommonAccording ca) {
   publicDao.save(ca);
 }
예제 #8
0
 /**
  * 根据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);
 }
예제 #9
0
 /**
  * 删除新增卡片表头
  *
  * @param CaShead
  */
 public void delete(CaShead caShead) {
   publicDao.delete(caShead);
 }
예제 #10
0
 /**
  * 删除合并前的卡片,合并后的连同一起删掉
  *
  * @param bodyId
  */
 public void deleteMerge(String bodyId) {
   String sql = "delete from lc_cardtemp where id = '" + bodyId + "'";
   publicDao.getJdbcTemplate().execute(sql);
 }
예제 #11
0
 /**
  * 根据处理单ID查询该处理单下所有卡片信息
  *
  * @param id
  */
 public List findLcCardtempsBySheadId(String id) {
   Long[] strs = new Long[1];
   strs[0] = Long.valueOf(id);
   return publicDao.find("from LcCardtemp o where o.kpxzid = ?", strs);
 }
예제 #12
0
 /**
  * 根据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);
 }
예제 #13
0
 /**
  * 通过headId 删除body
  *
  * @param headId
  */
 public void deleteBodys(String headId) {
   String sql = "delete from lc_cardtemp where kpxzid = " + Long.parseLong(headId);
   publicDao.getJdbcTemplate().execute(sql);
 }
예제 #14
0
 /**
  * 删除一条新增卡片表体
  *
  * @param LcCardtemp
  */
 public void delete(LcCardtemp lcCardtemp) {
   publicDao.delete(lcCardtemp);
 }
예제 #15
0
 /**
  * 更新新增卡片表头
  *
  * @param CaShead
  */
 public void update(CaShead caShead) {
   publicDao.update(caShead);
 }
예제 #16
0
 /**
  * 删除卡片拆分后的body
  *
  * @param boxId
  */
 public void deleteSplits(String[] boxId) {
   for (int i = 0; i < boxId.length; i++) {
     String sql = "delete from lc_cardtemp where boxid = '" + boxId[i] + "'";
     publicDao.getJdbcTemplate().execute(sql);
   }
 }
예제 #17
0
 /** 根据卡片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);
 }
예제 #18
0
 /**
  * 根据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);
 }
예제 #19
0
 /** 删除多条变动记录 */
 public void deleteRecord(String[] bodyId) {
   for (int i = 0; i < bodyId.length; i++) {
     String sql = "delete from recordhistory where zc_id = '" + bodyId[i] + "'";
     publicDao.getJdbcTemplate().execute(sql);
   }
 }
예제 #20
0
 /**
  * 根据临时表id,处理单id 查询变动表数据集合
  *
  * @param bodyId
  * @param headId
  * @return
  */
 public List findRecordsBybodyId(String bodyId, String headId) {
   List list = new ArrayList();
   String sql = "from Recordhistory re where re.zcId = ? and re.pkId = ?";
   list = publicDao.find(sql, new Object[] {bodyId, headId});
   return list;
 }
예제 #21
0
 /** 添加变动记录信息 */
 public void saveRecord(Recordhistory record) {
   publicDao.save(record);
 }
예제 #22
0
 /**
  * 保存新增卡片表体
  *
  * @param KpCardtemp
  */
 public void save(LcCardtemp lcCardtemp) {
   publicDao.save(lcCardtemp);
 }
예제 #23
0
 /** 修改变动记录信息 */
 public void updateRecord(Recordhistory record) {
   publicDao.update(record);
 }
예제 #24
0
 /**
  * 通过办理依据的id查找办理依据
  *
  * @param id
  * @return
  */
 public CommonAccording findAccordingById(String id) {
   CommonAccording ca = publicDao.findById(CommonAccording.class, id);
   return ca;
 }
예제 #25
0
 /** 根据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);
 }
예제 #26
0
 /**
  * 保存新增卡片表体并返回id
  *
  * @param KpCardtemp
  */
 public String saveBody(LcCardtemp lcCardtemp) {
   return publicDao.save(lcCardtemp).toString();
 }
예제 #27
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();
    }
  }