Example #1
0
 // 查询所有编号
 @RequestMapping(value = "/cxbh", method = RequestMethod.POST)
 public void cxbh(
     PrintWriter out,
     HttpServletResponse response,
     HttpServletRequest request,
     HttpSession session) {
   String strJson = "{\"total\":\"0\",\"rows\":[]}";
   try {
     htgl htgl = new htgl();
     List<Object[]> lstDaily = htglDao.cxbh(htgl);
     List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
     for (Object[] obj : lstDaily) {
       Map<String, Object> map = new HashMap<String, Object>();
       // 任务id
       map.put("Djid", obj[0]);
       // 任务编号
       map.put("Djhm", obj[1]);
       lstMap.add(map);
     }
     response.setContentType("text/json; charset=utf-8");
     response.setCharacterEncoding("UTF-8");
     String json = JSONUtils.toJson(lstMap);
     strJson = "{\"rows\":" + json + "}";
     out.println(strJson);
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
   System.out.println(strJson);
 }
Example #2
0
 // 下拉框
 @RequestMapping(value = "/fwjdxlk", method = RequestMethod.POST)
 public void fwjdxlk(
     PrintWriter out,
     HttpServletResponse response,
     HttpServletRequest request,
     HttpSession session) {
   String strJson = "{\"total\":\"0\",\"rows\":[]}";
   try {
     fwjd fwjd = new fwjd();
     List<Object[]> lstDaily = fwjdDao.fwjdByfwjd(fwjd);
     if (null != lstDaily && lstDaily.size() > 0) {
       List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
       for (Object[] obj : lstDaily) {
         Map<String, Object> map = new HashMap<String, Object>();
         // 服务阶段id
         map.put("fwjdid", obj[0]);
         // 服务阶段编号
         map.put("fwjdbh", obj[1]);
         // 服务阶段名称
         map.put("fwjdmc", obj[2]);
         lstMap.add(map);
       }
       response.setContentType("text/json; charset=utf-8");
       response.setCharacterEncoding("UTF-8");
       String json = JSONUtils.toJson(lstMap);
       strJson = "{\"rows\":" + json + "}";
     }
     out.println(strJson);
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
   System.out.println(strJson);
 }
Example #3
0
 // *************************************合同产品
 // 关联合同产品的查询
 @RequestMapping(value = "/cxhtcp", method = RequestMethod.POST)
 public void cxhtcp(
     PrintWriter out,
     HttpServletResponse response,
     HttpServletRequest request,
     HttpSession session,
     @RequestParam(value = "htglid", required = false) Long htglid) {
   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
   String strJson = "{\"total\":\"0\",\"rows\":[]}";
   try {
     htcp htcp = new htcp();
     htcp.setHtglid(htglid);
     List<Object[]> lstDaily = htglDao.cxhtcp(htcp);
     if (null != lstDaily && lstDaily.size() > 0) {
       List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
       for (Object[] obj : lstDaily) {
         Map<String, Object> map = new HashMap<String, Object>();
         //						id
         map.put("htcpid", obj[0]);
         //						产品编码
         map.put("cpbm", obj[1]);
         //						产品名称
         map.put("cpmc", obj[2]);
         //						规格型号
         map.put("ggxh", obj[3]);
         //						类别
         map.put("lb", obj[4]);
         //						数量
         map.put("sl", obj[5]);
         //						单价
         map.put("dj", obj[6]);
         //						金额
         map.put("je", obj[7]);
         //						备注
         map.put("bz", obj[8]);
         lstMap.add(map);
       }
       response.setContentType("text/json; charset=utf-8");
       response.setCharacterEncoding("UTF-8");
       String json = JSONUtils.toJson(lstMap);
       strJson = "{\"rows\":" + json + "}";
     }
     out.println(strJson);
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
   System.out.println(strJson);
 }
Example #4
0
 // *******************关联收款计划的增删改查
 // 关联收款计划的查询
 @RequestMapping(value = "/skjhcx", method = RequestMethod.POST)
 public void dzcx(
     PrintWriter out,
     HttpServletResponse response,
     HttpServletRequest request,
     HttpSession session,
     @RequestParam(value = "htglid", required = false) Long htglid) {
   String strJson = "{\"total\":\"0\",\"rows\":[]}";
   try {
     skjh skjh = new skjh();
     skjh.setHtglid(htglid);
     List<skjh> lstDaily = htglDao.skjhcx(skjh);
     if (null != lstDaily && lstDaily.size() > 0) {
       List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
       for (skjh skjh1 : lstDaily) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Map<String, Object> map = new HashMap<String, Object>();
         //							id
         map.put("skjhid", skjh1.getSkjhid());
         //							阶段
         map.put("skjhjd", skjh1.getSkjhjd());
         //							收款计划日期
         map.put("skjhskjhrq", sdf.format(skjh1.getSkjhskjhrq()));
         //							计划收款额
         map.put("skjhjhske", skjh1.getSkjhjhske());
         //							实际收款日期
         map.put("skjhsjskrq", sdf.format(skjh1.getSkjhsjskrq()));
         //							实际回款额
         map.put("skjhsjhke", skjh1.getSkjhsjhke());
         //							差额
         map.put("skjhce", skjh1.getSkjhce());
         //							备注
         map.put("skjhbz", skjh1.getSkjhbz());
         lstMap.add(map);
       }
       response.setContentType("text/json; charset=utf-8");
       response.setCharacterEncoding("UTF-8");
       String json = JSONUtils.toJson(lstMap);
       strJson = "{\"rows\":" + json + "}";
     }
     out.println(strJson);
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
   System.out.println(strJson);
 }
Example #5
0
  @RequestMapping(value = "/jsonList", method = RequestMethod.POST)
  public void jsonList(
      PrintWriter out,
      HttpServletResponse response,
      HttpServletRequest request,
      HttpSession session,
      @RequestParam(value = "page", required = false) Integer page,
      @RequestParam(value = "rows", required = false) Integer size) {
    Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
    // String flag = request.getParameter("flag").equals("") ? "1" : request.getParameter("flag");
    htglBean htglBean = new htglBean();
    // htglBean.sethtglzdry(sessionOperator.getOperatorNo());
    Integer iSizeNo = size == null ? 10 : size.intValue();
    Integer iPageNo = 0;
    page = page == null ? 0 : page;
    if (page > 0) {
      iPageNo = page;
    }
    String strJson = "{\"total\":\"0\",\"rows\":[]}";
    try {
      String strQuerySel =
          request.getParameter("sys_Contract_serch_roleType") == null
              ? ""
              : request.getParameter("sys_Contract_serch_roleType").toString();
      String strQueryKey =
          request.getParameter("sys_Contract_serch_roleCondition") == null
              ? ""
              : request.getParameter("sys_Contract_serch_roleCondition").toString();
      if ("1".equals(strQuerySel.trim())) {
        htglBean.setHtglhtbh(strQueryKey);
      }
      if ("2".equals(strQuerySel.trim())) {
        htglBean.setKhglmc(strQueryKey);
      }

      List<htglBean> lstDaily = htglService.htglfindhtglBeanByCondition(htglBean, iPageNo, iSizeNo);
      Long totalCount = htglService.counthtglBeanByCondition(htglBean);
      if (null != lstDaily && lstDaily.size() > 0) {

        List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
        for (htglBean htglBean1 : lstDaily) {
          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
          SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
          Map<String, Object> map = new HashMap<String, Object>();
          //					id
          map.put("htglid", htglBean1.getHtglid());
          //					单据日期
          map.put("htgldjrq", sdf.format(htglBean1.getHtgldjrq()));
          //					合同编号
          map.put("htglhtbh", htglBean1.getHtglhtbh());
          //					币别
          map.put("bbsdid", htglBean1.getBbsdid());
          // 币别编号
          map.put("bbsdbh", htglBean1.getBbsdbh());
          // 币别名称
          map.put("bbsdmc", htglBean1.getBbsdmc());
          // 币别别名
          map.put("bbsdbm", htglBean1.getBbsdbm());
          //					客户
          map.put("khglid", htglBean1.getKhglid());
          //					客户编号
          map.put("khglbh", htglBean1.getKhglbh());
          //					客户名称
          map.put("khglmc", htglBean1.getKhglmc());
          //					合同主题
          map.put("htglhtzt", htglBean1.getHtglhtzt());
          //					签约金额
          map.put("htglqyje", htglBean1.getHtglqyje());
          //					有效期开始时间
          map.put("htglyxqkssj", sdf.format(htglBean1.getHtglyxqkssj()));
          //					有效期结束时间
          map.put("htglyxqjssj", sdf.format(htglBean1.getHtglyxqjssj()));
          //					合同类型id
          map.put("htlxid", htglBean1.getHtlxid());
          //					合同类型编号
          map.put("htlxbh", htglBean1.getHtlxbh());
          //					合同类型名称
          map.put("htlxmc", htglBean1.getHtlxmc());
          //					已收金额
          map.put("htgljsje", htglBean1.getHtgljsje());
          //					业务人员
          map.put("ywryid", htglBean1.getYwryid());
          //					业务人员编号
          map.put("ywrybh", htglBean1.getYwrybh());
          //					业务人员名称
          map.put("ywrymc", htglBean1.getYwrymc());
          //					未收金额
          map.put("htglwsje", htglBean1.getHtglwsje());
          //					合同产品
          map.put("htglhtcp", htglBean1.getHtglhtcp());
          //					制单人员编号
          map.put("htglzdrybh", htglBean1.getHtglzdrybh());
          //					制单人员
          map.put("htglzdry", htglBean1.getHtglzdry());
          //					制单部门编号
          map.put("htglzdbmbh", htglBean1.getHtglzdbmbh());
          //					制单部门
          map.put("htglzdbm", htglBean1.getHtglzdbm());
          //					备注
          map.put("htglBz", htglBean1.getHtglBz());
          lstMap.add(map);
        }
        response.setContentType("text/json; charset=utf-8");
        response.setCharacterEncoding("UTF-8");
        String json = JSONUtils.toJson(lstMap);
        strJson = "{\"total\":\"" + totalCount + "\",\"rows\":" + json + "}";
        if ("4".equals(strQuerySel.trim())) {
          strJson = json;
        }
      }
      out.println(strJson);
    } catch (Exception e) {
      e.printStackTrace();
    }
    out.close();
    dailyLog.LogInfomation(
        sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "费用申请", "6");
    System.out.println(strJson);
  }
Example #6
0
 @RequestMapping(value = "/jsonListfwjd", method = RequestMethod.POST)
 public void jsonList(
     PrintWriter out,
     HttpServletResponse response,
     HttpServletRequest request,
     HttpSession session,
     @RequestParam(value = "page", required = false) Integer page,
     @RequestParam(value = "rows", required = false) Integer size) {
   Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
   fwjd fwjd = new fwjd();
   Integer iSizeNo = size == null ? 10 : size.intValue();
   Integer iPageNo = 0;
   page = page == null ? 0 : page;
   if (page > 0) {
     iPageNo = page;
   }
   String strJson = "{\"total\":\"0\",\"rows\":[]}";
   try {
     String strQuerySel =
         request.getParameter("sys_fwjd_serch_roleType") == null
             ? ""
             : request.getParameter("sys_fwjd_serch_roleType").toString();
     String strQueryKey =
         request.getParameter("sys_fwjd_serch_roleCondition") == null
             ? ""
             : request.getParameter("sys_fwjd_serch_roleCondition").toString();
     if ("1".equals(strQuerySel.trim())) {
       fwjd.setFwjdmc(strQueryKey);
     }
     if ("2".equals(strQuerySel.trim())) {
       fwjd.setFwjdbh(strQueryKey);
     }
     List<Object[]> lstDaily = fwjdService.fwjdfindfwjdByCondition(fwjd, iPageNo, iSizeNo);
     Long totalCount = fwjdService.countfwjdByCondition(fwjd);
     List<Map<String, Object>> lstMap = new ArrayList<Map<String, Object>>();
     if (null != lstDaily && lstDaily.size() > 0) {
       for (Object[] obj : lstDaily) {
         Map<String, Object> map = new HashMap<String, Object>();
         // 服务id
         map.put("fwjdid", obj[0]);
         // 服务编号
         map.put("fwjdbh", obj[1]);
         // 服务名称
         map.put("fwjdmc", obj[2]);
         // 服务状态
         map.put("fwjdzt", obj[3]);
         // 备注
         map.put("fwjdbz", obj[4]);
         lstMap.add(map);
       }
       response.setContentType("text/json; charset=utf-8");
       response.setCharacterEncoding("UTF-8");
       String json = JSONUtils.toJson(lstMap);
       strJson = "{\"total\":\"" + totalCount + "\",\"rows\":" + json + "}";
       if ("4".equals(strQuerySel.trim())) {
         strJson = json;
       }
     }
     out.println(strJson);
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
   dailyLog.LogInfomation(
       sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "服务阶段", "6");
   System.out.println(strJson);
 }