ly 11 месяцев назад
Родитель
Сommit
5fb64ee011

+ 10 - 0
master/src/main/java/com/ruoyi/framework/config/RuoYiConfig.java

@@ -32,6 +32,8 @@ public class RuoYiConfig
 
     private String requestJumpPath;
 
+    private String imagePath;
+
     public String getRequestJumpPath() {
         return requestJumpPath;
     }
@@ -100,6 +102,14 @@ public class RuoYiConfig
         RuoYiConfig.addressEnabled = addressEnabled;
     }
 
+    public String getImagePath() {
+        return imagePath;
+    }
+
+    public void setImagePath(String imagePath) {
+        this.imagePath = imagePath;
+    }
+
     /**
      * 获取头像上传路径
      */

+ 7 - 3
master/src/main/java/com/ruoyi/project/production/controller/TFurnancePressureController.java

@@ -43,6 +43,8 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
+
 /**
  * 裂解炉炉管测压Controller
  *
@@ -56,12 +58,14 @@ public class TFurnancePressureController extends BaseController
     @Autowired
     private ITFurnancePressureService tFurnancePressureService;
 
-    @Autowired
+    @Resource
     private TFurnancePressureMapper tFurnancePressureMapper;
 
     @Autowired
     private ITCommonfileService tCommonfileService;
-
+    //系统基础配置
+    @Autowired
+    private RuoYiConfig ruoyiConfig;
     /**
      * 查询通用附件列表
      */
@@ -97,7 +101,7 @@ public class TFurnancePressureController extends BaseController
             case "H130": num = isInlet ? 1 : 2; break;
         }
 //        // 调用图片识别接口
-        String goodsUrl = "http://cpms.v6.idcfengye.com/detection_web";
+        String goodsUrl = this.ruoyiConfig.getImagePath();
         //本地文件位置
 //        String fileName = "E:\\image.jpg";
         String str = null;

+ 2 - 0
master/src/main/resources/application.yml

@@ -12,6 +12,8 @@ ruoyi:
   profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/cpms/index.html#,服务器:http://47.114.101.16:8080/cpms/index.html# https://cpms.basf-ypc.net.cn/cpms/index.html#)
   requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
+  # 图像识别地址
+  imagePath: http://cpms.v6.idcfengye.com/detection_web
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证

+ 5 - 1
master/src/main/resources/mybatis/training/TTrainingbccDeviceMapper.xml

@@ -27,10 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectTTrainingbccDeviceVo">
         select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time from t_trainingbcc_device d
        left join t_staffmgr s on s.staffid = d.staff_id
+
 </sql>
 
     <select id="selectTTrainingbccDeviceList" parameterType="TTrainingbccDevice" resultMap="TTrainingbccDeviceResult">
-        <include refid="selectTTrainingbccDeviceVo"/>
+        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time from t_trainingbcc_device d
+        left join t_staffmgr s on s.staffid = d.staff_id
+        left join t_trainingbcc t on t.id = d.regular_id and t.DEL_FLAG = 0
         <where>
             <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
             <if test="regularId != null "> and regular_id = #{regularId}</if>
@@ -45,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examState != null "> and exam_state = #{examState}</if>
             <if test="examId != null "> and exam_id = #{examId}</if>
             <if test="learnTime != null "> and learn_time = #{learnTime}</if>
+            <if test="trainingType != null and trainingType != ''">and t.training_type = #{trainingType}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->

+ 1 - 1
ui/src/views/training/elearn/qu/index.vue

@@ -70,7 +70,7 @@
           <span v-else-if="scope.row.quType == 3" size="small" type="success">判断题</span>
         </template>
       </el-table-column>
-      <el-table-column label="题目内容" align="center" prop="content"  :show-overflow-tooltip="true"/>
+      <el-table-column label="题目内容" align="left" prop="content"  :show-overflow-tooltip="true"/>
       <el-table-column label="创建时间" align="center" prop="createdate" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>

+ 2 - 2
ui/src/views/training/trainingbcc/index.vue

@@ -128,7 +128,7 @@
           icon="el-icon-document"
           size="mini"
           @click="handleDevice"
-        >{{ $t('装置级培训记录') }}
+        >装置级培训记录
         </el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -309,7 +309,7 @@
             <el-form-item :label="$t('年份')" prop="years">
               <el-date-picker clearable size="small" style="width: 200px"
                               v-model="form.years"
-                              type="years"
+                              type="year"
                               value-format="yyyy"
                               @change="handleStaff"
                               :placeholder="$t('请选择') + $t('年份')">