209fcc15 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 79e12d4b 47a86ae4
......@@ -99,8 +99,8 @@ public class EquipmentCenterController {
Result<List<TOPTenVO>> result = new Result<>();
setDepartIds(reportStatisticsDTO);
//取消时间参数
reportStatisticsDTO.setStartTime(null);
reportStatisticsDTO.setEndTime(null);
// reportStatisticsDTO.setStartTime(null);
// reportStatisticsDTO.setEndTime(null);
List<TOPTenVO> equipmentState = iProductionEquipmentService.getEquipmentState(reportStatisticsDTO);
result.setSuccess(true);
result.setResult(equipmentState);
......
......@@ -123,7 +123,7 @@ public class EquipmentInfoMonthReportController {
Map<String,Object> dataMap = new HashMap<>();
String sql = "";
//月度计划维修费合计XX万元
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'";
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'";
String plan_cost = commonSqlService.queryForString(sql);
dataMap.put("planCost",plan_cost);//月度计划维修费合计XX万元
//执行XX万元
......
......@@ -157,11 +157,10 @@
<select id="getLevelByTime" resultType="com.skua.modules.equipment.vo.ProportionStatisticsVO"
parameterType="com.skua.modules.equipment.dto.ReportStatisticsDTO">
select ei.equipment_level ,aaa.item_text as category, ifnull(COUNT( ei.id ),0) AS'hour' from equipment_info ei
left join (
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')
) aaa on aaa.item_value = ei.equipment_level
where 1=1
select ei.equipment_level , ifnull(COUNT( ei.id ),0) AS'hour' , t.item_text as category
from equipment_info ei
left join sys_dict_item t on ei.equipment_level = t.item_value
where ei.equipment_level is not null
<if test="startTime != null ">
and ei.create_time &gt;= #{startTime}
</if>
......
......@@ -452,15 +452,27 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi
topTenVO1.setNum(equipmentStatus1.toString());
list.add(topTenVO1);*/
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()+"'";
String sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag = 'djx' ";
if(StringUtils.isNotEmpty(reportStatisticsDTO.getStartTime() )){
sql += " AND create_time >='"+reportStatisticsDTO.getStartTime()+"' ";
}
if(StringUtils.isNotEmpty(reportStatisticsDTO.getEndTime() )){
sql += " AND create_time <='"+reportStatisticsDTO.getEndTime()+"' ";
}
if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){
sql += " and depart_id in("+JSUtils.quoteEach(reportStatisticsDTO.getDepartIds(),",")+") ";
sql += " and depart_id in("+reportStatisticsDTO.getDepartIds()+") ";
}
String dx_num = commonSqlService.queryForString(sql);//待修
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()+"'";
sql = "select count(1) from equipment_repair where del_flag = 1 AND finish_flag in ('sbzx','wwwx') ";
if(StringUtils.isNotEmpty(reportStatisticsDTO.getStartTime() )){
sql += " AND create_time >='"+reportStatisticsDTO.getStartTime()+"' ";
}
if(StringUtils.isNotEmpty(reportStatisticsDTO.getEndTime() )){
sql += " AND create_time <='"+reportStatisticsDTO.getEndTime()+"' ";
}
if(StringUtils.isNotEmpty(reportStatisticsDTO.getDepartIds() )){
sql += " and depart_id in("+JSUtils.quoteEach(reportStatisticsDTO.getDepartIds(),",")+") ";
sql += " and depart_id in("+reportStatisticsDTO.getDepartIds()+") ";
}
String zx_num = commonSqlService.queryForString(sql);//在修
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!