Ejemplo n.º 1
0
 public String queryDicValueJson(Map param) {
   // TODO Auto-generated method stub
   List list = dicValueDao.queryDicValueList(param);
   String result = "";
   if (list != null && list.size() != 0) {
     SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     result = "[";
     for (int i = 0; i < list.size(); i++) {
       Map dicValue = (Map) list.get(i);
       //				result+="{id :\""+org.getId()+"\", pId :\""+org.getParentId()+"\",
       // name:\""+org.getOrgName()+"\",parentName:\""+org.getParentName()+"\",orgCode:\""+org.getOrgCode()+"\",orgType:\""+org.getOrgType()+"\",orgIs:\""+org.getIsEffective()+"\",time1:\""+org.getCreateTime()+"\",time2:\""+org.getModifyTime()+"\",spell:\""+org.getChSpell()+"\",ord:\""+org.getDisplayOrder()+"\",isParent:true}";
       result +=
           "{id :\""
               + dicValue.get("ID")
               + "\", pId :\""
               + dicValue.get("PARENT_ID")
               + "\", name:\""
               + dicValue.get("DIC_VALUE_NAME")
               + "\",parentName:\""
               + dicValue.get("PARENT_NAME")
               + "\",dicValueCode:\""
               + dicValue.get("DIC_VALUE_CODE")
               + "\",is_effective:\""
               + dicValue.get("IS_EFFECTIVE")
               + "\",creatTime:\""
               + (dicValue.get("CREATE_TIME") != null
                   ? format.format(dicValue.get("CREATE_TIME"))
                   : "")
               + "\",lastTime:\""
               + (dicValue.get("MODIFY_TIME") != null
                   ? format.format(dicValue.get("MODIFY_TIME"))
                   : "")
               + "\",ord:\""
               + dicValue.get("DISPLAY_ORDER")
               + "\",isParent:";
       if (Integer.valueOf(String.valueOf(dicValue.get("NUM"))) > 1) {
         result += "true";
       } else {
         result += "false";
       }
       result += "}";
       result += ",";
     }
     result = result.substring(0, result.length() - 1);
     result += "]";
   }
   return result;
 }
Ejemplo n.º 2
0
 @Override
 public String selectXzqhJson(Map param) {
   // TODO Auto-generated method stub
   ConfigUtil configUtil = new ConfigUtil();
   String dicTypeId = configUtil.getString("dicTypeId");
   param.put("dicTypeId", dicTypeId);
   List list = dicValueDao.queryDicValueList(param);
   String result = "";
   if (list != null && list.size() != 0) {
     result = "[";
     for (int i = 0; i < list.size(); i++) {
       Map xzqh = (Map) list.get(i);
       result +=
           "{id :\""
               + xzqh.get("ID")
               + "\", pId :\""
               + xzqh.get("PARENT_ID")
               + "\", name:\""
               + xzqh.get("DIC_VALUE_NAME")
               + "\",code:\""
               + xzqh.get("DIC_VALUE_CODE")
               + "\",ord:\""
               + xzqh.get("DISPLAY_ORDER")
               + "\",isParent:";
       if (Integer.valueOf(String.valueOf(xzqh.get("NUM"))) > 1) {
         result += "true";
       } else {
         result += "false";
       }
       result += "}";
       result += ",";
     }
     result = result.substring(0, result.length() - 1);
     result += "]";
   }
   return result;
 }
Ejemplo n.º 3
0
 public List selectDicValueList(Map param) {
   // TODO Auto-generated method stub
   return dicValueDao.queryDicValueList(param);
 }
Ejemplo n.º 4
0
 public List queryDicValue(Map param) {
   // TODO Auto-generated method stub
   List dicValueList = dicValueDao.queryDicValueList(param);
   return dicValueList;
 }