Pārlūkot izejas kodu

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

yonge 3 gadi atpakaļ
vecāks
revīzija
98688c0864

+ 4 - 15
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ClassGroupQueryInfo.java

@@ -23,25 +23,14 @@ public class ClassGroupQueryInfo extends EducationBaseQueryInfo {
 
     private Integer delFlag;
 
-    @ApiModelProperty(value = "少于3人的线上基础技能班,大于0")
-    private Integer lessThenThreeHighOnline;
+    @ApiModelProperty(value = "少于3人的线上基础技能班,大于0。异常传true、提醒传false")
+    private Boolean lessThenThreeHighOnline;
 
-    @ApiModelProperty(value = "是否有班级备注(用于线上基础技能班事项提醒),事项提醒传true,异常提醒传false")
-    private Boolean hasDesc = false;
-
-	public Boolean getHasDesc() {
-		return hasDesc;
-	}
-
-	public void setHasDesc(Boolean hasDesc) {
-		this.hasDesc = hasDesc;
-	}
-
-	public Integer getLessThenThreeHighOnline() {
+	public Boolean getLessThenThreeHighOnline() {
 		return lessThenThreeHighOnline;
 	}
 
-	public void setLessThenThreeHighOnline(Integer lessThenThreeHighOnline) {
+	public void setLessThenThreeHighOnline(Boolean lessThenThreeHighOnline) {
 		this.lessThenThreeHighOnline = lessThenThreeHighOnline;
 	}
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -3638,7 +3638,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         List<ClassGroupTeachersDto> dataList = null;
         int count;
         if (Objects.nonNull(queryInfo.getLessThenThreeHighOnline())) {
-            List<Long> lessThenThreeClassGroupIds = classGroupStudentMapperDao.getLessThenThreeClassGroupIds(queryInfo.getOrganIds(),queryInfo.getHasDesc());
+            List<Long> lessThenThreeClassGroupIds = classGroupStudentMapperDao.getLessThenThreeClassGroupIds(queryInfo.getOrganIds(),queryInfo.getLessThenThreeHighOnline());
             params.put("classGroupIds", lessThenThreeClassGroupIds);
             if (CollectionUtils.isEmpty(lessThenThreeClassGroupIds)) {
                 count = 0;

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/FinancialExpenditureServiceImpl.java

@@ -29,6 +29,8 @@ import com.ym.mec.util.ini.IniFileUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.redisson.api.RBucket;
+import org.redisson.api.RedissonClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +46,7 @@ import java.math.BigDecimal;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 @Service
@@ -63,6 +66,8 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
     private TeacherDao teacherDao;
     @Autowired
     private FinancialExpenditureService financialExpenditureService;
+    @Autowired
+    private RedissonClient redissonClient;
 
     @Override
     public BaseDAO<Long, FinancialExpenditure> getDAO() {
@@ -225,6 +230,12 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void syncOaPayLog(Integer workOrderId,String fileUrl) throws Exception {
+        //防止幂等
+        String key = "syncOaPayLog:" + workOrderId;
+        RBucket<Object> bucket = redissonClient.getBucket(key);
+        if (!bucket.trySet(workOrderId, 2L, TimeUnit.SECONDS)) {
+            throw new BizException("正在同步oa审批记录,请勿重复操作");
+        }
         PWorkOrderInfo pWorkOrderInfo = financialExpenditureDao.getWorkOrderInfo(workOrderId);
         if (pWorkOrderInfo != null){
             Integer hasFinancial = financialExpenditureDao.findByBatchNoAndProcessNo(workOrderId);
@@ -320,7 +331,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                                                 financialExpenditure.setAmount(financialExpenditure.getAmount().add(new BigDecimal(Double.parseDouble(o.toString()))));
                                                 continue;
                                             }
-                                        }else if(name.contains("情况说明")){
+                                        }else if(name.contains("情况说明") || name.contains("事由") ){
                                             Object o = hashMap.get(inputDto.getModel());
                                             if(Objects.nonNull(o) && StringUtils.isNotEmpty(o.toString())){
                                                 financialExpenditure.setCause(o.toString());

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

@@ -155,8 +155,8 @@ public class OperatingReportNewServiceImpl extends BaseServiceImpl<Integer, Oper
 			operatingReportNew.setTotalIncome(operatingReportNew.getSaleAmount().add(operatingReportNew.getServiceAmount()).subtract(operatingReportNew.getBusinessRefund()));
 
 			operatingReportNew.setInternalSettlement(getAmount(collect18.get(organId)));
-			operatingReportNew.setFixedCosts(getAmount(collect7.get(organId)));
-			operatingReportNew.setVariableCosts(getAmount(collect8.get(organId)));
+			operatingReportNew.setVariableCosts(getAmount(collect7.get(organId)));
+			operatingReportNew.setFixedCosts(getAmount(collect8.get(organId)));
 			operatingReportNew.setTotalCost(operatingReportNew.getInternalSettlement().
 					add(operatingReportNew.getFixedCosts()).add(operatingReportNew.getVariableCosts()));
 

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -146,7 +146,8 @@ public class PayServiceImpl implements PayService {
 			List<Integer> ignoreOrganList = Arrays.asList(4);
 			
 			// 是否由平台收款
-			String isPlatformCollection = sysConfigDao.findConfigValue(SysConfigService.IS_OPEN_SMALL_CLASS_INCOME_TO_PLATFORM);
+			//String isPlatformCollection = sysConfigDao.findConfigValue(SysConfigService.IS_OPEN_SMALL_CLASS_INCOME_TO_PLATFORM);
+			String isPlatformCollection = "0";
 			
 			if (StringUtils.equals("1", isPlatformCollection) && !ignoreOrganList.contains(organId)) {
 	        	

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

@@ -183,7 +183,7 @@
 		left join student_payment_order spo ON spo.order_no_ = so.order_no_
 		left join music_group mg ON mg.id_ = spo.music_group_id_ AND spo.group_type_ = 'MUSIC'
 		where (mg.musical_instruments_provide_status_ = 1 AND mg.musical_instruments_provide_time_ = #{month}) OR
-		      (DATE_FORMAT(so.create_ime_,'%Y-%m') = #{month} AND (mg.musical_instruments_provide_status_ IS NULL OR mg.musical_instruments_provide_status_ = 1))
+		      (DATE_FORMAT(spo.pay_time_,'%Y-%m') = #{month} AND (mg.musical_instruments_provide_status_ IS NULL OR mg.musical_instruments_provide_status_ = 1))
 		group by so.organ_id_
 	</select>
 	<select id="sumCloudCourseAmount" resultType="java.util.Map">
@@ -222,7 +222,7 @@
 	</select>
 	<select id="sumFixedCosts" resultType="java.util.Map">
 		select fe.organ_id_ 'key',SUM(amount_) 'value' from financial_expenditure fe
-		where DATE_FORMAT(fe.create_time_,'%Y-%m') = #{month} AND fee_project_ IN (1,2,4,5) AND process_id_ = 28 group by fe.organ_id_;
+		where DATE_FORMAT(fe.create_time_,'%Y-%m') = #{month} AND fee_project_ IN (1,2,3,4,5) AND process_id_ = 28 group by fe.organ_id_;
 	</select>
 	<select id="sumCloudPreAmount" resultType="java.util.Map">
 		select cto.organ_id_ 'key',TRUNCATE(SUM(operating_amount_ / (TIMESTAMPDIFF(DAY,cto.start_time_,cto.end_time_) + 1) *
@@ -336,7 +336,7 @@
 	<select id="sumMaintenanceAmount" resultType="java.util.Map">
 		select spo.organ_id_ 'key',SUM(spod.price_) 'value' from student_payment_order_detail spod
 		left join student_payment_order spo ON spo.id_ = spod.payment_order_id_
-		where spod.type_ = 'MAINTENANCE' AND DATE_FORMAT(spod.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
+		where spod.type_ IN ('MAINTENANCE','REPAIR') AND DATE_FORMAT(spod.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
 		group by spo.organ_id_
 	</select>
 	<select id="sumLossCloudAmount" resultType="java.util.Map">