Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 1 rok pred
rodič
commit
57d757a9dc

+ 12 - 1
src/main/java/com/xjrsoft/module/ledger/service/impl/WfSubscriptionServiceImpl.java

@@ -119,9 +119,20 @@ public class WfSubscriptionServiceImpl extends MPJBaseServiceImpl<WfSubscription
     @Override
     public Page<WfSubscriptionPageVo> getPage(Page<WfSubscriptionPageVo> page, WfSubscriptionPageDto dto) {
         Page<WfSubscriptionPageVo> voPage = wfSubscriptionMapper.getPage(page, dto);
+        List<WfSubscriptionList> wfSubscriptionList = wfSubscriptionListMapper.selectList(
+                new QueryWrapper<WfSubscriptionList>().lambda().orderByAsc(WfSubscriptionList::getId)
+        );
+        Map<Long, String> flowMap = new HashMap<>();
+        for (WfSubscriptionList subscriptionList : wfSubscriptionList) {
+            if(flowMap.containsKey(subscriptionList.getParentId())){
+                continue;
+            }
+            flowMap.put(subscriptionList.getParentId(), subscriptionList.getNameOfThePurchasedItem());
+        }
         for (WfSubscriptionPageVo record : voPage.getRecords()) {
             List<File> list = fileService.list(Wrappers.lambdaQuery(File.class).eq(File::getFolderId, record.getFolderId()));
             record.setFileInfos(list);
+            record.setFlowName(flowMap.get(Long.valueOf(record.getId())));
         }
         return voPage;
     }
@@ -182,7 +193,7 @@ public class WfSubscriptionServiceImpl extends MPJBaseServiceImpl<WfSubscription
                 excelVo.setApplyDate(sdf.format(record.getShenQingRiQi4752()));
             }
 
-            excelVo.setFlowName(flowMap.get(record.getId()));
+            excelVo.setFlowName(flowMap.get(Long.valueOf(record.getId())));
             result.add(excelVo);
         }
         return result;

+ 4 - 1
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionExcelVo.java

@@ -53,6 +53,9 @@ public class WfSubscriptionExcelVo {
     @ApiModelProperty("申请人")
     private String userName;
 
-
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("金额")
+    @ApiModelProperty("金额")
+    private Double totalAmount;
 
 }

+ 10 - 0
src/main/java/com/xjrsoft/module/ledger/vo/WfSubscriptionPageVo.java

@@ -62,4 +62,14 @@ public class WfSubscriptionPageVo {
     @ApiModelProperty("编号")
     private String number;
 
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("流程名称")
+    @ApiModelProperty("流程名称")
+    private String flowName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("金额")
+    @ApiModelProperty("金额")
+    private Double totalAmount;
+
 }

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

@@ -194,9 +194,7 @@ public class TextbookController {
             baseSemesterLambdaQueryWrapper
                     .eq(BaseSemester::getId, dto.getBaseSemesterId());
             BaseSemester baseSemester = baseSemesterService.getOne(baseSemesterLambdaQueryWrapper);
-            if(baseSemester != null){
-                baseSemesterCn = baseSemester.getName();
-            }
+            baseSemesterCn = baseSemester.getName();
         }
         String headTitle = "重庆市铜梁职业教育中心" + baseSemesterCn + "教材征订表";
         List<List<String>> headList = new ArrayList<>();

+ 2 - 2
src/main/resources/mapper/ledger/WfSubscriptionMapper.xml

@@ -4,7 +4,7 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.ledger.mapper.WfSubscriptionMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
-        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id,t1.number from wf_subscription t1
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
         left join xjr_department t2 on t1.application_department = t2.id
         left join xjr_user t3 on t1.user_id = t3.id
         where 1 = 1
@@ -21,7 +21,7 @@
     </select>
 
     <select id="getList" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
