Ver código fonte

//细节调整

wyj0522 1 semana atrás
pai
commit
7f99ae1f6a

+ 9 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/EvaluationIndicatorController.java

@@ -2,6 +2,8 @@ package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.cn.fdapfe.biz.domain.Formulas;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -45,6 +47,13 @@ public class EvaluationIndicatorController extends BaseController
         List<EvaluationIndicator> list = evaluationIndicatorService.selectEvaluationIndicatorList(evaluationIndicator);
         return getDataTable(list);
     }
+    @PreAuthorize("@ss.hasPermi('eval:indicator:list')")
+    @GetMapping("/getoptions")
+    public TableDataInfo getoptions(Formulas formulas)
+    {
+        List<Formulas> list = evaluationIndicatorService.getoptions(formulas);
+        return getDataTable(list);
+    }
 
     /**
      * 导出评估指标体系管理列表

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FormulasController.java

@@ -46,6 +46,13 @@ public class FormulasController extends BaseController
         List<Formulas> list = formulasService.selectFormulasList(formulas);
         return getDataTable(list);
     }
+    @PreAuthorize("@ss.hasPermi('eval:formulas:list')")
+    @GetMapping("/getoptions")
+    public TableDataInfo getoptions(Formulas formulas)
+    {
+        List<Formulas> list = formulasService.getoptions(formulas);
+        return getDataTable(list);
+    }
 
     /**
      * 导出公式管理管理列表

+ 2 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/EvaluationIndicatorMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.cn.fdapfe.biz.domain.EvaluationIndicator;
+import com.cn.fdapfe.biz.domain.Formulas;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -16,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
 public interface EvaluationIndicatorMapper  extends BaseMapper<EvaluationIndicator>
 {
 
+    List<Formulas> getoptions();
 }

+ 1 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FormulasMapper.java

@@ -14,4 +14,5 @@ import com.cn.fdapfe.biz.domain.Formulas;
 public interface FormulasMapper extends BaseMapper<Formulas>
 {
 
+    List<Formulas> getoptions();
 }

+ 3 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IEvaluationIndicatorService.java

@@ -2,6 +2,7 @@ package com.cn.fdapfe.biz.service;
 
 import java.util.List;
 import com.cn.fdapfe.biz.domain.EvaluationIndicator;
+import com.cn.fdapfe.biz.domain.Formulas;
 
 /**
  * 评估指标体系管理Service接口
@@ -58,4 +59,6 @@ public interface IEvaluationIndicatorService
      * @return 结果
      */
      int deleteEvaluationIndicatorById(String id);
+
+    List<Formulas> getoptions(Formulas formulas);
 }

+ 1 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFormulasService.java

@@ -51,4 +51,5 @@ public interface IFormulasService
      */
      int deleteFormulasByIds(String[] ids);
 
+    List<Formulas> getoptions(Formulas formulas);
 }

+ 7 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/EvaluationIndicatorServiceImpl.java

@@ -2,9 +2,11 @@ package com.cn.fdapfe.biz.service.impl;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.cn.fdapfe.biz.domain.Formulas;
 import com.cn.fdapfe.common.utils.DateUtils;
 import com.cn.fdapfe.common.utils.SecurityUtils;
 import com.cn.fdapfe.common.utils.StringUtils;
@@ -107,4 +109,9 @@ public class EvaluationIndicatorServiceImpl implements IEvaluationIndicatorServi
     {
         return evaluationIndicatorMapper.deleteById(id);
     }
+
+    @Override
+    public List<Formulas> getoptions(Formulas formulas) {
+        return evaluationIndicatorMapper.getoptions();
+    }
 }

+ 5 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FormulasServiceImpl.java

@@ -114,6 +114,11 @@ public class FormulasServiceImpl implements IFormulasService
         return ids!=null && ids.length == 1 ? formulasMapper.deleteById(ids[0]): formulasMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+    @Override
+    public List<Formulas> getoptions(Formulas formulas) {
+        return formulasMapper.getoptions();
+    }
+
     /**
      * 根据公式生成存储过程
      * @param procName

+ 3 - 0
fdapfe-admin/src/main/resources/mapper/eval/EvaluationIndicatorMapper.xml

@@ -18,4 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectEvaluationIndicatorVo">
         select id, name, biz_params, remark, create_by, create_time, update_by, update_time from biz_evaluation_indicator
     </sql>
+    <select id="getoptions" resultType="com.cn.fdapfe.biz.domain.EvaluationIndicator">
+        SELECT t.id,t.name FROM biz_evaluation_indicator t
+    </select>
 </mapper>

+ 3 - 0
fdapfe-admin/src/main/resources/mapper/eval/FormulasMapper.xml

@@ -21,5 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectFormulasVo">
         select formula_id, formula_name, formula_short_name,formula_stored_procedure, original_formula,formula_indicator,remark, create_by, create_time, update_by, update_time from biz_formula_t
     </sql>
+    <select id="getoptions" resultType="com.cn.fdapfe.biz.domain.Formulas">
+        SELECT t.formula_id,t.formula_name FROM biz_formula_t t
+    </select>
 
 </mapper>