anderx 4 years ago
parent
commit
572c83d672

+ 5 - 4
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -629,8 +629,9 @@
 	</select>
 	
 	<select id="selectAll" resultType="com.goafanti.admin.bo.depCountBo">
-		select a.id ,a.name ,0 userCount,0 inputCount,0 receiveCount, 0 completeCount, 0 interviewCount
+		  select a.id ,a.name ,0 userCount,0 inputCount,0 receiveCount, 0 completeCount, 0 interviewCount
 		from department a left join department b on a.super_id=b.id
+		where a.name !='平台超管中心'
 	</select>
 	
 	<!-- 查询所有 -->
@@ -648,16 +649,16 @@
   	ifnull(d.timeCount,0) as receiveCount, ifnull(e.completeCount,0)completeCount,ifnull(f.interviewCount,0)interviewCount
   	from admin a 
 	left join (select aid,count(aid) as userCount from user where aid is not null  
-	and  share_type=0 and source !=0 and type=1
+	and  share_type in(0,2) and source !=0 and type=1
 	group by aid) b on a.id=b.aid
 	left join (select aid,count(aid) as timeCount from `user` where aid is not null  
-	and  share_type=0 and source =1 and type=1
+	and  share_type in(0,2) and source =1 and type=1
 	<if test="startTime != null and endTime != null"> 
     and  create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
 	group by aid) c on a.id=c.aid
 	left join (select aid,count(aid) as timeCount from `user` where aid is not null  
-	and  share_type=0 and source =2 and type=1
+	and  share_type in(0,2) and source =2 and type=1
 	<if test="startTime != null and endTime != null"> 
     and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>

+ 7 - 0
src/main/java/com/goafanti/common/task/OrderReportTask.java

@@ -9,11 +9,17 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
 
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.report.service.SalesReportServiceImpl;
 
 @Component
+@RestController
 public class OrderReportTask {
 
 	Logger							logger	= LoggerFactory.getLogger(OrderReportTask.class);
@@ -25,6 +31,7 @@ public class OrderReportTask {
 	 * "0 0 17 * * ?" 每天17点触发一次
 	 */
 	@Scheduled(cron = "0 0 17 * * ?")
+	@RequestMapping(value = "/open/test", method=RequestMethod.GET)
 	public void runStatistics() {
 		LoggerUtils.debug(logger, "统计订单报表任务开始");
 		Calendar now = Calendar.getInstance();