示例#1
0
 // 添加
 @RequestMapping(value = "/addfwjdBean", method = RequestMethod.POST)
 public void addfwjd(HttpServletRequest request, PrintWriter out, HttpSession session) {
   try {
     Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
     fwjd fwjd = new fwjd();
     // 编号
     String fwjdbh = request.getParameter("fwjdbh");
     fwjd.setFwjdbh(fwjdbh);
     // 名称
     String fwjdmc = request.getParameter("fwjdmc");
     fwjd.setFwjdmc(fwjdmc);
     // 状态
     String fwjdzt = request.getParameter("fwjdzt");
     Long fwjdzt1 = Long.parseLong(fwjdzt);
     fwjd.setFwjdzt(fwjdzt1);
     // 备注
     String fwjdbz = request.getParameter("fwjdbz");
     fwjd.setFwjdbz(fwjdbz);
     dailyLog.LogInfomation(
         sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "服务阶段", "3");
     fwjdService.addfwjd(fwjd);
     out.println("{success:true}");
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
 }
示例#2
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();
 }
示例#3
0
 // 修改合同产品
 @RequestMapping(value = "/updatehtcp", method = RequestMethod.POST)
 public void updatehtcp(HttpServletRequest request, PrintWriter out, HttpSession session) {
   try {
     Operator sessionOperator = (Operator) session.getAttribute("obj_login_operator");
     htcp htcp = new htcp();
     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
     // id
     String htcpid = request.getParameter("htcpid");
     Long htcpid1 = Long.parseLong(htcpid);
     htcp.setHtcpid(htcpid1);
     //		产品编码
     String cpbm = request.getParameter("cpbm");
     htcp.setCpbm(cpbm);
     //		产品名称
     String cpmc = request.getParameter("cpmc");
     htcp.setCpmc(cpmc);
     //		规格型号
     String ggxh = request.getParameter("ggxh");
     htcp.setGgxh(ggxh);
     //		类别
     String lb = request.getParameter("lb");
     htcp.setLb(lb);
     //		数量
     String sl = request.getParameter("sl");
     htcp.setSl(sl);
     //		单价
     String dj = request.getParameter("dj");
     htcp.setDj(dj);
     //		金额
     String je = request.getParameter("je");
     htcp.setJe(je);
     //		备注
     String bz = request.getParameter("bz");
     htcp.setBz(bz);
     // 合同管理
     htcp htcp1 = htglDao.gethtcpid(htcpid1);
     htcp.setHtglid(htcp1.getHtglid());
     dailyLog.LogInfomation(
         sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "合同管理", "3");
     htglDao.updatehtcp(htcp);
     out.println("{success:true}");
   } catch (Exception e) {
     e.printStackTrace();
   }
   out.close();
 }
示例#4
0
 // 合同产品的删除
 @RequestMapping(value = "/removehtcpid", method = RequestMethod.POST)
 public void removehtcpid(
     PrintWriter out,
     HttpServletRequest request,
     @RequestParam(value = "htcpid", required = false) Long htcpid) {
   try {
     Operator sessionOperator = (Operator) request.getSession().getAttribute("obj_login_operator");
     if (null == htcpid) {
       throw new ParametersException("");
     }
     dailyLog.LogInfomation(
         sessionOperator.getEmployeeId(), sessionOperator.getOperatorId(), "费用申请", "4");
     htglDao.removehtcpid(htcpid);
     out.print("{\"errmsg\":\"true\"}");
   } catch (Exception e) {
     System.out.println(e);
   }
 }
示例#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);
  }
示例#6
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();
  }
示例#7
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);
 }