瀏覽代碼

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into saas_export

zouxuan 3 年之前
父節點
當前提交
9d53e825bb

+ 26 - 8
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -1349,13 +1349,13 @@
 		FROM organization o
 		LEFT JOIN financial_expenditure fe ON o.id_ = fe.organ_id_ AND fe.tenant_id_ = o.tenant_id_
 		AND DATE_FORMAT(fe.create_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate} AND fe.del_flag_ = 0
+		WHERE o.tenant_id_ = #{tenantId}
 		<if test="organIds!=null and organIds.size()>0">
-			AND fe.organ_id_ IN
+			AND o.id_ IN
 			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 				#{organId}
 			</foreach>
 		</if>
-		WHERE o.tenant_id_ = #{tenantId}
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 	<select id="getFinanceBalanceDataWithTimely" resultMap="IndexBaseMonthData">
@@ -1378,13 +1378,13 @@
 		FROM organization o
 		LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
 		AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
+		WHERE o.tenant_id_ = #{tenantId}
 		<if test="organIds!=null and organIds.size() > 0">
-			AND spo.organ_id_ IN
+			AND o.id_ IN
 			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 				#{organId}
 			</foreach>
 		</if>
-		WHERE o.tenant_id_ = #{tenantId}
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 	<select id="getFinanceActualDataWithTimely" resultMap="IndexBaseMonthData">
@@ -1406,13 +1406,13 @@
 		FROM organization o
 		LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
 		AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
+		WHERE o.tenant_id_ = #{tenantId}
 		<if test="organIds!=null and organIds.size()>0">
-			AND spo.organ_id_ IN
+			AND o.id_ IN
 			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 				#{organId}
 			</foreach>
 		</if>
-		WHERE o.tenant_id_ = #{tenantId}
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 	<select id="getTotalAmountDataWithTimely" resultMap="IndexBaseMonthData">
@@ -1439,13 +1439,13 @@
 		FROM organization o
 		LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
 		AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
+		WHERE o.tenant_id_ = #{tenantId}
 		<if test="organIds!=null and organIds.size()>0">
-			AND spo.organ_id_ IN
+			AND o.id_ IN
 			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 				#{organId}
 			</foreach>
 		</if>
-		WHERE o.tenant_id_ = #{tenantId}
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 	<select id="getTotalAmountDataWithTimelyDetails" resultMap="IndexBaseMonthData">
@@ -1498,6 +1498,12 @@
 			</foreach>
 		</if>
 		WHERE o.tenant_id_ = #{tenantId}
+		<if test="organIds!=null and organIds.size()>0">
+			AND o.id_ IN
+			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
+				#{organId}
+			</foreach>
+		</if>
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 
@@ -1561,6 +1567,12 @@
 		GROUP BY spo.organ_id_
 		)c ON c.organ_id_ = o.id_
 		WHERE o.tenant_id_ = #{tenantId}
+		<if test="organIds!=null and organIds.size()>0">
+			AND o.id_ IN
+			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
+				#{organId}
+			</foreach>
+		</if>
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 
@@ -1625,6 +1637,12 @@
 		GROUP BY spo.organ_id_,spo.type_
 		)c ON c.organ_id_ = o.id_
 		WHERE o.tenant_id_ = #{tenantId}
+		<if test="organIds!=null and organIds.size()>0">
+			AND o.id_ IN
+			<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
+				#{organId}
+			</foreach>
+		</if>
 		GROUP BY o.id_ ORDER BY percent_ DESC
 	</select>
 

+ 0 - 2
mec-student/src/main/java/com/ym/mec/student/controller/StudentCourseHomeworkController.java

@@ -13,7 +13,6 @@ import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.util.date.DateUtil;
 import com.yonge.log.model.AuditLogAnnotation;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -21,7 +20,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Objects;