kangwei:重点事项推进情况 联调
bug修改
正在显示
18 个修改的文件
包含
136 行增加
和
64 行删除
... | @@ -18,9 +18,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | ... | @@ -18,9 +18,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
18 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 18 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
19 | import com.skua.modules.common.vo.TreeNodeVO; | 19 | import com.skua.modules.common.vo.TreeNodeVO; |
20 | import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls; | 20 | import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls; |
21 | import com.skua.tool.util.DateUtils; | ||
21 | import com.skua.tool.util.TreeBuilder; | 22 | import com.skua.tool.util.TreeBuilder; |
22 | import lombok.extern.slf4j.Slf4j; | 23 | import lombok.extern.slf4j.Slf4j; |
23 | 24 | ||
25 | import org.apache.commons.lang3.StringUtils; | ||
24 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 26 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
25 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 27 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
26 | import org.jeecgframework.poi.excel.entity.ExportParams; | 28 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | @@ -276,11 +278,21 @@ public class AjhPlanScheduleConfigController { | ... | @@ -276,11 +278,21 @@ public class AjhPlanScheduleConfigController { |
276 | // Step.1 组装查询条件 | 278 | // Step.1 组装查询条件 |
277 | //Step.2 AutoPoi 导出Excel | 279 | //Step.2 AutoPoi 导出Excel |
278 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | 280 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
279 | List<AjhPlanScheduleConfigXls> pageList = new ArrayList<>(); | 281 | |
282 | // Step.1 组装查询条件 | ||
283 | String departId = "1711662624459804674"; | ||
284 | String years = DateUtils.getCurrentYear()+""; | ||
285 | if(StringUtils.isNotEmpty(request.getParameter("departId"))){ | ||
286 | departId = request.getParameter("departId"); | ||
287 | } | ||
288 | if(StringUtils.isNotEmpty(request.getParameter("years"))){ | ||
289 | years = request.getParameter("years"); | ||
290 | } | ||
291 | List<AjhPlanScheduleConfigXls> pageList = ajhPlanScheduleConfigService.exportXlsTemplate(departId,years); | ||
280 | //导出文件名称 | 292 | //导出文件名称 |
281 | mv.addObject(NormalExcelConstants.FILE_NAME, "经营方案计划表列表"); | 293 | mv.addObject(NormalExcelConstants.FILE_NAME, "经营方案计划表列表"); |
282 | mv.addObject(NormalExcelConstants.CLASS, AjhPlanScheduleConfigXls.class); | 294 | mv.addObject(NormalExcelConstants.CLASS, AjhPlanScheduleConfigXls.class); |
283 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("经营方案计划表列表数据", "", "")); | 295 | mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("经营方案计划表列表数据", "导出人:", "经营方案计划表")); |
284 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | 296 | mv.addObject(NormalExcelConstants.DATA_LIST, pageList); |
285 | return mv; | 297 | return mv; |
286 | } | 298 | } |
... | @@ -298,8 +310,8 @@ public class AjhPlanScheduleConfigController { | ... | @@ -298,8 +310,8 @@ public class AjhPlanScheduleConfigController { |
298 | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | 310 | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
299 | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; | 311 | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
300 | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); | 312 | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
301 | String factoryId = request.getParameter("departId"); | 313 | String departId = request.getParameter("departId"); |
302 | String year = request.getParameter("year"); | 314 | String years = request.getParameter("years"); |
303 | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { | 315 | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
304 | MultipartFile file = entity.getValue();// 获取上传文件对象 | 316 | MultipartFile file = entity.getValue();// 获取上传文件对象 |
305 | ImportParams params = new ImportParams(); | 317 | ImportParams params = new ImportParams(); |
... | @@ -308,7 +320,7 @@ public class AjhPlanScheduleConfigController { | ... | @@ -308,7 +320,7 @@ public class AjhPlanScheduleConfigController { |
308 | params.setNeedSave(true); | 320 | params.setNeedSave(true); |
309 | try { | 321 | try { |
310 | List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs = ExcelImportUtil.importExcel(file.getInputStream(), AjhPlanScheduleConfigXls.class, params); | 322 | List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs = ExcelImportUtil.importExcel(file.getInputStream(), AjhPlanScheduleConfigXls.class, params); |
311 | ajhPlanScheduleConfigService.importExcel(listAjhPlanScheduleConfigs,factoryId,year); | 323 | ajhPlanScheduleConfigService.importExcel(listAjhPlanScheduleConfigs,departId,years); |
312 | return Result.ok("文件导入成功!数据行数:" + listAjhPlanScheduleConfigs.size()); | 324 | return Result.ok("文件导入成功!数据行数:" + listAjhPlanScheduleConfigs.size()); |
313 | } catch (Exception e) { | 325 | } catch (Exception e) { |
314 | log.error(e.getMessage(),e); | 326 | log.error(e.getMessage(),e); | ... | ... |
... | @@ -2,6 +2,7 @@ package com.skua.modules.ajh.mapper; | ... | @@ -2,6 +2,7 @@ package com.skua.modules.ajh.mapper; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls; | ||
5 | import org.apache.ibatis.annotations.Param; | 6 | import org.apache.ibatis.annotations.Param; |
6 | import com.skua.modules.ajh.entity.AjhPlanScheduleConfig; | 7 | import com.skua.modules.ajh.entity.AjhPlanScheduleConfig; |
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 8 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
... | @@ -11,4 +12,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ... | @@ -11,4 +12,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
11 | */ | 12 | */ |
12 | public interface AjhPlanScheduleConfigMapper extends BaseMapper<AjhPlanScheduleConfig> { | 13 | public interface AjhPlanScheduleConfigMapper extends BaseMapper<AjhPlanScheduleConfig> { |
13 | 14 | ||
15 | List<AjhPlanScheduleConfigXls> exportXlsTemplate(@Param("departId") String departId, @Param("years")String years); | ||
14 | } | 16 | } | ... | ... |
... | @@ -2,4 +2,11 @@ | ... | @@ -2,4 +2,11 @@ |
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.ajh.mapper.AjhPlanScheduleConfigMapper"> | 3 | <mapper namespace="com.skua.modules.ajh.mapper.AjhPlanScheduleConfigMapper"> |
4 | 4 | ||
5 | |||
6 | <select id="exportXlsTemplate" resultType="com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls"> | ||
7 | select p.config_name 'workName', t.config_name,t.complete_time,t.responsibler from ajh_plan_schedule_config t | ||
8 | left join ajh_plan_schedule_config p on t.parent_id = p.id | ||
9 | where t.parent_id > 0 and t.depart_id = #{departId} and t.years =#{years} | ||
10 | order by t.parent_id asc ,t.create_time asc | ||
11 | </select> | ||
5 | </mapper> | 12 | </mapper> | ... | ... |
... | @@ -23,5 +23,7 @@ public interface IAjhPlanScheduleConfigService extends IService<AjhPlanScheduleC | ... | @@ -23,5 +23,7 @@ public interface IAjhPlanScheduleConfigService extends IService<AjhPlanScheduleC |
23 | * 导入excel文件 | 23 | * 导入excel文件 |
24 | * @param listAjhPlanScheduleConfigs | 24 | * @param listAjhPlanScheduleConfigs |
25 | */ | 25 | */ |
26 | void importExcel(List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs,String factoryId,String years); | 26 | void importExcel(List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs,String departId,String years); |
27 | |||
28 | List<AjhPlanScheduleConfigXls> exportXlsTemplate(String departId, String years); | ||
27 | } | 29 | } | ... | ... |
... | @@ -54,7 +54,7 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul | ... | @@ -54,7 +54,7 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul |
54 | * @param listAjhPlanScheduleConfigs | 54 | * @param listAjhPlanScheduleConfigs |
55 | */ | 55 | */ |
56 | @Transactional | 56 | @Transactional |
57 | public void importExcel(List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs,String factoryId,String year){ | 57 | public void importExcel(List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs,String departId,String year){ |
58 | Map<String,List<AjhPlanScheduleConfigXls>> dataMap = new HashMap<>(); | 58 | Map<String,List<AjhPlanScheduleConfigXls>> dataMap = new HashMap<>(); |
59 | List<AjhPlanScheduleConfigXls> confiList = null; | 59 | List<AjhPlanScheduleConfigXls> confiList = null; |
60 | for(AjhPlanScheduleConfigXls scheduleConfigXls :listAjhPlanScheduleConfigs){ | 60 | for(AjhPlanScheduleConfigXls scheduleConfigXls :listAjhPlanScheduleConfigs){ |
... | @@ -73,14 +73,23 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul | ... | @@ -73,14 +73,23 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul |
73 | //System.out.println("key = " + entry.getKey() + ", value = " + entry.getValue()); | 73 | //System.out.println("key = " + entry.getKey() + ", value = " + entry.getValue()); |
74 | //新增父类 | 74 | //新增父类 |
75 | //String configId = UniqIdUtils.getInstance().getUniqID(); | 75 | //String configId = UniqIdUtils.getInstance().getUniqID(); |
76 | planScheduleConfig = new AjhPlanScheduleConfig( factoryId ,year,entry.getKey()); | 76 | planScheduleConfig = new AjhPlanScheduleConfig( departId ,year,entry.getKey()); |
77 | this.baseMapper.insert(planScheduleConfig); | 77 | this.baseMapper.insert(planScheduleConfig); |
78 | //新增子类 | 78 | //新增子类 |
79 | for( AjhPlanScheduleConfigXls planScheduleConfigXls : entry.getValue()){ | 79 | for( AjhPlanScheduleConfigXls planScheduleConfigXls : entry.getValue()){ |
80 | this.baseMapper.insert(new AjhPlanScheduleConfig( factoryId,year ,planScheduleConfig.getParentId(),planScheduleConfig.getConfigName(),planScheduleConfig.getCompleteTime(),planScheduleConfig.getResponsibler())); | 80 | this.baseMapper.insert(new AjhPlanScheduleConfig( departId,year ,planScheduleConfig.getId(),planScheduleConfigXls.getConfigName(),planScheduleConfigXls.getCompleteTime(),planScheduleConfigXls.getResponsibler())); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | public List<AjhPlanScheduleConfigXls> exportXlsTemplate(String departId, String years){ | |
86 | List<AjhPlanScheduleConfigXls> dataList = this.baseMapper.exportXlsTemplate(departId, years); | ||
87 | int index = 1 ; | ||
88 | if(dataList != null && !dataList.isEmpty()){ | ||
89 | for( AjhPlanScheduleConfigXls planScheduleConfigXls : dataList ){ | ||
90 | planScheduleConfigXls.setIndex(index++); | ||
91 | } | ||
92 | } | ||
93 | return dataList; | ||
94 | } | ||
86 | } | 95 | } | ... | ... |
... | @@ -10,9 +10,9 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -10,9 +10,9 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
10 | */ | 10 | */ |
11 | @Data | 11 | @Data |
12 | public class AjhPlanScheduleConfigXls { | 12 | public class AjhPlanScheduleConfigXls { |
13 | @Excel(name = "序号", width = 15) | 13 | @Excel(name = "序号", width = 5) |
14 | @ApiModelProperty(value = "序号") | 14 | @ApiModelProperty(value = "序号") |
15 | private String index; | 15 | private Integer index; |
16 | @Excel(name = "工作事项", width = 15) | 16 | @Excel(name = "工作事项", width = 15) |
17 | @ApiModelProperty(value = "工作事项") | 17 | @ApiModelProperty(value = "工作事项") |
18 | private String workName; | 18 | private String workName; | ... | ... |
... | @@ -7,6 +7,7 @@ import com.skua.modules.emergency.service.IEmergencyRiskEventService; | ... | @@ -7,6 +7,7 @@ import com.skua.modules.emergency.service.IEmergencyRiskEventService; |
7 | import com.skua.modules.emergency.vo.DangerDatabaseResult; | 7 | import com.skua.modules.emergency.vo.DangerDatabaseResult; |
8 | import com.skua.modules.emergency.vo.MapDatabaseResult; | 8 | import com.skua.modules.emergency.vo.MapDatabaseResult; |
9 | import com.skua.modules.emergency.vo.RiskDatabaseResult; | 9 | import com.skua.modules.emergency.vo.RiskDatabaseResult; |
10 | import com.skua.tool.util.DateUtils; | ||
10 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
11 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
12 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
... | @@ -40,6 +41,10 @@ public class EventMapController { | ... | @@ -40,6 +41,10 @@ public class EventMapController { |
40 | return result; | 41 | return result; |
41 | } | 42 | } |
42 | 43 | ||
44 | |||
45 | |||
46 | |||
47 | |||
43 | /** | 48 | /** |
44 | * 风险库统计 | 49 | * 风险库统计 |
45 | */ | 50 | */ |
... | @@ -60,12 +65,14 @@ public class EventMapController { | ... | @@ -60,12 +65,14 @@ public class EventMapController { |
60 | @AutoLog(value = "隐患排查巡检统计") | 65 | @AutoLog(value = "隐患排查巡检统计") |
61 | @ApiOperation(value="隐患排查巡检统计", notes="隐患排查巡检统计") | 66 | @ApiOperation(value="隐患排查巡检统计", notes="隐患排查巡检统计") |
62 | @GetMapping(value = "/getDangerList") | 67 | @GetMapping(value = "/getDangerList") |
63 | public Result<List<DangerDatabaseResult>> getDangerList( String departIds,String year){ | 68 | public Result<List<DangerDatabaseResult>> getDangerList( String departIds,String startDate,String endDate){ |
64 | Result<List<DangerDatabaseResult>> result = new Result<>(); | 69 | Result<List<DangerDatabaseResult>> result = new Result<>(); |
65 | if(StringUtils.isEmpty(departIds)){ | 70 | if(StringUtils.isEmpty(departIds)){ |
66 | departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 | 71 | departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 |
67 | } | 72 | } |
68 | List<DangerDatabaseResult> list = emergencyRiskEventService.getDangerList(departIds,year); | 73 | if(StringUtils.isEmpty(startDate)) startDate = DateUtils.getCurrentYear()+"-01-01"; |
74 | if(StringUtils.isEmpty(endDate)) endDate = DateUtils.getCurrentYear()+"-12-31"; | ||
75 | List<DangerDatabaseResult> list = emergencyRiskEventService.getDangerList(departIds,startDate,endDate); | ||
69 | result.setSuccess(true); | 76 | result.setSuccess(true); |
70 | result.setResult(list); | 77 | result.setResult(list); |
71 | return result; | 78 | return result; |
... | @@ -77,15 +84,16 @@ public class EventMapController { | ... | @@ -77,15 +84,16 @@ public class EventMapController { |
77 | @AutoLog(value = "地图隐患排查巡检统计") | 84 | @AutoLog(value = "地图隐患排查巡检统计") |
78 | @ApiOperation(value="地图隐患排查巡检统计", notes="地图隐患排查巡检统计") | 85 | @ApiOperation(value="地图隐患排查巡检统计", notes="地图隐患排查巡检统计") |
79 | @GetMapping(value = "/getMapData") | 86 | @GetMapping(value = "/getMapData") |
80 | public Result<List<MapDatabaseResult>> getMapData(String departIds,String year){ | 87 | public Result<List<MapDatabaseResult>> getMapData(String departIds,String startDate,String endDate){ |
81 | Result<List<MapDatabaseResult>> result = new Result<>(); | 88 | Result<List<MapDatabaseResult>> result = new Result<>(); |
82 | if(StringUtils.isEmpty(departIds)){ | 89 | if(StringUtils.isEmpty(departIds)){ |
83 | departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 | 90 | departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 |
84 | } | 91 | } |
85 | List<MapDatabaseResult> list = emergencyRiskEventService.getMapData(departIds,year); | 92 | if(StringUtils.isEmpty(startDate)) startDate = DateUtils.getCurrentYear()+"-01-01"; |
93 | if(StringUtils.isEmpty(endDate)) endDate = DateUtils.getCurrentYear()+"-12-31"; | ||
94 | List<MapDatabaseResult> list = emergencyRiskEventService.getMapData(departIds,startDate,endDate); | ||
86 | result.setSuccess(true); | 95 | result.setSuccess(true); |
87 | result.setResult(list); | 96 | result.setResult(list); |
88 | return result; | 97 | return result; |
89 | } | 98 | } |
90 | |||
91 | } | 99 | } | ... | ... |
... | @@ -19,8 +19,8 @@ public interface EmergencyRiskEventMapper extends BaseMapper<EmergencyRiskEvent> | ... | @@ -19,8 +19,8 @@ public interface EmergencyRiskEventMapper extends BaseMapper<EmergencyRiskEvent> |
19 | List<RiskDatabaseResult> getRiskList(@Param("year") String year); | 19 | List<RiskDatabaseResult> getRiskList(@Param("year") String year); |
20 | 20 | ||
21 | @Anonymous | 21 | @Anonymous |
22 | List<DangerDatabaseResult> getDangerList( @Param("departIds")String departIds , @Param("year") String year); | 22 | List<DangerDatabaseResult> getDangerList( @Param("departIds")String departIds , @Param("startDate") String startDate,@Param("endDate")String endDate); |
23 | 23 | ||
24 | @Anonymous | 24 | @Anonymous |
25 | List<MapDatabaseResult> getMapData( @Param("departIds")String departIds , @Param("year") String year); | 25 | List<MapDatabaseResult> getMapData( @Param("departIds")String departIds ); |
26 | } | 26 | } | ... | ... |
... | @@ -37,7 +37,13 @@ | ... | @@ -37,7 +37,13 @@ |
37 | LEFT JOIN sys_user u ON u.id = r.report_user | 37 | LEFT JOIN sys_user u ON u.id = r.report_user |
38 | WHERE | 38 | WHERE |
39 | d.depart_type = 1 | 39 | d.depart_type = 1 |
40 | AND r.report_date LIKE CONCAT(#{year},'%') | 40 | |
41 | <if test="startDate != null and startDate != ''"> | ||
42 | and DATE_FORMAT( r.report_date, '%Y-%m-%d' ) >= #{startDate} | ||
43 | </if> | ||
44 | <if test="endDate != null and endDate != ''"> | ||
45 | and DATE_FORMAT( r.report_date, '%Y-%m-%d' ) <= #{endDate} | ||
46 | </if> | ||
41 | <if test="departIds != null and departIds !='' "> | 47 | <if test="departIds != null and departIds !='' "> |
42 | and d.id in (${departIds}) | 48 | and d.id in (${departIds}) |
43 | </if> | 49 | </if> | ... | ... |
... | @@ -45,12 +45,11 @@ public interface IEmergencyRiskEventService extends IService<EmergencyRiskEvent> | ... | @@ -45,12 +45,11 @@ public interface IEmergencyRiskEventService extends IService<EmergencyRiskEvent> |
45 | * 隐患排查巡检统计 | 45 | * 隐患排查巡检统计 |
46 | * @return | 46 | * @return |
47 | */ | 47 | */ |
48 | List<DangerDatabaseResult> getDangerList(String departIds, String year); | 48 | List<DangerDatabaseResult> getDangerList(String departIds, String startDate,String endDate); |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * 地图隐患排查数量 | 51 | * 地图隐患排查数量 |
52 | * @param year | ||
53 | * @return | 52 | * @return |
54 | */ | 53 | */ |
55 | List<MapDatabaseResult> getMapData(String departIds, String year); | 54 | List<MapDatabaseResult> getMapData(String departIds, String startDate,String endDate); |
56 | } | 55 | } | ... | ... |
... | @@ -161,21 +161,21 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -161,21 +161,21 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
161 | } | 161 | } |
162 | 162 | ||
163 | @Override | 163 | @Override |
164 | public List<DangerDatabaseResult> getDangerList(String departIds, String year) { | 164 | public List<DangerDatabaseResult> getDangerList(String departIds, String startDate,String endDate) { |
165 | if(StringUtils.isEmpty(year)){ | 165 | /* if(StringUtils.isEmpty(year)){ |
166 | year = String.valueOf(DateUtils.getYear()); | 166 | year = String.valueOf(DateUtils.getYear()); |
167 | } | 167 | }*/ |
168 | List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach( departIds, ","), year); | 168 | List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach( departIds, ","), startDate, endDate); |
169 | return list; | 169 | return list; |
170 | } | 170 | } |
171 | 171 | ||
172 | @Override | 172 | @Override |
173 | public List<MapDatabaseResult> getMapData(String departIds,String year) { | 173 | public List<MapDatabaseResult> getMapData(String departIds,String startDate,String endDate) { |
174 | if(StringUtils.isEmpty(year)){ | 174 | /* if(StringUtils.isEmpty(year)){ |
175 | year = String.valueOf(DateUtils.getYear()); | 175 | year = String.valueOf(DateUtils.getYear()); |
176 | } | 176 | }*/ |
177 | List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach(departIds,","), year); | 177 | List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(JSUtils.quoteEach(departIds,","), startDate, endDate); |
178 | List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(JSUtils.quoteEach(departIds,","),year); | 178 | List<MapDatabaseResult> list = emergencyRiskEventMapper.getMapData(JSUtils.quoteEach(departIds,",")); |
179 | for (MapDatabaseResult mapDatabaseResult : list) { | 179 | for (MapDatabaseResult mapDatabaseResult : list) { |
180 | List<DangerDatabaseResult> daList = new ArrayList<>(); | 180 | List<DangerDatabaseResult> daList = new ArrayList<>(); |
181 | String departId = mapDatabaseResult.getDepartId(); | 181 | String departId = mapDatabaseResult.getDepartId(); | ... | ... |
... | @@ -191,6 +191,10 @@ public class MaterialINController { | ... | @@ -191,6 +191,10 @@ public class MaterialINController { |
191 | if(StringUtils.isNotEmpty(req.getParameter("arriveTime_end"))){ | 191 | if(StringUtils.isNotEmpty(req.getParameter("arriveTime_end"))){ |
192 | materialINVO.setEndTime( req.getParameter("arriveTime_end") ); | 192 | materialINVO.setEndTime( req.getParameter("arriveTime_end") ); |
193 | } | 193 | } |
194 | if(StringUtils.isEmpty(materialINVO.getDepartId())){ | ||
195 | materialINVO.setDepartIds( JSUtils.quoteEach( BaseContextHandler.getDeparts(),",")); | ||
196 | } | ||
197 | |||
194 | materialINVO.setAuditStatus("3"); | 198 | materialINVO.setAuditStatus("3"); |
195 | IPage<MaterialINVO> pageList = materialINService.arrivalRecordList(page, materialINVO); | 199 | IPage<MaterialINVO> pageList = materialINService.arrivalRecordList(page, materialINVO); |
196 | result.setSuccess(true); | 200 | result.setSuccess(true); | ... | ... |
... | @@ -30,7 +30,7 @@ public interface MaterialINMapper extends BaseMapper<MaterialIN> { | ... | @@ -30,7 +30,7 @@ public interface MaterialINMapper extends BaseMapper<MaterialIN> { |
30 | * @return | 30 | * @return |
31 | */ | 31 | */ |
32 | List<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, @Param("materialIN") MaterialIN materialIN); | 32 | List<MaterialIN> selectAuditMaterialINByPage(IPage<MaterialIN> page, @Param("materialIN") MaterialIN materialIN); |
33 | 33 | @Anonymous | |
34 | List<MaterialINVO> arrivalRecordList(Page<MaterialINVO> page, @Param("param")MaterialINVO materialINVO); | 34 | List<MaterialINVO> arrivalRecordList(Page<MaterialINVO> page, @Param("param")MaterialINVO materialINVO); |
35 | @Anonymous | 35 | @Anonymous |
36 | MaterialINVO queryById(@Param("id") String id); | 36 | MaterialINVO queryById(@Param("id") String id); | ... | ... |
... | @@ -89,6 +89,10 @@ | ... | @@ -89,6 +89,10 @@ |
89 | left join ajh_supplier_manage sm on sm.id = t.supplier_id | 89 | left join ajh_supplier_manage sm on sm.id = t.supplier_id |
90 | left join erp_distribut_material dm on (dm.contract_id = t.distribut_contract_id and dm.good_code = t.good_code) | 90 | left join erp_distribut_material dm on (dm.contract_id = t.distribut_contract_id and dm.good_code = t.good_code) |
91 | where t.audit_status = #{param.auditStatus} | 91 | where t.audit_status = #{param.auditStatus} |
92 | |||
93 | <if test="param.departIds != null and param.departIds != ''"> | ||
94 | and t.depart_id in(${param.departIds}) | ||
95 | </if> | ||
92 | <if test="param.departId != null and param.departId != ''"> | 96 | <if test="param.departId != null and param.departId != ''"> |
93 | and t.depart_id = #{param.departId} | 97 | and t.depart_id = #{param.departId} |
94 | </if> | 98 | </if> | ... | ... |
... | @@ -22,6 +22,9 @@ public class MaterialINVO extends MaterialIN { | ... | @@ -22,6 +22,9 @@ public class MaterialINVO extends MaterialIN { |
22 | /**税额*/ | 22 | /**税额*/ |
23 | @ApiModelProperty(value = "税额") | 23 | @ApiModelProperty(value = "税额") |
24 | private String taxAmount; | 24 | private String taxAmount; |
25 | |||
26 | @ApiModelProperty(value = "权限厂站编号集合") | ||
27 | private String departIds; | ||
25 | /**药剂(物料)名称*/ | 28 | /**药剂(物料)名称*/ |
26 | @Excel(name = "药剂(物料)名称", width = 15) | 29 | @Excel(name = "药剂(物料)名称", width = 15) |
27 | @ApiModelProperty(value = "药剂(物料)名称") | 30 | @ApiModelProperty(value = "药剂(物料)名称") | ... | ... |
... | @@ -2,44 +2,23 @@ package com.skua.modules.report.controller; | ... | @@ -2,44 +2,23 @@ package com.skua.modules.report.controller; |
2 | 2 | ||
3 | import java.util.Arrays; | 3 | import java.util.Arrays; |
4 | import java.util.List; | 4 | import java.util.List; |
5 | import java.util.Map; | ||
6 | import java.io.IOException; | ||
7 | import java.io.UnsupportedEncodingException; | ||
8 | import java.net.URLDecoder; | ||
9 | import javax.servlet.http.HttpServletRequest; | 5 | import javax.servlet.http.HttpServletRequest; |
10 | import javax.servlet.http.HttpServletResponse; | ||
11 | import com.skua.core.api.vo.Result; | 6 | import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 7 | import com.skua.core.aspect.annotation.AutoLog; |
13 | import com.skua.core.context.BaseContextHandler; | ||
14 | import com.skua.core.query.QueryGenerator; | 8 | import com.skua.core.query.QueryGenerator; |
15 | import com.skua.core.service.ISequenceService; | ||
16 | import com.skua.core.util.ConvertUtils; | ||
17 | import com.skua.modules.report.entity.MajorIssuesProcess; | 9 | import com.skua.modules.report.entity.MajorIssuesProcess; |
18 | import com.skua.modules.report.entity.MajorIssuesProcessItem; | 10 | import com.skua.modules.report.entity.MajorIssuesProcessItem; |
19 | import com.skua.modules.report.service.IMajorIssuesProcessItemService; | 11 | import com.skua.modules.report.service.IMajorIssuesProcessItemService; |
20 | import com.skua.modules.report.service.IMajorIssuesProcessService; | 12 | import com.skua.modules.report.service.IMajorIssuesProcessService; |
21 | import java.util.Date; | ||
22 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
23 | import com.baomidou.mybatisplus.core.metadata.IPage; | 14 | import com.baomidou.mybatisplus.core.metadata.IPage; |
24 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 15 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
25 | import com.skua.modules.system.entity.SysConfig; | ||
26 | import com.skua.modules.system.service.ISysConfigService; | 16 | import com.skua.modules.system.service.ISysConfigService; |
27 | import com.skua.modules.system.service.SmsService; | 17 | import com.skua.modules.system.service.SmsService; |
28 | import lombok.extern.slf4j.Slf4j; | 18 | import lombok.extern.slf4j.Slf4j; |
29 | |||
30 | import org.apache.commons.lang3.StringUtils; | 19 | import org.apache.commons.lang3.StringUtils; |
31 | import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
32 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
33 | import org.jeecgframework.poi.excel.entity.ExportParams; | ||
34 | import org.jeecgframework.poi.excel.entity.ImportParams; | ||
35 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
36 | |||
37 | import org.springframework.beans.factory.annotation.Autowired; | 20 | import org.springframework.beans.factory.annotation.Autowired; |
38 | import org.springframework.web.bind.annotation.*; | 21 | import org.springframework.web.bind.annotation.*; |
39 | import org.springframework.web.multipart.MultipartFile; | ||
40 | import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
41 | import org.springframework.web.servlet.ModelAndView; | ||
42 | import com.alibaba.fastjson.JSON; | ||
43 | import io.swagger.annotations.Api; | 22 | import io.swagger.annotations.Api; |
44 | import io.swagger.annotations.ApiOperation; | 23 | import io.swagger.annotations.ApiOperation; |
45 | 24 | ||
... | @@ -74,6 +53,8 @@ public class MajorIssuesProcessController { | ... | @@ -74,6 +53,8 @@ public class MajorIssuesProcessController { |
74 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 53 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
75 | HttpServletRequest req) { | 54 | HttpServletRequest req) { |
76 | Result<IPage<MajorIssuesProcess>> result = new Result<IPage<MajorIssuesProcess>>(); | 55 | Result<IPage<MajorIssuesProcess>> result = new Result<IPage<MajorIssuesProcess>>(); |
56 | //majorIssuesProcess.setFrequency(null);//不参与查询 | ||
57 | //majorIssuesProcess.setContrastFlag(null);//不参与查询 | ||
77 | QueryWrapper<MajorIssuesProcess> queryWrapper = QueryGenerator.initQueryWrapper(majorIssuesProcess, req.getParameterMap()); | 58 | QueryWrapper<MajorIssuesProcess> queryWrapper = QueryGenerator.initQueryWrapper(majorIssuesProcess, req.getParameterMap()); |
78 | Page<MajorIssuesProcess> page = new Page<MajorIssuesProcess>(pageNo, pageSize); | 59 | Page<MajorIssuesProcess> page = new Page<MajorIssuesProcess>(pageNo, pageSize); |
79 | IPage<MajorIssuesProcess> pageList = majorIssuesProcessService.page(page, queryWrapper); | 60 | IPage<MajorIssuesProcess> pageList = majorIssuesProcessService.page(page, queryWrapper); |
... | @@ -157,25 +138,53 @@ public class MajorIssuesProcessController { | ... | @@ -157,25 +138,53 @@ public class MajorIssuesProcessController { |
157 | return result; | 138 | return result; |
158 | } | 139 | } |
159 | 140 | ||
141 | |||
142 | @AutoLog(value = "重点事项推进情况-结束") | ||
143 | @ApiOperation(value="重点事项推进情况-结束", notes="重点事项推进情况-结束") | ||
144 | @GetMapping(value = "/endProcess") | ||
145 | public Result<MajorIssuesProcess> endProcess(@RequestParam(name="id",required=true) String id ,@RequestParam("status") String status) { | ||
146 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | ||
147 | MajorIssuesProcess majorIssuesProcess = majorIssuesProcessService.getById(id); | ||
148 | if(majorIssuesProcess==null) { | ||
149 | result.error500("未找到对应实体"); | ||
150 | }else { | ||
151 | if(StringUtils.isNotEmpty(status)){ | ||
152 | majorIssuesProcess.setStatus(status); | ||
153 | }else{ | ||
154 | majorIssuesProcess.setStatus("3"); | ||
155 | } | ||
156 | |||
157 | |||
158 | result.setResult(majorIssuesProcess); | ||
159 | result.setSuccess(true); | ||
160 | } | ||
161 | return result; | ||
162 | } | ||
160 | @AutoLog(value = "重点事项推进情况-信息推送") | 163 | @AutoLog(value = "重点事项推进情况-信息推送") |
161 | @ApiOperation(value="重点事项推进情况-信息推送", notes="重点事项推进情况-信息推送") | 164 | @ApiOperation(value="重点事项推进情况-信息推送", notes="重点事项推进情况-信息推送") |
162 | @GetMapping(value = "/pushMessage") | 165 | @GetMapping(value = "/pushMessage") |
163 | public Result<MajorIssuesProcess> pushMessage(@RequestParam(name="id",required=true) String id) { | 166 | public Result<MajorIssuesProcess> pushMessage(String id) { |
164 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | 167 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); |
165 | MajorIssuesProcess majorIssuesProcess = majorIssuesProcessService.getById(id); | 168 | String message = "请及时查看重点事项推进进展!"; |
169 | MajorIssuesProcess majorIssuesProcess = null; | ||
170 | if(StringUtils.isNotEmpty(id)){ | ||
171 | majorIssuesProcess = majorIssuesProcessService.getById(id); | ||
172 | |||
166 | if(majorIssuesProcess==null) { | 173 | if(majorIssuesProcess==null) { |
167 | result.error500("未找到对应实体"); | 174 | result.error500("未找到对应实体"); |
168 | }else { | 175 | }else{ |
169 | // | 176 | message = "请查看:["+majorIssuesProcess.getMatterName()+"]重点事项推进进展"; |
177 | } | ||
178 | } | ||
179 | |||
170 | String roleId = sysConfigService.queryValueByKey("YXBG_ROLE_ID"); | 180 | String roleId = sysConfigService.queryValueByKey("YXBG_ROLE_ID"); |
171 | if(StringUtils.isNotEmpty(roleId)){ | 181 | if(StringUtils.isNotEmpty(roleId)){ |
172 | smsService.pushMsgNoProcessByRoleId("请查看重点事项推进进展" ,"请查看:["+majorIssuesProcess.getMatterName()+"]重点事项推进进展" ,roleId,"MajorIssuesProcess"); | 182 | smsService.pushMsgNoProcessByRoleId("请及时查看重点事项推进进展" ,message ,roleId,"MajorIssuesProcess"); |
173 | result.setResult(majorIssuesProcess); | 183 | result.setResult(majorIssuesProcess); |
174 | result.setSuccess(true); | 184 | result.setSuccess(true); |
175 | }else{ | 185 | }else{ |
176 | result.error500("未找到信息推送的角色"); | 186 | result.error500("未找到信息推送的角色"); |
177 | } | 187 | } |
178 | } | ||
179 | return result; | 188 | return result; |
180 | } | 189 | } |
181 | 190 | ... | ... |
... | @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | ... | @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId; |
7 | import com.baomidou.mybatisplus.annotation.TableName; | 7 | import com.baomidou.mybatisplus.annotation.TableName; |
8 | import com.baomidou.mybatisplus.annotation.TableField; | 8 | import com.baomidou.mybatisplus.annotation.TableField; |
9 | import com.skua.core.aspect.annotation.Dict; | 9 | import com.skua.core.aspect.annotation.Dict; |
10 | import com.skua.core.aspect.annotation.NoQuery; | ||
10 | import com.skua.tool.util.DateUtils; | 11 | import com.skua.tool.util.DateUtils; |
11 | import io.swagger.annotations.ApiModel; | 12 | import io.swagger.annotations.ApiModel; |
12 | import io.swagger.annotations.ApiModelProperty; | 13 | import io.swagger.annotations.ApiModelProperty; |
... | @@ -34,6 +35,7 @@ public class MajorIssuesProcess { | ... | @@ -34,6 +35,7 @@ public class MajorIssuesProcess { |
34 | /**水务公司*/ | 35 | /**水务公司*/ |
35 | @Excel(name = "水务公司", width = 15) | 36 | @Excel(name = "水务公司", width = 15) |
36 | @ApiModelProperty(value = "水务公司") | 37 | @ApiModelProperty(value = "水务公司") |
38 | @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") | ||
37 | private String departId; | 39 | private String departId; |
38 | /**事项名称*/ | 40 | /**事项名称*/ |
39 | @Excel(name = "事项名称", width = 15) | 41 | @Excel(name = "事项名称", width = 15) |
... | @@ -55,8 +57,6 @@ public class MajorIssuesProcess { | ... | @@ -55,8 +57,6 @@ public class MajorIssuesProcess { |
55 | @Dict(dicCode = "loop_unit") | 57 | @Dict(dicCode = "loop_unit") |
56 | private String cycleUnit; | 58 | private String cycleUnit; |
57 | 59 | ||
58 | |||
59 | |||
60 | /**预估金额*/ | 60 | /**预估金额*/ |
61 | @Excel(name = "预估金额", width = 15) | 61 | @Excel(name = "预估金额", width = 15) |
62 | @ApiModelProperty(value = "预估金额") | 62 | @ApiModelProperty(value = "预估金额") |
... | @@ -74,6 +74,11 @@ public class MajorIssuesProcess { | ... | @@ -74,6 +74,11 @@ public class MajorIssuesProcess { |
74 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | 74 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
75 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 75 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
76 | private Date currentProgressTime; | 76 | private Date currentProgressTime; |
77 | |||
78 | @Excel(name="状态",width=15) | ||
79 | @ApiModelProperty(value = "状态: 未开始 0 ; 进行中 1 ; 已结束 2") | ||
80 | @Dict(dicCode = "meetting_status") | ||
81 | private String status; | ||
77 | /**创建人id*/ | 82 | /**创建人id*/ |
78 | @Excel(name = "创建人id", width = 15) | 83 | @Excel(name = "创建人id", width = 15) |
79 | @ApiModelProperty(value = "创建人id") | 84 | @ApiModelProperty(value = "创建人id") |
... | @@ -99,11 +104,13 @@ public class MajorIssuesProcess { | ... | @@ -99,11 +104,13 @@ public class MajorIssuesProcess { |
99 | @ApiModelProperty(value = "删除标识,0:正常,1:删除") | 104 | @ApiModelProperty(value = "删除标识,0:正常,1:删除") |
100 | private Integer delFlag; | 105 | private Integer delFlag; |
101 | 106 | ||
107 | /* @NoQuery | ||
102 | @TableField(exist=false) | 108 | @TableField(exist=false) |
103 | @Excel(name = "推进频率小时", width = 15) | 109 | @Excel(name = "推进频率小时", width = 15) |
104 | @ApiModelProperty(value = "推进频率小时:提供计算使用") | 110 | @ApiModelProperty(value = "推进频率小时:提供计算使用") |
105 | private Long frequency; | 111 | private Long frequency; |
106 | 112 | ||
113 | @NoQuery | ||
107 | @TableField(exist=false) | 114 | @TableField(exist=false) |
108 | @Excel(name = "是否超频率", width = 15) | 115 | @Excel(name = "是否超频率", width = 15) |
109 | @ApiModelProperty(value = "是否超频率:默认 false 没有超标;true表示超标") | 116 | @ApiModelProperty(value = "是否超频率:默认 false 没有超标;true表示超标") |
... | @@ -133,5 +140,5 @@ public class MajorIssuesProcess { | ... | @@ -133,5 +140,5 @@ public class MajorIssuesProcess { |
133 | } | 140 | } |
134 | } | 141 | } |
135 | return contrastFlag; | 142 | return contrastFlag; |
136 | } | 143 | }*/ |
137 | } | 144 | } | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/MajorIssuesProcessItemMapper.xml
... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
3 | <mapper namespace="com.skua.modules.report.mapper.MajorIssuesProcessItemMapper"> | 3 | <mapper namespace="com.skua.modules.report.mapper.MajorIssuesProcessItemMapper"> |
4 | 4 | ||
5 | <update id="updateMajorIssuesProcess" > | 5 | <update id="updateMajorIssuesProcess" > |
6 | update f_major_issues_process set current_progress = #{matterProgress} and current_progress_time = #{createTime} where id = #{matterProcessId} | 6 | update f_major_issues_process set current_progress = #{matterProgress} , current_progress_time = now() where id = #{matterProcessId} |
7 | </update> | 7 | </update> |
8 | 8 | ||
9 | </mapper> | 9 | </mapper> | ... | ... |
-
请 注册 或 登录 后发表评论