Преглед изворни кода

release of '素材大盘' on 2021.3.22

jiequan.bi пре 4 година
родитељ
комит
013d83eeba

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/MaterialReportOverViewServiceImpl.java

@@ -89,7 +89,7 @@ public class MaterialReportOverViewServiceImpl implements IMaterialReportOverVie
         }
         if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
             BigDecimal cost = materialReportOverViewMapper.queryBytedanceCost(startDate, endDate, projects);
-            BigDecimal lastCost = materialReportOverViewMapper.queryBytedanceCost(DateUtils.addDay(DateUtils.addDay(endDate, -1), -DateUtils.dateDiff(startDate, endDate)), DateUtils.addDay(endDate, -1), projects);
+            BigDecimal lastCost = materialReportOverViewMapper.queryBytedanceCost(DateUtils.addDay(startDate, -DateUtils.dateDiff(startDate, endDate)), DateUtils.addDay(startDate, -1), projects);
             result.put("cost", cost);
             result.put("costLink", LinkUtils.countLink(cost == null ? BigDecimal.ZERO : cost, lastCost == null ? BigDecimal.ZERO : lastCost));
             result.put("video", materialReportOverViewMapper.queryMaterialCount(startDate, endDate, projects));
@@ -98,7 +98,7 @@ public class MaterialReportOverViewServiceImpl implements IMaterialReportOverVie
             result.put("valid", 0);
         } else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
             BigDecimal cost = materialReportOverViewMapper.queryKuaishouCost(startDate, endDate, projects);
-            BigDecimal lastCost = materialReportOverViewMapper.queryKuaishouCost(DateUtils.addDay(DateUtils.addDay(endDate, -1), -DateUtils.dateDiff(startDate, endDate)), DateUtils.addDay(endDate, -1), projects);
+            BigDecimal lastCost = materialReportOverViewMapper.queryKuaishouCost(DateUtils.addDay(startDate, -DateUtils.dateDiff(startDate, endDate)), DateUtils.addDay(startDate, -1), projects);
             result.put("cost", cost);
             result.put("costLink", LinkUtils.countLink(cost == null ? BigDecimal.ZERO : cost, lastCost == null ? BigDecimal.ZERO : lastCost));
             result.put("video", materialReportOverViewMapper.queryMaterialCount(startDate, endDate, projects));

+ 27 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/orderplatform/controller/DesignerCommitProcessCtrl.java

@@ -14,6 +14,10 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @Slf4j
 @RestController
 @RequestMapping("/platform/designer")
@@ -92,6 +96,29 @@ DesignerCommitProcessCtrl {
     }
 
     /**
+     *   设计组长批量派单
+     */
+    @PostMapping("/batchAssign")
+    public Result<Map<String,Object>> batchAssign(@RequestBody List<PlatformMaterial> platformMaterials) {
+        Result<Map<String,Object>> result = new Result<>();
+        Map<String,Object> assignResult= new HashMap<>();
+        platformMaterials.forEach(platformMaterial->{
+            //物料状态->脚本待上传
+            platformMaterial.setMaterialStatus(1);
+            platformMaterial.setScriptStatus(0);
+            boolean ok = platformMaterialService.updateById(platformMaterial);
+            if (ok) {
+                assignResult.put(platformMaterial.getId().toString(),"物料派单成功");
+            }else {
+                assignResult.put(platformMaterial.getId().toString(),"物料派单失败");
+            }
+        });
+        result.setResult(assignResult);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
      *  设计组长修改指派人
      */
     @PostMapping("/assignAgain")