瀏覽代碼

教材模块重构-教材基本信息,教材征订

大数据与最优化研究所 11 月之前
父節點
當前提交
36bd60dc3b

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

@@ -57,8 +57,6 @@ public class TextbookSubscriptionServiceImpl extends MPJBaseServiceImpl<Textbook
 
     private final TextbookSubscriptionClassMapper textbookSubscriptionClassMapper;
 
-    private final TextbookSubscriptionClassMapper textbookService;
-
     private final TextbookWarehouseRecordMapper textbookWarehouseRecordMapper;
 
     @Override
@@ -151,6 +149,8 @@ public class TextbookSubscriptionServiceImpl extends MPJBaseServiceImpl<Textbook
                                                 .selectAs(DictionaryDetail::getName, TextbookSubscriptionItemVo::getTextbookTypeCn)
                                 )
                 )
+                .selectAs(TextbookSubscriptionItem::getPrice, TextbookSubscriptionItemVo::getPricing)
+                .selectAs(Textbook::getPrice, TextbookSubscriptionItemVo::getPrice)
                 .eq(TextbookSubscriptionItem::getTextbookSubscriptionId, id)
         ;
         List<TextbookSubscriptionItemVo> list = textbookSubscriptionTextbookSubscriptionItemMapper.selectJoinList(TextbookSubscriptionItemVo.class, textbookSubscriptionItemMPJLambdaWrapper);

+ 26 - 11
src/main/java/com/xjrsoft/module/textbook/vo/TextbookSubscriptionItemVo.java

