diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/controller/basicManage/TheRapyRecuperationLineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/controller/basicManage/TheRapyRecuperationLineController.java index d7ddab1..6ec9f99 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/controller/basicManage/TheRapyRecuperationLineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/controller/basicManage/TheRapyRecuperationLineController.java @@ -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 excelLots = lots.stream().map(v -> v.getLotName() + "_" + v.getId()).collect(Collectors.toList()); List 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[]{"是_是", "否_否"}); } } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/mode/TheRapyLineImportExcelMode.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/mode/TheRapyLineImportExcelMode.java index 156e505..f568cbe 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/mode/TheRapyLineImportExcelMode.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/mode/TheRapyLineImportExcelMode.java @@ -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; diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/service/impl/TheRapyRecuperationLineServiceImpl.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/service/impl/TheRapyRecuperationLineServiceImpl.java index 5e950f8..6cdb639 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/service/impl/TheRapyRecuperationLineServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/therapyRecuperation/service/impl/TheRapyRecuperationLineServiceImpl.java @@ -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 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()); diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/line.html b/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/line.html index 33239bf..48b922a 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/line.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/line.html @@ -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() diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html b/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html index 5b7e844..5a7ef50 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html @@ -145,16 +145,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){ v-model="row.isDisabled"> --> -