Commit 4ec04cacfc270ece918233f27a21dada9c585fdb
1 parent
428bc0da
Exists in
dev
update
Showing
37 changed files
with
123 additions
and
139 deletions
Show diff stats
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McBasicCmtyController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McBasicMoneyController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McConstructionController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McIgnitionController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McOperationLogController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McVisitController.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/controller/McVisitUserController.java
1 | 1 | package com.chinagas.modules.schsf.controller; |
2 | -import java.net.URLEncoder; | |
3 | -import java.util.List; | |
4 | -import java.io.IOException; | |
5 | -import java.util.Map; | |
6 | -import javax.servlet.http.HttpServletResponse; | |
7 | 2 | |
8 | -import com.alibaba.excel.EasyExcel; | |
9 | -import com.alibaba.excel.util.MapUtils; | |
10 | -import com.alibaba.fastjson2.JSON; | |
11 | -import com.chinagas.common.core.domain.AjaxResult; | |
3 | +import com.chinagas.common.core.web.controller.BaseController; | |
4 | +import com.chinagas.modules.schsf.service.IMcVisitUserService; | |
12 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
13 | -import org.springframework.web.bind.annotation.GetMapping; | |
14 | -import org.springframework.web.bind.annotation.PostMapping; | |
15 | -import org.springframework.web.bind.annotation.PutMapping; | |
16 | -import org.springframework.web.bind.annotation.DeleteMapping; | |
17 | -import org.springframework.web.bind.annotation.PathVariable; | |
18 | -import org.springframework.web.bind.annotation.RequestBody; | |
19 | 6 | import org.springframework.web.bind.annotation.RequestMapping; |
20 | 7 | import org.springframework.web.bind.annotation.RestController; |
21 | -import com.chinagas.common.log.annotation.Log; | |
22 | -import com.chinagas.common.log.enums.BusinessType; | |
23 | -import com.chinagas.common.security.annotation.RequirePermission; | |
24 | -import com.chinagas.modules.schsf.domain.McVisitUser; | |
25 | -import com.chinagas.modules.schsf.service.IMcVisitUserService; | |
26 | -import com.chinagas.common.core.web.controller.BaseController; | |
27 | - | |
28 | -import com.chinagas.common.core.web.page.TableDataInfo; | |
29 | 8 | |
30 | 9 | |
31 | 10 | /** |
32 | 11 | * 百万用户信息(被拜访的用户)Controller |
33 | 12 | * |
34 | - * @author lidwd | |
13 | + * @author cw | |
35 | 14 | * @date 2024-05-30 |
36 | 15 | */ |
37 | 16 | @RestController |
... | ... | @@ -41,88 +20,93 @@ public class McVisitUserController extends BaseController |
41 | 20 | @Autowired |
42 | 21 | private IMcVisitUserService mcVisitUserService; |
43 | 22 | |
44 | - /** | |
45 | - * 查询百万用户信息(被拜访的用户)列表 | |
46 | - */ | |
47 | - @RequirePermission("schsf:mcVisitUser:list") | |
48 | - @GetMapping("/list") | |
49 | - public TableDataInfo list(McVisitUser mcVisitUser) | |
50 | - { | |
51 | - startPage(); | |
52 | - List<McVisitUser> list = mcVisitUserService.selectMcVisitUserList(mcVisitUser); | |
53 | - return getDataTable(list); | |
54 | - } | |
55 | 23 | |
56 | 24 | |
57 | - /** | |
58 | - * 导出百万用户信息(被拜访的用户)列表 | |
59 | - */ | |
60 | - @RequirePermission("schsf:mcVisitUser:export") | |
61 | - @Log(title = "百万用户信息(被拜访的用户)",businessType = BusinessType.EXPORT) | |
62 | - @PostMapping("/export") | |
63 | - public void export(HttpServletResponse response,McVisitUser mcVisitUser) throws IOException { | |
64 | - List<McVisitUser> list = mcVisitUserService.selectMcVisitUserList(mcVisitUser); | |
65 | - try { | |
66 | - response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); | |
67 | - response.setCharacterEncoding("utf-8"); | |
68 | - // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 | |
69 | - String fileName = URLEncoder.encode("百万用户信息(被拜访的用户)", "UTF-8").replaceAll("\\+", "%20"); | |
70 | - response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); | |
71 | - // 这里需要设置不关闭流 | |
72 | - EasyExcel.write(response.getOutputStream(), McVisitUser.class).autoCloseStream(Boolean.FALSE).sheet("客户信息列表") | |
73 | - .doWrite(list); | |
74 | - } catch (Exception e) { | |
75 | - // 重置response | |
76 | - e.printStackTrace(); | |
77 | - response.reset(); | |
78 | - response.setContentType("application/json"); | |
79 | - response.setCharacterEncoding("utf-8"); | |
80 | - Map<String, String> map = MapUtils.newHashMap(); | |
81 | - map.put("status", "failure"); | |
82 | - map.put("message", "下载文件失败" + e.getMessage()); | |
83 | - response.getWriter().println(JSON.toJSONString(map)); | |
84 | - } | |
85 | - } | |
86 | - /** | |
87 | - * 获取百万用户信息(被拜访的用户)详细信息 | |
88 | - */ | |
89 | - @RequirePermission("schsf:mcVisitUser:query") | |
90 | - @GetMapping(value = "/{id}") | |
91 | - public AjaxResult getInfo(@PathVariable("id") Long id) | |
92 | - { | |
93 | - return AjaxResult.success(mcVisitUserService.selectMcVisitUserById(id)); | |
94 | - } | |
95 | 25 | |
96 | - /** | |
97 | - * 新增百万用户信息(被拜访的用户) | |
98 | - */ | |
99 | - @RequirePermission("schsf:mcVisitUser:add") | |
100 | - @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.INSERT) | |
101 | - @PostMapping | |
102 | - public AjaxResult add(@RequestBody McVisitUser mcVisitUser) | |
103 | - { | |
104 | - return toAjax(mcVisitUserService.insertMcVisitUser(mcVisitUser)); | |
105 | - } | |
106 | 26 | |
107 | - /** | |
108 | - * 修改百万用户信息(被拜访的用户) | |
109 | - */ | |
110 | - @RequirePermission("schsf:mcVisitUser:edit") | |
111 | - @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.UPDATE) | |
112 | - @PutMapping | |
113 | - public AjaxResult edit(@RequestBody McVisitUser mcVisitUser) | |
114 | - { | |
115 | - return toAjax(mcVisitUserService.updateMcVisitUser(mcVisitUser)); | |
116 | - } | |
117 | 27 | |
118 | - /** | |
119 | - * 删除百万用户信息(被拜访的用户) | |
120 | - */ | |
121 | - @RequirePermission("schsf:mcVisitUser:remove") | |
122 | - @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.DELETE) | |
123 | - @DeleteMapping("/{ids}") | |
124 | - public AjaxResult remove(@PathVariable Long[] ids) | |
125 | - { | |
126 | - return toAjax(mcVisitUserService.deleteMcVisitUserByIds(ids)); | |
127 | - } | |
28 | +// /** | |
29 | +// * 查询百万用户信息(被拜访的用户)列表 | |
30 | +// */ | |
31 | +// @RequirePermission("schsf:mcVisitUser:list") | |
32 | +// @GetMapping("/list") | |
33 | +// public TableDataInfo list(McVisitUser mcVisitUser) | |
34 | +// { | |
35 | +// startPage(); | |
36 | +// List<McVisitUser> list = mcVisitUserService.selectMcVisitUserList(mcVisitUser); | |
37 | +// return getDataTable(list); | |
38 | +// } | |
39 | +// | |
40 | +// | |
41 | +// /** | |
42 | +// * 导出百万用户信息(被拜访的用户)列表 | |
43 | +// */ | |
44 | +// @RequirePermission("schsf:mcVisitUser:export") | |
45 | +// @Log(title = "百万用户信息(被拜访的用户)",businessType = BusinessType.EXPORT) | |
46 | +// @PostMapping("/export") | |
47 | +// public void export(HttpServletResponse response,McVisitUser mcVisitUser) throws IOException { | |
48 | +// List<McVisitUser> list = mcVisitUserService.selectMcVisitUserList(mcVisitUser); | |
49 | +// try { | |
50 | +// response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); | |
51 | +// response.setCharacterEncoding("utf-8"); | |
52 | +// // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 | |
53 | +// String fileName = URLEncoder.encode("百万用户信息(被拜访的用户)", "UTF-8").replaceAll("\\+", "%20"); | |
54 | +// response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); | |
55 | +// // 这里需要设置不关闭流 | |
56 | +// EasyExcel.write(response.getOutputStream(), McVisitUser.class).autoCloseStream(Boolean.FALSE).sheet("客户信息列表") | |
57 | +// .doWrite(list); | |
58 | +// } catch (Exception e) { | |
59 | +// // 重置response | |
60 | +// e.printStackTrace(); | |
61 | +// response.reset(); | |
62 | +// response.setContentType("application/json"); | |
63 | +// response.setCharacterEncoding("utf-8"); | |
64 | +// Map<String, String> map = MapUtils.newHashMap(); | |
65 | +// map.put("status", "failure"); | |
66 | +// map.put("message", "下载文件失败" + e.getMessage()); | |
67 | +// response.getWriter().println(JSON.toJSONString(map)); | |
68 | +// } | |
69 | +// } | |
70 | +// /** | |
71 | +// * 获取百万用户信息(被拜访的用户)详细信息 | |
72 | +// */ | |
73 | +// @RequirePermission("schsf:mcVisitUser:query") | |
74 | +// @GetMapping(value = "/{id}") | |
75 | +// public AjaxResult getInfo(@PathVariable("id") Long id) | |
76 | +// { | |
77 | +// return AjaxResult.success(mcVisitUserService.selectMcVisitUserById(id)); | |
78 | +// } | |
79 | +// | |
80 | +// /** | |
81 | +// * 新增百万用户信息(被拜访的用户) | |
82 | +// */ | |
83 | +// @RequirePermission("schsf:mcVisitUser:add") | |
84 | +// @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.INSERT) | |
85 | +// @PostMapping | |
86 | +// public AjaxResult add(@RequestBody McVisitUser mcVisitUser) | |
87 | +// { | |
88 | +// return toAjax(mcVisitUserService.insertMcVisitUser(mcVisitUser)); | |
89 | +// } | |
90 | +// | |
91 | +// /** | |
92 | +// * 修改百万用户信息(被拜访的用户) | |
93 | +// */ | |
94 | +// @RequirePermission("schsf:mcVisitUser:edit") | |
95 | +// @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.UPDATE) | |
96 | +// @PutMapping | |
97 | +// public AjaxResult edit(@RequestBody McVisitUser mcVisitUser) | |
98 | +// { | |
99 | +// return toAjax(mcVisitUserService.updateMcVisitUser(mcVisitUser)); | |
100 | +// } | |
101 | +// | |
102 | +// /** | |
103 | +// * 删除百万用户信息(被拜访的用户) | |
104 | +// */ | |
105 | +// @RequirePermission("schsf:mcVisitUser:remove") | |
106 | +// @Log(title = "百万用户信息(被拜访的用户)", businessType = BusinessType.DELETE) | |
107 | +// @DeleteMapping("/{ids}") | |
108 | +// public AjaxResult remove(@PathVariable Long[] ids) | |
109 | +// { | |
110 | +// return toAjax(mcVisitUserService.deleteMcVisitUserByIds(ids)); | |
111 | +// } | |
128 | 112 | } | ... | ... |
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McBasicCmty.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McBasicMoney.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McConstruction.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McIgnition.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McOperationLog.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McVisit.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McVisitUser.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McBasicCmtyMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McBasicMoneyMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McConstructionMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McFileMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McIgnitionMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McOperationLogMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McVisitMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/mapper/McVisitUserMapper.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcBasicCmtyService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcBasicMoneyService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcConstructionService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcIgnitionService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcOperationLogService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcVisitService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/IMcVisitUserService.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McBasicCmtyServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McBasicMoneyServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McConstructionServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McFileServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McIgnitionServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McOperationLogServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McVisitServiceImpl.java
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McVisitUserServiceImpl.java