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 48
         IPage<DataAcquisitionInstrument> page = new Page<>(vo.getPageNum(), vo.getPageSize());
49 49
         QueryWrapper<DataAcquisitionInstrument> wrapper = new QueryWrapper<>();
50
+        wrapper.orderByDesc("department_code");
50 51
         IPage<DataAcquisitionInstrument> pageList = dataAcquisitionInstrumentService.page(page, wrapper);
51 52
         IPage<DataAcquisitionInstrumentVo> volits = new Page<>();
52 53
         if (!pageList.getRecords().isEmpty()){
@@ -191,7 +192,7 @@ public class DataAcquisitionInstrumentController {
191 192
                     List<DetectMonitoringFactor> detectMonitoringFactors = x.getDetectMonitoringFactors();
192 193
                     detectMonitoringFactors.forEach(y->{
193 194
                         y.setAnalyticalInstrumentId(analyticalInstruments.getId());
194
-
195
+                        y.setDataAcquisitionInstrumentId(dataAcquisitionInstrument.getId());
195 196
                         boolean save2 = detectMonitoringFactorService.save(y);
196 197
                         if (!save2){
197 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 106
     @TableField(value = "exhaust_temperature")
107
-    private BigDecimal exhaustTemperature;
107
+    private String exhaustTemperature;
108 108
     /**
109 109
      * 排气筒高度
110 110
      */
111 111
     @TableField(value = "exhaust_height")
112
-    private BigDecimal exhaustHeight;
112
+    private String exhaustHeight;
113 113
     /**
114 114
      * 排气筒直径
115 115
      */
116 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 4
 import lombok.Data;
5 5
 import lombok.EqualsAndHashCode;
6 6
 
7
+import java.util.ArrayList;
7 8
 import java.util.List;
8 9
 
9 10
 
@@ -11,7 +12,7 @@ import java.util.List;
11 12
 @Data
12 13
 public class DataAcquisitionInstrumentVo extends DataAcquisitionInstrument {
13 14
 
14
-   private List<AnalyticalInstrumentsVo> analyticalInstruments;
15
+   private List<AnalyticalInstrumentsVo> analyticalInstruments = new ArrayList<>();
15 16
 
16 17
    private Integer pageNum;
17 18