|
@@ -1,6 +1,8 @@
|
|
package com.pj.tb_orders;
|
|
package com.pj.tb_orders;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+
|
|
|
|
+import com.pj.current.satoken.StpUserUtil;
|
|
import com.pj.utils.so.SoMap;
|
|
import com.pj.utils.so.SoMap;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -89,7 +91,14 @@ public class TbOrdersController {
|
|
public AjaxJson selectYear() {
|
|
public AjaxJson selectYear() {
|
|
SoMap so=new SoMap();
|
|
SoMap so=new SoMap();
|
|
so.put("year",tbOrdersService.selectYear());
|
|
so.put("year",tbOrdersService.selectYear());
|
|
- so.put("count",tbOrdersService.totalMoney());
|
|
|
|
|
|
+ //运营管理者统计全部
|
|
|
|
+ if(StpUserUtil.getPCLoginInfo().getType()==null||StpUserUtil.getPCLoginInfo().getType().equals("00")){
|
|
|
|
+ so.put("count",tbOrdersService.totalMoney(null));
|
|
|
|
+ }
|
|
|
|
+ //合作社只统计对应的互市id
|
|
|
|
+ if(StpUserUtil.getPCLoginInfo().getType()!=null&&StpUserUtil.getPCLoginInfo().getType().equals("01")){
|
|
|
|
+ so.put("count",tbOrdersService.totalMoney(StpUserUtil.getPCLoginInfo().getTradeAreaId()));
|
|
|
|
+ }
|
|
return AjaxJson.getSuccessData(so);
|
|
return AjaxJson.getSuccessData(so);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -97,8 +106,16 @@ public class TbOrdersController {
|
|
@RequestMapping("orderStatistics")
|
|
@RequestMapping("orderStatistics")
|
|
public AjaxJson orderStatistics(String year) {
|
|
public AjaxJson orderStatistics(String year) {
|
|
SoMap so=new SoMap();
|
|
SoMap so=new SoMap();
|
|
- so.put("money",tbOrdersService.orderStatistics("交易额",year));
|
|
|
|
- so.put("count",tbOrdersService.orderStatistics("交易量",year));
|
|
|
|
|
|
+ //运营管理者统计全部
|
|
|
|
+ if(StpUserUtil.getPCLoginInfo().getType()==null||StpUserUtil.getPCLoginInfo().getType().equals("00")){
|
|
|
|
+ so.put("money",tbOrdersService.orderStatistics("交易额",year, null));
|
|
|
|
+ so.put("count",tbOrdersService.orderStatistics("交易量",year,null));
|
|
|
|
+ }
|
|
|
|
+ //合作社只统计对应的互市id
|
|
|
|
+ if(StpUserUtil.getPCLoginInfo().getType()!=null&&StpUserUtil.getPCLoginInfo().getType().equals("01")){
|
|
|
|
+ so.put("money",tbOrdersService.orderStatistics("交易额",year, StpUserUtil.getPCLoginInfo().getTradeAreaId()));
|
|
|
|
+ so.put("count",tbOrdersService.orderStatistics("交易量",year,StpUserUtil.getPCLoginInfo().getTradeAreaId()));
|
|
|
|
+ }
|
|
return AjaxJson.getSuccessData(so);
|
|
return AjaxJson.getSuccessData(so);
|
|
}
|
|
}
|
|
|
|
|