feat: v3版疗休养优化6

This commit is contained in:
2026-10-26 17:33:07 +08:00
parent 56cc3fee91
commit 6ea864cb64
5 changed files with 50 additions and 18 deletions
@@ -96,12 +96,12 @@ public class TheRapyRecuperationLineController {
/**
* 新线路导入模板中“联系方式”列下标,设置为文本格式避免手机号被Excel转成科学计数法。
*/
private static final int LINE_IMPORT_CONTACT_PHONE_COLUMN_INDEX = 10;
private static final int LINE_IMPORT_CONTACT_PHONE_COLUMN_INDEX = 12;
/**
* 新线路导入模板中“移动端缩略图”列下标,用于定位Excel内嵌图片。
*/
private static final int LINE_IMPORT_THUMBNAIL_COLUMN_INDEX = 13;
private static final int LINE_IMPORT_THUMBNAIL_COLUMN_INDEX = 15;
@Inject
private TheRapyRecuperationLineService lineService;
@@ -458,7 +458,7 @@ public class TheRapyRecuperationLineController {
List<String> excelLots = lots.stream().map(v -> v.getLotName() + "_" + v.getId()).collect(Collectors.toList());
List<Field> needAddReplaceFields = Arrays.stream(TheRapyLineImportExcelMode.class.getDeclaredFields())
.filter(v -> List.of("lotId", "regionalNature", "signUpMode", "isEnabled").contains(v.getName()))
.filter(v -> List.of("lotId", "regionalNature", "signUpMode", "isEnabled", "familySignUp").contains(v.getName()))
.collect(Collectors.toList());
for (Field field : needAddReplaceFields) {
Excel excelAnnotation = field.getAnnotation(Excel.class);
@@ -476,7 +476,7 @@ public class TheRapyRecuperationLineController {
e.put("replace", buildRegionalNatureExcelOptions());
} else if (field.getName().equals("signUpMode")) {
e.put("replace", buildSignUpModeExcelOptions());
} else if (field.getName().equals("isEnabled")) {
} else if (field.getName().equals("isEnabled") || field.getName().equals("familySignUp")) {
e.put("replace", new String[]{"是_是", "否_否"});
}
}
@@ -24,6 +24,9 @@ public class TheRapyLineImportExcelMode {
@Excel(name = "线路类型")
private String regionalNature;
@Excel(name = "旅行社名称")
private String travelAgencyName;
@Excel(name = "交通工具")
private String trafficTools;
@@ -33,6 +36,9 @@ public class TheRapyLineImportExcelMode {
@Excel(name = "预计费用(元/人次)")
private String estimatedCost;
@Excel(name = "家属报名")
private String familySignUp;
@Excel(name = "组织形式")
private String signUpMode;
@@ -16,6 +16,7 @@ import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecupera
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLine;
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLineUnionSelect;
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLot;
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationTravelAgency;
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.service.TheRapyRecuperationLineService;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
@@ -229,6 +230,8 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
&& StrUtil.isBlank(mode.getLineContactPhone())
&& StrUtil.isBlank(mode.getContent())
&& StrUtil.isBlank(mode.getIsEnabled())
&& StrUtil.isBlank(mode.getTravelAgencyName())
&& StrUtil.isBlank(mode.getFamilySignUp())
&& StrUtil.isBlank(mode.getFiles()));
}
@@ -239,6 +242,12 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
* @param rowNumber Excel行号
*/
private void validImportRequired(TheRapyLineImportExcelMode mode, int rowNumber) {
if (StrUtil.isBlank(mode.getTravelAgencyName())) {
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称不能为空");
}
if (!StrUtil.equalsAny(StrUtil.trim(mode.getFamilySignUp()), "是", "否")) {
throw new IllegalArgumentException("第" + rowNumber + "行家属报名必填,请填写是或否");
}
if (mode.getYear() == null) {
throw new IllegalArgumentException("第" + rowNumber + "行年度不能为空");
}
@@ -268,7 +277,17 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
* @return 线路实体
*/
private TheRapyRecuperationLine buildLineByImportMode(TheRapyLineImportExcelMode mode, TheRapyLineImportImageMode imageMode, int rowNumber) {
List<TheRapyRecuperationTravelAgency> agencies = dao().query(TheRapyRecuperationTravelAgency.class,
Cnd.where("year", "=", mode.getYear()).and("travelAgencyName", "=", StrUtil.trim(mode.getTravelAgencyName())));
if (agencies.isEmpty()) {
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称在该年度不存在");
}
if (agencies.size() > 1) {
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称在该年度存在重名,无法确定旅行社");
}
TheRapyRecuperationLine line = new TheRapyRecuperationLine();
line.setTravelAgencyId(agencies.get(0).getId());
line.setIsFamilySignUp("是".equals(StrUtil.trim(mode.getFamilySignUp())));
line.setYear(mode.getYear());
line.setSerialNumber(mode.getSerialNumber());
line.setLineName(mode.getLineName());
@@ -821,6 +821,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
const valid = await this.$validateForm(this.$refs['form'])
if (!valid) return
const confirm = await this.$confirmAction('确定保存该线路吗?', '保存确认', {
confirmButtonText: '确认保存',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm !== 'confirm') return
loading = this.$loading({
lock: true,
text: '提交中',
@@ -829,18 +836,16 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
});
delete this.formData.travelAgency
const resp = await $.post(loc() + '/doSubmit', this.formData)
loading.close()
loading = null
if (resp.code === 0) {
this.$message.success(resp.msg)
await this.$confirm('需要将该线路设置为出行线路吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
cancelButtonText: '返回列表',
type: 'warning'
}).then(async () => {
if ("${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')}" === 'true') {
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineXghSelect?mode=2')
} else {
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineFghSelect?mode=1')
}
window.top.location.href = '/platform/inclusiveTherapyV3?screen=schoolSelect'
}).catch(() => {
this.$refs.guava.index()
this.pageData()
@@ -145,16 +145,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="row.isDisabled">
</el-switch>
</template>-->
<template slot-scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
{{signUpModeName(signUpMode)}}
<template slot-scope="{row}">
<template v-if="column.prop==='signUpMode'">
{{signUpModeName(row.signUpMode)}}
</template>
<template slot-scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
{{createModeName(createMode)}}
<template v-else-if="column.prop==='createMode'">
{{createModeName(row.createMode)}}
</template>
<template slot-scope="{row}" v-else-if="column.prop==='belongUnionName'">
<template v-else-if="column.prop==='belongUnionName'">
{{pageForm.mode == 2 && pageForm.selectStatus == 1 ? '校工会' : row.belongUnionName}}
</template>
<template slot-scope="{row}" v-else-if="column.prop==='playTime'">
<template v-else-if="column.prop==='playTime'">
<template v-if="row.playTimes">
<!--<el-tooltip placement="top">
<div slot="content">
@@ -183,13 +184,14 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
选择并设置出行时间段
</el-button>
</template>
<template slot-scope="{row}" v-else-if="column.prop==='createUnionName'">
<template v-else-if="column.prop==='createUnionName'">
<span v-if="!row.isSelect">
{{row.createUnionName}}
</span>
<span v-else>{{row.belongUnionName}}</span>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
<template v-else>{{row[column.prop]}}</template>
</template>
</el-table-column>
<el-table-column label="操作" width="100px">