Commit ef1f213f456031d95e504a4c75a501c0f352e15f
1 parent
6a5c37ca
1、排班计划管理后端国际化改造
Showing
5 changed files
with
12 additions
and
7 deletions
src/main/java/com/bsth/controller/schedule/core/legacy/EmployeeConfigInfoController.java
| @@ -9,6 +9,7 @@ import com.bsth.entity.sys.CompanyAuthority; | @@ -9,6 +9,7 @@ import com.bsth.entity.sys.CompanyAuthority; | ||
| 9 | import com.bsth.repository.schedule.EmployeeConfigInfoRepository; | 9 | import com.bsth.repository.schedule.EmployeeConfigInfoRepository; |
| 10 | import com.bsth.service.schedule.EmployeeConfigInfoService; | 10 | import com.bsth.service.schedule.EmployeeConfigInfoService; |
| 11 | import com.bsth.service.schedule.exception.ScheduleException; | 11 | import com.bsth.service.schedule.exception.ScheduleException; |
| 12 | +import com.bsth.util.I18n; | ||
| 12 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | 14 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
| 14 | import org.springframework.web.bind.annotation.*; | 15 | import org.springframework.web.bind.annotation.*; |
| @@ -77,7 +78,7 @@ public class EmployeeConfigInfoController extends BController<EmployeeConfigInfo | @@ -77,7 +78,7 @@ public class EmployeeConfigInfoController extends BController<EmployeeConfigInfo | ||
| 77 | public void exportValidateGetDestroyInfo(HttpServletResponse response) throws Exception { | 78 | public void exportValidateGetDestroyInfo(HttpServletResponse response) throws Exception { |
| 78 | // 流输出导出文件 | 79 | // 流输出导出文件 |
| 79 | response.setHeader("content-type", "application/octet-stream"); | 80 | response.setHeader("content-type", "application/octet-stream"); |
| 80 | - response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("$$$$$${txt-929}.txt", "UTF-8")); | 81 | + response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(I18n.getInstance().getMessage("employeeConfigInfoController_line81_txt-929"), "UTF-8")); |
| 81 | response.setContentType("application/octet-stream"); | 82 | response.setContentType("application/octet-stream"); |
| 82 | 83 | ||
| 83 | try ( | 84 | try ( |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanInfoServiceImpl.java
| @@ -3,6 +3,7 @@ package com.bsth.service.schedule.impl; | @@ -3,6 +3,7 @@ package com.bsth.service.schedule.impl; | ||
| 3 | import com.bsth.entity.schedule.SchedulePlanInfo; | 3 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 4 | import com.bsth.repository.schedule.SchedulePlanInfoRepository; | 4 | import com.bsth.repository.schedule.SchedulePlanInfoRepository; |
| 5 | import com.bsth.service.schedule.SchedulePlanInfoService; | 5 | import com.bsth.service.schedule.SchedulePlanInfoService; |
| 6 | +import com.bsth.util.I18n; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.jdbc.core.JdbcTemplate; | 8 | import org.springframework.jdbc.core.JdbcTemplate; |
| 8 | import org.springframework.jdbc.core.RowCallbackHandler; | 9 | import org.springframework.jdbc.core.RowCallbackHandler; |
| @@ -185,7 +186,7 @@ public class SchedulePlanInfoServiceImpl extends BServiceImpl<SchedulePlanInfo, | @@ -185,7 +186,7 @@ public class SchedulePlanInfoServiceImpl extends BServiceImpl<SchedulePlanInfo, | ||
| 185 | } | 186 | } |
| 186 | 187 | ||
| 187 | } else { | 188 | } else { |
| 188 | - throw new RuntimeException("未知的更新类型,type=" + type); | 189 | + throw new RuntimeException(I18n.getInstance().getMessage("schedulePlanInfoServiceImpl_line189", String.valueOf(type))); |
| 189 | } | 190 | } |
| 190 | 191 | ||
| 191 | return result; | 192 | return result; |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| @@ -13,6 +13,7 @@ import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.CalcuParam; | @@ -13,6 +13,7 @@ import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.CalcuParam; | ||
| 13 | import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.Result; | 13 | import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.Result; |
| 14 | import com.bsth.service.schedule.impl.plan.DroolsSchedulePlan; | 14 | import com.bsth.service.schedule.impl.plan.DroolsSchedulePlan; |
| 15 | import com.bsth.service.schedule.impl.plan.ScheduleRuleService; | 15 | import com.bsth.service.schedule.impl.plan.ScheduleRuleService; |
| 16 | +import com.bsth.util.I18n; | ||
| 16 | import org.joda.time.DateTime; | 17 | import org.joda.time.DateTime; |
| 17 | import org.kie.api.KieBase; | 18 | import org.kie.api.KieBase; |
| 18 | import org.kie.api.runtime.KieSession; | 19 | import org.kie.api.runtime.KieSession; |
| @@ -114,7 +115,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -114,7 +115,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 114 | 115 | ||
| 115 | return new SchedulePlan(); | 116 | return new SchedulePlan(); |
| 116 | } else { | 117 | } else { |
| 117 | - throw new ScheduleException("当前线路正在排班,请稍后再操作..."); | 118 | + throw new ScheduleException(I18n.getInstance().getMessage("schedulePlanServiceImpl_line118")); |
| 118 | } | 119 | } |
| 119 | } catch (Exception exp) { | 120 | } catch (Exception exp) { |
| 120 | throw new RuntimeException(exp); | 121 | throw new RuntimeException(exp); |
src/main/resources/message_en_US.properties
| @@ -4703,9 +4703,10 @@ timetableExcelDataImportStrategyImpl_line145_txt-2115=import timetable failure. | @@ -4703,9 +4703,10 @@ timetableExcelDataImportStrategyImpl_line145_txt-2115=import timetable failure. | ||
| 4703 | timetableExcelDataImportStrategyImpl_line203=unknown timetableExcelFormatType[######{0}] | 4703 | timetableExcelDataImportStrategyImpl_line203=unknown timetableExcelFormatType[######{0}] |
| 4704 | timetableExcelDataImportStrategyImpl_line208_txt-2115=import timetable failure. | 4704 | timetableExcelDataImportStrategyImpl_line208_txt-2115=import timetable failure. |
| 4705 | 4705 | ||
| 4706 | +schedulePlanServiceImpl_line118=Current route is scheduling,Try again later... | ||
| 4707 | +schedulePlanInfoServiceImpl_line189=Unknown update type,type=[######{0}] | ||
| 4706 | 4708 | ||
| 4707 | - | ||
| 4708 | - | 4709 | +employeeConfigInfoController_line81_txt-929=Scheduler-deactivation-information.txt |
| 4709 | 4710 | ||
| 4710 | bController-line192=import file not exist | 4711 | bController-line192=import file not exist |
| 4711 | bController-line197=import file successful | 4712 | bController-line197=import file successful |
src/main/resources/message_zh_CN.properties
| @@ -4704,9 +4704,10 @@ timetableExcelDataImportStrategyImpl_line145_txt-2115=导入时刻表异常! | @@ -4704,9 +4704,10 @@ timetableExcelDataImportStrategyImpl_line145_txt-2115=导入时刻表异常! | ||
| 4704 | timetableExcelDataImportStrategyImpl_line203=未知的TimetableExcelFormatType格式[######{0}] | 4704 | timetableExcelDataImportStrategyImpl_line203=未知的TimetableExcelFormatType格式[######{0}] |
| 4705 | timetableExcelDataImportStrategyImpl_line208_txt-2115=导入时刻表异常! | 4705 | timetableExcelDataImportStrategyImpl_line208_txt-2115=导入时刻表异常! |
| 4706 | 4706 | ||
| 4707 | +schedulePlanServiceImpl_line118=当前线路正在排班,请稍后再操作... | ||
| 4708 | +schedulePlanInfoServiceImpl_line189=未知的更新类型,type=[######{0}] | ||
| 4707 | 4709 | ||
| 4708 | - | ||
| 4709 | - | 4710 | +employeeConfigInfoController_line81_txt-929=排班人员停用信息.txt |
| 4710 | 4711 | ||
| 4711 | bController-line192=导入文件不存在! | 4712 | bController-line192=导入文件不存在! |
| 4712 | bController-line197=导入文件成功 | 4713 | bController-line197=导入文件成功 |