wangfei
2024-11-21 999ac56a03c8221a084a3afab870d258dd4d9741
预览状态,开始上片,暂停接口完善,前端页面新增字段
14个文件已修改
254 ■■■■■ 已修改文件
UI-Project/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns2.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/OptimizeProject.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/uppattenusage/entity/UpPattenUsage.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/config.js
@@ -1,10 +1,10 @@
export default {
    serverUrl: "10.153.19.150:88/api",
    // serverUrl: "10.153.19.150:88/api",
//  serverUrl: "192.168.1.199:88/api",
    // serverUrl: "127.0.0.1:88/api",
    serverUrl2: "10.153.19.150:88"
    serverUrl: "127.0.0.1:88/api",
    // serverUrl2: "10.153.19.150:88"
    // serverUrl2: "192.168.1.199:88"
    // serverUrl2: "127.0.0.1:88"
    serverUrl2: "127.0.0.1:88"
    //serverUrl:"res.abeim.cn"
}
UI-Project/src/utils/constants.js
@@ -1,4 +1,4 @@
//  export const WebSocketHost = "192.168.1.199";
export const WebSocketHost = "10.153.19.150";
// export const WebSocketHost = "127.0.0.1";
// export const WebSocketHost = "10.153.19.150";
export const WebSocketHost = "127.0.0.1";
export const host = "88";
UI-Project/src/views/Returns/upreturns.vue
@@ -96,7 +96,8 @@
    const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
      stationCell: 5,
      engineerId: selectedProjectNo.value,
      filmRemove: filmRemove.value,
      // filmRemove: filmRemove.value,
      filmRemove: parseInt(filmRemove.value, 10),
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
    window.localStorage.setItem('filmRemove', filmRemove.value)
@@ -121,10 +122,10 @@
  let engineeringId = window.localStorage.getItem('engineeringId')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      // const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 5,
        filmRemove: filmRemove,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        // stationCell: 5,
        // filmRemove: filmRemove,
        engineerId: engineeringId,
        state: 1,
      })
@@ -148,8 +149,8 @@
    let engineeringId = window.localStorage.getItem('engineeringId')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        stationCell: 5,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // stationCell: 5,
        engineerId: engineeringId,
        state: 0,
      })
@@ -236,6 +237,28 @@
    ElMessage.error(t('basicData.glassnull'));
  }
};
function getStatusType2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return 'success';
    case 1:
      return 'info';
    case 2:
      return 'warning';
  }
}
function getStatusText2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return t('Mounting.noremoval');//完成
    case 1:
      return t('Mounting.coarselyground');//新建
    case 2:
      return t('Mounting.finegrinding');//执行中
  }
}
</script>
<template>
  <div style="height: 500px;">
@@ -301,18 +324,29 @@
            min-width="80"
            prop="state"
          >
          <template #default="scope">
          <el-tag
            :type="scope.row.state === 100 ? 'success' : 'warning'"
            @click="toggleEnableState(scope.row)"
          >
            {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
          </el-tag>
        </template>
          </el-table-column>
          <template #default="scope">
            <el-tag
                :type="scope.row.state === 100 ? 'success' : 'warning'"
                @click="toggleEnableState(scope.row)"
            >
              {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
            </el-tag>
          </template>
      </el-table-column>
      <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
      <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
      <!-- <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/> -->
      <el-table-column
          align="center"
          :label="$t('Mounting.removalmethodp')"
          prop="filmRemove"
      >
        <template #default="scope">
          <el-tag :type="getStatusType2(scope.row.filmRemove)">
            {{ getStatusText2(scope.row.filmRemove) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/>
    </el-table>
      </div>
    </el-card>
UI-Project/src/views/Returns/upreturns2.vue
@@ -96,7 +96,8 @@
    const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
      stationCell: 6,
      engineerId: selectedProjectNo.value,
      filmRemove: filmRemove.value,
      // filmRemove: filmRemove.value,
      filmRemove: parseInt(filmRemove.value, 10),
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
    window.localStorage.setItem('filmRemove', filmRemove.value)
@@ -121,10 +122,10 @@
  let engineeringId = window.localStorage.getItem('engineeringId')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      // const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 6,
        filmRemove: filmRemove,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        // stationCell: 6,
        // filmRemove: filmRemove,
        engineerId: engineeringId,
        state: 1,
      })
@@ -148,8 +149,8 @@
    let engineeringId = window.localStorage.getItem('engineeringId')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        stationCell: 6,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // stationCell: 6,
        engineerId: engineeringId,
        state: 0,
      })
@@ -236,6 +237,28 @@
    ElMessage.error(t('basicData.glassnull'));
  }
};
function getStatusType2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return 'success';
    case 1:
      return 'info';
    case 2:
      return 'warning';
  }
}
function getStatusText2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return t('Mounting.noremoval');//完成
    case 1:
      return t('Mounting.coarselyground');//新建
    case 2:
      return t('Mounting.finegrinding');//执行中
  }
}
</script>
<template>
  <div style="height: 500px;">
