Browse Source

技术员报表开发

anderx 7 years ago
parent
commit
fa77a0eb0c

+ 4 - 0
src/main/java/com/goafanti/common/dao/DailySalesReportMapper.java

@@ -14,6 +14,7 @@ import com.goafanti.report.bo.DepartmentSalesReportBO;
 import com.goafanti.report.bo.PersonalSalesReportBO;
 import com.goafanti.report.bo.SomeTimeMarketingBo;
 import com.goafanti.report.bo.marketingESBo;
+import com.goafanti.report.bo.technicalDepListBo;
 
 public interface DailySalesReportMapper {
 
@@ -75,5 +76,8 @@ public interface DailySalesReportMapper {
 
 	SomeTimeMarketingBo countsometimeMarketingDepStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);
 
+	List<technicalDepListBo> technicalDepStatistics(String depId, String stringWeeklyStart, String stringWeeklyEnd, String publishStatus,
+			String taskStatus);
+
 
 }

+ 48 - 0
src/main/java/com/goafanti/report/bo/technicalDepListBo.java

@@ -0,0 +1,48 @@
+package com.goafanti.report.bo;
+
+public class technicalDepListBo {
+	/**公司名称*/	
+	private String userName;
+	/**订单部门*/
+	private String depName;
+	/**项目签单金额*/
+	private String price;
+	/**签单日期*/
+	private String signTime;
+	/**合同编号*/
+	private String contractNo;
+	/**订单留言*/
+	private String	orderRemarks;
+	/**企业联系人*/
+	private String	contacts;
+	/**任务名称*/
+	private String	taskName;
+	/**派单时间*/
+	private String	taskDistributionTime;
+	/**部门*/
+	private String	taskDepName;
+	/**任务负责人*/
+	private String 	taskreceiver;
+	/**任务状态*/
+	private String	taskStatus;
+	/**项目任务完成时间*/
+	private String	taskCompleteTime;
+	/**任务说明*/
+	private String	taskComment;
+	/**公示状态*/
+	private String 	publishStatus;
+	
+	/**营销员*/
+	private String 	salesmanName;
+	
+	
+	
+	/***/
+	/***/
+	/***/
+	/***/
+	/***/
+	/***/
+	/***/
+	
+}

+ 21 - 4
src/main/java/com/goafanti/report/controller/ReportApiController.java

@@ -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));
+		
+	}
 	
 
 }

+ 21 - 0
src/main/java/com/goafanti/report/service/SalesReportServiceImpl.java

@@ -365,6 +365,27 @@ public class SalesReportServiceImpl extends BaseMybatisDao<DailySalesReportMappe
 		}
 			return null;
 	}
+
+	public Object technicalDepStatistics(String depId, Integer timeType, String startTime, String endTime,
+			String publishStatus, String taskStatus) {
+		ReportDate rd = new ReportDate(new Date());
+		if (TimeType.WEEKLY.getCode()==timeType) {
+			return salesReportMapper.technicalDepStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd(),publishStatus,taskStatus);
+		}
+		if (TimeType.MONTH.getCode()==timeType) {
+			return salesReportMapper.technicalDepStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd(),publishStatus,taskStatus);
+		}
+		if (TimeType.QTR.getCode()==timeType) {
+			return salesReportMapper.technicalDepStatistics(depId,rd.getStringQuarterStart(),rd.getStringQuarterEnd(),publishStatus,taskStatus);
+		}
+		if (TimeType.YEAR.getCode()==timeType) {
+			return salesReportMapper.technicalDepStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd(),publishStatus,taskStatus);
+		}
+		if (TimeType.ZS.getCode()==timeType) {
+			return salesReportMapper.technicalDepStatistics(depId,startTime,endTime,publishStatus,taskStatus);
+		}
+		return null;
+	}
 	
 
 }