예제 #1
0
  /**
   * @MethodName: modifyCustomerDoc @Description:
   *
   * @param ID
   * @param KHZLMC
   * @param KHZLLB
   * @param R_CUSTOMER_ID
   * @param KHZLFJ
   * @param DLSZJYXQ
   * @param STATUS
   * @param model
   * @return
   * @throws Exception
   * @author liusw
   */
  @RequestMapping("modifyCustomerDoc")
  public void modifyCustomerDoc(
      @RequestParam(value = "id", defaultValue = "0") Integer ID,
      @RequestParam(value = "khzlmc", defaultValue = "") String KHZLMC,
      @RequestParam(value = "khzllb", defaultValue = "0") Integer KHZLLB,
      @RequestParam(value = "r_customer_id", defaultValue = "0") Integer R_CUSTOMER_ID,
      @RequestParam(value = "khzlfj", defaultValue = "") String KHZLFJ,
      @RequestParam(value = "dlszjyxq", defaultValue = "") Date DLSZJYXQ,
      @RequestParam(value = "status", defaultValue = "1") Integer STATUS,
      ModelMap model,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
    CustomerDocEntity customerdoc = new CustomerDocEntity();
    customerdoc.setId(ID);
    customerdoc.setKhzlmc(KHZLMC);
    customerdoc.setKhzllb(KHZLLB);
    customerdoc.setR_customer_id(R_CUSTOMER_ID);
    customerdoc.setKhzlfj(KHZLFJ);
    customerdoc.setDlszjyxq(DLSZJYXQ);
    customerdoc.setStatus(STATUS);
    List<String> messages = customerdocService.modifyCustomerDoc(customerdoc, multipartRequest);
    JSONObject json = new JSONObject();
    json.put("success", null == messages ? true : false);
    json.put("messages", messages);
    response.setStatus(200);
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.write(json.toString());
  }
예제 #2
0
  /**
   * @MethodName: listCustomers @Description:
   *
   * @param modelMap
   * @param request
   * @return
   * @throws Exception
   * @author liusw
   */
  @RequestMapping("listCustomers")
  public String listCustomers(ModelMap modelMap, HttpServletRequest request) throws Exception {

    List<Map<String, Object>> customerList = customerdocService.listCustomers();

    modelMap.put("dataList", customerList);
    return "jsonView";
  }
예제 #3
0
  /**
   * @MethodName: getCustomerDocDetail @Description:
   *
   * @param modelMap
   * @param id
   * @return
   * @throws Exception
   * @author liusw
   */
  @RequestMapping("getCustomerDocDetail")
  public String getCustomerDocDetail(
      ModelMap modelMap, @RequestParam(value = "id", defaultValue = "") Integer id)
      throws Exception {

    CustomerDocDto customerdocdto = customerdocService.getCustomerDocDetail(id);
    modelMap.put("data", customerdocdto);
    return "jsonView";
  }
예제 #4
0
  /**
   * @MethodName: deleteCustomerDoc @Description:
   *
   * @param ids
   * @param model
   * @return
   * @throws SQLException
   * @author liusw
   */
  @RequestMapping("deleteCustomerDoc")
  public String deleteCustomerDoc(
      @RequestParam(value = "ids", defaultValue = "") String ids, ModelMap model)
      throws SQLException {

    List<String> messages = customerdocService.deleteCustomerDoc(ids);
    model.put("success", null == messages ? true : false);
    model.put("messages", messages);
    return "jsonView";
  }
예제 #5
0
  /**
   * @MethodName: listCustomerDocs @Description:
   *
   * @param start
   * @param limit
   * @param customer
   * @param request
   * @param user
   * @param modelMap
   * @return
   * @throws Exception
   * @author liusw
   */
  @RequestMapping("listCustomerDocs/{docType}")
  public String listCustomerDocs(
      @PathVariable(value = "docType") Integer docType, // 3表示客户的资料,其他表示代理商
      @RequestParam(value = "start", defaultValue = "0") Integer start,
      @RequestParam(value = "limit", defaultValue = "15") Integer limit,
      CustomerDocEntity customerdoc,
      HttpServletRequest request,
      UserDto user,
      ModelMap modelMap)
      throws Exception {
    ListPager pager = new ListPager();
    Integer pageNo = (start / limit);
    pager.setRowsPerPage(limit);
    pager.setPageNo(pageNo);

    List<CustomerDocDto> customerdocList =
        customerdocService.listCustomerDocs(customerdoc, docType, pager);
    modelMap.put("dataList", customerdocList);
    modelMap.put("totalCount", pager.getTotalRows());

    return "jsonView";
  }