zouxuan пре 1 година
родитељ
комит
bf7bddadc0

+ 4 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/OperatingReportNewDao.java

@@ -119,8 +119,10 @@ public interface OperatingReportNewDao extends BaseDAO<Integer, OperatingReportN
     //oa费用明细
     List<FinancialExpenditure> queryOASummaryExpensesDetail(@Param("month") String month);
 
-    void firstBalancedRelationship(@Param("month") String month);
+    void musicBalancedRelationship(@Param("month") String month, @Param("lastMonth") String lastMonth);
 
-    void lastBalancedRelationship(@Param("month") String month);
+    void vipBalancedRelationship(@Param("month") String month, @Param("lastMonth") String lastMonth);
+
+    void cloudBalancedRelationship(@Param("month") String month, @Param("lastMonth") String lastMonth);
 
 }

+ 8 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OperatingReportNewServiceImpl.java

@@ -209,13 +209,16 @@ public class OperatingReportNewServiceImpl extends BaseServiceImpl<Integer, Oper
 
 	@Override
 	public void balancedRelationship(String month) {
-		//月头的数据统计
-		operatingReportNewDao.firstBalancedRelationship(month);
-
-		//上月月末的数据统计
 		//获取上个月时间
 		String lastMonth = DateUtil.dateToString(DateUtil.addMonths(DateUtil.stringToDate(month,DateUtil.ISO_YEAR_MONTH_FORMAT),-1),DateUtil.ISO_YEAR_MONTH_FORMAT);
-		operatingReportNewDao.lastBalancedRelationship(lastMonth);
+		//乐团课
+		operatingReportNewDao.musicBalancedRelationship(month,lastMonth);
+
+		//vip课
+		operatingReportNewDao.vipBalancedRelationship(month,lastMonth);
+
+		//云教练
+		operatingReportNewDao.cloudBalancedRelationship(month,lastMonth);
 	}
 
 	private BigDecimal getAmount(BigDecimal amount){

+ 7 - 5
mec-biz/src/main/resources/config/mybatis/OperatingReportNewMapper.xml

@@ -428,16 +428,18 @@
 		from human_cost
 		where month_ = #{month} group by organ_id_
 	</select>
-	<update id="firstBalancedRelationship">
+	<update id="musicBalancedRelationship">
 		select firstMonthVipReportStatis(#{month});
-		select firstMonthMusicClassReportStatis(#{month});
-		select firstMonthCloudReportStatis(#{month});
-	</update>
-	<update id="lastBalancedRelationship">
 		select currentMonthVipReportStatis(#{month});
 		select lastMonthVipReportStatis(#{month});
+	</update>
+	<update id="vipBalancedRelationship">
+		select firstMonthMusicClassReportStatis(#{month});
 		select currentMonthMusicClassReportStatis(#{month});
 		select lastMonthMusicClassReportStatis(#{month});
+	</update>
+	<update id="cloudBalancedRelationship">
+		select firstMonthCloudReportStatis(#{month});
 		select currentMonthCloudReportStatis(#{month});
 		select lastMonthCloudReportStatis(#{month});
 	</update>