Przeglądaj źródła

Merge branch 'energy-manage-chy'

chenhongyan1989 5 miesięcy temu
rodzic
commit
5720f01801

+ 0 - 2
energy-manage-service/src/main/java/com/energy/manage/service/controller/chartsdata/CreateChartsDataController.java

@@ -11,8 +11,6 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * @author chy
  * @date 2024/8/15 09:31

+ 40 - 0
energy-manage-service/src/main/java/com/energy/manage/service/controller/datatransfertype/DataTransferTypeController.java

@@ -0,0 +1,40 @@
+package com.energy.manage.service.controller.datatransfertype;
+
+import com.energy.manage.common.reponse.ResultResp;
+import com.energy.manage.service.config.annotations.UserLoginToken;
+import com.energy.manage.service.controller.base.BaseServiceController;
+import com.energy.manage.service.domain.vo.datatransfer.DataTransferTypeVo;
+import com.energy.manage.service.service.datatransfertype.DataTransferTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author chy
+ * @date 2025/1/7 10:46
+ * @desc
+ */
+@Slf4j
+@Api(value = "DataTransferTypeController",tags = "数据转换类型")
+@RestController
+@RequestMapping("/dataTransferType")
+public class DataTransferTypeController extends BaseServiceController {
+
+    @Autowired
+    private DataTransferTypeService dataTransferTypeService;
+
+
+    @ApiOperation(value = "查询可以数据转换批次")
+    @UserLoginToken
+    @GetMapping("/queryAllType")
+    public ResultResp<List<DataTransferTypeVo>> queryAllType()
+    {
+        return success(dataTransferTypeService.queryAllType());
+    }
+}

+ 19 - 0
energy-manage-service/src/main/java/com/energy/manage/service/service/datatransfertype/DataTransferTypeService.java

@@ -0,0 +1,19 @@
+package com.energy.manage.service.service.datatransfertype;
+
+import com.energy.manage.service.domain.vo.datatransfer.DataTransferTypeVo;
+
+import java.util.List;
+
+/**
+ * @author chy
+ * @date 2025/1/7 10:51
+ * @desc
+ */
+public interface DataTransferTypeService {
+
+    /**
+     * 查询所有数据转换类型
+     * @return
+     */
+    List<DataTransferTypeVo> queryAllType();
+}

+ 33 - 0
energy-manage-service/src/main/java/com/energy/manage/service/service/datatransfertype/impl/DataTransferTypeServiceImpl.java

@@ -0,0 +1,33 @@
+package com.energy.manage.service.service.datatransfertype.impl;
+
+import com.energy.manage.service.domain.vo.datatransfer.DataTransferTypeVo;
+import com.energy.manage.service.mappers.datatransfertype.DataTransferTypeMapper;
+import com.energy.manage.service.service.datatransfertype.DataTransferTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author chy
+ * @date 2025/1/7 10:52
+ * @desc
+ */
+
+@Service
+public class DataTransferTypeServiceImpl implements DataTransferTypeService {
+
+    @Autowired
+    private DataTransferTypeMapper dataTransferTypeMapper;
+
+
+    /**
+     * 查询所有数据转换类型
+     *
+     * @return
+     */
+    @Override
+    public List<DataTransferTypeVo> queryAllType() {
+        return dataTransferTypeMapper.selectAllInfo();
+    }
+}

+ 0 - 1
energy-manage-service/src/main/java/com/energy/manage/service/service/homepage/impl/HomePageServiceImpl.java

@@ -2,7 +2,6 @@ package com.energy.manage.service.service.homepage.impl;
 
 import com.energy.manage.common.enums.TypeRelationEnum;
 import com.energy.manage.common.po.windrelation.WindRelationPO;
-import com.energy.manage.service.constant.analysis.AnalysisConstants;
 import com.energy.manage.service.constant.analysis.AnalysisStatusConstants;
 import com.energy.manage.service.domain.vo.analysis.AnalysisOptionRecordsVo;
 import com.energy.manage.service.domain.vo.analysis.AnalysisResultVo;

+ 6 - 0
energy-manage-service/src/main/resources/mybatis/analysis/AnalysisResultMapper.xml

@@ -40,6 +40,12 @@
         <if test="fieldName != null and fieldName != ''">
             and batch.field_name like concat('%', #{fieldName,jdbcType=VARCHAR}, '%')
         </if>
+        <if test="analysisState != null">
+            and result.analysis_state = #{analysisState}
+        </if>
+        <if test="errState != null">
+            and result.err_state = #{errState}
+        </if>
         order by result.update_time desc
     </select>