春风项目四线(合箱线、总装线)
wujian
2024-01-31 c74dcb8dca7b9e3eded0d20299f19a26a6b70974
add 追溯报表
已添加8个文件
已修改13个文件
1365 ■■■■■ 文件已修改
jcdm-main/pom.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/FollowReportVO.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/index.vue 289 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/report1.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/report2.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/report3.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/report4.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/followReport/report5.vue 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/pom.xml
@@ -90,6 +90,21 @@
            <artifactId>gson</artifactId>
            <version>2.10.1</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.13</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
            <version>3.1.3</version>
        </dependency>
        <dependency>
            <groupId>com.jcdm</groupId>
            <artifactId>jcdm-system</artifactId>
        </dependency>
    </dependencies>
</project>
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package com.jcdm.main.bs.orderScheduling.common;
public class Constants {
    public static final String DATA1 = "拧紧数据";
    public static final String DATA2 = "相机检测";
    public static final String DATA3 = "外漏检测";
    public static final String DATA4 = "机油加注数据";
    public static final String DATA5 = "工位结果";
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -1,12 +1,27 @@
package com.jcdm.main.bs.orderScheduling.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.R;
import com.jcdm.common.core.domain.entity.SysDictData;
import com.jcdm.common.utils.DictUtils;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO;
import com.jcdm.main.bs.orderScheduling.vo.LineChartVO;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.system.service.ISysDictDataService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -39,6 +54,10 @@
    @Autowired
    private IBsOrderSchedulingService bsOrderSchedulingService;
    @Resource
    private ISysDictDataService iSysDictDataService;
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     */
@@ -52,6 +71,80 @@
    }
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')")
    @GetMapping("/getFollowReportList")
    public R getFollowReportList(BsOrderScheduling bsOrderScheduling)
    {
        FollowReportVO followReportList = bsOrderSchedulingService.getFollowReportList(bsOrderScheduling);
        return R.ok(followReportList);
    }
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:export')")
    @Log(title = "追溯报表导出", businessType = BusinessType.EXPORT)
    @PostMapping("/exportFollow")
    public void exportFollow(HttpServletResponse response, BsOrderScheduling bsOrderScheduling)
    {
        FollowReportVO followReportList = bsOrderSchedulingService.getFollowReportList(bsOrderScheduling);
        List<SysDictData> allDict = iSysDictDataService.selectDictDataList(null);
        if (CollUtil.isNotEmpty(followReportList.getMainList())){
            List<SysDictData> dict1 = allDict.stream().filter(x -> "material_type".equals(x.getDictType())).collect(Collectors.toList());
            List<SysDictData> dict2 = allDict.stream().filter(x -> "order_scheduling_produce_status".equals(x.getDictType())).collect(Collectors.toList());
            for (BsOrderScheduling orderScheduling : followReportList.getMainList()) {
                if (CollUtil.isNotEmpty(dict1)){
                    List<SysDictData> collect = dict1.stream().filter(x -> x.getDictValue().equals(orderScheduling.getProductType())).collect(Collectors.toList());
                    if (CollUtil.isNotEmpty(collect)){
                        SysDictData sysDictData1 = collect.get(0);
                        orderScheduling.setProductTypeString(sysDictData1.getDictLabel());
                    }
                }
                if (CollUtil.isNotEmpty(dict2)){
                    List<SysDictData> collect = dict2.stream().filter(x -> x.getDictValue().equals(orderScheduling.getProductionStatus())).collect(Collectors.toList());
                    if (CollUtil.isNotEmpty(collect)){
                        SysDictData sysDictData1 = collect.get(0);
                        orderScheduling.setProductionStatusString(sysDictData1.getDictLabel());
                    }
                }
            }
        }
        String fileName = "追溯报表";
        try {
            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();
            WriteSheet mainSheet = EasyExcel.writerSheet(0, "订单排产")
                    .head(BsOrderScheduling.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            WriteSheet sheet1 = EasyExcel.writerSheet(1, "拧紧数据")
                    .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            WriteSheet sheet2 = EasyExcel.writerSheet(2, "相机检测")
                    .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            WriteSheet sheet3 = EasyExcel.writerSheet(3, "外漏检测")
                    .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            WriteSheet sheet4 = EasyExcel.writerSheet(4, "机油加注")
                    .head(DaParamCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            WriteSheet sheet5 = EasyExcel.writerSheet(5, "工位结果")
                    .head(DaPassingStationCollection.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    .build();
            excelWriter.write(followReportList.getMainList(),mainSheet);
            excelWriter.write(followReportList.getList1(),sheet1);
            excelWriter.write(followReportList.getList2(),sheet2);
            excelWriter.write(followReportList.getList3(),sheet3);
            excelWriter.write(followReportList.getList4(),sheet4);
            excelWriter.write(followReportList.getList5(),sheet5);
            response.setContentType("application/vnd.ms-excel;charset=utf-8");
            response.setCharacterEncoding("UTF-8");
            response.setHeader("Content-Disposition","attachment;filename="+fileName+".xlsx");
            excelWriter.finish();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    /**
     * æŸ¥è¯¢ä¸‹çº¿æ•°é‡
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')")
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java
@@ -1,5 +1,11 @@
package com.jcdm.main.bs.orderScheduling.domain;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -20,6 +26,10 @@
 * @date 2024-01-13
 */
@Data
@ExcelIgnoreUnannotated
@ColumnWidth(16)
@HeadRowHeight(14)
@HeadFontStyle(fontHeightInPoints = 11)
public class BsOrderScheduling extends BaseEntity
{
    private static final long serialVersionUID = 1L;
@@ -29,34 +39,55 @@
    /** è®¢å•ç¼–号 */
    @Excel(name = "订单编号")
    @ExcelProperty(value = "订单编号", index = 0)
    private String orderNo;
    /** å‘动机号 */
    @Excel(name = "发动机号")
    @Excel(name = "箱体编码")
    @ExcelProperty(value = "箱体编码", index = 1)
    private String engineNo;
    @TableField(exist = false)
    @ExcelIgnore
    private List<String> engineNoList;
    @TableField(exist = false)
    @ExcelIgnore
    private List<String> engineNoListExcel;
    /** äº§å“ç±»åž‹ */
    @Excel(name = "产品类型")
    private String productType;
    @ExcelProperty(value = "产品类型", index = 2)
    private String productTypeString;
    /** æœºåž‹ */
    @Excel(name = "机型")
    @ExcelProperty(value = "机型", index = 3)
    private String model;
    /** ç”Ÿäº§çŠ¶æ€ */
    @Excel(name = "生产状态")
    private String productionStatus;
    @ExcelProperty(value = "生产状态", index = 4)
    private String productionStatusString;
    /** å·¥æ—¶ */
    @Excel(name = "工时")
    @ExcelProperty(value = "工时", index = 5)
    private String workingHours;
    /** å½“前工位 */
    @Excel(name = "当前工位")
    @ExcelProperty(value = "当前工位", index = 6)
    private String currentWorkstation;
    /** è´¨é‡çŠ¶æ€ */
    @Excel(name = "质量状态")
    @ExcelProperty(value = "质量状态", index = 7)
    private String qualityStatus;
    /** æ˜¯å¦æ‰“印 */
@@ -65,105 +96,144 @@
    /** 10报工 */
    @Excel(name = "10报工")
    @ExcelIgnore
    private String report10;
    /** 20报工 */
    @Excel(name = "20报工")
    @ExcelIgnore
    private String report20;
    /** åˆç®±ä¸Šçº¿ */
    @Excel(name = "合箱上线")
    @ExcelIgnore
    private String combinedBoxTime;
    /** æ€»è£…下线 */
    @Excel(name = "总装下线")
    @ExcelIgnore
    private String finalAssemblyTime;
    /** æ“ä½œäºº */
    @Excel(name = "操作人")
    @ExcelProperty(value = "操作人", index = 14)
    private String operator;
    /** æ“ä½œæ—¶é—´ */
    @Excel(name = "操作时间")
    @ExcelProperty(value = "操作时间", index = 15)
    private String operateTime;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    @ExcelIgnore
    private String status;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    @ExcelIgnore
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    @ExcelIgnore
    private String spareField2;
    /** é¢„留字段3 */
    @Excel(name = "预留字段3")
    @ExcelIgnore
    private String spareField3;
    /** é¢„留字段4 */
    @Excel(name = "预留字段4")
    @ExcelIgnore
    private String spareField4;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    @ExcelIgnore
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    @ExcelIgnore
    private String updateUser;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    @ExcelIgnore
    private String remarks;
    /** CVT报工 */
    @Excel(name = "CVT报工")
    @ExcelIgnore
    private String report30;
    @ExcelIgnore
    private String[] dateConditions;
    @ExcelIgnore
    private String startTime;
    @ExcelIgnore
    private String endTime;
    /** åˆç®±ä¸Šçº¿æ—¶é—´ */
    @Excel(name = "合箱上线时间")
    @ExcelProperty(value = "合箱上线时间", index = 8)
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date boxClosingOnlineTime;
    /** åˆç®±ä¸‹çº¿æ—¶é—´ */
    @Excel(name = "合箱下线时间")
    @ExcelProperty(value = "合箱下线时间", index = 9)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date closingBoxOfflineTime;
    /** æ€»è£…上线时间 */
    @Excel(name = "总装上线时间")
    @ExcelProperty(value = "总装上线时间", index =10)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finalAssemblyLaunchTime;
    /** æ€»è£…下线时间 */
    @Excel(name = "总装下线时间")
    @ExcelProperty(value = "总装下线时间", index = 11)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finalAssemblyOfflineTime;
    /** CVT上线时间 */
    @Excel(name = "CVT上线时间")
    @ExcelProperty(value = "CVT上线时间", index = 12)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cvtLaunchTime;
    /** CVT下线时间 */
    @Excel(name = "CVT下线时间")
    @ExcelProperty(value = "CVT下线时间", index = 13)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date cvtOfflineTime;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private LocalDateTime startQuery;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private LocalDateTime endQuery;
    @TableField(exist = false)
    @ExcelIgnore
    private String queryField;
    public Date getBoxClosingOnlineTime() {
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO;
import com.jcdm.main.bs.orderScheduling.vo.LineChartVO;
/**
@@ -27,6 +28,7 @@
     * @return è®¢å•æŽ’产集合
     */
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling);
    public List<LineChartVO> getOffLineNum();
    /**
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -5,13 +5,21 @@
import com.jcdm.common.utils.DateUtils;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
import com.jcdm.main.bs.orderScheduling.common.Constants;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO;
import com.jcdm.main.bs.orderScheduling.vo.LineChartVO;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
import com.jcdm.main.da.paramCollection.service.impl.DaParamCollectionServiceImpl;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
@@ -33,6 +41,12 @@
{
    @Autowired
    private BsOrderSchedulingMapper bsOrderSchedulingMapper;
    @Resource
    private DaParamCollectionMapper daParamCollectionMapper;
    @Resource
    private DaPassingStationCollectionMapper daPassingStationCollectionMapper;
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产
@@ -64,6 +78,41 @@
    }
    @Override
    public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling)
    {
        FollowReportVO vo = new FollowReportVO();
        if(bsOrderScheduling.getDateConditions()!=null){
            String[] conditions = bsOrderScheduling.getDateConditions();
            bsOrderScheduling.setStartTime(conditions[0]);
            bsOrderScheduling.setEndTime(conditions[1]);
        }
        //主表数据
        List<BsOrderScheduling> mainList = bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling);
        vo.setMainList(mainList);
        List<String> engineNoList = mainList.stream().map(BsOrderScheduling::getEngineNo).distinct().collect(Collectors.toList());
        List<DaParamCollection> allChildList = new ArrayList<>();
        List<DaPassingStationCollection> collect5 = new ArrayList<>();
        if (CollUtil.isNotEmpty(engineNoList)){
            allChildList = daParamCollectionMapper.getListBySfcCode(engineNoList);
            collect5 = daPassingStationCollectionMapper.getListBySfcCode(engineNoList);
        }
        if (CollUtil.isNotEmpty(allChildList)){
            //拿到所有子数据
            List<DaParamCollection> collect1 = allChildList.stream().filter(x -> Constants.DATA1.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect2 = allChildList.stream().filter(x -> Constants.DATA2.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect3 = allChildList.stream().filter(x -> Constants.DATA3.equals(x.getType())).collect(Collectors.toList());
            List<DaParamCollection> collect4 = allChildList.stream().filter(x -> Constants.DATA4.equals(x.getType())).collect(Collectors.toList());
            vo.setList1(collect1);
            vo.setList2(collect2);
            vo.setList3(collect3);
            vo.setList4(collect4);
        }
        vo.setList5(collect5);
        return vo;
    }
    @Override
    public List<LineChartVO> getOffLineNum()
    {
        List<LineChartVO> result = new ArrayList<>();
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/FollowReportVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package com.jcdm.main.bs.orderScheduling.vo;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import lombok.Data;
import java.util.List;
@Data
public class FollowReportVO {
    List<BsOrderScheduling> mainList;
    private List<DaParamCollection> list1;
    private List<DaParamCollection> list2;
    private List<DaParamCollection> list3;
    private List<DaParamCollection> list4;
    private List<DaPassingStationCollection> list5;
}
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java
@@ -1,11 +1,19 @@
package com.jcdm.main.da.paramCollection.domain;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * è®¾å¤‡äº§å“è¿‡ç¨‹å‚数采集对象 da_param_collection
@@ -13,6 +21,11 @@
 * @author yyt
 * @date 2023-12-13
 */
@Data
@ExcelIgnoreUnannotated
@ColumnWidth(16)
@HeadRowHeight(14)
@HeadFontStyle(fontHeightInPoints = 11)
public class DaParamCollection extends BaseEntity
{
    private static final long serialVersionUID = 1L;
@@ -25,7 +38,8 @@
    private String workOrderNo;
    /** æ€»æˆåºåˆ—号 */
    @Excel(name = "总成序列号")
    @Excel(name = "箱体编码")
    @ExcelProperty(value = "箱体编码", index = 0)
    private String sfcCode;
    /** äº§å“ç¼–号 */
@@ -38,6 +52,7 @@
    /** å·¥ä½ç¼–号 */
    @Excel(name = "工位编号")
    @ExcelProperty(value = "工位", index = 1)
    private String locationCode;
    /** è®¾å¤‡ç¼–号 */
@@ -50,6 +65,7 @@
    /** å‚数值 */
    @Excel(name = "参数值")
    @ExcelProperty(value = "参数值", index = 3)
    private String paramValue;
    /** å‚数上限 */
@@ -66,6 +82,9 @@
    /** é‡‡é›†æ—¶é—´ */
    @Excel(name = "采集时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "采集时间", index = 5)
    private Date collectionTime;
    /** é¢„留字段1 */
@@ -86,10 +105,12 @@
    /** å‚数名称 */
    @Excel(name = "参数名称")
    @ExcelProperty(value = "参数名称", index = 2)
    private String paramName;
    /** å•ä½ */
    @Excel(name = "单位")
    @ExcelProperty(value = "单位", index = 4)
    private String unit;
    /** ç±»åž‹ */
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java
@@ -1,7 +1,7 @@
package com.jcdm.main.da.paramCollection.mapper;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
@@ -28,6 +28,8 @@
     */
    public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection);
    public List<DaParamCollection> getListBySfcCode(@Param("engineNoList") List<String> engineNoList);
    /**
     * æ–°å¢žè®¾å¤‡äº§å“è¿‡ç¨‹å‚数采集
     * 
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java
@@ -2,6 +2,11 @@
import java.util.Date;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -9,6 +14,7 @@
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * äº§å“è¿‡ç«™é‡‡é›†å¯¹è±¡ da_passing_station_collection
@@ -17,6 +23,10 @@
 * @date 2023-12-12
 */
@Data
@ExcelIgnoreUnannotated
@ColumnWidth(16)
@HeadRowHeight(14)
@HeadFontStyle(fontHeightInPoints = 11)
public class DaPassingStationCollection extends BaseEntity
{
    private static final long serialVersionUID = 1L;
@@ -26,22 +36,27 @@
    /** å·¥å•ç¼–号 */
    @Excel(name = "工单编号")
    @ExcelProperty(value = "工单编号", index = 0)
    private String workOrderNo;
    /** æ€»æˆåºåˆ—号 */
    @Excel(name = "总成序列号")
    @Excel(name = "箱体编码")
    @ExcelProperty(value = "箱体编码", index = 1)
    private String sfcCode;
    /** äº§å“ç¼–号 */
    @Excel(name = "产品编号")
    @ExcelProperty(value = "产品编号", index = 2)
    private String productCode;
    /** äº§çº¿ç¼–号 */
    @Excel(name = "产线编号")
    @ExcelProperty(value = "产线编号", index = 3)
    private String productionLine;
    /** å·¥ä½ç¼–号 */
    @Excel(name = "工位编号")
    @ExcelProperty(value = "工位编号", index = 4)
    private String locationCode;
    /** è®¾å¤‡ç¼–号 */
@@ -51,11 +66,17 @@
    /** å…¥ç«™æ—¶é—´ */
//    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入站时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "入站时间", index = 5)
    private Date inboundTime;
    /** å‡ºç«™æ—¶é—´ */
//    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出站时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "出站时间", index = 6)
    private Date outboundTime;
    @TableField(exist = false)
@@ -74,15 +95,20 @@
    /** å‡ºç«™æ˜¯å¦åˆæ ¼ */
    @Excel(name = "出站是否合格")
    @ExcelProperty(value = "是否合格", index = 7)
    private String outRsSign;
    /** å‡ºç«™NG原因 */
    @Excel(name = "出站NG原因")
    @ExcelProperty(value = "NG原因", index = 8)
    private String outMsgSign;
    /** é‡‡é›†æ—¶é—´ */
//    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "采集时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "采集时间", index = 9)
    private Date collectionTime;
    /** é¢„留字段1 */
@@ -99,6 +125,7 @@
    /** èŠ‚拍时间 */
    @Excel(name = "节拍时间")
    @ExcelProperty(value = "节拍时间", index = 10)
    private String beatTime;
    @TableField(exist = false)
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java
@@ -1,6 +1,7 @@
package com.jcdm.main.da.passingStationCollection.mapper;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -28,6 +29,8 @@
     */
    public List<DaPassingStationCollection> selectDaPassingStationCollectionList(DaPassingStationCollection daPassingStationCollection);
    public List<DaPassingStationCollection> getListBySfcCode(@Param("engineNoList") List<String> engineNoList);
    /**
     * æ–°å¢žäº§å“è¿‡ç«™é‡‡é›†
     * 
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -80,7 +80,18 @@
            <if test="cvtLaunchTime != null  and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if>
            <if test="cvtOfflineTime != null  and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if>
            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and cvt_offline_time between #{startTime} and #{endTime}</if>
            <if test="engineNoList != null and engineNoList.size() > 0">
                and engine_no in
                <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
                    #{engine}
                </foreach>
            </if>
            <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
                and engine_no in
                <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
                    #{engine}
                </foreach>
            </if>
        </where>
    </select>
    
jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml
@@ -53,7 +53,14 @@
        <include refid="selectDaParamCollectionVo"/>
        where id = #{id}
    </select>
    <select id="getListBySfcCode" resultMap="DaParamCollectionResult">
        <include refid="selectDaParamCollectionVo"/>
        where sfc_code in
        <foreach collection="engineNoList" open="(" close=")" item="code" separator=",">
            #{code}
        </foreach>
    </select>
    <insert id="insertDaParamCollection" parameterType="DaParamCollection">
        insert into da_param_collection
        <trim prefix="(" suffix=")" suffixOverrides=",">
jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml
@@ -53,7 +53,15 @@
        <include refid="selectDaPassingStationCollectionVo"/>
        where id = #{id}
    </select>
    <select id="getListBySfcCode"
            resultMap="DaPassingStationCollectionResult">
        <include refid="selectDaPassingStationCollectionVo"/>
        where sfc_code in
            <foreach collection="engineNoList" open="(" close=")" item="code" separator=",">
            #{code}
            </foreach>
    </select>
    <insert id="insertDaPassingStationCollection" parameterType="DaPassingStationCollection">
        insert into da_passing_station_collection
        <trim prefix="(" suffix=")" suffixOverrides=",">
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js
@@ -8,6 +8,14 @@
    params: query
  })
}
//查询追溯报表
export function getFollowReport(query) {
  return request({
    url: '/bs/orderScheduling/getFollowReportList',
    method: 'get',
    params: query
  })
}
//查询当天生产数据
export function getOffLineNum() {
  return request({
jcdm-ui/src/views/main/da/followReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,289 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
      <div class="headClass">
        <div style="display: flex;height: 20px">
          <div>
            <span style="font-size: large; font-weight: bold; text-decoration: underline; margin-bottom: 10px">追溯报表</span>
          </div>
          <div style="margin-left: 30%">
            <el-form :inline="true" :model="queryParams" class="myFrom" size="mini">
              <el-form-item label="订单编号">
                <el-input v-model="queryParams.orderNo" placeholder="订单编号"></el-input>
              </el-form-item>
              <el-form-item label="箱体编码">
                <el-input v-model="queryParams.engineNo" placeholder="箱体编码">
                </el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" icon="el-icon-download" style="background-color: #6dbf6d" @click="exportReport">导出报表</el-button>
              </el-form-item>
            </el-form>
          </div>
        </div>
        <div style="margin-top: 10px">
          <el-table
            style="width: 100%;"
            border height="190"
            v-loading="loading"
            highlight-current-row
            :data="orderSchedulingList"
            @selection-change="handleSelectionChange"
            @current-change="handleCurrentChange">
            <el-table-column
              type="index"
              width="50"></el-table-column>
            <el-table-column type="selection" width="55" align="center" />
            <el-table-column label="订单编号" align="center" prop="orderNo" width="130">
            </el-table-column>
            <el-table-column label="箱体编码" align="center" prop="engineNo" width="150">
            </el-table-column>
            <el-table-column label="产品类型" align="center" prop="productType">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.material_type" :value="scope.row.productType"/>
              </template>
            </el-table-column>
            <el-table-column label="机型" align="center" prop="model">
            </el-table-column>
            <el-table-column label="生产状态" align="center" prop="productionStatus">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
              </template>
            </el-table-column>
            <el-table-column label="工时" align="center" prop="workingHours">
            </el-table-column>
            <el-table-column label="当前工位" align="center" prop="currentWorkstation">
            </el-table-column>
            <el-table-column label="质量状态" align="center" prop="qualityStatus">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
              </template>
            </el-table-column>
            <el-table-column label="合箱上线时间" align="center" prop="boxClosingOnlineTime" width="160">
            </el-table-column>
            <el-table-column label="合箱下线时间" align="center" prop="closingBoxOfflineTime" width="160">
            </el-table-column>
            <el-table-column label="总装上线时间" align="center" prop="finalAssemblyLaunchTime" width="160">
            </el-table-column>
            <el-table-column label="总装下线时间" align="center" prop="finalAssemblyOfflineTime" width="160">
            </el-table-column>
            <el-table-column label="CVT上线时间" align="center" prop="cvtLaunchTime" width="160">
            </el-table-column>
            <el-table-column label="CVT下线时间" align="center" prop="cvtOfflineTime" width="160">
            </el-table-column>
            <el-table-column label="操作人" align="center" prop="operator">
            </el-table-column>
            <el-table-column label="操作时间" align="center" prop="operateTime" width="160">
            </el-table-column>
          </el-table>
        </div>
      </div>
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getMainList"
      />
    </el-card>
    <div>
      <el-tabs type="border-card">
        <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>拧紧数据</span>
          <report1 :list1 = this.list1></report1>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>相机检测</span>
          <report2 :list2 = this.list2></report2>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>外漏检测</span>
          <report3 :list3 = this.list3></report3>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>机油加注</span>
          <report4 :list4 = this.list4></report4>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"><i class="el-icon-date"></i>工位结果</span>
          <report5 :list5 = this.list5></report5>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
<script>
import report1 from "./report1";
import {listOrderScheduling, getFollowReport} from "../../../../api/main/bs/orderScheduling/orderScheduling";
import report2 from "./report2";
import report3 from "./report3";
import report4 from "./report4";
import report5 from "./report5";
export default {
  name: "index",
  components: { report1, report2, report3, report4, report5,},
  dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
  data() {
    return {
      loading: false,
      total: 0,
      orderSchedulingList: [],
      list1: [],
      list2: [],
      list3: [],
      list4: [],
      list5: [],
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        orderNo: null,
        engineNo: null,
        productType: null,
        model: null,
        productionStatus: null,
        workingHours: null,
        currentWorkstation: null,
        qualityStatus: null,
        whetherOrPrint: null,
        report10: null,
        report20: null,
        combinedBoxTime: null,
        finalAssemblyTime: null,
        operator: null,
        operateTime: null,
        status: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null,
        createUser: null,
        updateUser: null,
        remarks: null,
        dateConditions: [],
        engineNoList: [],
        engineNoListExcel: []
      },
      multipleSelection: [],
      multipleSelectionExcel: [],
      currentRow: null
    }
  },
  created() {
    let workOrderNo = this.$route.query.workOrderNo;
    this.queryParams.orderNo = workOrderNo
    this.getMainList();
    this.getChildList();
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelectionExcel = val;
      console.log('MMMMM--',this.multipleSelectionExcel)
      if (this.multipleSelectionExcel !== null && this.multipleSelectionExcel.length > 0){
        this.queryParams.engineNoListExcel = []
        this.multipleSelectionExcel.forEach(x => {
          this.queryParams.engineNoListExcel.push(x.engineNo)
        })
      }else {
        this.queryParams.engineNoListExcel = []
      }
      console.log('this.handleSelectionChange ',this.queryParams.engineNoListExcel )
    },
    handleCurrentChange(val) {
      this.currentRow = val;
      //查询选中行数据
      this.queryParams.engineNoList = []
      this.queryParams.engineNoList.push(this.currentRow.engineNo)
      this.getChildList()
      console.log('handleCurrentChange',this.queryParams.engineNoList)
      console.log('handleCurrentChange222',this.queryParams.engineNoListExcel)
    },
    //导出
    exportReport(){
      if (this.queryParams.engineNoListExcel.length === 0){
        this.$message.error("请勾选需要导出的数据")
      }else {
        this.queryParams.engineNoList = []
        this.download('bs/orderScheduling/exportFollow', {
          ...this.queryParams
        }, `追溯报表_${new Date().getTime()}.xlsx`)
      }
    },
    /** æŸ¥è¯¢è®¢å•æŽ’产列表 */
    getMainList() {
      this.loading = true;
      console.log(this.queryParams)
      listOrderScheduling(this.queryParams).then(response => {
        this.orderSchedulingList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    getChildList(){
      getFollowReport(this.queryParams).then(response => {
        this.list1 = response.data.list1;
        console.log('list111111',this.list1)
        this.list2 = response.data.list2;
        this.list3 = response.data.list3;
        this.list4 = response.data.list4;
        this.list5 = response.data.list5;
      });
    },
    getList(){
      this.getMainList()
      this.getChildList()
    }
    // handleCurrentChange(val) {
    //   this.multipleSelection = val;
    //   console.log('this.multipleSelection ',this.multipleSelection )
    // }
  }
}
</script>
<style scoped>
.headClass {
  height: 200px;
}
::v-deep .el-table--scrollable-x .el-table__body-wrapper {
   z-index: 3;
 }
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
   height: 6px;
 }
::v-deep .el-form .myFrom .el-form--inline{
  height: 20px;
}
::v-deep .el-card__body {
  padding: 10px 15px 10px 15px;
}
.app-container{
  height: 625px;
}
</style>
jcdm-ui/src/views/main/da/followReport/report1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
<template>
  <el-table
    ref="multipleTable"
    :data="list1"
    height="259"
    border
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      type="selection"
      align="center"
      width="55">
    </el-table-column>
    <el-table-column
      label="箱体编码"
      align="center"
      width="160">
      <template slot-scope="scope">{{ scope.row.sfcCode }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="工位"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.locationCode }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="参数名"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramName }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="采集结果"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramValue }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="单位"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.unit }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="时间"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.createTime }}</template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: "report1",
  props:['list1'],
  data() {
    return {
      total: '',
      queryParams: {
        pageNum: 5,
        pageSize: 5
      },
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }],
      multipleSelection: []
    }
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    getList(){
    }
  }
}
</script>
<style scoped>
</style>
jcdm-ui/src/views/main/da/followReport/report2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
<template>
  <el-table
    ref="multipleTable"
    :data="list2"
    height="300"
    border
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      type="selection"
      align="center"
      width="55">
    </el-table-column>
    <el-table-column
      label="箱体编码"
      align="center"
      width="160">
      <template slot-scope="scope">{{ scope.row.sfcCode }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="工位"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.locationCode }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="参数名"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramName }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="采集结果"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramValue }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="单位"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.unit }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="时间"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.createTime }}</template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: "report2",
  props:['list2'],
  data() {
    return {
      total: '',
      queryParams: {
        pageNum: 5,
        pageSize: 5
      },
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }],
      multipleSelection: []
    }
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    getList(){
    }
  }
}
</script>
<style scoped>
</style>
jcdm-ui/src/views/main/da/followReport/report3.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
<template>
  <el-table
    ref="multipleTable"
    :data="list3"
    height="300"
    border
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      type="selection"
      align="center"
      width="55">
    </el-table-column>
    <el-table-column
      label="箱体编码"
      align="center"
      width="160">
      <template slot-scope="scope">{{ scope.row.sfcCode }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="工位"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.locationCode }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="参数名"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramName }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="采集结果"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramValue }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="单位"
      align="center"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.unit }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="时间"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.createTime }}</template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: "report3",
  props:['list3'],
  data() {
    return {
      total: '',
      queryParams: {
        pageNum: 5,
        pageSize: 5
      },
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }],
      multipleSelection: []
    }
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    getList(){
    }
  }
}
</script>
<style scoped>
</style>
jcdm-ui/src/views/main/da/followReport/report4.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
<template>
  <el-table
    ref="multipleTable"
    :data="list4"
    height="300"
    border
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      type="selection"
      align="center"
      width="55">
    </el-table-column>
    <el-table-column
      label="箱体编码"
      align="center"
      width="160">
      <template slot-scope="scope">{{ scope.row.sfcCode }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="工位"
      align="center"
      width="120">
      <template slot-scope="scope">{{ scope.row.locationCode }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="参数名"
      align="center"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramName }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="采集结果"
      align="center"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.paramValue }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="单位"
      align="center"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.unit }}</template>
    </el-table-column>
    <el-table-column
      prop="address"
      label="时间"
      align="center"
      show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.createTime }}</template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: "report4",
  props:['list4'],
  data() {
    return {
      total: '',
      queryParams: {
        pageNum: 5,
        pageSize: 5
      },
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }],
      multipleSelection: []
    }
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    getList(){
    }
  }
}
</script>
<style scoped>
</style>
jcdm-ui/src/views/main/da/followReport/report5.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,205 @@
<template>
  <el-table
    ref="multipleTable"
    :data="list5"
    height="300"
    border
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
        <el-table-column
          type="index"
          width="50">
        </el-table-column>
    <el-table-column type="selection" width="55" align="center" />
    <el-table-column label="工单编号" align="center" prop="workOrderNo">
    </el-table-column>
    <el-table-column label="总成序列号" 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} {h}:{i}:{s}') }}</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} {h}:{i}:{s}') }}</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} {h}:{i}:{s}') }}</span>
      </template>
    </el-table-column>
    <el-table-column label="节拍时间" align="center" prop="beatTime">
    </el-table-column>
