Merge remote-tracking branch 'origin/master' into master
正在显示
4 个修改的文件
包含
23 行增加
和
12 行删除
... | @@ -99,8 +99,8 @@ public class EquipmentCenterController { | ... | @@ -99,8 +99,8 @@ public class EquipmentCenterController { |
99 | Result<List<TOPTenVO>> result = new Result<>(); | 99 | Result<List<TOPTenVO>> result = new Result<>(); |
100 | setDepartIds(reportStatisticsDTO); | 100 | setDepartIds(reportStatisticsDTO); |
101 | //取消时间参数 | 101 | //取消时间参数 |
102 | reportStatisticsDTO.setStartTime(null); | 102 | // reportStatisticsDTO.setStartTime(null); |
103 | reportStatisticsDTO.setEndTime(null); | 103 | // reportStatisticsDTO.setEndTime(null); |
104 | List<TOPTenVO> equipmentState = iProductionEquipmentService.getEquipmentState(reportStatisticsDTO); | 104 | List<TOPTenVO> equipmentState = iProductionEquipmentService.getEquipmentState(reportStatisticsDTO); |
105 | result.setSuccess(true); | 105 | result.setSuccess(true); |
106 | result.setResult(equipmentState); | 106 | result.setResult(equipmentState); | ... | ... |
... | @@ -123,7 +123,7 @@ public class EquipmentInfoMonthReportController { | ... | @@ -123,7 +123,7 @@ public class EquipmentInfoMonthReportController { |
123 | Map<String,Object> dataMap = new HashMap<>(); | 123 | Map<String,Object> dataMap = new HashMap<>(); |
124 | String sql = ""; | 124 | String sql = ""; |
125 | //月度计划维修费合计XX万元 | 125 | //月度计划维修费合计XX万元 |
126 | sql = "select sum(ifnull(plan_cost,0)) 'plan_cost' from equipment_maintain_plan where release_status = '1' and start_time >= '"+startDate+" 00:00:00' and end_time <='"+endDate+" 23:59:59'"; | 126 | sql = "select round(sum(ifnull(plan_cost,0))/10000,2) 'plan_cost' from equipment_maintain_plan where release_status = '1' and start_time >= '"+startDate+" 00:00:00' and end_time <='"+endDate+" 23:59:59'"; |
127 | String plan_cost = commonSqlService.queryForString(sql); | 127 | String plan_cost = commonSqlService.queryForString(sql); |
128 | dataMap.put("planCost",plan_cost);//月度计划维修费合计XX万元 | 128 | dataMap.put("planCost",plan_cost);//月度计划维修费合计XX万元 |
129 | //执行XX万元 | 129 | //执行XX万元 | ... | ... |
... | @@ -157,11 +157,10 @@ | ... | @@ -157,11 +157,10 @@ |
157 | 157 | ||
158 | <select id="getLevelByTime" resultType="com.skua.modules.equipment.vo.ProportionStatisticsVO" | 158 | <select id="getLevelByTime" resultType="com.skua.modules.equipment.vo.ProportionStatisticsVO" |
159 | parameterType="com.skua.modules.equipment.dto.ReportStatisticsDTO"> | 159 | parameterType="com.skua.modules.equipment.dto.ReportStatisticsDTO"> |
160 | select ei.equipment_level ,aaa.item_text as category, ifnull(COUNT( ei.id ),0) AS'hour' from equipment_info ei | 160 | select ei.equipment_level , ifnull(COUNT( ei.id ),0) AS'hour' , t.item_text as category |
161 | left join ( | 161 | from equipment_info ei |
162 | select t.item_value , t.item_text from sys_dict_item t where t.dict_id in (select id from sys_dict where dict_code = 'equipment-equipment_level') | 162 | left join sys_dict_item t on ei.equipment_level = t.item_value |
163 | ) aaa on aaa.item_value = ei.equipment_level | 163 | where ei.equipment_level is not null |
164 | where 1=1 | ||
165 | <if test="startTime != null "> | 164 | <if test="startTime != null "> |
166 | and ei.create_time >= #{startTime} | 165 | and ei.create_time >= #{startTime} |
167 | </if> | 166 | </if> | ... | ... |
... | @@ -452,15 +452,27 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi | ... | @@ -452,15 +452,27 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi |
452 | topTenVO1.setNum(equipmentStatus1.toString()); | 452 | topTenVO1.setNum(equipmentStatus1.toString()); |
453 | list.add(topTenVO1);*/ | 453 | list.add(topTenVO1);*/ |
454 | 454 | ||
455 | String sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag = 'djx' AND create_time >='"+reportStatisticsDTO.getStartTime()+"' AND create_time >='"+reportStatisticsDTO.getEndTime()+"'"; | 455 | String sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag = 'djx' "; |
456 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getStartTime() )){ | ||
457 | sql += " AND create_time >='"+reportStatisticsDTO.getStartTime()+"' "; | ||
458 | } | ||
459 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getEndTime() )){ | ||
460 | sql += " AND create_time <='"+reportStatisticsDTO.getEndTime()+"' "; | ||
461 | } | ||
456 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){ | 462 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){ |
457 | sql += " and depart_id in("+JSUtils.quoteEach(reportStatisticsDTO.getDepartIds(),",")+") "; | 463 | sql += " and depart_id in("+reportStatisticsDTO.getDepartIds()+") "; |
458 | } | 464 | } |
459 | String dx_num = commonSqlService.queryForString(sql);//待修 | 465 | String dx_num = commonSqlService.queryForString(sql);//待修 |
460 | 466 | ||
461 | sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag in ('sbzx','wwwx') AND create_time >='"+reportStatisticsDTO.getStartTime()+"' AND create_time >='"+reportStatisticsDTO.getEndTime()+"'"; | 467 | sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag in ('sbzx','wwwx') "; |
468 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getStartTime() )){ | ||
469 | sql += " AND create_time >='"+reportStatisticsDTO.getStartTime()+"' "; | ||
470 | } | ||
471 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getEndTime() )){ | ||
472 | sql += " AND create_time <='"+reportStatisticsDTO.getEndTime()+"' "; | ||
473 | } | ||
462 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){ | 474 | if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){ |
463 | sql += " and depart_id in("+JSUtils.quoteEach(reportStatisticsDTO.getDepartIds(),",")+") "; | 475 | sql += " and depart_id in("+reportStatisticsDTO.getDepartIds()+") "; |
464 | } | 476 | } |
465 | String zx_num = commonSqlService.queryForString(sql);//在修 | 477 | String zx_num = commonSqlService.queryForString(sql);//在修 |
466 | 478 | ... | ... |
-
请 注册 或 登录 后发表评论