-        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752, t1.folder_id,t1.number from wf_subscription t1
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752, t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
         left join xjr_department t2 on t1.application_department = t2.id
         left join xjr_user t3 on t1.user_id = t3.id
         where 1 = 1

+ 11 - 20
src/main/resources/mapper/textbook/TextbookMapper.xml

@@ -186,13 +186,13 @@
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t1.textbook_type = #{dto.textbookType}
         </if>
-        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
+        <if test="dto.baseSemesterId != null">
             and t1.base_semester_id = #{dto.baseSemesterId}
         </if>
-        <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
+        <if test="dto.subjectGroupId != null">
             and t1.subject_group_id = #{dto.subjectGroupId}
         </if>
-        <if test="dto.courseSubjectId != null and dto.courseSubjectId > 0">
+        <if test="dto.courseSubjectId != null">
             and t1.course_subject_id = #{dto.courseSubjectId}
         </if>
         <if test="dto.bookName != null and dto.bookName != ''">
@@ -238,13 +238,13 @@
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t8.textbook_type = #{dto.textbookType}
         </if>
-        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
+        <if test="dto.baseSemesterId != null">
             and t8.base_semester_id = #{dto.baseSemesterId}
         </if>
-        <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
+        <if test="dto.subjectGroupId != null">
             and t8.subject_group_id = #{dto.subjectGroupId}
         </if>
-        <if test="dto.courseSubjectId != null and dto.courseSubjectId > 0">
+        <if test="dto.courseSubjectId != null">
             and t8.course_subject_id = #{dto.courseSubjectId}
         </if>
         <if test="dto.bookName != null and dto.bookName != ''">
@@ -271,24 +271,20 @@
                 left join wf_textbook_claim_item t1 on t1.wf_textbook_claim_id = t.id
                 left join textbook t2 on t2.id = t1.textbook_id
             where claim_type = 'claim_student'
-            <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
+            <if test="dto.baseSemesterId != null">
                 amd t.base_semester_id = #{dto.baseSemesterId}
             </if>
-            <if test="dto.classId != null and dto.classId > 0">
+            <if test="dto.classId != null">
                 and t.class_id = #{dto.classId}
             </if>
-            <if test="dto.textbookId != null and dto.textbookId > 0">
+            <if test="dto.textbookId != null">
                 and t1.textbook_id = #{dto.textbookId}
             </if>
             group by t.base_semester_id, t.class_id, t1.textbook_id
         )
         select
             t.base_semester_id,
-            t6.name as baseSemesterIdCn,
             t.class_id,
-            t3.name as classIdCn,
-            t4.name as headTeacherName,
-            t5.name as classRoomName,
             t.textbook_id,
             t2.name as textbookTypeCn,
             t1.book_name,
@@ -302,18 +298,14 @@
         from textbook_class t
             left join textbook t1 on t1.id = t.textbook_id
             left join xjr_dictionary_detail t2 on t2.code = t1.textbook_type
-            left join base_class t3 on t3.id = t.class_id
-            LEFT JOIN xjr_user t4 ON t4.id = t3.teacher_id
-            LEFT JOIN base_classroom t5 ON t5.id = t3.classroom_id
-            LEFT JOIN base_semester t6 ON t6.id = t.base_semester_id
         <where>
             <if test="dto.textbookType != null and dto.textbookType != ''">
                 and t1.textbook_type = #{dto.textbookType}
             </if>
-            <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
+            <if test="dto.subjectGroupId != null">
                 and t1.subject_group_id = #{dto.subjectGroupId}
             </if>
-            <if test="dto.courseSubjectId != null and dto.courseSubjectId > 0">
+            <if test="dto.courseSubjectId != null">
                 and t1.course_subject_id = #{dto.courseSubjectId}
             </if>
             <if test="dto.bookName != null and dto.bookName != ''">
@@ -326,6 +318,5 @@
                 and t1.issn like concat('%', #{dto.issn}, '%')
             </if>
         </where>
-        ORDER by t2.name desc
     </select>
 </mapper>