@@ -58,26 +58,36 @@ public class TextbookSubscriptionItemVo {
      */
     @ApiModelProperty("国际标准刊号")
     private String issn;
-    /**
-     * 出版社
-     */
-    @ApiModelProperty("出版社")
-    private String publishingHouse;
     /**
      * 主编
      */
     @ApiModelProperty("主编")
     private String editorInChief;
     /**
-     * 教材分类(xjr_dictionary_item[textbook_type])
+     * 版本
+     */
+    @ApiModelProperty("版本")
+    private String version;
+    /**
+     * 出版社
+     */
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
+    /**
+     * 教材类型(xjr_dictionary_item[textbook_type])
      */
-    @ApiModelProperty("教材分类(xjr_dictionary_item[textbook_type])")
+    @ApiModelProperty("教材类(xjr_dictionary_item[textbook_type])")
     private String textbookType;
     /**
-     * 教材分类(xjr_dictionary_item[textbook_type])
+     * 教材类(xjr_dictionary_item[textbook_type])
      */
-    @ApiModelProperty("教材分类(xjr_dictionary_item[textbook_type])")
+    @ApiModelProperty("教材类(xjr_dictionary_item[textbook_type])")
     private String textbookTypeCn;
+    /**
+     * 使用类型(单位:学期)
+     */
+    @ApiModelProperty("使用类型(单位:学期)")
+    private Integer useType;
     /**
     * 学生用书征订数量
     */
@@ -94,10 +104,15 @@ public class TextbookSubscriptionItemVo {
     @ApiModelProperty("实际折扣")
     private Double discount;
     /**
-    * 实际价格(元)
+    * 定价(元)
     */
-    @ApiModelProperty("实际价格(元)")
+    @ApiModelProperty("定价(元)")
     private BigDecimal price;
+    /**
+     * 实际价格(元)
+     */
+    @ApiModelProperty("实际价格(元)")
+    private BigDecimal pricing;
     /**
     * 当前征订任务征订项入库数量
     */

+ 89 - 0
src/main/resources/sqlScript/views_sql.sql

@@ -0,0 +1,89 @@
+-- create or replace definer = root@`%` view smart_campus.v_cse_feeobj1 as
+-- select 1001                                                                                                         AS `pk_corp`,
+--        `t`.`id`                                                                                                     AS `pkfeeobj`,
+--        `t`.`student_id`                                                                                             AS `Studentcode`,
+--        `t1`.`name`                                                                                                  AS `feeobjname`,
+--        (case
+--             when (`t1`.`gender` = 'SB10001') then '男'
+--             when (`t1`.`gender` = 'SB10002') then '女'
+--             else '其他' end)                                                                                        AS `sex`,
+--        `t3`.`id`                                                                                                    AS `classcdoe`,
+--        cast(substring_index(`t4`.`name`, '年', 1) as unsigned)                                                      AS `enteryear`,
+--        `t6`.`id`                                                                                                    AS `deptcode`,
+--        `t7`.`id`                                                                                                    AS `speccode`,
+--        `t7`.`study_year`                                                                                            AS `ratetypecdoe`,
+--     year(`t8`.`certificate_date`)                                                                                AS `leaveyear`,
+--     `t1`.`credential_number`                                                                                     AS `personalid`,
+--     NULL                                                                                                         AS `helpcode`,
+--     NULL                                                                                                         AS `quartercode`,
+--     NULL                                                                                                         AS `nationality`,
+--     NULL                                                                                                         AS `address`,
+--     (case
+--     when (`t3`.`is_graduate` = 1) then '在读'
+--     when (`t3`.`is_graduate` = 2) then '毕业'
+--     else '其他' end)                                                                                        AS `state`,
+--     NULL                                                                                                         AS `Userdef2`,
+--     NULL                                                                                                         AS `Userdef1`,
+--     NULL                                                                                                         AS `Resourcecode`,
+--     NULL                                                                                                         AS `Birthday`,
+--     NULL                                                                                                         AS `Account`,
+--     NULL                                                                                                         AS `bank`,
+--     NULL                                                                                                         AS `Remarks`,
+--     NULL                                                                                                         AS `Property`,
+--     NULL                                                                                                         AS `telephone`,
+--     NULL                                                                                                         AS `E_mail`
+-- from `smart_campus`.`base_student` `t`
+--     left join `smart_campus`.`xjr_user` `t1`on `t1`.`id` = `t`.`user_id`
+--     left join `smart_campus`.`base_student_school_roll` `t2` on `t1`.`id` = `t2`.`user_id`
+--     left join `smart_campus`.`base_class` `t3` on `t2`.`class_id` = `t3`.`id`
+--     left join `smart_campus`.`base_grade` `t4` on `t3`.`grade_id` = `t4`.`id`
+--     left join `smart_campus`.`xjr_department` `t6` on `t6`.`id` = `t3`.`org_id`
+--     left join `smart_campus`.`base_major_set` `t7` on `t7`.`id` = `t2`.`major_set_id`
+--     left join `smart_campus`.`base_student_graduate` `t8` on `t8`.`user_id` = `t1`.`id`
+-- ;
+
+create or replace definer = root@`%` view smart_campus.v_cse_feeobj1 as
+select 1001                                                                                                         AS `pk_corp`,
+       `t`.`id`                                                                                                     AS `pkfeeobj`,
+       `t`.`student_id`                                                                                             AS `Studentcode`,
+       `t1`.`name`                                                                                                  AS `feeobjname`,
+       (case
+            when (`t1`.`gender` = 'SB10001') then '男'
+            when (`t1`.`gender` = 'SB10002') then '女'
+            else '其他' end)                                                                                        AS `sex`,
+       `t3`.`id`                                                                                                    AS `classcdoe`,
+       cast(substring_index(`t4`.`name`, '年', 1) as unsigned)                                                      AS `enteryear`,
+       `t6`.`id`                                                                                                    AS `deptcode`,
+       `t7`.`id`                                                                                                    AS `speccode`,
+       `t7`.`study_year`                                                                                            AS `ratetypecdoe`,
+    year(`t8`.`certificate_date`)                                                                                AS `leaveyear`,
+    `t1`.`credential_number`                                                                                     AS `personalid`,
+    NULL                                                                                                         AS `helpcode`,
+    NULL                                                                                                         AS `quartercode`,
+    NULL                                                                                                         AS `nationality`,
+    NULL                                                                                                         AS `address`,
+    (case
+    when (`t3`.`is_graduate` = 1) then '在读'
+    when (`t3`.`is_graduate` = 2) then '毕业'
+    else '其他' end)                                                                                        AS `state`,
+    NULL                                                                                                         AS `Userdef2`,
+    NULL                                                                                                         AS `Userdef1`,
+    NULL                                                                                                         AS `Resourcecode`,
+    NULL                                                                                                         AS `Birthday`,
+    NULL                                                                                                         AS `Account`,
+    NULL                                                                                                         AS `bank`,
+    NULL                                                                                                         AS `Remarks`,
+    NULL                                                                                                         AS `Property`,
+    NULL                                                                                                         AS `telephone`,
+    NULL                                                                                                         AS `E_mail`
+from `smart_campus`.`base_student` `t`
+    left join `smart_campus`.`xjr_user` `t1`on `t1`.`id` = `t`.`user_id`
+    left join `smart_campus`.`base_student_school_roll` `t2` on `t1`.`id` = `t2`.`user_id`
+    left join `smart_campus`.`base_class` `t3` on `t2`.`class_id` = `t3`.`id`
+    left join `smart_campus`.`base_grade` `t4` on `t3`.`grade_id` = `t4`.`id`
+    left join `smart_campus`.`xjr_department` `t6` on `t6`.`id` = `t3`.`org_id`
+    left join `smart_campus`.`base_major_set` `t7` on `t7`.`id` = `t2`.`major_set_id`
+    left join `smart_campus`.`base_student_graduate` `t8` on `t8`.`user_id` = `t1`.`id`
+where t.delete_mark = 0
+  and t1.delete_mark = 0
+  and t2.delete_mark = 0;