nickchange
2023-11-09 c036557db88c6297b9a626a892dce35c14ab8ee5
cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/CoursePackageService.java
@@ -9,6 +9,7 @@
import com.dsh.guns.config.UserExt;
import com.dsh.guns.core.support.HttpKit;
import com.dsh.guns.core.util.ToolUtil;
import com.dsh.guns.modular.system.model.CourseCounsum;
import com.dsh.guns.modular.system.model.TStore;
import com.dsh.guns.modular.system.service.ICoursePackageService;
import com.dsh.guns.modular.system.service.IStoreService;
@@ -474,6 +475,7 @@
    }
    /**
     * 上传消课凭证
     * @param id
@@ -483,7 +485,12 @@
     */
    @Override
    public ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour) {
        CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id);
//        CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id);
        List<CoursePackageScheduling> coursePackageSchedulings =  coursePackageSchedulingClient.queryCoursePackageSchedulingsById(id);
        for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) {
        if(coursePackageScheduling.getStatus() == 1 || coursePackageScheduling.getStatus() == 4){
            return ResultUtil.error("不能添加消课凭证");
        }
@@ -522,7 +529,15 @@
            cancelledClasses.setCancelledClassesNumber(deductClassHour);}
            cancelledClasses.setInsertTime(new Date());
            cancelledClassesClient.addCancelledClasses(cancelledClasses);
        }
        }
        return ResultUtil.success();
    }