春风项目四线(合箱线、总装线)
懒羊羊
2024-01-23 ff985a5c0fba76ac5affd00ef47d6a9bdd74989a
返修标记
已修改6个文件
已添加1个文件
263 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/controller/DaPassingStationCollectionController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/service/IDaPassingStationCollectionService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/service/impl/DaPassingStationCollectionServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/passingStationCollection/passingStationCollection.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/repairMark/index.vue 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/controller/DaPassingStationCollectionController.java
@@ -49,6 +49,16 @@
    }
    /**
     * æŸ¥è¯¢äº§å“è¿‡ç«™é‡‡é›†åˆ—表
     */
    @GetMapping("/insertRepairRecordByIds")
    public AjaxResult insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection)
    {
        daPassingStationCollectionService.insertRepairRecordByIds(daPassingStationCollection);
        return AjaxResult.success();
    }
    /**
     * å¯¼å‡ºäº§å“è¿‡ç«™é‡‡é›†åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('da:passingStationCollection:export')")
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java
@@ -91,7 +91,17 @@
    @Excel(name = "节拍时间")
    private String beatTime;
    public void setId(Long id)
    private Long[] ids;
    public Long[] getIds() {
        return ids;
    }
    public void setIds(Long[] ids) {
        this.ids = ids;
    }
    public void setId(Long id)
    {
        this.id = id;
    }
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/service/IDaPassingStationCollectionService.java
@@ -59,4 +59,6 @@
     * @return ç»“æžœ
     */
    public int deleteDaPassingStationCollectionById(Long id);
    void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection);
}
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/service/impl/DaPassingStationCollectionServiceImpl.java
@@ -5,6 +5,8 @@
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord;
import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -19,6 +21,9 @@
{
    @Autowired
    private DaPassingStationCollectionMapper daPassingStationCollectionMapper;
    @Autowired
    private RmRepairRecordMapper rmRepairRecordMapper;
    /**
     * æŸ¥è¯¢äº§å“è¿‡ç«™é‡‡é›†
@@ -93,4 +98,17 @@
    {
        return daPassingStationCollectionMapper.deleteDaPassingStationCollectionById(id);
    }
    @Override
    public void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) {
        Long[] conditions = daPassingStationCollection.getIds();
        for (int i = 0; i < conditions.length; i++) {
            DaPassingStationCollection result = daPassingStationCollectionMapper.selectDaPassingStationCollectionById(conditions[i]);
            RmRepairRecord rmRepairRecord = new RmRepairRecord();
            rmRepairRecord.setBoxCode(result.getSfcCode());
            rmRepairRecord.setProcessesCode(result.getLocationCode());
            rmRepairRecord.setOriginalResult(result.getOutRsSign());
            rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord);
        }
    }
}
jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml
@@ -43,6 +43,9 @@
            <if test="equipmentNo != null  and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
            <if test="inboundTime != null "> and inbound_time = #{inboundTime}</if>
            <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
            <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if>
            <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if>
        </where>
    </select>
    
jcdm-ui/src/api/main/da/passingStationCollection/passingStationCollection.js
@@ -9,6 +9,15 @@
  })
}
// æŸ¥è¯¢äº§å“è¿‡ç«™é‡‡é›†åˆ—表
export function insertRepairRecordByIds(query) {
  return request({
    url: '/da/passingStationCollection/insertRepairRecordByIds',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢äº§å“è¿‡ç«™é‡‡é›†è¯¦ç»†
export function getPassingStationCollection(id) {
  return request({
jcdm-ui/src/views/main/kb/repairMark/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,209 @@
<template>
  <div class="app-container">
    <el-card class="box-card" >
      <el-row>
        <el-divider style="margin-bottom: 10px"><span style="font-size: 40px">发动机返修标记系统</span></el-divider>
      </el-row>
      <el-row style="margin-top: 10px">
        <el-form :model="queryParams.sfcCode" ref="queryForm" :inline="true" label-width="68px" >
          <el-form-item label-width="120" label="发动机号:" prop="orderNo">
            <el-input
              v-model="queryParams.sfcCode"
              placeholder="请输入发动机号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item style="margin-left: 20px">
            <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">查询</el-button>
            <el-button type="primary" icon="el-icon-scissors" @click="repairProgressHandleQuery">返修进度</el-button>
          </el-form-item>
        </el-form>
      </el-row>
    </el-card>
    <el-row :gutter="0">
      <el-col :span="20">
        <el-card style="margin-top: 10px; height: 490px;" class="box-card">
          <el-table border ref="multipleTable" :data="passingStationCollectionList"  @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" align="center" />
            <el-table-column label="工单编号" width="120" align="center" prop="workOrderNo">
            </el-table-column>
            <el-table-column label="总成序列号" width="150" align="center" prop="sfcCode">
            </el-table-column>
            <el-table-column label="产品编号" align="center" prop="productCode">
            </el-table-column>
            <el-table-column label="产线编号" align="center" prop="productionLine">
            </el-table-column>
            <el-table-column label="工位编号" align="center" prop="locationCode">
            </el-table-column>
            <el-table-column label="入站时间" align="center" prop="inboundTime" width="100">
              <template slot-scope="scope">
                <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d}') }}</span>
              </template>
            </el-table-column>
            <el-table-column label="出站时间" align="center" prop="outboundTime" width="100">
              <template slot-scope="scope">
                <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span>
              </template>
            </el-table-column>
            <el-table-column label="是否合格" align="center" prop="outRsSign">
            </el-table-column>
            <el-table-column label="NG原因" align="center" prop="outMsgSign">
            </el-table-column>
            <el-table-column label="采集时间" align="center" prop="collectionTime" width="180">
              <template slot-scope="scope">
                <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span>
              </template>
            </el-table-column>
            <el-table-column label="节拍时间" align="center" prop="beatTime">
            </el-table-column>
          </el-table>
        </el-card>
      </el-col>
      <el-col :span="4">
        <el-card style="margin-top: 10px; min-height: 490px" class="box-card">
          <el-button type="success" @click="selectAll" style="margin-left: 50px;width: 100px;margin-top: 10px">选择所有</el-button>
          <el-button type="success" @click="clearAll" style="margin-left: 50px; width: 100px;margin-top: 10px">取消选择</el-button>
          <el-button type="success" @click="selectUnqualified" style="margin-left: 50px; width: 100px;margin-top: 10px">选择不合格</el-button>
          <el-button type="success" @click="markComplete" style="margin-left: 50px; width: 100px;margin-top: 10px">标记完成</el-button>
          <el-button type="success" @click="repairRecord" style="margin-left: 50px; width: 100px;margin-top: 10px">返修记录</el-button>
          <el-button type="success" @click="operationLog" style="margin-left: 50px; width: 100px;margin-top: 10px">操作日志</el-button>
        </el-card>
      </el-col>
    </el-row>
    <el-dialog v-dialogpop-up :visible.sync="open" width="700px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        è¿”修进度
      </span>
      <el-table border :data="repairRecordList">
        <el-table-column label="发动机号" width="150" align="center" prop="boxCode" />
        <el-table-column label="工位号" align="center" prop="processesCode" />
        <el-table-column label="返修结果" align="center" prop="repairResults" />
        <el-table-column label="原结果" align="center" prop="originalResult" />
        <el-table-column label="返修时间" align="center" width="160" prop="repairTime" />
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  listPassingStationCollection,
  insertRepairRecordByIds
} from "@/api/main/da/passingStationCollection/passingStationCollection";
import {listRepairRecord} from "@/api/main/rm/repairRecord/repairRecord";
export default {
  name: "index",
  dicts: ['sys_normal_disable'],
  data(){
    return{
      // è¿”修记录表格数据
      repairRecordList: [],
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // äº§å“è¿‡ç«™é‡‡é›†è¡¨æ ¼æ•°æ®
      passingStationCollectionList: [],
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        sfcCode: '',
        outRsSign: '',
      },
      ids: [],
      allSelected: false
    }
  },
  mounted() {
    this.getList()
  },
  methods:{
    // å–消按钮
    cancel() {
      this.open = false;
    },
    selectAll(){
      this.passingStationCollectionList.forEach(row => {
        this.$refs.multipleTable.toggleRowSelection(row);
      });
    },
    clearAll(){
      this.$refs.multipleTable.clearSelection();
    },
    selectUnqualified(){
      let outRsSign = this.passingStationCollectionList.filter(row => row.outRsSign === '合格')
      outRsSign.forEach(row => {
        this.$refs.multipleTable.toggleRowSelection(row);
      })
      this.$modal.msgSuccess('选择不合格');
    },
    markComplete(){
      if(this.ids.length === 0){
        this.$modal.msgSuccess('未选择');
      }else {
        this.$modal.msgSuccess('标记完成');
        let queryParams = {
          ids: this.ids
        }
        insertRepairRecordByIds(queryParams).then(response => {
        });
      }
    },
    repairRecord(){
      this.$modal.msgSuccess('返修记录');
    },
    operationLog(){
      this.$modal.msgSuccess('操作日志');
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    repairProgressHandleQuery(){
      this.open = true;
      if(this.queryParams.engineNo === ''||this.queryParams.engineNo=== null){
        this.$modal.msgSuccess('请输入发动机号');
      }else {
        /** æŸ¥è¯¢è¿”修记录列表 */
        let queryParams = {
          boxCode: this.queryParams.engineNo
        }
        listRepairRecord(queryParams).then(response => {
          this.repairRecordList = response.rows;
        });
      }
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.getList();
    },
    /** æŸ¥è¯¢äº§å“è¿‡ç«™é‡‡é›†åˆ—表 */
    getList() {
      listPassingStationCollection(this.queryParams).then(response => {
        this.passingStationCollectionList = response.rows;
        this.total = response.total;
      });
    },
  },
}
</script>
<style scoped>
::v-deep .el-form-item__label{
  font-size: large;
}
::v-deep .el-card__body{
  padding: 15px 20px 0px 20px;
}
</style>