Kaynağa Gözat

设计绩效,改造2

zhaoxian 3 yıl önce
ebeveyn
işleme
fc7085c1fe

+ 101 - 10
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/achievements/controller/DesignerAchievementsController.java

@@ -11,6 +11,8 @@ import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.common.util.RedisUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -22,7 +24,10 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.servlet.http.HttpServletResponse;
 import java.io.OutputStream;
 import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 设计人员绩效
@@ -38,6 +43,8 @@ import java.util.List;
 public class DesignerAchievementsController {
     @Autowired
     private IDesignerService designerService;
+    @Autowired
+    private RedisUtil redisUtil;
 
     /**
      * 修改绩效中的用户部分信息
@@ -179,7 +186,23 @@ public class DesignerAchievementsController {
                                              @RequestParam(name = "yearTime") String yearTime,
                                              @RequestParam(name = "monthTime") String monthTime) {
         try {
-            Result<PageInfo<JSONObject>> result = designerService.getDesignerBasicsAndAch(userId, yearTime, monthTime, 1, 99999);
+            Result<PageInfo<JSONObject>> result = null;
+            String statDate = DateUtils.formatDate(new Date());
+            String key = statDate + "-ACHINFO-" + userId.substring(0, 8).toUpperCase();
+            Object hget = redisUtil.hget(key, monthTime);
+            if (!Check.isNull(hget)) {
+                result = (Result<PageInfo<JSONObject>>) hget;
+            } else {
+                result = designerService.getDesignerBasicsAndAch(userId, yearTime, monthTime, 1, 9999);
+                Map<Object, Object> hmget = redisUtil.hmget(key);
+                if (Check.isNull(hmget) || hmget.isEmpty()) {
+                    Map<String, Object> map = new HashMap<>();
+                    map.put(monthTime, result);
+                    redisUtil.hmset(key, map, 80000L);
+                } else {
+                    redisUtil.hset(key, monthTime, result);
+                }
+            }
             PageInfo<JSONObject> pageInfo = result.getResult();
             List<List<Object>> excelList = new ArrayList<>();
             Integer month = 0;
@@ -218,8 +241,7 @@ public class DesignerAchievementsController {
                         (month + 2) + "月快手剪辑消耗", (month + 2) + "月快手剪辑提成", (month + 2) + "月快手编导消耗", (month + 2) + "月快手编导提成", (month + 2) + "月快手拍摄消耗", (month + 2) + "月快手拍摄提成",
                         month + "月头条剪辑消耗", month + "月头条剪辑提成", month + "月头条编导消耗", month + "月头条编导提成", month + "月头条拍摄消耗", month + "月头条拍摄提成",
                         (month + 1) + "月头条剪辑消耗", (month + 1) + "月头条剪辑提成", (month + 1) + "月头条编导消耗", (month + 1) + "月头条编导提成", (month + 1) + "月头条拍摄消耗", (month + 1) + "月头条拍摄提成",
-                        (month + 2) + "月头条剪辑消耗", (month + 2) + "月头条剪辑提成", (month + 2) + "月头条编导消耗", (month + 2) + "月头条编导提成", (month + 2) + "月头条拍摄消耗", (month + 2) + "月头条拍摄提成",
-                };
+                        (month + 2) + "月头条剪辑消耗", (month + 2) + "月头条剪辑提成", (month + 2) + "月头条编导消耗", (month + 2) + "月头条编导提成", (month + 2) + "月头条拍摄消耗", (month + 2) + "月头条拍摄提成"};
                 eeu.exportExcelForAttendance(workbook, 0, "设计基础数据", titles, excelList);
                 HttpUtils.setResponseHeader(response, "clockIn.xlsx");
                 workbook.write(os);
@@ -241,14 +263,83 @@ public class DesignerAchievementsController {
      * @return
      */
     @GetMapping(value = "/getDesignerBasicsAndAchAndComInfoExcel")
-    public Result getDesignerBasicsAndAchAndComInfoExcel(HttpServletResponse response,
-                                                         @RequestParam(name = "userId") String userId,
-                                                         @RequestParam(name = "yearTime") String yearTime,
-                                                         @RequestParam(name = "monthTime") String monthTime,
-                                                         @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
-                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
-        return designerService.getDesignerBasicsAndAchAndComInfo(userId, yearTime, monthTime, pageNum, pageSize);
+    public void getDesignerBasicsAndAchAndComInfoExcel(HttpServletResponse response,
+                                                       @RequestParam(name = "userId") String userId,
+                                                       @RequestParam(name = "yearTime") String yearTime,
+                                                       @RequestParam(name = "monthTime") String monthTime) {
 
+        try {
+            Result<PageInfo<JSONObject>> result = null;
+            String statDate = DateUtils.formatDate(new Date());
+            String key = statDate + "-COMINFO-" + userId.substring(0, 8).toUpperCase();
+            Object hget = redisUtil.hget(key, monthTime);
+            if (!Check.isNull(hget)) {
+                result = (Result<PageInfo<JSONObject>>) hget;
+            } else {
+                result = designerService.getDesignerBasicsAndAchAndComInfo(userId, yearTime, monthTime, 1, 9999);
+                Map<Object, Object> hmget = redisUtil.hmget(key);
+                if (Check.isNull(hmget) || hmget.isEmpty()) {
+                    Map<String, Object> map = new HashMap<>();
+                    map.put(monthTime, result);
+                    redisUtil.hmset(key, map, 80000L);
+                } else {
+                    redisUtil.hset(key, monthTime, result);
+                }
+            }
+            PageInfo<JSONObject> pageInfo = result.getResult();
+            List<List<Object>> excelList = new ArrayList<>();
+            Integer month = 0;
+            if (!Check.isNull(pageInfo)) {
+                List<JSONObject> list = pageInfo.getList();
+                if (!list.isEmpty()) {
+                    month = list.get(0).getJSONObject("userFrozen").getJSONArray("commissionList").getJSONObject(0).getInteger("monthTime");
+                    list.forEach(data -> {
+                        List<Object> temp = new ArrayList<>();
+                        temp.add(data.getString("userName"));
+                        temp.add(data.getString("roleName"));
+                        temp.add("1".equals(data.getString("status")) ? "正常" : "冻结");
+                        temp.add(data.getString("departName"));
+                        JSONObject userFrozen = data.getJSONObject("userFrozen");
+                        JSONArray quarterCostList = userFrozen.getJSONArray("quarterCostList");
+                        temp.add(quarterCostList.getJSONObject(0).getString("cost"));
+                        temp.add(quarterCostList.getJSONObject(1).getString("cost"));
+                        temp.add(userFrozen.getString("tatolQuarterCost"));
+                        temp.add(userFrozen.getString("leaderCost"));
+                        temp.add(userFrozen.getString("materialCostQualifiedFlag"));
+                        temp.add(userFrozen.getString("hotVideoNum"));
+                        temp.add(userFrozen.getString("openHotVideoNum"));
+                        temp.add(userFrozen.getString("hotVideoTotalNum"));
+                        temp.add(userFrozen.getString("coefficient"));
+                        JSONArray commissionList = userFrozen.getJSONArray("commissionList");
+                        temp.add(commissionList.getJSONObject(0).getString("commission"));
+                        temp.add(commissionList.getJSONObject(1).getString("commission"));
+                        temp.add(commissionList.getJSONObject(2).getString("commission"));
+                        temp.add(userFrozen.getString("totalCommission"));
+                        temp.add(userFrozen.getString("userHappyGetMoney"));
+                        temp.add(userFrozen.getString("remarks"));
+                        temp.add("1".equals(userFrozen.getString("paySalary")) ? "是" : "否");
+                        temp.add("1".equals(userFrozen.getString("paySalary")) ? userFrozen.getString("userHappyGetMoney") : 0);
+                        temp.add("1".equals(data.getString("status")) ? userFrozen.getString("userHappyProbability") : "-");
+                        excelList.add(temp);
+                    });
+                }
+                List<Integer> monthInt = null;
+                OutputStream os = response.getOutputStream();
+                ExportExcelUtils eeu = new ExportExcelUtils();
+                XSSFWorkbook workbook = new XSSFWorkbook();
+                String[] titles = {"姓名", "岗位", "状态", "组别",
+                        "头条素材消耗", "快手素材消耗", "素材总消耗", "管理消耗", "是否达标", "爆款素材数量", "开屏爆款数量", "爆款总量", "爆款达标"
+                        , month + "月提成", (month + 1) + "月提成", (month + 2) + "月提成", "季度提成汇总", "负责人提成", "提成发放金额", "备注", "是否发放", "最终发放金额", "离职发放比例"
+                };
+                eeu.exportExcelForAttendance(workbook, 0, "设计基础数据", titles, excelList);
+                HttpUtils.setResponseHeader(response, "clockIn.xlsx");
+                workbook.write(os);
+                os.flush();
+                os.close();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
 

+ 26 - 26
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/achievements/mapper/xml/DesignerMapper.xml

@@ -147,7 +147,7 @@
         SELECT QUARTER(d.first_cost_day)                           quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                 yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                 monthTime,
-               IFNULL(sum(d.cost), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                '0.3'                                            AS coefficient,
                IFNULL(round((sum(d.cost) * 0.002 * 0.3), 3), 0) AS commission,
                'clip'                                           AS type
@@ -161,7 +161,7 @@
         SELECT QUARTER(d.first_cost_day)                           quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                 yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                 monthTime,
-               IFNULL(sum(d.cost), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                '0.1'                                            AS coefficient,
                IFNULL(round((sum(d.cost) * 0.002 * 0.1), 3), 0) AS commission,
                'shot'                                           AS type
@@ -175,7 +175,7 @@
         SELECT QUARTER(d.first_cost_day)                           quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                 yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                 monthTime,
-               IFNULL(sum(d.cost), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                '0.4'                                            AS coefficient,
                IFNULL(round((sum(d.cost) * 0.002 * 0.4), 3), 0) AS commission,
                'plan'                                           AS type
@@ -193,7 +193,7 @@
         SELECT QUARTER(d.first_cost_day)                             quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                   yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                   monthTime,
-               IFNULL(sum(d.charge), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                '0.3'                                              AS coefficient,
                IFNULL(round((sum(d.charge) * 0.003 * 0.3), 3), 0) AS commission,
                'clip'                                             AS type
@@ -207,7 +207,7 @@
         SELECT QUARTER(d.first_cost_day)                             quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                   yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                   monthTime,
-               IFNULL(sum(d.charge), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                '0.1'                                              AS coefficient,
                IFNULL(round((sum(d.charge) * 0.003 * 0.1), 3), 0) AS commission,
                'shot'                                             AS type
@@ -221,7 +221,7 @@
         SELECT QUARTER(d.first_cost_day)                             quaterTime,
                DATE_FORMAT(d.first_cost_day, '%Y')                   yearTime,
                DATE_FORMAT(d.first_cost_day, '%m')                   monthTime,
-               IFNULL(sum(d.charge), 0)                           AS cost,
+               IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                '0.4'                                              AS coefficient,
                IFNULL(round((sum(d.charge) * 0.003 * 0.4), 3), 0) AS commission,
                'plan'                                             AS type
@@ -238,7 +238,7 @@
         SELECT QUARTER(#{startTime}) AS 'quaterTime',
             YEAR (
                #{startTime}) AS 'yearTime',
-            IFNULL(SUM( d.cost ), 0 ) AS 'cost',
+            IFNULL(ROUND(SUM(d.cost), 2), 0) AS 'cost',
             'byteDance' AS 'type'
         FROM
             application.bytedance_material_cost_daily d
@@ -258,7 +258,7 @@
         SELECT QUARTER(#{startTime}) AS 'quaterTime',
             YEAR (
                #{startTime}) AS 'yearTime',
-            IFNULL( SUM( d.charge ), 0 ) AS 'cost',
+            IFNULL(ROUND(SUM(d.charge), 2), 0) AS 'cost',
             'kuaiShou' AS 'type'
         FROM
             application.kuaishou_material_cost_daily d
@@ -386,7 +386,7 @@
         select *
         FROM (
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.3'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.3), 3), 0) AS commission,
                         'clip'                                           AS type
@@ -398,7 +398,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.1'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.1), 3), 0) AS commission,
                         'shot'                                           AS type
@@ -410,7 +410,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.4'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.4), 3), 0) AS commission,
                         'plan'                                           AS type
@@ -422,7 +422,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.3'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.3), 3), 0) AS commission,
                         'clip'                                           AS type
@@ -434,7 +434,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.1'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.1), 3), 0) AS commission,
                         'shot'                                           AS type
@@ -446,7 +446,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.4'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.4), 3), 0) AS commission,
                         'plan'                                           AS type
@@ -458,7 +458,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.3'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.3), 3), 0) AS commission,
                         'clip'                                           AS type
@@ -470,7 +470,7 @@
                    AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.1'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.1), 3), 0) AS commission,
                         'shot'                                           AS type
@@ -482,7 +482,7 @@
                    AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')              monthTime,
-                        IFNULL(sum(d.cost), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.cost), 2), 0)                 AS cost,
                         '0.4'                                            AS coefficient,
                         IFNULL(round((sum(d.cost) * 0.002 * 0.4), 3), 0) AS commission,
                         'plan'                                           AS type
@@ -502,7 +502,7 @@
         select *
         FROM (
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.3'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.3), 3), 0) AS commission,
                         'clip'                                             AS type
@@ -514,7 +514,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.1'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.1), 3), 0) AS commission,
                         'shot'                                             AS type
@@ -526,7 +526,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month1.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.4'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.4), 3), 0) AS commission,
                         'plan'                                             AS type
@@ -538,7 +538,7 @@
                    AND d.first_cost_day &lt;= #{month1.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.3'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.3), 3), 0) AS commission,
                         'clip'                                             AS type
@@ -550,7 +550,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.1'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.1), 3), 0) AS commission,
                         'shot'                                             AS type
@@ -562,7 +562,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month2.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.4'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.4), 3), 0) AS commission,
                         'plan'                                             AS type
@@ -574,7 +574,7 @@
                    AND d.first_cost_day &lt;= #{month2.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.3'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.3), 3), 0) AS commission,
                         'clip'                                             AS type
@@ -586,7 +586,7 @@
                    AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.1'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.1), 3), 0) AS commission,
                         'shot'                                             AS type
@@ -598,7 +598,7 @@
                    AND d.first_cost_day &lt;= #{month3.endTime}
                  UNION
                  SELECT DATE_FORMAT(#{month3.startTime}, '%m')                monthTime,
-                        IFNULL(sum(d.charge), 0)                           AS cost,
+                        IFNULL(ROUND(SUM(d.charge), 2), 0)                 AS cost,
                         '0.4'                                              AS coefficient,
                         IFNULL(round((sum(d.charge) * 0.003 * 0.4), 3), 0) AS commission,
                         'plan'                                             AS type

+ 9 - 8
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/achievements/service/impl/DesignerServiceImpl.java

@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -247,7 +248,7 @@ public class DesignerServiceImpl implements IDesignerService {
     }
 
     public JSONObject getDesignerCommission(String userId, String yearTime, String monthTime, List<Map<String, Integer>> timeMap) {
-
+        DecimalFormat df = new DecimalFormat("#.00");
         String roleCode = roleService.getRoleCodeByUserId(userId);
 
         //人员离职信息
@@ -303,9 +304,9 @@ public class DesignerServiceImpl implements IDesignerService {
         Map<String, Object> bytedanceMap = new HashMap<>();
         Map<String, Object> kuaishouMap = new HashMap<>();
         bytedanceMap.put("type", "byteDance");
-        bytedanceMap.put("cost", bytedanceCost);
+        bytedanceMap.put("cost", df.format(bytedanceCost));
         kuaishouMap.put("type", "kuaiShou");
-        kuaishouMap.put("cost", kuaishouCost);
+        kuaishouMap.put("cost", df.format(kuaishouCost));
         quarterCostList.add(bytedanceMap);
         quarterCostList.add(kuaishouMap);
 
@@ -314,12 +315,12 @@ public class DesignerServiceImpl implements IDesignerService {
 
         //季度素材 总消耗
         Double tatolCost = quarterCostList.stream().mapToDouble(json -> new Double(json.get("cost") + "")).reduce(Double::sum).orElse(new Double("0"));
-        userFrozen.put("tatolQuarterCost", tatolCost);
+        userFrozen.put("tatolQuarterCost", df.format(tatolCost));
 
         //季度 管理消耗汇总
         Double bytedanceLeaderCost = leaderCostList.stream().mapToDouble(json -> new Double(json.get("bytedanceCost") + "")).reduce(Double::sum).orElse(new Double("0"));
         Double kuaishouLeaderCost = leaderCostList.stream().mapToDouble(json -> new Double(json.get("kuaishouCost") + "")).reduce(Double::sum).orElse(new Double("0"));
-        userFrozen.put("leaderCost", bytedanceLeaderCost + kuaishouLeaderCost);
+        userFrozen.put("leaderCost", df.format(bytedanceLeaderCost + kuaishouLeaderCost));
 
 
         //判断素材消耗是否达标
@@ -390,7 +391,7 @@ public class DesignerServiceImpl implements IDesignerService {
             }
             commissionJson.put("monthTime", bytedance.get(i).get(0).getBigInteger("monthTime"));
             commissionJson.put("xishu", userHappyProbability);
-            commissionJson.put("commission", (bytedanceCommission + kuaishouCommission) * userHappyProbability);
+            commissionJson.put("commission", df.format((bytedanceCommission + kuaishouCommission) * userHappyProbability));
             commissionList.add(commissionJson);
         }
         bytedanceJson.get(0);
@@ -409,7 +410,7 @@ public class DesignerServiceImpl implements IDesignerService {
             Double designerLeaderCommissionKuaishou = kuaishouLeaderCost * 0.003 * 0.2;
             designerLeaderCommission = designerLeaderCommissionBytedance + designerLeaderCommissionKuaishou;
         }
-        userFrozen.put("designerLeaderCommission", designerLeaderCommission);
+        userFrozen.put("designerLeaderCommission", df.format(designerLeaderCommission));
 
         //提成汇总 = 季度汇总 + 负责人提成
         totalCommission += designerLeaderCommission;
@@ -442,7 +443,7 @@ public class DesignerServiceImpl implements IDesignerService {
 
         //提成发放金额 = 总提成 * 爆款达标发放系数
         Double userHappyGetMoney = totalCommission * coefficient;
-        userFrozen.put("userHappyGetMoney", userHappyGetMoney);
+        userFrozen.put("userHappyGetMoney", df.format(userHappyGetMoney));
 
         return userFrozen;
     }