huang
2025-11-04 1fa4f12a4b218412efeb9f72d4d3ee9e577351b0
修改仓储出库方法,添加i18n可配置文件
19个文件已修改
12个文件已删除
789 ■■■■■ 已修改文件
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/index.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/main.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/rawfilmstorage2.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturnhistory.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/opctask/service/impl/LoadGlassDeviceTaskHistoryServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/rawglassdetails/service/impl/RawGlassStorageDetailsServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/I18nConfig.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/JsonFile/PlcCacheGlass.json 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-cz.yml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-dev.yml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-prod.yml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-yw.yml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application.yml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/logback-spring.xml 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageCageDetailsMapper.xml 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageCageMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageDeviceTaskHistoryMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageDeviceTaskMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/TaskCacheMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/job/RawGlassTask.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application-alg.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application-dev.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-alg.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application-alg.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application-dev.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -10,3 +10,4 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
target/
UI-Project/config.js
@@ -2,7 +2,7 @@
    // serverUrl: "10.153.19.150:88/api",
//  serverUrl: "192.168.2.100:88/api",
    // serverUrl: "10.153.19.162:88",
    serverUrl: "127.0.0.1:88",
    // serverUrl: "127.0.0.1:88",
    // serverUrl: "10.153.19.47:88",
    // serverUrl2: "10.153.19.150:88"
    // serverUrl2: "192.168.2.100:88"
