安环禅道问题修改
正在显示
20 个修改的文件
包含
220 行增加
和
104 行删除
... | @@ -33,6 +33,7 @@ public class EmergencyPlanDatabase{ | ... | @@ -33,6 +33,7 @@ public class EmergencyPlanDatabase{ |
33 | /**厂站ID(河道-排水管网id)*/ | 33 | /**厂站ID(河道-排水管网id)*/ |
34 | @Excel(name = "厂站ID", width = 15) | 34 | @Excel(name = "厂站ID", width = 15) |
35 | @ApiModelProperty(value = "厂站ID(河道-排水管网id)") | 35 | @ApiModelProperty(value = "厂站ID(河道-排水管网id)") |
36 | @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") | ||
36 | private String departId; | 37 | private String departId; |
37 | /**编制单位*/ | 38 | /**编制单位*/ |
38 | @Excel(name = "编制单位", width = 15) | 39 | @Excel(name = "编制单位", width = 15) | ... | ... |
... | @@ -32,7 +32,7 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -32,7 +32,7 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
32 | String ids = tableMap.get(tableName).substring(1); | 32 | String ids = tableMap.get(tableName).substring(1); |
33 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); | 33 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); |
34 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'"+s.trim()+"'").collect(Collectors.joining(",")); | 34 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'"+s.trim()+"'").collect(Collectors.joining(",")); |
35 | String sql = "select id,create_by,'的镜检申请' as title from check_microscopic_manage where id in("+inSqlPart+")"; | 35 | String sql = "select id,create_by,'-镜检申请' as title from check_microscopic_manage where id in("+inSqlPart+")"; |
36 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 36 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
37 | for(Map<String, Object> dataMap : dataList) { | 37 | for(Map<String, Object> dataMap : dataList) { |
38 | resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title"))); | 38 | resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title"))); |
... | @@ -42,14 +42,13 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -42,14 +42,13 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
42 | String ids = tableMap.get(tableName).substring(1); | 42 | String ids = tableMap.get(tableName).substring(1); |
43 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); | 43 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); |
44 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'"+s.trim()+"'").collect(Collectors.joining(",")); | 44 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'"+s.trim()+"'").collect(Collectors.joining(",")); |
45 | String sql = "SELECT a.id," + | 45 | String sql = "SELECT a.id," + |
46 | " CONCAT(b.equipment_name,'维修申请') as title " + | 46 | " CONCAT(b.equipment_name,'-维修申请') as title " + |
47 | "FROM\r\n" + | 47 | "FROM " + |
48 | " equipment_repair a\r\n" + | 48 | " equipment_repair a " + |
49 | "LEFT JOIN equipment_info b ON a.info_id = b.id\r\n" + | 49 | "LEFT JOIN equipment_info b ON a.info_id = b.id " + |
50 | "WHERE\r\n" + | 50 | "WHERE " + |
51 | " a.id in ("+inSqlPart+")"; | 51 | " a.id in ("+inSqlPart+")"; |
52 | //String sql = "select id,create_by,'的镜检申请' as title from check_microscopic_manage where id in("+inSqlPart+")"; | ||
53 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 52 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
54 | for(Map<String, Object> dataMap : dataList) { | 53 | for(Map<String, Object> dataMap : dataList) { |
55 | resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title"))); | 54 | resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title"))); |
... | @@ -61,9 +60,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -61,9 +60,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
61 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 60 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
62 | String sql = "SELECT a.id," + | 61 | String sql = "SELECT a.id," + |
63 | " CONCAT(problem_name,'-问题上报') as title " + | 62 | " CONCAT(problem_name,'-问题上报') as title " + |
64 | "FROM\r\n" + | 63 | "FROM " + |
65 | " problem_report_plan a\r\n" + | 64 | " problem_report_plan a " + |
66 | "WHERE\r\n" + | 65 | "WHERE " + |
67 | " a.id in (" + inSqlPart + ")"; | 66 | " a.id in (" + inSqlPart + ")"; |
68 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 67 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
69 | for (Map<String, Object> dataMap : dataList) { | 68 | for (Map<String, Object> dataMap : dataList) { |
... | @@ -76,9 +75,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -76,9 +75,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
76 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 75 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
77 | String sql = "SELECT a.id," + | 76 | String sql = "SELECT a.id," + |
78 | " CONCAT(equipment_name,'-缺陷上报') as title " + | 77 | " CONCAT(equipment_name,'-缺陷上报') as title " + |
79 | "FROM\r\n" + | 78 | "FROM " + |
80 | " equipment_defect_management a\r\n" + | 79 | " equipment_defect_management a " + |
81 | "WHERE\r\n" + | 80 | "WHERE " + |
82 | " a.id in (" + inSqlPart + ")"; | 81 | " a.id in (" + inSqlPart + ")"; |
83 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 82 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
84 | for (Map<String, Object> dataMap : dataList) { | 83 | for (Map<String, Object> dataMap : dataList) { |
... | @@ -90,11 +89,10 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -90,11 +89,10 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
90 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); | 89 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); |
91 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 90 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
92 | String sql = "SELECT a.id," + | 91 | String sql = "SELECT a.id," + |
93 | " CONCAT(a.risk_name,'-应急风险事件流程') as title " + | 92 | " CONCAT(a.risk_name,'-应急风险事件') as title " + |
94 | "FROM\r\n" + | 93 | "FROM " + |
95 | " emergency_risk_event a\r\n" + | 94 | " emergency_risk_event a " + |
96 | 95 | "WHERE " + | |
97 | "WHERE\r\n" + | ||
98 | " a.id in (" + inSqlPart + ")"; | 96 | " a.id in (" + inSqlPart + ")"; |
99 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 97 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
100 | for (Map<String, Object> dataMap : dataList) { | 98 | for (Map<String, Object> dataMap : dataList) { |
... | @@ -108,10 +106,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -108,10 +106,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
108 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 106 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
109 | String sql = "SELECT a.id," + | 107 | String sql = "SELECT a.id," + |
110 | " CONCAT((select struct_name from sys_struct_dict where id = a.rec_ord_body),'-安全隐患流程') as title " + | 108 | " CONCAT((select struct_name from sys_struct_dict where id = a.rec_ord_body),'-安全隐患流程') as title " + |
111 | "FROM\r\n" + | 109 | "FROM " + |
112 | " ajh_rectification_info a\r\n" + | 110 | " ajh_rectification_info a " + |
113 | 111 | "WHERE " + | |
114 | "WHERE\r\n" + | ||
115 | " a.id in (" + inSqlPart + ")"; | 112 | " a.id in (" + inSqlPart + ")"; |
116 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 113 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
117 | for (Map<String, Object> dataMap : dataList) { | 114 | for (Map<String, Object> dataMap : dataList) { |
... | @@ -124,9 +121,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -124,9 +121,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
124 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 121 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
125 | String sql = "SELECT a.id," + | 122 | String sql = "SELECT a.id," + |
126 | " CONCAT(alarm_param_name,'-报警申请') as title " + | 123 | " CONCAT(alarm_param_name,'-报警申请') as title " + |
127 | "FROM\r\n" + | 124 | "FROM " + |
128 | " alarm_record_history a\r\n" + | 125 | " alarm_record_history a " + |
129 | "WHERE\r\n" + | 126 | "WHERE " + |
130 | " a.id in (" + inSqlPart + ")"; | 127 | " a.id in (" + inSqlPart + ")"; |
131 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 128 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
132 | for (Map<String, Object> dataMap : dataList) { | 129 | for (Map<String, Object> dataMap : dataList) { |
... | @@ -139,10 +136,24 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ | ... | @@ -139,10 +136,24 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ |
139 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | 136 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); |
140 | String sql = "SELECT a.id," + | 137 | String sql = "SELECT a.id," + |
141 | " CONCAT(a.task_name,'-生产任务流程') as title " + | 138 | " CONCAT(a.task_name,'-生产任务流程') as title " + |
142 | "FROM\r\n" + | 139 | "FROM " + |
143 | " productive_task a\r\n" + | 140 | " productive_task a " + |
144 | 141 | "WHERE " + | |
145 | "WHERE\r\n" + | 142 | " a.id in (" + inSqlPart + ")"; |
143 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | ||
144 | for (Map<String, Object> dataMap : dataList) { | ||
145 | resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title"))); | ||
146 | } | ||
147 | }else if (tableName.equals("data_assessment_socre_master")) { | ||
148 | //生产任务 | ||
149 | String ids = tableMap.get(tableName).substring(1); | ||
150 | List<String> avgIndexCodeArray = Arrays.asList(ids.split(",")); | ||
151 | String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(",")); | ||
152 | String sql = "SELECT a.id," + | ||
153 | " CONCAT(a.create_by,'-考核评价审批') as title " + | ||
154 | "FROM " + | ||
155 | " data_assessment_socre_master a " + | ||
156 | "WHERE " + | ||
146 | " a.id in (" + inSqlPart + ")"; | 157 | " a.id in (" + inSqlPart + ")"; |
147 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); | 158 | List<Map<String, Object>> dataList = masterDB.queryForList(sql); |
148 | for (Map<String, Object> dataMap : dataList) { | 159 | for (Map<String, Object> dataMap : dataList) { | ... | ... |
... | @@ -14,6 +14,7 @@ import com.skua.modules.material.entity.MaterialInfoHandleRecord; | ... | @@ -14,6 +14,7 @@ import com.skua.modules.material.entity.MaterialInfoHandleRecord; |
14 | import com.skua.modules.material.entity.MaterialInformation; | 14 | import com.skua.modules.material.entity.MaterialInformation; |
15 | import com.skua.modules.material.service.IMaterialInfoHandleRecordService; | 15 | import com.skua.modules.material.service.IMaterialInfoHandleRecordService; |
16 | import com.skua.modules.material.service.IMaterialInfoService; | 16 | import com.skua.modules.material.service.IMaterialInfoService; |
17 | import com.skua.modules.system.service.ISysDepartService; | ||
17 | import io.swagger.annotations.Api; | 18 | import io.swagger.annotations.Api; |
18 | import io.swagger.annotations.ApiOperation; | 19 | import io.swagger.annotations.ApiOperation; |
19 | import io.swagger.annotations.ApiParam; | 20 | import io.swagger.annotations.ApiParam; |
... | @@ -30,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile; | ... | @@ -30,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile; |
30 | import org.springframework.web.multipart.MultipartHttpServletRequest; | 31 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
31 | import org.springframework.web.servlet.ModelAndView; | 32 | import org.springframework.web.servlet.ModelAndView; |
32 | 33 | ||
34 | import javax.annotation.Resource; | ||
33 | import javax.servlet.http.HttpServletRequest; | 35 | import javax.servlet.http.HttpServletRequest; |
34 | import javax.servlet.http.HttpServletResponse; | 36 | import javax.servlet.http.HttpServletResponse; |
35 | import java.io.IOException; | 37 | import java.io.IOException; |
... | @@ -55,6 +57,8 @@ public class MaterialInfoController { | ... | @@ -55,6 +57,8 @@ public class MaterialInfoController { |
55 | private IMaterialInfoService materialInfoService; | 57 | private IMaterialInfoService materialInfoService; |
56 | @Autowired | 58 | @Autowired |
57 | private IMaterialInfoHandleRecordService materialInfoHandleRecordService; | 59 | private IMaterialInfoHandleRecordService materialInfoHandleRecordService; |
60 | @Resource | ||
61 | private ISysDepartService departService; | ||
58 | 62 | ||
59 | /** | 63 | /** |
60 | * 分页列表查询 | 64 | * 分页列表查询 |
... | @@ -72,13 +76,15 @@ public class MaterialInfoController { | ... | @@ -72,13 +76,15 @@ public class MaterialInfoController { |
72 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 76 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
73 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | 77 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
74 | HttpServletRequest req) { | 78 | HttpServletRequest req) { |
79 | String departIds = null; | ||
75 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); | 80 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); |
76 | QueryWrapper<MaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(materialInfo, req.getParameterMap()); | ||
77 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); | 81 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); |
78 | if (StringUtils.isBlank(materialInfo.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { | 82 | if (StringUtils.isBlank(materialInfo.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { |
79 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | 83 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts()); |
84 | }else{ | ||
85 | departIds = departService.getChildDepartId(materialInfo.getDepartId()); | ||
80 | } | 86 | } |
81 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); | 87 | IPage<MaterialInfo> pageList = materialInfoService.getList(page, materialInfo, departIds); |
82 | result.setSuccess(true); | 88 | result.setSuccess(true); |
83 | result.setResult(pageList); | 89 | result.setResult(pageList); |
84 | return result; | 90 | return result; |
... | @@ -292,16 +298,20 @@ public class MaterialInfoController { | ... | @@ -292,16 +298,20 @@ public class MaterialInfoController { |
292 | 298 | ||
293 | /** | 299 | /** |
294 | * 类型统计查询 | 300 | * 类型统计查询 |
295 | * | 301 | * @param materialInfo |
296 | * @param MaterialInfo | ||
297 | * @return | 302 | * @return |
298 | */ | 303 | */ |
299 | @AutoLog(value = "厂区资料管理-类型统计查询") | 304 | @AutoLog(value = "厂区资料管理-类型统计查询") |
300 | @ApiOperation(value = "厂区资料管理-类型统计查询", notes = "厂区资料管理-类型统计查询") | 305 | @ApiOperation(value = "厂区资料管理-类型统计查询", notes = "厂区资料管理-类型统计查询") |
301 | @GetMapping(value = "/getAnalysis") | 306 | @GetMapping(value = "/getAnalysis") |
302 | public Result<List<Map<String, Object>>> getAnalysis(MaterialInfo MaterialInfo) { | 307 | public Result<List<Map<String, Object>>> getAnalysis(MaterialInfo materialInfo) { |
303 | Result<List<Map<String, Object>>> result = new Result<>(); | 308 | Result<List<Map<String, Object>>> result = new Result<>(); |
304 | List<Map<String, Object>> pageList = materialInfoService.getAnalysis(MaterialInfo); | 309 | if (StringUtils.isBlank(materialInfo.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { |
310 | materialInfo.setDepartId(departService.getChildDepartId(BaseContextHandler.getDeparts())); | ||
311 | }else{ | ||
312 | materialInfo.setDepartId(departService.getChildDepartId(materialInfo.getDepartId())); | ||
313 | } | ||
314 | List<Map<String, Object>> pageList = materialInfoService.getAnalysis(materialInfo); | ||
305 | result.setSuccess(true); | 315 | result.setSuccess(true); |
306 | result.setResult(pageList); | 316 | result.setResult(pageList); |
307 | return result; | 317 | return result; |
... | @@ -312,8 +322,10 @@ public class MaterialInfoController { | ... | @@ -312,8 +322,10 @@ public class MaterialInfoController { |
312 | @GetMapping(value = "/flowStatistics") | 322 | @GetMapping(value = "/flowStatistics") |
313 | public Result<List<Map<String, Object>>> flowStatistics(String departId,String startTime,String endTime) { | 323 | public Result<List<Map<String, Object>>> flowStatistics(String departId,String startTime,String endTime) { |
314 | Result<List<Map<String, Object>>> result = new Result<>(); | 324 | Result<List<Map<String, Object>>> result = new Result<>(); |
315 | if(StringUtils.isEmpty(departId)) { | 325 | if (StringUtils.isBlank(departId)&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { |
316 | departId = BaseContextHandler.getDeparts(); | 326 | departId = departService.getChildDepartId(BaseContextHandler.getDeparts()); |
327 | }else{ | ||
328 | departId = departService.getChildDepartId(departId); | ||
317 | } | 329 | } |
318 | List<Map<String, Object>> pageList = materialInfoService.flowStatistics(departId,startTime,endTime); | 330 | List<Map<String, Object>> pageList = materialInfoService.flowStatistics(departId,startTime,endTime); |
319 | result.setSuccess(true); | 331 | result.setSuccess(true); | ... | ... |
... | @@ -67,16 +67,42 @@ public class MaterialInfo { | ... | @@ -67,16 +67,42 @@ public class MaterialInfo { |
67 | @Excel(name = "附件地址", width = 15) | 67 | @Excel(name = "附件地址", width = 15) |
68 | @ApiModelProperty(value = "附件地址") | 68 | @ApiModelProperty(value = "附件地址") |
69 | private String docuAddr; | 69 | private String docuAddr; |
70 | 70 | /**所属厂区*/ | |
71 | /**附件地址*/ | 71 | @Excel(name = "所属厂区", width = 15) |
72 | @Excel(name = "厂区Id", width = 15) | 72 | @ApiModelProperty(value = "所属厂区") |
73 | @ApiModelProperty(value = "厂区Id") | ||
74 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 73 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
75 | private String departId; | 74 | private String departId; |
75 | /**内容摘要*/ | ||
76 | @ApiModelProperty(value = "内容摘要") | 76 | @ApiModelProperty(value = "内容摘要") |
77 | private String contentSummary; | 77 | private String contentSummary; |
78 | /**文件类型*/ | ||
78 | @ApiModelProperty(value = "文件类型【doc/xls/pdf等等】") | 79 | @ApiModelProperty(value = "文件类型【doc/xls/pdf等等】") |
79 | private String fileType; | 80 | private String fileType; |
81 | /**文件大小*/ | ||
80 | @ApiModelProperty(value = "文件大小") | 82 | @ApiModelProperty(value = "文件大小") |
81 | private String fileSize; | 83 | private String fileSize; |
84 | /**制度类型*/ | ||
85 | @Dict(dicCode = "rules_type") | ||
86 | @ApiModelProperty(value = "制度类型") | ||
87 | private String rulesType; | ||
88 | /**发布时间*/ | ||
89 | @Excel(name = "发布时间", width = 15) | ||
90 | @ApiModelProperty(value = "发布时间") | ||
91 | private String releaseTime; | ||
92 | /**有效时间*/ | ||
93 | @Excel(name = "有效时间", width = 15) | ||
94 | @ApiModelProperty(value = "有效时间") | ||
95 | private String effectiveTime; | ||
96 | /**版本号*/ | ||
97 | @Excel(name = "版本号", width = 15) | ||
98 | @ApiModelProperty(value = "版本号") | ||
99 | private String fileVersion; | ||
100 | /**所属部门*/ | ||
101 | @Excel(name = "所属部门", width = 15) | ||
102 | @ApiModelProperty(value = "所属部门") | ||
103 | private String fileDepart; | ||
104 | /**修订过程*/ | ||
105 | @Excel(name = "修订过程", width = 15) | ||
106 | @ApiModelProperty(value = "修订过程") | ||
107 | private String updateHistory; | ||
82 | } | 108 | } | ... | ... |
... | @@ -28,4 +28,6 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { | ... | @@ -28,4 +28,6 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { |
28 | * @Description: TODO(这里描述这个方法的需求变更情况) | 28 | * @Description: TODO(这里描述这个方法的需求变更情况) |
29 | */ | 29 | */ |
30 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); | 30 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); |
31 | |||
32 | List<MaterialInfo> getList(@Param("materialInfo") MaterialInfo materialInfo, @Param("departIds") String departIds); | ||
31 | } | 33 | } | ... | ... |
... | @@ -53,5 +53,20 @@ | ... | @@ -53,5 +53,20 @@ |
53 | GROUP BY | 53 | GROUP BY |
54 | b.create_time,b.handle_type | 54 | b.create_time,b.handle_type |
55 | </select> | 55 | </select> |
56 | 56 | <select id="getList" resultType="com.skua.modules.material.entity.MaterialInfo"> | |
57 | select * from material_info | ||
58 | where del_flag = 0 | ||
59 | <if test="departIds!=null and departIds!=''"> | ||
60 | and depart_id in | ||
61 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | ||
62 | '${item}' | ||
63 | </foreach> | ||
64 | </if> | ||
65 | <if test="materialInfo.facInformationtype!=null and materialInfo.facInformationtype!=''"> | ||
66 | and fac_informationtype = #{materialInfo.facInformationtype} | ||
67 | </if> | ||
68 | <if test="materialInfo.facInformationName!=null and materialInfo.facInformationName!=''"> | ||
69 | and fac_information_name like CONCAT(CONCAT('%', #{materialInfo.facInformationName}),'%') | ||
70 | </if> | ||
71 | </select> | ||
57 | </mapper> | 72 | </mapper> | ... | ... |
1 | package com.skua.modules.material.service; | 1 | package com.skua.modules.material.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | import com.skua.modules.material.entity.MaterialInfo; | 6 | import com.skua.modules.material.entity.MaterialInfo; |
5 | 7 | ||
... | @@ -40,4 +42,6 @@ public interface IMaterialInfoService extends IService<MaterialInfo> { | ... | @@ -40,4 +42,6 @@ public interface IMaterialInfoService extends IService<MaterialInfo> { |
40 | * @Description: TODO(这里描述这个方法的需求变更情况) | 42 | * @Description: TODO(这里描述这个方法的需求变更情况) |
41 | */ | 43 | */ |
42 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); | 44 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); |
45 | |||
46 | IPage<MaterialInfo> getList(Page<MaterialInfo> page, MaterialInfo materialInfo, String departIds); | ||
43 | } | 47 | } | ... | ... |
1 | package com.skua.modules.material.service.impl; | 1 | package com.skua.modules.material.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
4 | import com.skua.core.util.ConvertUtils; | 6 | import com.skua.core.util.ConvertUtils; |
5 | import com.skua.core.util.DateUtils; | 7 | import com.skua.core.util.DateUtils; |
... | @@ -62,4 +64,11 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat | ... | @@ -62,4 +64,11 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat |
62 | } | 64 | } |
63 | return resultList; | 65 | return resultList; |
64 | } | 66 | } |
67 | |||
68 | @Override | ||
69 | public IPage<MaterialInfo> getList(Page<MaterialInfo> page, MaterialInfo materialInfo, String departIds) { | ||
70 | List<MaterialInfo> list = baseMapper.getList(materialInfo, departIds); | ||
71 | page.setRecords(list); | ||
72 | return page; | ||
73 | } | ||
65 | } | 74 | } | ... | ... |
... | @@ -13,9 +13,8 @@ import cn.hutool.core.util.StrUtil; | ... | @@ -13,9 +13,8 @@ import cn.hutool.core.util.StrUtil; |
13 | import com.skua.core.api.vo.Result; | 13 | import com.skua.core.api.vo.Result; |
14 | import com.skua.core.aspect.annotation.AutoLog; | 14 | import com.skua.core.aspect.annotation.AutoLog; |
15 | import com.skua.core.query.QueryGenerator; | 15 | import com.skua.core.query.QueryGenerator; |
16 | import com.skua.modules.safe.entity.safetyProductionManagement; | 16 | import com.skua.modules.safe.entity.SafetyProductionManagement; |
17 | import com.skua.modules.safe.service.IsafetyProductionManagementService; | 17 | import com.skua.modules.safe.service.ISafetyProductionManagementService; |
18 | import java.util.Date; | ||
19 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
20 | import com.baomidou.mybatisplus.core.metadata.IPage; | 19 | import com.baomidou.mybatisplus.core.metadata.IPage; |
21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 20 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
... | @@ -43,10 +42,10 @@ import io.swagger.annotations.ApiOperation; | ... | @@ -43,10 +42,10 @@ import io.swagger.annotations.ApiOperation; |
43 | @Api(tags="安全生产管理") | 42 | @Api(tags="安全生产管理") |
44 | @RestController | 43 | @RestController |
45 | @RequestMapping("/safe/safetyProductionManagement") | 44 | @RequestMapping("/safe/safetyProductionManagement") |
46 | public class safetyProductionManagementController { | 45 | public class SafetyProductionManagementController { |
47 | @Autowired | 46 | @Autowired |
48 | private IsafetyProductionManagementService safetyProductionManagementService; | 47 | private ISafetyProductionManagementService safetyProductionManagementService; |
49 | 48 | ||
50 | /** | 49 | /** |
51 | * 分页列表查询 | 50 | * 分页列表查询 |
52 | * @param safetyProductionManagement | 51 | * @param safetyProductionManagement |
... | @@ -58,19 +57,19 @@ public class safetyProductionManagementController { | ... | @@ -58,19 +57,19 @@ public class safetyProductionManagementController { |
58 | @AutoLog(value = "安全生产管理-分页列表查询") | 57 | @AutoLog(value = "安全生产管理-分页列表查询") |
59 | @ApiOperation(value="安全生产管理-分页列表查询", notes="安全生产管理-分页列表查询") | 58 | @ApiOperation(value="安全生产管理-分页列表查询", notes="安全生产管理-分页列表查询") |
60 | @GetMapping(value = "/list") | 59 | @GetMapping(value = "/list") |
61 | public Result<IPage<safetyProductionManagement>> queryPageList(safetyProductionManagement safetyProductionManagement, | 60 | public Result<IPage<SafetyProductionManagement>> queryPageList(SafetyProductionManagement safetyProductionManagement, |
62 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | 61 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
63 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 62 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
64 | HttpServletRequest req) { | 63 | HttpServletRequest req) { |
65 | Result<IPage<safetyProductionManagement>> result = new Result<IPage<safetyProductionManagement>>(); | 64 | Result<IPage<SafetyProductionManagement>> result = new Result<IPage<SafetyProductionManagement>>(); |
66 | QueryWrapper<safetyProductionManagement> queryWrapper = QueryGenerator.initQueryWrapper(safetyProductionManagement, req.getParameterMap()); | 65 | QueryWrapper<SafetyProductionManagement> queryWrapper = QueryGenerator.initQueryWrapper(safetyProductionManagement, req.getParameterMap()); |
67 | Page<safetyProductionManagement> page = new Page<safetyProductionManagement>(pageNo, pageSize); | 66 | Page<SafetyProductionManagement> page = new Page<SafetyProductionManagement>(pageNo, pageSize); |
68 | IPage<safetyProductionManagement> pageList = safetyProductionManagementService.page(page, queryWrapper); | 67 | IPage<SafetyProductionManagement> pageList = safetyProductionManagementService.page(page, queryWrapper); |
69 | result.setSuccess(true); | 68 | result.setSuccess(true); |
70 | result.setResult(pageList); | 69 | result.setResult(pageList); |
71 | return result; | 70 | return result; |
72 | } | 71 | } |
73 | 72 | ||
74 | /** | 73 | /** |
75 | * 添加 | 74 | * 添加 |
76 | * @param safetyProductionManagement | 75 | * @param safetyProductionManagement |
... | @@ -79,8 +78,8 @@ public class safetyProductionManagementController { | ... | @@ -79,8 +78,8 @@ public class safetyProductionManagementController { |
79 | @AutoLog(value = "安全生产管理-添加") | 78 | @AutoLog(value = "安全生产管理-添加") |
80 | @ApiOperation(value="安全生产管理-添加", notes="安全生产管理-添加") | 79 | @ApiOperation(value="安全生产管理-添加", notes="安全生产管理-添加") |
81 | @PostMapping(value = "/add") | 80 | @PostMapping(value = "/add") |
82 | public Result<safetyProductionManagement> add(@RequestBody safetyProductionManagement safetyProductionManagement) { | 81 | public Result<SafetyProductionManagement> add(@RequestBody SafetyProductionManagement safetyProductionManagement) { |
83 | Result<safetyProductionManagement> result = new Result<safetyProductionManagement>(); | 82 | Result<SafetyProductionManagement> result = new Result<SafetyProductionManagement>(); |
84 | try { | 83 | try { |
85 | safetyProductionManagementService.save(safetyProductionManagement); | 84 | safetyProductionManagementService.save(safetyProductionManagement); |
86 | result.success("添加成功!"); | 85 | result.success("添加成功!"); |
... | @@ -90,7 +89,7 @@ public class safetyProductionManagementController { | ... | @@ -90,7 +89,7 @@ public class safetyProductionManagementController { |
90 | } | 89 | } |
91 | return result; | 90 | return result; |
92 | } | 91 | } |
93 | 92 | ||
94 | /** | 93 | /** |
95 | * 编辑 | 94 | * 编辑 |
96 | * @param safetyProductionManagement | 95 | * @param safetyProductionManagement |
... | @@ -99,9 +98,9 @@ public class safetyProductionManagementController { | ... | @@ -99,9 +98,9 @@ public class safetyProductionManagementController { |
99 | @AutoLog(value = "安全生产管理-编辑") | 98 | @AutoLog(value = "安全生产管理-编辑") |
100 | @ApiOperation(value="安全生产管理-编辑", notes="安全生产管理-编辑") | 99 | @ApiOperation(value="安全生产管理-编辑", notes="安全生产管理-编辑") |
101 | @PutMapping(value = "/edit") | 100 | @PutMapping(value = "/edit") |
102 | public Result<safetyProductionManagement> edit(@RequestBody safetyProductionManagement safetyProductionManagement) { | 101 | public Result<SafetyProductionManagement> edit(@RequestBody SafetyProductionManagement safetyProductionManagement) { |
103 | Result<safetyProductionManagement> result = new Result<safetyProductionManagement>(); | 102 | Result<SafetyProductionManagement> result = new Result<SafetyProductionManagement>(); |
104 | safetyProductionManagement safetyProductionManagementEntity = safetyProductionManagementService.getById(safetyProductionManagement.getId()); | 103 | SafetyProductionManagement safetyProductionManagementEntity = safetyProductionManagementService.getById(safetyProductionManagement.getId()); |
105 | if(safetyProductionManagementEntity==null) { | 104 | if(safetyProductionManagementEntity==null) { |
106 | result.error500("未找到对应实体"); | 105 | result.error500("未找到对应实体"); |
107 | }else { | 106 | }else { |
... | @@ -111,10 +110,10 @@ public class safetyProductionManagementController { | ... | @@ -111,10 +110,10 @@ public class safetyProductionManagementController { |
111 | result.success("修改成功!"); | 110 | result.success("修改成功!"); |
112 | } | 111 | } |
113 | } | 112 | } |
114 | 113 | ||
115 | return result; | 114 | return result; |
116 | } | 115 | } |
117 | 116 | ||
118 | /** | 117 | /** |
119 | * 通过id删除 | 118 | * 通过id删除 |
120 | * @param id | 119 | * @param id |
... | @@ -132,7 +131,7 @@ public class safetyProductionManagementController { | ... | @@ -132,7 +131,7 @@ public class safetyProductionManagementController { |
132 | } | 131 | } |
133 | return Result.ok("删除成功!"); | 132 | return Result.ok("删除成功!"); |
134 | } | 133 | } |
135 | 134 | ||
136 | /** | 135 | /** |
137 | * 批量删除 | 136 | * 批量删除 |
138 | * @param ids | 137 | * @param ids |
... | @@ -141,8 +140,8 @@ public class safetyProductionManagementController { | ... | @@ -141,8 +140,8 @@ public class safetyProductionManagementController { |
141 | @AutoLog(value = "安全生产管理-批量删除") | 140 | @AutoLog(value = "安全生产管理-批量删除") |
142 | @ApiOperation(value="安全生产管理-批量删除", notes="安全生产管理-批量删除") | 141 | @ApiOperation(value="安全生产管理-批量删除", notes="安全生产管理-批量删除") |
143 | @DeleteMapping(value = "/deleteBatch") | 142 | @DeleteMapping(value = "/deleteBatch") |
144 | public Result<safetyProductionManagement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 143 | public Result<SafetyProductionManagement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
145 | Result<safetyProductionManagement> result = new Result<safetyProductionManagement>(); | 144 | Result<SafetyProductionManagement> result = new Result<SafetyProductionManagement>(); |
146 | if(ids==null || "".equals(ids.trim())) { | 145 | if(ids==null || "".equals(ids.trim())) { |
147 | result.error500("参数不识别!"); | 146 | result.error500("参数不识别!"); |
148 | }else { | 147 | }else { |
... | @@ -151,7 +150,7 @@ public class safetyProductionManagementController { | ... | @@ -151,7 +150,7 @@ public class safetyProductionManagementController { |
151 | } | 150 | } |
152 | return result; | 151 | return result; |
153 | } | 152 | } |
154 | 153 | ||
155 | /** | 154 | /** |
156 | * 通过id查询 | 155 | * 通过id查询 |
157 | * @param id | 156 | * @param id |
... | @@ -160,9 +159,9 @@ public class safetyProductionManagementController { | ... | @@ -160,9 +159,9 @@ public class safetyProductionManagementController { |
160 | @AutoLog(value = "安全生产管理-通过id查询") | 159 | @AutoLog(value = "安全生产管理-通过id查询") |
161 | @ApiOperation(value="安全生产管理-通过id查询", notes="安全生产管理-通过id查询") | 160 | @ApiOperation(value="安全生产管理-通过id查询", notes="安全生产管理-通过id查询") |
162 | @GetMapping(value = "/queryById") | 161 | @GetMapping(value = "/queryById") |
163 | public Result<safetyProductionManagement> queryById(@RequestParam(name="id",required=true) String id) { | 162 | public Result<SafetyProductionManagement> queryById(@RequestParam(name="id",required=true) String id) { |
164 | Result<safetyProductionManagement> result = new Result<safetyProductionManagement>(); | 163 | Result<SafetyProductionManagement> result = new Result<SafetyProductionManagement>(); |
165 | safetyProductionManagement safetyProductionManagement = safetyProductionManagementService.getById(id); | 164 | SafetyProductionManagement safetyProductionManagement = safetyProductionManagementService.getById(id); |
166 | if(safetyProductionManagement==null) { | 165 | if(safetyProductionManagement==null) { |
167 | result.error500("未找到对应实体"); | 166 | result.error500("未找到对应实体"); |
168 | }else { | 167 | }else { |
... | @@ -181,12 +180,12 @@ public class safetyProductionManagementController { | ... | @@ -181,12 +180,12 @@ public class safetyProductionManagementController { |
181 | @RequestMapping(value = "/exportXls") | 180 | @RequestMapping(value = "/exportXls") |
182 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { | 181 | public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { |
183 | // Step.1 组装查询条件 | 182 | // Step.1 组装查询条件 |
184 | QueryWrapper<safetyProductionManagement> queryWrapper = null; | 183 | QueryWrapper<SafetyProductionManagement> queryWrapper = null; |
185 | try { | 184 | try { |
186 | String paramsStr = request.getParameter("paramsStr"); | 185 | String paramsStr = request.getParameter("paramsStr"); |
187 | if (StrUtil.isNotEmpty(paramsStr)) { | 186 | if (StrUtil.isNotEmpty(paramsStr)) { |
188 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); | 187 | String deString = URLDecoder.decode(paramsStr, "UTF-8"); |
189 | safetyProductionManagement safetyProductionManagement = JSON.parseObject(deString, safetyProductionManagement.class); | 188 | SafetyProductionManagement safetyProductionManagement = JSON.parseObject(deString, SafetyProductionManagement.class); |
190 | queryWrapper = QueryGenerator.initQueryWrapper(safetyProductionManagement, request.getParameterMap()); | 189 | queryWrapper = QueryGenerator.initQueryWrapper(safetyProductionManagement, request.getParameterMap()); |
191 | } | 190 | } |
192 | } catch (UnsupportedEncodingException e) { | 191 | } catch (UnsupportedEncodingException e) { |
... | @@ -195,10 +194,10 @@ public class safetyProductionManagementController { | ... | @@ -195,10 +194,10 @@ public class safetyProductionManagementController { |
195 | 194 | ||
196 | //Step.2 AutoPoi 导出Excel | 195 | //Step.2 AutoPoi 导出Excel |
197 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | 196 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
198 | List<safetyProductionManagement> pageList = safetyProductionManagementService.list(queryWrapper); | 197 | List<SafetyProductionManagement> pageList = safetyProductionManagementService.list(queryWrapper); |
199 | //导出文件名称 | 198 | //导出文件名称 |
200 | mv.addObject(NormalExcelConstants.FILE_NAME, "安全生产管理列表"); | 199 | mv.addObject(NormalExcelConstants.FILE_NAME, "安全生产管理列表"); |
201 | mv.addObject(NormalExcelConstants.CLASS, safetyProductionManagement.class); | 200 | mv.addObject(NormalExcelConstants.CLASS, SafetyProductionManagement.class); |
202 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("安全生产管理列表数据", "导出人:Jeecg", "导出信息")); | 201 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("安全生产管理列表数据", "导出人:Jeecg", "导出信息")); |
203 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | 202 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
204 | return mv; | 203 | return mv; |
... | @@ -222,7 +221,7 @@ public class safetyProductionManagementController { | ... | @@ -222,7 +221,7 @@ public class safetyProductionManagementController { |
222 | params.setHeadRows(1); | 221 | params.setHeadRows(1); |
223 | params.setNeedSave(true); | 222 | params.setNeedSave(true); |
224 | try { | 223 | try { |
225 | List<safetyProductionManagement> listsafetyProductionManagements = ExcelImportUtil.importExcel(file.getInputStream(), safetyProductionManagement.class, params); | 224 | List<SafetyProductionManagement> listsafetyProductionManagements = ExcelImportUtil.importExcel(file.getInputStream(), SafetyProductionManagement.class, params); |
226 | safetyProductionManagementService.saveBatch(listsafetyProductionManagements); | 225 | safetyProductionManagementService.saveBatch(listsafetyProductionManagements); |
227 | return Result.ok("文件导入成功!数据行数:" + listsafetyProductionManagements.size()); | 226 | return Result.ok("文件导入成功!数据行数:" + listsafetyProductionManagements.size()); |
228 | } catch (Exception e) { | 227 | } catch (Exception e) { | ... | ... |
... | @@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
25 | @EqualsAndHashCode(callSuper = false) | 25 | @EqualsAndHashCode(callSuper = false) |
26 | @Accessors(chain = true) | 26 | @Accessors(chain = true) |
27 | @ApiModel(value="safety_production_management对象", description="安全生产管理") | 27 | @ApiModel(value="safety_production_management对象", description="安全生产管理") |
28 | public class safetyProductionManagement { | 28 | public class SafetyProductionManagement { |
29 | 29 | ||
30 | /**id*/ | 30 | /**id*/ |
31 | @TableId(type = IdType.UUID) | 31 | @TableId(type = IdType.UUID) | ... | ... |
1 | package com.skua.modules.safe.mapper; | 1 | package com.skua.modules.safe.mapper; |
2 | 2 | ||
3 | import java.util.List; | 3 | import com.skua.modules.safe.entity.SafetyProductionManagement; |
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.safe.entity.safetyProductionManagement; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
8 | 5 | ||
9 | /** | 6 | /** |
10 | * 安全生产管理 | 7 | * 安全生产管理 |
11 | */ | 8 | */ |
12 | public interface safetyProductionManagementMapper extends BaseMapper<safetyProductionManagement> { | 9 | public interface SafetyProductionManagementMapper extends BaseMapper<SafetyProductionManagement> { |
13 | 10 | ||
14 | } | 11 | } | ... | ... |
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.safetyProductionManagementMapper"> | 3 | <mapper namespace="com.skua.modules.safe.mapper.SafetyProductionManagementMapper"> |
4 | 4 | ||
5 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
5 | </mapper> | ... | ... |
1 | package com.skua.modules.safe.service; | 1 | package com.skua.modules.safe.service; |
2 | 2 | ||
3 | import com.skua.modules.safe.entity.safetyProductionManagement; | 3 | import com.skua.modules.safe.entity.SafetyProductionManagement; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * 安全生产管理 | 7 | * 安全生产管理 |
8 | */ | 8 | */ |
9 | public interface IsafetyProductionManagementService extends IService<safetyProductionManagement> { | 9 | public interface ISafetyProductionManagementService extends IService<SafetyProductionManagement> { |
10 | 10 | ||
11 | } | 11 | } | ... | ... |
1 | package com.skua.modules.safe.service.impl; | 1 | package com.skua.modules.safe.service.impl; |
2 | 2 | ||
3 | import com.skua.modules.safe.entity.safetyProductionManagement; | 3 | import com.skua.modules.safe.entity.SafetyProductionManagement; |
4 | import com.skua.modules.safe.mapper.safetyProductionManagementMapper; | 4 | import com.skua.modules.safe.mapper.SafetyProductionManagementMapper; |
5 | import com.skua.modules.safe.service.IsafetyProductionManagementService; | 5 | import com.skua.modules.safe.service.ISafetyProductionManagementService; |
6 | import org.springframework.stereotype.Service; | 6 | import org.springframework.stereotype.Service; |
7 | 7 | ||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
... | @@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ... | @@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
11 | * 安全生产管理 | 11 | * 安全生产管理 |
12 | */ | 12 | */ |
13 | @Service | 13 | @Service |
14 | public class safetyProductionManagementServiceImpl extends ServiceImpl<safetyProductionManagementMapper, safetyProductionManagement> implements IsafetyProductionManagementService { | 14 | public class SafetyProductionManagementServiceImpl extends ServiceImpl<SafetyProductionManagementMapper, SafetyProductionManagement> implements ISafetyProductionManagementService { |
15 | 15 | ||
16 | } | 16 | } | ... | ... |
... | @@ -220,8 +220,7 @@ public class EquipmentSparepartController { | ... | @@ -220,8 +220,7 @@ public class EquipmentSparepartController { |
220 | @GetMapping(value = "/list") | 220 | @GetMapping(value = "/list") |
221 | public Result<IPage<EquipmentSparepartVO>> queryPageList(EquipmentSparepartDTO equipmentSparepartDTO, | 221 | public Result<IPage<EquipmentSparepartVO>> queryPageList(EquipmentSparepartDTO equipmentSparepartDTO, |
222 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 222 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
223 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | 223 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { |
224 | HttpServletRequest req) throws Exception { | ||
225 | Result<IPage<EquipmentSparepartVO>> result = new Result<>(); | 224 | Result<IPage<EquipmentSparepartVO>> result = new Result<>(); |
226 | Page page = new Page(pageNo, pageSize); | 225 | Page page = new Page(pageNo, pageSize); |
227 | Set<String> sparepartTypeSet = new HashSet<>(); | 226 | Set<String> sparepartTypeSet = new HashSet<>(); |
... | @@ -253,26 +252,24 @@ public class EquipmentSparepartController { | ... | @@ -253,26 +252,24 @@ public class EquipmentSparepartController { |
253 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartCode()), "equipment_sparepart_supplies.sparepart_code", equipmentSparepartDTO.getSparepartCode()) | 252 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartCode()), "equipment_sparepart_supplies.sparepart_code", equipmentSparepartDTO.getSparepartCode()) |
254 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSpecification()), "equipment_sparepart_supplies.specification", equipmentSparepartDTO.getSpecification()) | 253 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSpecification()), "equipment_sparepart_supplies.specification", equipmentSparepartDTO.getSpecification()) |
255 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartName()), "equipment_sparepart_supplies.sparepart_name", equipmentSparepartDTO.getSparepartName()) | 254 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartName()), "equipment_sparepart_supplies.sparepart_name", equipmentSparepartDTO.getSparepartName()) |
256 | .in(!sparepartTypeSet.isEmpty(), "equipment_sparepart_supplies.sparepart_type", sparepartTypeSet) | 255 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsEmergency()), "equipment_sparepart.is_emergency", equipmentSparepartDTO.getIsEmergency()) |
256 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getIsDangerous()), "equipment_sparepart.is_dangerous", equipmentSparepartDTO.getIsDangerous()) | ||
257 | .in(!sparepartTypeSet.isEmpty(), "equipment_sparepart_supplies.sparepart_type", sparepartTypeSet) | ||
257 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getWarehouseName()), "warehouse_name", equipmentSparepartDTO.getWarehouseName()) | 258 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getWarehouseName()), "warehouse_name", equipmentSparepartDTO.getWarehouseName()) |
258 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSuppliesWarehouseId()), "supplies_warehouse_id", equipmentSparepartDTO.getSuppliesWarehouseId()) | 259 | .like(StringUtils.isNotEmpty(equipmentSparepartDTO.getSuppliesWarehouseId()), "supplies_warehouse_id", equipmentSparepartDTO.getSuppliesWarehouseId()) |
259 | .between(StringUtils.isNotEmpty(equipmentSparepartDTO.getStartTime()) && StringUtils.isNotEmpty(equipmentSparepartDTO.getEndTime()), "inventory_update_time", equipmentSparepartDTO.getStartTime(), equipmentSparepartDTO.getEndTime()) | 260 | .between(StringUtils.isNotEmpty(equipmentSparepartDTO.getStartTime()) && StringUtils.isNotEmpty(equipmentSparepartDTO.getEndTime()), "inventory_update_time", equipmentSparepartDTO.getStartTime(), equipmentSparepartDTO.getEndTime()) |
260 | .apply("库存不足".equals(equipmentSparepartDTO.getStorageWarn()), "equipment_sparepart_supplies.storage_num < equipment_sparepart_supplies.storage_min_num") | 261 | .apply("库存不足".equals(equipmentSparepartDTO.getStorageWarn()), "equipment_sparepart_supplies.storage_num < equipment_sparepart_supplies.storage_min_num") |
261 | .apply("库存过量".equals(equipmentSparepartDTO.getStorageWarn()), "equipment_sparepart.equipment_sparepart_supplies > equipment_sparepart_supplies.storage_max_num") | 262 | .apply("库存过量".equals(equipmentSparepartDTO.getStorageWarn()), "equipment_sparepart.equipment_sparepart_supplies > equipment_sparepart_supplies.storage_max_num") |
262 | // .orderBy(true, false, "update_time") | ||
263 | .orderBy(true, false, "equipment_sparepart.inventory_update_time").queryForPage(page); | 263 | .orderBy(true, false, "equipment_sparepart.inventory_update_time").queryForPage(page); |
264 | //.selectMapsPage(page); | ||
265 | Map<String, String> equipmentSparepartTypeVal2KeyMap = key2ValueService.dictKey2Val("equipmentSparepartType", false); | 264 | Map<String, String> equipmentSparepartTypeVal2KeyMap = key2ValueService.dictKey2Val("equipmentSparepartType", false); |
266 | Map<String, String> suppliesWarehouseVal2KeyMap = key2ValueService.dictKey2Val("suppliesWarehouse", false); | 265 | Map<String, String> suppliesWarehouseVal2KeyMap = key2ValueService.dictKey2Val("suppliesWarehouse", false); |
267 | Map<String, String> departInfoVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false); | 266 | Map<String, String> departInfoVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false); |
268 | Map<String, String> unitInfoVal2KeyMap = key2ValueService.dictKey2Val("equipment-sparepart_measuring_unit", false); | 267 | Map<String, String> unitInfoVal2KeyMap = key2ValueService.dictKey2Val("equipment-sparepart_measuring_unit", false); |
269 | 268 | ||
270 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); | 269 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); |
271 | //品牌厂商 | 270 | //品牌厂商 |
272 | //List<Map<String, Object>> purchaseSupplierMapList = masterDB.queryForList("select * from purchase_supplier"); | ||
273 | List<Map<String, Object>> purchaseSupplierMapList = masterDB.queryForList("select * from equipment_brand"); | 271 | List<Map<String, Object>> purchaseSupplierMapList = masterDB.queryForList("select * from equipment_brand"); |
274 | 272 | ||
275 | |||
276 | Map<String, String> manufacturerMap = purchaseSupplierMapList.stream().collect(Collectors.toMap(item -> "" + item.get("id"), item -> "" + item.get("brand_company"))); | 273 | Map<String, String> manufacturerMap = purchaseSupplierMapList.stream().collect(Collectors.toMap(item -> "" + item.get("id"), item -> "" + item.get("brand_company"))); |
277 | List<Map<String, Object>> convertMapList = WrapperFactory.result() | 274 | List<Map<String, Object>> convertMapList = WrapperFactory.result() |
278 | .addCallback("EquipmentSparepartSupplies_sparepartType", "sparepartType_dictText") | 275 | .addCallback("EquipmentSparepartSupplies_sparepartType", "sparepartType_dictText") | ... | ... |
... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; |
4 | import com.baomidou.mybatisplus.annotation.TableId; | 4 | import com.baomidou.mybatisplus.annotation.TableId; |
5 | import com.baomidou.mybatisplus.annotation.TableName; | 5 | import com.baomidou.mybatisplus.annotation.TableName; |
6 | import com.fasterxml.jackson.annotation.JsonFormat; | 6 | import com.fasterxml.jackson.annotation.JsonFormat; |
7 | import com.skua.core.aspect.annotation.Dict; | ||
7 | import com.skua.tool.annotation.BeanAnno; | 8 | import com.skua.tool.annotation.BeanAnno; |
8 | import com.skua.tool.annotation.JoinSqlQueryAnno; | 9 | import com.skua.tool.annotation.JoinSqlQueryAnno; |
9 | import com.skua.tool.enums.JoinSqlQueryEnum; | 10 | import com.skua.tool.enums.JoinSqlQueryEnum; |
... | @@ -223,11 +224,23 @@ public class EquipmentSparepart { | ... | @@ -223,11 +224,23 @@ public class EquipmentSparepart { |
223 | @ApiModelProperty(value = "仓库id") | 224 | @ApiModelProperty(value = "仓库id") |
224 | private String suppliesWarehouseId; | 225 | private String suppliesWarehouseId; |
225 | 226 | ||
226 | // /** | 227 | /** |
227 | // * 厂站id | 228 | * 所属厂站 |
228 | // */ | 229 | */ |
229 | @Excel(name = "厂站id", width = 15) | 230 | @Excel(name = "所属厂站", width = 15) |
230 | @ApiModelProperty(value = "厂站id") | 231 | @ApiModelProperty(value = "所属厂站") |
231 | private String departId; | 232 | private String departId; |
232 | 233 | ||
234 | /** 是否应急物资 */ | ||
235 | @Excel(name = "是否应急物资", width = 15) | ||
236 | @ApiModelProperty(value = "是否应急物资") | ||
237 | @Dict(dicCode = "yn") | ||
238 | private String isEmergency; | ||
239 | |||
240 | /** 是否危化品 */ | ||
241 | @Excel(name = "是否危化品", width = 15) | ||
242 | @ApiModelProperty(value = "是否危化品") | ||
243 | @Dict(dicCode = "yn") | ||
244 | private String isDangerous; | ||
245 | |||
233 | } | 246 | } | ... | ... |
... | @@ -138,4 +138,6 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { | ... | @@ -138,4 +138,6 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { |
138 | String getDepartTreeByParentDepartId(@Param("parentDepartId")String parentDepartId); | 138 | String getDepartTreeByParentDepartId(@Param("parentDepartId")String parentDepartId); |
139 | 139 | ||
140 | List<DepartTree> getJimuDepartTree(@Param("pid") String pid); | 140 | List<DepartTree> getJimuDepartTree(@Param("pid") String pid); |
141 | |||
142 | String getChildDepartId(@Param("departIds") String departIds); | ||
141 | } | 143 | } | ... | ... |
... | @@ -111,6 +111,7 @@ | ... | @@ -111,6 +111,7 @@ |
111 | <select id="getCenterByJt" resultType="com.skua.modules.system.entity.SysDepart"> | 111 | <select id="getCenterByJt" resultType="com.skua.modules.system.entity.SysDepart"> |
112 | select * from sys_depart where org_type = 3 and org_code like CONCAT(#{orgCode},'%') ORDER BY depart_order | 112 | select * from sys_depart where org_type = 3 and org_code like CONCAT(#{orgCode},'%') ORDER BY depart_order |
113 | </select> | 113 | </select> |
114 | |||
114 | <select id="getCenterAllList" parameterType="java.util.List" resultType="com.skua.modules.system.entity.SysDepart"> | 115 | <select id="getCenterAllList" parameterType="java.util.List" resultType="com.skua.modules.system.entity.SysDepart"> |
115 | SELECT | 116 | SELECT |
116 | id, | 117 | id, |
... | @@ -202,4 +203,24 @@ | ... | @@ -202,4 +203,24 @@ |
202 | where parent_id = #{pid} | 203 | where parent_id = #{pid} |
203 | ORDER BY depart_order | 204 | ORDER BY depart_order |
204 | </select> | 205 | </select> |
206 | <select id="getChildDepartId" resultType="java.lang.String"> | ||
207 | SELECT | ||
208 | GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids | ||
209 | FROM | ||
210 | sys_depart | ||
211 | WHERE | ||
212 | parent_id IN | ||
213 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | ||
214 | '${item}' | ||
215 | </foreach> | ||
216 | OR id IN | ||
217 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | ||
218 | '${item}' | ||
219 | </foreach> | ||
220 | OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN | ||
221 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | ||
222 | '${item}' | ||
223 | </foreach> | ||
224 | ) | ||
225 | </select> | ||
205 | </mapper> | 226 | </mapper> | ... | ... |
... | @@ -168,4 +168,6 @@ public interface ISysDepartService extends IService<SysDepart>{ | ... | @@ -168,4 +168,6 @@ public interface ISysDepartService extends IService<SysDepart>{ |
168 | String getDepartTreeByParentDepartId(String parentDepartId); | 168 | String getDepartTreeByParentDepartId(String parentDepartId); |
169 | 169 | ||
170 | List<DepartTree> getJimuDepartTree(String pid); | 170 | List<DepartTree> getJimuDepartTree(String pid); |
171 | |||
172 | String getChildDepartId(String departIds); | ||
171 | } | 173 | } | ... | ... |
... | @@ -447,4 +447,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart | ... | @@ -447,4 +447,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart |
447 | return list; | 447 | return list; |
448 | } | 448 | } |
449 | 449 | ||
450 | @Override | ||
451 | public String getChildDepartId(String departIds) { | ||
452 | return sysDepartMapper.getChildDepartId(departIds); | ||
453 | } | ||
454 | |||
450 | } | 455 | } | ... | ... |
-
请 注册 或 登录 后发表评论