Beispiel #1
0
 // 查询所有
 public void selAll(HttpServletRequest request, HttpServletResponse response) {
   Queryinfo queryinfo = getQueryinfo(request);
   queryinfo.setType(Feedback.class);
   queryinfo.setQuery(getQuerysql(queryinfo.getQuery()));
   queryinfo.setOrder(FeedbackPoco.ORDER);
   Pageinfo pageinfo = new Pageinfo(0, selAll(queryinfo));
   result = CommonConst.GSON.toJson(pageinfo);
   responsePW(response, result);
 }
Beispiel #2
0
 // 导入
 public void impAll(HttpServletRequest request, HttpServletResponse response) {
   Fileinfo fileinfo = FileUtil.upload(request, 0, null, FeedbackPoco.NAME, "impAll");
   String json = FileUtil.impExcel(fileinfo.getPath(), FeedbackPoco.FIELDNAME);
   if (CommonUtil.isNotEmpty(json)) cuss = CommonConst.GSON.fromJson(json, TYPE);
   for (Feedback temp : cuss) {
     if (CommonUtil.isNull(temp.getFeedbackid())) temp.setFeedbackid(CommonUtil.getNewId());
     result = insSingle(temp);
   }
   responsePW(response, result);
 }
Beispiel #3
0
 // 将json转换成cuss
 public void json2cuss(HttpServletRequest request) {
   String json = request.getParameter("json");
   System.out.println("json : " + json);
   if (CommonUtil.isNotEmpty(json)) cuss = CommonConst.GSON.fromJson(json, TYPE);
 }