Procházet zdrojové kódy

教材确认发放持久化入库单号

大数据与最优化研究所 před 9 měsíci
rodič
revize
bac9e09b30

+ 1 - 0
src/main/java/com/xjrsoft/module/textbook/service/impl/WfTextbookClaimServiceImpl.java

@@ -392,6 +392,7 @@ public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookCla
                 }
                 textbookIssueRecord.setDataId(wfTextbookClaim.getId());
                 textbookIssueRecord.setDataItemId(wfTextbookClaimItem.getId());
+                textbookIssueRecord.setTextbookWarehouseRecordId(textbookWarehouseRecords.getTextbookWarehouseRecordId());
                 textbookIssueRecord.setTextbookId(wfTextbookClaimItem.getTextbookId());
                 textbookIssueRecord.setIssueNumber(confirmNumber);
                 textbookIssueRecord.setRecedeNumber(0);

+ 20 - 20
src/main/java/com/xjrsoft/module/textbook/vo/TextbookIssueRecordPageVo.java

@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -26,10 +27,15 @@ public class TextbookIssueRecordPageVo {
     private String id;
 
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("序号")
-    @ApiModelProperty("序号")
-    private Integer sortCode;
+    @ExcelProperty("学期")
+    @ApiModelProperty("学期")
+    public String baseSemesterIdCn;
+
+    @ApiModelProperty("出库单号")
+    public String orderNumber;
 
+    @ApiModelProperty("入库单号")
+    public String warehouseOrderNumber;
 
     @ContentStyle(dataFormat = 49)
     @ExcelProperty("书号")
@@ -56,23 +62,6 @@ public class TextbookIssueRecordPageVo {
     @ApiModelProperty("学科组")
     private String groupName;
 
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("使用年级")
-    @ApiModelProperty("使用年级")
-    private String gradeName;
-    /**
-     * 使用年级
-     */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("学期")
-    @ApiModelProperty("学期")
-    public String baseSemesterIdCn;
-
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("使用班级")
-    @ApiModelProperty("使用班级")
-    private String className;
-
     @ContentStyle(dataFormat = 49)
     @ExcelProperty("对应课程")
     @ApiModelProperty("对应课程")
@@ -113,4 +102,15 @@ public class TextbookIssueRecordPageVo {
     @ApiModelProperty("出库数量")
     private Integer issueNumber;
 
+    @ApiModelProperty("定价(元)")
+    private BigDecimal price;
+
+    @ApiModelProperty("实际价格(元)")
+    private BigDecimal subtotal;
+
+    @ApiModelProperty("班级主键")
+    private String classIdCn;
+
+    @ApiModelProperty("年级主键")
+    private String gradeIdCn;
 }

+ 15 - 14
src/main/resources/mapper/textbook/TextbookIssueRecordMapper.xml

@@ -5,14 +5,13 @@
 <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 t1.id,
-        t1.sort_code,
+        t1.order_number,
+        t15.name as base_semester_id_cn,
         t3.issn,
         t3.book_name,
         t3.publishing_house,
         t3.editor_in_chief,
         t7.group_name,
-        t5.name  AS grade_name,
-        ifnull(t6.name, t14.name)  AS class_name,
         t8.name  AS course_name,
         t10.name AS textbook_type_cn,
         t3.specifications_models,
@@ -20,22 +19,24 @@
         t1.create_date,
         t9.name  AS claim_user,
         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
-        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 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 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_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
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t3.textbook_type = #{dto.textbookType}