74663a38 康伟

kangwei:设备分析接口补充,部门名称,设备名称字段

1 个父辈 35b33e7a
......@@ -131,10 +131,10 @@ public class EquipmentStatisticsController {
return result;
}*/
@AutoLog(value = "A类设备运行情况-健康度+运行时长")
@ApiOperation(value = "设备台账-分页", notes = "设备台账-分页列表")
@AutoLog(value = "A类设备运行情况-健康度")
@ApiOperation(value = "A类设备运行情况-健康度", notes = "A类设备运行情况-健康度")
@GetMapping(value = "/queryEquipmentInfoByPage")
public Result<IPage<EquipmentInfo>> allList(EquipmentInfo equipmentInfo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
public Result<IPage<EquipmentInfo>> queryEquipmentInfoByPage(EquipmentInfo equipmentInfo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize ,HttpServletRequest req ) throws Exception {
Result<IPage<EquipmentInfo>> result = new Result<IPage<EquipmentInfo>>();
QueryWrapper<EquipmentInfo> queryWrapper = QueryGenerator.initQueryWrapper(equipmentInfo, req.getParameterMap());
......@@ -158,7 +158,7 @@ public class EquipmentStatisticsController {
@AutoLog(value = "A类设备运行情况-运行时长")
@ApiOperation(value = "A类设备运行情况-运行时长", notes = "A类设备运行情况-运行时长")
@GetMapping(value = "/queryEquipmentInfoDurationByPage")
public Result<IPage<EquipmentInfoDuration>> allList(EquipmentInfoDuration equipmentInfo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
public Result<IPage<EquipmentInfoDuration>> queryEquipmentInfoDurationByPage(EquipmentInfoDuration equipmentInfo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize , HttpServletRequest req ) throws Exception {
Result<IPage<EquipmentInfoDuration>> result = new Result<IPage<EquipmentInfoDuration>>();
QueryWrapper<EquipmentInfoDuration> queryWrapper = QueryGenerator.initQueryWrapper(equipmentInfo, req.getParameterMap());
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.skua.core.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -34,8 +35,8 @@ public class EquipmentInfoDuration {
@ApiModelProperty(value = "厂站编号")
private String departId;
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
@Dict(dicCode = "id",dictTable="equipment_info",dicText="equipment_name")
private String infoId;
/**日期*/
@Excel(name = "日期", width = 15)
......
......@@ -75,12 +75,12 @@ public class EquipmentStatisticsServiceImpl implements IEquipmentStatisticsServ
sql +=" select er.depart_id , ei.equipment_name 'name' , '维修费用' as 'cost_type',er.total_cost 'cost',er.repair_date 'time' from equipment_repair er , equipment_info ei ";
sql += " where er.info_id = ei.id and er.total_cost > 0 and er.repair_date >= '"+startTime+" 00:00:00' and er.repair_date <='"+endTime+" 23:59:59' and er.depart_id = '"+departId+"' ";
sql += " UNION " ;
sql += " select emt.depart_id, emt.maintain_plan_name 'name', emt.maintenance_cost 'cost', DATE_FORMAT(emt.maintain_time,'%Y-%m-%d') 'time',";
sql += " select emt.depart_id, emt.maintain_plan_name 'name',";
sql += " CASE WHEN emp.maintenance_type ='dxjg' THEN '大修费用' ";
sql += " WHEN emp.maintenance_type='sbwh' THEN '维护费用'";
sql += " WHEN emp.maintenance_type='sbby' THEN '保养费用'";
sql += " WHEN emp.maintenance_type='jjwx' THEN '基建维修费用'";
sql += " ELSE '其他保养' END AS cost_type ";
sql += " ELSE '其他保养' END AS cost_type, emt.maintenance_cost 'cost', DATE_FORMAT(emt.maintain_time,'%Y-%m-%d') 'time', ";
sql += " from equipment_maintain_task emt ,equipment_maintain_plan emp where emt.plan_id = emp.id ";
sql += " and emt.depart_id = '"+departId+"' and emt.maintain_time >= '"+startTime+" 00:00:00' and emt.maintain_time <='"+endTime+" 23:59:59' ";
sql += " ) aaa left join sys_depart d on d.id = aaa.depart_id ";
......
......@@ -43,6 +43,7 @@ public class EquipmentInfo {
@ApiModelProperty(value = "货主组织")
@BeanAnno(targetFieldNames = {"departIdName", "departId_dictText"})
@JoinSqlQueryAnno(joinSqlQueryEnum = JoinSqlQueryEnum.IN)
@Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name")
private String departId;
/**
* 计量单位
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!