Exemplo n.º 1
0
  // 添加收款计划
  @RequestMapping(value = "/adddzBean", method = RequestMethod.POST)
  public void adddzBean(
      HttpServletRequest request,
      PrintWriter out,
      HttpSession session,
      @RequestParam(value = "htglid", required = false) Long htglid) {
    try {
      Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
      skjh skjh = new skjh();
      //			阶段
      String skjhjd = request.getParameter("skjhjd");
      skjh.setSkjhjd(skjhjd);
      //			收款计划日期
      String skjhskjhrq = request.getParameter("skjhskjhrq");
      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
      Date skjhskjhrq1 = sdf.parse(skjhskjhrq);
      skjh.setSkjhskjhrq(skjhskjhrq1);
      //			计划收款额
      String skjhjhske = request.getParameter("skjhjhske");
      skjh.setSkjhjhske(skjhjhske);
      //			实际收款日期
      String skjhsjskrq = request.getParameter("skjhsjskrq");
      Date skjhsjskrq1 = sdf.parse(skjhsjskrq);
      skjh.setSkjhsjskrq(skjhsjskrq1);
      //			实际回款额
      String skjhsjhke = request.getParameter("skjhsjhke");
      skjh.setSkjhsjhke(skjhsjhke);
      //			差额
      String skjhce = request.getParameter("skjhce");
      skjh.setSkjhce(skjhce);
      //			备注
      String skjhbz = request.getParameter("skjhbz");
      skjh.setSkjhbz(skjhbz);
      // 合同管理
      skjh.setHtglid(htglid);

      dailyLog.LogInfomation(
          sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "任务管理", "3");
      htglService.addskjh(skjh);
      out.println("{success:true}");
    } catch (Exception e) {
      e.printStackTrace();
    }
    out.close();
  }
Exemplo n.º 2
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);
 }