From c74dcb8dca7b9e3eded0d20299f19a26a6b70974 Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期三, 31 一月 2024 12:48:45 +0800 Subject: [PATCH] add 追溯报表 --- jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml | 13 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java | 93 ++++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java | 2 jcdm-main/pom.xml | 15 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java | 10 jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java | 3 jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js | 8 jcdm-ui/src/views/main/da/followReport/report3.vue | 128 +++++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java | 72 +++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/FollowReportVO.java | 19 jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java | 23 jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java | 4 jcdm-ui/src/views/main/da/followReport/report5.vue | 205 ++++++++ jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml | 10 jcdm-ui/src/views/main/da/followReport/report1.vue | 128 +++++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java | 49 ++ jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java | 29 + jcdm-ui/src/views/main/da/followReport/report2.vue | 128 +++++ jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml | 9 jcdm-ui/src/views/main/da/followReport/report4.vue | 128 +++++ jcdm-ui/src/views/main/da/followReport/index.vue | 289 ++++++++++++ 21 files changed, 1,358 insertions(+), 7 deletions(-) diff --git a/jcdm-main/pom.xml b/jcdm-main/pom.xml index e987e44..80cbe95 100644 --- a/jcdm-main/pom.xml +++ b/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> \ No newline at end of file diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java new file mode 100644 index 0000000..d069bd5 --- /dev/null +++ b/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 = "宸ヤ綅缁撴灉"; +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java index 1d65de6..2133b36 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java +++ b/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')") diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java index 83eb39f..6756f87 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java +++ b/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() { diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java index 7f413db..730cd19 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java +++ b/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(); /** diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java index 5965407..5f19de3 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java +++ b/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<>(); diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/FollowReportVO.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/FollowReportVO.java new file mode 100644 index 0000000..494628c --- /dev/null +++ b/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; +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java index bdbf8dd..d074195 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java +++ b/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; /** 绫诲瀷 */ diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java index 6503fbe..62696e3 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/mapper/DaParamCollectionMapper.java +++ b/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); + /** * 鏂板璁惧浜у搧杩囩▼鍙傛暟閲囬泦 * diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java b/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java index 77523c0..ac96c70 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java +++ b/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) diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java b/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java index e7ef05e..10b4fe5 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/mapper/DaPassingStationCollectionMapper.java +++ b/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); + /** * 鏂板浜у搧杩囩珯閲囬泦 * diff --git a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml b/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml index c882248..8163148 100644 --- a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml +++ b/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> diff --git a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml b/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml index 1d91ae5..67ad846 100644 --- a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml +++ b/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=","> diff --git a/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml b/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml index d3d2ff2..3359404 100644 --- a/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml +++ b/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=","> diff --git a/jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js b/jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js index 6081324..f85c919 100644 --- a/jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js +++ b/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({ diff --git a/jcdm-ui/src/views/main/da/followReport/index.vue b/jcdm-ui/src/views/main/da/followReport/index.vue new file mode 100644 index 0000000..09784ac --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/da/followReport/report1.vue b/jcdm-ui/src/views/main/da/followReport/report1.vue new file mode 100644 index 0000000..af786e8 --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/da/followReport/report2.vue b/jcdm-ui/src/views/main/da/followReport/report2.vue new file mode 100644 index 0000000..2c05aff --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/da/followReport/report3.vue b/jcdm-ui/src/views/main/da/followReport/report3.vue new file mode 100644 index 0000000..390e9e2 --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/da/followReport/report4.vue b/jcdm-ui/src/views/main/da/followReport/report4.vue new file mode 100644 index 0000000..8efef4c --- /dev/null +++ b/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> diff --git a/jcdm-ui/src/views/main/da/followReport/report5.vue b/jcdm-ui/src/views/main/da/followReport/report5.vue new file mode 100644 index 0000000..f219ad0 --- /dev/null +++ b/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> -- Gitblit v1.9.3