Commit 73d372b34b6fad52b560b437cd57d3d612c09cb5
1 parent
5dfe53c0
Exists in
master
收支明细导出
Showing
17 changed files
with
1027 additions
and
6 deletions
Show diff stats
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WCurrentController.java
@@ -71,14 +71,13 @@ public class WCurrentController extends BaseController<WCurrentManager, WCurrent | @@ -71,14 +71,13 @@ public class WCurrentController extends BaseController<WCurrentManager, WCurrent | ||
71 | } | 71 | } |
72 | 72 | ||
73 | /** | 73 | /** |
74 | - * 导出 | 74 | + * 正常账户可用余额导出 |
75 | * | 75 | * |
76 | * @param response | 76 | * @param response |
77 | * @throws Exception | 77 | * @throws Exception |
78 | */ | 78 | */ |
79 | - @GetMapping("exportYchzb") | ||
80 | - public void exportYchzb(HttpServletResponse response, String date) throws Exception { | ||
81 | -// date="2024-07-04"; | 79 | + @GetMapping("accountBalanceExport") |
80 | + public void accountBalanceDl(HttpServletResponse response, String date) throws Exception { | ||
82 | HashMap map = new HashMap(); | 81 | HashMap map = new HashMap(); |
83 | map.put("date", date); | 82 | map.put("date", date); |
84 | List<String> gslxList = baseService.getCurrentOrgTypeList(); | 83 | List<String> gslxList = baseService.getCurrentOrgTypeList(); |
@@ -114,7 +113,7 @@ public class WCurrentController extends BaseController<WCurrentManager, WCurrent | @@ -114,7 +113,7 @@ public class WCurrentController extends BaseController<WCurrentManager, WCurrent | ||
114 | list.add(hzMap); | 113 | list.add(hzMap); |
115 | 114 | ||
116 | map.put("list", list); | 115 | map.put("list", list); |
117 | - TemplateExportParams params = new TemplateExportParams("doc/hqzhAll.xls"); | 116 | + TemplateExportParams params = new TemplateExportParams("doc/accountBalanceExport.xls"); |
118 | params.setColForEach(true); | 117 | params.setColForEach(true); |
119 | Workbook workbook = ExcelExportUtil.exportExcel(params, map); | 118 | Workbook workbook = ExcelExportUtil.exportExcel(params, map); |
120 | String filedisplay = "正常账户可用余额.xls"; | 119 | String filedisplay = "正常账户可用余额.xls"; |
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceController.java
0 → 100644
@@ -0,0 +1,156 @@ | @@ -0,0 +1,156 @@ | ||
1 | +package com.hotent.chkpower.controller; | ||
2 | + | ||
3 | + | ||
4 | +import cn.afterturn.easypoi.excel.ExcelExportUtil; | ||
5 | +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; | ||
6 | +import com.hotent.base.query.PageBean; | ||
7 | +import com.hotent.base.query.QueryFilter; | ||
8 | +import com.hotent.base.query.QueryOP; | ||
9 | +import com.hotent.bo.model.BoDef; | ||
10 | +import com.hotent.chkpower.manager.WCurrentManager; | ||
11 | +import com.hotent.runtime.model.BpmAutoStartConf; | ||
12 | +import org.apache.poi.ss.usermodel.Workbook; | ||
13 | +import org.springframework.web.bind.annotation.GetMapping; | ||
14 | +import org.springframework.web.bind.annotation.PostMapping; | ||
15 | +import org.springframework.web.bind.annotation.RequestBody; | ||
16 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
17 | +import org.springframework.web.bind.annotation.RequestParam; | ||
18 | +import com.hotent.base.model.CommonResult; | ||
19 | +import com.hotent.base.util.StringUtil; | ||
20 | +import io.swagger.annotations.ApiOperation; | ||
21 | +import io.swagger.annotations.ApiParam; | ||
22 | +import org.springframework.web.bind.annotation.RestController; | ||
23 | +import com.hotent.base.controller.BaseController; | ||
24 | +import com.hotent.chkpower.model.WFinance; | ||
25 | +import com.hotent.chkpower.manager.WFinanceManager; | ||
26 | + | ||
27 | +import javax.annotation.Resource; | ||
28 | +import javax.servlet.http.HttpServletResponse; | ||
29 | +import java.io.OutputStream; | ||
30 | +import java.math.BigDecimal; | ||
31 | +import java.net.URLEncoder; | ||
32 | +import java.util.ArrayList; | ||
33 | +import java.util.HashMap; | ||
34 | +import java.util.List; | ||
35 | +import java.util.Objects; | ||
36 | + | ||
37 | +/** | ||
38 | + * 运营公司收支 前端控制器 | ||
39 | + * | ||
40 | + * @company 广州宏天软件股份有限公司 | ||
41 | + * @author cw | ||
42 | + * @since 2024-07-08 | ||
43 | + */ | ||
44 | +@RestController | ||
45 | +@RequestMapping("/wFinance/v1/") | ||
46 | +public class WFinanceController extends BaseController<WFinanceManager, WFinance> { | ||
47 | + @Resource | ||
48 | + private WCurrentManager wCurrentManager; | ||
49 | + | ||
50 | + /** | ||
51 | + * 根据id获取运营公司收支数据详情 | ||
52 | + * @param id | ||
53 | + * @return | ||
54 | + * @throws Exception | ||
55 | + * ModelAndView | ||
56 | + */ | ||
57 | + @GetMapping(value="/getDetail") | ||
58 | + @ApiOperation(value="根据id获取运营公司收支数据详情",httpMethod = "GET",notes = "根据id获取运营公司收支数据详情") | ||
59 | + public CommonResult<WFinance> getDetail(@ApiParam(name="id",value="业务对象主键", required = true)@RequestParam(required=true) String id) throws Exception{ | ||
60 | + return CommonResult.<WFinance>ok().value(baseService.getDetail(id)); | ||
61 | + } | ||
62 | + /** | ||
63 | + * 新增,更新运营公司收支 | ||
64 | + * @param wFinance | ||
65 | + * @throws Exception | ||
66 | + * @return | ||
67 | + * @exception | ||
68 | + */ | ||
69 | + @PostMapping(value="/save") | ||
70 | + @ApiOperation(value = "新增,更新运营公司收支数据", httpMethod = "POST", notes = "新增,更新运营公司收支数据") | ||
71 | + public CommonResult<String> save(@ApiParam(name="WFinance",value="运营公司收支对象", required = true)@RequestBody WFinance wFinance) throws Exception{ | ||
72 | + String msg = StringUtil.isEmpty(wFinance.getId()) ? "添加运营公司收支成功" : "更新运营公司收支成功"; | ||
73 | + baseService.createOrUpdate(wFinance); | ||
74 | + return CommonResult.<String>ok().message(msg); | ||
75 | + } | ||
76 | + | ||
77 | + | ||
78 | + /** | ||
79 | + * 公司收支明细导出 | ||
80 | + * @param response | ||
81 | + * @param date | ||
82 | + * @throws Exception | ||
83 | + */ | ||
84 | + @GetMapping("transactionDetailsExport") | ||
85 | + public void transactionDetailsExport(HttpServletResponse response, String date) throws Exception { | ||
86 | + HashMap map = new HashMap(); | ||
87 | + map.put("date", date); | ||
88 | + List<String> gslxList = wCurrentManager.getCurrentOrgTypeList(); | ||
89 | + List<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>(); | ||
90 | + BigDecimal F_total_income_zh = new BigDecimal(0.00); | ||
91 | + BigDecimal F_total_disbursement_zh = new BigDecimal(0.00); | ||
92 | + BigDecimal F_total_net_cash_flow_zh = new BigDecimal(0.00); | ||
93 | + int Serial_Number=1; | ||
94 | + for (String orgType : gslxList) { | ||
95 | + List<HashMap<String, String>> listData = baseService.getTransactionDetailsList(orgType, date + " 00:00:00"); | ||
96 | + if (listData != null && listData.size() > 0) { | ||
97 | + for (HashMap<String, String> datum : listData) { | ||
98 | + datum.put("Serial_Number",String.valueOf(Serial_Number++)); | ||
99 | + } | ||
100 | + BigDecimal F_total_income = listData.stream() | ||
101 | + .filter(d -> d.containsKey("F_total_income")) | ||
102 | + .map(d -> {Object value = d.get("F_total_income");if (value instanceof Number) {return new BigDecimal(value.toString());}return new BigDecimal(0.00); | ||
103 | + }).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add); | ||
104 | + | ||
105 | + BigDecimal F_total_disbursement = listData.stream() | ||
106 | + .filter(d -> d.containsKey("F_total_disbursement")) | ||
107 | + .map(d -> {Object value = d.get("F_total_disbursement");if (value instanceof Number) {return new BigDecimal(value.toString());}return new BigDecimal(0.00); | ||
108 | + }).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add); | ||
109 | + | ||
110 | + BigDecimal F_total_net_cash_flow = listData.stream() | ||
111 | + .filter(d -> d.containsKey("F_total_net_cash_flow")) | ||
112 | + .map(d -> {Object value = d.get("F_total_net_cash_flow");if (value instanceof Number) {return new BigDecimal(value.toString());}return new BigDecimal(0.00); | ||
113 | + }).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add); | ||
114 | + HashMap<String, String> hzMap = new HashMap<>(); | ||
115 | + hzMap.put("F_org_type", "小计("+orgType+")"); | ||
116 | + hzMap.put("F_org_name", ""); | ||
117 | + hzMap.put("F_total_income", String.valueOf(F_total_income)); | ||
118 | + hzMap.put("F_total_disbursement", String.valueOf(F_total_disbursement)); | ||
119 | + hzMap.put("F_total_net_cash_flow", String.valueOf(F_total_net_cash_flow)); | ||
120 | + | ||
121 | + F_total_income_zh=F_total_income_zh.add(F_total_income); | ||
122 | + F_total_disbursement_zh=F_total_disbursement_zh.add(F_total_disbursement); | ||
123 | + F_total_net_cash_flow_zh=F_total_net_cash_flow_zh.add(F_total_net_cash_flow); | ||
124 | + listData.add(hzMap); | ||
125 | + list.addAll(listData); | ||
126 | + } | ||
127 | + } | ||
128 | + HashMap<String, String> hzMap = new HashMap<>(); | ||
129 | + hzMap.put("F_org_type", "汇总"); | ||
130 | + hzMap.put("F_org_name", ""); | ||
131 | + hzMap.put("F_total_income", String.valueOf(F_total_income_zh)); | ||
132 | + hzMap.put("F_total_disbursement", String.valueOf(F_total_disbursement_zh)); | ||
133 | + hzMap.put("F_total_net_cash_flow", String.valueOf(F_total_net_cash_flow_zh)); | ||
134 | + list.add(hzMap); | ||
135 | + map.put("list", list); | ||
136 | + TemplateExportParams params = new TemplateExportParams("doc/transactionDetailsExport.xls"); | ||
137 | + params.setColForEach(true); | ||
138 | + Workbook workbook = ExcelExportUtil.exportExcel(params, map); | ||
139 | + String filedisplay = "公司收支明细.xls"; | ||
140 | + response.setContentType("APPLICATION/OCTET-STREAM"); | ||
141 | + response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); | ||
142 | + response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filedisplay, "utf-8")); | ||
143 | + OutputStream os = null; | ||
144 | + try { | ||
145 | + os = response.getOutputStream(); | ||
146 | + workbook.write(os); | ||
147 | + os.flush(); | ||
148 | + os.close(); | ||
149 | + } catch (Exception e) { | ||
150 | + e.printStackTrace(); | ||
151 | + } finally { | ||
152 | + if (os != null) | ||
153 | + os.close(); | ||
154 | + } | ||
155 | + } | ||
156 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WFinanceDetailController.java
0 → 100644
@@ -0,0 +1,73 @@ | @@ -0,0 +1,73 @@ | ||
1 | +package com.hotent.chkpower.controller; | ||
2 | + | ||
3 | + | ||
4 | +import cn.afterturn.easypoi.excel.ExcelExportUtil; | ||
5 | +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; | ||
6 | +import com.hotent.chkpower.manager.WCurrentManager; | ||
7 | +import org.apache.poi.ss.usermodel.Workbook; | ||
8 | +import org.springframework.web.bind.annotation.GetMapping; | ||
9 | +import org.springframework.web.bind.annotation.PostMapping; | ||
10 | +import org.springframework.web.bind.annotation.RequestBody; | ||
11 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
12 | +import org.springframework.web.bind.annotation.RequestParam; | ||
13 | +import com.hotent.base.model.CommonResult; | ||
14 | +import com.hotent.base.util.StringUtil; | ||
15 | +import io.swagger.annotations.ApiOperation; | ||
16 | +import io.swagger.annotations.ApiParam; | ||
17 | +import org.springframework.web.bind.annotation.RestController; | ||
18 | +import com.hotent.base.controller.BaseController; | ||
19 | +import com.hotent.chkpower.model.WFinanceDetail; | ||
20 | +import com.hotent.chkpower.manager.WFinanceDetailManager; | ||
21 | + | ||
22 | +import javax.annotation.Resource; | ||
23 | +import javax.servlet.http.HttpServletResponse; | ||
24 | +import java.io.OutputStream; | ||
25 | +import java.math.BigDecimal; | ||
26 | +import java.net.URLEncoder; | ||
27 | +import java.util.ArrayList; | ||
28 | +import java.util.HashMap; | ||
29 | +import java.util.List; | ||
30 | +import java.util.Objects; | ||
31 | + | ||
32 | +/** | ||
33 | + * 运营公司收支明细 前端控制器 | ||
34 | + * | ||
35 | + * @company 广州宏天软件股份有限公司 | ||
36 | + * @author cw | ||
37 | + * @since 2024-07-08 | ||
38 | + */ | ||
39 | +@RestController | ||
40 | +@RequestMapping("/wFinanceDetail/v1/") | ||
41 | +public class WFinanceDetailController extends BaseController<WFinanceDetailManager, WFinanceDetail> { | ||
42 | + | ||
43 | + | ||
44 | + /** | ||
45 | + * 根据id获取运营公司收支明细数据详情 | ||
46 | + * @param id | ||
47 | + * @return | ||
48 | + * @throws Exception | ||
49 | + * ModelAndView | ||
50 | + */ | ||
51 | + @GetMapping(value="/getDetail") | ||
52 | + @ApiOperation(value="根据id获取运营公司收支明细数据详情",httpMethod = "GET",notes = "根据id获取运营公司收支明细数据详情") | ||
53 | + public CommonResult<WFinanceDetail> getDetail(@ApiParam(name="id",value="业务对象主键", required = true)@RequestParam(required=true) String id) throws Exception{ | ||
54 | + return CommonResult.<WFinanceDetail>ok().value(baseService.getDetail(id)); | ||
55 | + } | ||
56 | + /** | ||
57 | + * 新增,更新运营公司收支明细 | ||
58 | + * @param wFinanceDetail | ||
59 | + * @throws Exception | ||
60 | + * @return | ||
61 | + * @exception | ||
62 | + */ | ||
63 | + @PostMapping(value="/save") | ||
64 | + @ApiOperation(value = "新增,更新运营公司收支明细数据", httpMethod = "POST", notes = "新增,更新运营公司收支明细数据") | ||
65 | + public CommonResult<String> save(@ApiParam(name="WFinanceDetail",value="运营公司收支明细对象", required = true)@RequestBody WFinanceDetail wFinanceDetail) throws Exception{ | ||
66 | + String msg = StringUtil.isEmpty(wFinanceDetail.getId()) ? "添加运营公司收支明细成功" : "更新运营公司收支明细成功"; | ||
67 | + baseService.createOrUpdate(wFinanceDetail); | ||
68 | + return CommonResult.<String>ok().message(msg); | ||
69 | + } | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/dao/WFinanceDao.java
0 → 100644
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +package com.hotent.chkpower.dao; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinance; | ||
4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | + | ||
7 | +import java.util.HashMap; | ||
8 | +import java.util.List; | ||
9 | + | ||
10 | +/** | ||
11 | + * 运营公司收支 Mapper 接口 | ||
12 | + * | ||
13 | + * @company 广州宏天软件股份有限公司 | ||
14 | + * @author cw | ||
15 | + * @since 2024-07-08 | ||
16 | + */ | ||
17 | +public interface WFinanceDao extends BaseMapper<WFinance> { | ||
18 | + | ||
19 | + List<HashMap<String, String>> getTransactionDetailsList(@Param("fOrgType") String fOrgType, @Param("fDate") String fDate); | ||
20 | + | ||
21 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/dao/WFinanceDetailDao.java
0 → 100644
@@ -0,0 +1,15 @@ | @@ -0,0 +1,15 @@ | ||
1 | +package com.hotent.chkpower.dao; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinanceDetail; | ||
4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
5 | + | ||
6 | +/** | ||
7 | + * 运营公司收支明细 Mapper 接口 | ||
8 | + * | ||
9 | + * @company 广州宏天软件股份有限公司 | ||
10 | + * @author cw | ||
11 | + * @since 2024-07-08 | ||
12 | + */ | ||
13 | +public interface WFinanceDetailDao extends BaseMapper<WFinanceDetail> { | ||
14 | + | ||
15 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WFinanceDetailManager.java
0 → 100644
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +package com.hotent.chkpower.manager; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinanceDetail; | ||
4 | +import com.hotent.base.manager.BaseManager; | ||
5 | + | ||
6 | +/** | ||
7 | + * 运营公司收支明细 服务类 | ||
8 | + * | ||
9 | + * @company 广州宏天软件股份有限公司 | ||
10 | + * @author cw | ||
11 | + * @since 2024-07-08 | ||
12 | + */ | ||
13 | +public interface WFinanceDetailManager extends BaseManager<WFinanceDetail> { | ||
14 | + /** | ||
15 | + * 根据主键获取详情 | ||
16 | + * @param id | ||
17 | + * @return | ||
18 | + */ | ||
19 | + WFinanceDetail getDetail(String id); | ||
20 | + /** | ||
21 | + * 新建、更新运营公司收支明细 | ||
22 | + * @param wFinanceDetail | ||
23 | + * @return | ||
24 | + */ | ||
25 | + void createOrUpdate(WFinanceDetail wFinanceDetail); | ||
26 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WFinanceManager.java
0 → 100644
@@ -0,0 +1,31 @@ | @@ -0,0 +1,31 @@ | ||
1 | +package com.hotent.chkpower.manager; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinance; | ||
4 | +import com.hotent.base.manager.BaseManager; | ||
5 | + | ||
6 | +import java.util.HashMap; | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +/** | ||
10 | + * 运营公司收支 服务类 | ||
11 | + * | ||
12 | + * @company 广州宏天软件股份有限公司 | ||
13 | + * @author cw | ||
14 | + * @since 2024-07-08 | ||
15 | + */ | ||
16 | +public interface WFinanceManager extends BaseManager<WFinance> { | ||
17 | + /** | ||
18 | + * 根据主键获取详情 | ||
19 | + * @param id | ||
20 | + * @return | ||
21 | + */ | ||
22 | + WFinance getDetail(String id); | ||
23 | + /** | ||
24 | + * 新建、更新运营公司收支 | ||
25 | + * @param wFinance | ||
26 | + * @return | ||
27 | + */ | ||
28 | + void createOrUpdate(WFinance wFinance); | ||
29 | + | ||
30 | + List<HashMap<String, String>> getTransactionDetailsList(String orgType, String date); | ||
31 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WFinanceDetailManagerImpl.java
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +package com.hotent.chkpower.manager.impl; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinanceDetail; | ||
4 | +import com.hotent.chkpower.dao.WFinanceDetailDao; | ||
5 | +import com.hotent.chkpower.manager.WFinanceDetailManager; | ||
6 | +import com.hotent.base.manager.impl.BaseManagerImpl; | ||
7 | +import org.springframework.stereotype.Service; | ||
8 | +import org.springframework.transaction.annotation.Transactional; | ||
9 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
10 | +import java.util.List; | ||
11 | +import javax.annotation.Resource; | ||
12 | +import com.hotent.base.util.BeanUtils; | ||
13 | + | ||
14 | + | ||
15 | +/** | ||
16 | + * 运营公司收支明细 服务实现类 | ||
17 | + * | ||
18 | + * @company 广州宏天软件股份有限公司 | ||
19 | + * @author cw | ||
20 | + * @since 2024-07-08 | ||
21 | + */ | ||
22 | +@Service | ||
23 | +public class WFinanceDetailManagerImpl extends BaseManagerImpl<WFinanceDetailDao, WFinanceDetail> implements WFinanceDetailManager { | ||
24 | + | ||
25 | + @Override | ||
26 | + public WFinanceDetail getDetail(String id) { | ||
27 | + WFinanceDetail wFinanceDetail = this.get(id); | ||
28 | + | ||
29 | + | ||
30 | + return wFinanceDetail; | ||
31 | + } | ||
32 | + @Override | ||
33 | + @Transactional | ||
34 | + public void createOrUpdate(WFinanceDetail wFinanceDetail) { | ||
35 | + //新建或更新 | ||
36 | + this.saveOrUpdate(wFinanceDetail); | ||
37 | + } | ||
38 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WFinanceManagerImpl.java
0 → 100644
@@ -0,0 +1,46 @@ | @@ -0,0 +1,46 @@ | ||
1 | +package com.hotent.chkpower.manager.impl; | ||
2 | + | ||
3 | +import com.hotent.chkpower.model.WFinance; | ||
4 | +import com.hotent.chkpower.dao.WFinanceDao; | ||
5 | +import com.hotent.chkpower.manager.WFinanceManager; | ||
6 | +import com.hotent.base.manager.impl.BaseManagerImpl; | ||
7 | +import org.springframework.stereotype.Service; | ||
8 | +import org.springframework.transaction.annotation.Transactional; | ||
9 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
10 | + | ||
11 | +import java.util.Collections; | ||
12 | +import java.util.HashMap; | ||
13 | +import java.util.List; | ||
14 | +import javax.annotation.Resource; | ||
15 | +import com.hotent.base.util.BeanUtils; | ||
16 | + | ||
17 | + | ||
18 | +/** | ||
19 | + * 运营公司收支 服务实现类 | ||
20 | + * | ||
21 | + * @company 广州宏天软件股份有限公司 | ||
22 | + * @author cw | ||
23 | + * @since 2024-07-08 | ||
24 | + */ | ||
25 | +@Service | ||
26 | +public class WFinanceManagerImpl extends BaseManagerImpl<WFinanceDao, WFinance> implements WFinanceManager { | ||
27 | + | ||
28 | + @Override | ||
29 | + public WFinance getDetail(String id) { | ||
30 | + WFinance wFinance = this.get(id); | ||
31 | + | ||
32 | + | ||
33 | + return wFinance; | ||
34 | + } | ||
35 | + @Override | ||
36 | + @Transactional | ||
37 | + public void createOrUpdate(WFinance wFinance) { | ||
38 | + //新建或更新 | ||
39 | + this.saveOrUpdate(wFinance); | ||
40 | + } | ||
41 | + | ||
42 | + @Override | ||
43 | + public List<HashMap<String, String>> getTransactionDetailsList(String orgType, String date) { | ||
44 | + return baseMapper.getTransactionDetailsList(orgType,date); | ||
45 | + } | ||
46 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WFinance.java
0 → 100644
@@ -0,0 +1,311 @@ | @@ -0,0 +1,311 @@ | ||
1 | +package com.hotent.chkpower.model; | ||
2 | + | ||
3 | +import java.math.BigDecimal; | ||
4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
5 | +import com.hotent.base.entity.BaseModel; | ||
6 | +import com.baomidou.mybatisplus.extension.activerecord.Model; | ||
7 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
8 | +import java.time.LocalDateTime; | ||
9 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
10 | +import java.io.Serializable; | ||
11 | +import io.swagger.annotations.ApiModel; | ||
12 | +import io.swagger.annotations.ApiModelProperty; | ||
13 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
14 | +/** | ||
15 | + * 运营公司收支 | ||
16 | + * | ||
17 | + * @company 广州宏天软件股份有限公司 | ||
18 | + * @author cw | ||
19 | + * @since 2024-07-08 | ||
20 | + */ | ||
21 | +@ApiModel(value="WFinance对象", description="运营公司收支") | ||
22 | +public class WFinance extends BaseModel<WFinance> { | ||
23 | + | ||
24 | + private static final long serialVersionUID = 1L; | ||
25 | + @ApiModelProperty(value = "主键") | ||
26 | + @TableId(value = "ID_", type = IdType.ASSIGN_ID) | ||
27 | + @JsonProperty("id") | ||
28 | + private String id; | ||
29 | + | ||
30 | + @ApiModelProperty(value = "外键") | ||
31 | + @TableField("REF_ID_") | ||
32 | + @JsonProperty("refId") | ||
33 | + private String refId; | ||
34 | + | ||
35 | + @ApiModelProperty(value = "公司") | ||
36 | + @TableField("F_org_name") | ||
37 | + @JsonProperty("fOrgName") | ||
38 | + private String fOrgName; | ||
39 | + | ||
40 | + @ApiModelProperty(value = "公司id") | ||
41 | + @TableField("F_org_id") | ||
42 | + @JsonProperty("fOrgId") | ||
43 | + private String fOrgId; | ||
44 | + | ||
45 | + @ApiModelProperty(value = "日期") | ||
46 | + @TableField("F_date") | ||
47 | + @JsonProperty("fDate") | ||
48 | + private LocalDateTime fDate; | ||
49 | + | ||
50 | + @ApiModelProperty(value = "创建人") | ||
51 | + @TableField("F_create_by") | ||
52 | + @JsonProperty("fCreateBy") | ||
53 | + private String fCreateBy; | ||
54 | + | ||
55 | + @ApiModelProperty(value = "创建人id") | ||
56 | + @TableField("F_create_id") | ||
57 | + @JsonProperty("fCreateId") | ||
58 | + private String fCreateId; | ||
59 | + | ||
60 | + @ApiModelProperty(value = "创建时间") | ||
61 | + @TableField("F_create_time") | ||
62 | + @JsonProperty("fCreateTime") | ||
63 | + private LocalDateTime fCreateTime; | ||
64 | + | ||
65 | + @ApiModelProperty(value = "修改人") | ||
66 | + @TableField("F_update_by") | ||
67 | + @JsonProperty("fUpdateBy") | ||
68 | + private String fUpdateBy; | ||
69 | + | ||
70 | + @ApiModelProperty(value = "修改人id") | ||
71 | + @TableField("F_update_id") | ||
72 | + @JsonProperty("fUpdateId") | ||
73 | + private String fUpdateId; | ||
74 | + | ||
75 | + @ApiModelProperty(value = "修改时间") | ||
76 | + @TableField("F_update_time") | ||
77 | + @JsonProperty("fUpdateTime") | ||
78 | + private LocalDateTime fUpdateTime; | ||
79 | + | ||
80 | + @ApiModelProperty(value = "表单数据版本") | ||
81 | + @TableField("F_form_data_rev_") | ||
82 | + @JsonProperty("fFormDataRev") | ||
83 | + private Long fFormDataRev; | ||
84 | + | ||
85 | + @ApiModelProperty(value = "核对状态") | ||
86 | + @TableField("F_insp_status_name") | ||
87 | + @JsonProperty("fInspStatusName") | ||
88 | + private String fInspStatusName; | ||
89 | + | ||
90 | + @ApiModelProperty(value = "核对时间") | ||
91 | + @TableField("F_insp_time") | ||
92 | + @JsonProperty("fInspTime") | ||
93 | + private LocalDateTime fInspTime; | ||
94 | + | ||
95 | + @ApiModelProperty(value = "核对备注") | ||
96 | + @TableField("F_insp_notes") | ||
97 | + @JsonProperty("fInspNotes") | ||
98 | + private String fInspNotes; | ||
99 | + | ||
100 | + @ApiModelProperty(value = "核对人id") | ||
101 | + @TableField("F_insp_id") | ||
102 | + @JsonProperty("fInspId") | ||
103 | + private String fInspId; | ||
104 | + | ||
105 | + @ApiModelProperty(value = "核对人") | ||
106 | + @TableField("F_insp_by") | ||
107 | + @JsonProperty("fInspBy") | ||
108 | + private String fInspBy; | ||
109 | + | ||
110 | + @ApiModelProperty(value = "总收入") | ||
111 | + @TableField("F_total_income") | ||
112 | + @JsonProperty("fTotalIncome") | ||
113 | + private BigDecimal fTotalIncome; | ||
114 | + | ||
115 | + @ApiModelProperty(value = "总支出") | ||
116 | + @TableField("F_total_disbursement") | ||
117 | + @JsonProperty("fTotalDisbursement") | ||
118 | + private BigDecimal fTotalDisbursement; | ||
119 | + | ||
120 | + @ApiModelProperty(value = "净现金流") | ||
121 | + @TableField("F_total_net_cash_flow") | ||
122 | + @JsonProperty("fTotalNetCashFlow") | ||
123 | + private BigDecimal fTotalNetCashFlow; | ||
124 | + | ||
125 | + @ApiModelProperty(value = "公司类型") | ||
126 | + @TableField("F_org_type") | ||
127 | + @JsonProperty("fOrgType") | ||
128 | + private String fOrgType; | ||
129 | + | ||
130 | + | ||
131 | + public String getId() { | ||
132 | + return id; | ||
133 | + } | ||
134 | + | ||
135 | + public void setId(String id) { | ||
136 | + this.id = id; | ||
137 | + } | ||
138 | + public String getRefId() { | ||
139 | + return refId; | ||
140 | + } | ||
141 | + | ||
142 | + public void setRefId(String refId) { | ||
143 | + this.refId = refId; | ||
144 | + } | ||
145 | + public String getFOrgName() { | ||
146 | + return fOrgName; | ||
147 | + } | ||
148 | + | ||
149 | + public void setFOrgName(String fOrgName) { | ||
150 | + this.fOrgName = fOrgName; | ||
151 | + } | ||
152 | + public String getFOrgId() { | ||
153 | + return fOrgId; | ||
154 | + } | ||
155 | + | ||
156 | + public void setFOrgId(String fOrgId) { | ||
157 | + this.fOrgId = fOrgId; | ||
158 | + } | ||
159 | + public LocalDateTime getFDate() { | ||
160 | + return fDate; | ||
161 | + } | ||
162 | + | ||
163 | + public void setFDate(LocalDateTime fDate) { | ||
164 | + this.fDate = fDate; | ||
165 | + } | ||
166 | + public String getFCreateBy() { | ||
167 | + return fCreateBy; | ||
168 | + } | ||
169 | + | ||
170 | + public void setFCreateBy(String fCreateBy) { | ||
171 | + this.fCreateBy = fCreateBy; | ||
172 | + } | ||
173 | + public String getFCreateId() { | ||
174 | + return fCreateId; | ||
175 | + } | ||
176 | + | ||
177 | + public void setFCreateId(String fCreateId) { | ||
178 | + this.fCreateId = fCreateId; | ||
179 | + } | ||
180 | + public LocalDateTime getFCreateTime() { | ||
181 | + return fCreateTime; | ||
182 | + } | ||
183 | + | ||
184 | + public void setFCreateTime(LocalDateTime fCreateTime) { | ||
185 | + this.fCreateTime = fCreateTime; | ||
186 | + } | ||
187 | + public String getFUpdateBy() { | ||
188 | + return fUpdateBy; | ||
189 | + } | ||
190 | + | ||
191 | + public void setFUpdateBy(String fUpdateBy) { | ||
192 | + this.fUpdateBy = fUpdateBy; | ||
193 | + } | ||
194 | + public String getFUpdateId() { | ||
195 | + return fUpdateId; | ||
196 | + } | ||
197 | + | ||
198 | + public void setFUpdateId(String fUpdateId) { | ||
199 | + this.fUpdateId = fUpdateId; | ||
200 | + } | ||
201 | + public LocalDateTime getFUpdateTime() { | ||
202 | + return fUpdateTime; | ||
203 | + } | ||
204 | + | ||
205 | + public void setFUpdateTime(LocalDateTime fUpdateTime) { | ||
206 | + this.fUpdateTime = fUpdateTime; | ||
207 | + } | ||
208 | + public Long getFFormDataRev() { | ||
209 | + return fFormDataRev; | ||
210 | + } | ||
211 | + | ||
212 | + public void setFFormDataRev(Long fFormDataRev) { | ||
213 | + this.fFormDataRev = fFormDataRev; | ||
214 | + } | ||
215 | + public String getFInspStatusName() { | ||
216 | + return fInspStatusName; | ||
217 | + } | ||
218 | + | ||
219 | + public void setFInspStatusName(String fInspStatusName) { | ||
220 | + this.fInspStatusName = fInspStatusName; | ||
221 | + } | ||
222 | + public LocalDateTime getFInspTime() { | ||
223 | + return fInspTime; | ||
224 | + } | ||
225 | + | ||
226 | + public void setFInspTime(LocalDateTime fInspTime) { | ||
227 | + this.fInspTime = fInspTime; | ||
228 | + } | ||
229 | + public String getFInspNotes() { | ||
230 | + return fInspNotes; | ||
231 | + } | ||
232 | + | ||
233 | + public void setFInspNotes(String fInspNotes) { | ||
234 | + this.fInspNotes = fInspNotes; | ||
235 | + } | ||
236 | + public String getFInspId() { | ||
237 | + return fInspId; | ||
238 | + } | ||
239 | + | ||
240 | + public void setFInspId(String fInspId) { | ||
241 | + this.fInspId = fInspId; | ||
242 | + } | ||
243 | + public String getFInspBy() { | ||
244 | + return fInspBy; | ||
245 | + } | ||
246 | + | ||
247 | + public void setFInspBy(String fInspBy) { | ||
248 | + this.fInspBy = fInspBy; | ||
249 | + } | ||
250 | + public BigDecimal getFTotalIncome() { | ||
251 | + return fTotalIncome; | ||
252 | + } | ||
253 | + | ||
254 | + public void setFTotalIncome(BigDecimal fTotalIncome) { | ||
255 | + this.fTotalIncome = fTotalIncome; | ||
256 | + } | ||
257 | + public BigDecimal getFTotalDisbursement() { | ||
258 | + return fTotalDisbursement; | ||
259 | + } | ||
260 | + | ||
261 | + public void setFTotalDisbursement(BigDecimal fTotalDisbursement) { | ||
262 | + this.fTotalDisbursement = fTotalDisbursement; | ||
263 | + } | ||
264 | + public BigDecimal getFTotalNetCashFlow() { | ||
265 | + return fTotalNetCashFlow; | ||
266 | + } | ||
267 | + | ||
268 | + public void setFTotalNetCashFlow(BigDecimal fTotalNetCashFlow) { | ||
269 | + this.fTotalNetCashFlow = fTotalNetCashFlow; | ||
270 | + } | ||
271 | + public String getFOrgType() { | ||
272 | + return fOrgType; | ||
273 | + } | ||
274 | + | ||
275 | + public void setFOrgType(String fOrgType) { | ||
276 | + this.fOrgType = fOrgType; | ||
277 | + } | ||
278 | + | ||
279 | + | ||
280 | + @Override | ||
281 | + protected Serializable pkVal() { | ||
282 | + return this.id; | ||
283 | + } | ||
284 | + | ||
285 | + @Override | ||
286 | + public String toString() { | ||
287 | + return "WFinance{" + | ||
288 | + "id=" + id + | ||
289 | + ", refId=" + refId + | ||
290 | + ", fOrgName=" + fOrgName + | ||
291 | + ", fOrgId=" + fOrgId + | ||
292 | + ", fDate=" + fDate + | ||
293 | + ", fCreateBy=" + fCreateBy + | ||
294 | + ", fCreateId=" + fCreateId + | ||
295 | + ", fCreateTime=" + fCreateTime + | ||
296 | + ", fUpdateBy=" + fUpdateBy + | ||
297 | + ", fUpdateId=" + fUpdateId + | ||
298 | + ", fUpdateTime=" + fUpdateTime + | ||
299 | + ", fFormDataRev=" + fFormDataRev + | ||
300 | + ", fInspStatusName=" + fInspStatusName + | ||
301 | + ", fInspTime=" + fInspTime + | ||
302 | + ", fInspNotes=" + fInspNotes + | ||
303 | + ", fInspId=" + fInspId + | ||
304 | + ", fInspBy=" + fInspBy + | ||
305 | + ", fTotalIncome=" + fTotalIncome + | ||
306 | + ", fTotalDisbursement=" + fTotalDisbursement + | ||
307 | + ", fTotalNetCashFlow=" + fTotalNetCashFlow + | ||
308 | + ", fOrgType=" + fOrgType + | ||
309 | + "}"; | ||
310 | + } | ||
311 | +} |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WFinanceDetail.java
0 → 100644
@@ -0,0 +1,181 @@ | @@ -0,0 +1,181 @@ | ||
1 | +package com.hotent.chkpower.model; | ||
2 | + | ||
3 | +import java.math.BigDecimal; | ||
4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
5 | +import com.hotent.base.entity.BaseModel; | ||
6 | +import com.baomidou.mybatisplus.extension.activerecord.Model; | ||
7 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
8 | +import java.time.LocalDateTime; | ||
9 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
10 | +import java.io.Serializable; | ||
11 | +import io.swagger.annotations.ApiModel; | ||
12 | +import io.swagger.annotations.ApiModelProperty; | ||
13 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
14 | +/** | ||
15 | + * 运营公司收支明细 | ||
16 | + * | ||
17 | + * @company 广州宏天软件股份有限公司 | ||
18 | + * @author cw | ||
19 | + * @since 2024-07-08 | ||
20 | + */ | ||
21 | +@ApiModel(value="WFinanceDetail对象", description="运营公司收支明细") | ||
22 | +public class WFinanceDetail extends BaseModel<WFinanceDetail> { | ||
23 | + | ||
24 | + private static final long serialVersionUID = 1L; | ||
25 | + @ApiModelProperty(value = "主键") | ||
26 | + @TableId(value = "ID_", type = IdType.ASSIGN_ID) | ||
27 | + @JsonProperty("id") | ||
28 | + private String id; | ||
29 | + | ||
30 | + @ApiModelProperty(value = "外键") | ||
31 | + @TableField("REF_ID_") | ||
32 | + @JsonProperty("refId") | ||
33 | + private String refId; | ||
34 | + | ||
35 | + @ApiModelProperty(value = "公司") | ||
36 | + @TableField("F_org_name") | ||
37 | + @JsonProperty("fOrgName") | ||
38 | + private String fOrgName; | ||
39 | + | ||
40 | + @ApiModelProperty(value = "公司id") | ||
41 | + @TableField("F_org_id") | ||
42 | + @JsonProperty("fOrgId") | ||
43 | + private String fOrgId; | ||
44 | + | ||
45 | + @ApiModelProperty(value = "日期") | ||
46 | + @TableField("F_date") | ||
47 | + @JsonProperty("fDate") | ||
48 | + private LocalDateTime fDate; | ||
49 | + | ||
50 | + @ApiModelProperty(value = "表单数据版本") | ||
51 | + @TableField("F_form_data_rev_") | ||
52 | + @JsonProperty("fFormDataRev") | ||
53 | + private Long fFormDataRev; | ||
54 | + | ||
55 | + @ApiModelProperty(value = "事项") | ||
56 | + @TableField("F_matter") | ||
57 | + @JsonProperty("fMatter") | ||
58 | + private String fMatter; | ||
59 | + | ||
60 | + @ApiModelProperty(value = "收入明细") | ||
61 | + @TableField("F_income") | ||
62 | + @JsonProperty("fIncome") | ||
63 | + private BigDecimal fIncome; | ||
64 | + | ||
65 | + @ApiModelProperty(value = "支出明细") | ||
66 | + @TableField("F_disbursement") | ||
67 | + @JsonProperty("fDisbursement") | ||
68 | + private BigDecimal fDisbursement; | ||
69 | + | ||
70 | + @ApiModelProperty(value = "净现金流") | ||
71 | + @TableField("F_net_cash_flow") | ||
72 | + @JsonProperty("fNetCashFlow") | ||
73 | + private BigDecimal fNetCashFlow; | ||
74 | + | ||
75 | + @ApiModelProperty(value = "公司类型") | ||
76 | + @TableField("F_org_type") | ||
77 | + @JsonProperty("fOrgType") | ||
78 | + private String fOrgType; | ||
79 | + | ||
80 | + | ||
81 | + public String getId() { | ||
82 | + return id; | ||
83 | + } | ||
84 | + | ||
85 | + public void setId(String id) { | ||
86 | + this.id = id; | ||
87 | + } | ||
88 | + public String getRefId() { | ||
89 | + return refId; | ||
90 | + } | ||
91 | + | ||
92 | + public void setRefId(String refId) { | ||
93 | + this.refId = refId; | ||
94 | + } | ||
95 | + public String getFOrgName() { | ||
96 | + return fOrgName; | ||
97 | + } | ||
98 | + | ||
99 | + public void setFOrgName(String fOrgName) { | ||
100 | + this.fOrgName = fOrgName; | ||
101 | + } | ||
102 | + public String getFOrgId() { | ||
103 | + return fOrgId; | ||
104 | + } | ||
105 | + | ||
106 | + public void setFOrgId(String fOrgId) { | ||
107 | + this.fOrgId = fOrgId; | ||
108 | + } | ||
109 | + public LocalDateTime getFDate() { | ||
110 | + return fDate; | ||
111 | + } | ||
112 | + | ||
113 | + public void setFDate(LocalDateTime fDate) { | ||
114 | + this.fDate = fDate; | ||
115 | + } | ||
116 | + public Long getFFormDataRev() { | ||
117 | + return fFormDataRev; | ||
118 | + } | ||
119 | + | ||
120 | + public void setFFormDataRev(Long fFormDataRev) { | ||
121 | + this.fFormDataRev = fFormDataRev; | ||
122 | + } | ||
123 | + public String getFMatter() { | ||
124 | + return fMatter; | ||
125 | + } | ||
126 | + | ||
127 | + public void setFMatter(String fMatter) { | ||
128 | + this.fMatter = fMatter; | ||
129 | + } | ||
130 | + public BigDecimal getFIncome() { | ||
131 | + return fIncome; | ||
132 | + } | ||
133 | + | ||
134 | + public void setFIncome(BigDecimal fIncome) { | ||
135 | + this.fIncome = fIncome; | ||
136 | + } | ||
137 | + public BigDecimal getFDisbursement() { | ||
138 | + return fDisbursement; | ||
139 | + } | ||
140 | + | ||
141 | + public void setFDisbursement(BigDecimal fDisbursement) { | ||
142 | + this.fDisbursement = fDisbursement; | ||
143 | + } | ||
144 | + public BigDecimal getFNetCashFlow() { | ||
145 | + return fNetCashFlow; | ||
146 | + } | ||
147 | + | ||
148 | + public void setFNetCashFlow(BigDecimal fNetCashFlow) { | ||
149 | + this.fNetCashFlow = fNetCashFlow; | ||
150 | + } | ||
151 | + public String getFOrgType() { | ||
152 | + return fOrgType; | ||
153 | + } | ||
154 | + | ||
155 | + public void setFOrgType(String fOrgType) { | ||
156 | + this.fOrgType = fOrgType; | ||
157 | + } | ||
158 | + | ||
159 | + | ||
160 | + @Override | ||
161 | + protected Serializable pkVal() { | ||
162 | + return this.id; | ||
163 | + } | ||
164 | + | ||
165 | + @Override | ||
166 | + public String toString() { | ||
167 | + return "WFinanceDetail{" + | ||
168 | + "id=" + id + | ||
169 | + ", refId=" + refId + | ||
170 | + ", fOrgName=" + fOrgName + | ||
171 | + ", fOrgId=" + fOrgId + | ||
172 | + ", fDate=" + fDate + | ||
173 | + ", fFormDataRev=" + fFormDataRev + | ||
174 | + ", fMatter=" + fMatter + | ||
175 | + ", fIncome=" + fIncome + | ||
176 | + ", fDisbursement=" + fDisbursement + | ||
177 | + ", fNetCashFlow=" + fNetCashFlow + | ||
178 | + ", fOrgType=" + fOrgType + | ||
179 | + "}"; | ||
180 | + } | ||
181 | +} |
No preview for this file type
backend/chkpower/src/main/resources/doc/hqzhAll.xls
No preview for this file type
No preview for this file type
backend/chkpower/src/main/resources/mapper/WCurrentMapper.xml
@@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
118 | <select id="getCurrentOrgTypeList" resultType="java.lang.String"> | 118 | <select id="getCurrentOrgTypeList" resultType="java.lang.String"> |
119 | SELECT orgParams.VALUE_ AS orgType | 119 | SELECT orgParams.VALUE_ AS orgType |
120 | FROM uc_org org | 120 | FROM uc_org org |
121 | - JOIN uc_org_params orgParams on orgParams.ORG_ID_= org.ID_ | 121 | + JOIN uc_org_params orgParams on orgParams.ORG_ID_= org.ID_ |
122 | GROUP BY orgParams.VALUE_ | 122 | GROUP BY orgParams.VALUE_ |
123 | ORDER BY MAX(org.ORDER_NO_) ASC | 123 | ORDER BY MAX(org.ORDER_NO_) ASC |
124 | </select> | 124 | </select> |
backend/chkpower/src/main/resources/mapper/WFinanceDetailMapper.xml
0 → 100644
@@ -0,0 +1,49 @@ | @@ -0,0 +1,49 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.hotent.chkpower.dao.WFinanceDetailDao"> | ||
4 | + | ||
5 | + <!-- 通用查询映射结果 --> | ||
6 | + <resultMap id="BaseResultMap" type="com.hotent.chkpower.model.WFinanceDetail"> | ||
7 | + <id column="ID_" property="id" /> | ||
8 | + <result column="REF_ID_" property="refId" /> | ||
9 | + <result column="F_org_name" property="fOrgName" /> | ||
10 | + <result column="F_org_id" property="fOrgId" /> | ||
11 | + <result column="F_date" property="fDate" /> | ||
12 | + <result column="F_form_data_rev_" property="fFormDataRev" /> | ||
13 | + <result column="F_matter" property="fMatter" /> | ||
14 | + <result column="F_income" property="fIncome" /> | ||
15 | + <result column="F_disbursement" property="fDisbursement" /> | ||
16 | + <result column="F_net_cash_flow" property="fNetCashFlow" /> | ||
17 | + <result column="F_org_type" property="fOrgType" /> | ||
18 | + </resultMap> | ||
19 | + | ||
20 | + <!-- 通用查询结果列 --> | ||
21 | + <sql id="Base_Column_List"> | ||
22 | + ID_, REF_ID_, F_org_name, F_org_id, F_date, F_form_data_rev_, F_matter, F_income, F_disbursement, F_net_cash_flow, F_org_type | ||
23 | + </sql> | ||
24 | + | ||
25 | + <select id="selectPage" resultMap="BaseResultMap"> | ||
26 | + select | ||
27 | + <include refid="Base_Column_List"/> | ||
28 | + from | ||
29 | + w_finance_detail | ||
30 | + ${ew.customSqlSegment} | ||
31 | + </select> | ||
32 | + | ||
33 | + <select id="selectList" resultMap="BaseResultMap"> | ||
34 | + select | ||
35 | + <include refid="Base_Column_List"/> | ||
36 | + from | ||
37 | + w_finance_detail | ||
38 | + ${ew.customSqlSegment} | ||
39 | + </select> | ||
40 | + | ||
41 | + <select id="selectById" resultMap="BaseResultMap"> | ||
42 | + select | ||
43 | + <include refid="Base_Column_List"/> | ||
44 | + from | ||
45 | + w_finance_detail | ||
46 | + where | ||
47 | + ID_ = #{id} | ||
48 | + </select> | ||
49 | +</mapper> |
backend/chkpower/src/main/resources/mapper/WFinanceMapper.xml
0 → 100644
@@ -0,0 +1,75 @@ | @@ -0,0 +1,75 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.hotent.chkpower.dao.WFinanceDao"> | ||
4 | + | ||
5 | + <!-- 通用查询映射结果 --> | ||
6 | + <resultMap id="BaseResultMap" type="com.hotent.chkpower.model.WFinance"> | ||
7 | + <id column="ID_" property="id" /> | ||
8 | + <result column="REF_ID_" property="refId" /> | ||
9 | + <result column="F_org_name" property="fOrgName" /> | ||
10 | + <result column="F_org_id" property="fOrgId" /> | ||
11 | + <result column="F_date" property="fDate" /> | ||
12 | + <result column="F_create_by" property="fCreateBy" /> | ||
13 | + <result column="F_create_id" property="fCreateId" /> | ||
14 | + <result column="F_create_time" property="fCreateTime" /> | ||
15 | + <result column="F_update_by" property="fUpdateBy" /> | ||
16 | + <result column="F_update_id" property="fUpdateId" /> | ||
17 | + <result column="F_update_time" property="fUpdateTime" /> | ||
18 | + <result column="F_form_data_rev_" property="fFormDataRev" /> | ||
19 | + <result column="F_insp_status_name" property="fInspStatusName" /> | ||
20 | + <result column="F_insp_time" property="fInspTime" /> | ||
21 | + <result column="F_insp_notes" property="fInspNotes" /> | ||
22 | + <result column="F_insp_id" property="fInspId" /> | ||
23 | + <result column="F_insp_by" property="fInspBy" /> | ||
24 | + <result column="F_total_income" property="fTotalIncome" /> | ||
25 | + <result column="F_total_disbursement" property="fTotalDisbursement" /> | ||
26 | + <result column="F_total_net_cash_flow" property="fTotalNetCashFlow" /> | ||
27 | + <result column="F_org_type" property="fOrgType" /> | ||
28 | + </resultMap> | ||
29 | + | ||
30 | + <!-- 通用查询结果列 --> | ||
31 | + <sql id="Base_Column_List"> | ||
32 | + ID_, REF_ID_, F_org_name, F_org_id, F_date, F_create_by, F_create_id, F_create_time, F_update_by, F_update_id, F_update_time, F_form_data_rev_, F_insp_status_name, F_insp_time, F_insp_notes, F_insp_id, F_insp_by, F_total_income, F_total_disbursement, F_total_net_cash_flow, F_org_type | ||
33 | + </sql> | ||
34 | + | ||
35 | + <select id="selectPage" resultMap="BaseResultMap"> | ||
36 | + select | ||
37 | + <include refid="Base_Column_List"/> | ||
38 | + from | ||
39 | + w_finance | ||
40 | + ${ew.customSqlSegment} | ||
41 | + </select> | ||
42 | + | ||
43 | + <select id="selectList" resultMap="BaseResultMap"> | ||
44 | + select | ||
45 | + <include refid="Base_Column_List"/> | ||
46 | + from | ||
47 | + w_finance | ||
48 | + ${ew.customSqlSegment} | ||
49 | + </select> | ||
50 | + | ||
51 | + <select id="selectById" resultMap="BaseResultMap"> | ||
52 | + select | ||
53 | + <include refid="Base_Column_List"/> | ||
54 | + from | ||
55 | + w_finance | ||
56 | + where | ||
57 | + ID_ = #{id} | ||
58 | + </select> | ||
59 | + | ||
60 | + <select id="getTransactionDetailsList" resultType="java.util.HashMap"> | ||
61 | + SELECT org.ID_ as F_org_id,org.NAME_ as F_org_name,acc.F_org_type,org.ORDER_NO_, | ||
62 | + JE.F_total_income,JE.F_total_disbursement,JE.F_total_net_cash_flow | ||
63 | + FROM uc_org org | ||
64 | + INNER JOIN w_bank_account acc ON acc.F_org_id= org.ID_ | ||
65 | + LEFT JOIN ( | ||
66 | + SELECT F_org_id,SUM(F_total_income) AS F_total_income,SUM(F_total_disbursement) AS F_total_disbursement,SUM(F_total_net_cash_flow) AS F_total_net_cash_flow | ||
67 | + FROM w_finance | ||
68 | + WHERE F_date = #{fDate} | ||
69 | + GROUP BY F_org_id | ||
70 | + ) JE ON JE.F_org_id = org.ID_ | ||
71 | + WHERE 1=1 | ||
72 | + AND acc.F_org_type= #{fOrgType} | ||
73 | + ORDER BY org.ORDER_NO_ ASC | ||
74 | + </select> | ||
75 | +</mapper> |