|
@@ -8,6 +8,9 @@ import java.io.UnsupportedEncodingException;
|
|
import java.net.URLDecoder;
|
|
import java.net.URLDecoder;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+
|
|
|
|
+import cn.com.ctop.kuaishou.modules.report.entity.ParamsDTO;
|
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
@@ -48,7 +51,7 @@ import io.swagger.annotations.ApiOperation;
|
|
public class KuaishouReportDailyAgentSumController {
|
|
public class KuaishouReportDailyAgentSumController {
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouReportDailyAgentSumService kuaishouReportDailyAgentSumService;
|
|
private IKuaishouReportDailyAgentSumService kuaishouReportDailyAgentSumService;
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
* @param kuaishouReportDailyAgentSum
|
|
* @param kuaishouReportDailyAgentSum
|
|
@@ -72,7 +75,7 @@ public class KuaishouReportDailyAgentSumController {
|
|
result.setResult(pageList);
|
|
result.setResult(pageList);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加
|
|
* 添加
|
|
* @param kuaishouReportDailyAgentSum
|
|
* @param kuaishouReportDailyAgentSum
|
|
@@ -92,7 +95,7 @@ public class KuaishouReportDailyAgentSumController {
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 批量删除
|
|
* 批量删除
|
|
* @param ids
|
|
* @param ids
|
|
@@ -111,7 +114,7 @@ public class KuaishouReportDailyAgentSumController {
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 通过id查询
|
|
* 通过id查询
|
|
* @param id
|
|
* @param id
|
|
@@ -199,4 +202,52 @@ public class KuaishouReportDailyAgentSumController {
|
|
return Result.ok("文件导入失败!");
|
|
return Result.ok("文件导入失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @param dto
|
|
|
|
+ * @return Result<List<KuaishouReportDailyAgentSum>>
|
|
|
|
+ */
|
|
|
|
+ @AutoLog(value = "公司报表")
|
|
|
|
+ @ApiOperation(value="公司报表", notes="公司报表")
|
|
|
|
+ @PostMapping(value = "/companyReport")
|
|
|
|
+ public Result<List<KuaishouReportDailyAgentSum>> companyReport(@RequestBody ParamsDTO dto) {
|
|
|
|
+ Result<List<KuaishouReportDailyAgentSum>> result = new Result<>();
|
|
|
|
+ String startDate = dto.getStartDate();
|
|
|
|
+ String endDate = dto.getEndDate();
|
|
|
|
+ if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
|
+ result.setSuccess(false);
|
|
|
|
+ result.setMessage("时间不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<KuaishouReportDailyAgentSum> kuaishouReportDailyAgentSumList = kuaishouReportDailyAgentSumService.companyReport(startDate,endDate);
|
|
|
|
+ result.setResult(kuaishouReportDailyAgentSumList);
|
|
|
|
+ result.setSuccess(true);
|
|
|
|
+ result.setMessage("success");
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @param dto
|
|
|
|
+ * @return Result<KuaishouReportDailyAgentSum>
|
|
|
|
+ */
|
|
|
|
+ @AutoLog(value = "公司报表按时间汇总")
|
|
|
|
+ @ApiOperation(value="公司报表按时间汇总", notes="公司报表按时间汇总")
|
|
|
|
+ @PostMapping(value = "/companyReportSum")
|
|
|
|
+ public Result<KuaishouReportDailyAgentSum> companyReportSum(@RequestBody ParamsDTO dto) {
|
|
|
|
+ Result<KuaishouReportDailyAgentSum> result = new Result<>();
|
|
|
|
+ String startDate = dto.getStartDate();
|
|
|
|
+ String endDate = dto.getEndDate();
|
|
|
|
+ if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
|
+ result.setSuccess(false);
|
|
|
|
+ result.setMessage("时间不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ KuaishouReportDailyAgentSum kuaishouReportDailyAgentSum = kuaishouReportDailyAgentSumService.companyReportSum(startDate,endDate);
|
|
|
|
+ result.setResult(kuaishouReportDailyAgentSum);
|
|
|
|
+ result.setSuccess(true);
|
|
|
|
+ result.setMessage("success");
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|