opt: 国际化,页面优化

This commit is contained in:
yanps
2024-06-21 09:45:04 +08:00
parent 769d08d77b
commit 0be3799d6d
19 changed files with 92 additions and 22 deletions

View File

@@ -1125,11 +1125,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
action = LangProcess.msg("universal_releasing_completed");
}
if (error == 0 && iserror) {
this.setMessage("universal_message11");
this.setMessage("信号连接异常!");
}
String requireActionSucess = "指令" + LangProcess.msg("universal_actionMessage4");
String requireActionSucess = LangProcess.msg("universal_directives") + ":" + LangProcess.msg("universal_actionMessage4");
if(this.requireActionSucess){
requireActionSucess = "指令" + LangProcess.msg("universal_actionMessage5");
requireActionSucess = LangProcess.msg("universal_directives") + ":" + LangProcess.msg("universal_actionMessage5");
}
map.put("device_name", this.getDevice().getDevice_name());
map.put("mode", mode);
@@ -1156,11 +1156,17 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
@Override
public void setDeviceStatus(JSONObject data) {
String requestSucess = data.getString("requireSucess");
String requireActionSucess = data.getString("requireActionSucess");
if (StrUtil.equals(requestSucess, "0")) {
this.requireSucess = false;
} else if (StrUtil.equals(requestSucess, "1")) {
this.requireSucess = true;
}
if (StrUtil.equals(requireActionSucess, "0")) {
this.requireActionSucess = false;
} else if (StrUtil.equals(requireActionSucess, "1")) {
this.requireActionSucess = true;
}
}
public void writing(String param, String value) {

View File

@@ -701,9 +701,9 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
map.put("driver_type", "siemens_conveyor");
map.put("is_click", true);
map.put("message", message);
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
map.put("error", ErrorUtil.getDictDetail("bqhj_error_type", String.valueOf(this.getError())));
/*jo.put("x", xPosition);
jo.put("y", yPosition);*/
JSONObject jo = new JSONObject(map);

View File

@@ -627,7 +627,7 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
map.put("move", move);
map.put("action", action);
map.put("isOnline", this.getIsonline());
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
map.put("error", ErrorUtil.getDictDetail("bhhj_error_type", String.valueOf(this.getError())));
map.put("isError", this.getIserror());
map.put("message", message);
map.put("feedMessage", feedMessage);

View File

@@ -95,6 +95,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
try {
MDC.put(log_file_type, log_type);
log.info("crateTask-----输入参数{}", param);
LuceneLogDto luceneLogDto = new LuceneLogDto(4, param, "acs接收lms任务");
luceneLogService.interfaceExecuteLog(luceneLogDto);
JSONArray datas = JSONArray.parseArray(param);
CreateTaskResponse response = new CreateTaskResponse();
// ParamService paramService = SpringContextHolder.getBean(ParamService.class);

View File

@@ -41,7 +41,7 @@ public class ErrorUtil {
String en_label = dictDetailDto.getEn_label();
String in_label = dictDetailDto.getIn_label();
String zh_label = dictDetailDto.getZh_label();
if (StrUtil.equals(value, error_code)) {
if (StrUtil.equals(value, error_code) && ObjectUtil.isNotEmpty(language)) {
if (language.contains("zh")){
detail = zh_label;
break;
@@ -54,7 +54,10 @@ public class ErrorUtil {
detail = en_label;
break;
}
if(StrUtil.isEmpty(language)){
detail = en_label;
break;
}
}
}
}

View File

@@ -19,7 +19,6 @@ public class InitLocaleResolver implements LocaleResolver {
if (StringUtils.isNotEmpty(header)){
String lang = Language_Country.get(header);
language = lang;
System.out.println("lang的值为"+lang);
if (StringUtils.isNotEmpty(lang)){
String[] l = lang.split("-");
//印尼的ISO标准国家代码为id-ID

View File

@@ -153,6 +153,9 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
dic.setPara1(dict.getPara1());
dic.setPara2(dict.getPara2());
dic.setPara3(dict.getPara3());
dic.setZh_label(dict.getZh_label());
dic.setEn_label(dict.getEn_label());
dic.setIn_label(dict.getIn_label());
sysDictMapper.updateById(dic);
return;
}