コード例 #1
0
 // 修改收款计划
 @RequestMapping(value = "/updatedzBean", method = RequestMethod.POST)
 public void updatedzBean(
     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();
     // id
     String skjhid = request.getParameter("skjhid");
     Long skjhid1 = Long.parseLong(skjhid);
     skjh.setSkjhid(skjhid1);
     //			阶段
     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 skjh1 = htglDao.getskjhid(skjhid1);
     skjh.setHtglid(skjh1.getHtglid());
     dailyLog.LogInfomation(
         sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "任务管理", "3");
     htglService.updateskjh(skjh);
     out.println("{success:true}");
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
 }
コード例 #2
0
 // 收款计划的删除
 @RequestMapping(value = "/removeskjhid", method = RequestMethod.POST)
 public void removeskjhid(
     PrintWriter out,
     HttpServletRequest request,
     @RequestParam(value = "skjhid", required = false) Long skjhid) {
   try {
     Operator sessionOperator = (Operator) request.getSession().getAttribute("obj_login_operator");
     if (null == skjhid) {
       throw new ParametersException("");
     }
     dailyLog.LogInfomation(
         sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "费用申请", "4");
     htglService.removeskjhid(skjhid);
     out.print("{\"errmsg\":\"true\"}");
   } catch (Exception e) {
     System.out.println(e);
   }
 }
コード例 #3
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);
  }
コード例 #4
0
  // 修改合同管理
  @RequestMapping(value = "/updatehtgl", method = RequestMethod.POST)
  public void updatehtgl(
      HttpServletRequest request,
      PrintWriter out,
      HttpSession session,
      @RequestParam(value = "bbsdid", required = false) Long bbsdid,
      @RequestParam(value = "khglid", required = false) Long khglid,
      @RequestParam(value = "htlxid", required = false) Long htlxid,
      @RequestParam(value = "ywryid", required = false) Long ywryid) {
    try {
      Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
      htgl htgl = new htgl();
      // id
      String htglid = request.getParameter("htglid");
      Long htglid1 = Long.parseLong(htglid);
      htgl.setHtglid(htglid1);
      //			单据日期
      String htgldjrq = request.getParameter("htgldjrq");
      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
      Date htgldjrq1 = sdf.parse(htgldjrq);
      htgl.setHtgldjrq(htgldjrq1);
      //			合同编号
      String htglhtbh = request.getParameter("htglhtbh");
      htgl.setHtglhtbh(htglhtbh);
      // 币别名称
      String bbsdmc = request.getParameter("bbsdmc");
      if (isNum(bbsdmc)) {
        Long bbsdmc1 = Long.parseLong(bbsdmc);
        htgl.setBbsdid(bbsdmc1);
      } else {
        htgl.setBbsdid(bbsdid);
      }

      // 客户名称
      String khglmc = request.getParameter("khglmc");
      if (isNum(khglmc)) {
        Long khglmc1 = Long.parseLong(khglmc);
        htgl.setKhglid(khglmc1);
      } else {
        htgl.setKhglid(khglid);
      }
      // 合同主题
      String htglhtzt = request.getParameter("htglhtzt");
      htgl.setHtglhtzt(htglhtzt);
      //			签约金额
      String htglqyje = request.getParameter("htglqyje");
      htgl.setHtglqyje(htglqyje);
      //			有效期开始时间
      String htglyxqkssj = request.getParameter("htglyxqkssj");
      Date htglyxqkssj1 = sdf.parse(htglyxqkssj);
      htgl.setHtglyxqkssj(htglyxqkssj1);
      //			有效期结束时间
      String htglyxqjssj = request.getParameter("htglyxqjssj");
      Date htglyxqjssj1 = sdf.parse(htglyxqjssj);
      htgl.setHtglyxqjssj(htglyxqjssj1);
      //			合同类型名称
      String htlxmc = request.getParameter("htlxmc");
      if (isNum(htlxmc)) {
        Long htlxmc1 = Long.parseLong(htlxmc);
        htgl.setHtlxid(htlxmc1);
      } else {
        htgl.setHtlxid(htlxid);
      }

      //			已收金额
      String htgljsje = request.getParameter("htgljsje");
      htgl.setHtgljsje(htgljsje);
      //			业务人员名称
      String ywrymc = request.getParameter("ywrymc");
      if (isNum(ywrymc)) {
        Long ywrymc1 = Long.parseLong(ywrymc);
        htgl.setYwryid(ywrymc1);
      } else {
        htgl.setYwryid(ywryid);
      }

      //			未收金额
      String htglwsje = request.getParameter("htglwsje");
      htgl.setHtglwsje(htglwsje);
      // 合同产品
      String htglhtcp = request.getParameter("htglhtcp");
      htgl.setHtglhtcp(htglhtcp);
      // 制单人员编号
      String htglzdrybh = request.getParameter("htglzdrybh");
      htgl.setHtglzdrybh(htglzdrybh);
      //			制单人员
      String htglzdry = request.getParameter("htglzdry");
      htgl.setHtglzdry(htglzdry);
      //			制单部门编号
      String htglzdbmbh = request.getParameter("htglzdbmbh");
      htgl.setHtglzdbmbh(htglzdbmbh);
      //			制单部门
      String htglzdbm = request.getParameter("htglzdbm");
      htgl.setHtglzdbm(htglzdbm);
      //			备注
      String htglBz = request.getParameter("htglBz");
      htgl.setHtglBz(htglBz);
      // 编号标记
      htgl htgl1 = htglDao.gethtglid(htglid1);
      htgl.setHtglhtbhbj(htgl1.getHtglhtbhbj());
      htglService.updatehtgl(htgl);
      dailyLog.LogInfomation(
          sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "费用申请", "5");
      out.println("{success:true}");
    } catch (Exception e) {
      e.printStackTrace();
    }
    out.close();
  }