This commit is contained in:
=
2026-06-09 10:03:31 +08:00
parent 1cf8d089da
commit e1a8679b89
2 changed files with 12 additions and 3 deletions
@@ -280,13 +280,20 @@ public class TheRapyRecuperationLineController {
/** /**
* 旅行社 * 旅行社
* *
* @param year 年度,手机端筛选传入时只返回该年度启用的旅行社
* @return {@link Object} * @return {@link Object}
*/ */
@At @At
@ViReturn @ViReturn
@RequiresPermissions("theRapyRecuperation.line") @RequiresPermissions("theRapyRecuperation.line")
public Object getTravelAgencyOptions() { public Object getTravelAgencyOptions(Integer year) {
List<TheRapyRecuperationTravelAgency> travelAgencies = lineService.dao().query(TheRapyRecuperationTravelAgency.class, Cnd.NEW().desc("year").asc("serialNumber")); Cnd cnd = Cnd.NEW();
if (year != null) {
cnd.and("year", "=", year);
cnd.and("isDisabled", "=", false);
}
cnd.desc("year").asc("serialNumber");
List<TheRapyRecuperationTravelAgency> travelAgencies = lineService.dao().query(TheRapyRecuperationTravelAgency.class, cnd);
return travelAgencies; return travelAgencies;
} }
@@ -666,7 +666,9 @@ layout("/mobile/platform.html"){
} }
}, },
async getTravelAgencyOptions() { async getTravelAgencyOptions() {
const {data} = await $.get('/platform/theRapyRecuperation/line/getTravelAgencyOptions') const {data} = await $.get('/platform/theRapyRecuperation/line/getTravelAgencyOptions', {
year: this.pageForm.year || new Date().getFullYear()
})
this.travelOptions = data.map(v => { this.travelOptions = data.map(v => {
return { return {
...v, ...v,