|
@@ -5,14 +5,13 @@
|
|
|
<mapper namespace="com.xjrsoft.module.textbook.mapper.TextbookIssueRecordMapper">
|
|
<mapper namespace="com.xjrsoft.module.textbook.mapper.TextbookIssueRecordMapper">
|
|
|
<select id="getPage" parameterType="com.xjrsoft.module.textbook.dto.TextbookIssueRecordPageDto" resultType="com.xjrsoft.module.textbook.vo.TextbookIssueRecordPageVo">
|
|
<select id="getPage" parameterType="com.xjrsoft.module.textbook.dto.TextbookIssueRecordPageDto" resultType="com.xjrsoft.module.textbook.vo.TextbookIssueRecordPageVo">
|
|
|
SELECT t1.id,
|
|
SELECT t1.id,
|
|
|
- t1.sort_code,
|
|
|
|
|
|
|
+ t1.order_number,
|
|
|
|
|
+ t15.name as base_semester_id_cn,
|
|
|
t3.issn,
|
|
t3.issn,
|
|
|
t3.book_name,
|
|
t3.book_name,
|
|
|
t3.publishing_house,
|
|
t3.publishing_house,
|
|
|
t3.editor_in_chief,
|
|
t3.editor_in_chief,
|
|
|
t7.group_name,
|
|
t7.group_name,
|
|
|
- t5.name AS grade_name,
|
|
|
|
|
- ifnull(t6.name, t14.name) AS class_name,
|
|
|
|
|
t8.name AS course_name,
|
|
t8.name AS course_name,
|
|
|
t10.name AS textbook_type_cn,
|
|
t10.name AS textbook_type_cn,
|
|
|
t3.specifications_models,
|
|
t3.specifications_models,
|
|
@@ -20,22 +19,24 @@
|
|
|
t1.create_date,
|
|
t1.create_date,
|
|
|
t9.name AS claim_user,
|
|
t9.name AS claim_user,
|
|
|
t1.issue_number,
|
|
t1.issue_number,
|
|
|
- t15.name as baseSemesterIdCn
|
|
|
|
|
|
|
+ t15.name as baseSemesterIdCn,
|
|
|
|
|
+ t16.order_number as warehouse_order_number,
|
|
|
|
|
+ t16.price,
|
|
|
|
|
+ t16.subtotal,
|
|
|
|
|
+ t6.name as classIdCn,
|
|
|
|
|
+ t5.name as gradeIdCn
|
|
|
FROM textbook_issue_record t1
|
|
FROM textbook_issue_record t1
|
|
|
- LEFT JOIN wf_textbook_claim_item t2 ON t1.data_item_id = t2.id
|
|
|
|
|
- LEFT JOIN wf_textbook_claim t4 ON t1.data_id = t4.id
|
|
|
|
|
- LEFT JOIN wf_textbook_recede_item t12 ON t12.id = t1.data_item_id
|
|
|
|
|
- LEFT JOIN wf_textbook_recede t13 ON t13.id = t1.data_id
|
|
|
|
|
|
|
+ LEFT JOIN wf_textbook_claim t4 ON t4.id = t1.data_id
|
|
|
|
|
+ LEFT JOIN base_class t6 ON t6.id = t4.class_id
|
|
|
|
|
+ LEFT JOIN base_grade t5 ON t5.id = t6.grade_id
|
|
|
LEFT JOIN textbook t3 ON t3.id = t1.textbook_id
|
|
LEFT JOIN textbook t3 ON t3.id = t1.textbook_id
|
|
|
- LEFT JOIN base_grade t5 ON t3.grade_id = t5.id
|
|
|
|
|
- LEFT JOIN base_class t6 ON t4.class_id = t6.id
|
|
|
|
|
- LEFT JOIN base_class t14 ON t13.class_id = t14.id
|
|
|
|
|
LEFT JOIN subject_group t7 ON t3.subject_group_id = t7.id
|
|
LEFT JOIN subject_group t7 ON t3.subject_group_id = t7.id
|
|
|
LEFT JOIN base_course_subject t8 ON t3.course_subject_id = t8.id
|
|
LEFT JOIN base_course_subject t8 ON t3.course_subject_id = t8.id
|
|
|
LEFT JOIN xjr_user t9 ON t1.receive_user_id = t9.id
|
|
LEFT JOIN xjr_user t9 ON t1.receive_user_id = t9.id
|
|
|
- LEFT JOIN xjr_dictionary_detail t10 ON t3.textbook_type = t10.code AND t10.item_id = 1739209191193636865
|
|
|
|
|
- LEFT JOIN xjr_dictionary_detail t11 ON t1.issue_mode = t11.code AND t11.item_id = 1739821685805215745
|
|
|
|
|
- LEFT JOIN base_semester t15 ON t15.id = t3.base_semester_id
|
|
|
|
|
|
|
+ LEFT JOIN xjr_dictionary_detail t10 ON t3.textbook_type = t10.code
|
|
|
|
|
+ LEFT JOIN xjr_dictionary_detail t11 ON t1.issue_mode = t11.code
|
|
|
|
|
+ LEFT JOIN base_semester t15 ON t15.id = t1.base_semester_id
|
|
|
|
|
+ LEFT JOIN textbook_warehouse_record t16 ON t16.id = t1.textbook_warehouse_record_id
|
|
|
WHERE t1.delete_mark = 0
|
|
WHERE t1.delete_mark = 0
|
|
|
<if test="dto.textbookType != null and dto.textbookType != ''">
|
|
<if test="dto.textbookType != null and dto.textbookType != ''">
|
|
|
and t3.textbook_type = #{dto.textbookType}
|
|
and t3.textbook_type = #{dto.textbookType}
|