Procházet zdrojové kódy

调整申购物品台账导出

dzx před 1 rokem
rodič
revize
068c7a39dc

+ 11 - 0
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;
     }

+ 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;
 
 }

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

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

+ 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