yonge vor 5 Jahren
Ursprung
Commit
f47f82555e

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalender.java

@@ -17,7 +17,7 @@ import com.ym.mec.common.enums.BaseEnum;
 public class MusicGroupPaymentCalender {
 
 	public enum PaymentCalenderStatusEnum implements BaseEnum<String, PaymentCalenderStatusEnum> {
-		AUDITING("审核中"), REJECT("拒绝"), NO("未开启缴费"), OPEN("开启缴费"), OVER("缴费已结束");
+		AUDITING("审核中"), REJECT("拒绝"), NO("未开启缴费"), OPEN("开启缴费"), OVER("缴费已结束"), PAID("已缴费");
 
 		private String desc;
 

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderService.java

@@ -12,6 +12,7 @@ import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
+
 import org.apache.ibatis.annotations.Param;
 
 public interface MusicGroupPaymentCalenderService extends BaseService<Long, MusicGroupPaymentCalender> {
@@ -36,6 +37,14 @@ public interface MusicGroupPaymentCalenderService extends BaseService<Long, Musi
 	Long merge(MusicGroupPaymentCalender musicGroupPaymentCalender);
 	
 	/**
+	 * 
+	 * @param id
+	 * @param memo
+	 * @return
+	 */
+	boolean makesureSchoolePaid(Long id, String memo);
+	
+	/**
 	 * 自动更新付款日历记录状态
 	 * @return
 	 */

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -29,6 +29,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -416,6 +417,25 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		return musicGroupPaymentCalender.getId();
 	}
 
+	@Override
+	public boolean makesureSchoolePaid(Long id, String memo) {
+		MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.get(id);
+		if(musicGroupPaymentCalender == null){
+			throw new BizException("查询缴费信息失败");
+		}
+		
+		if(musicGroupPaymentCalender.getPayUserType() != PayUserType.SCHOOL){
+			throw new BizException("只有学校缴费才能确认缴费状态");
+		}
+		
+		musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.PAID);
+		musicGroupPaymentCalender.setMemo(memo);
+		musicGroupPaymentCalender.setUpdateTime(new Date());
+		musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
+		
+		return true;
+	}
+
 	public void addStudent(MusicGroupPaymentCalender musicGroupPaymentCalender,List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettingsList){
 		//如果是进行中加学生
 		Date date = new Date();

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupPaymentCalenderController.java

@@ -95,6 +95,14 @@ public class MusicGroupPaymentCalenderController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "确认学校已缴费")
+    @PostMapping("/makesureSchoolePaid")
+    @PreAuthorize("@pcs.hasPermissions('musicGroupPaymentCalender/makesureSchoolePaid')")
+	public Object makesureSchoolePaid(Long id, String memo) {
+		musicGroupPaymentCalenderService.makesureSchoolePaid(id, memo);
+		return succeed();
+	}
+
     @ApiOperation(value = "乐团缴费日历审核列表")
     @GetMapping("/auditList")
     @PreAuthorize("@pcs.hasPermissions('musicGroupPaymentCalender/auditList')")