-
懒羊羊
2024-03-29 0caf8761b4af8163a691ebb56723286926529ee4
-
已修改8个文件
97 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -2,6 +2,8 @@
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;
@@ -37,6 +39,31 @@
    /**
     * 查询配方配置子信息列表
     */
    @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)
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java
@@ -1,5 +1,6 @@
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;
@@ -102,28 +103,40 @@
    @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() {
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -55,6 +55,8 @@
        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;
    }
}
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
@@ -27,6 +27,13 @@
    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";//请求拧紧数据
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -109,9 +109,9 @@
                }
                //保存拧紧数据
                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;
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
@@ -23,10 +23,10 @@
        <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"    />
@@ -34,7 +34,7 @@
    </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">
@@ -50,7 +50,7 @@
            <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>
@@ -83,10 +83,10 @@
            <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>
@@ -137,10 +137,10 @@
            <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>
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
@@ -9,6 +9,15 @@
  })
}
// 不分页查询配方配置子信息列表
export function noPageListFormulaChild(query) {
  return request({
    url: '/bs/formulaChild/noPageListFormulaChild',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息列表
export function releaseCheck(query) {
  return request({
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -106,7 +106,7 @@
         <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">
@@ -294,6 +294,7 @@
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  listFormulaChild,
  noPageListFormulaChild,
  releaseCheck,
  updateResults,
  updateTighteningFormula,
@@ -360,7 +361,7 @@
      },
      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,
@@ -495,7 +496,7 @@
      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;
      });
    },