ソースを参照

添加2个option接口

allen 11 ヶ月 前
コミット
088218988f

+ 5 - 0
meas-system/src/main/java/com/meas/system/controller/MeasBatchController.java

@@ -95,4 +95,9 @@ public class MeasBatchController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(measBatchService.deleteMeasBatchByIds(ids));
     }
+
+    @GetMapping("/getOption/{engineId}")
+    public AjaxResult getOption(@PathVariable Long engineId){
+        return success(measBatchService.getOption(engineId));
+    }
 }

+ 5 - 0
meas-system/src/main/java/com/meas/system/controller/MeasEngineModelController.java

@@ -95,4 +95,9 @@ public class MeasEngineModelController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(measEngineModelService.deleteMeasEngineModelByIds(ids));
     }
+
+    @GetMapping("/getOption")
+    public AjaxResult getOption(){
+        return success(measEngineModelService.getOption());
+    }
 }

+ 3 - 0
meas-system/src/main/java/com/meas/system/mapper/MeasBatchMapper.java

@@ -3,6 +3,7 @@ package com.meas.system.mapper;
 import com.meas.system.domain.MeasBatch;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 测量批次Mapper接口
@@ -58,4 +59,6 @@ public interface MeasBatchMapper {
      * @return 结果
      */
     public int deleteMeasBatchByIds(Long[] ids);
+
+    List<Map> getOption(Long engineId);
 }

+ 3 - 0
meas-system/src/main/java/com/meas/system/mapper/MeasEngineModelMapper.java

@@ -3,6 +3,7 @@ package com.meas.system.mapper;
 import com.meas.system.domain.MeasEngineModel;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发动机型号Mapper接口
@@ -58,4 +59,6 @@ public interface MeasEngineModelMapper {
      * @return 结果
      */
     public int deleteMeasEngineModelByIds(Long[] ids);
+
+    List<Map> getOption();
 }

+ 4 - 0
meas-system/src/main/java/com/meas/system/service/IMeasBatchService.java

@@ -3,6 +3,7 @@ package com.meas.system.service;
 import com.meas.system.domain.MeasBatch;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 测量批次Service接口
@@ -58,4 +59,7 @@ public interface IMeasBatchService {
      * @return 结果
      */
     public int deleteMeasBatchById(Long id);
+
+    List<Map> getOption(Long engineId);
+
 }

+ 2 - 0
meas-system/src/main/java/com/meas/system/service/IMeasEngineModelService.java

@@ -3,6 +3,7 @@ package com.meas.system.service;
 import com.meas.system.domain.MeasEngineModel;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发动机型号Service接口
@@ -59,4 +60,5 @@ public interface IMeasEngineModelService {
      */
     public int deleteMeasEngineModelById(Long id);
 
+    List<Map> getOption();
 }

+ 6 - 0
meas-system/src/main/java/com/meas/system/service/impl/MeasBatchServiceImpl.java

@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 测量批次Service业务层处理
@@ -87,4 +88,9 @@ public class MeasBatchServiceImpl implements IMeasBatchService {
     public int deleteMeasBatchById(Long id) {
         return measBatchMapper.deleteMeasBatchById(id);
     }
+
+    @Override
+    public List<Map> getOption(Long engineId) {
+        return measBatchMapper.getOption(engineId);
+    }
 }

+ 6 - 0
meas-system/src/main/java/com/meas/system/service/impl/MeasEngineModelServiceImpl.java

@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发动机型号Service业务层处理
@@ -87,4 +88,9 @@ public class MeasEngineModelServiceImpl implements IMeasEngineModelService {
     public int deleteMeasEngineModelById(Long id) {
         return measEngineModelMapper.deleteMeasEngineModelById(id);
     }
+
+    @Override
+    public List<Map> getOption() {
+        return measEngineModelMapper.getOption();
+    }
 }

+ 4 - 0
meas-system/src/main/resources/mapper/meas/MeasBatchMapper.xml

@@ -78,4 +78,8 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOption" resultType="Map">
+        select id,measurement_batch from meas_batch where engine_id = #{engineId} order by id asc
+    </select>
 </mapper>

+ 4 - 0
meas-system/src/main/resources/mapper/meas/MeasEngineModelMapper.xml

@@ -82,4 +82,8 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOption" resultType="Map">
+        select id,model from meas_engine_model order by id asc
+    </select>
 </mapper>