|
|
@@ -17,6 +17,7 @@ import com.goafanti.common.controller.BaseApiController;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.report.enums.OrderBy;
|
|
|
import com.goafanti.report.enums.SalesReportOrderField;
|
|
|
+import com.goafanti.report.enums.TimeType;
|
|
|
import com.goafanti.report.service.SalesReportServiceImpl;
|
|
|
|
|
|
@RestController
|
|
|
@@ -185,22 +186,38 @@ public class ReportApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/sales/countsometimeMarketingStatistics", method = RequestMethod.GET)
|
|
|
public Result countsometimeMarketingStatistics(String depId,Integer timeType,Integer type,String startTime,String endTime) {
|
|
|
Result res=new Result();
|
|
|
- if (null==type||type>1) {
|
|
|
+ if (null==type||type>TimeType.WEEKLY.getCode()) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "参数错误", "参数"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (null==timeType||timeType>4) {
|
|
|
+ if (null==timeType||timeType>TimeType.ZS.getCode()) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (timeType==4&&null==startTime&&null==endTime) {
|
|
|
+ if (timeType==TimeType.ZS.getCode()&&null==startTime&&null==endTime) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
|
|
|
return res;
|
|
|
}
|
|
|
return res.data(reportService.countSometimeMarketingStatistics(depId,timeType,startTime,endTime));
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 技术部派单报表统计
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/technicalDepStatistics" , method=RequestMethod.GET)
|
|
|
+ public Result technicalDepStatistics(String depId,Integer timeType,String startTime,String endTime,String publishStatus,String taskStatus){
|
|
|
+ Result res=new Result();
|
|
|
+ if (null==timeType||timeType>TimeType.ZS.getCode()) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ if (timeType==TimeType.ZS.getCode()&&null==startTime&&null==endTime) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ return res.data(reportService.technicalDepStatistics(depId,timeType,startTime,endTime,publishStatus,taskStatus));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|