From a9f950c0d11a687a7a940443b8c765f6d87ae4f1 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Tue, 20 Apr 2021 00:26:22 +0800
Subject: [PATCH] 合并新的修改
---
zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
index 4004241..f3d4d1f 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
@@ -6,7 +6,9 @@
import com.matrix.system.app.vo.RankingVo;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.AchieveNew;
import com.matrix.system.hive.bean.SysOrder;
+import com.matrix.system.hive.dao.AchieveNewDao;
import com.matrix.system.hive.service.AchieveNewService;
import com.matrix.system.hive.service.SysOrderService;
import io.swagger.annotations.Api;
@@ -19,6 +21,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.Date;
import java.util.List;
/**
@@ -34,7 +37,7 @@
private SysOrderService sysOrderService;
@Autowired
- private AchieveNewService achieveNewService;
+ private AchieveNewDao achieveNewDao;
@ApiOperation(value = "顾问业绩排行榜", notes = "顾问业绩排行榜")
@ApiResponses({
@@ -42,7 +45,11 @@
})
@PostMapping(value = "/findStaffAchieveRanking")
public AjaxResult findStaffAchieveRanking(@RequestBody RankingDto rankingDto) {
- return null;
+ AchieveNew achieveNew = new AchieveNew();
+ QueryUtil.setQueryLimitCom(achieveNew);
+ achieveNew.setType(rankingDto.getType());
+ achieveNew.setDatatime(new Date());
+ return AjaxResult.buildSuccessInstance(achieveNewDao.selectStaffSaleAchieveRanking(achieveNew));
}
@ApiOperation(value = "门店业绩排行榜", notes = "门店业绩排行榜")
@@ -52,15 +59,17 @@
@PostMapping(value = "/findShopAchieveRanking")
public AjaxResult findShopAchieveRanking(@RequestBody RankingDto rankingDto) {
AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
+ AchieveNew achieveNew = new AchieveNew();
+ QueryUtil.setQueryLimitCom(achieveNew);
+ achieveNew.setT1(rankingDto.getType());
+ achieveNew.setDatatime(new Date());
+
if (RankingDto.SALE.equals(rankingDto.getDataType())) {
- SysOrder sysOrder = new SysOrder();
- QueryUtil.setQueryLimitCom(sysOrder);
- sysOrder.setType(rankingDto.getType());
- sysOrder.setOrderTime(DateUtil.stringToDate(rankingDto.getTime(), DateUtil.DATE_FORMAT_DD));
- List<RankingVo> list = sysOrderService.findApiShopAchieveRanking(sysOrder);
+ List<RankingVo> list = achieveNewDao.selectShopSaleAchieveRanking(achieveNew);
ajaxResult.setRows(list);
} else {
-
+ List<RankingVo> rankingVos = achieveNewDao.selectShopConsumeAchieveRanking(achieveNew);
+ ajaxResult.setRows(rankingVos);
}
return ajaxResult;
}
@@ -71,6 +80,10 @@
})
@PostMapping(value = "/findBeauticianAchieveRanking")
public AjaxResult findBeauticianAchieveRanking(@RequestBody RankingDto rankingDto) {
- return null;
+ AchieveNew achieveNew = new AchieveNew();
+ QueryUtil.setQueryLimitCom(achieveNew);
+ achieveNew.setDatatime(new Date());
+ achieveNew.setT1(rankingDto.getType());
+ return AjaxResult.buildSuccessInstance(achieveNewDao.selectBeauticianConsumeAchieveRanking(achieveNew));
}
}
--
Gitblit v1.9.1