春风项目四线(合箱线、总装线)
wujian
2024-09-04 e4a393c219c3c48cbf0e4af615b316facb82eb62
change-1
已修改5个文件
83 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/tileMatchMiddleware/DaTileMatchMiddlewareMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/connectingRod/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java
@@ -6,6 +6,7 @@
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.jcdm.common.core.domain.R;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
@@ -57,8 +58,7 @@
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')")
    @GetMapping("/list")
    public TableDataInfo list(DaTileMatchRules daTileMatchRules)
    {
    public TableDataInfo list(DaTileMatchRules daTileMatchRules) {
        startPage();
        List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules);
        return getDataTable(list);
@@ -67,12 +67,31 @@
    /**
     *  曲轴配瓦
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')")
    @GetMapping("/list2")
    public TableDataInfo list2(DaTileMatchRules daTileMatchRules)
    public TableDataInfo list2(DaTileMatchRules daTileMatchRules) throws Exception
    {
        startPage();
        List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules);
        //这里取第一行的数据发送颜色信号
        if (CollUtil.isNotEmpty(list)){
            DaTileMatchRules daTileMatchRules1 = list.get(0);
            String tileColor = daTileMatchRules1.getTileColor();
            //1绿色  2黑色   3红色   4蓝色
            Integer colorInt = null;
            if ("#008000".equals(tileColor)){
                colorInt = 1;
            } else if ("#000000".equals(tileColor)){
                colorInt = 2;
            } else if ("#FF0000".equals(tileColor)){
                colorInt = 3;
            } else if ("#0000FF".equals(tileColor)){
                colorInt = 4;
            }
            if (ObjectUtil.isNotEmpty(colorInt)){
                ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP055.Color", colorInt);
                miloService.writeToOpcByte(entity);
            }
        }
        return getDataTable(list);
    }
jcdm-main/src/main/resources/mapper/da/tileMatchMiddleware/DaTileMatchMiddlewareMapper.xml
@@ -12,10 +12,14 @@
        <result property="remarks"    column="remarks"    />
        <result property="connectingrodNo"    column="connectingRod_no"    />
        <result property="cylinder"    column="cylinder"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
    <sql id="selectDaTileMatchMiddlewareVo">
        select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder from da_tile_match_middleware
        select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder, create_user, create_time, update_user, update_time from da_tile_match_middleware
    </sql>
    <select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult">
@@ -47,6 +51,10 @@
            <if test="remarks != null">remarks,</if>
            <if test="connectingrodNo != null">connectingRod_no,</if>
            <if test="cylinder != null">cylinder,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
@@ -57,6 +65,10 @@
            <if test="remarks != null">#{remarks},</if>
            <if test="connectingrodNo != null">#{connectingrodNo},</if>
            <if test="cylinder != null">#{cylinder},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
         </trim>
    </insert>
@@ -70,6 +82,10 @@
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if>
            <if test="cylinder != null">cylinder = #{cylinder},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js
@@ -9,6 +9,14 @@
  })
}
export function listTileMatchRules2(query) {
  return request({
    url: '/da/tileMatchRules/list2',
    method: 'get',
    params: query
  })
}
// 查询配瓦规则详细
export function getTileMatchRules(id) {
  return request({
jcdm-ui/src/views/main/cfkb/connectingRod/index.vue
@@ -66,7 +66,7 @@
<script>
import VueQr from 'vue-qr'
import {setBarcode} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware";
import {listTileMatchRules} from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {listTileMatchRules2} from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {listTileMatchMiddleware} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware";
import {getSumDataMethod} from "@/api/main/bs/orderScheduling/orderScheduling";
export default {
@@ -300,7 +300,7 @@
        neckValue: this.queryParams.neckValue,
      }
      console.log('参数:',queryParams)
      listTileMatchRules(queryParams).then(response => {
      listTileMatchRules2(queryParams).then(response => {
        console.log('this.queryParams',this.queryParams);
        console.log('res',response)
        if (response.rows.length>0){
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -109,7 +109,7 @@
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          :disabled="create"
          @click="CreatehandleUpdate"
        >生成</el-button>
      </el-col>
@@ -360,6 +360,7 @@
      ids: [],
      // 非单个禁用
      single: true,
      create: false,
      // 非多个禁用
      multiple: true,
      move: true,
@@ -676,6 +677,14 @@
      console.log('this.single1111',this.single)
      console.log('selecion',selection)
      this.ids = selection.map(item => item.id)
      const statusList = selection.map(item => item.orderStatus)
      console.log('statusList',statusList)
      console.log('statusList.filter( x => x !== "1").length',statusList.filter( x => x !== "1").length)
      if (statusList.filter( x => x !== "1").length >0){
        this.create = true
      } else {
        this.create = false
      }
      if (selection.length >1){
        this.single = false
        this.multiple = true
@@ -721,10 +730,14 @@
      this.titleName = "添加生产订单";
    },
    /** 同步按钮操作 */
    CreatehandleUpdate(Row) {
    CreatehandleUpdate() {
      console.log('this.ids',this.ids)
      if (this.ids.length === 0){
        this.$message.error('请勾选数据');
      }else {
      this.initWorkshop();
      this.reset();
      const id = Row.id || this.ids
        const id = this.ids
      getProductionOrdes(id).then(response => {
        console.log(response.data)
        console.log(response.data.productCode)
@@ -739,6 +752,8 @@
        this.titleName = "生成箱体条码";
        // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1);
      });
      }
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
@@ -832,10 +847,15 @@
      }, `productionOrde_${new Date().getTime()}.xlsx`)
    },
    goToPage() {
      if (this.ids.length === 0){
        this.$message.error('请勾选数据');
      }else {
      this.showDetailFlag=true
      console.log('this.showDetailFlag',this.showDetailFlag)
      //更新实际生产日期
      //updateOrderInfo(this.singleSelect)
      }
    },
  }
};