懒羊羊
2024-01-30 c346aba6d0196673d43fb81610ec6f0ca9cddbbd
工位终端
已修改7个文件
77 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/mapper/BsFormulaChildInfoMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -55,9 +55,9 @@
     * 检查是否可以放行
     */
    @GetMapping("/releaseCheck")
    public AjaxResult releaseCheck()
    public AjaxResult releaseCheck(BsFormulaChildInfo bsFormulaChildInfo)
    {
        List<BsFormulaChildInfo> i = bsFormulaChildInfoService.releaseCheck();
        List<BsFormulaChildInfo> i = bsFormulaChildInfoService.releaseCheck(bsFormulaChildInfo);
        return AjaxResult.success(i.size());
    }
@@ -71,6 +71,15 @@
    }
    /**
     * 放行请空状态
     */
    @GetMapping("/workpieceRelease")
    public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoService.workpieceRelease(bsFormulaChildInfo);
    }
    /**
     * 导出配方配置子信息列表
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:export')")
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/mapper/BsFormulaChildInfoMapper.java
@@ -61,5 +61,7 @@
    BsFormulaChildInfo selectBsFormulaChildInfoByTypeTopOne(BsFormulaChildInfo bsFormulaChildInfo);
    List<BsFormulaChildInfo> releaseCheck();
    List<BsFormulaChildInfo> releaseCheck(BsFormulaChildInfo bsFormulaChildInfo);
    void workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java
@@ -63,7 +63,9 @@
    public BsFormulaChildInfo selectBsFormulaChildInfoByTypeTopOne(String type,String productCode,String processesCode);
    List<BsFormulaChildInfo> releaseCheck();
    List<BsFormulaChildInfo> releaseCheck(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult updateResults(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -106,8 +106,8 @@
    }
    @Override
    public List<BsFormulaChildInfo> releaseCheck() {
        return bsFormulaChildInfoMapper.releaseCheck();
    public List<BsFormulaChildInfo> releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) {
        return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo);
    }
    @Override
@@ -121,4 +121,10 @@
        }
        return AjaxResult.success("成功");
    }
    @Override
    public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
        bsFormulaChildInfoMapper.workpieceRelease(bsFormulaChildInfo);
        return AjaxResult.success();
    }
}
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
@@ -164,11 +164,22 @@
        ORDER BY step_sort ASC
    </select>
    <select id="releaseCheck" resultMap="BsFormulaChildInfoResult">
    <select id="releaseCheck" resultMap="BsFormulaChildInfoResult" parameterType="BsFormulaChildInfo">
        SELECT
            *
        FROM
            bs_formula_child_info
        WHERE NOT results = 'OK'
        WHERE
            NOT results = 'OK'
          AND product_code = #{productCode}
          AND processes_code = #{processesCode};
    </select>
    <update id="workpieceRelease" parameterType="BsFormulaChildInfo">
        UPDATE bs_formula_child_info
        SET results = ''
        WHERE
            product_code = #{productCode}
          AND processes_code = #{processesCode};
    </update>
</mapper>
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
@@ -10,10 +10,11 @@
}
// 查询配方配置子信息列表
export function releaseCheck() {
export function releaseCheck(query) {
  return request({
    url: '/bs/formulaChild/releaseCheck',
    method: 'get',
    params: query
  })
}
@@ -27,6 +28,16 @@
  })
}
// 查询配方配置子信息列表
export function workpieceRelease(query) {
  return request({
    url: '/bs/formulaChild/workpieceRelease',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息详细
export function getFormulaChild(id) {
  return request({
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -147,7 +147,7 @@
<script>
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {listFormulaChild, releaseCheck, updateResults} from "@/api/main/bs/formulaChild/formulaChild";
import {listFormulaChild, releaseCheck, updateResults, workpieceRelease} from "@/api/main/bs/formulaChild/formulaChild";
export default {
  name: "stationTerminal",
@@ -159,6 +159,7 @@
        pageNum: 1,
        pageSize: 10,
        productCode: null,
        processesCode: null,
      },
      // 配方配置子信息表格数据
      formulaChildList: [],
@@ -198,7 +199,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.11.60:8080/websocket/message/",
      url: "ws://192.168.10.252:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -220,11 +221,18 @@
  },
  methods: {
    Release(){
      releaseCheck().then(response => {
      let formulaChildParams = {
        productCode: this.workpieceInformation.productCode,
        processesCode: this.headContent.processesCode
      }
      releaseCheck(formulaChildParams).then(response => {
        if(response.data === 0){
          //改变状态
          workpieceRelease(formulaChildParams).then(response => {
          });
          this.$message('放行成功!');
          this.formulaChildList = []
          this.getListFormulaChild()
        }else {
          this.$message('步骤未完成不许放行!');
        }
@@ -249,6 +257,7 @@
    /** 查询配方配置子信息列表 */
    getListFormulaChild() {
      this.formulaChildParams.productCode = this.workpieceInformation.productCode
      this.formulaChildParams.processesCode = this.headContent.processesCode
      listFormulaChild(this.formulaChildParams).then(response => {
        this.formulaChildList = response.rows;
      });
@@ -375,6 +384,7 @@
          }, 2000); // 延时2秒触发
        }else if(event.data === 'TIGHTEN'){
          console.log('开始拧紧')
          this.formulaChildList = []
          self.getListFormulaChild()
        }
      };