<!--    <el-table-column-->
<!--      type="index"-->
<!--      width="50">-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      type="selection"-->
<!--      align="center"-->
<!--      width="55">-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      label="箱体编码"-->
<!--      align="center"-->
<!--      width="160">-->
<!--      <template slot-scope="scope">{{ scope.row.sfcCode }}</template>-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      prop="name"-->
<!--      align="center"-->
<!--      label="工位"-->
<!--      width="120">-->
<!--      <template slot-scope="scope">{{ scope.row.locationCode }}</template>-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      prop="address"-->
<!--      align="center"-->
<!--      label="参数名"-->
<!--      show-overflow-tooltip>-->
<!--      <template slot-scope="scope">{{ scope.row.paramName }}</template>-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      prop="address"-->
<!--      label="采集结果"-->
<!--      align="center"-->
<!--      show-overflow-tooltip>-->
<!--      <template slot-scope="scope">{{ scope.row.paramValue }}</template>-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      prop="address"-->
<!--      label="单位"-->
<!--      align="center"-->
<!--      show-overflow-tooltip>-->
<!--      <template slot-scope="scope">{{ scope.row.unit }}</template>-->
<!--    </el-table-column>-->
<!--    <el-table-column-->
<!--      prop="address"-->
<!--      label="时间"-->
<!--      align="center"-->
<!--      show-overflow-tooltip>-->
<!--      <template slot-scope="scope">{{ scope.row.createTime }}</template>-->
<!--    </el-table-column>-->
  </el-table>
</template>
<script>
export default {
  name: "report5",
  props:['list5'],
  data() {
    return {
      total: '',
      queryParams: {
        pageNum: 5,
        pageSize: 5
      },
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 å¼„'
      }],
      multipleSelection: []
    }
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach(row => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    getList(){
    },
    // æ—¥æœŸæ ¼å¼åŒ–
    parseTime(time, pattern) {
      if (arguments.length === 0 || !time) {
        return null
      }
      const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
      let date
      if (typeof time === 'object') {
        date = time
      } else {
        if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
          time = parseInt(time)
        } else if (typeof time === 'string') {
          time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
        }
        if ((typeof time === 'number') && (time.toString().length === 10)) {
          time = time * 1000
        }
        date = new Date(time)
      }
      const formatObj = {
        y: date.getFullYear(),
        m: date.getMonth() + 1,
        d: date.getDate(),
        h: date.getHours(),
        i: date.getMinutes(),
        s: date.getSeconds(),
        a: date.getDay()
      }
      const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
        let value = formatObj[key]
        // Note: getDay() returns 0 on Sunday
        if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
        if (result.length > 0 && value < 10) {
          value = '0' + value
        }
        return value || 0
      })
      return time_str
    }
  }
}
</script>
<style scoped>
</style>