@@ -301,18 +324,29 @@
            min-width="80"
            prop="state"
          >
          <template #default="scope">
          <el-tag
            :type="scope.row.state === 100 ? 'success' : 'warning'"
            @click="toggleEnableState(scope.row)"
          >
            {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
          </el-tag>
        </template>
          </el-table-column>
          <template #default="scope">
            <el-tag
                :type="scope.row.state === 100 ? 'success' : 'warning'"
                @click="toggleEnableState(scope.row)"
            >
              {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
            </el-tag>
          </template>
      </el-table-column>
      <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
      <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
      <!-- <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/> -->
      <el-table-column
          align="center"
          :label="$t('Mounting.removalmethodp')"
          prop="filmRemove"
      >
        <template #default="scope">
          <el-tag :type="getStatusType2(scope.row.filmRemove)">
            {{ getStatusText2(scope.row.filmRemove) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/>
    </el-table>
      </div>
    </el-card>
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/OptimizeProject.java
@@ -189,6 +189,15 @@
     */
    private Date updateTime;
//    /**
//     * 除膜方式
//     */
//    private Integer filmRemove;
//
//    /**
//     * 设备
//     */
//    private Integer stationCell;
    /**
     * 预留,使用需注明
     */
hangzhoumesParent/common/servicebase/src/main/java/com/mes/uppattenusage/entity/UpPattenUsage.java
@@ -62,5 +62,14 @@
     */
    private Integer state;
    /**
     * 除膜方式
     */
    private Integer filmRemove;
    /**
     * 设备
     */
    private Integer stationCell;
}
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java
@@ -54,11 +54,11 @@
    @ResponseBody
    public  Result <List<UpPattenUsage>> pause(@RequestBody Engineering engineering) {
        boolean work=engineeringService.pauseTask(engineering.getEngineerId(),engineering.getState());
        List<UpPattenUsage> glass = upPattenUsageService.prioritylist();String message;
//        List<UpPattenUsage> glass = upPattenUsageService.prioritylist();String message;
        if(work){
            return Result.build(200,"成功",glass);
            return Result.build(200, "成功", null);
        }else {
            return Result.build(100,"成功",glass);
            return Result.build(100, "成功", null);
        }
    }
@@ -67,9 +67,9 @@
    @ResponseBody
    public  Result <Boolean> changeTask(@RequestBody Engineering engineering) {
        log.info("engineeringId:{}", engineering);
        UpPattenUsage upPattenUsage = upPattenUsageService.selectedEngineering(engineering.getEngineerId());
        UpPattenUsage upPattenUsage = upPattenUsageService.selectedTaskEngineering(engineering.getEngineerId());
        if (upPattenUsage != null) {
            boolean work = engineeringService.changeTask(engineering.getEngineerId(), engineering.getState(), engineering.getFilmRemove(), engineering.getStationCell());
            boolean work = engineeringService.changeTask(engineering.getEngineerId(), engineering.getState());
            List<UpPattenUsage> glass = upPattenUsageService.prioritylist();
            optimizeProjectService.changeTask(engineering.getEngineerId(), 200);
            return Result.build(200, "已保存过", work);
@@ -85,7 +85,7 @@
            engineeringService.saveEngineering(listEngineering);
            log.info("更改pp表状态为已领取");
            //将engineering表状态为正在上片
            boolean work = engineeringService.changeTask(engineering.getEngineerId(), engineering.getState(), engineering.getFilmRemove(), engineering.getStationCell());
            boolean work = engineeringService.changeTask(engineering.getEngineerId(), engineering.getState());
            List<UpPattenUsage> glass = upPattenUsageService.prioritylist();
            optimizeProjectService.changeTask(engineering.getEngineerId(), 200);
            if (work) {
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java
@@ -107,5 +107,4 @@
     */
    private String notes;
}
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java
@@ -119,14 +119,10 @@
    public boolean pauseTask(String engineerId, Integer state) {
        //暂停正在进行工程
        LambdaUpdateChainWrapper<Engineering> pauseWrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper());
        pauseWrapper.set(Engineering::getState, 0);
        pauseWrapper.eq(Engineering::getState, 1);
        pauseWrapper.set(Engineering::getState, state);
        pauseWrapper.eq(Engineering::getEngineerId, engineerId);
        return pauseWrapper.update();
    }
    @Override
    public boolean changeTask(String engineerId, Integer state, Integer filmRemove, Integer stationCell) {
        return false;
    }
}
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
@@ -50,17 +50,19 @@
    @PostMapping("/selectUpPattenUsage") //查询现在上片机的玻璃信息
    @ResponseBody
    public Result<List<UpPattenUsage>> selectUpPattenUsage(@RequestBody Engineering engineering) {
        List<UpPattenUsage> upPattenUsages=null;
        UpPattenUsage upPattenUsage = upPattenUsageService.selectedEngineering(engineering.getEngineerId());
        if(upPattenUsage == null){
            upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId());
        }else {
            upPattenUsages= upPattenUsageService.selectUpPattenUsage(upPattenUsage);
        List<UpPattenUsage> upPattenUsages = null;
        UpPattenUsage upPattenUsage = upPattenUsageService.selectedEngineering(engineering.getEngineerId(), engineering.getFilmRemove(), engineering.getStationCell()
        );
        if (upPattenUsage == null) {
            return Result.build(200, "失败无数据", null);
            //upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId(), engineering.getFilmRemove(), engineering.getStationCell());
        } else {
            upPattenUsages = upPattenUsageService.selectUpPattenUsage(upPattenUsage);
        }
        if (!upPattenUsages.isEmpty()) {
            return Result.build(200, "成功", upPattenUsages);
        }else {
        } else {
            return Result.build(100, "失败", upPattenUsages);
        }
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java
@@ -38,13 +38,17 @@
      * 更新上片表状态
      */
     void updateUpPattenUsageState(UpPattenUsage upPattenUsage, Integer state);
     /**
      * 判断此工程是否已保存过
      *
      * @return UpPattenUsage
      */
     UpPattenUsage selectedEngineering(String engineeringId);
     UpPattenUsage selectedTaskEngineering(String engineeringId);
     /**
      * 查询正在执行的上片任务
      *
      * @return UpPattenUsage
      */
     UpPattenUsage selectOverTask();
@@ -56,10 +60,15 @@
     /**
      * 更改上片玻璃状态
      *
      * @return UpPattenUsage
      */
     Boolean updateGlassState(UpPattenUsage upPattenUsage);
     List<Engineering> setRawGlassTaskRequest(Engineering request);
     List<UpPattenUsage> selectSaveUpPattenUsage(String engineerId, Integer filmRemove, Integer stationCell);
     UpPattenUsage selectedEngineering(String engineerId, Integer filmRemove, Integer stationCell);
}
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
@@ -56,12 +56,16 @@
    @Override
    public List<UpPattenUsage> selectUpPattenUsage(UpPattenUsage upPattenUsage) {
        LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(UpPattenUsage::getEngineeringId,upPattenUsage.getEngineeringId());
        wrapper.eq(UpPattenUsage::getEngineeringId, upPattenUsage.getEngineeringId())
                .eq(UpPattenUsage::getStationCell, upPattenUsage.getStationCell())
                .eq(UpPattenUsage::getFilmRemove, upPattenUsage.getFilmRemove());
        return this.list(wrapper);
        //你
    }
    @Override
    @DS("pp")
    @DS("pp")  //這裡只傳了工程號
    public List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId) {
        List<OptimizeUpPattenUsage> upPattenUsageList = null;
@@ -104,16 +108,25 @@
    @Override
    public void updateUpPattenUsageState(UpPattenUsage upPattenUsage, Integer state) {
        upPattenUsage.setState(state);
        boolean updateSuccess=this.updateById(upPattenUsage);
        log.info("更新状态{}",updateSuccess);
        boolean updateSuccess = this.updateById(upPattenUsage);
        log.info("更新状态{}", updateSuccess);
        //更新状态
    }
    @Override
    public UpPattenUsage selectedEngineering(String engineeringId) {
        QueryWrapper<UpPattenUsage>wrapper = new QueryWrapper<>();
        wrapper.eq("engineering_id",engineeringId)
    public UpPattenUsage selectedTaskEngineering(String engineeringId) {
        return null;
    }
    @Override
    public UpPattenUsage selectedEngineering(String engineerId, Integer filmRemove, Integer stationCell) {
        QueryWrapper<UpPattenUsage> wrapper = new QueryWrapper<>();
        wrapper.eq("engineering_id", engineerId)
                .eq("station_cell", stationCell)
                .eq("film_remove", filmRemove)
                .last("limit 1");
        log.info("查询预览参数");
        log.info("查询预览参数{}", this.getOne(wrapper));
        return this.getOne(wrapper);
    }
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-dev.yml
@@ -5,7 +5,7 @@
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        hangzhoumes:
          url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8&allowMultiQueries=true
          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
  port: 8083
spring:
  profiles:
    active: yw
    active: dev
  application:
    name: loadGlass
  liquibase:
@@ -13,11 +13,4 @@
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
kangaroohy:
  milo:
    enabled: false
    primary: default
    config:
      default:
        endpoint: opc.tcp://192.168.0.39:49320
        security-policy: basic256sha256
        username: admin
        password: 1qaz2wsx3edc4rfv
    enabled: false