admin
2019-01-28 127ab9cfe99f1f655219c7511842408c078e9445
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -1,7 +1,9 @@
package com.yeshi.fanli.controller.admin;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -307,6 +309,12 @@
      /* 拒绝提现 操作 */
      try {
         reason = URLDecoder.decode(reason, "UTF-8");
      } catch (Exception e1) {
         e1.printStackTrace();
      }
      try {
         Extract extract = extractService.getExtractById(id);
         long extractTime = extract.getExtractTime();
         extractService.rejectExtract(id, reason, extractTime, admin);// 提现失败
@@ -380,7 +388,6 @@
      
      // 累计已提现金额总计:已提现成功的总额/ 次数
      Map<String, Object> resultData = extractCountService.countTotalSuccess();
      
      JSONObject data = new JSONObject();
      data.put("todayCount", totalcount);
@@ -1450,21 +1457,27 @@
      }
   }
   /**
    * 统计审核次数 
    *
    * @param callback
    * @param state 审核状态:所有-3  通过-1  拒绝- 2
    * @param type 统计类型  1-24小时  2-所有3
    * @param dateType 类型  1日  2月  3年
    * @param year 2018
    * @param startTime 2018-12-01
    * @param endTime   2018-12-01
    * @param state
    *            审核状态:所有-3 通过-1 拒绝- 2
    * @param type
    *            统计类型 1-24小时 2-所有3
    * @param dateType
    *            类型 1日 2月 3年
    * @param year
    *            2018
    * @param startTime
    *            2018-12-01
    * @param endTime
    *            2018-12-01
    * @param out
    */
   @RequestMapping(value = "getAuditTotal")
   public void getAuditTotal(String callback, String stateArray, Integer dateType, String year,
         String startTime, String endTime, PrintWriter out) {
   public void getAuditTotal(String callback, String stateArray, Integer dateType, String year, String startTime,
         String endTime, PrintWriter out) {
      String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
      if (validateMsg != null) {
@@ -1497,7 +1510,8 @@
         List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
         
         Gson gson = new Gson();
         List<Integer> stateList = gson.fromJson(stateArray, new TypeToken<ArrayList<Integer>>() {}.getType());
         List<Integer> stateList = gson.fromJson(stateArray, new TypeToken<ArrayList<Integer>>() {
         }.getType());
         JSONArray line_list = new JSONArray();
         for (Integer state: stateList) {
@@ -1510,9 +1524,8 @@
               innerList.put("name", "驳回数");
            }
            
            List<Map<String, Object>> list = extractAuditRecordService.countAuditTotal(state, dateType,
                  year, startTime, endTime);
            List<Map<String, Object>> list = extractAuditRecordService.countAuditTotal(state, dateType, year,
                  startTime, endTime);
            
            if (dateType != 3) {
               innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType,dateList, list)));
@@ -1546,20 +1559,25 @@
      }
   }
   
   /**
    * 统计提现申请总额
    *
    * @param callback
    * @param type 统计类型  1-24小时  2-所有
    * @param dateType 类型  1日  2月  3
    * @param year 2018
    * @param startTime 2018-12-01
    * @param endTime   2018-12-01
    * @param type
    *            统计类型 1-24小时 2-所有
    * @param dateType
    *            类型 1日 2月 3
    * @param year
    *            2018
    * @param startTime
    *            2018-12-01
    * @param endTime
    *            2018-12-01
    * @param out
    */
   @RequestMapping(value = "getExtractApplyMoney")
   public void getExtractApplyMoney(String callback, Integer dateType, String year,
         String startTime, String endTime, PrintWriter out) {
   public void getExtractApplyMoney(String callback, Integer dateType, String year, String startTime, String endTime,
         PrintWriter out) {
      String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
      if (validateMsg != null) {
@@ -1598,8 +1616,8 @@
         JSONObject innerList = new JSONObject();
         innerList.put("name", "总计");
         
         List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyMoney(null, dateType,
               year, startTime, endTime);
         List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyMoney(null, dateType, year,
               startTime, endTime);
         
         if (dateType != 3) {
            innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
@@ -1614,7 +1632,6 @@
         }
         
         line_list.add(innerList);
         
         JSONObject data = new JSONObject();
         if (objectDate != null) {
@@ -1635,18 +1652,25 @@
   
   /**
    * 统计提现申请总次数
    *
    * @param callback
    * @param state 所有-空值或者不传   待审核-0 通过-1  拒绝- 2
    * @param type 统计类型  1-24小时  2-所有
    * @param dateType 类型  1日  2月  3年
    * @param year 2018
    * @param startTime 2018-12-01
    * @param endTime   2018-12-01
    * @param state
    *            所有-空值或者不传 待审核-0 通过-1 拒绝- 2
    * @param type
    *            统计类型 1-24小时 2-所有
    * @param dateType
    *            类型 1日 2月 3年
    * @param year
    *            2018
    * @param startTime
    *            2018-12-01
    * @param endTime
    *            2018-12-01
    * @param out
    */
   @RequestMapping(value = "getExtractApplyNumber")
   public void getExtractApplyNumber(String callback,Integer state, Integer dateType, String year,
         String startTime, String endTime, PrintWriter out) {
   public void getExtractApplyNumber(String callback, Integer state, Integer dateType, String year, String startTime,
         String endTime, PrintWriter out) {
      String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
      if (validateMsg != null) {
@@ -1685,8 +1709,8 @@
         JSONObject innerList = new JSONObject();
         innerList.put("name", "总计");
         
         List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyNumber(null, dateType,
               year, startTime, endTime);
         List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyNumber(null, dateType, year,
               startTime, endTime);
         
         if (dateType != 3) {
            innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
@@ -1701,7 +1725,6 @@
         }
         
         line_list.add(innerList);
         
         JSONObject data = new JSONObject();
         if (objectDate != null) {