UI-Project/src/lang/index.js
@@ -4,8 +4,8 @@
import py from "./py"
import en from "./en"
import { useLocale } from 'element-plus'; 
import enLocale from 'element-plus/es/locale/lang/en';
import zhLocale from 'element-plus/es/locale/lang/zh-cn';
import enLocale from 'element-plus/dist/locale/en.mjs';
import zhLocale from 'element-plus/dist/locale/zh-cn.mjs';
let messages = {
    zh: {...zh, ...zhLocale},
@@ -26,9 +26,9 @@
  const currentLang = i18n.global.locale.value;
  // 根据当前语言切换 Element 组件的语言包
    if (currentLang === 'zh') {
    locale.value = { ...zhLocale }; // 中文内置文本
    locale.value = zhLocale;
  } else {
    locale.value = { ...enLocale }; // 英文内置文本
    locale.value = enLocale;
  }
  
  // 额外触发一次 i18n 刷新(解决缓存问题)
UI-Project/src/main.js
@@ -6,9 +6,10 @@
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import zhLocale from 'element-plus/dist/locale/zh-cn.mjs';
import enLocale from 'element-plus/dist/locale/en.mjs';
import i18n, { syncElementLocale } from '@/lang'; 
// import Echarts from "vue-echarts"
// echarts.registerMap('china', china)
@@ -21,15 +22,22 @@
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
const initElementLocale = () => {
  const currentLang = i18n.global.locale.value;
  return currentLang === 'zh' ? zhLocale : enLocale;
};
// 传入初始语言包
app.use(ElementPlus, {
  locale: initElementLocale()
})
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate )
app.use(VXETable)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
// app.use(ElementPlus,{
//     locale: zhCn,
// })
app.use(i18n)
syncElementLocale(); 
app.mount('#app')
UI-Project/src/views/GlassStorage/rawfilmstorage2.vue
@@ -557,9 +557,9 @@
          <el-table-column prop="createTime" align="center" :label="$t('film.createtime')" />
          <el-table-column fixed="right" :label="$t('film.operate')" align="center">
            <template #default="scope">
              <el-button :disabled="(scope.row.taskState >=2)" type="text" plain @click="successfull(scope.row)">{{
              <el-button :disabled="(scope.row.taskState >2)" type="text" plain @click="successfull(scope.row)">{{
                $t('searchOrder.successfullyprocessed') }}</el-button>
              <el-button :disabled="(scope.row.taskState >=2)" type="text" plain @click="handleptask(scope.row)">{{
              <el-button :disabled="(scope.row.taskState >2)" type="text" plain @click="handleptask(scope.row)">{{
                $t('searchOrder.taskfailure') }}</el-button>
            </template>
          </el-table-column>
UI-Project/src/views/Returns/upreturnhistory.vue
@@ -188,7 +188,7 @@
if(slot.value != ""){
  pslot = slot.value
}else{
  pslot = '0'
  pslot = 1
}
  let startTime = window.localStorage.getItem('startTime')
  let page = window.localStorage.getItem('pagenumber')
hangzhoumesParent/common/servicebase/src/main/java/com/mes/opctask/service/impl/LoadGlassDeviceTaskHistoryServiceImpl.java
@@ -33,7 +33,7 @@
                .like(StringUtils.isNotBlank(request.getRawGlassHeight()), LoadGlassDeviceTaskHistory::getRawGlassHeight, request.getRawGlassHeight())
                .like(StringUtils.isNotBlank(request.getRawGlassThickness()), LoadGlassDeviceTaskHistory::getRawGlassThickness,  request.getRawGlassThickness())
                .like(StringUtils.isNotBlank(request.getRawGlassfilmsId()), LoadGlassDeviceTaskHistory::getRawGlassFilmsId,  request.getRawGlassfilmsId())
                .eq(request.getEngineeringId() != null, LoadGlassDeviceTaskHistory::getEngineeringId, request.getEngineeringId())
                .eq(StringUtils.isNotBlank(request.getEngineeringId()), LoadGlassDeviceTaskHistory::getEngineeringId, request.getEngineeringId())
                .eq(request.getStation() != 0, LoadGlassDeviceTaskHistory::getStation, request.getStation())
                .eq(request.getSlot() != 0, LoadGlassDeviceTaskHistory::getSlot, request.getSlot())
                .in(CollectionUtil.isNotEmpty(request.getTaskStateList()), LoadGlassDeviceTaskHistory::getTaskState, request.getTaskStateList())
hangzhoumesParent/common/servicebase/src/main/java/com/mes/rawglassdetails/service/impl/RawGlassStorageDetailsServiceImpl.java
@@ -206,9 +206,8 @@
        }
        // 2. 将架子状态改为“待出库”(标记为可执行)
        update(new LambdaUpdateWrapper<RawGlassStorageDetails>()
                .eq(RawGlassStorageDetails::getSlot, slotId)
                .set(RawGlassStorageDetails::getState, Const.RAW_GLASS_STATE_WAIT_OUT));
        details.setState(Const.RAW_GLASS_STATE_WAIT_OUT);
        updateById(details);
        // 3. 直接生成出库任务(关键:在页面点击时就创建任务记录)
        try {
@@ -224,10 +223,9 @@
            return "success";
        } catch (Exception e) {
            log.error("生成出库任务失败", e);
            // 失败时回滚状态
            update(new LambdaUpdateWrapper<RawGlassStorageDetails>()
                    .eq(RawGlassStorageDetails::getSlot, slotId)
                    .set(RawGlassStorageDetails::getState, Const.RAW_GLASS_STATE_IN));
            // 失败时回滚状态为“待入库”
            details.setState(Const.RAW_GLASS_STATE_IN);
            updateById(details);
            return messageSource.getMessage(
                    "rawglass.task.generate.error",
                    null,
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/I18nConfig.java
@@ -1,6 +1,7 @@
package com.mes.tools;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
@@ -14,6 +15,7 @@
 * @since 2025/10/21
 */
@Configuration
@RefreshScope
public class I18nConfig {
    /**
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/JsonFile/PlcCacheGlass.json
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-cz.yml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-dev.yml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-prod.yml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application-yw.yml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/application.yml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/logback-spring.xml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageCageDetailsMapper.xml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageCageMapper.xml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageDeviceTaskHistoryMapper.xml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/EdgStorageDeviceTaskMapper.xml
File was deleted
hangzhoumesParent/moduleService/CacheGlassModule/target/classes/mapper/TaskCacheMapper.xml
File was deleted
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/job/RawGlassTask.java
@@ -176,8 +176,9 @@
            log.info("没有正在执行的任务");
            return;
        }
        rawGlassStorageDetailsService.update(new LambdaUpdateWrapper<RawGlassStorageDetails>().eq(RawGlassStorageDetails::getId, one.getId())
                .set(RawGlassStorageDetails::getState, Const.RAW_GLASS_STATE_CAR));
        //更新任务状态为“在车”
        one.setState(Const.RAW_GLASS_STATE_CAR);
        rawGlassStorageDetailsService.updateById(one);
    }
    @Scheduled(fixedDelay = 1000)
@@ -186,8 +187,6 @@
//        S7Data S7DataWL1 = new S7Data();
//        S7DataWL1.setReportWord((short) 1);
        String value = S7DataWL1.getReportWord().toString();
//        ReadWriteEntity entity = miloService.readFromOpcUa("CC.CC.reportWord");
//        String value = entity.getValue() + "";
        if ("0".equals(value)) {
            log.info("当前任务未汇报,结束本次任务");
            return;
@@ -225,7 +224,7 @@
                    log.info("2、出片,4、吊装位请求。{}", taskType);
                    targetDetails = new RawGlassStorageDetails();
                    targetDetails.setSlot(task.getEndSlot());
                    targetDetails.setDeviceId(deviceId);
                    targetDetails.setDeviceId(4);
                    targetDetails.setShelf(task.getStartSlot());
                    targetDetails.setState(Const.RAW_GLASS_STATE_IN);
                    rawGlassStorageDetailsService.save(targetDetails);
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application-alg.yml
@@ -36,3 +36,5 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/MES/i18n/messages"
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application-dev.yml
@@ -36,3 +36,6 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/mes/aerjiliya/i18n/messages"
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -3,14 +3,12 @@
spring:
  profiles:
    active: dev
    active: alg
  application:
    name: glassStorage
  liquibase:
    enabled: false
i18n:
  message-path: "file:D:/mes/aerjiliya/i18n/messages"
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-alg.yml
@@ -31,3 +31,6 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/MES/i18n/messages"
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml
@@ -41,3 +41,6 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/mes/aerjiliya/i18n/messages"
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
  port: 10015
spring:
  profiles:
    active: dev
    active: alg
  application:
    name: loadGlass
  liquibase:
@@ -12,5 +12,3 @@
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
i18n:
  message-path: "file:D:/mes/aerjiliya/i18n/messages"
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application-alg.yml
@@ -31,3 +31,6 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/MES/i18n/messages"
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application-dev.yml
@@ -41,3 +41,6 @@
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
i18n:
  message-path: "file:D:/mes/aerjiliya/i18n/messages"
hangzhoumesParent/moduleService/LoadGlassModule/target/classes/application.yml
@@ -2,7 +2,7 @@
  port: 10015
spring:
  profiles:
    active: dev
    active: alg
  application:
    name: loadGlass
  liquibase:
@@ -11,3 +11,4 @@
  mapper-locations: classpath*:mapper/*.xml
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl