Browse Source

电子教学日志查询接口

小么熊🐻 1 year ago
parent
commit
171af414a4

+ 16 - 1
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/TmsStudentInfoController.java

@@ -101,6 +101,7 @@ public class TmsStudentInfoController extends BaseController {
                 studentInfoDTO.setSchoolId(coachManySchool.getSchoolIds());
             }
         }
+        studentInfoDTO.setCoachId(null);
         List<TmsStudentInfoVo> stuInfoList = studentInfoService.getTmsStudentInfoList(studentInfoDTO);
         return toResponsePageInfo(stuInfoList);
     }
@@ -266,7 +267,21 @@ public class TmsStudentInfoController extends BaseController {
     }
 
 
-
+    /**
+     * 根据学员id和classId获取电子教学日志照片
+     * @return
+     */
+    @GetMapping("/getTmsStudentPhotoById")
+    @ApiOperation("根据学员id和classId获取电子教学日志照片")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO) {
+        startPage();
+        List<TmsStudentPhotoVo> studentPhotoList = studentInfoService.getTmsStudentPhotoById(studentInfoPhotoDTO);
+        return toResponsePageInfo(studentPhotoList);
+    }
 
 
 }

+ 23 - 0
jsjp-service/src/main/java/com/miaxis/tms/dto/TmsStudentInfoPhotoDTO.java

@@ -0,0 +1,23 @@
+package com.miaxis.tms.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+@Data
+public class TmsStudentInfoPhotoDTO implements Serializable {
+
+
+    @ApiModelProperty(value = "学员ID",required = true)
+    private Long id;
+
+    @ApiModelProperty(value = "地区编号",required = true)
+    private String city;
+
+    @ApiModelProperty(value = "课堂ID",required = true)
+    private String classId;
+
+
+}

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/mapper/TmsStudentInfoMapper.java

@@ -53,4 +53,6 @@ public interface TmsStudentInfoMapper extends BaseMapper<TmsStudentInfoVo> {
     TmsStudentInfoIdVo getTzTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO);
 
     List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO);
+
+    List<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO);
 }

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/ITmsStudentInfoService.java

@@ -43,4 +43,6 @@ public interface ITmsStudentInfoService extends IService<TmsStudentInfoVo> {
     TmsStudentInfoIdVo getTmsStudentInfoApplyById(TmsStudentInfoApplyIdDTO studentInfoApplyIdDTO);
 
     List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO);
+
+    List<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO);
 }

+ 5 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsStudentInfoServiceImpl.java

@@ -227,4 +227,9 @@ public class TmsStudentInfoServiceImpl extends ServiceImpl<TmsStudentInfoMapper,
     }
 
 
+    @Override
+    public List<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO) {
+        return mapper.getTmsStudentPhotoById(studentInfoPhotoDTO);
+    }
+
 }

+ 41 - 0
jsjp-service/src/main/java/com/miaxis/tms/vo/TmsStudentPhotoVo.java

@@ -0,0 +1,41 @@
+package com.miaxis.tms.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户对象 user_info
+ *
+ * @author miaxis
+ * @date 2021-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "TmsStudentPhotoVo", description = "学员课堂照片")
+public class TmsStudentPhotoVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "上传时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date ptime;
+
+    @ApiModelProperty(value = "事件17:签到;18:签退;19:培训过程 ")
+    private String event;
+
+    @ApiModelProperty(value = "上传照片")
+    private String filepath;
+
+
+
+
+
+
+}

+ 10 - 1
jsjp-service/src/main/java/com/miaxis/tms/vo/TmsStudentTeachLogVo.java

@@ -47,10 +47,19 @@ public class TmsStudentTeachLogVo implements Serializable {
     @ApiModelProperty(value = "教练车牌")
     private String carLicnum;
 
-
     @ApiModelProperty(value = "终端卡号")
     private String sim;
 
+    @ApiModelProperty(value = "监管审核 0审核通过 1审核不通过  2待审核")
+    private String auditResult;
+
+    @ApiModelProperty(value = "备案状态 1备案成功 0未备案  其他:备案失败")
+    private String recordStatus;
+
+    @ApiModelProperty(value = "监管复核结果")
+    private String auditReason;
 
+    @ApiModelProperty(value = "课程ID")
+    private String classid;
 
 }

+ 17 - 4
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -95,7 +95,7 @@
         <result property="loginFlag" column="LSL_LOGIN_FLAG" />
     </resultMap>
 
-    <resultMap id="TmsStudentTeahLogResultMap" type="com.miaxis.tms.vo.TmsStudentTeachLogVo">
+    <resultMap id="TmsStudentTeachLogResultMap" type="com.miaxis.tms.vo.TmsStudentTeachLogVo">
         <result property="recnum" column="CRI_RECNUM" />
         <result property="pxlxName" column="PXLX_NAME" />
         <result property="mile" column="MILE" />
@@ -106,7 +106,11 @@
         <result property="endTime" column="CRI_ENDTIME" />
         <result property="coachName" column="COACH_NAME" />
         <result property="carLicnum" column="CAR_LICNUM" />
-        <result property="sim" column="TSO_REMARK" />
+        <result property="sim" column="SIM" />
+        <result property="auditResult" column="CRI_AUDIT_RESULT" />
+        <result property="recordStatus" column="CRI_RECORD_STATUS" />
+        <result property="classid" column="CRI_CLASSID" />
+        <result property="auditReason" column="CRI_AUDIT_REASON" />
     </resultMap>
 
 
@@ -518,12 +522,12 @@
     </update>
 
 
-    <select id="getTmsStudentTeachLogById" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentTeahLogResultMap"  >
+    <select id="getTmsStudentTeachLogById" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentTeachLogResultMap"  >
         SELECT  CRI_RECNUM,DECODE(SUBSTR(T.CRI_SUBJCODE,0,1),1,'实操',2,'课堂教学',3,'模拟器教学',4,'远程教学','') PXLX_NAME,
                 round(t.cri_mileage/1000,3) as mile,
                 t.cri_duration,t.cri_vaild_time,CRI_TRAIN_SUBJECT,
                 t.cri_starttime,t.cri_endtime,c.TCI_NAME COACH_NAME,
-                car.tco_licnum CAR_LICNUM,t.cri_device_id sim
+                car.tco_licnum CAR_LICNUM,t.cri_device_id sim,t.CRI_AUDIT_RESULT,t.CRI_RECORD_STATUS,T.CRI_CLASSID,CRI_AUDIT_REASON
         FROM TMS_TRAIN_CLASS_RECORD@tms${city} T LEFT JOIN TMS_SCHOOL_INFO@tms${city} S ON T.CRI_SCHOOL_ID = S.TSI_ID
                                       LEFT JOIN TMS_STUDENT_INFO@tms${city} STU ON T.CRI_STUDENT_ID = STU.TSO_ID
                                       LEFT JOIN TMS_COACH_INFO@tms${city} C ON T.CRI_COACH_ID = C.TCI_ID
@@ -533,4 +537,13 @@
     </select>
 
 
+    <select id="getTmsStudentPhotoById" parameterType="com.miaxis.tms.dto.TmsStudentInfoPhotoDTO" resultType="com.miaxis.tms.vo.TmsStudentPhotoVo"  >
+        SELECT T.EVENT,T.FILEPATH,T.PTIME FROM TMS_TRAIN_FILE_INFO@tms${city} T WHERE T.type =1 and is_del=0  and is_show=0
+                                                                               AND T.STU_ID = #{id}
+                                                                               AND T.CLASSID =  #{classId}
+        ORDER BY T.PTIME DESC
+
+    </select>
+
+
 </mapper>