| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | /** |
| | | * 查询配方配置子信息列表 |
| | | */ |
| | | @GetMapping("/noPageListFormulaChild") |
| | | public TableDataInfo noPageListFormulaChild(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() |
| | | .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode()) |
| | | .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode())); |
| | | for (BsFormulaChildInfo formulaChildInfo : list) { |
| | | // formulaChildInfo.setSort(formulaChildInfo.getStepSort()); |
| | | // formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); |
| | | // formulaChildInfo.setImg(formulaChildInfo.getOperationSteps()); |
| | | if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){ |
| | | if(formulaChildInfo.getCollectData().contains("[")){ |
| | | String data = formulaChildInfo.getCollectData(); |
| | | data = data.replace("[", "").replace("]", "").replace(" ", ""); |
| | | String[] tightenDataParts = data.split(","); |
| | | formulaChildInfo.setCollectData("扭矩"+tightenDataParts[0]+"角度"+tightenDataParts[1]+"扭矩结果"+tightenDataParts[2]+"角度结果"+tightenDataParts[3]); |
| | | } |
| | | } |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询配方配置子信息列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:formulaChild:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsFormulaChildInfo bsFormulaChildInfo) |
| | |
| | | package com.jcdm.main.bs.formulaChild.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | |
| | | @Excel(name = "结果") |
| | | private String results; |
| | | |
| | | @TableField(exist = false) |
| | | private String sort; |
| | | |
| | | @TableField(exist = false) |
| | | private String address; |
| | | |
| | | @TableField(exist = false) |
| | | private String img; |
| | | |
| | | @TableField(exist = false) |
| | | private String workOrderNo; |
| | | |
| | | @TableField(exist = false) |
| | | private Date collectionTime; |
| | | |
| | | @TableField(exist = false) |
| | | private String locationCode; |
| | | |
| | | @TableField(exist = false) |
| | | private String paramValue; |
| | | |
| | | @TableField(exist = false) |
| | | private String paramName; |
| | | |
| | | @TableField(exist = false) |
| | | private String scanBarcode; |
| | | |
| | | @TableField(exist = false) |
| | | private String sfcBarcode; |
| | | |
| | | @TableField(exist = false) |
| | | private String tightenTheArray; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer counts; |
| | | |
| | | public String getParamName() { |
| | |
| | | lists.add(OPCElement.OP_OP240_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.OP_OP250_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.OP_OP250_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.OP_OP380_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.OP_OP380_AngleResult);//请求记录数据 |
| | | return lists; |
| | | } |
| | | } |
| | |
| | | |
| | | public static final String OP_OP250_AngleResult = "OP.OP250.AngleResult";//请求拧紧数据 |
| | | |
| | | /** |
| | | * OP380 |
| | | */ |
| | | public static final String OP_OP380_RecordData = "OP.OP380.RecordData";//请求记录数据 |
| | | |
| | | public static final String OP_OP380_AngleResult = "OP.OP380.AngleResult";//请求拧紧数据 |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | //保存拧紧数据 |
| | | else if (("AngleResult").equals(tab)) { |
| | | if("1".equals(tabVlaue)||"2".equals(tabVlaue)){ |
| | | if("OK".equals(tabVlaue)||"NG".equals(tabVlaue)){ |
| | | List<String> list = new ArrayList<>(); |
| | | String[] suffixes = {"Torque", "Angle", "Result", "Result1"}; |
| | | String[] suffixes = {"Torque", "Angle", "TorqueResult", "AngleResult"}; |
| | | |
| | | for (String suffix : suffixes) { |
| | | String string = thoroughfare + "." + device + "." + suffix; |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField3" column="spare_field_3" /> |
| | | <result property="spareField4" column="spare_field_4" /> |
| | | <result property="spareField1" column="spare_field1" /> |
| | | <result property="spareField2" column="spare_field2" /> |
| | | <result property="spareField3" column="spare_field3" /> |
| | | <result property="spareField4" column="spare_field4" /> |
| | | <result property="collectData" column="collect_data" /> |
| | | <result property="results" column="results" /> |
| | | <result property="counts" column="counts" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsFormulaChildInfoVo"> |
| | | select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, collect_data, results from bs_formula_child_info |
| | | select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results from bs_formula_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult"> |
| | |
| | | <if test="results != null and result != ''"> and result = #{results}</if> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | <if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> |
| | | <if test="spareField4 != null and spareField4 != ''"> and spare_field_4 = #{spareField4}</if> |
| | | <if test="spareField4 != null and spareField4 != ''"> and spare_field4 = #{spareField4}</if> |
| | | |
| | | |
| | | |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="spareField1 != null">spare_field_1,</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="spareField1 != null">spare_field1,</if> |
| | | <if test="spareField2 != null">spare_field2,</if> |
| | | <if test="spareField3 != null">spare_field3,</if> |
| | | <if test="spareField4 != null">spare_field4,</if> |
| | | <if test="collectData != null">collect_data,</if> |
| | | <if test="results != null">results,</if> |
| | | </trim> |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</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> |
| | | <if test="spareField1 != null">spare_field1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field3 = #{spareField3},</if> |
| | | <if test="spareField4 != null">spare_field4 = #{spareField4},</if> |
| | | <if test="collectData != null">collect_data = #{collectData},</if> |
| | | <if test="results != null">results = #{results},</if> |
| | | </trim> |
| | |
| | | }) |
| | | } |
| | | |
| | | // 不分页查询配方配置子信息列表 |
| | | export function noPageListFormulaChild(query) { |
| | | return request({ |
| | | url: '/bs/formulaChild/noPageListFormulaChild', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 查询配方配置子信息列表 |
| | | export function releaseCheck(query) { |
| | | return request({ |
| | |
| | | <el-tab-pane name="first"> |
| | | <span slot="label"> <a class="el-icon-date"></a>首页</span> |
| | | <el-col :span="24"> |
| | | <el-table :cell-style="rowStyle" :data="formulaChildList"> |
| | | <el-table height="500" :cell-style="rowStyle" :data="formulaChildList"> |
| | | <el-table-column label="排序" width="60" align="center" type="index"> |
| | | </el-table-column> |
| | | <el-table-column label="操作内容" :show-overflow-tooltip='true' align="center" prop="operationSteps"> |
| | |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import { |
| | | listFormulaChild, |
| | | noPageListFormulaChild, |
| | | releaseCheck, |
| | | updateResults, |
| | | updateTighteningFormula, |
| | |
| | | }, |
| | | content: '', |
| | | activeName: 'first', |
| | | url: "ws://192.168.10.198:8080/websocket/message/", |
| | | url: "ws://192.168.11.6:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | |
| | | this.formulaChildParams.productCode = this.workpieceInformation.productCode |
| | | this.formulaChildParams.processesCode = this.headContent.processesCode |
| | | console.log(this.formulaChildParams) |
| | | listFormulaChild(this.formulaChildParams).then(response => { |
| | | noPageListFormulaChild(this.formulaChildParams).then(response => { |
| | | this.formulaChildList = response.rows; |
| | | }); |
| | | }, |