| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | private String productCompanyCode; |
| | | |
| | | /** 预留字段1 */ |
| | | private String spareField1; |
| | | private String trolleyYard; |
| | | |
| | | /** 预留字段2 */ |
| | | private String spareField2; |
| | |
| | | { |
| | | 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; |
| | | } |
| | |
| | | .append("marketAreaCode", getMarketAreaCode()) |
| | | .append("softwareVersionCode", getSoftwareVersionCode()) |
| | | .append("productCompanyCode", getProductCompanyCode()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | |
| | | void overrideSaveBatch(List<OmProductionOrdeInfo> omProductionOrdeInfoList); |
| | | |
| | | AjaxResult receivingWorkOrders(); |
| | | |
| | | AjaxResult trolleyYardBinDing(OmProductionOrdeInfo omProductionOrdeInfo); |
| | | |
| | | AjaxResult getCarCodeSize(OmProductionOrdeInfo omProductionOrdeInfo); |
| | | |
| | | AjaxResult findBytrolleyYardGetOne(OmProductionOrdeInfo omProductionOrdeInfo); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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()); |
| | | } |
| | | } |
| | |
| | | <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" /> |
| | |
| | | </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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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" /> |
| | |
| | | </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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | }) |
| | | } |
| | | |
| | | 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({ |
| | |
| | | </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> |
| | | |
| | |
| | | } 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, |
| | |
| | | name: "stationTerminal", |
| | | data() { |
| | | return { |
| | | showInput: true, |
| | | carCode: '', |
| | | showInput: false, |
| | | onLineBinDing: false, |
| | | |
| | | serialPortContent: '', |
| | | // 查询参数 |
| | | formulaChildParams: { |
| | |
| | | processesName: '贴标机-贴码', |
| | | sfcCode: '', |
| | | yzSfcCode: '', |
| | | cardCode: '', |
| | | }, |
| | | workpieceInformation: { |
| | | workOrderNo: null, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | bindcardCode(){ |
| | | this.$message('可以绑定!'); |
| | | let param = { |
| | | productNum: this.headContent.sfcCode, |
| | | trolleyYard: this.headContent.cardCode, |
| | | } |
| | | trolleyYardBinDing(param).then(response => { |
| | | }); |
| | | |
| | | }, |
| | | serialLink() { |
| | | this.open1 = true |
| | | }, |
| | |
| | | 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代替break |
| | | // } |
| | | // }); |
| | | // console.log(formulaChilds) |
| | | let formulaChildParams = { |
| | | scanBarcode: value, |
| | | sfcBarcode: this.headContent.sfcCode, |
| | |
| | | } |
| | | 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) |
| | |
| | | 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 |
| | |
| | | </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"> |
| | |
| | | marketAreaCode: null, |
| | | softwareVersionCode: null, |
| | | productCompanyCode: null, |
| | | spareField1: null, |
| | | trolleyYard: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null, |