Commit 320c6bb87bada334dbd90cfec734f0aa6872b85e
1 parent
44363b21
Exists in
dev
基础信息-金额
Showing
2 changed files
with
61 additions
and
26 deletions
Show diff stats
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McBasicMoneyController.java
... | ... | @@ -48,6 +48,7 @@ public class McBasicMoneyController extends BaseController { |
48 | 48 | @GetMapping("/list") |
49 | 49 | public TableDataInfo list(McBasicMoneyVo mcBasicMoneyVo) { |
50 | 50 | startPage(); |
51 | + mcBasicMoneyVo.setDefFlag("0"); | |
51 | 52 | List<McBasicMoney> list = mcBasicMoneyService.selectMcBasicMoneyList(mcBasicMoneyVo); |
52 | 53 | return getDataTable(list); |
53 | 54 | } |
... | ... | @@ -120,6 +121,41 @@ public class McBasicMoneyController extends BaseController { |
120 | 121 | } |
121 | 122 | |
122 | 123 | |
124 | + | |
125 | + /** | |
126 | + * 导出基础数据-金额列表模板 | |
127 | + */ | |
128 | + @RequirePermission("schsf:mcBasicMoney:exportTemplate") | |
129 | + @Log(title = "基础数据-金额", businessType = BusinessType.EXPORT) | |
130 | + @PostMapping("/exportTemplate") | |
131 | + public void exportTemplate(HttpServletResponse response) throws IOException { | |
132 | + startPage(); | |
133 | + McBasicMoneyVo mcBasicMoneyVo =new McBasicMoneyVo(); | |
134 | + mcBasicMoneyVo.setDefFlag("0"); | |
135 | + List<McBasicMoney> list = mcBasicMoneyService.selectMcBasicMoneyList(mcBasicMoneyVo); | |
136 | + try { | |
137 | + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); | |
138 | + response.setCharacterEncoding("utf-8"); | |
139 | + // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 | |
140 | + String fileName = URLEncoder.encode("基础数据-金额", "UTF-8").replaceAll("\\+", "%20"); | |
141 | + response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); | |
142 | + // 这里需要设置不关闭流 | |
143 | + EasyExcel.write(response.getOutputStream(), McBasicMoney.class).autoCloseStream(Boolean.FALSE).sheet("客户信息列表") | |
144 | + .doWrite(list); | |
145 | + } catch (Exception e) { | |
146 | + // 重置response | |
147 | + e.printStackTrace(); | |
148 | + response.reset(); | |
149 | + response.setContentType("application/json"); | |
150 | + response.setCharacterEncoding("utf-8"); | |
151 | + Map<String, String> map = MapUtils.newHashMap(); | |
152 | + map.put("status", "failure"); | |
153 | + map.put("message", "下载文件失败" + e.getMessage()); | |
154 | + response.getWriter().println(JSON.toJSONString(map)); | |
155 | + } | |
156 | + } | |
157 | + | |
158 | + | |
123 | 159 | /** |
124 | 160 | * 导出基础数据-金额列表 |
125 | 161 | */ | ... | ... |
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McBasicMoney.java
... | ... | @@ -31,7 +31,7 @@ public class McBasicMoney extends BaseEntity |
31 | 31 | private String regionName; |
32 | 32 | |
33 | 33 | /** 集团名称 */ |
34 | - @ExcelProperty(index = 2,value = "集团名称") | |
34 | + @ExcelProperty(index = 2,value = "经管集团/直管公司") | |
35 | 35 | private String groupName; |
36 | 36 | |
37 | 37 | /** 公司名称 */ |
... | ... | @@ -39,7 +39,7 @@ public class McBasicMoney extends BaseEntity |
39 | 39 | private String companyName; |
40 | 40 | |
41 | 41 | /** 公司代码 */ |
42 | - @ExcelProperty(index = 4,value = "公司代码") | |
42 | + @ExcelProperty(index = 4,value = "项目公司代码(组织部门代码)") | |
43 | 43 | private String companyCode; |
44 | 44 | |
45 | 45 | /** 省 */ |
... | ... | @@ -51,11 +51,11 @@ public class McBasicMoney extends BaseEntity |
51 | 51 | private String city; |
52 | 52 | |
53 | 53 | /** 区 */ |
54 | - @ExcelProperty(index = 7,value = "区") | |
54 | + @ExcelProperty(index = 7,value = "县/区") | |
55 | 55 | private String district; |
56 | 56 | |
57 | 57 | /** 街道 */ |
58 | - @ExcelProperty(index = 8,value = "街道") | |
58 | + @ExcelProperty(index = 8,value = "乡镇/街道") | |
59 | 59 | private String street; |
60 | 60 | |
61 | 61 | /** 村(小区) */ |
... | ... | @@ -71,91 +71,90 @@ public class McBasicMoney extends BaseEntity |
71 | 71 | private String urbRurCls; |
72 | 72 | |
73 | 73 | /** 财务确认预算数-财年初财务确认往年应收 */ |
74 | - @ExcelProperty(index = 12,value = "财务确认预算数-财年初财务确认往年应收") | |
74 | + @ExcelProperty(index = 12,value = {"财务确认预算数","财年初财务确认往年应收"}) | |
75 | 75 | private BigDecimal budgConfPrev; |
76 | 76 | |
77 | 77 | /** 财务确认预算数-本年新增 */ |
78 | - @ExcelProperty(index = 13,value = "财务确认预算数-本年新增") | |
78 | + @ExcelProperty(index = 13,value = {"财务确认预算数","本年新增"}) | |
79 | 79 | private BigDecimal budgConfNew; |
80 | 80 | |
81 | 81 | /** 财务确认预算数-总预算金额 */ |
82 | - @ExcelProperty(index = 14,value = "财务确认预算数-总预算金额") | |
82 | + @ExcelProperty(index = 14,value = {"财务确认预算数","总预算金额"}) | |
83 | 83 | private BigDecimal budgTotal; |
84 | 84 | |
85 | 85 | /** 季度目标(到公司四个季度)已收费户数 */ |
86 | - @ExcelProperty(index = 15,value = "季度目标(到公司四个季度)已收费户数") | |
86 | + @ExcelProperty(index = 15,value = "季度目标(到公司四个季度)") | |
87 | 87 | private BigDecimal quarterlyTarget; |
88 | 88 | |
89 | 89 | /** 纳入政府补贴金额-已收费户数 */ |
90 | - @ExcelProperty(index = 16,value = "纳入政府补贴金额-已收费户数") | |
90 | + @ExcelProperty(index = 16,value = {"纳入政府补贴金额","已收费户数"}) | |
91 | 91 | private BigDecimal cnyGsgCharged; |
92 | 92 | |
93 | 93 | /** 纳入政府补贴金额-未收费户数 */ |
94 | - @ExcelProperty(index = 17,value = "纳入政府补贴金额-未收费户数") | |
94 | + @ExcelProperty(index = 17,value = {"纳入政府补贴金额","未收费户数"}) | |
95 | 95 | private BigDecimal cnyGsgUncharged; |
96 | 96 | |
97 | 97 | /** 纳入政府补贴金额-合计 */ |
98 | - @ExcelProperty(index = 18,value = "纳入政府补贴金额-合计") | |
98 | + @ExcelProperty(index = 18,value = {"纳入政府补贴金额","小计"}) | |
99 | 99 | private BigDecimal cnyGsgTotal; |
100 | 100 | |
101 | 101 | /** 市场化收费金额 - 本年新增金额 - 全款户数 */ |
102 | - @ExcelProperty(index = 19,value = "市场化收费金额 - 本年新增金额 - 全款户数") | |
102 | + @ExcelProperty(index = 19,value = {"市场化收费金额","本年新增金额","全款户数"}) | |
103 | 103 | private BigDecimal cnyYrFull; |
104 | 104 | |
105 | 105 | /** 市场化收费金额 - 本年新增金额 - 分期户数 */ |
106 | - @ExcelProperty(index = 20,value = "市场化收费金额 - 本年新增金额 - 分期户数") | |
106 | + @ExcelProperty(index = 20,value = {"市场化收费金额","本年新增金额","分期/定金户数"}) | |
107 | 107 | private BigDecimal cnyYrInstal; |
108 | 108 | |
109 | 109 | /** 往年应收金额-已收费户数-全款户数 */ |
110 | - @ExcelProperty(index = 21,value = "往年应收金额-已收费户数-全款户数") | |
110 | + @ExcelProperty(index = 21,value = {"往年应收金额","往年应收金额","已收费户数","全款户数"}) | |
111 | 111 | private BigDecimal cnyPrevFull; |
112 | 112 | |
113 | 113 | /** 往年应收金额-已收费户数-分期/定金户数 */ |
114 | - @ExcelProperty(index = 22,value = "往年应收金额-已收费户数-分期/定金户数") | |
114 | + @ExcelProperty(index = 22,value = {"往年应收金额","往年应收金额","已收费户数","分期/定金户数"}) | |
115 | 115 | private BigDecimal cnyPrevInstall; |
116 | 116 | |
117 | 117 | /** 评价指标-市场化累计回款 */ |
118 | - @ExcelProperty(index = 23,value = "评价指标-市场化累计回款") | |
118 | + @ExcelProperty(index = 23,value = {"评价指标","市场化累计回款"}) | |
119 | 119 | private BigDecimal cnyMarketCumr; |
120 | 120 | |
121 | 121 | /** 评价指标-财年累计回款 */ |
122 | - @ExcelProperty(index = 24,value = "评价指标-财年累计回款") | |
122 | + @ExcelProperty(index = 24,value = {"评价指标","财年累计回款"}) | |
123 | 123 | private BigDecimal cnyFyCumReturn; |
124 | 124 | |
125 | 125 | /** 评价指标-全款累计回款 */ |
126 | - @ExcelProperty(index = 25,value = "评价指标-全款累计回款") | |
126 | + @ExcelProperty(index = 25,value = {"评价指标","全款累计回款"}) | |
127 | 127 | private BigDecimal cnyFpCumReturn; |
128 | 128 | |
129 | 129 | /** 评价指标-分期累计回款 */ |
130 | - @ExcelProperty(index = 26,value = "评价指标-分期累计回款") | |
130 | + @ExcelProperty(index = 26,value = {"评价指标","分期累计回款"}) | |
131 | 131 | private BigDecimal cnyInstCumReturn; |
132 | 132 | |
133 | 133 | /** 评价指标-本年新增累计回款 */ |
134 | - @ExcelProperty(index = 27,value = "评价指标-本年新增累计回款") | |
134 | + @ExcelProperty(index = 27,value = {"评价指标","本年新增累计回款"}) | |
135 | 135 | private BigDecimal cnyNewCumReturn; |
136 | 136 | |
137 | 137 | /** 评价指标-往年应收累计回款 */ |
138 | - @ExcelProperty(index = 28,value = "评价指标-往年应收累计回款") | |
138 | + @ExcelProperty(index = 28,value = {"评价指标","往年应收累计回款"}) | |
139 | 139 | private BigDecimal cnyRcvblsCumReturn; |
140 | 140 | |
141 | 141 | /** 评价指标-预算完成率 */ |
142 | - @ExcelProperty(index = 29,value = "评价指标-预算完成率") | |
142 | + @ExcelProperty(index = 29,value = {"评价指标","预算完成率(%)"}) | |
143 | 143 | private BigDecimal cnyBdgtCmplRate; |
144 | 144 | |
145 | 145 | /** 评价指标-应收账款完成率 */ |
146 | - @ExcelProperty(index = 30,value = "评价指标-应收账款完成率") | |
146 | + @ExcelProperty(index = 30,value = {"评价指标","应收账款完成率(%)"}) | |
147 | 147 | private BigDecimal cnyRcvblsCmplRate; |
148 | 148 | |
149 | 149 | /** 评价指标-本年新增完成率 */ |
150 | - @ExcelProperty(index = 31,value = "评价指标-本年新增完成率") | |
150 | + @ExcelProperty(index = 31,value = {"评价指标","本年新增完成率(%)"}) | |
151 | 151 | private BigDecimal cnyCynCmplRate; |
152 | 152 | |
153 | 153 | /** 评价指标-阶段性目标完成率 */ |
154 | - @ExcelProperty(index = 32,value = "评价指标-阶段性目标完成率") | |
154 | + @ExcelProperty(index = 32,value = {"评价指标","阶段性目标完成率(%)"}) | |
155 | 155 | private BigDecimal cnyPtCmplRate; |
156 | 156 | |
157 | 157 | /** 删除标志(0:未删除,1:已删除) */ |
158 | - @ExcelProperty(value = "删除标志") | |
159 | 158 | private String defFlag; |
160 | 159 | |
161 | 160 | public void setId(Long id) | ... | ... |