commit
This commit is contained in:
+8
-3
@@ -194,6 +194,7 @@ public class TheRapyRecuperationLineUnionSelectController {
|
||||
* 分工会选择线路时间
|
||||
*
|
||||
* @param lineUnionSelects 分工会选择线路
|
||||
* @param year 页面选择年度,用于写入选择记录年度,保证历史年度线路能按年度查询
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At("/selectLineTimes")
|
||||
@@ -201,15 +202,19 @@ public class TheRapyRecuperationLineUnionSelectController {
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"theRapyRecuperation.lineFghSelect", "theRapyRecuperation.lineXghSelect", "theRapyRecuperation.linePersonalSelect"}, logical = Logical.OR)
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object selectLineTimes(@Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects) {
|
||||
public Object selectLineTimes(@Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects,
|
||||
@Param(value = "year", required = false) Integer year) {
|
||||
if (Lang.isNotEmpty(lineUnionSelects)) {
|
||||
Integer selectYear = year == null ? DateUtil.thisYear() : year;
|
||||
Date selectTime = DateUtil.parse(selectYear + "-01-01 00:00:00");
|
||||
TheRapyRecuperationLineUnionSelect lineUnionSelect = lineUnionSelects[0];
|
||||
List<TheRapyRecuperationLineUnionSelect> oldUnionSelects = unionSelectService.query(Cnd.where("selectUserId", "=", ShiroUtil.getUserId()).and("lineId", "=", lineUnionSelect.getLineId()));
|
||||
// 按页面年度维护选择时间段,避免编辑历史年度线路时误删同一线路其他年度的选择记录。
|
||||
List<TheRapyRecuperationLineUnionSelect> oldUnionSelects = unionSelectService.query(Cnd.where("selectUserId", "=", ShiroUtil.getUserId()).and("lineId", "=", lineUnionSelect.getLineId()).and("YEAR(selectTime)", "=", selectYear));
|
||||
|
||||
TheRapyRecuperationLineUnionSelect theRapyRecuperationLineUnionSelect = dao.fetch(TheRapyRecuperationLineUnionSelect.class, Cnd.where("id", "=", lineUnionSelect.getId()));
|
||||
|
||||
for (TheRapyRecuperationLineUnionSelect unionSelect : lineUnionSelects) {
|
||||
unionSelect.setSelectTime(new Date());
|
||||
unionSelect.setSelectTime(selectTime);
|
||||
unionSelect.setSelectUserId(ShiroUtil.getPlatformUid());
|
||||
unionSelect.setUnionId(Vi.getUnionId());
|
||||
unionSelect.setIsOpen(Lang.isNotEmpty(theRapyRecuperationLineUnionSelect)?theRapyRecuperationLineUnionSelect.getIsOpen():false);
|
||||
|
||||
+20
-1
@@ -82,6 +82,7 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
* @param takePartInLineId 线路id
|
||||
* @param lotId 标段id
|
||||
* @param regionalNature 区域性质 省内 省外
|
||||
* @param isTakePartIn 是否参加
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@@ -94,7 +95,8 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
String unionId,
|
||||
String takePartInLineId,
|
||||
String lotId,
|
||||
String regionalNature) {
|
||||
String regionalNature,
|
||||
String isTakePartIn) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -157,6 +159,8 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
// 区域
|
||||
cnd.andEX("line.regionalNature", "=", regionalNature);
|
||||
|
||||
addTakePartInCondition(cnd, isTakePartIn);
|
||||
|
||||
// 校工会可查询指定分工会
|
||||
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
||||
|
||||
@@ -355,6 +359,7 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
String takePartInLineId,
|
||||
String lotId,
|
||||
String regionalNature,
|
||||
String isTakePartIn,
|
||||
HttpServletResponse response) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -410,6 +415,8 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
// 区域
|
||||
cnd.andEX("line.regionalNature", "=", regionalNature);
|
||||
|
||||
addTakePartInCondition(cnd, isTakePartIn);
|
||||
|
||||
// 校工会可查询指定分工会
|
||||
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
||||
|
||||
@@ -536,4 +543,16 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按是否参加筛选,空值表示查询全部。
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @param isTakePartIn 是否参加
|
||||
*/
|
||||
private void addTakePartInCondition(Cnd cnd, String isTakePartIn) {
|
||||
if ("true".equals(isTakePartIn) || "false".equals(isTakePartIn)) {
|
||||
cnd.andEX("enroll.isTakePartIn", "=", Boolean.valueOf(isTakePartIn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,18 +109,18 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<span>线  路:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="doSearch">
|
||||
<el-option v-for="item in lineList"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.signUpMode + ')'"
|
||||
:value="item.lineId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <span>线  路:</span>-->
|
||||
<!-- <el-select v-model="pageForm.takePartInLineId" filterable clearable-->
|
||||
<!-- placeholder="请选择线路"-->
|
||||
<!-- style="width: 80%" @change="doSearch">-->
|
||||
<!-- <el-option v-for="item in lineList"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.signUpMode + ')'"-->
|
||||
<!-- :value="item.lineId">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -870,7 +870,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
calPlayTime(time) {
|
||||
const year = new Date().getFullYear()
|
||||
const year = this.pageForm.year || new Date().getFullYear()
|
||||
const lot = this.lotList.find(o => o.id === this.lineData.lotId)
|
||||
const beforeTime = moment(year + '-09-01').add(-(Number(lot.lotValue)), 'days')
|
||||
return !(time > new Date(year + '-06-30') && time < beforeTime)
|
||||
@@ -1034,7 +1034,10 @@ layout("/layouts/platform.html"){
|
||||
mode: GetQueryString('mode')
|
||||
}
|
||||
})
|
||||
const resp = await $.post(loc() + '/selectLineTimes', {lineUnionSelects: JSON.stringify(fmtData)})
|
||||
const resp = await $.post(loc() + '/selectLineTimes', {
|
||||
lineUnionSelects: JSON.stringify(fmtData),
|
||||
year: this.pageForm.year
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.pageData()
|
||||
|
||||
+47
-9
@@ -119,9 +119,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="route-line">
|
||||
<div class="route-line-title">区域</div>
|
||||
<div class="route-line-content">
|
||||
<div class="form-row">
|
||||
<el-form-item label="区域">
|
||||
<el-radio-group @change="doSearch"
|
||||
size="small"
|
||||
v-model="pageForm.regionalNature">
|
||||
@@ -129,12 +128,23 @@ layout("/layouts/platform.html"){
|
||||
<el-radio label="省内" border>省内</el-radio>
|
||||
<el-radio label="省外" border>省外</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="参加状态">
|
||||
<el-radio-group @change="doSearch"
|
||||
size="small"
|
||||
v-model="pageForm.isTakePartIn">
|
||||
<el-radio label="" border>全部</el-radio>
|
||||
<el-radio label="true" border>已参加</el-radio>
|
||||
<el-radio label="false" border>未参加</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex-grow-1">
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<el-form-item label="线路选择">
|
||||
<el-select v-model="pageForm.takePartInLineId" placeholder="请选择线路" clearable
|
||||
<el-select v-model="pageForm.takePartInLineId" placeholder="请选择线路" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in takePartInLines"
|
||||
@@ -405,7 +415,8 @@ layout("/layouts/platform.html"){
|
||||
unionId: '',
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: ''
|
||||
regionalNature: '',
|
||||
isTakePartIn: ''
|
||||
},
|
||||
takePartInLines: [],
|
||||
tableColumns: [
|
||||
@@ -451,6 +462,7 @@ layout("/layouts/platform.html"){
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isTakePartIn: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
@@ -614,11 +626,19 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
noSignExport() {
|
||||
async noSignExport() {
|
||||
const canExport = await this.checkExportConfig(this.pageForm.year)
|
||||
if (!canExport) {
|
||||
return
|
||||
}
|
||||
window.open('/platform/theRapyRecuperation/schoolUnionUserQuery/noSignExport?year=' + this.pageForm.year)
|
||||
},
|
||||
doExport() {
|
||||
const {year, userName, loginName, unionId, signUpMode, regionalNature, takePartInLineId, lotId} = this.pageForm
|
||||
async doExport() {
|
||||
const canExport = await this.checkExportConfig(this.pageForm.year)
|
||||
if (!canExport) {
|
||||
return
|
||||
}
|
||||
const {year, userName, loginName, unionId, signUpMode, regionalNature, isTakePartIn, takePartInLineId, lotId} = this.pageForm
|
||||
window.open('/platform/theRapyRecuperation/schoolUnionUserQuery/exportXlsx?year=' +
|
||||
year
|
||||
+ '&userName=' + userName
|
||||
@@ -626,10 +646,28 @@ layout("/layouts/platform.html"){
|
||||
+ '&unionId=' + unionId
|
||||
+ '&signUpMode=' + signUpMode
|
||||
+ '®ionalNature=' + regionalNature
|
||||
+ '&isTakePartIn=' + isTakePartIn
|
||||
+ '&takePartInLineId=' + takePartInLineId
|
||||
+ '&lotId=' + lotId)
|
||||
},
|
||||
|
||||
async checkExportConfig(year) {
|
||||
try {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
|
||||
year: year || this.pageForm.year
|
||||
})
|
||||
// 导出依赖年度疗休养配置生成动态列,配置缺失时先提示,避免打开空白下载页。
|
||||
if (res.code !== 0 || !res.data) {
|
||||
this.$message.warning('当前年度疗休养配置不存在,请先维护年度配置')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} catch (e) {
|
||||
this.$message.warning('年度疗休养配置校验失败,请稍后重试')
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
// 打开设置参加人员
|
||||
openSetUpPart() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
|
||||
Reference in New Issue
Block a user