Browse Source

token 认证

zjs 1 week ago
parent
commit
141002fa23

+ 2 - 1
src/main/java/com/cn/esermis/controller/DataAcquisitionInstrumentController.java

@@ -47,6 +47,7 @@ public class DataAcquisitionInstrumentController {
47
     {
47
     {
48
         IPage<DataAcquisitionInstrument> page = new Page<>(vo.getPageNum(), vo.getPageSize());
48
         IPage<DataAcquisitionInstrument> page = new Page<>(vo.getPageNum(), vo.getPageSize());
49
         QueryWrapper<DataAcquisitionInstrument> wrapper = new QueryWrapper<>();
49
         QueryWrapper<DataAcquisitionInstrument> wrapper = new QueryWrapper<>();
50
+        wrapper.orderByDesc("department_code");
50
         IPage<DataAcquisitionInstrument> pageList = dataAcquisitionInstrumentService.page(page, wrapper);
51
         IPage<DataAcquisitionInstrument> pageList = dataAcquisitionInstrumentService.page(page, wrapper);
51
         IPage<DataAcquisitionInstrumentVo> volits = new Page<>();
52
         IPage<DataAcquisitionInstrumentVo> volits = new Page<>();
52
         if (!pageList.getRecords().isEmpty()){
53
         if (!pageList.getRecords().isEmpty()){
@@ -191,7 +192,7 @@ public class DataAcquisitionInstrumentController {
191
                     List<DetectMonitoringFactor> detectMonitoringFactors = x.getDetectMonitoringFactors();
192
                     List<DetectMonitoringFactor> detectMonitoringFactors = x.getDetectMonitoringFactors();
192
                     detectMonitoringFactors.forEach(y->{
193
                     detectMonitoringFactors.forEach(y->{
193
                         y.setAnalyticalInstrumentId(analyticalInstruments.getId());
194
                         y.setAnalyticalInstrumentId(analyticalInstruments.getId());
194
-
195
+                        y.setDataAcquisitionInstrumentId(dataAcquisitionInstrument.getId());
195
                         boolean save2 = detectMonitoringFactorService.save(y);
196
                         boolean save2 = detectMonitoringFactorService.save(y);
196
                         if (!save2){
197
                         if (!save2){
197
                             throw new RuntimeException("添加失败");
198
                             throw new RuntimeException("添加失败");

+ 3 - 3
src/main/java/com/cn/esermis/dpld/entity/DataAcquisitionInstrument.java

@@ -104,15 +104,15 @@ public class DataAcquisitionInstrument {
104
      * 排气筒温度
104
      * 排气筒温度
105
      */
105
      */
106
     @TableField(value = "exhaust_temperature")
106
     @TableField(value = "exhaust_temperature")
107
-    private BigDecimal exhaustTemperature;
107
+    private String exhaustTemperature;
108
     /**
108
     /**
109
      * 排气筒高度
109
      * 排气筒高度
110
      */
110
      */
111
     @TableField(value = "exhaust_height")
111
     @TableField(value = "exhaust_height")
112
-    private BigDecimal exhaustHeight;
112
+    private String exhaustHeight;
113
     /**
113
     /**
114
      * 排气筒直径
114
      * 排气筒直径
115
      */
115
      */
116
     @TableField(value = "exhaust_diameter")
116
     @TableField(value = "exhaust_diameter")
117
-    private BigDecimal exhaustDiameter;
117
+    private String exhaustDiameter;
118
 }
118
 }

+ 2 - 1
src/main/java/com/cn/esermis/dpld/model/DataAcquisitionInstrumentVo.java

@@ -4,6 +4,7 @@ import com.cn.esermis.dpld.entity.DataAcquisitionInstrument;
4
 import lombok.Data;
4
 import lombok.Data;
5
 import lombok.EqualsAndHashCode;
5
 import lombok.EqualsAndHashCode;
6
 
6
 
7
+import java.util.ArrayList;
7
 import java.util.List;
8
 import java.util.List;
8
 
9
 
9
 
10
 
@@ -11,7 +12,7 @@ import java.util.List;
11
 @Data
12
 @Data
12
 public class DataAcquisitionInstrumentVo extends DataAcquisitionInstrument {
13
 public class DataAcquisitionInstrumentVo extends DataAcquisitionInstrument {
13
 
14
 
14
-   private List<AnalyticalInstrumentsVo> analyticalInstruments;
15
+   private List<AnalyticalInstrumentsVo> analyticalInstruments = new ArrayList<>();
15
 
16
 
16
    private Integer pageNum;
17
    private Integer pageNum;
17
 
18