コード例 #1
0
 public String filedutyofficerDelete() throws Exception {
   SqlSession sqlSession = null;
   try {
     sqlSession = DbSessionFactory.getOracleSession();
     if (!"".equals(checkedIds)) {
       String[] arrUuids;
       arrUuids = checkedIds.split("%2C");
       C_T_SYS_FiledutyofficerExample example = new C_T_SYS_FiledutyofficerExample();
       C_T_SYS_FiledutyofficerMapper mapper =
           sqlSession.getMapper(C_T_SYS_FiledutyofficerMapper.class);
       for (String tempUuid : arrUuids) {
         example.or().andFiledutyofficerIdEqualTo(tempUuid);
       }
       mapper.deleteByExample(example);
     }
     jsonResult = Constants.DISP_OPERATION_SUCCESSFUL;
     sqlSession.commit();
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return ERROR;
   } finally {
     if (sqlSession != null) {
       sqlSession.close();
       sqlSession = null;
     }
   }
   allPermission = "*";
   return SUCCESS;
 }
コード例 #2
0
 public String filedutyofficer() throws Exception {
   SqlSession sqlSession = null;
   try {
     sqlSession = DbSessionFactory.getOracleSession();
     int rowCount;
     Sort sort;
     Limit limit;
     C_T_SYS_FiledutyofficerMapper mapper =
         sqlSession.getMapper(C_T_SYS_FiledutyofficerMapper.class);
     C_T_SYS_FiledutyofficerExample example = new C_T_SYS_FiledutyofficerExample();
     Criteria criteria = example.createCriteria();
     if (NameS != null && !"".equals(NameS.trim())) {
       criteria.andFiledutyofficerNameLike("%" + NameS + "%");
     }
     rowCount = mapper.countByExample(example);
     limit = DbOperationFation.GetECSideInfo(rowCount);
     if (rowCount != 0) {
       criteria.setLimitValue(limit.getRowStart() + 1, limit.getRowEnd());
     }
     sort = limit.getSort();
     if (sort.getAlias() != null) {
       example.setOrderByClause(sort.getAlias() + " " + sort.getSortOrder());
     } else {
       example.setOrderByClause("sort");
     }
     example.or(criteria);
     list_C_T_SYS_Filedutyofficer = mapper.selectByExample(example);
     sqlSession.commit();
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return ERROR;
   } finally {
     if (sqlSession != null) {
       sqlSession.close();
       sqlSession = null;
     }
   }
   allPermission = "*";
   // allPermission =
   // WorkflowengineCommon.GetAllPermissions("module03010405",filetypeId,sqlSession);
   return SUCCESS;
 }