|
@@ -238,6 +238,162 @@
|
|
|
WHERE T.TSO_ID = #{id}
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getWzTmsStudentInfoById" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentInfoIdResultMap">
|
|
|
+ SELECT t.tso_id,
|
|
|
+ t.tso_cardtype,
|
|
|
+ t.tso_Idcard,
|
|
|
+ t.tso_name,
|
|
|
+ t.tso_sex,
|
|
|
+ t.tso_phone,
|
|
|
+ t.tso_source,
|
|
|
+ t.TSO_NATIONALITY,
|
|
|
+ t.tso_traintype,
|
|
|
+ t.tso_active,
|
|
|
+ t.tso_record_date,
|
|
|
+ t.tso_address,
|
|
|
+ t.tso_photo_path,
|
|
|
+ t.tso_password,
|
|
|
+ fi.face,
|
|
|
+ S.TSI_ID,
|
|
|
+ S.TSI_NAME,
|
|
|
+ S.TSI_SHORTNAME,
|
|
|
+ S.TSI_ADDRESS,
|
|
|
+ S.TSI_INSCODE,
|
|
|
+ S.TSI_QXBH,
|
|
|
+ S.TSI_QXMC,
|
|
|
+ S.TSI_DQBH,
|
|
|
+ S.TSI_DQMC,
|
|
|
+ t2.Sri_Train_One_Exam_Status,t2.Sri_Train_One_Exam_Time,t2.Sri_Train_TWO_Exam_Status,t2.Sri_Train_Two_Exam_Time,
|
|
|
+ t2.Sri_Train_Three_Exam_Status,t2.Sri_Train_Three_Exam_Time,t2.Sri_Train_Four_Exam_Status,t2.Sri_Train_Four_Exam_Time,
|
|
|
+ nvl(trunc(t2.sri_train_one / 60), 0) || '学时' ||nvl((mod(t2.sri_train_one, 60)), 0) || '分钟' as K1,
|
|
|
+ nvl(trunc(t2.sri_train_two / 60), 0) || '学时' ||nvl((mod(t2.sri_train_two, 60)), 0) || '分钟' as K2,
|
|
|
+ nvl(trunc(t2.sri_train_three / 60), 0) || '学时' ||nvl((mod(t2.sri_train_three, 60)), 0) || '分钟' as K3,
|
|
|
+ nvl(trunc(t2.sri_train_four / 60), 0) || '学时' ||nvl((mod(t2.sri_train_four, 60)), 0) || '分钟' as K4,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit1@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 1) as total_km1,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit1@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 2) as total_km2,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit1@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 3) as total_km3,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit1@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 4) as total_km4,
|
|
|
+ nvl(ttv.SCTWOTOTALMILE, 0) K2MILEAGE,
|
|
|
+ nvl(ttv.SCTOTALMILE, 0) MILEAGE,
|
|
|
+ nvl(ttv.SCTHREETOTALMILE, 0) K3MILEAGE
|
|
|
+ FROM TMS_STUDENT_INFO@tms${city} T
|
|
|
+ LEFT JOIN TMS_SCHOOL_INFO@tms${city} S
|
|
|
+ ON T.TSO_SCHOOL_ID = S.TSI_ID
|
|
|
+ left join tms_student_train_info@tms${city} t2
|
|
|
+ on t.tso_id = t2.sri_student_id
|
|
|
+ left join TMS_TRAIN_TIME_VIEW@tms${city} ttv
|
|
|
+ on ttv.studentId = tso_id
|
|
|
+ left join tms_student_face_info@tms${city} fi
|
|
|
+ on t.tso_id = fi.student_id
|
|
|
+ WHERE T.TSO_ID = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getTzTmsStudentInfoById" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultMap="TmsStudentInfoIdResultMap">
|
|
|
+ SELECT t.tso_id,
|
|
|
+ t.tso_cardtype,
|
|
|
+ t.tso_Idcard,
|
|
|
+ t.tso_name,
|
|
|
+ t.tso_sex,
|
|
|
+ t.tso_phone,
|
|
|
+ t.tso_source,
|
|
|
+ t.TSO_NATIONALITY,
|
|
|
+ t.tso_traintype,
|
|
|
+ t.tso_active,
|
|
|
+ t.tso_record_date,
|
|
|
+ t.tso_address,
|
|
|
+ t.tso_photo_path,
|
|
|
+ t.tso_password,
|
|
|
+ fi.face,
|
|
|
+ S.TSI_ID,
|
|
|
+ S.TSI_NAME,
|
|
|
+ S.TSI_SHORTNAME,
|
|
|
+ S.TSI_ADDRESS,
|
|
|
+ S.TSI_INSCODE,
|
|
|
+ S.TSI_QXBH,
|
|
|
+ S.TSI_QXMC,
|
|
|
+ S.TSI_DQBH,
|
|
|
+ S.TSI_DQMC,
|
|
|
+ t2.Sri_Train_One_Exam_Status,t2.Sri_Train_One_Exam_Time,t2.Sri_Train_TWO_Exam_Status,t2.Sri_Train_Two_Exam_Time,
|
|
|
+ t2.Sri_Train_Three_Exam_Status,t2.Sri_Train_Three_Exam_Time,t2.Sri_Train_Four_Exam_Status,t2.Sri_Train_Four_Exam_Time,
|
|
|
+ nvl(trunc(t2.sri_train_one / 60), 0) || '学时' ||nvl((mod(t2.sri_train_one, 60)), 0) || '分钟' as K1,
|
|
|
+ nvl(trunc(t2.sri_train_two / 60), 0) || '学时' ||nvl((mod(t2.sri_train_two, 60)), 0) || '分钟' as K2,
|
|
|
+ nvl(trunc(t2.sri_train_three / 60), 0) || '学时' ||nvl((mod(t2.sri_train_three, 60)), 0) || '分钟' as K3,
|
|
|
+ nvl(trunc(t2.sri_train_four / 60), 0) || '学时' ||nvl((mod(t2.sri_train_four, 60)), 0) || '分钟' as K4,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit_new@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 1) as total_km1,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit_new@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 2) as total_km2,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit_new@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 3) as total_km3,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit_new@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 4) as total_km4,
|
|
|
+ nvl(ttv.SCTWOTOTALMILE, 0) K2MILEAGE,
|
|
|
+ nvl(ttv.SCTOTALMILE, 0) MILEAGE,
|
|
|
+ nvl(ttv.SCTHREETOTALMILE, 0) K3MILEAGE
|
|
|
+ FROM TMS_STUDENT_INFO@tms${city} T
|
|
|
+ LEFT JOIN TMS_SCHOOL_INFO@tms${city} S
|
|
|
+ ON T.TSO_SCHOOL_ID = S.TSI_ID
|
|
|
+ left join tms_student_train_info@tms${city} t2
|
|
|
+ on t.tso_id = t2.sri_student_id
|
|
|
+ left join TMS_TRAIN_TIME_VIEW@tms${city} ttv
|
|
|
+ on ttv.studentId = tso_id
|
|
|
+ left join tms_student_face_info@tms${city} fi
|
|
|
+ on t.tso_id = fi.student_id
|
|
|
+ WHERE T.TSO_ID = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getWzOldTmsStudentInfoById" resultType="com.miaxis.tms.vo.TmsStudentInfoIdVo" resultMap="TmsStudentInfoIdResultMap">
|
|
|
+ SELECT t.tso_id,
|
|
|
+ t.tso_cardtype,
|
|
|
+ t.tso_Idcard,
|
|
|
+ t.tso_name,
|
|
|
+ t.tso_sex,
|
|
|
+ t.tso_phone,
|
|
|
+ t.tso_source,
|
|
|
+ t.TSO_NATIONALITY,
|
|
|
+ t.tso_traintype,
|
|
|
+ t.tso_active,
|
|
|
+ t.tso_record_date,
|
|
|
+ t.tso_address,
|
|
|
+ t.tso_photo_path,
|
|
|
+ t.tso_password,
|
|
|
+ fi.face,
|
|
|
+ S.TSI_ID,
|
|
|
+ S.TSI_NAME,
|
|
|
+ S.TSI_SHORTNAME,
|
|
|
+ S.TSI_ADDRESS,
|
|
|
+ S.TSI_INSCODE,
|
|
|
+ S.TSI_QXBH,
|
|
|
+ S.TSI_QXMC,
|
|
|
+ S.TSI_DQBH,
|
|
|
+ S.TSI_DQMC,
|
|
|
+ t2.Sri_Train_One_Exam_Status,t2.Sri_Train_One_Exam_Time,t2.Sri_Train_TWO_Exam_Status,t2.Sri_Train_Two_Exam_Time,
|
|
|
+ t2.Sri_Train_Three_Exam_Status,t2.Sri_Train_Three_Exam_Time,t2.Sri_Train_Four_Exam_Status,t2.Sri_Train_Four_Exam_Time,
|
|
|
+ nvl(trunc(t2.sri_train_one / 60), 0) || '学时' ||nvl((mod(t2.sri_train_one, 60)), 0) || '分钟' as K1,
|
|
|
+ nvl(trunc(t2.sri_train_two / 60), 0) || '学时' ||nvl((mod(t2.sri_train_two, 60)), 0) || '分钟' as K2,
|
|
|
+ nvl(trunc(t2.sri_train_three / 60), 0) || '学时' ||nvl((mod(t2.sri_train_three, 60)), 0) || '分钟' as K3,
|
|
|
+ nvl(trunc(t2.sri_train_four / 60), 0) || '学时' ||nvl((mod(t2.sri_train_four, 60)), 0) || '分钟' as K4,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 1) as total_km1,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 2) as total_km2,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 3) as total_km3,
|
|
|
+ (select nvl(trunc(sum(tsc_credit_ration) / 60), 0) || '学时' ||nvl((mod(sum(tsc_credit_ration), 60)), 0) || '分钟' from tms_train_subject_credit@tms${city} c where c.tsc_permit_drive_car_type = t.tso_traintype and tsc_apply_exam_subject = 4) as total_km4,
|
|
|
+ nvl(ttv.SCTWOTOTALMILE, 0) K2MILEAGE,
|
|
|
+ nvl(ttv.SCTOTALMILE, 0) MILEAGE,
|
|
|
+ nvl(ttv.SCTHREETOTALMILE, 0) K3MILEAGE
|
|
|
+ FROM TMS_STUDENT_INFO@tms${city} T
|
|
|
+ LEFT JOIN TMS_SCHOOL_INFO@tms${city} S
|
|
|
+ ON T.TSO_SCHOOL_ID = S.TSI_ID
|
|
|
+ left join tms_student_train_info@tms${city} t2
|
|
|
+ on t.tso_id = t2.sri_student_id
|
|
|
+ left join TMS_TRAIN_TIME_VIEW@tms${city} ttv
|
|
|
+ on ttv.studentId = tso_id
|
|
|
+ left join tms_student_face_info@tms${city} fi
|
|
|
+ on t.tso_id = fi.student_id
|
|
|
+ WHERE T.TSO_ID = #{id}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<select id="getTmsLogFaceListByStuId" parameterType="com.miaxis.tms.dto.TmsStudentInfoIdDTO" resultType="com.miaxis.tms.vo.TmsLogFaceVo" >
|
|
|
select f.crdate,f.sim,f.sourceimg,f.img, f.similar, f.type from tms_log_face_info@tms${city} f
|
|
|
where f.stu_out_id = #{id}
|
|
@@ -335,6 +491,8 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<update id="upStuAppCoachIdById" parameterType="com.miaxis.tms.dto.TmsStudentInfoQrDTO">
|
|
|
update TMS_STUDENT_INFO@tms${city} set tso_app_coach_id = #{appCoachId} where tso_id = #{id}
|
|
|
</update>
|