Exemple #1
0
 private Vector<Object> buildVectorData(CodeDictBean codeDictBean) {
   try {
     return ObjectUtils.createNewVecto(codeDictBean);
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   }
 }
Exemple #2
0
 private void saveUpdateData() {
   List<Map<String, Object>> datas = table.getSelectRowValue();
   if (CollectionUtils.isNotEmpty(datas)) {
     for (Map<String, Object> data : datas) {
       try {
         if (StringUtils.isEmpty(
             (Object) data.get(CodeDictColumnEnum.getCodeDictColumnValueByKey("id").getValue()))) {
           codeDictMapper.insertCodeDict(data);
         } else {
           codeDictMapper.updateCodeDict(data);
         }
       } catch (Exception e1) {
         e1.printStackTrace();
       }
     }
     SearchBean searchBean = new SearchBean();
     searchBean.setPageNumber(new Long(1));
     searchBean.setPageSize(new Long(15));
     getDatas(searchBean);
   } else {
     JOptionPane.showMessageDialog(null, "请先选择需要保存的数据!");
   }
 }