| | |
| | | * 检查是否可以放行 |
| | | */ |
| | | @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()); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 放行请空状态 |
| | | */ |
| | | @GetMapping("/workpieceRelease") |
| | | public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | return bsFormulaChildInfoService.workpieceRelease(bsFormulaChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * 导出配方配置子信息列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:formulaChild:export')") |
| | |
| | | |
| | | BsFormulaChildInfo selectBsFormulaChildInfoByTypeTopOne(BsFormulaChildInfo bsFormulaChildInfo); |
| | | |
| | | List<BsFormulaChildInfo> releaseCheck(); |
| | | List<BsFormulaChildInfo> releaseCheck(BsFormulaChildInfo bsFormulaChildInfo); |
| | | |
| | | void workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo); |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<BsFormulaChildInfo> releaseCheck() { |
| | | return bsFormulaChildInfoMapper.releaseCheck(); |
| | | public List<BsFormulaChildInfo> releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | return AjaxResult.success("成功"); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | bsFormulaChildInfoMapper.workpieceRelease(bsFormulaChildInfo); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | |
| | | 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> |
| | |
| | | } |
| | | |
| | | // 查询配方配置子信息列表 |
| | | export function releaseCheck() { |
| | | export function releaseCheck(query) { |
| | | return request({ |
| | | url: '/bs/formulaChild/releaseCheck', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | // 查询配方配置子信息列表 |
| | | export function workpieceRelease(query) { |
| | | return request({ |
| | | url: '/bs/formulaChild/workpieceRelease', |
| | | method: 'get', |
| | | params: query |
| | | |
| | | }) |
| | | } |
| | | |
| | | // 查询配方配置子信息详细 |
| | | export function getFormulaChild(id) { |
| | | return request({ |
| | |
| | | <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", |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | processesCode: null, |
| | | }, |
| | | // 配方配置子信息表格数据 |
| | | formulaChildList: [], |
| | |
| | | }, |
| | | 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, |
| | |
| | | }, |
| | | 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('步骤未完成不许放行!'); |
| | | } |
| | |
| | | /** 查询配方配置子信息列表 */ |
| | | getListFormulaChild() { |
| | | this.formulaChildParams.productCode = this.workpieceInformation.productCode |
| | | this.formulaChildParams.processesCode = this.headContent.processesCode |
| | | listFormulaChild(this.formulaChildParams).then(response => { |
| | | this.formulaChildList = response.rows; |
| | | }); |
| | |
| | | }, 2000); // 延时2秒触发 |
| | | }else if(event.data === 'TIGHTEN'){ |
| | | console.log('开始拧紧') |
| | | this.formulaChildList = [] |
| | | self.getListFormulaChild() |
| | | } |
| | | }; |