Browse Source

教材入库记录接口实现

dzx 1 year ago
parent
commit
21a4c27807

+ 2 - 1
src/main/java/com/xjrsoft/module/textbook/service/impl/TextbookWarehouseRecordServiceImpl.java

@@ -19,8 +19,9 @@ import org.springframework.stereotype.Service;
 @Service
 @AllArgsConstructor
 public class TextbookWarehouseRecordServiceImpl extends MPJBaseServiceImpl<TextbookWarehouseRecordMapper, TextbookWarehouseRecord> implements ITextbookWarehouseRecordService {
+    private final TextbookWarehouseRecordMapper textbookWarehouseRecordMapper;
     @Override
     public Page<TextbookWarehouseRecordPageVo> getPage(Page<TextbookWarehouseRecordPageDto> page, TextbookWarehouseRecordPageDto dto) {
-        return null;
+        return textbookWarehouseRecordMapper.getPage(page, dto);
     }
 }

+ 54 - 79
src/main/java/com/xjrsoft/module/textbook/vo/TextbookWarehouseRecordPageVo.java

@@ -5,7 +5,6 @@ import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -24,62 +23,71 @@ public class TextbookWarehouseRecordPageVo {
     @ExcelProperty("主键编号")
     @ApiModelProperty("主键编号")
     private String id;
+
     /**
-    * 创建人
+    * 序号
     */
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("创建人")
-    @ApiModelProperty("创建人")
-    private Long createUserId;
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+
     /**
-    * 创建时间
-    */
+     * 来源
+     */
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("创建时间")
-    @ApiModelProperty("创建时间")
-    private Date createDate;
+    @ExcelProperty("来源")
+    @ApiModelProperty("来源")
+    private String issn;
+
     /**
-    * 修改人
+    * 书名
     */
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("修改人")
-    @ApiModelProperty("修改人")
-    private Long modifyUserId;
-    /**
-    * 修改时间
-    */
+    @ExcelProperty("书名")
+    @ApiModelProperty("书名")
+    private String bookName;
+
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("修改时间")
-    @ApiModelProperty("修改时间")
-    private Date modifyDate;
-    /**
-    * 删除标记
-    */
+    @ExcelProperty("出版社")
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
+
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("删除标记")
-    @ApiModelProperty("删除标记")
-    private Integer deleteMark;
-    /**
-    * 有效标志
-    */
+    @ExcelProperty("作者(主编)")
+    @ApiModelProperty("作者(主编)")
+    private String editorInChief;
+
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("有效标志")
-    @ApiModelProperty("有效标志")
-    private Integer enabledMark;
-    /**
-    * 序号
-    */
+    @ExcelProperty("学科组")
+    @ApiModelProperty("学科组")
+    private String groupName;
+
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("序号")
-    @ApiModelProperty("序号")
-    private Integer sortCode;
-    /**
-    * 教材管理编号
-    */
+    @ExcelProperty("对应课程")
+    @ApiModelProperty("对应课程")
+    private String courseName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("类型")
+    @ApiModelProperty("类型")
+    private String textbookTypeCn;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("规格型号")
+    @ApiModelProperty("规格型号")
+    private String specificationsModels;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("入库时间")
+    @ApiModelProperty("入库时间")
+    private Date createDate;
+
     @ContentStyle(dataFormat = 49)
-    @ExcelProperty("教材管理编号")
-    @ApiModelProperty("教材管理编号")
-    private Long textbookId;
+    @ExcelProperty("入库人员")
+    @ApiModelProperty("入库人员")
+    private String warehouseUser;
+
     /**
     * 入库数量
     */
@@ -87,40 +95,7 @@ public class TextbookWarehouseRecordPageVo {
     @ExcelProperty("入库数量")
     @ApiModelProperty("入库数量")
     private Integer warehouseNumber;
-    /**
-    * 来源
-    */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("来源")
-    @ApiModelProperty("来源")
-    private String source;
-    /**
-    * 定价(元)
-    */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("定价(元)")
-    @ApiModelProperty("定价(元)")
-    private BigDecimal price;
-    /**
-    * 折扣
-    */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("折扣")
-    @ApiModelProperty("折扣")
-    private Double discount;
-    /**
-    * 小计(元)
-    */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("小计(元)")
-    @ApiModelProperty("小计(元)")
-    private BigDecimal subtotal;
-    /**
-    * 总价(元)
-    */
-    @ContentStyle(dataFormat = 49)
-    @ExcelProperty("总价(元)")
-    @ApiModelProperty("总价(元)")
-    private BigDecimal totalPrice;
+
+
 
 }

+ 4 - 6
src/main/resources/mapper/textbook/TextbookWarehouseRecordMapper.xml

@@ -4,15 +4,13 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.textbook.mapper.TextbookWarehouseRecordMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.textbook.dto.TextbookWarehouseRecordPageDto" resultType="com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordPageVo">
-        SELECT t1.id, t1.sort_code, t3.issn,t3.book_name,t3.publishing_house,t3.editor_in_chief,t4.group_name,t6.name AS grade_name,
-        t7.name AS class_name,t5.name AS course_name,t8.name AS textbook_type_cn,t3.specifications_models,t1.create_date,t2.name AS warehouse_user,t1.warehouse_number FROM textbook_warehouse_record t1
+        SELECT t1.id, t1.sort_code, t3.issn,t3.book_name,t3.publishing_house,t3.editor_in_chief,t4.group_name,
+        t5.name AS course_name,t6.name AS textbook_type_cn,t3.specifications_models,t1.create_date,t2.name AS warehouse_user,t1.warehouse_number FROM textbook_warehouse_record t1
         LEFT JOIN xjr_user t2 ON t1.create_user_id = t2.id
         LEFT JOIN textbook t3 ON t1.textbook_id = t3.id
-        LEFT JOIN subject_group_id t4 ON t3.subject_group_id = t4.id
+        LEFT JOIN subject_group t4 ON t3.subject_group_id = t4.id
         LEFT JOIN base_course_subject t5 ON t3.course_subject_id = t5.id
-        LEFT JOIN base_grade t6 ON t3.grade_id = t6.id
-        LEFT JOIN base_class t7 ON t3.class_id = t7.id
-        LEFT JOIN xjr_dictionary_detail t8 ON t3.textbook_type = t8.code AND t8.item_id = 1739209191193636865
+        LEFT JOIN xjr_dictionary_detail t6 ON t3.textbook_type = t6.code AND t6.item_id = 1739209191193636865
         WHERE t1.delete_mark = 0
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t3.textbook_type = #{dto.textbookType}