commit
This commit is contained in:
+12
-1
@@ -351,7 +351,8 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
|||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
@RequiresPermissions("theRapyRecuperation.schoolUnionUserQuery")
|
@RequiresPermissions("theRapyRecuperation.schoolUnionUserQuery")
|
||||||
public void exportXlsx(Integer year,
|
public void exportXlsx(PageForm pageForm,
|
||||||
|
Integer year,
|
||||||
String userName,
|
String userName,
|
||||||
String loginName,
|
String loginName,
|
||||||
String signUpMode,
|
String signUpMode,
|
||||||
@@ -362,6 +363,9 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
|||||||
String isTakePartIn,
|
String isTakePartIn,
|
||||||
HttpServletResponse response) {
|
HttpServletResponse response) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (pageForm == null) {
|
||||||
|
pageForm = new PageForm();
|
||||||
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
state.stateName,
|
state.stateName,
|
||||||
@@ -390,6 +394,13 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
|||||||
LEFT JOIN audit_state state ON state.stateId = enroll.stateId
|
LEFT JOIN audit_state state ON state.stateId = enroll.stateId
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
|
// 导出复用列表的通用检索和排序条件,保证列表查出什么,导出什么。
|
||||||
|
if (Strings.isNotBlank(pageForm.getSearchKeyword()) && Strings.isNotBlank(pageForm.getSearchName())) {
|
||||||
|
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||||
|
}
|
||||||
cnd.and("enroll.takePartInLineId", "is not", null);
|
cnd.and("enroll.takePartInLineId", "is not", null);
|
||||||
cnd.and("line.stateId", "=", 4);
|
cnd.and("line.stateId", "=", 4);
|
||||||
// 年度
|
// 年度
|
||||||
|
|||||||
@@ -869,15 +869,34 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCurrentLotValue() {
|
||||||
|
const lot = this.lotList.find(o => o.id === this.lineData.lotId)
|
||||||
|
if (lot && lot.lotValue) {
|
||||||
|
return Number(lot.lotValue)
|
||||||
|
}
|
||||||
|
if (this.lineData.playNumberOfDays) {
|
||||||
|
return Number(this.lineData.playNumberOfDays)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
},
|
||||||
calPlayTime(time) {
|
calPlayTime(time) {
|
||||||
const year = this.pageForm.year || new Date().getFullYear()
|
const year = this.pageForm.year || new Date().getFullYear()
|
||||||
const lot = this.lotList.find(o => o.id === this.lineData.lotId)
|
const lotValue = this.getCurrentLotValue()
|
||||||
const beforeTime = moment(year + '-09-01').add(-(Number(lot.lotValue)), 'days')
|
if (!lotValue) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const beforeTime = moment(year + '-09-01').add(-lotValue, 'days')
|
||||||
return !(time > new Date(year + '-06-30') && time < beforeTime)
|
return !(time > new Date(year + '-06-30') && time < beforeTime)
|
||||||
},
|
},
|
||||||
platStartChange(time, row) {
|
platStartChange(time, row) {
|
||||||
const lot = this.lotList.find(o => o.id === this.lineData.lotId)
|
const lotValue = this.getCurrentLotValue()
|
||||||
const afterTime = moment(time).add(Number(lot.lotValue), 'days')
|
if (!lotValue) {
|
||||||
|
row.playStartTime = null
|
||||||
|
row.playEndTime = null
|
||||||
|
this.$message.warning('未找到线路标段,请检查线路标段配置')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const afterTime = moment(time).add(lotValue, 'days')
|
||||||
row.playEndTime = afterTime.format('YYYY-MM-DD HH:mm:ss')
|
row.playEndTime = afterTime.format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
@@ -978,8 +997,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.lineData = resp.data
|
this.lineData = resp.data
|
||||||
},
|
},
|
||||||
async openSetLineTime({id, lineName, usUnionId, signUpMode}) {
|
async openSetLineTime({id, lineName, usUnionId, signUpMode}) {
|
||||||
await this.getLineConfig(id)
|
|
||||||
await this.getLineInfo(id)
|
await this.getLineInfo(id)
|
||||||
|
// 出行日期选择必须使用线路自身年度的标段,避免历史年度线路匹配到当前年度标段列表。
|
||||||
|
await this.getLotList(this.lineData.year || this.pageForm.year)
|
||||||
|
await this.getLineConfig(id)
|
||||||
const resp = await $.post(loc() + '/selectLineInfo', {
|
const resp = await $.post(loc() + '/selectLineInfo', {
|
||||||
lineId: id,
|
lineId: id,
|
||||||
unionId: usUnionId,
|
unionId: usUnionId,
|
||||||
|
|||||||
+2
-11
@@ -638,17 +638,8 @@ layout("/layouts/platform.html"){
|
|||||||
if (!canExport) {
|
if (!canExport) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const {year, userName, loginName, unionId, signUpMode, regionalNature, isTakePartIn, takePartInLineId, lotId} = this.pageForm
|
// 使用列表当前查询参数生成导出地址,确保列表查出什么,导出什么。
|
||||||
window.open('/platform/theRapyRecuperation/schoolUnionUserQuery/exportXlsx?year=' +
|
window.open('/platform/theRapyRecuperation/schoolUnionUserQuery/exportXlsx?' + $.param(this.pageForm))
|
||||||
year
|
|
||||||
+ '&userName=' + userName
|
|
||||||
+ '&loginName=' + loginName
|
|
||||||
+ '&unionId=' + unionId
|
|
||||||
+ '&signUpMode=' + signUpMode
|
|
||||||
+ '®ionalNature=' + regionalNature
|
|
||||||
+ '&isTakePartIn=' + isTakePartIn
|
|
||||||
+ '&takePartInLineId=' + takePartInLineId
|
|
||||||
+ '&lotId=' + lotId)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async checkExportConfig(year) {
|
async checkExportConfig(year) {
|
||||||
|
|||||||
Reference in New Issue
Block a user