Commit eea5f7b0 zshaohui

1.增加返回语言默认配置

1 个父辈 8781c357
...@@ -213,4 +213,9 @@ public class Constants { ...@@ -213,4 +213,9 @@ public class Constants {
*/ */
public static final String Cache_AuthDate = "Cache_AuthDate"; public static final String Cache_AuthDate = "Cache_AuthDate";
/**
* 默认语言
*/
public static final String Cache_DefLanguage = "Cache_DefLanguage";
} }
package com.neotel.smfcore.core.language.util; package com.neotel.smfcore.core.language.util;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.language.service.bean.Content; import com.neotel.smfcore.core.language.service.bean.Content;
import com.neotel.smfcore.core.language.service.bean.LanguageInfo; import com.neotel.smfcore.core.language.service.bean.LanguageInfo;
...@@ -123,6 +125,10 @@ public class MessageUtils { ...@@ -123,6 +125,10 @@ public class MessageUtils {
//-----------------以下为从缓存读取资源------------------------------------- //-----------------以下为从缓存读取资源-------------------------------------
public static Locale getDefaultLocal(){ public static Locale getDefaultLocal(){
String cacheDefLanguage = dataCache.getCache(Constants.Cache_DefLanguage);
if (StringUtils.isNotEmpty(cacheDefLanguage)){
defLanguage = cacheDefLanguage;
}
if(ObjectUtil.isNotEmpty(defLanguage)){ if(ObjectUtil.isNotEmpty(defLanguage)){
if ("en".equals(defLanguage)){ if ("en".equals(defLanguage)){
return new Locale("en","US"); return new Locale("en","US");
......
...@@ -5,10 +5,7 @@ import com.neotel.smfcore.common.bean.ResultBean; ...@@ -5,10 +5,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.csv.CsvReader; import com.neotel.smfcore.common.csv.CsvReader;
import com.neotel.smfcore.common.excel.ExcelReader; import com.neotel.smfcore.common.excel.ExcelReader;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants; import com.neotel.smfcore.common.utils.*;
import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.common.utils.FileUtil;
import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.language.service.bean.LanguageInfo; import com.neotel.smfcore.core.language.service.bean.LanguageInfo;
import com.neotel.smfcore.core.language.service.po.LanguageMsg; import com.neotel.smfcore.core.language.service.po.LanguageMsg;
...@@ -92,6 +89,11 @@ public class SettingsController { ...@@ -92,6 +89,11 @@ public class SettingsController {
if (closeWorkOrder != null) { if (closeWorkOrder != null) {
dto.setCloseWorkOrder(closeWorkOrder); dto.setCloseWorkOrder(closeWorkOrder);
} }
String defLanguage = dataCache.getCache(Constants.Cache_DefLanguage);
if (StringUtils.isEmpty(defLanguage)){
defLanguage = "zh";
}
dto.setDefLanguage(defLanguage);
return dto; return dto;
} }
...@@ -106,9 +108,11 @@ public class SettingsController { ...@@ -106,9 +108,11 @@ public class SettingsController {
dataCache.updateCache(Constants.CACHE_CapacityWarn,sysSettingsDto.getCapacityWarn()); dataCache.updateCache(Constants.CACHE_CapacityWarn,sysSettingsDto.getCapacityWarn());
dataCache.updateCache(Constants.BACKUP_MONTH_KEY,sysSettingsDto.getBackUpMonth()); dataCache.updateCache(Constants.BACKUP_MONTH_KEY,sysSettingsDto.getBackUpMonth());
dataCache.updateCache(Constants.CACHE_closeWorkOrder,sysSettingsDto.isCloseWorkOrder()); dataCache.updateCache(Constants.CACHE_closeWorkOrder,sysSettingsDto.isCloseWorkOrder());
dataCache.updateCache(Constants.Cache_DefLanguage,sysSettingsDto.getDefLanguage());
log.info("更改系统设置:stopout=" + sysSettingsDto.isStopOut() + ",stopjob=" + sysSettingsDto.isStartJob()+",sluggishDay="+sysSettingsDto.getSluggishDay() log.info("更改系统设置:stopout=" + sysSettingsDto.isStopOut() + ",stopjob=" + sysSettingsDto.isStartJob()+",sluggishDay="+sysSettingsDto.getSluggishDay()
+",expiresDay="+sysSettingsDto.getExpiresDay()+",capacityWarn="+sysSettingsDto.getCapacityWarn()+",backUpMonth="+sysSettingsDto.getBackUpMonth() +",expiresDay="+sysSettingsDto.getExpiresDay()+",capacityWarn="+sysSettingsDto.getCapacityWarn()+",backUpMonth="+sysSettingsDto.getBackUpMonth()
+",缺料不自动关闭工单="+sysSettingsDto.isCloseWorkOrder()); +",缺料不自动关闭工单="+sysSettingsDto.isCloseWorkOrder()
+"默认语言为:"+sysSettingsDto.getDefLanguage());
return ResultBean.newOkResult("保存成功"); return ResultBean.newOkResult("保存成功");
} }
......
...@@ -30,4 +30,7 @@ public class SysSettingsDto implements Serializable { ...@@ -30,4 +30,7 @@ public class SysSettingsDto implements Serializable {
@ApiModelProperty("缺料不自动关闭工单") @ApiModelProperty("缺料不自动关闭工单")
private boolean closeWorkOrder = false; private boolean closeWorkOrder = false;
@ApiModelProperty("默认语言")
private String defLanguage = "zh";
} }
...@@ -20,7 +20,7 @@ public class NeximMenu { ...@@ -20,7 +20,7 @@ public class NeximMenu {
@PostConstruct @PostConstruct
public void init(){ public void init(){
String menuLabel = "nexim"; String menuLabel = "fuji";
// Menu nexim = Menu.CreatePMenu("Nexim", 3, "nexim", "nexim", null); // Menu nexim = Menu.CreatePMenu("Nexim", 3, "nexim", "nexim", null);
Menu poutOut = Menu.CreatePMenu("物料管理", 3, "order", "workOrder", null); Menu poutOut = Menu.CreatePMenu("物料管理", 3, "order", "workOrder", null);
......
...@@ -434,4 +434,5 @@ smfcore.virtualOperations=\u865A\u62DF\u4ED3\u64CD\u4F5C ...@@ -434,4 +434,5 @@ smfcore.virtualOperations=\u865A\u62DF\u4ED3\u64CD\u4F5C
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5E93\u4F4D[{1}]\u4E2D,\u8BF7\u5148\u53D6\u51FA smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5E93\u4F4D[{1}]\u4E2D,\u8BF7\u5148\u53D6\u51FA
smfcore.virtual.quantityError=\u53D6\u51FA\u6570\u91CF\u5E94\u4E3A[{0}] smfcore.virtual.quantityError=\u53D6\u51FA\u6570\u91CF\u5E94\u4E3A[{0}]
smfcode.virtual.enter=\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u6761\u7801\u540E\u6309\u56DE\u8F66\u786E\u8BA4
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u6761\u7801\u540E\u6309\u56DE\u8F66\u786E\u8BA4
smfcore.auth.expire=\u6388\u6743\u5DF2\u8FC7\u671F
\ No newline at end of file \ No newline at end of file
...@@ -424,4 +424,5 @@ smfcore.virtualOperations=Vorg\u00E4nge im virtuellen Lager ...@@ -424,4 +424,5 @@ smfcore.virtualOperations=Vorg\u00E4nge im virtuellen Lager
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}] befindet sich bereits im Lagerplatz [{1}]. Bitte entnehmen Sie es zuerst smfcore.virtual.boxInPos=[{0}] befindet sich bereits im Lagerplatz [{1}]. Bitte entnehmen Sie es zuerst
smfcore.virtual.quantityError=Die zu entnehmende Menge sollte [{0}] betragen smfcore.virtual.quantityError=Die zu entnehmende Menge sollte [{0}] betragen
smfcode.virtual.enter=Bitte scannen Sie den Barcode oder geben Sie ihn ein und best\u00E4tigen Sie mit Enter
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=Bitte scannen Sie den Barcode oder geben Sie ihn ein und best\u00E4tigen Sie mit Enter
smfcore.auth.expire=Die Autorisierung ist abgelaufen
\ No newline at end of file \ No newline at end of file
...@@ -425,4 +425,5 @@ smfcore.virtualOperations=Virtual Storage Op ...@@ -425,4 +425,5 @@ smfcore.virtualOperations=Virtual Storage Op
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}] is already in location [{1}]. Please remove it first smfcore.virtual.boxInPos=[{0}] is already in location [{1}]. Please remove it first
smfcore.virtual.quantityError=The quantity to be removed should be [{0}] smfcore.virtual.quantityError=The quantity to be removed should be [{0}]
smfcode.virtual.enter=Please scan or enter the barcode, then press Enter
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=Please scan or enter the barcode, then press Enter
smfcore.auth.expire=Authorization has expired
\ No newline at end of file \ No newline at end of file
...@@ -424,4 +424,5 @@ smfcore.virtualOperations=Op\u00E9rations de l'entrep\u00F4t virtuel ...@@ -424,4 +424,5 @@ smfcore.virtualOperations=Op\u00E9rations de l'entrep\u00F4t virtuel
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}] est d\u00E9j\u00E0 dans l'emplacement [{1}]. Veuillez d'abord le retirer smfcore.virtual.boxInPos=[{0}] est d\u00E9j\u00E0 dans l'emplacement [{1}]. Veuillez d'abord le retirer
smfcore.virtual.quantityError=La quantit\u00E9 \u00E0 retirer doit \u00EAtre [{0}] smfcore.virtual.quantityError=La quantit\u00E9 \u00E0 retirer doit \u00EAtre [{0}]
smfcode.virtual.enter=Veuillez scanner ou saisir le code-barres, puis appuyer sur Entr\u00E9e
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=Veuillez scanner ou saisir le code-barres, puis appuyer sur Entr\u00E9e
smfcore.auth.expire=L'autorisation a expir\u00E9
\ No newline at end of file \ No newline at end of file
...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u4EEE\u60F3\u5009\u5EAB\u64CD\u4F5C ...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u4EEE\u60F3\u5009\u5EAB\u64CD\u4F5C
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}] \u306F\u65E2\u306B\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 [{1}] \u306B\u3042\u308A\u307E\u3059\u3002\u5148\u306B\u53D6\u308A\u51FA\u3057\u3066\u304F\u3060\u3055\u3044 smfcore.virtual.boxInPos=[{0}] \u306F\u65E2\u306B\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 [{1}] \u306B\u3042\u308A\u307E\u3059\u3002\u5148\u306B\u53D6\u308A\u51FA\u3057\u3066\u304F\u3060\u3055\u3044
smfcore.virtual.quantityError=\u53D6\u308A\u51FA\u3057\u6570\u91CF\u306F[{0}]\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 smfcore.virtual.quantityError=\u53D6\u308A\u51FA\u3057\u6570\u91CF\u306F[{0}]\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
smfcode.virtual.enter=\u30D0\u30FC\u30B3\u30FC\u30C9\u3092\u30B9\u30AD\u30E3\u30F3\u3001\u307E\u305F\u306F\u5165\u529B\u5F8C\u3001Enter\u30AD\u30FC\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=\u30D0\u30FC\u30B3\u30FC\u30C9\u3092\u30B9\u30AD\u30E3\u30F3\u3001\u307E\u305F\u306F\u5165\u529B\u5F8C\u3001Enter\u30AD\u30FC\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044
smfcore.auth.expire = \u8A8D\u8A3C\u304C\u671F\u9650\u5207\u308C\u3067\u3059
\ No newline at end of file \ No newline at end of file
...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u865A\u62DF\u4ED3\u64CD\u4F5C ...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u865A\u62DF\u4ED3\u64CD\u4F5C
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5E93\u4F4D[{1}]\u4E2D,\u8BF7\u5148\u53D6\u51FA smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5E93\u4F4D[{1}]\u4E2D,\u8BF7\u5148\u53D6\u51FA
smfcore.virtual.quantityError=\u53D6\u51FA\u6570\u91CF\u5E94\u4E3A[{0}] smfcore.virtual.quantityError=\u53D6\u51FA\u6570\u91CF\u5E94\u4E3A[{0}]
smfcode.virtual.enter=\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u6761\u7801\u540E\u6309\u56DE\u8F66\u786E\u8BA4
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u6761\u7801\u540E\u6309\u56DE\u8F66\u786E\u8BA4
smfcore.auth.expire=\u6388\u6743\u5DF2\u8FC7\u671F
\ No newline at end of file \ No newline at end of file
...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u865B\u64EC\u5009\u64CD\u4F5C ...@@ -421,4 +421,5 @@ smfcore.virtualOperations=\u865B\u64EC\u5009\u64CD\u4F5C
smfcore.equipment.view.ncgroup=Neo Counter smfcore.equipment.view.ncgroup=Neo Counter
smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5EAB\u4F4D[{1}]\u4E2D,\u8ACB\u5148\u53D6\u51FA smfcore.virtual.boxInPos=[{0}]\u5DF2\u5728\u5EAB\u4F4D[{1}]\u4E2D,\u8ACB\u5148\u53D6\u51FA
smfcore.virtual.quantityError=\u53D6\u51FA\u6578\u91CF\u61C9\u70BA[{0}] smfcore.virtual.quantityError=\u53D6\u51FA\u6578\u91CF\u61C9\u70BA[{0}]
smfcode.virtual.enter=\u8ACB\u6383\u63CF\u6216\u8F38\u5165\u689D\u78BC\u5F8C\u6309\u56DE\u8ECA\u78BA\u8A8D
\ No newline at end of file \ No newline at end of file
smfcode.virtual.enter=\u8ACB\u6383\u63CF\u6216\u8F38\u5165\u689D\u78BC\u5F8C\u6309\u56DE\u8ECA\u78BA\u8A8D
smfcore.auth.expire = \u6388\u6B0A\u5DF2\u904E\u671F
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!