|
@@ -159,7 +159,7 @@ public class JiaoYangReportController extends BaseController {
|
|
|
|
|
|
@GetMapping("/profitData")
|
|
|
@ApiOperation(value = "商品列表")
|
|
|
- public JSONObject profitData(String date,Integer dataType) throws ParseException {
|
|
|
+ public JSONObject profitData(String date, Integer dataType) throws ParseException {
|
|
|
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
|
|
@@ -169,7 +169,7 @@ public class JiaoYangReportController extends BaseController {
|
|
|
// date 为本月结束时间
|
|
|
String lastMonthFirstDate = DateUtils.getLastMonthFirstDayByDate(date);// 上个月开始时间
|
|
|
String lastMonthEndDate = DateUtils.getLastMonthNowDay(date);// 上个月结束时间
|
|
|
- JSONObject dayData = jiaoYangReportService.dayData(DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastDate),dataType);
|
|
|
+ JSONObject dayData = jiaoYangReportService.dayData(DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastDate), dataType);
|
|
|
JSONArray dayArray = new JSONArray();
|
|
|
JSONObject obj1 = new JSONObject();
|
|
|
obj1.put("date", dayData.getString("date"));
|
|
@@ -204,7 +204,7 @@ public class JiaoYangReportController extends BaseController {
|
|
|
dayArray.add(obj3);
|
|
|
dayArray.add(new JSONObject());
|
|
|
|
|
|
- JSONObject monthData = jiaoYangReportService.monthData(DateUtils.strDateTimsToInt(firstDateByMonth), DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastMonthFirstDate), DateUtils.strDateTimsToInt(lastMonthEndDate),dataType);
|
|
|
+ JSONObject monthData = jiaoYangReportService.monthData(DateUtils.strDateTimsToInt(firstDateByMonth), DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastMonthFirstDate), DateUtils.strDateTimsToInt(lastMonthEndDate), dataType);
|
|
|
|
|
|
|
|
|
JSONObject obj4 = new JSONObject();
|
|
@@ -459,6 +459,17 @@ public class JiaoYangReportController extends BaseController {
|
|
|
}*/
|
|
|
|
|
|
|
|
|
+ String roleId = sysRoleService.getRoleBYUserId(userId);
|
|
|
+ if ("jy_out_operation".equals(roleId)) {
|
|
|
+ List<Long> userIds = new ArrayList<>();
|
|
|
+ userIds.add(userId);
|
|
|
+ List<Long> promoterIds = jiaoYangReportService.getPromoterIdsByUserIds(userIds);
|
|
|
+ if (Check.isNull(promoterIds)) {
|
|
|
+ return getDataTable(new ArrayList<JSONObject>());
|
|
|
+ }
|
|
|
+ requestMap.put("promoterIds", promoterIds);
|
|
|
+ }
|
|
|
+
|
|
|
if (!Check.isNull(orderStartDate)) {
|
|
|
Long start = DateUtils.strDateToInt(orderStartDate);
|
|
|
requestMap.put("start", start);
|