Commit 6e66c914 authored by 史志龙's avatar 史志龙

检查记录汇总--shizhilong

parent ab9c9ebc
...@@ -16,9 +16,11 @@ import org.jeecg.common.aspect.annotation.AutoLog; ...@@ -16,9 +16,11 @@ import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.dto.CheckDataSummaryDTO;
import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO; import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.entity.*; import org.jeecg.modules.checkData.entity.*;
import org.jeecg.modules.checkData.service.*; import org.jeecg.modules.checkData.service.*;
import org.jeecg.modules.checkData.vo.CheckDataSummaryVO;
import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO; import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.checkData.vo.RecordsMasterTurnoutInfoVO; import org.jeecg.modules.checkData.vo.RecordsMasterTurnoutInfoVO;
import org.jeecg.modules.checkData.vo.TrackBedManagementCheckVO; import org.jeecg.modules.checkData.vo.TrackBedManagementCheckVO;
...@@ -68,6 +70,24 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC ...@@ -68,6 +70,24 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
private ICorrugationRecordService corrugationRecordService; private ICorrugationRecordService corrugationRecordService;
//********************************设备检查记录相关接口************************************************************* //********************************设备检查记录相关接口*************************************************************
/**
* 设备线路检查记录汇总-分页列表查询
*
* @param pageNo
* @param pageSize
* @param dto
* @return
*/
@AutoLog(value = "设备线路检查记录汇总-分页列表查询")
@ApiOperation(value = "设备线路检查记录汇总-分页列表查询", notes = "设备线路检查记录汇总-分页列表查询")
@GetMapping(value = "/getSummaryPageList")
public Result<IPage<CheckDataSummaryVO>> getSummaryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
CheckDataSummaryDTO dto) {
Page<CheckDataSummaryVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.getSummaryPageList(pageData, dto);
return Result.OK(pageData);
}
/** /**
* 设备检查记录-分页列表查询 * 设备检查记录-分页列表查询
......
package org.jeecg.modules.checkData.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 设备检查数据汇总接收类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Data
public class CheckDataSummaryDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("大类型 1:动静态几何尺寸检查; 2:设备检查记录; 3:线路巡查记录数据")
private Integer bigType;
@ApiModelProperty("小类型 1:动静态几何尺寸检查(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查); " +
"2:设备检查记录(1:道岔使用情况;2:钢轨伤损情况;3:曲线磨损情况;4:钢轨波磨情况;5:道床使用情况); " +
"3:线路巡查记录数据(1:线路巡查情况)")
private Integer smallType;
@ApiModelProperty("检查批次编号")
private String ekCode;
@ApiModelProperty("起始里程")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
private BigDecimal endMileage;
}
...@@ -2,8 +2,10 @@ package org.jeecg.modules.checkData.mapper; ...@@ -2,8 +2,10 @@ package org.jeecg.modules.checkData.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dto.CheckDataSummaryDTO;
import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO; import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.entity.RecordsMasterCheck; import org.jeecg.modules.checkData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.vo.CheckDataSummaryVO;
import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO; import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO;
/** /**
...@@ -23,4 +25,12 @@ public interface RecordsMasterCheckMapper extends BaseMapper<RecordsMasterCheck> ...@@ -23,4 +25,12 @@ public interface RecordsMasterCheckMapper extends BaseMapper<RecordsMasterCheck>
*/ */
Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto); Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto);
/**
* 设备线路检查记录汇总-分页列表查询
* @param pageData
* @param dto
* @return
*/
Page<CheckDataSummaryVO> getSummaryPageList(Page<CheckDataSummaryVO> pageData, CheckDataSummaryDTO dto);
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.checkData.mapper.RecordsMasterCheckMapper"> <mapper namespace="org.jeecg.modules.checkData.mapper.RecordsMasterCheckMapper">
<select id="queryPageList" resultType="org.jeecg.modules.checkData.vo.RecordsMasterCheckVO"> <select id="queryPageList" resultType="org.jeecg.modules.checkData.vo.RecordsMasterCheckVO">
SELECT SELECT
t1.* t1.*
FROM FROM
t_ek_records_master_check t1 left join t_sn_light_rail t2 on t1.light_rail_id = t2.id t_ek_records_master_check t1 left join t_sn_light_rail t2 on t1.light_rail_id = t2.id
<where> <where>
...@@ -32,9 +32,110 @@ ...@@ -32,9 +32,110 @@
<if test="dto.endTime != null"> <if test="dto.endTime != null">
AND t1.check_time <![CDATA[ <= ]]> DATE_ADD(#{dto.endTime},INTERVAL 1 DAY) AND t1.check_time <![CDATA[ <= ]]> DATE_ADD(#{dto.endTime},INTERVAL 1 DAY)
</if> </if>
AND t1.type = #{dto.type} AND t1.type = #{dto.type}
order by t1.create_time desc order by t1.create_time desc
</where> </where>
</select> </select>
<select id="getSummaryPageList" resultType="org.jeecg.modules.checkData.vo.CheckDataSummaryVO">
SELECT
*
FROM (
SELECT
t1.id,
1 big_type,
t1.type as small_type,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.ek_code,
t1.work_code,
t1.track_code as gauge_code,
t1.subway_section_id,
t1.subway_section_name,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.starting_mileage,
t1.end_mileage,
t1.check_by,
t1.check_time,
t1.remark,
t1.del_flag
FROM
t_djt_movement_records_master t1
UNION ALL
SELECT
t1.id,
2 big_type,
t1.type as small_type,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.ek_code,
t1.work_code,
t1.gauge_code,
t1.subway_section_id,
t1.subway_section_name,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.starting_mileage,
t1.end_mileage,
t1.check_by,
t1.check_time,
t1.remark,
t1.del_flag
FROM
t_ek_records_master_check t1
UNION ALL
SELECT
t1.id,
3 big_type,
1 as small_type,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.ek_code,
t1.work_code,
'' as gauge_code,
'' as subway_section_id,
'' as subway_section_name,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.starting_mileage,
t1.end_mileage,
t1.check_by,
t1.inspect_time as check_time,
t1.remark,
t1.del_flag
FROM
t_xd_record_patrol_master t1 ) t
WHERE 1=1
and t.del_flag = '0'
<if test="dto.bigType != null">
AND t.big_type = #{dto.bigType}
</if>
<if test="dto.smallType != null">
AND t.small_type = #{dto.smallType}
</if>
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.startingMileage != null">
AND t.starting_mileage >= #{dto.startingMileage}
</if>
<if test="dto.endMileage != null">
AND t.end_mileage <![CDATA[ <= ]]> #{dto.endMileage}
</if>
order by t.big_type,t.small_type,t.create_time
</select>
</mapper> </mapper>
package org.jeecg.modules.checkData.service; package org.jeecg.modules.checkData.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dto.CheckDataSummaryDTO;
import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO; import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.entity.RecordsMasterCheck; import org.jeecg.modules.checkData.entity.RecordsMasterCheck;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.vo.CheckDataSummaryVO;
import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO; import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO; import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO;
import org.jeecg.modules.deviceAsset.vo.TrackBedManagementVO; import org.jeecg.modules.deviceAsset.vo.TrackBedManagementVO;
...@@ -28,5 +30,12 @@ public interface IRecordsMasterCheckService extends IService<RecordsMasterCheck> ...@@ -28,5 +30,12 @@ public interface IRecordsMasterCheckService extends IService<RecordsMasterCheck>
*/ */
Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto); Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto);
/**
* 设备线路检查记录汇总-分页列表查询
* @param pageData
* @param dto
* @return
*/
Page<CheckDataSummaryVO> getSummaryPageList(Page<CheckDataSummaryVO> pageData, CheckDataSummaryDTO dto);
} }
package org.jeecg.modules.checkData.service.impl; package org.jeecg.modules.checkData.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dto.CheckDataSummaryDTO;
import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO; import org.jeecg.modules.checkData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.entity.RecordsMasterCheck; import org.jeecg.modules.checkData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.mapper.RecordsMasterCheckMapper; import org.jeecg.modules.checkData.mapper.RecordsMasterCheckMapper;
import org.jeecg.modules.checkData.service.IRecordsMasterCheckService; import org.jeecg.modules.checkData.service.IRecordsMasterCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.checkData.vo.CheckDataSummaryVO;
import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO; import org.jeecg.modules.checkData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -32,4 +34,15 @@ public class RecordsMasterCheckServiceImpl extends ServiceImpl<RecordsMasterChec ...@@ -32,4 +34,15 @@ public class RecordsMasterCheckServiceImpl extends ServiceImpl<RecordsMasterChec
public Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto) { public Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto) {
return this.baseMapper.queryPageList(pageData,dto); return this.baseMapper.queryPageList(pageData,dto);
} }
/**
* 设备线路检查记录汇总-分页列表查询
* @param pageData
* @param dto
* @return
*/
@Override
public Page<CheckDataSummaryVO> getSummaryPageList(Page<CheckDataSummaryVO> pageData, CheckDataSummaryDTO dto) {
return this.baseMapper.getSummaryPageList(pageData,dto);
}
} }
package org.jeecg.modules.checkData.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 设备线路检查记录汇总返回类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Data
public class CheckDataSummaryVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@ApiModelProperty("大类型 1:动静态几何尺寸检查; 2:设备检查记录; 3:线路巡查记录数据")
private Integer bigType;
@ApiModelProperty("小类型 1:动静态几何尺寸检查(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查); " +
"2:设备检查记录(1:道岔使用情况;2:钢轨伤损情况;3:曲线磨损情况;4:钢轨波磨情况;5:道床使用情况); " +
"3:线路巡查记录数据(1:线路巡查情况)")
private Integer smallType;
@ApiModelProperty("检查批次编号")
private String ekCode;
@ApiModelProperty("工单编号")
private String workCode;
@ApiModelProperty("轨检车号/轨距水平尺编号")
private String gaugeCode;
@ApiModelProperty("检查区间id")
private String subwaySectionId;
@ApiModelProperty("检查区间名称")
private String subwaySectionName;
@ApiModelProperty("所属线路id")
private String lightRailId;
@ApiModelProperty("所属线路名称")
private String lightRailName;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
private String lineAliasName;
@ApiModelProperty("起始里程")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
private BigDecimal endMileage;
@ApiModelProperty("检查人姓名")
private String checkBy;
@ApiModelProperty("检查日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date checkTime;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment