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