Browse Source

提交企业收支结余互获取企业树

Signed-off-by: tangsong <86121657@qq.com>
tangsong 3 months ago
parent
commit
768839e44d

+ 12 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsEnterpriseBalanceStatistic/controller/FsEnterpriseBalanceStatisticController.java

@@ -58,6 +58,18 @@ public class FsEnterpriseBalanceStatisticController {
58
     @Resource
58
     @Resource
59
     private FsEnterpriseBalanceStatisticService fsEnterpriseBalanceStatisticService;
59
     private FsEnterpriseBalanceStatisticService fsEnterpriseBalanceStatisticService;
60
     /**
60
     /**
61
+     * 获取企业树
62
+     *
63
+     * @author TS
64
+     * @date  2024/08/05 10:23
65
+     */
66
+    @ApiOperationSupport(order =1)
67
+    @ApiOperation("获取企业树")
68
+    @GetMapping("/financialSupervision/fsEnterpriseBalanceStatistic/getUnitTree")
69
+    public CommonResult<UnitAndOrgTreeVO> getUnitTree() {
70
+        return CommonResult.data(fsEnterpriseBalanceStatisticService.getUnitTree());
71
+    }
72
+    /**
61
      * 获取企业和库区树
73
      * 获取企业和库区树
62
      *
74
      *
63
      * @author TS
75
      * @author TS

+ 4 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsEnterpriseBalanceStatistic/entity/VO/UnitAndOrgTreeVO.java

@@ -39,7 +39,10 @@ public class UnitAndOrgTreeVO   {
39
     @ApiModelProperty(value = "库区Id:库区id不为空数据表示是库区", position = 3)
39
     @ApiModelProperty(value = "库区Id:库区id不为空数据表示是库区", position = 3)
40
     private Integer orgId;
40
     private Integer orgId;
41
 
41
 
42
-    @ApiModelProperty(value = "下级数据", position = 4)
42
+    @ApiModelProperty(value = "企业Id:企业id不为空数据表示是企业", position = 4)
43
+    private String unitId;
44
+
45
+    @ApiModelProperty(value = "下级数据", position = 5)
43
     private List<UnitAndOrgTreeVO> child = new ArrayList<>();
46
     private List<UnitAndOrgTreeVO> child = new ArrayList<>();
44
 
47
 
45
 
48
 

+ 2 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsEnterpriseBalanceStatistic/mapper/mapping/FsEnterpriseBalanceStatisticMapper.xml

@@ -126,7 +126,8 @@ AND b.grain_variety_id =#{grainVarietyId} and b.standard_type = 1
126
     <select id="getUnitList" resultType="com.unis.financialSupervision.modular.fsEnterpriseBalanceStatistic.entity.VO.UnitAndOrgTreeVO">
126
     <select id="getUnitList" resultType="com.unis.financialSupervision.modular.fsEnterpriseBalanceStatistic.entity.VO.UnitAndOrgTreeVO">
127
         SELECT
127
         SELECT
128
             id,
128
             id,
129
-            dwmc as name
129
+            dwmc as name,
130
+            id  as unitId
130
         FROM
131
         FROM
131
             biz_unit_info
132
             biz_unit_info
132
         WHERE
133
         WHERE

+ 6 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsEnterpriseBalanceStatistic/service/FsEnterpriseBalanceStatisticService.java

@@ -78,4 +78,10 @@ public interface FsEnterpriseBalanceStatisticService extends IService<FsEnterpri
78
      * @param response
78
      * @param response
79
      */
79
      */
80
     void exportData(FsEnterpriseBalanceStatisticPageParam fsEnterpriseBalanceStatisticPageParam, HttpServletResponse response) throws IOException;
80
     void exportData(FsEnterpriseBalanceStatisticPageParam fsEnterpriseBalanceStatisticPageParam, HttpServletResponse response) throws IOException;
81
+
82
+    /**
83
+     * 获取企业树
84
+     * @return
85
+     */
86
+    UnitAndOrgTreeVO getUnitTree();
81
 }
87
 }

+ 19 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsEnterpriseBalanceStatistic/service/impl/FsEnterpriseBalanceStatisticServiceImpl.java

@@ -313,6 +313,25 @@ public class FsEnterpriseBalanceStatisticServiceImpl extends ServiceImpl<FsEnter
313
             }
313
             }
314
     }
314
     }
315
 
315
 
316
+    /**
317
+     * 获取企业树
318
+     *
319
+     * @return
320
+     */
321
+    @Override
322
+    public UnitAndOrgTreeVO getUnitTree() {
323
+        //得到第一个
324
+        UnitAndOrgTreeVO  root = fsEnterpriseBalanceStatisticMapper.getRootTree();
325
+        if (root != null){
326
+            //得到企业信息
327
+            List<UnitAndOrgTreeVO>  unitList = fsEnterpriseBalanceStatisticMapper.getUnitList();
328
+            if (unitList.size() >0) {
329
+                root.setChild(unitList);
330
+            }
331
+        }
332
+        return root;
333
+    }
334
+
316
 }
335
 }
317
 
336
 
318
 
337