项目管理功能接口
正在显示
15 个修改的文件
包含
231 行增加
和
256 行删除
1 | package com.skua.modules.safe.controller; | 1 | package com.skua.modules.project.controller; |
2 | 2 | ||
3 | import java.util.Arrays; | 3 | import java.util.Arrays; |
4 | import java.util.List; | 4 | import java.util.List; |
... | @@ -12,8 +12,8 @@ import com.skua.core.api.vo.Result; | ... | @@ -12,8 +12,8 @@ import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 12 | import com.skua.core.aspect.annotation.AutoLog; |
13 | import com.skua.core.query.QueryGenerator; | 13 | import com.skua.core.query.QueryGenerator; |
14 | import com.skua.core.util.ConvertUtils; | 14 | import com.skua.core.util.ConvertUtils; |
15 | import com.skua.modules.safe.entity.SysSafeArea; | 15 | import com.skua.modules.project.entity.FmProject; |
16 | import com.skua.modules.safe.service.ISysSafeAreaService; | 16 | import com.skua.modules.project.service.IFmProjectService; |
17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
18 | import com.baomidou.mybatisplus.core.metadata.IPage; | 18 | import com.baomidou.mybatisplus.core.metadata.IPage; |
19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
... | @@ -35,35 +35,35 @@ import io.swagger.annotations.Api; | ... | @@ -35,35 +35,35 @@ import io.swagger.annotations.Api; |
35 | import io.swagger.annotations.ApiOperation; | 35 | import io.swagger.annotations.ApiOperation; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * 安全风险区域管理 | 38 | * 数字孪生项目管理 |
39 | */ | 39 | */ |
40 | @Slf4j | 40 | @Slf4j |
41 | @Api(tags="安全风险区域管理") | 41 | @Api(tags="数字孪生项目管理") |
42 | @RestController | 42 | @RestController |
43 | @RequestMapping("/safe/sysSafeArea") | 43 | @RequestMapping("/project/fmProject") |
44 | public class SysSafeAreaController { | 44 | public class FmProjectController { |
45 | @Autowired | 45 | @Autowired |
46 | private ISysSafeAreaService sysSafeAreaService; | 46 | private IFmProjectService fmProjectService; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * 分页列表查询 | 49 | * 分页列表查询 |
50 | * @param sysSafeArea | 50 | * @param fmProject |
51 | * @param pageNo | 51 | * @param pageNo |
52 | * @param pageSize | 52 | * @param pageSize |
53 | * @param req | 53 | * @param req |
54 | * @return | 54 | * @return |
55 | */ | 55 | */ |
56 | @AutoLog(value = "安全风险区域管理-分页列表查询") | 56 | @AutoLog(value = "数字孪生项目管理-分页列表查询") |
57 | @ApiOperation(value="安全风险区域管理-分页列表查询", notes="安全风险区域管理-分页列表查询") | 57 | @ApiOperation(value="数字孪生项目管理-分页列表查询", notes="数字孪生项目管理-分页列表查询") |
58 | @GetMapping(value = "/list") | 58 | @GetMapping(value = "/list") |
59 | public Result<IPage<SysSafeArea>> queryPageList(SysSafeArea sysSafeArea, | 59 | public Result<IPage<FmProject>> queryPageList(FmProject fmProject, |
60 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | 60 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
61 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 61 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
62 | HttpServletRequest req) { | 62 | HttpServletRequest req) { |
63 | Result<IPage<SysSafeArea>> result = new Result<IPage<SysSafeArea>>(); | 63 | Result<IPage<FmProject>> result = new Result<IPage<FmProject>>(); |
64 | QueryWrapper<SysSafeArea> queryWrapper = QueryGenerator.initQueryWrapper(sysSafeArea, req.getParameterMap()); | 64 | QueryWrapper<FmProject> queryWrapper = QueryGenerator.initQueryWrapper(fmProject, req.getParameterMap()); |
65 | Page<SysSafeArea> page = new Page<SysSafeArea>(pageNo, pageSize); | 65 | Page<FmProject> page = new Page<FmProject>(pageNo, pageSize); |
66 | IPage<SysSafeArea> pageList = sysSafeAreaService.page(page, queryWrapper); | 66 | IPage<FmProject> pageList = fmProjectService.page(page, queryWrapper); |
67 | result.setSuccess(true); | 67 | result.setSuccess(true); |
68 | result.setResult(pageList); | 68 | result.setResult(pageList); |
69 | return result; | 69 | return result; |
... | @@ -71,16 +71,16 @@ public class SysSafeAreaController { | ... | @@ -71,16 +71,16 @@ public class SysSafeAreaController { |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * 添加 | 73 | * 添加 |
74 | * @param sysSafeArea | 74 | * @param fmProject |
75 | * @return | 75 | * @return |
76 | */ | 76 | */ |
77 | @AutoLog(value = "安全风险区域管理-添加") | 77 | @AutoLog(value = "数字孪生项目管理-添加") |
78 | @ApiOperation(value="安全风险区域管理-添加", notes="安全风险区域管理-添加") | 78 | @ApiOperation(value="数字孪生项目管理-添加", notes="数字孪生项目管理-添加") |
79 | @PostMapping(value = "/add") | 79 | @PostMapping(value = "/add") |
80 | public Result<SysSafeArea> add(@RequestBody SysSafeArea sysSafeArea) { | 80 | public Result<FmProject> add(@RequestBody FmProject fmProject) { |
81 | Result<SysSafeArea> result = new Result<SysSafeArea>(); | 81 | Result<FmProject> result = new Result<FmProject>(); |
82 | try { | 82 | try { |
83 | sysSafeAreaService.save(sysSafeArea); | 83 | fmProjectService.save(fmProject); |
84 | result.success("添加成功!"); | 84 | result.success("添加成功!"); |
85 | } catch (Exception e) { | 85 | } catch (Exception e) { |
86 | log.error(e.getMessage(),e); | 86 | log.error(e.getMessage(),e); |
... | @@ -91,19 +91,19 @@ public class SysSafeAreaController { | ... | @@ -91,19 +91,19 @@ public class SysSafeAreaController { |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * 编辑 | 93 | * 编辑 |
94 | * @param sysSafeArea | 94 | * @param fmProject |
95 | * @return | 95 | * @return |
96 | */ | 96 | */ |
97 | @AutoLog(value = "安全风险区域管理-编辑") | 97 | @AutoLog(value = "数字孪生项目管理-编辑") |
98 | @ApiOperation(value="安全风险区域管理-编辑", notes="安全风险区域管理-编辑") | 98 | @ApiOperation(value="数字孪生项目管理-编辑", notes="数字孪生项目管理-编辑") |
99 | @PutMapping(value = "/edit") | 99 | @PutMapping(value = "/edit") |
100 | public Result<SysSafeArea> edit(@RequestBody SysSafeArea sysSafeArea) { | 100 | public Result<FmProject> edit(@RequestBody FmProject fmProject) { |
101 | Result<SysSafeArea> result = new Result<SysSafeArea>(); | 101 | Result<FmProject> result = new Result<FmProject>(); |
102 | SysSafeArea sysSafeAreaEntity = sysSafeAreaService.getById(sysSafeArea.getId()); | 102 | FmProject fmProjectEntity = fmProjectService.getById(fmProject.getId()); |
103 | if(sysSafeAreaEntity==null) { | 103 | if(fmProjectEntity==null) { |
104 | result.error500("未找到对应实体"); | 104 | result.error500("未找到对应实体"); |
105 | }else { | 105 | }else { |
106 | boolean ok = sysSafeAreaService.updateById(sysSafeArea); | 106 | boolean ok = fmProjectService.updateById(fmProject); |
107 | //TODO 返回false说明什么? | 107 | //TODO 返回false说明什么? |
108 | if(ok) { | 108 | if(ok) { |
109 | result.success("修改成功!"); | 109 | result.success("修改成功!"); |
... | @@ -118,12 +118,12 @@ public class SysSafeAreaController { | ... | @@ -118,12 +118,12 @@ public class SysSafeAreaController { |
118 | * @param id | 118 | * @param id |
119 | * @return | 119 | * @return |
120 | */ | 120 | */ |
121 | @AutoLog(value = "安全风险区域管理-通过id删除") | 121 | @AutoLog(value = "数字孪生项目管理-通过id删除") |
122 | @ApiOperation(value="安全风险区域管理-通过id删除", notes="安全风险区域管理-通过id删除") | 122 | @ApiOperation(value="数字孪生项目管理-通过id删除", notes="数字孪生项目管理-通过id删除") |
123 | @DeleteMapping(value = "/delete") | 123 | @DeleteMapping(value = "/delete") |
124 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { | 124 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
125 | try { | 125 | try { |
126 | sysSafeAreaService.removeById(id); | 126 | fmProjectService.removeById(id); |
127 | } catch (Exception e) { | 127 | } catch (Exception e) { |
128 | log.error("删除失败",e.getMessage()); | 128 | log.error("删除失败",e.getMessage()); |
129 | return Result.error("删除失败!"); | 129 | return Result.error("删除失败!"); |
... | @@ -136,15 +136,15 @@ public class SysSafeAreaController { | ... | @@ -136,15 +136,15 @@ public class SysSafeAreaController { |
136 | * @param ids | 136 | * @param ids |
137 | * @return | 137 | * @return |
138 | */ | 138 | */ |
139 | @AutoLog(value = "安全风险区域管理-批量删除") | 139 | @AutoLog(value = "数字孪生项目管理-批量删除") |
140 | @ApiOperation(value="安全风险区域管理-批量删除", notes="安全风险区域管理-批量删除") | 140 | @ApiOperation(value="数字孪生项目管理-批量删除", notes="数字孪生项目管理-批量删除") |
141 | @DeleteMapping(value = "/deleteBatch") | 141 | @DeleteMapping(value = "/deleteBatch") |
142 | public Result<SysSafeArea> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 142 | public Result<FmProject> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
143 | Result<SysSafeArea> result = new Result<SysSafeArea>(); | 143 | Result<FmProject> result = new Result<FmProject>(); |
144 | if(ids==null || "".equals(ids.trim())) { | 144 | if(ids==null || "".equals(ids.trim())) { |
145 | result.error500("参数不识别!"); | 145 | result.error500("参数不识别!"); |
146 | }else { | 146 | }else { |
147 | this.sysSafeAreaService.removeByIds(Arrays.asList(ids.split(","))); | 147 | this.fmProjectService.removeByIds(Arrays.asList(ids.split(","))); |
148 | result.success("删除成功!"); | 148 | result.success("删除成功!"); |
149 | } | 149 | } |
150 | return result; | 150 | return result; |
... | @@ -155,16 +155,16 @@ public class SysSafeAreaController { | ... | @@ -155,16 +155,16 @@ public class SysSafeAreaController { |
155 | * @param id | 155 | * @param id |
156 | * @return | 156 | * @return |
157 | */ | 157 | */ |
158 | @AutoLog(value = "安全风险区域管理-通过id查询") | 158 | @AutoLog(value = "数字孪生项目管理-通过id查询") |
159 | @ApiOperation(value="安全风险区域管理-通过id查询", notes="安全风险区域管理-通过id查询") | 159 | @ApiOperation(value="数字孪生项目管理-通过id查询", notes="数字孪生项目管理-通过id查询") |
160 | @GetMapping(value = "/queryById") | 160 | @GetMapping(value = "/queryById") |
161 | public Result<SysSafeArea> queryById(@RequestParam(name="id",required=true) String id) { | 161 | public Result<FmProject> queryById(@RequestParam(name="id",required=true) String id) { |
162 | Result<SysSafeArea> result = new Result<SysSafeArea>(); | 162 | Result<FmProject> result = new Result<FmProject>(); |
163 | SysSafeArea sysSafeArea = sysSafeAreaService.getById(id); | 163 | FmProject fmProject = fmProjectService.getById(id); |
164 | if(sysSafeArea==null) { | 164 | if(fmProject==null) { |
165 | result.error500("未找到对应实体"); | 165 | result.error500("未找到对应实体"); |
166 | }else { | 166 | }else { |
167 | result.setResult(sysSafeArea); | 167 | result.setResult(fmProject); |
168 | result.setSuccess(true); | 168 | result.setSuccess(true); |
169 | } | 169 | } |
170 | return result; | 170 | return result; |
... | @@ -179,13 +179,13 @@ public class SysSafeAreaController { | ... | @@ -179,13 +179,13 @@ public class SysSafeAreaController { |
179 | @RequestMapping(value = "/exportXls") | 179 | @RequestMapping(value = "/exportXls") |
180 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | 180 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { |
181 | // Step.1 组装查询条件 | 181 | // Step.1 组装查询条件 |
182 | QueryWrapper<SysSafeArea> queryWrapper = null; | 182 | QueryWrapper<FmProject> queryWrapper = null; |
183 | try { | 183 | try { |
184 | String paramsStr = request.getParameter("paramsStr"); | 184 | String paramsStr = request.getParameter("paramsStr"); |
185 | if (ConvertUtils.isNotEmpty(paramsStr)) { | 185 | if (ConvertUtils.isNotEmpty(paramsStr)) { |
186 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); | 186 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); |
187 | SysSafeArea sysSafeArea = JSON.parseObject(deString, SysSafeArea.class); | 187 | FmProject fmProject = JSON.parseObject(deString, FmProject.class); |
188 | queryWrapper = QueryGenerator.initQueryWrapper(sysSafeArea, request.getParameterMap()); | 188 | queryWrapper = QueryGenerator.initQueryWrapper(fmProject, request.getParameterMap()); |
189 | } | 189 | } |
190 | } catch (UnsupportedEncodingException e) { | 190 | } catch (UnsupportedEncodingException e) { |
191 | e.printStackTrace(); | 191 | e.printStackTrace(); |
... | @@ -193,11 +193,11 @@ public class SysSafeAreaController { | ... | @@ -193,11 +193,11 @@ public class SysSafeAreaController { |
193 | 193 | ||
194 | //Step.2 AutoPoi 导出Excel | 194 | //Step.2 AutoPoi 导出Excel |
195 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | 195 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
196 | List<SysSafeArea> pageList = sysSafeAreaService.list(queryWrapper); | 196 | List<FmProject> pageList = fmProjectService.list(queryWrapper); |
197 | //导出文件名称 | 197 | //导出文件名称 |
198 | mv.addObject(NormalExcelConstants.FILE_NAME, "安全风险区域管理列表"); | 198 | mv.addObject(NormalExcelConstants.FILE_NAME, "数字孪生项目管理列表"); |
199 | mv.addObject(NormalExcelConstants.CLASS, SysSafeArea.class); | 199 | mv.addObject(NormalExcelConstants.CLASS, FmProject.class); |
200 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("安全风险区域管理列表数据", "导出人:Jeecg", "导出信息")); | 200 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数字孪生项目管理列表数据", "导出人:Jeecg", "导出信息")); |
201 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | 201 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
202 | return mv; | 202 | return mv; |
203 | } | 203 | } |
... | @@ -220,9 +220,9 @@ public class SysSafeAreaController { | ... | @@ -220,9 +220,9 @@ public class SysSafeAreaController { |
220 | params.setHeadRows(1); | 220 | params.setHeadRows(1); |
221 | params.setNeedSave(true); | 221 | params.setNeedSave(true); |
222 | try { | 222 | try { |
223 | List<SysSafeArea> listSysSafeAreas = ExcelImportUtil.importExcel(file.getInputStream(), SysSafeArea.class, params); | 223 | List<FmProject> listFmProjects = ExcelImportUtil.importExcel(file.getInputStream(), FmProject.class, params); |
224 | sysSafeAreaService.saveBatch(listSysSafeAreas); | 224 | fmProjectService.saveBatch(listFmProjects); |
225 | return Result.ok("文件导入成功!数据行数:" + listSysSafeAreas.size()); | 225 | return Result.ok("文件导入成功!数据行数:" + listFmProjects.size()); |
226 | } catch (Exception e) { | 226 | } catch (Exception e) { |
227 | log.error(e.getMessage(),e); | 227 | log.error(e.getMessage(),e); |
228 | return Result.error("文件导入失败:"+e.getMessage()); | 228 | return Result.error("文件导入失败:"+e.getMessage()); | ... | ... |
1 | package com.skua.modules.project.controller; | ||
2 | |||
3 | import com.skua.core.api.vo.Result; | ||
4 | import com.skua.core.aspect.annotation.AutoLog; | ||
5 | import com.skua.modules.project.entity.FmProject; | ||
6 | import com.skua.modules.project.service.IProjectService; | ||
7 | import com.skua.modules.project.vo.FmProjectVO; | ||
8 | import io.swagger.annotations.Api; | ||
9 | import io.swagger.annotations.ApiOperation; | ||
10 | import lombok.extern.slf4j.Slf4j; | ||
11 | import org.springframework.beans.factory.annotation.Autowired; | ||
12 | import org.springframework.web.bind.annotation.*; | ||
13 | import java.util.List; | ||
14 | |||
15 | /** | ||
16 | * 数字孪生项目管理 | ||
17 | */ | ||
18 | @Slf4j | ||
19 | @Api(tags="数字孪生项目管理") | ||
20 | @RestController | ||
21 | @RequestMapping("/3d/project") | ||
22 | public class ProjectController { | ||
23 | @Autowired | ||
24 | private IProjectService projectService; | ||
25 | |||
26 | /** | ||
27 | * 列表查询 | ||
28 | * @return | ||
29 | */ | ||
30 | @AutoLog(value = "数字孪生项目管理列表查询") | ||
31 | @ApiOperation(value="数字孪生项目管理列表查询", notes="数字孪生项目管理列表查询") | ||
32 | @GetMapping(value = "/list") | ||
33 | public Result<List<FmProjectVO>> queryList() { | ||
34 | Result<List<FmProjectVO>> result = new Result<List<FmProjectVO>>(); | ||
35 | List<FmProjectVO> pageList = projectService.queryList(); | ||
36 | result.setSuccess(true); | ||
37 | result.setResult(pageList); | ||
38 | return result; | ||
39 | } | ||
40 | |||
41 | } |
1 | package com.skua.modules.safe.entity; | 1 | package com.skua.modules.project.entity; |
2 | 2 | ||
3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
4 | import java.util.Date; | 4 | import java.util.Date; |
... | @@ -16,59 +16,31 @@ import org.springframework.format.annotation.DateTimeFormat; | ... | @@ -16,59 +16,31 @@ import org.springframework.format.annotation.DateTimeFormat; |
16 | import org.jeecgframework.poi.excel.annotation.Excel; | 16 | import org.jeecgframework.poi.excel.annotation.Excel; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * 安全风险区域管理 | 19 | * 数字孪生项目管理 |
20 | */ | 20 | */ |
21 | @Data | 21 | @Data |
22 | @TableName("sys_safe_area") | 22 | @TableName("fm_project") |
23 | @EqualsAndHashCode(callSuper = false) | 23 | @EqualsAndHashCode(callSuper = false) |
24 | @Accessors(chain = true) | 24 | @Accessors(chain = true) |
25 | @ApiModel(value="sys_safe_area对象", description="安全风险区域管理") | 25 | @ApiModel(value="fm_project对象", description="数字孪生项目管理") |
26 | public class SysSafeArea { | 26 | public class FmProject { |
27 | 27 | ||
28 | /**主键id*/ | 28 | /**主键id*/ |
29 | @TableId(type = IdType.UUID) | 29 | @TableId(type = IdType.UUID) |
30 | @ApiModelProperty(value = "主键id") | 30 | @ApiModelProperty(value = "主键id") |
31 | private java.lang.Integer id; | 31 | private java.lang.String id; |
32 | /**区间id*/ | 32 | /**项目编码*/ |
33 | @Excel(name = "区间id", width = 15) | 33 | @Excel(name = "项目编码", width = 15) |
34 | @ApiModelProperty(value = "区间id") | 34 | @ApiModelProperty(value = "项目编码") |
35 | private java.lang.String structId; | 35 | private java.lang.String projectId; |
36 | /**区间名称*/ | 36 | /**项目名称*/ |
37 | @Excel(name = "区间名称", width = 15) | 37 | @Excel(name = "项目名称", width = 15) |
38 | @ApiModelProperty(value = "区间名称") | 38 | @ApiModelProperty(value = "项目名称") |
39 | private java.lang.String structName; | 39 | private java.lang.String projectName; |
40 | /**现场风险辨识*/ | 40 | /**描述*/ |
41 | @Excel(name = "现场风险辨识", width = 15) | 41 | @Excel(name = "描述", width = 15) |
42 | @ApiModelProperty(value = "现场风险辨识") | 42 | @ApiModelProperty(value = "描述") |
43 | private java.lang.String safeDanger; | 43 | private java.lang.String remark; |
44 | /**应急处置措施*/ | ||
45 | @Excel(name = "应急处置措施", width = 15) | ||
46 | @ApiModelProperty(value = "应急处置措施") | ||
47 | private java.lang.String safeMeasures; | ||
48 | /**人的要求*/ | ||
49 | @Excel(name = "人的要求", width = 15) | ||
50 | @ApiModelProperty(value = "人的要求") | ||
51 | private java.lang.String safePerson; | ||
52 | /**机械的要求*/ | ||
53 | @Excel(name = "机械的要求", width = 15) | ||
54 | @ApiModelProperty(value = "机械的要求") | ||
55 | private java.lang.String safeEquip; | ||
56 | /**产品物料*/ | ||
57 | @Excel(name = "产品物料", width = 15) | ||
58 | @ApiModelProperty(value = "产品物料") | ||
59 | private java.lang.String safeMaterial; | ||
60 | /**操作要点*/ | ||
61 | @Excel(name = "操作要点", width = 15) | ||
62 | @ApiModelProperty(value = "操作要点") | ||
63 | private java.lang.String safeOperation; | ||
64 | /**作业环境*/ | ||
65 | @Excel(name = "作业环境", width = 15) | ||
66 | @ApiModelProperty(value = "作业环境") | ||
67 | private java.lang.String safeEnvironment; | ||
68 | /**所属厂区*/ | ||
69 | @Excel(name = "所属厂区", width = 15) | ||
70 | @ApiModelProperty(value = "所属厂区") | ||
71 | private java.lang.String factoryId; | ||
72 | /**创建人*/ | 44 | /**创建人*/ |
73 | @Excel(name = "创建人", width = 15) | 45 | @Excel(name = "创建人", width = 15) |
74 | @ApiModelProperty(value = "创建人") | 46 | @ApiModelProperty(value = "创建人") |
... | @@ -89,8 +61,8 @@ public class SysSafeArea { | ... | @@ -89,8 +61,8 @@ public class SysSafeArea { |
89 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 61 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
90 | @ApiModelProperty(value = "更新时间") | 62 | @ApiModelProperty(value = "更新时间") |
91 | private java.util.Date updateTime; | 63 | private java.util.Date updateTime; |
92 | /**标识*/ | 64 | /**删除标识*/ |
93 | @Excel(name = "标识", width = 15) | 65 | @Excel(name = "删除标识", width = 15) |
94 | @ApiModelProperty(value = "标识") | 66 | @ApiModelProperty(value = "删除标识") |
95 | private java.lang.Integer delFlag; | 67 | private java.lang.String delFlag; |
96 | } | 68 | } | ... | ... |
1 | package com.skua.modules.safe.mapper; | 1 | package com.skua.modules.project.mapper; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | import org.apache.ibatis.annotations.Param; | 5 | import org.apache.ibatis.annotations.Param; |
6 | import com.skua.modules.safe.entity.SysSafeArea; | 6 | import com.skua.modules.project.entity.FmProject; |
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * 安全风险区域管理 | 10 | * 数字孪生项目管理 |
11 | */ | 11 | */ |
12 | public interface SysSafeAreaMapper extends BaseMapper<SysSafeArea> { | 12 | public interface FmProjectMapper extends BaseMapper<FmProject> { |
13 | 13 | ||
14 | List<FmProject> queryList(); | ||
14 | } | 15 | } | ... | ... |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.safe.mapper.SysSafeAreaMapper"> | 3 | <mapper namespace="com.skua.modules.project.mapper.FmProjectMapper"> |
4 | |||
5 | <select id="queryList" resultType="com.skua.modules.project.entity.FmProject"> | ||
6 | select * from fm_project order by project_id | ||
7 | </select> | ||
4 | 8 | ||
5 | </mapper> | 9 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | package com.skua.modules.project.service.impl; | ||
2 | |||
3 | import com.skua.modules.project.entity.FmProject; | ||
4 | import com.skua.modules.project.mapper.FmProjectMapper; | ||
5 | import com.skua.modules.project.service.IFmProjectService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | |||
10 | /** | ||
11 | * 数字孪生项目管理 | ||
12 | */ | ||
13 | @Service | ||
14 | public class FmProjectServiceImpl extends ServiceImpl<FmProjectMapper, FmProject> implements IFmProjectService { | ||
15 | |||
16 | } |
1 | package com.skua.modules.project.service.impl; | ||
2 | |||
3 | import com.skua.modules.project.entity.FmProject; | ||
4 | import com.skua.modules.project.mapper.FmProjectMapper; | ||
5 | import com.skua.modules.project.service.IProjectService; | ||
6 | import com.skua.modules.project.vo.FmProjectVO; | ||
7 | import org.springframework.beans.factory.annotation.Autowired; | ||
8 | import org.springframework.stereotype.Service; | ||
9 | |||
10 | import java.util.ArrayList; | ||
11 | import java.util.List; | ||
12 | |||
13 | /** | ||
14 | * 数字孪生项目管理 | ||
15 | */ | ||
16 | @Service | ||
17 | public class ProjectServiceImpl implements IProjectService { | ||
18 | |||
19 | @Autowired | ||
20 | private FmProjectMapper fmProjectMapper; | ||
21 | |||
22 | @Override | ||
23 | public List<FmProjectVO> queryList() { | ||
24 | List<FmProjectVO> list = new ArrayList<>(); | ||
25 | List<FmProject> reslist = new ArrayList<>(); | ||
26 | reslist = fmProjectMapper.queryList(); | ||
27 | for (FmProject fmProject : reslist ) { | ||
28 | FmProjectVO fmProjectVO = new FmProjectVO(); | ||
29 | fmProjectVO.setProjectId(fmProject.getProjectId()); | ||
30 | fmProjectVO.setProjectName(fmProject.getProjectName()); | ||
31 | list.add(fmProjectVO); | ||
32 | } | ||
33 | return list; | ||
34 | } | ||
35 | } |
1 | package com.skua.modules.project.vo; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | import com.baomidou.mybatisplus.annotation.TableId; | ||
5 | import com.baomidou.mybatisplus.annotation.TableName; | ||
6 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
7 | import io.swagger.annotations.ApiModel; | ||
8 | import io.swagger.annotations.ApiModelProperty; | ||
9 | import lombok.Data; | ||
10 | import lombok.EqualsAndHashCode; | ||
11 | import lombok.experimental.Accessors; | ||
12 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
13 | import org.springframework.format.annotation.DateTimeFormat; | ||
14 | |||
15 | import java.util.Date; | ||
16 | |||
17 | /** | ||
18 | * 数字孪生项目管理 | ||
19 | */ | ||
20 | @Data | ||
21 | public class FmProjectVO { | ||
22 | |||
23 | /**项目编码*/ | ||
24 | private String projectId; | ||
25 | /**项目名称*/ | ||
26 | private String projectName; | ||
27 | |||
28 | } |
... | @@ -25,7 +25,5 @@ public interface ISysMonthDataService extends IService<SysMonthData> { | ... | @@ -25,7 +25,5 @@ public interface ISysMonthDataService extends IService<SysMonthData> { |
25 | 25 | ||
26 | List<ResultDataVO> getMonthlyDataTotal(String factoryId, String month); | 26 | List<ResultDataVO> getMonthlyDataTotal(String factoryId, String month); |
27 | 27 | ||
28 | Map<String, Object> getDigitalSignageInfo(String factoryId, String structId); | ||
29 | |||
30 | Map<String, Object> getDigitalSignageData(String factoryId, String structId); | 28 | Map<String, Object> getDigitalSignageData(String factoryId, String structId); |
31 | } | 29 | } | ... | ... |
... | @@ -10,8 +10,6 @@ import com.skua.modules.monitor.service.ISysMonthDataService; | ... | @@ -10,8 +10,6 @@ import com.skua.modules.monitor.service.ISysMonthDataService; |
10 | import com.skua.modules.remote.service.ISysMonitorDataService; | 10 | import com.skua.modules.remote.service.ISysMonitorDataService; |
11 | import com.skua.modules.remote.service.ISysMonitorLocationService; | 11 | import com.skua.modules.remote.service.ISysMonitorLocationService; |
12 | import com.skua.modules.remote.vo.MonitorLocationVO; | 12 | import com.skua.modules.remote.vo.MonitorLocationVO; |
13 | import com.skua.modules.safe.entity.SysSafeArea; | ||
14 | import com.skua.modules.safe.service.ISysSafeAreaService; | ||
15 | import com.skua.modules.system.datestandard.entity.SysStructDict; | 13 | import com.skua.modules.system.datestandard.entity.SysStructDict; |
16 | import com.skua.modules.system.datestandard.mapper.SysStructDictMapper; | 14 | import com.skua.modules.system.datestandard.mapper.SysStructDictMapper; |
17 | import com.skua.modules.system.vo.ResultDataVO; | 15 | import com.skua.modules.system.vo.ResultDataVO; |
... | @@ -38,15 +36,9 @@ public class SysMonthDataServiceImpl extends ServiceImpl<SysMonthDataMapper, Sys | ... | @@ -38,15 +36,9 @@ public class SysMonthDataServiceImpl extends ServiceImpl<SysMonthDataMapper, Sys |
38 | @Resource | 36 | @Resource |
39 | private SysMonthDataMapper sysMonthDataMapper; | 37 | private SysMonthDataMapper sysMonthDataMapper; |
40 | @Autowired | 38 | @Autowired |
41 | private SysStructDictMapper sysStructDictMapper; | ||
42 | @Autowired | ||
43 | private SysEquipInfoMapper sysEquipInfoMapper; | ||
44 | @Autowired | ||
45 | private ISysMonitorLocationService sysMonitorLocationService; | 39 | private ISysMonitorLocationService sysMonitorLocationService; |
46 | @Autowired | 40 | @Autowired |
47 | private ISysMonitorDataService sysMonitorDataService; | 41 | private ISysMonitorDataService sysMonitorDataService; |
48 | @Autowired | ||
49 | private ISysSafeAreaService sysSafeAreaService; | ||
50 | 42 | ||
51 | DecimalFormat df = new DecimalFormat("0.00"); | 43 | DecimalFormat df = new DecimalFormat("0.00"); |
52 | 44 | ||
... | @@ -305,30 +297,6 @@ public class SysMonthDataServiceImpl extends ServiceImpl<SysMonthDataMapper, Sys | ... | @@ -305,30 +297,6 @@ public class SysMonthDataServiceImpl extends ServiceImpl<SysMonthDataMapper, Sys |
305 | } | 297 | } |
306 | 298 | ||
307 | @Override | 299 | @Override |
308 | public Map<String, Object> getDigitalSignageInfo(String factoryId, String structId) { | ||
309 | Map<String, Object> map = new HashMap<>(); | ||
310 | SysStructDict structDict = sysStructDictMapper.getDataByCode(factoryId, structId); | ||
311 | if(structDict!=null){ | ||
312 | map.put("unit",structDict); | ||
313 | }else{ | ||
314 | map.put("unit",new SysStructDict()); | ||
315 | } | ||
316 | List<SysEquipInfoVO> equipList = sysEquipInfoMapper.getListByCode(factoryId, structId); | ||
317 | if(equipList.size()>0){ | ||
318 | map.put("equip",equipList); | ||
319 | }else { | ||
320 | map.put("equip",new ArrayList<>()); | ||
321 | } | ||
322 | SysSafeArea safeArea = sysSafeAreaService.getSafeInfo(factoryId, structId); | ||
323 | if(safeArea!=null){ | ||
324 | map.put("safe",safeArea); | ||
325 | }else{ | ||
326 | map.put("safe",new SysSafeArea()); | ||
327 | } | ||
328 | return map; | ||
329 | } | ||
330 | |||
331 | @Override | ||
332 | public Map<String, Object> getDigitalSignageData(String factoryId, String structId) { | 300 | public Map<String, Object> getDigitalSignageData(String factoryId, String structId) { |
333 | Map<String, Object> map = new HashMap<>(); | 301 | Map<String, Object> map = new HashMap<>(); |
334 | Map<String,Object> monitorMap = new HashMap<>(); | 302 | Map<String,Object> monitorMap = new HashMap<>(); | ... | ... |
1 | package com.skua.modules.safe.service; | ||
2 | |||
3 | import com.skua.modules.safe.entity.SysSafeArea; | ||
4 | import com.baomidou.mybatisplus.extension.service.IService; | ||
5 | |||
6 | import java.util.List; | ||
7 | import java.util.Map; | ||
8 | |||
9 | /** | ||
10 | * 安全风险区域管理 | ||
11 | */ | ||
12 | public interface ISysSafeAreaService extends IService<SysSafeArea> { | ||
13 | |||
14 | SysSafeArea getSafeInfo(String factoryId,String structId); | ||
15 | |||
16 | List<Map<String, Object>> getSafeList(String factoryId); | ||
17 | } |
fm-system/src/main/java/com/skua/modules/safe/service/impl/SysSafeAreaServiceImpl.java
deleted
100644 → 0
1 | package com.skua.modules.safe.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | import com.skua.modules.safe.entity.SysSafeArea; | ||
5 | import com.skua.modules.safe.mapper.SysSafeAreaMapper; | ||
6 | import com.skua.modules.safe.service.ISysSafeAreaService; | ||
7 | import io.swagger.annotations.ApiModelProperty; | ||
8 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
9 | import org.springframework.beans.factory.annotation.Autowired; | ||
10 | import org.springframework.stereotype.Service; | ||
11 | |||
12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
13 | |||
14 | import java.util.ArrayList; | ||
15 | import java.util.HashMap; | ||
16 | import java.util.List; | ||
17 | import java.util.Map; | ||
18 | |||
19 | /** | ||
20 | * 安全风险区域管理 | ||
21 | */ | ||
22 | @Service | ||
23 | public class SysSafeAreaServiceImpl extends ServiceImpl<SysSafeAreaMapper, SysSafeArea> implements ISysSafeAreaService { | ||
24 | |||
25 | @Autowired | ||
26 | private SysSafeAreaMapper sysSafeAreaMapper; | ||
27 | |||
28 | @Override | ||
29 | public SysSafeArea getSafeInfo(String factoryId,String structId) { | ||
30 | List<SysSafeArea> list = new ArrayList<>(); | ||
31 | LambdaQueryWrapper<SysSafeArea> queryWrapper = new LambdaQueryWrapper<SysSafeArea>(); | ||
32 | queryWrapper.eq(SysSafeArea::getFactoryId, factoryId); | ||
33 | queryWrapper.eq(SysSafeArea::getStructId, structId); | ||
34 | list = sysSafeAreaMapper.selectList(queryWrapper); | ||
35 | if(list.size()>0){ | ||
36 | return list.get(0); | ||
37 | }else{ | ||
38 | return new SysSafeArea(); | ||
39 | } | ||
40 | } | ||
41 | |||
42 | @Override | ||
43 | public List<Map<String, Object>> getSafeList(String factoryId) { | ||
44 | List<Map<String, Object>> list = new ArrayList<>(); | ||
45 | List<SysSafeArea> safeList = new ArrayList<>(); | ||
46 | LambdaQueryWrapper<SysSafeArea> queryWrapper = new LambdaQueryWrapper<SysSafeArea>(); | ||
47 | queryWrapper.eq(SysSafeArea::getFactoryId, factoryId); | ||
48 | safeList = sysSafeAreaMapper.selectList(queryWrapper); | ||
49 | for ( SysSafeArea safeArea : safeList ) { | ||
50 | Map<String, Object> map = new HashMap<>(); | ||
51 | map.put("structId", safeArea.getStructId()); | ||
52 | map.put("structName", safeArea.getStructName()); | ||
53 | list.add(map); | ||
54 | } | ||
55 | return list; | ||
56 | } | ||
57 | } |
... | @@ -15,8 +15,6 @@ import com.skua.modules.equip.service.IEquipInfoService; | ... | @@ -15,8 +15,6 @@ import com.skua.modules.equip.service.IEquipInfoService; |
15 | import com.skua.modules.equip.service.ISysEquipInfoService; | 15 | import com.skua.modules.equip.service.ISysEquipInfoService; |
16 | import com.skua.modules.monitor.entity.SysMonthData; | 16 | import com.skua.modules.monitor.entity.SysMonthData; |
17 | import com.skua.modules.monitor.service.ISysMonthDataService; | 17 | import com.skua.modules.monitor.service.ISysMonthDataService; |
18 | import com.skua.modules.safe.entity.SysSafeArea; | ||
19 | import com.skua.modules.safe.service.ISysSafeAreaService; | ||
20 | import com.skua.modules.shiro.vo.DefContants; | 18 | import com.skua.modules.shiro.vo.DefContants; |
21 | import com.skua.modules.system.entity.SysDepart; | 19 | import com.skua.modules.system.entity.SysDepart; |
22 | import com.skua.modules.system.entity.SysUser; | 20 | import com.skua.modules.system.entity.SysUser; |
... | @@ -66,8 +64,6 @@ public class MqDataController { | ... | @@ -66,8 +64,6 @@ public class MqDataController { |
66 | @Autowired | 64 | @Autowired |
67 | private ISysMonthDataService sysMonthDataService; | 65 | private ISysMonthDataService sysMonthDataService; |
68 | @Autowired | 66 | @Autowired |
69 | private ISysSafeAreaService sysSafeAreaService; | ||
70 | @Autowired | ||
71 | private ITVideoService tVideoService; | 67 | private ITVideoService tVideoService; |
72 | @Autowired | 68 | @Autowired |
73 | private IPgQueryService pgQueryService; | 69 | private IPgQueryService pgQueryService; |
... | @@ -670,29 +666,6 @@ public class MqDataController { | ... | @@ -670,29 +666,6 @@ public class MqDataController { |
670 | return result; | 666 | return result; |
671 | } | 667 | } |
672 | 668 | ||
673 | @AutoLog(value = "获取安全区域列表") | ||
674 | @ApiOperation(value="获取安全区域列表", notes="获取安全区域列表") | ||
675 | @GetMapping(value = "/getSafeList") | ||
676 | public Result<List<Map<String,Object>>> getSafeList() { | ||
677 | Result<List<Map<String,Object>>> result = new Result<>(); | ||
678 | List<Map<String,Object>> list = new ArrayList<>(); | ||
679 | list = sysSafeAreaService.getSafeList(factoryId); | ||
680 | result.setResult(list); | ||
681 | result.setSuccess(true); | ||
682 | return result; | ||
683 | } | ||
684 | |||
685 | @AutoLog(value = "获取安全区域信息") | ||
686 | @ApiOperation(value="获取安全区域信息", notes="获取安全区域信息") | ||
687 | @GetMapping(value = "/getSafeInfo") | ||
688 | public Result<SysSafeArea> getSafeInfo(String structId) { | ||
689 | Result<SysSafeArea> result = new Result<>(); | ||
690 | SysSafeArea sysSafeArea = new SysSafeArea(); | ||
691 | sysSafeArea = sysSafeAreaService.getSafeInfo(factoryId,structId); | ||
692 | result.setResult(sysSafeArea); | ||
693 | result.setSuccess(true); | ||
694 | return result; | ||
695 | } | ||
696 | 669 | ||
697 | @AutoLog(value = "获取摄像头列表") | 670 | @AutoLog(value = "获取摄像头列表") |
698 | @ApiOperation(value="获取摄像头列表", notes="获取摄像头列表") | 671 | @ApiOperation(value="获取摄像头列表", notes="获取摄像头列表") |
... | @@ -729,17 +702,6 @@ public class MqDataController { | ... | @@ -729,17 +702,6 @@ public class MqDataController { |
729 | } | 702 | } |
730 | 703 | ||
731 | @AutoLog(value = "电子看板数据接口") | 704 | @AutoLog(value = "电子看板数据接口") |
732 | @GetMapping(value = "/digitalSignageInfo") | ||
733 | public Result<Map<String,Object>> getDigitalSignageInfo(String structId) { | ||
734 | Result<Map<String,Object>> result = new Result<>(); | ||
735 | Map<String,Object> map = new HashMap<>(); | ||
736 | map = sysMonthDataService.getDigitalSignageInfo(factoryId,structId); | ||
737 | result.setResult(map); | ||
738 | result.setSuccess(true); | ||
739 | return result; | ||
740 | } | ||
741 | |||
742 | @AutoLog(value = "电子看板数据接口") | ||
743 | @GetMapping(value = "/digitalSignageData") | 705 | @GetMapping(value = "/digitalSignageData") |
744 | public Result<Map<String,Object>> getDigitalSignageData(String structId) { | 706 | public Result<Map<String,Object>> getDigitalSignageData(String structId) { |
745 | Result<Map<String,Object>> result = new Result<>(); | 707 | Result<Map<String,Object>> result = new Result<>(); | ... | ... |
-
请 注册 或 登录 后发表评论