From 7e21bc617f3444c5a3b26ed88ea9ea7765e44d34 Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期二, 10 十二月 2024 14:30:13 +0800 Subject: [PATCH] 煤质部分后端代码 --- iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/package-info.java | 1 iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240427.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullService.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java | 75 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/ExcelImportDao.java | 16 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesChartEntity.java | 105 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickItemEntity.java | 76 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesChartServiceImpl.java | 168 ++ iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java | 85 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDetDTO.java | 77 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesChartDTO.java | 81 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java | 91 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/FullPageReqVO.java | 25 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityMediumDao.java | 25 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullDetController.java | 43 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/FcfaType.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/QuickPageReqVO.java | 20 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDTO.java | 88 + iailab-xmc-pms-biz/lib/bak-202312/coalBlendModel20231225.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/package-info.java | 1 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullDetService.java | 23 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java | 79 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/BcEnums.java | 32 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesChartDao.java | 17 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityExcelImportDao.java | 16 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDetDao.java | 15 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dao/QualityWashTargetDao.java | 23 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesDetEntity.java | 84 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesDetController.java | 43 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDTO.java | 97 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityDetectionEntity.java | 157 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java | 76 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDetDTO.java | 72 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java | 44 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java | 151 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesService.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickItemService.java | 30 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java | 99 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityDetectionDao.java | 30 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityDetectionService.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java | 97 + iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240425.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickDao.java | 24 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java | 83 + iailab-xmc-pms-biz/lib/bak-202309/javabuilder.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java | 100 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDao.java | 24 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullController.java | 80 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDao.java | 28 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/DetectionPageReqVO.java | 35 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java | 74 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickItemServiceImpl.java | 77 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java | 90 + iailab-xmc-pms-biz/pom.xml | 21 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQueryDTO.java | 31 iailab-xmc-pms-biz/lib/bak-202309/readme.md | 61 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/WashCurvesPageReqVO.java | 44 iailab-xmc-pms-biz/lib/bak-202309/washabilityCurve20230915.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java | 54 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java | 132 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesDetService.java | 26 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java | 81 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/TailingPageReqVO.java | 20 iailab-xmc-pms-biz/lib/bak-202309/coalBlendModel20230926.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesChartController.java | 40 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityMediumEntity.java | 70 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityTailingDao.java | 25 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityMediumService.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/package-info.java | 1 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/vo/WashTargetPageReqVO.java | 29 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDetDao.java | 15 iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240424.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullDetServiceImpl.java | 50 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickEntity.java | 43 iailab-xmc-pms-biz/src/main/resources/application-dev.yaml | 2 iailab-xmc-pms-biz/lib/javabuilder.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullDetEntity.java | 83 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullServiceImpl.java | 115 + iailab-xmc-pms-biz/lib/bak-202312/washabilityCurve20231225.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/entity/QualityWashTargetEntity.java | 124 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/MediumPageReqVO.java | 20 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java | 2 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/impl/QualityWashTargetServiceImpl.java | 78 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesEntity.java | 95 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesChartService.java | 22 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java | 106 + iailab-xmc-pms-biz/src/main/resources/application.yaml | 11 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickItemDao.java | 19 iailab-xmc-pms-biz/lib/readme.md | 61 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java | 45 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityTailingService.java | 31 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityTailingEntity.java | 90 + iailab-xmc-pms-biz/lib/bak-202405/coalBlendModel20240514.jar | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java | 86 + iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/QualityWashTargetService.java | 26 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullEntity.java | 118 + iailab-xmc-pms-biz/lib/bak-202312/20231225washabilityCurve说明.docx | 0 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickService.java | 27 98 files changed, 4,835 insertions(+), 1 deletions(-) diff --git a/iailab-xmc-pms-biz/lib/bak-202309/coalBlendModel20230926.jar b/iailab-xmc-pms-biz/lib/bak-202309/coalBlendModel20230926.jar new file mode 100644 index 0000000..3894479 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202309/coalBlendModel20230926.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202309/javabuilder.jar b/iailab-xmc-pms-biz/lib/bak-202309/javabuilder.jar new file mode 100644 index 0000000..9271c07 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202309/javabuilder.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202309/readme.md b/iailab-xmc-pms-biz/lib/bak-202309/readme.md new file mode 100644 index 0000000..0458d2e --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202309/readme.md @@ -0,0 +1,61 @@ +# 配煤模型 +``` + // 硫分 +1.8密度级没有 则与上一密度级保持一致。 + int[] input = {1,2}; //有N种煤参与,则为{1,N} //20230926 coalblendmodel + MWCellArray inputCompDataSrc1 = new MWCellArray(input); + + double[][] inputFSDataSrc1 = {//第一种煤的浮沉数据 综合数据 + {1.4 ,39.46,6.52,1.83}, + {1.8 ,20.67,27.16,1.71}, + {1.8 ,39.87,79.9,1.71}}; + double[][] inputFSDataSrc2 = { //第二种煤的浮沉数据 + {1.4 ,77.42,3.33,2.44}, + {1.8 ,8.76,18.28,4}, + {1.8 ,13.82,76.4,4}}; + double[][] rawCoalParam = {{759},{1667}};//各个煤的价格 N种煤则为N行 + + double[][] qualitySetDataSrc1 = {{0},{2} }; //目标硫分 + + double[] cleanCoalAsh1AndPrice = {9,1900} ; //精煤灰分及价格 + inputCompDataSrc1.set(1,inputFSDataSrc1); + inputCompDataSrc1.set(2,inputFSDataSrc2); + + + CoalBlendModel coalBlend = new CoalBlendModel(); + + double[] xSet = {}; //编辑后计算,即用户手动设置的配煤量数据 若保存并计算则为空 + Object[] allResult = coalBlend.coalBlend(2,inputCompDataSrc1,rawCoalParam,qualitySetDataSrc1,cleanCoalAsh1AndPrice,xSet); + MWCellArray result = (MWCellArray)allResult[0]; + + + double[][] result1 = (double [][])result.get(1);//各煤比例 + if (result1[0][0]<0){ + System.out.println("无方案"); //无方案输出全部置空 + + return; + } + double[][] result2 = (double [][])result.get(2); + double[] theoryYieldDensity = result2[0];//理论产率和分选密度 第一个为理论产率,第二个为理论分选密度 + + MWCellArray temp = (MWCellArray)allResult[1]; + + + double[][] test1 = (double [][])temp.get(1); + double[] effect = test1[0];//混煤预计效果 分别为硫分,水分,发热量,灰分 + + double [][] test2 = (double [][])temp.get(2); + double[] xAxis1 = test2[0];//若需要绘制混煤可选性曲线 的下横灰分坐标 + double [][] test3 = (double [][])temp.get(3); + double[] xAxis2 = test3[0];//若需要绘制混煤可选性曲线 的上横密度坐标 + double [][] test4 = (double [][])temp.get(4); + double[] floatVue = test4[0];//若需要绘制混煤可选性曲线 的浮物曲线数据 + double [][] test5 = (double [][])temp.get(5); + double[] cellVue = test5[0];//若需要绘制混煤可选性曲线 的灰分特性曲线数据 + double [][] test6 = (double [][])temp.get(6); + double[] sinkVue = test6[0];//若需要绘制混煤可选性曲线 的沉物曲线数据 + double [][] test7 = (double [][])temp.get(7); + double[] denstiyDataResult = test7[0];//若需要绘制混煤可选性曲线 的密度曲线数据 + double [][] test8 = (double [][])temp.get(8); + double[] denstiyScopeData = test8[0];//若需要绘制混煤可选性曲线 的密度±0.1曲 + +``` \ No newline at end of file diff --git a/iailab-xmc-pms-biz/lib/bak-202309/washabilityCurve20230915.jar b/iailab-xmc-pms-biz/lib/bak-202309/washabilityCurve20230915.jar new file mode 100644 index 0000000..e2a94bd --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202309/washabilityCurve20230915.jar Binary files differ diff --git "a/iailab-xmc-pms-biz/lib/bak-202312/20231225washabilityCurve\350\257\264\346\230\216.docx" "b/iailab-xmc-pms-biz/lib/bak-202312/20231225washabilityCurve\350\257\264\346\230\216.docx" new file mode 100644 index 0000000..2aca563 --- /dev/null +++ "b/iailab-xmc-pms-biz/lib/bak-202312/20231225washabilityCurve\350\257\264\346\230\216.docx" Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202312/coalBlendModel20231225.jar b/iailab-xmc-pms-biz/lib/bak-202312/coalBlendModel20231225.jar new file mode 100644 index 0000000..bad1ef5 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202312/coalBlendModel20231225.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202312/washabilityCurve20231225.jar b/iailab-xmc-pms-biz/lib/bak-202312/washabilityCurve20231225.jar new file mode 100644 index 0000000..148b492 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202312/washabilityCurve20231225.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240424.jar b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240424.jar new file mode 100644 index 0000000..9d9f4ab --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240424.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240425.jar b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240425.jar new file mode 100644 index 0000000..c9b0399 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240425.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240427.jar b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240427.jar new file mode 100644 index 0000000..7b273c9 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202404/coalBlendModel20240427.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/bak-202405/coalBlendModel20240514.jar b/iailab-xmc-pms-biz/lib/bak-202405/coalBlendModel20240514.jar new file mode 100644 index 0000000..81de775 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/bak-202405/coalBlendModel20240514.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/javabuilder.jar b/iailab-xmc-pms-biz/lib/javabuilder.jar new file mode 100644 index 0000000..9271c07 --- /dev/null +++ b/iailab-xmc-pms-biz/lib/javabuilder.jar Binary files differ diff --git a/iailab-xmc-pms-biz/lib/readme.md b/iailab-xmc-pms-biz/lib/readme.md new file mode 100644 index 0000000..0458d2e --- /dev/null +++ b/iailab-xmc-pms-biz/lib/readme.md @@ -0,0 +1,61 @@ +# 配煤模型 +``` + // 硫分 +1.8密度级没有 则与上一密度级保持一致。 + int[] input = {1,2}; //有N种煤参与,则为{1,N} //20230926 coalblendmodel + MWCellArray inputCompDataSrc1 = new MWCellArray(input); + + double[][] inputFSDataSrc1 = {//第一种煤的浮沉数据 综合数据 + {1.4 ,39.46,6.52,1.83}, + {1.8 ,20.67,27.16,1.71}, + {1.8 ,39.87,79.9,1.71}}; + double[][] inputFSDataSrc2 = { //第二种煤的浮沉数据 + {1.4 ,77.42,3.33,2.44}, + {1.8 ,8.76,18.28,4}, + {1.8 ,13.82,76.4,4}}; + double[][] rawCoalParam = {{759},{1667}};//各个煤的价格 N种煤则为N行 + + double[][] qualitySetDataSrc1 = {{0},{2} }; //目标硫分 + + double[] cleanCoalAsh1AndPrice = {9,1900} ; //精煤灰分及价格 + inputCompDataSrc1.set(1,inputFSDataSrc1); + inputCompDataSrc1.set(2,inputFSDataSrc2); + + + CoalBlendModel coalBlend = new CoalBlendModel(); + + double[] xSet = {}; //编辑后计算,即用户手动设置的配煤量数据 若保存并计算则为空 + Object[] allResult = coalBlend.coalBlend(2,inputCompDataSrc1,rawCoalParam,qualitySetDataSrc1,cleanCoalAsh1AndPrice,xSet); + MWCellArray result = (MWCellArray)allResult[0]; + + + double[][] result1 = (double [][])result.get(1);//各煤比例 + if (result1[0][0]<0){ + System.out.println("无方案"); //无方案输出全部置空 + + return; + } + double[][] result2 = (double [][])result.get(2); + double[] theoryYieldDensity = result2[0];//理论产率和分选密度 第一个为理论产率,第二个为理论分选密度 + + MWCellArray temp = (MWCellArray)allResult[1]; + + + double[][] test1 = (double [][])temp.get(1); + double[] effect = test1[0];//混煤预计效果 分别为硫分,水分,发热量,灰分 + + double [][] test2 = (double [][])temp.get(2); + double[] xAxis1 = test2[0];//若需要绘制混煤可选性曲线 的下横灰分坐标 + double [][] test3 = (double [][])temp.get(3); + double[] xAxis2 = test3[0];//若需要绘制混煤可选性曲线 的上横密度坐标 + double [][] test4 = (double [][])temp.get(4); + double[] floatVue = test4[0];//若需要绘制混煤可选性曲线 的浮物曲线数据 + double [][] test5 = (double [][])temp.get(5); + double[] cellVue = test5[0];//若需要绘制混煤可选性曲线 的灰分特性曲线数据 + double [][] test6 = (double [][])temp.get(6); + double[] sinkVue = test6[0];//若需要绘制混煤可选性曲线 的沉物曲线数据 + double [][] test7 = (double [][])temp.get(7); + double[] denstiyDataResult = test7[0];//若需要绘制混煤可选性曲线 的密度曲线数据 + double [][] test8 = (double [][])temp.get(8); + double[] denstiyScopeData = test8[0];//若需要绘制混煤可选性曲线 的密度±0.1曲 + +``` \ No newline at end of file diff --git a/iailab-xmc-pms-biz/pom.xml b/iailab-xmc-pms-biz/pom.xml index 9852f46..000f47c 100644 --- a/iailab-xmc-pms-biz/pom.xml +++ b/iailab-xmc-pms-biz/pom.xml @@ -111,6 +111,27 @@ <version>2.3.2</version> </dependency> + <!-- 可选性曲线模型 --> + <dependency> + <groupId>com.util</groupId> + <artifactId>javabuilder</artifactId> + <version>1.0</version> + <scope>system</scope> + <systemPath>${project.basedir}/lib/javabuilder.jar</systemPath> + </dependency> + <dependency> + <groupId>com.util</groupId> + <artifactId>washabilityCurve</artifactId> + <version>3.0</version> + <scope>system</scope> + <systemPath>${project.basedir}/lib/bak-202309/washabilityCurve20230915.jar</systemPath> + </dependency> + <dependency> + <groupId>com.iailab</groupId> + <artifactId>iailab-iems-common</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> <build> diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java index fc41f61..7e83c86 100644 --- a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java @@ -2,12 +2,14 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; /** * 项目的启动类 * * @author iailab */ +@ComponentScan(basePackages = {"com.iailab.iems.common", "com.iailab.module.pms"}) @SpringBootApplication public class XmcPmsServerApplication { diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/BcEnums.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/BcEnums.java new file mode 100644 index 0000000..826d540 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/BcEnums.java @@ -0,0 +1,32 @@ +package com.iailab.module.pms.coalquality.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月15日 14:00:00 + */ +@Getter +@AllArgsConstructor +public enum BcEnums { + + BB("bb", "白班"), + YB("yb", "夜班"); + private String code; + private String desc; + + public static BcEnums getEumByCode(String code) { + if (code == null) { + return null; + } + + for (BcEnums statusEnum : BcEnums.values()) { + if (statusEnum.getCode().equals(code)) { + return statusEnum; + } + } + return null; + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/FcfaType.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/FcfaType.java new file mode 100644 index 0000000..1a18342 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/enums/FcfaType.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年09月15日 13:44:00 + */ +@Getter +@AllArgsConstructor +public enum FcfaType { + FULL("full", "全级"), + THREE("three", "三级"); + private String code; + private String desc; + + public static FcfaType getEumByCode(String code) { + if (code == null) { + return null; + } + + for (FcfaType statusEnum : FcfaType.values()) { + if (statusEnum.getCode().equals(code)) { + return statusEnum; + } + } + return null; + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullController.java new file mode 100644 index 0000000..c3b3b6e --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullController.java @@ -0,0 +1,80 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller.admin; + + +import com.iailab.framework.common.annotation.AutoDict; +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDTO; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullService; +import com.iailab.module.pms.coalquality.modules.analysis.vo.FullPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 22:22:00 + */ +@RestController +@RequestMapping("/coal-quality/analysis/full") +@Tag(name ="全级浮沉实验台账") +public class CoalAnalysisFullController { + + @Autowired + private CoalAnalysisFullService coalAnalysisFullService; + + @GetMapping("/page") + @Operation(summary = "获取浮沉实验台账列表", description = "用于浮沉实验台账界面") +// @PreAuthorize("@ss.hasPermission('data:ind-item:query')") + public CommonResult<PageResult<CoalAnalysisFullDTO>> page(FullPageReqVO fullPageReqVO){ + + PageResult<CoalAnalysisFullDTO> page = coalAnalysisFullService.page(fullPageReqVO); + + return success(page); + } + + @GetMapping("/get") + @Operation(summary = "信息") + @AutoDict + public CommonResult<CoalAnalysisFullDTO> get(String id){ + CoalAnalysisFullDTO data = coalAnalysisFullService.get(id); + return success(data); + } + + @PostMapping("/create") + @Operation(summary = "保存") + public CommonResult<Boolean> save(@RequestBody CoalAnalysisFullDTO dto){ + + coalAnalysisFullService.save(dto); + + return success(true); + } + + @PutMapping("/update") + @Operation(summary = "修改") + public CommonResult<Boolean> update(@RequestBody CoalAnalysisFullDTO dto){ + //效验数据 +// ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); +// +// if (coalAnalysisFullService.cheack(dto) > 0) { +// return new Result().error("编号重复"); +// } + + coalAnalysisFullService.update(dto); + + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids){ + + coalAnalysisFullService.delete(ids); + + return success(true); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullDetController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullDetController.java new file mode 100644 index 0000000..af3fb33 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalAnalysisFullDetController.java @@ -0,0 +1,43 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullDetService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月15日 14:52:00 + */ +@RestController +@RequestMapping("/analysis/full-det") +@Tag(name="全级浮沉实验数据") +public class CoalAnalysisFullDetController { + + @Autowired + private CoalAnalysisFullDetService coalAnalysisFullDetService; + + @GetMapping("/list/{fullId}") + @Operation(summary = "信息") + public CommonResult<List<CoalAnalysisFullDetDTO>> list(@PathVariable("fullId") String fullId){ + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("fullId", fullId); + List<CoalAnalysisFullDetDTO> data = coalAnalysisFullDetService.queryList(parmas); + return success(data); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesChartController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesChartController.java new file mode 100644 index 0000000..8bc7974 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesChartController.java @@ -0,0 +1,40 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesChartDTO; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesChartService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月20日 09:56:00 + */ +@RestController +@RequestMapping("/coal-quality/analysis/wash-curves-chart") +@Tag(name="可选性曲线图") +public class CoalWashCurvesChartController { + + @Autowired + private CoalWashCurvesChartService coalWashCurvesChartService; + + @PostMapping("/draw") + @Operation(summary="绘制") + public CommonResult<CoalWashCurvesChartDTO> draw(@RequestBody CoalWashCurvesChartDTO dto) { + CoalWashCurvesChartDTO data = coalWashCurvesChartService.draw(dto); + return success(data); + } + + @GetMapping("/get") + @Operation(summary="信息") + public CommonResult<CoalWashCurvesChartDTO> get(String curvesId){ + CoalWashCurvesChartDTO data = coalWashCurvesChartService.getByCurvesId(curvesId); + return success(data); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java new file mode 100644 index 0000000..3088526 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java @@ -0,0 +1,91 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller.admin; + + +import com.iailab.framework.common.annotation.AutoDict; +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDTO; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesService; +import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 16:25:00 + */ +@RestController +@RequestMapping("/coal-quality/analysis/wash-curves") +@Tag(name="可选性曲线台账") +public class CoalWashCurvesController { + + @Autowired + private CoalWashCurvesService coalWashCurvesService; + + @GetMapping("/page") + @AutoDict + public CommonResult<PageResult<CoalWashCurvesDTO>> page(WashCurvesPageReqVO washCurvesPageReqVO){ + PageResult<CoalWashCurvesDTO> page = coalWashCurvesService.page(washCurvesPageReqVO); + + return success(page); + } + + @GetMapping("/info") + @Operation(summary ="信息") + @AutoDict + public CommonResult<CoalWashCurvesDTO> getByMzAndRq(@RequestParam Map<String, Object> params){ + String mz = (String)params.get("mz"); + String syrq = (String)params.get("syrq"); + CoalWashCurvesDTO data = coalWashCurvesService.getByMzAndRq(mz,syrq); + return success(data); + } + + @GetMapping("/last") + @Operation(summary ="信息") + @AutoDict + public CommonResult<Boolean> last(@RequestParam Map<String, Object> params){ + String mz = (String)params.get("mz"); + CoalWashCurvesDTO data = coalWashCurvesService.getLastByMz(mz); + return success(true); + } + + @GetMapping("/get") + @Operation(summary ="信息") + @AutoDict + public CommonResult<CoalWashCurvesDTO> get(String id){ + CoalWashCurvesDTO data = coalWashCurvesService.get(id); + return success(data); + } + + @PostMapping("/create") + @Operation(summary = "保存") + public CommonResult<Boolean> create(@RequestBody CoalWashCurvesDTO dto){ + coalWashCurvesService.save(dto); + + return success(true); + } + + @PutMapping("/update") + @Operation(summary ="修改") + public CommonResult<Boolean> update(@RequestBody CoalWashCurvesDTO dto){ + coalWashCurvesService.update(dto); + + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids){ + coalWashCurvesService.delete(ids); + + return success(true); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesDetController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesDetController.java new file mode 100644 index 0000000..8438db7 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesDetController.java @@ -0,0 +1,43 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesDetService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 16:25:00 + */ +@RestController +@RequestMapping("/coal-quality/analysis/wash-curves-det") +@Tag(name="可选性曲线数据") +public class CoalWashCurvesDetController { + + @Autowired + private CoalWashCurvesDetService coalWashCurvesDetService; + + @GetMapping("/list") + @Operation(summary="信息") + public CommonResult<List<CoalWashCurvesDetDTO>> list(String curvesId){ + Map<String, Object> params = new HashMap<>(1); + params.put("curvesId", curvesId); + List<CoalWashCurvesDetDTO> data = coalWashCurvesDetService.queryList(params); + return success(data); + } + + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/package-info.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/package-info.java new file mode 100644 index 0000000..ffb8009 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/package-info.java @@ -0,0 +1 @@ +package com.iailab.module.pms.coalquality.modules.analysis.controller; \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDao.java new file mode 100644 index 0000000..c5d8c29 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDao.java @@ -0,0 +1,24 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullEntity; +import com.iailab.module.pms.coalquality.modules.analysis.vo.FullPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:01:00 + */ +@Mapper +public interface CoalAnalysisFullDao extends BaseMapperX<CoalAnalysisFullEntity> { + default PageResult<CoalAnalysisFullEntity> selectPage(FullPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<CoalAnalysisFullEntity>() + .like(StringUtils.isNotBlank(reqVO.getCode()), CoalAnalysisFullEntity::getCode, reqVO.getCode()) + .eq(StringUtils.isNotBlank(reqVO.getNy()), CoalAnalysisFullEntity::getNy, reqVO.getNy()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDetDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDetDao.java new file mode 100644 index 0000000..e2db6b3 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalAnalysisFullDetDao.java @@ -0,0 +1,15 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + + +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullDetEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:02:00 + */ +@Mapper +public interface CoalAnalysisFullDetDao extends BaseMapperX<CoalAnalysisFullDetEntity> { +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesChartDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesChartDao.java new file mode 100644 index 0000000..afd224c --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesChartDao.java @@ -0,0 +1,17 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + + +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesChartEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 可选性曲线图 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月19日 23:24:00 + */ +@Mapper +public interface CoalWashCurvesChartDao extends BaseMapperX<CoalWashCurvesChartEntity> { +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDao.java new file mode 100644 index 0000000..d8a3a76 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDao.java @@ -0,0 +1,28 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesEntity; +import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:54:00 + */ +@Mapper +public interface CoalWashCurvesDao extends BaseMapperX<CoalWashCurvesEntity> { + + default PageResult<CoalWashCurvesEntity> selectPage(WashCurvesPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<CoalWashCurvesEntity>() + .like(StringUtils.isNotBlank(reqVO.getCode()), CoalWashCurvesEntity::getCode, reqVO.getCode()) + .eq(StringUtils.isNotBlank(reqVO.getMz()), CoalWashCurvesEntity::getMz, reqVO.getMz()) + .ge(StringUtils.isNotBlank(reqVO.getStartTime()), CoalWashCurvesEntity::getSyrq, reqVO.getStartTime()) + .le(StringUtils.isNotBlank(reqVO.getEndTime()), CoalWashCurvesEntity::getSyrq, reqVO.getEndTime()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDetDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDetDao.java new file mode 100644 index 0000000..65c6017 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/CoalWashCurvesDetDao.java @@ -0,0 +1,15 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + + +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesDetEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:54:00 + */ +@Mapper +public interface CoalWashCurvesDetDao extends BaseMapperX<CoalWashCurvesDetEntity> { +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/ExcelImportDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/ExcelImportDao.java new file mode 100644 index 0000000..f1cc547 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dao/ExcelImportDao.java @@ -0,0 +1,16 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dao; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author Lujiaxin + * @Description + * @createTime 2023年05月11日 11:05:00 + */ +@Mapper +public interface ExcelImportDao { + + String getIdByDictCodeAndName(@Param("name")String name); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDTO.java new file mode 100644 index 0000000..18102cc --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDTO.java @@ -0,0 +1,97 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:16:00 + */ +@Data +@Schema(description = "全级浮沉实验台账") +public class CoalAnalysisFullDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @NotNull(message = "{id.require}") + private String id; + + @Schema(description = "编号") + @NotBlank(message = "编号不能为空") + private String code; + + @Schema(description = "年月") + private String ny; + + @Schema(description = "实验类别") + private String type; + + @Schema(description = "实验类别") + private String typeName; + + @Schema(description = "煤种") + private String mz; + + @Schema(description = "煤种") + private String mzName; + + @Schema(description = "实验样品") + private String syyp; + + @Schema(description = "实验样品") + private String syypName; + + @Schema(description = "浮沉方案") + private String fcfa; + + @Schema(description = "实验日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private java.util.Date syrq; + + @Schema(description = "实验班组") + private String sybz; + + @Schema(description = "实验负责人") + private String syfzr; + + @Schema(description = "化验员") + private String hyy; + + @Schema(description = "煤样总重") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal myzz; + + @Schema(description = "煤样总灰") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal myzh; + + @Schema(description = "煤样总硫") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal myzl; + + @Schema(description = "备注") + private String bz; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private java.util.Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; + + @Schema(description = "全级浮沉实验数据") + private List<CoalAnalysisFullDetDTO> detList; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDetDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDetDTO.java new file mode 100644 index 0000000..c1791ad --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalAnalysisFullDetDTO.java @@ -0,0 +1,72 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.framework.common.validation.group.AddGroup; +import com.iailab.framework.common.validation.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:17:00 + */ +@Data +@Schema(description = "全级浮沉实验数据") +public class CoalAnalysisFullDetDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "全级浮沉实验ID") + private String fullId; + + @Schema(description = "编号") + private String code; + + @Schema(description = "密度级") + private String mdj; + + @Schema(description = "密度级") + private String mdjName; + + @Schema(description = "重量") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal zl; + + @Schema(description = "产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cl; + + @Schema(description = "灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf; + + @Schema(description = "硫分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal lf; + + @Schema(description = "浮物累计产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal fwljcl; + + @Schema(description = "浮物累计灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal fwljhf; + + @Schema(description = "沉物累计产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cwljcl; + + @Schema(description = "沉物累计灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cwljhf; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesChartDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesChartDTO.java new file mode 100644 index 0000000..c5617d6 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesChartDTO.java @@ -0,0 +1,81 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dto; + + +import com.iailab.framework.common.validation.group.AddGroup; +import com.iailab.framework.common.validation.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月19日 23:31:00 + */ +@Data +@Schema(description = "可选性曲线图") +public class CoalWashCurvesChartDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "可选性曲线台账ID") + @NotNull + private String curvesId; + + @Schema(description = "绘图方法,1代表拟合法,0代表插值法") + @NotNull + private String curvesType; + + @Schema(description = "浮沉密度") + private String densitySrcData; + + @Schema(description = "浮物累计数据") + private String floatSrcData; + + @Schema(description = "密度±0.1数据") + private String densityScopeSrcData; + + @Schema(description = "拟合参数") + private String coeffSrcData; + + @Schema(description = "横坐标数据1") + private String xAxisData1; + + @Schema(description = "横坐标数据2") + private String xAxisData2; + + @Schema(description = "点数据FLOAT") + private String floatPointData; + + @Schema(description = "点数据DENSITY") + private String densityPointData; + + @Schema(description = "点数据DENSITY_SCOPE") + private String densityScopePointData; + + @Schema(description = "灰分特性曲线") + private String cellData; + + @Schema(description = "密度曲线") + private String densityData; + + @Schema(description = "浮物曲线") + private String floatData; + + @Schema(description = "沉物曲线") + private String sinkData; + + @Schema(description = "密度±0.1曲线") + private String densityScopeData; + + @Schema(description = "浮沉方案") + private String fcfa; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDTO.java new file mode 100644 index 0000000..b78600f --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDTO.java @@ -0,0 +1,88 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.framework.common.validation.group.AddGroup; +import com.iailab.framework.common.validation.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 16:16:00 + */ +@Data +@Schema(description = "可选性曲线台账") +public class CoalWashCurvesDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "编号") + private String code; + + @Schema(description = "年月") + private String ny; + + @Schema(description = "生产系统") + private String scxt; + + @Schema(description = "生产系统") + private String scxtName; + + @Schema(description = "煤种") + private String mz; + + @Schema(description = "煤种") + private String mzName; + + @Schema(description = "实验样品") + private String syyp; + + @Schema(description = "实验样品") + private String syypName; + + @Schema(description = "实验日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date syrq; + + @Schema(description = "浮沉方案") + private String fcfa; + + @Schema(description = "浮沉方案") + private String fcfaName; + + @Schema(description = "调入量") + private BigDecimal drl; + + @Schema(description = "是否是加权结果") + private String isweight; + + @Schema(description = "备注") + private String bz; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private java.util.Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; + + @Schema(description = "可选性曲线数据") + private List<CoalWashCurvesDetDTO> detList; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDetDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDetDTO.java new file mode 100644 index 0000000..15fd2fc --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/dto/CoalWashCurvesDetDTO.java @@ -0,0 +1,77 @@ +package com.iailab.module.pms.coalquality.modules.analysis.dto; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.framework.common.validation.group.AddGroup; +import com.iailab.framework.common.validation.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 16:02:00 + */ +@Data +@Schema(description = "可选性曲线数据") +public class CoalWashCurvesDetDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + @ExcelIgnore + private String id; + + @Schema(description = "可选性曲线台账ID") + @ExcelIgnore + private String curvesId; + + @Schema(description = "编号") + @ExcelIgnore + private String code; + + @Schema(description = "密度级") + @ExcelIgnore + private String mdj; + + @Schema(description = "密度级") + private String mdjName; + + @Schema(description = "综合累计产率") + private BigDecimal zhljcl; + + @Schema(description = "综合累计灰分") + private BigDecimal zhljhf; + + @Schema(description = "浮物累计产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal fwljcl; + + @Schema(description = "浮物累计灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal fwljhf; + + @Schema(description = "沉物累计产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cwljcl; + + @Schema(description = "沉物累计灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cwljhf; + + @Schema(description = "密度") + private BigDecimal md; + + @Schema(description = "±0.1含量") + private BigDecimal hl; + + @Schema(description = "硫分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal lf; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullDetEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullDetEntity.java new file mode 100644 index 0000000..a6199f6 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullDetEntity.java @@ -0,0 +1,83 @@ +package com.iailab.module.pms.coalquality.modules.analysis.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 全级浮沉实验数据 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_coal_analysis_full_det") +public class CoalAnalysisFullDetEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 全级浮沉实验ID + */ + private String fullId; + + /** + * 编号 + */ + private String code; + + /** + * 密度级 + */ + private String mdj; + + /** + * 重量 + */ + private BigDecimal zl; + + /** + * 产率 + */ + private BigDecimal cl; + + /** + * 灰分 + */ + private BigDecimal hf; + + /** + * 硫分 + */ + private BigDecimal lf; + + /** + * 浮物累计产率 + */ + private BigDecimal fwljcl; + + /** + * 浮物累计灰分 + */ + private BigDecimal fwljhf; + + /** + * 沉物累计产率 + */ + private BigDecimal cwljcl; + + /** + * 沉物累计灰分 + */ + private BigDecimal cwljhf; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullEntity.java new file mode 100644 index 0000000..fe01552 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalAnalysisFullEntity.java @@ -0,0 +1,118 @@ +package com.iailab.module.pms.coalquality.modules.analysis.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 全级浮沉实验台账 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_coal_analysis_full") +public class CoalAnalysisFullEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 编号 + */ + private String code; + + /** + * 年月 + */ + private String ny; + + /** + * 实验类别 + */ + private String type; + + /** + * 煤种 + */ + private String mz; + + /** + * 实验样品 + */ + private String syyp; + + /** + * 浮沉方案 + */ + private String fcfa; + + /** + * 实验日期 + */ + private java.util.Date syrq; + + /** + * 实验班组 + */ + private String sybz; + + /** + * 实验负责人 + */ + private String syfzr; + + /** + * 化验员 + */ + private String hyy; + + /** + * 煤样总重 + */ + private BigDecimal myzz; + + /** + * 煤样总灰 + */ + private BigDecimal myzh; + + /** + * 煤样总硫 + */ + private BigDecimal myzl; + + /** + * 备注 + */ + private String bz; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private java.util.Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private java.util.Date updateDate; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesChartEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesChartEntity.java new file mode 100644 index 0000000..df399fa --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesChartEntity.java @@ -0,0 +1,105 @@ +package com.iailab.module.pms.coalquality.modules.analysis.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * 可选性曲线图 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_coal_wash_curves_chart") +public class CoalWashCurvesChartEntity implements Serializable { + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 可选性曲线台账ID + */ + private String curvesId; + + /** + * 绘图方法,1代表拟合法,0代表插值法 + */ + private String curvesType; + + /** + * 浮沉密度 + */ + private String densitySrcData; + + /** + * 浮物累计数据 + */ + private String floatSrcData; + + /** + * 密度±0.1数据 + */ + private String densityScopeSrcData; + + /** + * 拟合参数 + */ + private String coeffSrcData; + + /** + * 横坐标数据1 + */ + private String xAxisData1; + + /** + * 横坐标数据2 + */ + private String xAxisData2; + + /** + * 点数据FLOAT + */ + private String floatPointData; + + /** + * 点数据DENSITY + */ + private String densityPointData; + + /** + * 点数据DENSITY_SCOPE + */ + private String densityScopePointData; + + /** + * 灰分特性曲线 + */ + private String cellData; + + /** + * 密度曲线 + */ + private String densityData; + + /** + * 浮物曲线 + */ + private String floatData; + + /** + * 沉物曲线 + */ + private String sinkData; + + /** + * 密度±0.1曲线 + */ + private String densityScopeData; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesDetEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesDetEntity.java new file mode 100644 index 0000000..572ce3c --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesDetEntity.java @@ -0,0 +1,84 @@ +package com.iailab.module.pms.coalquality.modules.analysis.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_coal_wash_curves_det") +public class CoalWashCurvesDetEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 可选性曲线台账ID + */ + private String curvesId; + + /** + * 编号 + */ + private String code; + + /** + * 密度级 + */ + private String mdj; + + /** + * 综合累计产率 + */ + private BigDecimal zhljcl; + + /** + * 综合累计灰分 + */ + private BigDecimal zhljhf; + + /** + * 浮物累计产率 + */ + private BigDecimal fwljcl; + + /** + * 浮物累计灰分 + */ + private BigDecimal fwljhf; + + /** + * 沉物累计产率 + */ + private BigDecimal cwljcl; + + /** + * 沉物累计灰分 + */ + private BigDecimal cwljhf; + + /** + * 密度 + */ + private BigDecimal md; + + /** + * ±0.1含量 + */ + private BigDecimal hl; + + /** + * 硫分 + */ + private BigDecimal lf; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesEntity.java new file mode 100644 index 0000000..46a7f4c --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/entity/CoalWashCurvesEntity.java @@ -0,0 +1,95 @@ +package com.iailab.module.pms.coalquality.modules.analysis.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_coal_wash_curves") +public class CoalWashCurvesEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 年月 + */ + private String code; + + /** + * 编号 + */ + private String ny; + + /** + * 生产系统 + */ + private String scxt; + + /** + * 煤种 + */ + private String mz; + + /** + * 实验样品 + */ + private String syyp; + + /** + * 实验日期 + */ + private Date syrq; + + /** + * 浮沉方案 + */ + private String fcfa; + + /** + * 浮沉方案 + */ + private String isweight; + + /** + * 调入量 + */ + private BigDecimal drl; + + /** + * 备注 + */ + private String bz; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private Date updateDate; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullDetService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullDetService.java new file mode 100644 index 0000000..4497ca3 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullDetService.java @@ -0,0 +1,23 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service; + + +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullDetEntity; + +import java.util.List; +import java.util.Map; + +/** + * 全级浮沉实验数据 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:07:00 + */ +public interface CoalAnalysisFullDetService extends BaseService<CoalAnalysisFullDetEntity> { + + + List<CoalAnalysisFullDetDTO> queryList(Map<String, Object> params); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullService.java new file mode 100644 index 0000000..b861757 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalAnalysisFullService.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullEntity; +import com.iailab.module.pms.coalquality.modules.analysis.vo.FullPageReqVO; + +/** + * 全级浮沉实验台账 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:08:00 + */ +public interface CoalAnalysisFullService extends BaseService<CoalAnalysisFullEntity> { + + PageResult<CoalAnalysisFullDTO> page(FullPageReqVO fullPageReqVO); + + CoalAnalysisFullDTO get(String id); + + void save(CoalAnalysisFullDTO dto); + + void update(CoalAnalysisFullDTO dto); + + void delete(String[] ids); + + Long cheack(CoalAnalysisFullDTO dto); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesChartService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesChartService.java new file mode 100644 index 0000000..c65983f --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesChartService.java @@ -0,0 +1,22 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service; + + +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesChartDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesChartEntity; + +/** + * 可选性曲线图 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月19日 23:25:00 + */ +public interface CoalWashCurvesChartService extends BaseService<CoalWashCurvesChartEntity> { + + CoalWashCurvesChartDTO getByCurvesId(String curvesId); + + void update(CoalWashCurvesChartDTO dto); + + CoalWashCurvesChartDTO draw(CoalWashCurvesChartDTO dto); +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesDetService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesDetService.java new file mode 100644 index 0000000..b730ff0 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesDetService.java @@ -0,0 +1,26 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service; + + +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesDetEntity; + +import java.util.List; +import java.util.Map; + +/** + * 可选性曲线数据 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:56:00 + */ +public interface CoalWashCurvesDetService extends BaseService<CoalWashCurvesDetEntity> { + + + List<CoalWashCurvesDetDTO> queryList(Map<String, Object> params); + + Map<String, Object> getDrawParams(String curvesId); + + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesService.java new file mode 100644 index 0000000..c90e23b --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/CoalWashCurvesService.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesEntity; +import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:57:00 + */ +public interface CoalWashCurvesService extends BaseService<CoalWashCurvesEntity> { + + PageResult<CoalWashCurvesDTO> page(WashCurvesPageReqVO washCurvesPageReqVO); + + CoalWashCurvesDTO get(String id); + + void save(CoalWashCurvesDTO dto); + + void update(CoalWashCurvesDTO dto); + + void delete(String[] ids); + + CoalWashCurvesDTO getLastByMz(String mz); + + CoalWashCurvesDTO getByMzAndRq(String mz, String syrq); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullDetServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullDetServiceImpl.java new file mode 100644 index 0000000..0486bfb --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullDetServiceImpl.java @@ -0,0 +1,50 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.framework.tenant.core.aop.TenantIgnore; +import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalAnalysisFullDetDao; +import com.iailab.module.pms.coalquality.modules.analysis.dao.ExcelImportDao; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullDetEntity; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullDetService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +/** + * 全级浮沉实验数据 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:09:00 + */ +@Service +public class CoalAnalysisFullDetServiceImpl extends BaseServiceImpl<CoalAnalysisFullDetDao, CoalAnalysisFullDetEntity> + implements CoalAnalysisFullDetService { + + @Resource + private ExcelImportDao excelImportDao; + + @Override + @TenantIgnore + public List<CoalAnalysisFullDetDTO> queryList(Map<String, Object> params) { + List<CoalAnalysisFullDetEntity> list = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(list, CoalAnalysisFullDetDTO.class); + } + + private QueryWrapper<CoalAnalysisFullDetEntity> getWrapper(Map<String, Object> params){ + String fullId = (String)params.get("fullId"); + + QueryWrapper<CoalAnalysisFullDetEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(fullId), "full_id", fullId).orderByAsc("code"); + + return wrapper; + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullServiceImpl.java new file mode 100644 index 0000000..793a1d8 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalAnalysisFullServiceImpl.java @@ -0,0 +1,115 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalAnalysisFullDao; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDTO; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullEntity; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullDetService; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullService; +import com.iailab.module.pms.coalquality.modules.analysis.vo.FullPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.DecimalFormat; +import java.util.*; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月12日 17:09:00 + */ +@Service +public class CoalAnalysisFullServiceImpl extends BaseServiceImpl<CoalAnalysisFullDao, CoalAnalysisFullEntity> + implements CoalAnalysisFullService { + + @Autowired + private CoalAnalysisFullDetService coalAnalysisFullDetService; + + private String BUSINESS_CODE = "CoalAnalysisFull"; + + private DecimalFormat df = new DecimalFormat("00"); + + @Override + public PageResult<CoalAnalysisFullDTO> page(FullPageReqVO fullPageReqVO) { + PageResult<CoalAnalysisFullEntity> page = baseDao.selectPage(fullPageReqVO); + + return BeanUtils.toBean(page, CoalAnalysisFullDTO.class); + } + + + @Override + public CoalAnalysisFullDTO get(String id) { + CoalAnalysisFullEntity entity = baseDao.selectById(id); + CoalAnalysisFullDTO dto = ConvertUtils.sourceToTarget(entity, CoalAnalysisFullDTO.class); + dto.setDetList(getDetList(dto.getId())); + return dto; + } + + private List<CoalAnalysisFullDetDTO> getDetList(String fullId) { + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("fullId", fullId); + return coalAnalysisFullDetService.queryList(parmas); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CoalAnalysisFullDTO dto) { + dto.setCode(dto.getNy().replace("-", "")); + CoalAnalysisFullEntity entity = ConvertUtils.sourceToTarget(dto, CoalAnalysisFullEntity.class); + entity.setId(UUID.randomUUID().toString()); + entity.setCreateDate(new Date()); + insert(entity); + + List<CoalAnalysisFullDetDTO> detList = dto.getDetList(); +// if (!CollectionUtils.isEmpty(detList)) { +// for (int i = 0; i < detList.size(); i++) { +// detList.get(i).setCode(entity.getCode() + df.format(i + 1)); +// detList.get(i).setFullId(entity.getId()); +// } +// coalAnalysisFullDetService.saveList(detList); +// } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CoalAnalysisFullDTO dto) { + CoalAnalysisFullEntity entity = ConvertUtils.sourceToTarget(dto, CoalAnalysisFullEntity.class); + entity.setUpdateDate(new Date()); + updateById(entity); + + List<CoalAnalysisFullDetDTO> detList = dto.getDetList(); +// if (!CollectionUtils.isEmpty(detList)) { +// detList.forEach(item -> { +// item.setFullId(entity.getId()); +// }); +// coalAnalysisFullDetService.updateList(detList); +// } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteByIds(Arrays.asList(ids)); +// Arrays.asList(ids).forEach(item -> { +// coalAnalysisFullDetService.deleteByFullId(item); +// }); + } + + @Override + public Long cheack(CoalAnalysisFullDTO dto) { + String id = dto.getId(); + String code = dto.getCode(); + + QueryWrapper<CoalAnalysisFullEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.ne(StringUtils.isNotBlank(id), "id", id); + queryWrapper.and(wrapper -> wrapper.eq("code", code)); + return baseDao.selectCount(queryWrapper); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesChartServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesChartServiceImpl.java new file mode 100644 index 0000000..326b4e0 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesChartServiceImpl.java @@ -0,0 +1,168 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.framework.tenant.core.aop.TenantIgnore; +import com.iailab.module.pms.coalquality.common.enums.FcfaType; +import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalWashCurvesChartDao; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesChartDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesChartEntity; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesChartService; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesDetService; +import com.mathworks.toolbox.javabuilder.MWCellArray; +import com.mathworks.toolbox.javabuilder.MWNumericArray; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import washabilityCurve20230915.WashCurve; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 可选性曲线图 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月19日 23:25:00 + */ +@Service +public class CoalWashCurvesChartServiceImpl extends BaseServiceImpl<CoalWashCurvesChartDao, CoalWashCurvesChartEntity> + implements CoalWashCurvesChartService { + + @Autowired + private CoalWashCurvesDetService coalWashCurvesDetService; + + private final String CURVES_TYPE_FITTING = "1"; + + @Override + @TenantIgnore + public CoalWashCurvesChartDTO getByCurvesId(String curvesId) { + CoalWashCurvesChartEntity entity = baseDao.selectOne(new QueryWrapper<CoalWashCurvesChartEntity>().eq("curves_id", curvesId)); + return ConvertUtils.sourceToTarget(entity, CoalWashCurvesChartDTO.class); + } + + @Override + @TenantIgnore + public void update(CoalWashCurvesChartDTO dto) { + baseDao.delete(new QueryWrapper<CoalWashCurvesChartEntity>().eq("curves_id", dto.getCurvesId())); + CoalWashCurvesChartEntity entity = ConvertUtils.sourceToTarget(dto, CoalWashCurvesChartEntity.class); + insert(entity); + } + + @Override + public CoalWashCurvesChartDTO draw(CoalWashCurvesChartDTO dto) { + + String curvesType = dto.getCurvesType(); + Map<String, Object> drawParams = coalWashCurvesDetService.getDrawParams(dto.getCurvesId()); + + try { + double[] densitySrcData = new double[]{1.3, 1.4, 1.5, 1.6, 1.8}; + if(FcfaType.THREE.getCode().equals(dto.getFcfa())) { + densitySrcData = new double[]{1.4, 1.8}; + } + + double[][] floatSrcData = (double[][]) drawParams.get("floatSrcData"); + double[][] densityScopeSrcData = (double[][]) drawParams.get("densityScopeSrcData"); + double[] coeffSrcData = {}; + + WashCurve wc = new WashCurve(); + Object[] allResult = wc.washabilityCurve(2, densitySrcData, floatSrcData, densityScopeSrcData, Integer.parseInt(curvesType), coeffSrcData); + MWNumericArray temp = (MWNumericArray) allResult[0]; + double[][] coefficient = (double[][]) temp.toDoubleArray(); + MWCellArray temp1 = (MWCellArray) allResult[1]; + double[][] test1 = (double[][]) temp1.get(1); + double[] xAxis1 = test1[0]; + double[][] test2 = (double[][]) temp1.get(2); + double[] xAxis2 = test2[0]; + double[][] test3 = (double[][]) temp1.get(3); + //double[] floatVue = test3[0]; + double[][] test4 = (double[][]) temp1.get(4); + double[] cellVue = test4[0]; + double[][] test5 = (double[][]) temp1.get(5); + // double[] sinkVue = test5[0]; + double[][] test6 = (double[][]) temp1.get(6); + double[] densityDataResult = test6[0]; + double[][] test7 = (double[][]) temp1.get(7); + double[] densityScopeData = test7[0]; + double[][] floatPoint = (double[][]) temp1.get(8); + double[][] densePoint = (double[][]) temp1.get(9); + double[][] denseScopePoint = (double[][]) temp1.get(10); + + List<Double> xAxis1List = new ArrayList<>(); + for(int i = 0; i < xAxis1.length; i ++) { + xAxis1List.add(new BigDecimal(xAxis1[i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + List<Double> xAxis2List = new ArrayList<>(); + for(int i = 0; i < xAxis2.length; i ++) { + xAxis2List.add(new BigDecimal(xAxis2[i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + List<Double> floatVue = new ArrayList<>(); + for(int i = 0; i < test3[0].length; i ++) { + floatVue.add(new BigDecimal(test3[0][i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + List<Double> sinkVue = new ArrayList<>(); + for(int i = 0; i < test5[0].length; i ++) { + sinkVue.add(new BigDecimal(test5[0][i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + List<Double> cellVueList = new ArrayList<>(); + for(int i = 0; i < cellVue.length; i ++) { + cellVueList.add(new BigDecimal(cellVue[i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + List<Double> densityDataList = new ArrayList<>(); + for(int i = 0; i < densityDataResult.length; i ++) { + densityDataList.add(new BigDecimal(densityDataResult[i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + Map<Integer, Integer> emptyDs = new HashMap<>(); + if (CURVES_TYPE_FITTING.equals(curvesType)) { + int k = 0; + for (int i = 0; i < (densityDataResult.length - 1); i++ ) { + if (densityDataResult[i] != 0) { + k = i - 1; + break; + } + } + if (k <= 0) { + k = 15; + } + + for (int j = 0; j < k + 10; j++) { + emptyDs.put(j, j); + } + } + + List<Double> densityScopeList = new ArrayList<>(); + for(int i = 0; i < densityScopeData.length; i ++) { + if (emptyDs.containsKey(i)) { + densityScopeList.add(null); + continue; + } + densityScopeList.add(new BigDecimal(densityScopeData[i]).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); + } + dto.setDensitySrcData(JSONObject.toJSONString(densitySrcData)); + dto.setFloatSrcData(JSONObject.toJSONString(floatSrcData)); + dto.setDensityScopeSrcData(JSONObject.toJSONString(densityScopeSrcData)); + dto.setCoeffSrcData(JSONObject.toJSONString(coeffSrcData)); + + dto.setXAxisData1(JSONObject.toJSONString(xAxis1List)); + dto.setXAxisData2(JSONObject.toJSONString(xAxis2List)); + dto.setFloatPointData(JSONObject.toJSONString(floatPoint)); + dto.setDensityPointData(JSONObject.toJSONString(densePoint)); + dto.setDensityScopePointData(JSONObject.toJSONString(denseScopePoint)); + dto.setCellData(JSONObject.toJSONString(cellVueList)); + dto.setDensityData(JSONObject.toJSONString(densityDataList)); + dto.setDensityScopeData(JSONObject.toJSONString(densityScopeList)); + dto.setFloatData(JSONObject.toJSONString(floatVue)); + dto.setSinkData(JSONObject.toJSONString(sinkVue)); + this.update(dto); + return dto; + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java new file mode 100644 index 0000000..998f755 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java @@ -0,0 +1,76 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.framework.tenant.core.aop.TenantIgnore; +import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalWashCurvesDetDao; +import com.iailab.module.pms.coalquality.modules.analysis.dao.ExcelImportDao; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesDetEntity; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesDetService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 可选性曲线数据 + * + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:58:00 + */ +@Service +public class CoalWashCurvesDetServiceImpl extends BaseServiceImpl<CoalWashCurvesDetDao, CoalWashCurvesDetEntity> + implements CoalWashCurvesDetService { + + @Resource + private ExcelImportDao excelImportDao; + + @Override + @TenantIgnore + public List<CoalWashCurvesDetDTO> queryList(Map<String, Object> params) { + List<CoalWashCurvesDetEntity> list = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(list, CoalWashCurvesDetDTO.class); + } + + private QueryWrapper<CoalWashCurvesDetEntity> getWrapper(Map<String, Object> params) { + String curvesId = (String) params.get("curvesId"); + + QueryWrapper<CoalWashCurvesDetEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(curvesId), "CURVES_ID", curvesId).orderByAsc("code"); + + return wrapper; + } + + @Override + public Map<String, Object> getDrawParams(String curvesId) { + Map<String, Object> result = new HashMap<>(); + + Map<String, Object> queryDetParams = new HashMap<>(1); + queryDetParams.put("curvesId", curvesId); + List<CoalWashCurvesDetDTO> list = this.queryList(queryDetParams); + + double[][] floatSrcData = new double[list.size()][2]; + for (int i = 0; i < list.size(); i ++) { + floatSrcData[i][0] = list.get(i).getFwljcl().doubleValue(); + floatSrcData[i][1] = list.get(i).getFwljhf().doubleValue(); + } + + double[][] densityScopeSrcData = new double[list.size()][2]; + for (int i = 0; i < list.size(); i ++) { + densityScopeSrcData[i][0] = list.get(i).getMd().doubleValue(); + densityScopeSrcData[i][1] = list.get(i).getHl().doubleValue(); + } + + result.put("floatSrcData", floatSrcData); + result.put("densityScopeSrcData", densityScopeSrcData); + return result; + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java new file mode 100644 index 0000000..ad50363 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java @@ -0,0 +1,151 @@ +package com.iailab.module.pms.coalquality.modules.analysis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.constant.Constant; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.framework.tenant.core.aop.TenantIgnore; +import com.iailab.iems.common.utils.SerialNumUtils; +import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalWashCurvesDao; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDTO; +import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO; +import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesEntity; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesDetService; +import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesService; +import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.text.DecimalFormat; +import java.util.*; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年01月16日 15:58:00 + */ +@Service +public class CoalWashCurvesServiceImpl extends BaseServiceImpl<CoalWashCurvesDao, CoalWashCurvesEntity> + implements CoalWashCurvesService { + @Autowired + private CoalWashCurvesDetService coalWashCurvesDetService; + + private DecimalFormat df = new DecimalFormat("00"); + + @Autowired + private SerialNumUtils serialNumUtils; + + private String BUSINESS_CODE = "CoalWashCurves"; + + @Override + @TenantIgnore + public PageResult<CoalWashCurvesDTO> page(WashCurvesPageReqVO washCurvesPageReqVO) { + PageResult<CoalWashCurvesEntity> page = baseDao.selectPage(washCurvesPageReqVO); + + return BeanUtils.toBean(page, CoalWashCurvesDTO.class); + } + + @Override + public CoalWashCurvesDTO get(String id) { + CoalWashCurvesEntity entity = baseDao.selectById(id); + CoalWashCurvesDTO dto = ConvertUtils.sourceToTarget(entity, CoalWashCurvesDTO.class); + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("curvesId", dto.getId()); + List<CoalWashCurvesDetDTO> detList = coalWashCurvesDetService.queryList(parmas); + dto.setDetList(detList); + return dto; + } + + @Override + public CoalWashCurvesDTO getLastByMz(String mz) { +// if (StringUtils.isBlank(mz)) { +// return new CoalWashCurvesDTO(); +// } + QueryWrapper<CoalWashCurvesEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(mz), "mz", mz).orderByDesc(Constant.CREATE_DATE).last("limit 0, 1"); + List<CoalWashCurvesEntity> list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return null; + } + + CoalWashCurvesEntity entity = list.get(0); + CoalWashCurvesDTO dto = ConvertUtils.sourceToTarget(entity, CoalWashCurvesDTO.class); + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("curvesId", dto.getId()); + List<CoalWashCurvesDetDTO> detList = coalWashCurvesDetService.queryList(parmas); + dto.setDetList(detList); + return dto; + } + + @Override + public CoalWashCurvesDTO getByMzAndRq(String mz, String syrq) { +// if (StringUtils.isBlank(mz)) { +// return new CoalWashCurvesDTO(); +// } + QueryWrapper<CoalWashCurvesEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(mz), "mz", mz) + .eq(StringUtils.isNotBlank(syrq),"syrq",syrq); + List<CoalWashCurvesEntity> list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return null; + } + + CoalWashCurvesEntity entity = list.get(0); + CoalWashCurvesDTO dto = ConvertUtils.sourceToTarget(entity, CoalWashCurvesDTO.class); + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("curvesId", dto.getId()); + List<CoalWashCurvesDetDTO> detList = coalWashCurvesDetService.queryList(parmas); + dto.setDetList(detList); + return dto; + } + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CoalWashCurvesDTO dto) { +// String a = serialNumUtils.getByBusiness( BUSINESS_CODE,4); + dto.setCode(dto.getNy().replace("-", "") ); + CoalWashCurvesEntity entity = ConvertUtils.sourceToTarget(dto, CoalWashCurvesEntity.class); + entity.setId(UUID.randomUUID().toString()); + entity.setCreateDate(new Date()); +// entity.setCreator(SecurityUser.getUserId().toString()); + insert(entity); + + List<CoalWashCurvesDetDTO> detList = dto.getDetList(); +// if (!CollectionUtils.isEmpty(detList)) { +// for (int i = 0; i < detList.size(); i++) { +// detList.get(i).setCode(entity.getCode() + df.format(i + 1)); +// detList.get(i).setCurvesId(entity.getId()); +// } +// coalWashCurvesDetService.saveList(detList); +// } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CoalWashCurvesDTO dto) { + CoalWashCurvesEntity entity = ConvertUtils.sourceToTarget(dto, CoalWashCurvesEntity.class); + entity.setUpdateDate(new Date()); +// entity.setUpdater(SecurityUser.getUserId().toString()); + updateById(entity); + + List<CoalWashCurvesDetDTO> detList = dto.getDetList(); +// if (!CollectionUtils.isEmpty(detList)) { +// detList.forEach(item -> { +// item.setCurvesId(entity.getId()); +// }); +// coalWashCurvesDetService.updateList(detList); +// } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteByIds(Arrays.asList(ids)); +// coalWashCurvesDetService.deleteByCurvesIds(Arrays.asList(ids)); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/FullPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/FullPageReqVO.java new file mode 100644 index 0000000..3f2fe6f --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/FullPageReqVO.java @@ -0,0 +1,25 @@ +package com.iailab.module.pms.coalquality.modules.analysis.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +public class FullPageReqVO extends PageParam { + + /** + * 流水号 + */ + private String code; + + /** + * 年月 + */ + private String ny; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/WashCurvesPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/WashCurvesPageReqVO.java new file mode 100644 index 0000000..86475e3 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/vo/WashCurvesPageReqVO.java @@ -0,0 +1,44 @@ +package com.iailab.module.pms.coalquality.modules.analysis.vo; + +import com.iailab.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WashCurvesPageReqVO extends PageParam { + + /** + * 流水号 + */ + @Schema(description = "指标编码", example = "") + private String code; + + /** + * 年月 + */ + @Schema(description = "开始时间", example = "") + private String startTime; + + /** + * 年月 + */ + @Schema(description = "结束时间", example = "") + private String endTime; + + /** + * 年月 + */ + @Schema(description = "结束时间", example = "") + private String mz; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java new file mode 100644 index 0000000..5f7a9ae --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java @@ -0,0 +1,85 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService; +import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + + +/** + * 煤质检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 13:15:00 + */ +@Slf4j +@RestController +@RequestMapping("/quality/detection") +@Tag(name = "煤质检测") +public class QualityDetectionController { + @Autowired + private QualityDetectionService qualityDetectionService; + + private String DICT_CODE = "mzzb"; + + @GetMapping("page") + @Operation(summary = "分页") + public CommonResult<PageResult<QualityDetectionDTO>> page(DetectionPageReqVO reqVO) { + PageResult<QualityDetectionDTO> page = qualityDetectionService.page(reqVO); + + return success(page); + } + + @GetMapping("{id}") + @Operation(summary ="信息") + public CommonResult<QualityDetectionDTO> get(@PathVariable("id") String id) { + QualityDetectionDTO data = qualityDetectionService.get(id); + return success(data); + } + + @PostMapping + @Operation(summary ="保存") + public CommonResult<Boolean> save(@RequestBody QualityDetectionDTO dto) { +// if (qualityDetectionService.cheack(dto) > 0) { +// return new CommonResult().error("编号重复"); +// } + + qualityDetectionService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary ="修改") + public CommonResult<Boolean> update(@RequestBody QualityDetectionDTO dto) { + +// if (qualityDetectionService.cheack(dto) > 0) { +// return new CommonResult().error("编号重复"); +// } + qualityDetectionService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary ="删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityDetectionService.delete(ids); + + return success(true); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java new file mode 100644 index 0000000..119c952 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java @@ -0,0 +1,83 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityMediumDTO; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityMediumService; +import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:36:00 + */ +@Slf4j +@RestController +@RequestMapping("/quality/medium") +@Tag(name = "介质粉检测") +public class QualityMediumController { + @Autowired + private QualityMediumService qualityMediumService; + + @GetMapping("page") + @Operation(summary = "分页") + public CommonResult<PageResult<QualityMediumDTO>> page(MediumPageReqVO mediumPageReqVO){ + PageResult<QualityMediumDTO> page = qualityMediumService.page(mediumPageReqVO); + + return success(page); + } + + @GetMapping("{id}") + @Operation(summary = "信息") + public CommonResult<QualityMediumDTO> get(@PathVariable("id") String id){ + QualityMediumDTO data = qualityMediumService.get(id); + return success(data); + } + + @PostMapping + @Operation(summary = "保存") + public CommonResult<Boolean> save(@RequestBody QualityMediumDTO dto){ +// //效验数据 +// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + qualityMediumService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary = "修改") + public CommonResult<Boolean> update(@RequestBody QualityMediumDTO dto){ +// //效验数据 +// ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); +// +// if (qualityMediumService.cheack(dto) > 0) { +// return new CommonResult().error("编号重复"); +// } + + qualityMediumService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityMediumService.delete(ids); + + return success(true); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java new file mode 100644 index 0000000..0a4ab0a --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java @@ -0,0 +1,74 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickService; +import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Slf4j +@RestController +@RequestMapping("/quality/quick") +@Tag(name = "生产快检") +public class QualityQuickController { + @Autowired + private QualityQuickService qualityQuickService; + + @GetMapping("page") + @Operation(summary = "分页") + public CommonResult<PageResult<QualityQuickDTO>> page(QuickPageReqVO quickPageReqVO){ + PageResult<QualityQuickDTO> page = qualityQuickService.page(quickPageReqVO); + + return success(page); + } + + @GetMapping("{id}") + @Operation(summary = "信息") + public CommonResult<QualityQuickDTO> get(@PathVariable("id") String id){ + QualityQuickDTO data = qualityQuickService.get(id); + return success(data); + } + + @PostMapping + @Operation(summary = "保存") + public CommonResult<Boolean> save(@RequestBody QualityQuickDTO dto){ + + qualityQuickService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary = "修改") + public CommonResult<Boolean> update(@RequestBody QualityQuickDTO dto){ + + qualityQuickService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityQuickService.delete(ids); + + return success(true); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java new file mode 100644 index 0000000..d4fb7b1 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java @@ -0,0 +1,45 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller.admin; + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.iems.common.annotation.AutoDict; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickItemService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Slf4j +@RestController +@RequestMapping("/quality/quick/item") +@Tag(name = "生产快检详情") +public class QualityQuickItemController { + @Autowired + private QualityQuickItemService qualityQuickItemService; + + @GetMapping("/list/{lsh}") + @Operation(summary ="信息") + @AutoDict + public CommonResult<List<QualityQuickItemDTO>> list(@PathVariable("lsh") String lsh){ + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("lsh", lsh); + List<QualityQuickItemDTO> data = qualityQuickItemService.queryList(parmas); + return success(data); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java new file mode 100644 index 0000000..9ef4b90 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java @@ -0,0 +1,79 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller.admin; + + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityTailingDTO; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityTailingService; +import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:37:00 + */ +@Slf4j +@RestController +@RequestMapping("/quality/tailing") +@Tag(name = "尾矿检测") +public class QualityTailingController { + @Autowired + private QualityTailingService qualityTailingService; + + @GetMapping("page") + @Operation(summary = "分页") + public CommonResult<PageResult<QualityTailingDTO>> page(TailingPageReqVO tailingPageReqVO){ + PageResult<QualityTailingDTO> page = qualityTailingService.page(tailingPageReqVO); + + return success(page); + } + + @GetMapping("{id}") + @Operation(summary ="信息") + public CommonResult<QualityTailingDTO> get(@PathVariable("id") String id){ + QualityTailingDTO data = qualityTailingService.get(id); + return success(data); + } + + @PostMapping + @Operation(summary ="保存") + public CommonResult<Boolean> save(@RequestBody QualityTailingDTO dto){ + + qualityTailingService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary ="修改") + public CommonResult<Boolean> update(@RequestBody QualityTailingDTO dto){ +// +// if (qualityTailingService.cheack(dto) > 0) { +// return new CommonResult().error("编号重复"); +// } + + qualityTailingService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary ="删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityTailingService.delete(ids); + + return success(true); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/package-info.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/package-info.java new file mode 100644 index 0000000..b74e2a2 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/package-info.java @@ -0,0 +1 @@ +package com.iailab.module.pms.coalquality.modules.detection.controller; \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityDetectionDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityDetectionDao.java new file mode 100644 index 0000000..4625304 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityDetectionDao.java @@ -0,0 +1,30 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityDetectionEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * 煤质检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 13:12:00 + */ +@Mapper +public interface QualityDetectionDao extends BaseMapperX<QualityDetectionEntity> { + + default PageResult<QualityDetectionEntity> selectPage(DetectionPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<QualityDetectionEntity>() + .like(StringUtils.isNotBlank(reqVO.getCode()), QualityDetectionEntity::getCode, reqVO.getCode()) + .eq(StringUtils.isNotBlank(reqVO.getType()), QualityDetectionEntity::getType, reqVO.getType()) + .eq(StringUtils.isNotBlank(reqVO.getRq()), QualityDetectionEntity::getRq, reqVO.getRq()) + .eq(StringUtils.isNotBlank(reqVO.getBc()), QualityDetectionEntity::getBc, reqVO.getBc()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityExcelImportDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityExcelImportDao.java new file mode 100644 index 0000000..b67b49d --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityExcelImportDao.java @@ -0,0 +1,16 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author Lujiaxin + * @Description + * @createTime 2023年05月11日 11:05:00 + */ +@Mapper +public interface QualityExcelImportDao { + + String getXMIdByDictCodeAndName(@Param("name")String name); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityMediumDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityMediumDao.java new file mode 100644 index 0000000..6a22705 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityMediumDao.java @@ -0,0 +1,25 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityMediumEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:20:00 + */ +@Mapper +public interface QualityMediumDao extends BaseMapperX<QualityMediumEntity> { + + default PageResult<QualityMediumEntity> selectPage(MediumPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<QualityMediumEntity>() + .eq(StringUtils.isNotBlank(reqVO.getRq()), QualityMediumEntity::getRq, reqVO.getRq()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickDao.java new file mode 100644 index 0000000..aad94ad --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickDao.java @@ -0,0 +1,24 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Mapper +public interface QualityQuickDao extends BaseMapperX<QualityQuickEntity> { + default PageResult<QualityQuickEntity> selectPage(QuickPageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapper<QualityQuickEntity>() + .eq(StringUtils.isNotBlank(reqVO.getRq()), "left(datetime,10)", reqVO.getRq()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickItemDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickItemDao.java new file mode 100644 index 0000000..e8a531a --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityQuickItemDao.java @@ -0,0 +1,19 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + + +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickItemEntity; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Mapper +public interface QualityQuickItemDao extends BaseMapperX<QualityQuickItemEntity> { + @Delete("Delete from t_quality_quick_detection_item where lsh=#{lsh}") + void deleteByLsh(@Param("lsh") String lsh); +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityTailingDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityTailingDao.java new file mode 100644 index 0000000..b018e8b --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dao/QualityTailingDao.java @@ -0,0 +1,25 @@ +package com.iailab.module.pms.coalquality.modules.detection.dao; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityTailingEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:20:00 + */ +@Mapper +public interface QualityTailingDao extends BaseMapperX<QualityTailingEntity> { + + default PageResult<QualityTailingEntity> selectPage(TailingPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<QualityTailingEntity>() + .eq(StringUtils.isNotBlank(reqVO.getRq()), QualityTailingEntity::getRq, reqVO.getRq()) + ); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java new file mode 100644 index 0000000..81a8ec6 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java @@ -0,0 +1,132 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.iems.common.annotation.Dict; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 煤质检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 13:19:00 + */ +@Data +@Schema(description = "煤质检测") +public class QualityDetectionDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "关联ID") + private String rglid; + + @Schema(description = "流水号") + private String code; + + @Schema(description = "煤质检测类型") + private String type; + + @Schema(description = "日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private java.util.Date rq; + + @Schema(description = "班次") + private String bc; + + @Schema(description = "班次") + @Dict(dicCode = "bc", itemValue = "bc") + private String bcName; + + @Schema(description = "采样时间") + private java.util.Date cysj; + + @Schema(description = "采样点") + private String cyd; + + @Schema(description = "采样点") + @Dict(dicCode = "cyd", itemValue = "cyd") + private String cydName; + + @Schema(description = "产量") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cl; + + @Schema(description = "采样数量") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cysl; + + @Schema(description = "化验时间") + private java.util.Date hysj; + + @Schema(description = "煤种") + private String mz; + + @Schema(description = "煤种") + @Dict(dicCode = "ymmz,cpmz,spmz", itemValue = "mz") + private String mzName; + + @Schema(description = "灰分Ad%") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf; + + @Schema(description = "水分Mt%") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal sf; + + @Schema(description = "硫份St,d%") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal lf; + + @Schema(description = "挥发分Vdaf%") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hff; + + @Schema(description = "粘结GR.I") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal nj; + + @Schema(description = "胶质层Y(㎜)GR.I") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal jzc; + + @Schema(description = "发热量(cal/g)") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal frl; + + @Schema(description = "中损") + private BigDecimal zs; + + @Schema(description = "矸损") + private BigDecimal gs; + + @Schema(description = "压滤煤泥灰分Ad%") + private BigDecimal ylmnHf; + + @Schema(description = "备注") + private String bz; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java new file mode 100644 index 0000000..305e83a --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java @@ -0,0 +1,54 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:30:00 + */ +@Data +@Schema(description = "介质粉检测") +public class QualityMediumDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "流水号") + private String code; + + @Schema(description = "日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private java.util.Date rq; + + @Schema(description = "名称") + private String mc; + + @Schema(description = "水分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal sf; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private java.util.Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQueryDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQueryDTO.java new file mode 100644 index 0000000..cd4fcbe --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQueryDTO.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月24日 00:23:00 + */ +@Data +@Schema(description = "指标查询") +public class QualityQueryDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") + private Date startDate; + + @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") + private Date endDate; + + private String index; + + private String mz; + + private String groupType; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java new file mode 100644 index 0000000..bd047eb --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java @@ -0,0 +1,44 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.iailab.iems.common.annotation.Dict; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.util.List; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Data +@Schema(description = "快速检查") +public class QualityQuickDTO { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "流水号") + private String lsh; + + @Schema(description = "采样时间") + private java.util.Date datetime; + + @Schema(description = "煤种") + private String mz; + + @Schema(description = "煤种") + @Dict(dicCode = "ymmz", itemValue = "mz") + private String mzName; + + @Schema(description = "快速检查详情") + private List<QualityQuickItemDTO> itemList; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java new file mode 100644 index 0000000..30914b2 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java @@ -0,0 +1,86 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.iems.common.annotation.Dict; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.math.BigDecimal; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Data +@Schema(description = "生产快速检查详情") +public class QualityQuickItemDTO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + @ExcelIgnore + private String id; + + @Schema(description = "流水号") + @ExcelIgnore + private String lsh; + + @Schema(description = "压力") + @ExcelProperty(index = 1) + private BigDecimal yl; + + @Schema(description = "密度") + @JsonFormat(shape = JsonFormat.Shape.STRING) + @ExcelProperty(index = 2) + private BigDecimal md; + + @Schema(description = "项目") + @ExcelIgnore + private String xm; + + @Schema(description = "项目名称") + @Dict(dicCode = "sckjxm", itemValue = "xm") + @ExcelProperty(index = 0) + private String xmName; + + @Schema(description = "灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf; + + @Schema(description = "硫分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal lf; + + @Schema(description = "-1.4浮沉灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf1; + + @Schema(description = "-1.4浮沉产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cl1; + + @Schema(description = "1.4-1.8浮沉灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf2; + + @Schema(description = "1.4-1.8浮沉产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cl2; + + @Schema(description = "+1.8浮沉灰分") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal hf3; + + @Schema(description = "+1.8浮沉产率") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cl3; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java new file mode 100644 index 0000000..1f7088b --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java @@ -0,0 +1,75 @@ +package com.iailab.module.pms.coalquality.modules.detection.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.iems.common.annotation.Dict; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:30:00 + */ +@Data +@Schema(description = "尾矿检测") +public class QualityTailingDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "流水号") + private String code; + + @Schema(description = "日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private java.util.Date rq; + + @Schema(description = "班次") + private String bc; + + @Schema(description = "班次") + @Dict(dicCode = "bc", itemValue = "bc") + private String bcName; + + @Schema(description = "采样点") + private String cyd; + + @Schema(description = "采样点") + @Dict(dicCode = "cyd", itemValue = "cyd") + private String cydName; + + @Schema(description = "采样时间") + private java.util.Date cysj; + + @Schema(description = "化验时间") + private java.util.Date hysj; + + @Schema(description = "采样数量") + private BigDecimal cysl; + + @Schema(description = "磁性物含量") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private BigDecimal cxwhl; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private java.util.Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityDetectionEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityDetectionEntity.java new file mode 100644 index 0000000..a9c52d8 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityDetectionEntity.java @@ -0,0 +1,157 @@ +package com.iailab.module.pms.coalquality.modules.detection.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 煤质检测 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_detection") +public class QualityDetectionEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 关联ID + */ + private String rglid; + + /** + * 编号 + */ + private String code; + + /** + * 煤质检测类型 + */ + private String type; + + /** + * 日期 + */ + private java.util.Date rq; + + /** + * 班次 + */ + private String bc; + + /** + * 采样时间 + */ + private java.util.Date cysj; + + /** + * 采样点 + */ + private String cyd; + + /** + * 产量 + */ + private BigDecimal cl; + + /** + * 采样数量 + */ + private BigDecimal cysl; + + /** + * 化验时间 + */ + private java.util.Date hysj; + + /** + * 煤种 + */ + private String mz; + + /** + * 灰分Ad% + */ + private BigDecimal hf; + + /** + * 水分Mt% + */ + private BigDecimal sf; + + /** + * 硫份St,d% + */ + private BigDecimal lf; + + /** + * 挥发分Vdaf% + */ + private BigDecimal hff; + + /** + * 粘结GR.I + */ + private BigDecimal nj; + + /** + * 胶质层Y(㎜)GR.I + */ + private BigDecimal jzc; + + /** + * 发热量(cal/g) + */ + private BigDecimal frl; + + /** + * 中损 + */ + private BigDecimal zs; + + /** + * 矸损 + */ + private BigDecimal gs; + + /** + * 压滤煤泥灰分Ad% + */ + private BigDecimal ylmnHf; + + /** + * 备注 + */ + private String bz; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private java.util.Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private java.util.Date updateDate; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityMediumEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityMediumEntity.java new file mode 100644 index 0000000..0157943 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityMediumEntity.java @@ -0,0 +1,70 @@ +package com.iailab.module.pms.coalquality.modules.detection.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 介质粉检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:13:00 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_medium") +public class QualityMediumEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 流水号 + */ + private String code; + + /** + * 日期 + */ + private java.util.Date rq; + + /** + * 名称 + */ + private String mc; + + /** + * 水分 + */ + private BigDecimal sf; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private java.util.Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickEntity.java new file mode 100644 index 0000000..a9e17e7 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickEntity.java @@ -0,0 +1,43 @@ +package com.iailab.module.pms.coalquality.modules.detection.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_quick_detection") +public class QualityQuickEntity { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 流水号 + */ + private String lsh; + + /** + * 采样时间 + */ + private Date datetime; + + /** + * 煤种 + */ + private String mz; + + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickItemEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickItemEntity.java new file mode 100644 index 0000000..7720400 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityQuickItemEntity.java @@ -0,0 +1,76 @@ +package com.iailab.module.pms.coalquality.modules.detection.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_quick_detection_item") +public class QualityQuickItemEntity { + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 流水号 + */ + private String lsh; + /** + * 项目 + */ + private String xm; + /** + * 压力 + */ + private BigDecimal yl; + + /** + * 密度 + */ + private BigDecimal md; + /** + * 灰分 + */ + private BigDecimal hf; + + /** + * 硫分 + */ + private BigDecimal lf; + + /** + * -1.4浮沉灰分 + */ + private BigDecimal hf1; + + /** + * -1.4浮沉产率 + */ + private BigDecimal cl1; + + /** + * 1.4-1.8浮沉灰分 + */ + private BigDecimal hf2; + + /** + * 1.4-1.8浮沉产率 + */ + private BigDecimal cl2; + + /** + * +1.8浮沉灰分 + */ + private BigDecimal hf3; + + /** + * +1.8浮沉产率 + */ + private BigDecimal cl3; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityTailingEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityTailingEntity.java new file mode 100644 index 0000000..770b17b --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/entity/QualityTailingEntity.java @@ -0,0 +1,90 @@ +package com.iailab.module.pms.coalquality.modules.detection.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 尾矿检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:13:00 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_tailing") +public class QualityTailingEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 流水号 + */ + private String code; + + /** + * 日期 + */ + private java.util.Date rq; + + /** + * 班次 + */ + private String bc; + + /** + * 采样点 + */ + private String cyd; + + /** + * 采样时间 + */ + private java.util.Date cysj; + + /** + * 化验时间 + */ + private java.util.Date hysj; + + /** + * 采样数量 + */ + private BigDecimal cysl; + + /** + * 磁性物含量 + */ + private BigDecimal cxwhl; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private java.util.Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityDetectionService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityDetectionService.java new file mode 100644 index 0000000..3b9a01b --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityDetectionService.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.detection.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityDetectionEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; + +/** + * 煤质检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 13:14:00 + */ +public interface QualityDetectionService extends BaseService<QualityDetectionEntity> { + + PageResult<QualityDetectionDTO> page(DetectionPageReqVO reqVO); + + QualityDetectionDTO get(String id); + + void save(QualityDetectionDTO dto); + + void update(QualityDetectionDTO dto); + + void delete(String[] ids); + + Long cheack(QualityDetectionDTO dto); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityMediumService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityMediumService.java new file mode 100644 index 0000000..5228ec5 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityMediumService.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.detection.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityMediumDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityMediumEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO; + +/** + * 介质粉检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:25:00 + */ +public interface QualityMediumService extends BaseService<QualityMediumEntity> { + + PageResult<QualityMediumDTO> page(MediumPageReqVO mediumPageReqVO); + + QualityMediumDTO get(String id); + + void save(QualityMediumDTO dto); + + void update(QualityMediumDTO dto); + + void delete(String[] ids); + + Long cheack(QualityMediumDTO dto); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickItemService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickItemService.java new file mode 100644 index 0000000..bacda1d --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickItemService.java @@ -0,0 +1,30 @@ +package com.iailab.module.pms.coalquality.modules.detection.service; + + +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickItemEntity; + +import java.util.List; +import java.util.Map; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +public interface QualityQuickItemService extends BaseService<QualityQuickItemEntity> { + + QualityQuickItemDTO get(String id); + + void save(QualityQuickItemDTO dto); + + void update(QualityQuickItemDTO dto); + + void delete(String[] ids); + + List<QualityQuickItemDTO> queryList(Map<String, Object> parmas); + + void deleteByLsh(String lsh); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickService.java new file mode 100644 index 0000000..e7addd5 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityQuickService.java @@ -0,0 +1,27 @@ +package com.iailab.module.pms.coalquality.modules.detection.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +public interface QualityQuickService extends BaseService<QualityQuickEntity> { + + PageResult<QualityQuickDTO> page(QuickPageReqVO quickPageReqVO); + + QualityQuickDTO get(String id); + + void save(QualityQuickDTO dto); + + void update(QualityQuickDTO dto); + + void delete(String[] ids); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityTailingService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityTailingService.java new file mode 100644 index 0000000..9d855e1 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/QualityTailingService.java @@ -0,0 +1,31 @@ +package com.iailab.module.pms.coalquality.modules.detection.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityTailingDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityTailingEntity; +import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO; + +/** + * 尾矿检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:25:00 + */ +public interface QualityTailingService extends BaseService<QualityTailingEntity> { + + PageResult<QualityTailingDTO> page(TailingPageReqVO tailingPageReqVO); + + QualityTailingDTO get(String id); + + void save(QualityTailingDTO dto); + + void update(QualityTailingDTO dto); + + void delete(String[] ids); + + Long cheack(QualityTailingDTO dto); + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java new file mode 100644 index 0000000..8cf5806 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java @@ -0,0 +1,97 @@ +package com.iailab.module.pms.coalquality.modules.detection.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.iems.common.utils.ConvertUtils; +import com.iailab.iems.common.utils.SerialNumUtils; +import com.iailab.module.pms.coalquality.modules.detection.dao.QualityDetectionDao; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityDetectionEntity; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService; +import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 煤质检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 13:15:00 + */ +@Service +public class QualityDetectionServiceImpl extends BaseServiceImpl<QualityDetectionDao, QualityDetectionEntity> + implements QualityDetectionService { + + @Autowired + private SerialNumUtils serialNumUtils; + + private Map<String, String> prefixMap = new HashMap<>(); + + private String BUSINESS_CODE = "QualityDetection"; + + @Override + public PageResult<QualityDetectionDTO> page(DetectionPageReqVO reqVO) { + PageResult<QualityDetectionEntity> page = baseDao.selectPage(reqVO); + + return BeanUtils.toBean(page, QualityDetectionDTO.class); + } + + + @Override + public QualityDetectionDTO get(String id) { + QualityDetectionEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, QualityDetectionDTO.class); + } + + @Override + public void save(QualityDetectionDTO dto) { + if (CollectionUtils.isEmpty(prefixMap)) { + prefixMap.put("ym", "10"); + prefixMap.put("cpm", "20"); + prefixMap.put("spm", "30"); + } + QualityDetectionEntity entity = ConvertUtils.sourceToTarget(dto, QualityDetectionEntity.class); + entity.setCode(prefixMap.get(dto.getType()) + serialNumUtils.getByBusinessDate(BUSINESS_CODE + dto.getType(), dto.getRq(), 4)); + entity.setCreateDate(new Date()); +// entity.setCreator(SecurityUser.getUserId().toString()); + insert(entity); + } + + @Override + public void update(QualityDetectionDTO dto) { + QualityDetectionEntity entity = ConvertUtils.sourceToTarget(dto, QualityDetectionEntity.class); + entity.setUpdateDate(new Date()); +// entity.setUpdater(SecurityUser.getUserId().toString()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteByIds(Arrays.asList(ids)); + } + + @Override + public Long cheack(QualityDetectionDTO dto) { + String id = dto.getId(); + String code = dto.getCode(); + + QueryWrapper<QualityDetectionEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.ne(StringUtils.isNotBlank(id), "id", id); + queryWrapper.and(wrapper -> wrapper.eq("code", code)); + return baseDao.selectCount(queryWrapper); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java new file mode 100644 index 0000000..bcb2bd5 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java @@ -0,0 +1,90 @@ +package com.iailab.module.pms.coalquality.modules.detection.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.iems.common.utils.SerialNumUtils; +import com.iailab.module.pms.coalquality.modules.detection.dao.QualityMediumDao; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityMediumDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityMediumEntity; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityMediumService; +import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; + +/** + * 介质粉检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:27:00 + */ +@Slf4j +@Service +public class QualityMediumServiceImpl extends BaseServiceImpl<QualityMediumDao, QualityMediumEntity> + implements QualityMediumService { + + @Autowired + private SerialNumUtils serialNumUtils; + + + private String BUSINESS_CODE = "QualityMedium"; + + @Override + public PageResult<QualityMediumDTO> page(MediumPageReqVO reqVO) { + PageResult<QualityMediumEntity> page = baseDao.selectPage(reqVO); + + return BeanUtils.toBean(page, QualityMediumDTO.class); + } + + @Override + public QualityMediumDTO get(String id) { + QualityMediumEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, QualityMediumDTO.class); + } + + @Override + public void save(QualityMediumDTO dto) { + dto.setCode(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getRq(), 4)); + QualityMediumEntity entity = ConvertUtils.sourceToTarget(dto, QualityMediumEntity.class); + entity.setCreateDate(new Date()); +// entity.setCreator(SecurityUser.getUserId().toString()); + insert(entity); + } + + @Override + public void update(QualityMediumDTO dto) { + QualityMediumEntity entity = ConvertUtils.sourceToTarget(dto, QualityMediumEntity.class); + entity.setUpdateDate(new Date()); +// entity.setUpdater(SecurityUser.getUserId().toString()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Long cheack(QualityMediumDTO dto) { + String id = dto.getId(); + String code = dto.getCode(); + + QueryWrapper<QualityMediumEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.ne(StringUtils.isNotBlank(id), "id", id); + queryWrapper.and(wrapper -> wrapper.eq("code", code)); + return baseDao.selectCount(queryWrapper); + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickItemServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickItemServiceImpl.java new file mode 100644 index 0000000..78326c2 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickItemServiceImpl.java @@ -0,0 +1,77 @@ +package com.iailab.module.pms.coalquality.modules.detection.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.pms.coalquality.modules.detection.dao.QualityQuickItemDao; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickItemEntity; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickItemService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Slf4j +@Service +public class QualityQuickItemServiceImpl extends BaseServiceImpl<QualityQuickItemDao, QualityQuickItemEntity> + implements QualityQuickItemService { + + @Override + public QualityQuickItemDTO get(String id) { + QualityQuickItemEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, QualityQuickItemDTO.class); + } + + @Override + public void save(QualityQuickItemDTO dto) { + QualityQuickItemEntity entity = ConvertUtils.sourceToTarget(dto, QualityQuickItemEntity.class); + insert(entity); + } + + @Override + public void update(QualityQuickItemDTO dto) { + QualityQuickItemEntity entity = ConvertUtils.sourceToTarget(dto, QualityQuickItemEntity.class); + + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List<QualityQuickItemDTO> queryList(Map<String, Object> params) { + List<QualityQuickItemEntity> list = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(list, QualityQuickItemDTO.class); + } + + @Override + public void deleteByLsh(String lsh) { + baseDao.deleteByLsh(lsh); + } + + private QueryWrapper<QualityQuickItemEntity> getWrapper(Map<String, Object> params) { + String lsh = (String) params.get("lsh"); + + QueryWrapper<QualityQuickItemEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(lsh), "lsh", lsh).orderByAsc("lsh"); + + return wrapper; + } + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java new file mode 100644 index 0000000..e60f908 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java @@ -0,0 +1,99 @@ +package com.iailab.module.pms.coalquality.modules.detection.service.impl; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.iems.common.utils.SerialNumUtils; +import com.iailab.module.pms.coalquality.modules.detection.dao.QualityQuickDao; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityQuickEntity; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickItemService; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickService; +import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author DongYukun + * @Description + * @createTime 2023年12月27日 9:53:00 + */ +@Slf4j +@Service +public class QualityQuickServiceImpl extends BaseServiceImpl<QualityQuickDao, QualityQuickEntity> + implements QualityQuickService { + + @Autowired + private SerialNumUtils serialNumUtils; + + private String BUSINESS_CODE = "QualityQuick"; + + @Autowired + private QualityQuickItemService qualityQuickItemService; + + @Override + public PageResult<QualityQuickDTO> page(QuickPageReqVO reqVO) { + PageResult<QualityQuickEntity> page = baseDao.selectPage(reqVO); + + return BeanUtils.toBean(page, QualityQuickDTO.class); + } + + @Override + public QualityQuickDTO get(String id) { + QualityQuickEntity entity = baseDao.selectById(id); + QualityQuickDTO dto = ConvertUtils.sourceToTarget(entity, QualityQuickDTO.class); + Map<String, Object> parmas = new HashMap<>(1); + parmas.put("lsh", dto.getLsh()); + List<QualityQuickItemDTO> itemList = qualityQuickItemService.queryList(parmas); + dto.setItemList(itemList); + return dto; + } + + @Override + public void save(QualityQuickDTO dto) { + dto.setLsh(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getDatetime(), 4)); + QualityQuickEntity entity = ConvertUtils.sourceToTarget(dto, QualityQuickEntity.class); + insert(entity); + dto.getItemList().stream().forEach( + item->{ + item.setLsh(dto.getLsh()); + qualityQuickItemService.save(item); + } + ); + } + + @Override + public void update(QualityQuickDTO dto) { + QualityQuickEntity entity = ConvertUtils.sourceToTarget(dto, QualityQuickEntity.class); + updateById(entity); + qualityQuickItemService.deleteByLsh(dto.getLsh()); + + dto.getItemList().forEach( + item->{ + item.setLsh(dto.getLsh()); + qualityQuickItemService.save(item); + } + ); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + QualityQuickEntity dto = baseDao.selectById(ids[0]); + baseDao.deleteByIds(Arrays.asList(ids)); + qualityQuickItemService.deleteByLsh(dto.getLsh()); + } + + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java new file mode 100644 index 0000000..470905c --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java @@ -0,0 +1,100 @@ +package com.iailab.module.pms.coalquality.modules.detection.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.iems.common.utils.SerialNumUtils; +import com.iailab.module.pms.coalquality.modules.detection.dao.QualityTailingDao; +import com.iailab.module.pms.coalquality.modules.detection.dto.QualityTailingDTO; +import com.iailab.module.pms.coalquality.modules.detection.entity.QualityTailingEntity; +import com.iailab.module.pms.coalquality.modules.detection.service.QualityTailingService; +import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.Map; + +/** + * 尾矿检测 + * + * @author PanZhibao + * @Description + * @createTime 2023年02月07日 17:27:00 + */ +@Slf4j +@Service +public class QualityTailingServiceImpl extends BaseServiceImpl<QualityTailingDao, QualityTailingEntity> + implements QualityTailingService { + + @Autowired + private SerialNumUtils serialNumUtils; + + private String BUSINESS_CODE = "QualityTailing"; + + @Override + public PageResult<QualityTailingDTO> page(TailingPageReqVO reqVO) { + PageResult<QualityTailingEntity> page = baseDao.selectPage(reqVO); + + return BeanUtils.toBean(page, QualityTailingDTO.class); + } + + private QueryWrapper<QualityTailingEntity> getWrapper(Map<String, Object> params){ + String rq = (String)params.get("rq"); + + QueryWrapper<QualityTailingEntity> wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(rq), "rq", rq); + return wrapper; + } + + @Override + public QualityTailingDTO get(String id) { + QualityTailingEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, QualityTailingDTO.class); + } + + @Override + public void save(QualityTailingDTO dto) { + + dto.setCode(SerialNumUtils.getSerialNum("", dto.getRq(), dto.getBc())); + QualityTailingEntity entity = ConvertUtils.sourceToTarget(dto, QualityTailingEntity.class); + entity.setCreateDate(new Date()); +// entity.setCreator(SecurityUser.getUserId().toString()); + insert(entity); + } + + @Override + public void update(QualityTailingDTO dto) { + QualityTailingEntity entity = ConvertUtils.sourceToTarget(dto, QualityTailingEntity.class); + entity.setUpdateDate(new Date()); +// entity.setUpdater(SecurityUser.getUserId().toString()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Long cheack(QualityTailingDTO dto) { + String id = dto.getId(); + String code = dto.getCode(); + + QueryWrapper<QualityTailingEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.ne(StringUtils.isNotBlank(id), "id", id); + queryWrapper.and(wrapper -> wrapper.eq("code", code)); + return baseDao.selectCount(queryWrapper); + } + + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/DetectionPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/DetectionPageReqVO.java new file mode 100644 index 0000000..3bb363a --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/DetectionPageReqVO.java @@ -0,0 +1,35 @@ +package com.iailab.module.pms.coalquality.modules.detection.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +public class DetectionPageReqVO extends PageParam { + + /** + * 流水号 + */ + private String code; + + /** + * 类型 + */ + private String type; + + /** + * 流水号 + */ + private String rq; + + /** + * 班次 + */ + private String bc; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/MediumPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/MediumPageReqVO.java new file mode 100644 index 0000000..3ce5cc2 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/MediumPageReqVO.java @@ -0,0 +1,20 @@ +package com.iailab.module.pms.coalquality.modules.detection.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +public class MediumPageReqVO extends PageParam { + + /** + * 年月 + */ + private String rq; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/QuickPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/QuickPageReqVO.java new file mode 100644 index 0000000..c9bfb94 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/QuickPageReqVO.java @@ -0,0 +1,20 @@ +package com.iailab.module.pms.coalquality.modules.detection.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +public class QuickPageReqVO extends PageParam { + + /** + * 年月 + */ + private String rq; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/TailingPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/TailingPageReqVO.java new file mode 100644 index 0000000..1f082d7 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/vo/TailingPageReqVO.java @@ -0,0 +1,20 @@ +package com.iailab.module.pms.coalquality.modules.detection.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +public class TailingPageReqVO extends PageParam { + + /** + * 年月 + */ + private String rq; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java new file mode 100644 index 0000000..cbed4d0 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java @@ -0,0 +1,81 @@ +package com.iailab.module.pms.coalquality.modules.wash.controller.admin; + +import com.iailab.framework.common.annotation.AutoDict; +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.iems.common.utils.Result; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.iems.common.validator.ValidatorUtils; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.DefaultGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import com.iailab.module.pms.coalquality.modules.wash.dto.QualityWashTargetDTO; +import com.iailab.module.pms.coalquality.modules.wash.service.QualityWashTargetService; +import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月12日 13:34:00 + */ +@RestController +@RequestMapping("/coal-quality/wash/target") +@Tag(name = "入洗原煤指标") +public class QualityWashTargetController { + @Autowired + private QualityWashTargetService qualityWashTargetService; + + @GetMapping("/page") + @AutoDict + public CommonResult<PageResult<QualityWashTargetDTO>> page(WashTargetPageReqVO washTargetPageReqVO) { + PageResult<QualityWashTargetDTO> page = qualityWashTargetService.page(washTargetPageReqVO); + + return success(page); + } + + @GetMapping("/get") + @Operation(summary = "信息") + public Result<QualityWashTargetDTO> get(String id) { + QualityWashTargetDTO data = qualityWashTargetService.get(id); + return new Result<QualityWashTargetDTO>().ok(data); + } + + @PostMapping + @Operation(summary = "保存") + public CommonResult<Boolean> save(@RequestBody QualityWashTargetDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + qualityWashTargetService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary = "修改") + public CommonResult<Boolean> update(@RequestBody QualityWashTargetDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + qualityWashTargetService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityWashTargetService.delete(ids); + + return success(true); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/package-info.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/package-info.java new file mode 100644 index 0000000..b997c56 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/package-info.java @@ -0,0 +1 @@ +package com.iailab.module.pms.coalquality.modules.wash.controller; \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dao/QualityWashTargetDao.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dao/QualityWashTargetDao.java new file mode 100644 index 0000000..8ed2f78 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dao/QualityWashTargetDao.java @@ -0,0 +1,23 @@ +package com.iailab.module.pms.coalquality.modules.wash.dao; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.mybatis.core.mapper.BaseMapperX; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.iailab.module.pms.coalquality.modules.wash.entity.QualityWashTargetEntity; +import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月12日 13:30:00 + */ +@Mapper +public interface QualityWashTargetDao extends BaseMapperX<QualityWashTargetEntity> { + + default PageResult<QualityWashTargetEntity> selectPage(WashTargetPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX<QualityWashTargetEntity>() + .eqIfPresent(QualityWashTargetEntity::getNy, reqVO.getNy())); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java new file mode 100644 index 0000000..f9c662a --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java @@ -0,0 +1,106 @@ +package com.iailab.module.pms.coalquality.modules.wash.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.iailab.iems.common.annotation.Dict; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Null; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月12日 13:29:00 + */ +@Data +@Schema(description = "入洗原煤指标") +public class QualityWashTargetDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "id") + @Null(message="{id.null}", groups = AddGroup.class) + @NotNull(message="{id.require}", groups = UpdateGroup.class) + private String id; + + @Schema(description = "年月") + private String ny; + + @Schema(description = "煤种") + private String mz; + + @Dict(dicCode = "ymmz", itemValue = "mz") + @Schema(description = "煤种") + private String mzName; + + @Schema(description = "用煤单位") + private String ymdw; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "产品量") + private BigDecimal cpl; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "原煤水分Mt%") + private BigDecimal ymSf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "原煤灰分Ad%") + private BigDecimal ymHf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "原煤硫份St,d%") + private BigDecimal ymLf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤水分Mt%") + private BigDecimal jmSf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤灰分Ad%") + private BigDecimal jmHf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤硫份St,d%") + private BigDecimal jmLf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤挥发分Vdaf%") + private BigDecimal jmHff; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤粘结GR.I") + private BigDecimal jmNj; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "精煤胶质层Y(㎜)GR.I") + private BigDecimal jmJzc; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "中煤灰分Ad%") + private BigDecimal zmHf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "中煤硫份St,d%") + private BigDecimal zmLf; + + @JsonFormat(shape = JsonFormat.Shape.STRING) + @Schema(description = "矸石灰分Ad%") + private BigDecimal gsHf; + + @Schema(description = "创建人") + private String creator; + + @Schema(description = "创建时间") + private java.util.Date createDate; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "修改时间") + private java.util.Date updateDate; +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/entity/QualityWashTargetEntity.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/entity/QualityWashTargetEntity.java new file mode 100644 index 0000000..f1bf4e3 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/entity/QualityWashTargetEntity.java @@ -0,0 +1,124 @@ +package com.iailab.module.pms.coalquality.modules.wash.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("t_quality_wash_target") +public class QualityWashTargetEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + + /** + * 年月 + */ + private String ny; + + /** + * 煤种 + */ + private String mz; + + /** + * 用煤单位 + */ + private String ymdw; + + /** + * 产品量 + */ + private BigDecimal cpl; + + /** + * 原煤水分Mt% + */ + private BigDecimal ymSf; + + /** + * 原煤灰分Ad% + */ + private BigDecimal ymHf; + + /** + * 原煤硫份St,d% + */ + private BigDecimal ymLf; + + /** + * 精煤水分Mt% + */ + private BigDecimal jmSf; + + /** + * 精煤灰分Ad% + */ + private BigDecimal jmHf; + + /** + * 精煤硫份St,d% + */ + private BigDecimal jmLf; + + /** + * 精煤挥发分Vdaf% + */ + private BigDecimal jmHff; + + /** + * 精煤粘结GR.I + */ + private BigDecimal jmNj; + + /** + * 精煤胶质层Y(㎜)GR.I + */ + private BigDecimal jmJzc; + + /** + * 中煤灰分Ad% + */ + private BigDecimal zmHf; + + /** + * 中煤硫份St,d% + */ + private BigDecimal zmLf; + + /** + * 矸石灰分Ad% + */ + private BigDecimal gsHf; + + /** + * 创建人 + */ + private String creator; + + /** + * 创建时间 + */ + private java.util.Date createDate; + + /** + * 修改人 + */ + private String updater; + + /** + * 修改时间 + */ + private java.util.Date updateDate; + +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/QualityWashTargetService.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/QualityWashTargetService.java new file mode 100644 index 0000000..5e08ca0 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/QualityWashTargetService.java @@ -0,0 +1,26 @@ +package com.iailab.module.pms.coalquality.modules.wash.service; + + +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.BaseService; +import com.iailab.module.pms.coalquality.modules.wash.dto.QualityWashTargetDTO; +import com.iailab.module.pms.coalquality.modules.wash.entity.QualityWashTargetEntity; +import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月12日 13:35:00 + */ +public interface QualityWashTargetService extends BaseService<QualityWashTargetEntity> { + + PageResult<QualityWashTargetDTO> page(WashTargetPageReqVO washTargetPageReqVO); + + QualityWashTargetDTO get(String id); + + void save(QualityWashTargetDTO dto); + + void update(QualityWashTargetDTO dto); + + void delete(String[] ids); +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/impl/QualityWashTargetServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/impl/QualityWashTargetServiceImpl.java new file mode 100644 index 0000000..3e58321 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/service/impl/QualityWashTargetServiceImpl.java @@ -0,0 +1,78 @@ +package com.iailab.module.pms.coalquality.modules.wash.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.iailab.framework.common.pojo.PageResult; +import com.iailab.framework.common.service.impl.BaseServiceImpl; +import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.pms.coalquality.modules.wash.dao.QualityWashTargetDao; +import com.iailab.module.pms.coalquality.modules.wash.dto.QualityWashTargetDTO; +import com.iailab.module.pms.coalquality.modules.wash.entity.QualityWashTargetEntity; +import com.iailab.module.pms.coalquality.modules.wash.service.QualityWashTargetService; +import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.Map; + +/** + * @author PanZhibao + * @Description + * @createTime 2023年12月12日 13:36:00 + */ +@Service +public class QualityWashTargetServiceImpl extends BaseServiceImpl<QualityWashTargetDao, QualityWashTargetEntity> + implements QualityWashTargetService { + + @Override + public PageResult<QualityWashTargetDTO> page(WashTargetPageReqVO washTargetPageReqVO) { + + PageResult<QualityWashTargetEntity> page = baseDao.selectPage(washTargetPageReqVO); + + return BeanUtils.toBean(page, QualityWashTargetDTO.class); + } + + private QueryWrapper<QualityWashTargetEntity> getWrapper(Map<String, Object> params){ + String code = (String)params.get("code"); + String cyrq = (String)params.get("cyrq"); + + QueryWrapper<QualityWashTargetEntity> wrapper = new QueryWrapper<>(); + wrapper.like(StringUtils.isNotBlank(code), "code", code) + .eq(StringUtils.isNotBlank(cyrq), "cyrq", cyrq); + + return wrapper; + } + + @Override + public QualityWashTargetDTO get(String id) { + QualityWashTargetEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, QualityWashTargetDTO.class); + } + + @Override + public void save(QualityWashTargetDTO dto) { + QualityWashTargetEntity entity = ConvertUtils.sourceToTarget(dto, QualityWashTargetEntity.class); + entity.setCreateDate(new Date()); +// entity.setCreator(SecurityUser.getUserId().toString()); + insert(entity); + } + + @Override + public void update(QualityWashTargetDTO dto) { + QualityWashTargetEntity entity = ConvertUtils.sourceToTarget(dto, QualityWashTargetEntity.class); + entity.setUpdateDate(new Date()); +// entity.setUpdater(SecurityUser.getUserId().toString()); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteByIds(Arrays.asList(ids)); + } +} diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/vo/WashTargetPageReqVO.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/vo/WashTargetPageReqVO.java new file mode 100644 index 0000000..50e1abc --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/vo/WashTargetPageReqVO.java @@ -0,0 +1,29 @@ +package com.iailab.module.pms.coalquality.modules.wash.vo; + +import com.iailab.framework.common.pojo.PageParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +/** + * 原子指标 + * + * @author PanZhibao + * @Description + * @createTime 2024年09月11日 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WashTargetPageReqVO extends PageParam { + + /** + * 流水号 + */ + private String code; + + /** + * 年月 + */ + private String ny; +} \ No newline at end of file diff --git a/iailab-xmc-pms-biz/src/main/resources/application-dev.yaml b/iailab-xmc-pms-biz/src/main/resources/application-dev.yaml index b57298a..c5ccb68 100644 --- a/iailab-xmc-pms-biz/src/main/resources/application-dev.yaml +++ b/iailab-xmc-pms-biz/src/main/resources/application-dev.yaml @@ -35,7 +35,7 @@ primary: master datasource: master: - url: jdbc:mysql://172.16.8.100:3306/iailab_xmc_pms?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/iailab_xmc_pms?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 username: root password: 123456 slave: # 模拟从库,可根据自己需要修改 diff --git a/iailab-xmc-pms-biz/src/main/resources/application.yaml b/iailab-xmc-pms-biz/src/main/resources/application.yaml index 531c719..48e79da 100644 --- a/iailab-xmc-pms-biz/src/main/resources/application.yaml +++ b/iailab-xmc-pms-biz/src/main/resources/application.yaml @@ -152,6 +152,17 @@ - qrtz_triggers - schedule_job - schedule_job_log + - t_coal_wash_curves + - t_coal_analysis_full_det + - t_coal_analysis_full + - t_coal_wash_curves_chart + - t_coal_wash_curves_det + - t_coal_wash_curves + - t_quality_wash_target + - t_quality_detection + - t_quality_medium + - t_quality_quick_detection + - t_quality_tailing swagger: title: 选煤厂生产管理平台 description: 选煤厂生产管理平台 -- Gitblit v1.9.3