소스 검색

添加电子教学日志

小么熊🐻 1 년 전
부모
커밋
8ac0758f0d

+ 20 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/TmsStudentInfoController.java

@@ -243,6 +243,26 @@ public class TmsStudentInfoController extends BaseController {
     }
 
 
+    /**
+     * 根据学员id获取电子教练日志
+     * @return
+     */
+    @GetMapping("/getTmsStudentTeachLogById")
+    @ApiOperation("根据学员id获取电子教学日志")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO) {
+        startPage();
+        List<TmsStudentTeachLogVo> teachLogVoList = studentInfoService.getTmsStudentTeachLogById(studentInfoIdDTO);
+        return toResponsePageInfo(teachLogVoList);
+    }
+
+
+
+
+
 }
 
 

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

@@ -51,4 +51,6 @@ public interface TmsStudentInfoMapper extends BaseMapper<TmsStudentInfoVo> {
     List<TmsStudentInfoVo> getTmsAllStudentInfoList(TmsAllStudentInfoDTO aLLStudentInfoDTO);
 
     TmsStudentInfoIdVo getTzTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO);
+
+    List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO);
 }

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

@@ -41,4 +41,6 @@ public interface ITmsStudentInfoService extends IService<TmsStudentInfoVo> {
     List<TmsBmCountVo> getEveryYearStuCountBySchoolId(TmsBmYearListDTO yearListDTO);
 
     TmsStudentInfoIdVo getTmsStudentInfoApplyById(TmsStudentInfoApplyIdDTO studentInfoApplyIdDTO);
+
+    List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO);
 }

+ 2 - 3
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsStudentInfoServiceImpl.java

@@ -221,10 +221,9 @@ public class TmsStudentInfoServiceImpl extends ServiceImpl<TmsStudentInfoMapper,
 
     }
 
-
     @Override
-    public TmsStudentInfoIdVo getTzTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO) {
-        return mapper.getTzTmsStudentInfoById(stuIdDTO);
+    public List<TmsStudentTeachLogVo> getTmsStudentTeachLogById(TmsStudentInfoIdDTO studentInfoIdDTO) {
+        return mapper.getTmsStudentTeachLogById(studentInfoIdDTO);
     }
 
 

+ 56 - 0
jsjp-service/src/main/java/com/miaxis/tms/vo/TmsStudentTeachLogVo.java

@@ -0,0 +1,56 @@
+package com.miaxis.tms.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class TmsStudentTeachLogVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "教学日志编码")
+    private String recnum;
+
+    @ApiModelProperty(value = "培训类型")
+    private String pxlxName;
+
+    @ApiModelProperty(value = "公理数")
+    private String mile;
+
+    @ApiModelProperty(value = "培训学时")
+    private String duration;
+
+    @ApiModelProperty(value = "有效学时")
+    private String vaildTime;
+
+    @ApiModelProperty(value = "培训部分")
+    private String trainSubject;
+
+    @ApiModelProperty(value = "开始时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    @ApiModelProperty(value = "结束时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
+
+    @ApiModelProperty(value = "教练员")
+    private String coachName;
+
+    @ApiModelProperty(value = "教练车牌")
+    private String carLicnum;
+
+
+    @ApiModelProperty(value = "终端卡号")
+    private String sim;
+
+
+
+}

+ 32 - 3
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -95,6 +95,20 @@
         <result property="loginFlag" column="LSL_LOGIN_FLAG" />
     </resultMap>
 
+    <resultMap id="TmsStudentTeahLogResultMap" type="com.miaxis.tms.vo.TmsStudentTeachLogVo">
+        <result property="recnum" column="CRI_RECNUM" />
+        <result property="pxlxName" column="PXLX_NAME" />
+        <result property="mile" column="MILE" />
+        <result property="duration" column="CRI_DURATION" />
+        <result property="vaildTime" column="CRI_VAILD_TIME" />
+        <result property="trainSubject" column="CRI_TRAIN_SUBJECT" />
+        <result property="startTime" column="CRI_STARTTIME" />
+        <result property="endTime" column="CRI_ENDTIME" />
+        <result property="coachName" column="COACH_NAME" />
+        <result property="carLicnum" column="CAR_LICNUM" />
+        <result property="sim" column="TSO_REMARK" />
+    </resultMap>
+
 
 
 
@@ -239,7 +253,7 @@
     </select>
 
 
-    <select id="getWzTmsStudentInfoById"  parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentInfoIdResultMap">
+    <select id="getWzTmsStudentInfoById"  parameterType="com.miaxis.tms.dto.TmsStudentInfoApplyIdDTO" resultMap="TmsStudentInfoIdResultMap">
         SELECT t.tso_id,
         t.tso_cardtype,
                t.tso_Idcard,
@@ -341,7 +355,7 @@
     </select>
 
 
-    <select id="getWzOldTmsStudentInfoById" resultType="com.miaxis.tms.vo.TmsStudentInfoIdVo" resultMap="TmsStudentInfoIdResultMap">
+    <select id="getWzOldTmsStudentInfoById"  parameterType="com.miaxis.tms.dto.TmsStudentInfoApplyIdDTO" resultMap="TmsStudentInfoIdResultMap">
         SELECT t.tso_id,
                t.tso_cardtype,
                t.tso_Idcard,
@@ -479,7 +493,6 @@
     </select>
 
 
-
     <select id="getEveryYearStuCountBySchoolId" parameterType="com.miaxis.tms.dto.TmsBmYearListDTO" resultType="com.miaxis.tms.vo.TmsBmCountVo" >
         SELECT TO_CHAR(tso_applydate, 'yyyy') AS dateTime, COUNT(1) AS stuCount
         FROM tms_student_info@tms${city} t
@@ -497,4 +510,20 @@
         update TMS_STUDENT_INFO@tms${city} set tso_app_coach_id = #{appCoachId} where tso_id = #{id}
     </update>
 
+
+    <select id="getTmsStudentTeachLogById" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentTeahLogResultMap"  >
+        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
+        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
+                                      LEFT JOIN tms_train_car_info@tms${city} car on car.tco_id=t.cri_train_car_id WHERE STU.TSO_ID = #{id}
+        ORDER BY T.cri_id DESC
+
+    </select>
+
+
 </mapper>