From a75d86bc0d41018edf2e25b9740bc0be6978b735 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期二, 07 五月 2024 08:31:09 +0800 Subject: [PATCH] - --- jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java | 6 + jcdm-ui/src/views/main/om/productionOrde/index.vue | 6 + jcdm-ui/src/api/main/om/productionOrde/productionOrde.js | 24 ++++++ jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java | 21 +++++ jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 99 +++++++++++++----------- jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java | 17 ++-- jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml | 10 +- jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | 18 ++++ jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml | 10 +- 9 files changed, 145 insertions(+), 66 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java index 301c4c2..939f970 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java @@ -141,4 +141,22 @@ ExcelUtil<OmProductionOrdeInfoExcelImport> util = new ExcelUtil<OmProductionOrdeInfoExcelImport>(OmProductionOrdeInfoExcelImport.class); util.importTemplateExcel(response, "璁㈠崟鏁版嵁"); } + + @PostMapping("/trolleyYardBinDing") + public AjaxResult trolleyYardBinDing(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) + { + return omProductionOrdeInfoService.trolleyYardBinDing(omProductionOrdeInfo); + } + + @PostMapping("/getCarCodeSize") + public AjaxResult getCarCodeSize(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) + { + return omProductionOrdeInfoService.getCarCodeSize(omProductionOrdeInfo); + } + + @PostMapping("/findBytrolleyYardGetOne") + public AjaxResult findBytrolleyYardGetOne(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) + { + return omProductionOrdeInfoService.findBytrolleyYardGetOne(omProductionOrdeInfo); + } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java index d8d7fd8..7fdb98d 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java @@ -175,7 +175,7 @@ private String productCompanyCode; /** 棰勭暀瀛楁1 */ - private String spareField1; + private String trolleyYard; /** 棰勭暀瀛楁2 */ private String spareField2; @@ -553,16 +553,16 @@ { return productCompanyCode; } - public void setSpareField1(String spareField1) - { - this.spareField1 = spareField1; + + public String getTrolleyYard() { + return trolleyYard; } - public String getSpareField1() - { - return spareField1; + public void setTrolleyYard(String trolleyYard) { + this.trolleyYard = trolleyYard; } - public void setSpareField2(String spareField2) + + public void setSpareField2(String spareField2) { this.spareField2 = spareField2; } @@ -627,7 +627,6 @@ .append("marketAreaCode", getMarketAreaCode()) .append("softwareVersionCode", getSoftwareVersionCode()) .append("productCompanyCode", getProductCompanyCode()) - .append("spareField1", getSpareField1()) .append("spareField2", getSpareField2()) .append("spareField3", getSpareField3()) .append("spareField4", getSpareField4()) diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java index 99bb2db..bc1b98c 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java @@ -67,4 +67,10 @@ void overrideSaveBatch(List<OmProductionOrdeInfo> omProductionOrdeInfoList); AjaxResult receivingWorkOrders(); + + AjaxResult trolleyYardBinDing(OmProductionOrdeInfo omProductionOrdeInfo); + + AjaxResult getCarCodeSize(OmProductionOrdeInfo omProductionOrdeInfo); + + AjaxResult findBytrolleyYardGetOne(OmProductionOrdeInfo omProductionOrdeInfo); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java index 4c0adb0..be96501 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java @@ -3,6 +3,7 @@ import java.util.List; import java.util.stream.Collectors; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.utils.DateUtils; @@ -150,4 +151,24 @@ public AjaxResult receivingWorkOrders() { return null; } + + @Override + public AjaxResult trolleyYardBinDing(OmProductionOrdeInfo omProductionOrdeInfo) { + OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum())); + one.setTrolleyYard(omProductionOrdeInfo.getTrolleyYard()); + omProductionOrdeInfoService.saveOrUpdate(one); + return AjaxResult.success(); + } + + @Override + public AjaxResult getCarCodeSize(OmProductionOrdeInfo omProductionOrdeInfo) { +// omProductionOrdeInfo. + return null; + } + + @Override + public AjaxResult findBytrolleyYardGetOne(OmProductionOrdeInfo omProductionOrdeInfo) { + OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, omProductionOrdeInfo.getTrolleyYard())); + return AjaxResult.success(one.getProductNum()); + } } diff --git a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml b/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml index d7175ed..c5616a1 100644 --- a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml +++ b/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml @@ -18,7 +18,7 @@ <result property="paramLower" column="param_lower" /> <result property="paramStandard" column="param_standard" /> <result property="collectionTime" column="collection_time" /> - <result property="spareField1" column="spare_field1" /> + <result property="moduleCode" column="module_code" /> <result property="spareField2" column="spare_field2" /> <result property="createUser" column="create_user" /> <result property="createTime" column="create_time" /> @@ -31,7 +31,7 @@ </resultMap> <sql id="selectDaParamCollectionVo"> - select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field1, spare_field2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection + select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, module_code, spare_field2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection </sql> <select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult"> @@ -69,7 +69,7 @@ <if test="paramLower != null">param_lower,</if> <if test="paramStandard != null">param_standard,</if> <if test="collectionTime != null">collection_time,</if> - <if test="spareField1 != null">spare_field1,</if> + <if test="moduleCode != null">module_code,</if> <if test="spareField2 != null">spare_field2,</if> <if test="createUser != null">create_user,</if> <if test="createTime != null">create_time,</if> @@ -94,7 +94,7 @@ <if test="paramLower != null">#{paramLower},</if> <if test="paramStandard != null">#{paramStandard},</if> <if test="collectionTime != null">#{collectionTime},</if> - <if test="spareField1 != null">#{spareField1},</if> + <if test="moduleCode != null">#{moduleCode},</if> <if test="spareField2 != null">#{spareField2},</if> <if test="createUser != null">#{createUser},</if> <if test="createTime != null">#{createTime},</if> @@ -122,7 +122,7 @@ <if test="paramLower != null">param_lower = #{paramLower},</if> <if test="paramStandard != null">param_standard = #{paramStandard},</if> <if test="collectionTime != null">collection_time = #{collectionTime},</if> - <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> + <if test="moduleCode != null">spare_field_1 = #{moduleCode},</if> <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> <if test="createUser != null">create_user = #{createUser},</if> <if test="createTime != null">create_time = #{createTime},</if> diff --git a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml b/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml index 0f1d9bf..b33cd04 100644 --- a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml +++ b/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml @@ -39,7 +39,7 @@ <result property="marketAreaCode" column="market_area_code" /> <result property="softwareVersionCode" column="software_version_code" /> <result property="productCompanyCode" column="product_company_code" /> - <result property="spareField1" column="spare_field1" /> + <result property="trolleyYard" column="trolley_yard" /> <result property="spareField2" column="spare_field2" /> <result property="spareField3" column="spare_field3" /> <result property="spareField4" column="spare_field4" /> @@ -54,7 +54,7 @@ </resultMap> <sql id="selectOmProductionOrdeInfoVo"> - select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field1, spare_field2, spare_field3, spare_field4 from om_production_orde_info + select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, trolley_yard, spare_field2, spare_field3, spare_field4 from om_production_orde_info </sql> <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult"> @@ -127,7 +127,7 @@ <if test="marketAreaCode != null">market_area_code,</if> <if test="softwareVersionCode != null">software_version_code,</if> <if test="productCompanyCode != null">product_company_code,</if> - <if test="spareField1 != null">spare_field_1,</if> + <if test="trolleyYard != null">trolley_yard,</if> <if test="spareField2 != null">spare_field_2,</if> <if test="spareField3 != null">spare_field_3,</if> <if test="spareField4 != null">spare_field_4,</if> @@ -175,7 +175,7 @@ <if test="marketAreaCode != null">#{marketAreaCode},</if> <if test="softwareVersionCode != null">#{softwareVersionCode},</if> <if test="productCompanyCode != null">#{productCompanyCode},</if> - <if test="spareField1 != null">#{spareField1},</if> + <if test="trolleyYard != null">#{trolleyYard},</if> <if test="spareField2 != null">#{spareField2},</if> <if test="spareField3 != null">#{spareField3},</if> <if test="spareField4 != null">#{spareField4},</if> @@ -226,7 +226,7 @@ <if test="marketAreaCode != null">market_area_code = #{marketAreaCode},</if> <if test="softwareVersionCode != null">software_version_code = #{softwareVersionCode},</if> <if test="productCompanyCode != null">product_company_code = #{productCompanyCode},</if> - <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> + <if test="trolleyYard != null">trolley_yard = #{trolleyYard},</if> <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> diff --git a/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js b/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js index f7740b3..bd8e8aa 100644 --- a/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js +++ b/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js @@ -48,6 +48,30 @@ }) } +export function trolleyYardBinDing(data) { + return request({ + url: '/om/productionOrde/trolleyYardBinDing', + method: 'post', + data: data + }) +} + +export function findBytrolleyYardGetOne(data) { + return request({ + url: '/om/productionOrde/findBytrolleyYardGetOne', + method: 'post', + data: data + }) +} + +export function getCarCodeSize(data) { + return request({ + url: '/om/productionOrde/getCarCodeSize', + method: 'post', + data: data + }) +} + // 淇敼鐢熶骇宸ュ崟 export function updateProductionOrde(data) { return request({ diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index 1f17669..8a79962 100644 --- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue @@ -85,24 +85,21 @@ </el-col> </el-row> -<!-- <el-row style="margin-top: 20px">--> -<!-- <el-col :span="12">--> -<!-- <el-input v-model="serialPortContent" style="width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>--> - -<!-- </el-col>--> -<!-- <el-col :span="12">--> -<!-- <el-button @click="serialPortMethod" type="primary">涓插彛鑾峰彇鏁版嵁</el-button>--> - -<!-- </el-col>--> -<!-- </el-row>--> <el-row v-show="showInput" style="margin-top: 20px"> <el-col></el-col> <span style="width: 130px;" class="head-font">棰勮鎬绘垚鍙� : {{headContent.yzSfcCode}}</span> </el-row> <el-row v-show="showInput" style="margin-top: 20px"> -<!-- <el-button @click="Release" type="primary">缁戝畾</el-button>--> <el-button @click="bindYzSfc" type="primary">缁戝畾</el-button> + </el-row> + + <el-row v-show="onLineBinDing" style="margin-top: 20px"> + <el-col></el-col> + <span style="width: 130px;" class="head-font">灏忚溅鐮� : {{headContent.cardCode}}</span> + </el-row> + <el-row v-show="onLineBinDing" style="margin-top: 20px"> + <el-button @click="bindcardCode" type="primary">缁戝畾</el-button> </el-row> </el-card> @@ -310,7 +307,12 @@ } from "@/api/main/bs/formulaChild/formulaChild"; import MySerialPort from "@/utils/MySerialPort"; import USBDevice from "@/utils/usb.json"; -import {listProductionOrde} from "@/api/main/om/productionOrde/productionOrde"; +import { + findBytrolleyYardGetOne, + listProductionOrde, + receivingWorkOrders, + trolleyYardBinDing +} from "@/api/main/om/productionOrde/productionOrde"; import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection"; import { addBasicParameters, @@ -324,7 +326,10 @@ name: "stationTerminal", data() { return { - showInput: true, + carCode: '', + showInput: false, + onLineBinDing: false, + serialPortContent: '', // 鏌ヨ鍙傛暟 formulaChildParams: { @@ -342,6 +347,7 @@ processesName: '璐存爣鏈�-璐寸爜', sfcCode: '', yzSfcCode: '', + cardCode: '', }, workpieceInformation: { workOrderNo: null, @@ -437,6 +443,16 @@ }, }, methods: { + bindcardCode(){ + this.$message('鍙互缁戝畾锛�'); + let param = { + productNum: this.headContent.sfcCode, + trolleyYard: this.headContent.cardCode, + } + trolleyYardBinDing(param).then(response => { + }); + + }, serialLink() { this.open1 = true }, @@ -462,38 +478,8 @@ this.$message('mei杩炴帴浜嗭紒'); } - - // //鍒ゆ柇鏄惁鍙互閲婃斁 - // 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() - // // this.resetting() - // }else { - // this.$message('姝ラ鏈畬鎴愪笉璁告斁琛岋紒'); - // } - // }); }, serialPortMethod(value){ - // let formulaChilds = ""; - // this.formulaChildList.forEach((formulaChild) => { - // let operationType = formulaChild.operationType; - // let results = formulaChild.results; - // let materialCode = formulaChild.materialCode; - // if(operationType === '2' && value.includes(materialCode) && (results === "" || results === null || results === 'NG')){ - // formulaChilds = formulaChild; - // return; // 浣跨敤return浠f浛break - // } - // }); - // console.log(formulaChilds) let formulaChildParams = { scanBarcode: value, sfcBarcode: this.headContent.sfcCode, @@ -617,8 +603,14 @@ } this.headContent.processesName = rows.processesName this.headContent.processesCode = rows.processesCode - console.log('璁剧疆宸ヤ綅缂栫爜' + this.headContent.processesCode) + if(this.headContent.processesCode === 'OP240'){ + this.onLineBinDing = true + } + if(this.headContent.processesCode === 'OP250-1' || this.headContent.processesCode === 'OP250-2' || this.headContent.processesCode === 'OP250-3'){ + this.showInput = true + } + console.log('璁剧疆宸ヤ綅缂栫爜' + this.headContent.processesCode) }); this.conCom() console.log('websocket杩炴帴宸ヤ綅涓�' + this.headContent.processesCode) @@ -689,15 +681,30 @@ if(this.headContent.sfcCode !== ''){ if(scanValue.includes("SS")){ this.headContent.yzSfcCode = scanValue + }else if(scanValue.includes("CC")){ + this.headContent.cardCode = scanValue }else { this.$message('鎵弿鐗╂枡缂栫爜'+scanValue); console.log(scanValue) this.serialPortMethod(scanValue) } } else { + if(this.headContent.processesCode === 'OP240'){ + this.headContent.sfcCode = scanValue; + this.queryParams.productNum = scanValue; + }else { + let param = { + trolleyYard: scanValue + } + findBytrolleyYardGetOne(param).then(response => { + this.headContent.sfcCode = response.msg; + this.queryParams.productNum = response.msg; + + }); + } this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue); - this.headContent.sfcCode = scanValue; - this.queryParams.productNum = scanValue; + // this.headContent.sfcCode = scanValue; + // this.queryParams.productNum = scanValue; this.getList() this.cakeLamp.scanFinish = 1 this.cakeLamp.startWork = 1 diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 506292e..70b91a2 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -143,6 +143,10 @@ </el-table-column> <!-- <el-table-column label="璁㈠崟缂栧彿" width="140" align="center" prop="salesOrderCode">--> <!-- </el-table-column>--> + <el-table-column :show-overflow-tooltip='true' label="pack鐮�" width="160" align="center" prop="productNum"> + </el-table-column> + <el-table-column :show-overflow-tooltip='true' label="灏忚溅鐮�" width="160" align="center" prop="trolleyYard"> + </el-table-column> <el-table-column label="浜у搧缂栧彿" width="110" align="center" prop="productCode"> </el-table-column> <el-table-column label="浜у搧鍚嶇О" width="120" align="center" prop="productName"> @@ -497,7 +501,7 @@ marketAreaCode: null, softwareVersionCode: null, productCompanyCode: null, - spareField1: null, + trolleyYard: null, spareField2: null, spareField3: null, spareField4: null, -- Gitblit v1.9.3