Browse Source

教材相关流程优化

大数据与最优化研究所 5 months ago
parent
commit
73e4398a40

+ 3 - 0
src/main/java/com/xjrsoft/module/concat/controller/ConcatController.java

@@ -62,6 +62,9 @@ public class ConcatController {
         MPJLambdaWrapper<XjrUser> wrapper = new MPJLambdaWrapper<>();
         MPJLambdaWrapper<XjrUser> wrapper = new MPJLambdaWrapper<>();
         wrapper.leftJoin("xjr_user_dept_relation t2 on t.id = t2.user_id")
         wrapper.leftJoin("xjr_user_dept_relation t2 on t.id = t2.user_id")
                 .eq("t2.dept_id", parentId)
                 .eq("t2.dept_id", parentId)
+                .leftJoin("xjr_user_role_relation t3 ON t.id = t3.user_id")
+                .leftJoin("xjr_role t4 ON t4.id = t3.role_id")
+                .eq("t4.id", 2)
                 .eq(XjrUser::getDeleteMark, DeleteMark.NODELETE.getCode());
                 .eq(XjrUser::getDeleteMark, DeleteMark.NODELETE.getCode());
         List<XjrUser> userList = xjrUserService.selectJoinList(XjrUser.class, wrapper);
         List<XjrUser> userList = xjrUserService.selectJoinList(XjrUser.class, wrapper);
         for (XjrUser user : userList) {
         for (XjrUser user : userList) {

+ 2 - 2
src/main/java/com/xjrsoft/module/textbook/controller/TextbookController.java

@@ -78,7 +78,7 @@ public class TextbookController {
         textbookMPJLambdaWrapper
         textbookMPJLambdaWrapper
                 .select(Textbook::getId)
                 .select(Textbook::getId)
                 .selectAs(Textbook::getId,TextbookSubscriptionListVo::getTextbookId)
                 .selectAs(Textbook::getId,TextbookSubscriptionListVo::getTextbookId)
-                .selectAs(BaseCourseSubject::getName, TextbookSubscriptionListVo::getCourseSubjectIdCn)
+                .selectAs(BaseCourseSubject::getName, TextbookSubscriptionListVo::getCourseName)
                 .selectSum(BaseClassMajorSet::getTotalStudent, TextbookSubscriptionListVo::getStudentSubscriptionNumber)
                 .selectSum(BaseClassMajorSet::getTotalStudent, TextbookSubscriptionListVo::getStudentSubscriptionNumber)
                 .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookSubscriptionListVo.class).contains(x.getProperty()))
                 .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookSubscriptionListVo.class).contains(x.getProperty()))
                 .leftJoin(BaseClassCourse.class, BaseClassCourse::getCourseId, Textbook::getCourseSubjectId)
                 .leftJoin(BaseClassCourse.class, BaseClassCourse::getCourseId, Textbook::getCourseSubjectId)
@@ -140,7 +140,7 @@ public class TextbookController {
         textbookMPJLambdaWrapper
         textbookMPJLambdaWrapper
                 .select(Textbook::getId)
                 .select(Textbook::getId)
                 .selectAs(Textbook::getId,TextbookSubscriptionListVo::getTextbookId)
                 .selectAs(Textbook::getId,TextbookSubscriptionListVo::getTextbookId)
-                .selectAs(BaseCourseSubject::getName, TextbookSubscriptionListVo::getCourseSubjectIdCn)
+                .selectAs(BaseCourseSubject::getName, TextbookSubscriptionListVo::getCourseName)
                 .selectSum(BaseClassMajorSet::getTotalStudent, TextbookSubscriptionListVo::getStudentSubscriptionNumber)
                 .selectSum(BaseClassMajorSet::getTotalStudent, TextbookSubscriptionListVo::getStudentSubscriptionNumber)
                 .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookSubscriptionListVo.class).contains(x.getProperty()))
                 .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookSubscriptionListVo.class).contains(x.getProperty()))
                 .leftJoin(TextbookClassRelation.class, TextbookClassRelation::getTextbookId, Textbook::getId)
                 .leftJoin(TextbookClassRelation.class, TextbookClassRelation::getTextbookId, Textbook::getId)

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

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.textbook.service.impl;
 package com.xjrsoft.module.textbook.service.impl;
 
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
@@ -58,6 +59,7 @@ public class WfTextbookSubscriptionServiceImpl extends MPJBaseServiceImpl<WfText
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public Boolean add(WfTextbookSubscription wfTextbookSubscription) {
     public Boolean add(WfTextbookSubscription wfTextbookSubscription) {
+        wfTextbookSubscription.setApplicantUserId(StpUtil.getLoginIdAsLong());
         wfTextbookSubscription.setStatus(1);
         wfTextbookSubscription.setStatus(1);
         wfTextbookSubscription.setCreateDate(new Date());
         wfTextbookSubscription.setCreateDate(new Date());
         wfTextbookSubscriptionWfTextbookSubscriptionMapper.insert(wfTextbookSubscription);
         wfTextbookSubscriptionWfTextbookSubscriptionMapper.insert(wfTextbookSubscription);

+ 1 - 1
src/main/java/com/xjrsoft/module/textbook/vo/TextbookSubscriptionListVo.java

@@ -36,7 +36,7 @@ public class TextbookSubscriptionListVo {
      * 课程编号(base_course_subject)
      * 课程编号(base_course_subject)
      */
      */
     @ApiModelProperty("课程编号(base_course_subject)")
     @ApiModelProperty("课程编号(base_course_subject)")
-    private String courseSubjectIdCn;
+    private String courseName;
     /**
     /**
     * 书名
     * 书名
     */
     */

+ 3 - 1
src/main/resources/mapper/textbook/TextbookMapper.xml

@@ -12,7 +12,9 @@
         (SELECT GROUP_CONCAT(c2.name) FROM textbook_class_relation c1
         (SELECT GROUP_CONCAT(c2.name) FROM textbook_class_relation c1
         LEFT JOIN base_class c2 ON c1.class_id = c2.id
         LEFT JOIN base_class c2 ON c1.class_id = c2.id
         WHERE c1.textbook_id = t1.id) AS use_class,
         WHERE c1.textbook_id = t1.id) AS use_class,
-        t6.name AS use_grade,t1.version FROM textbook t1
+        t6.name AS use_grade,t1.version,
+        t1.use_type
+        FROM textbook t1
         LEFT JOIN subject_group t2 ON t1.subject_group_id = t2.id
         LEFT JOIN subject_group t2 ON t1.subject_group_id = t2.id
         LEFT JOIN base_semester t3 ON t1.base_semester_id = t3.id
         LEFT JOIN base_semester t3 ON t1.base_semester_id = t3.id
         LEFT JOIN base_course_subject t4 ON t1.course_subject_id = t4.id
         LEFT JOIN base_course_subject t4 ON t1.course_subject_id = t4.id