diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java index 8dd5910..6561644 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java @@ -120,9 +120,9 @@ public class TheRapyRecuperationLine extends BaseModel { private Integer estimatedFamilyNumbers; @Column - @ColDefine(type = ColType.MYSQL_JSON) + @ColDefine(type = ColType.VARCHAR, width = 100) @Comment("缩略图") - private List files; + private String files; @Column @ColDefine(type = ColType.INT) diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java index f722f87..decb3e9 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java @@ -75,9 +75,9 @@ public class TheRapyRecuperationTravelAgency extends BaseModel { private boolean isDisabled; @Column - @ColDefine(type = ColType.MYSQL_JSON) + @ColDefine(type = ColType.VARCHAR, width = 100) @Comment("缩略图") - private List files; + private String files; @Column @ColDefine(type = ColType.MYSQL_JSON) diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/service/impl/TheRapyRecuperationEnrollServiceImpl.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/service/impl/TheRapyRecuperationEnrollServiceImpl.java index 98604e3..d2b16dc 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/service/impl/TheRapyRecuperationEnrollServiceImpl.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/service/impl/TheRapyRecuperationEnrollServiceImpl.java @@ -637,6 +637,23 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl lineList = dao().query(TheRapyRecuperationLine.class, Cnd.where("year", "=", DateUtil.thisYear()) + .and("isDisabled", "=", false)); + List lineIds = lineList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList()); + //获取这些线路在选择表中的选择id,因为报名表存的是选择id + List selectList = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", lineIds)); + List selectIds = selectList.stream().map(TheRapyRecuperationLineUnionSelect::getId).collect(Collectors.toList()); + //获取这些省外线路的总报名人数 + List enrollList = dao().query(TheRapyRecuperationEnroll.class, Cnd.where("takePartInLineId", "in", selectIds) + .and("isNormal", "=", true).and("signingUptime", "=", DateUtil.thisYear()) + .and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))); + //活动范围总人数 + List userScopes = dao().query(ActivityUserScope.class, Cnd.where("groupId", "=", config.getActivityGroupId())); + int result = (int) Math.floor((double) userScopes.size() / 3); + if (enrollList.size() >= result) { + return Map.of(false, "已报人数超过三分之一,不能报名"); + } } } } diff --git a/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html b/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html index 110fb71..98309a0 100644 --- a/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html +++ b/src/main/resources/views/mobile/therapyRecuperation/lineInfo.html @@ -839,17 +839,20 @@ layout("/mobile/platform.html"){ pdfh5 = new Pdfh5('#demo', { pdfurl: href, }) - this.readPDFPicture(pdfh5) }) }catch (e) { this.isPdf = true //document.addEventListener('click', (event) => this.handleClick(event, [], [])) } + + this.$nextTick(() => { + this.readPDFPicture(pdfh5) + }) }, mounted() { //window.addEventListener('scroll', this.scrollToTop) }, - destroyed() { + beforeDestroy() { //window.removeEventListener('scroll', this.scrollToTop) }, }) diff --git a/src/main/resources/views/platform/theRapyRecuperation/baseManage/baseManagement.html b/src/main/resources/views/platform/theRapyRecuperation/baseManage/baseManagement.html index 97f6049..70c00d6 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/baseManage/baseManagement.html +++ b/src/main/resources/views/platform/theRapyRecuperation/baseManage/baseManagement.html @@ -522,6 +522,7 @@ layout("/layouts/platform.html"){ baseContactNumber: '', weekIn: 1, allowDay: [], + travelAgencyPlace: '', }, tableColumns: [ {label: '年度', prop: 'year', sortable: true}, diff --git a/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html b/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html index e641786..52aa291 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html +++ b/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html @@ -261,7 +261,7 @@ layout("/layouts/platform.html"){ - + @@ -390,11 +390,11 @@ layout("/layouts/platform.html"){ - + @@ -595,7 +595,7 @@ layout("/layouts/platform.html"){ signUpStartTime: null, signUpEndTime: null, changeEndTime: null, - files: [], + files: null, signUpMode: null, createMode: null, playStartTime: null, diff --git a/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html b/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html index 9db0619..6b02798 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html +++ b/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html @@ -190,11 +190,11 @@ layout("/layouts/platform.html"){ - + diff --git a/src/main/resources/views/platform/theRapyRecuperation/process/lineUnionSelect.html b/src/main/resources/views/platform/theRapyRecuperation/process/lineUnionSelect.html index 59200b4..3b98b0f 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/process/lineUnionSelect.html +++ b/src/main/resources/views/platform/theRapyRecuperation/process/lineUnionSelect.html @@ -359,7 +359,7 @@ layout("/layouts/platform.html"){ - + @@ -374,7 +374,7 @@ layout("/layouts/platform.html"){ { pattern: /^1[34578]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' } ]" label-width="0"> - + @@ -405,7 +405,7 @@ layout("/layouts/platform.html"){ - +