소스 검색

财务报销 功能优化

zhaoxian 2 년 전
부모
커밋
bbed31f5ad

+ 11 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/reimburse/mondule/controller/ReimburseProjectController.java

@@ -129,16 +129,23 @@ public class ReimburseProjectController {
         queryWrapper.eq("apply_id", applyId);
         List<ReimburseProject> list = reimburseProjectService.list(queryWrapper);
         Set<Object> urls = new HashSet<>();
+        Set<Object> excels = new HashSet<>();
         for (ReimburseProject project : list) {
             if (!Check.isNull(project.getFileUrls())) {
                 List<String> fileUrls = JSONArray.parseArray(project.getFileUrls().toString(), String.class);
-                if (Check.isNull(fileUrls)) {
-                    continue;
+                if (!Check.isNull(fileUrls)) {
+                    urls.addAll(fileUrls);
+                }
+                List<String> excelUrls = JSONArray.parseArray(project.getExcelUrls().toString(), String.class);
+                if (!Check.isNull(excelUrls)) {
+                    excels.addAll(excelUrls);
                 }
-                urls.addAll(fileUrls);
             }
         }
-        return Result.ok(urls);
+        JSONObject data = new JSONObject();
+        data.put("fileUrls", urls);
+        data.put("excelUrls", excels);
+        return Result.ok(excels);
     }
 
     /**

+ 2 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/reimburse/mondule/mapper/xml/ReimburseApplyMapper.xml

@@ -7,10 +7,7 @@
         SELECT * FROM (
         SELECT *, 1 as 'flag' FROM ctop_reimburse_apply
         where 1=1
-        <if test="financialReview == 1">
-            AND leader_id = ''
-        </if>
-        <if test="financialReview == null">
+        <if test="financialReview != 2">
             AND user_id = #{userId}
         </if>
         <if test="companyId != null and companyId != ''">
@@ -34,6 +31,7 @@
         where 1=1
         <if test="financialReview == 1">
             AND leader_id = ''
+            AND final_status = 1
         </if>
         <if test="financialReview == null">
             AND leader_id = #{userId}