Pārlūkot izejas kodu

1、教材导入调整
2、班级列表增加班主任电话

dzx 6 mēneši atpakaļ
vecāks
revīzija
4aece670a7

+ 3 - 0
src/main/java/com/xjrsoft/module/base/vo/BaseClassPageVo.java

@@ -70,4 +70,7 @@ public class BaseClassPageVo {
 
     @ApiModelProperty("专业方向名称")
     private String majorSetName;
+
+    @ApiModelProperty("手机号")
+    private String teacherMobile;
 }

+ 4 - 1
src/main/java/com/xjrsoft/module/courseTable/service/impl/CourseTableServiceImpl.java

@@ -294,7 +294,10 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
             dto.setWeek(dayOfWeek.getValue());
         }
         dto.setClassId(classId);
-        dto.setTeacherId(Long.parseLong(teacherId));
+        if(teacherId != null && !"".equals(teacherId)){
+            dto.setTeacherId(Long.parseLong(teacherId));
+        }
+
         List<CourseListVo> list = courseTableMapper.getAdjustList(dto);
         for (CourseListVo courseListVo : list) {
             if (courseListVo.getTimePeriod() == 1) {

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

@@ -952,9 +952,12 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
 
             //处理使用类型
             textbook.setUseType(UseSemesterTypeEnum.getCode(textbookImportDto.getUseTypeCn()));
-
+            Double discount = 1d;
+            if(textbook.getDiscount() != null){
+                discount = textbook.getDiscount();
+            }
             //处理小计
-            textbook.setSubtotal(textbook.getPrice().multiply(BigDecimal.valueOf(textbook.getDiscount()/10)));
+            textbook.setSubtotal(textbook.getPrice().multiply(BigDecimal.valueOf(discount / 10)));
 
             // 判断导入的教材是否已经存在,根据教材的 ISBN 码和使用的学期判断
             LambdaQueryWrapper<Textbook> textbookLambdaQueryWrapper = new LambdaQueryWrapper<>();

+ 1 - 1
src/main/resources/mapper/base/BaseClass.xml

@@ -50,7 +50,7 @@
         AND a2.class_id = t1.id AND a2.stduy_status = 'FB3001'
         AND a2.archives_status = 'FB2901') AS not_stay_count,
         -->
-        t7.name AS org_name,
+        t7.name AS org_name,t2.mobile as teacher_mobile,
         t8.name as major_set_name,t1.major_set_id FROM base_class t1
         LEFT JOIN xjr_user t2 ON t1.teacher_id = t2.id
         LEFT JOIN xjr_dictionary_detail t3 ON t3.code = t1.enroll_type AND t3.item_id = 2023000000000000027