Commit 517cc9a6 authored by shizhilong's avatar shizhilong

开发工具类和检查道床记录相关提交 --shizhilong

parent f2005619
package org.jeecg.modules.checkData.equipmentCheckData.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
import org.jeecg.modules.checkData.equipmentCheckData.service.IRecordsMasterCheckService;
import org.jeecg.modules.checkData.equipmentCheckData.service.ITrackBedManagementCheckService;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.checkData.equipmentCheckData.vo.TrackBedManagementCheckVO;
import org.jeecg.modules.deviceAsset.entity.TrackBedManagement;
import org.jeecg.modules.deviceAsset.service.ITrackBedManagementService;
import org.jeecg.modules.utils.BeanCopyUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.system.base.controller.JeecgController;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 设备检查记录主表 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@RestController
@RequestMapping("/recordsMaster/check")
@Api(tags = "设备检查记录主表控制器")
public class RecordsMasterCheckController extends JeecgController<RecordsMasterCheck, IRecordsMasterCheckService> {
@Autowired
private ITrackBedManagementService trackBedManagementService;
@Autowired
private ITrackBedManagementCheckService trackBedManagementCheckService;
/**
* 设备检查记录-分页列表查询
*
* @param pageNo
* @param pageSize
* @param dto
* @return
*/
@AutoLog(value = "设备检查记录-分页列表查询")
@ApiOperation(value = "设备检查记录-分页列表查询", notes = "设备检查记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<RecordsMasterCheckVO>> queryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
RecordsMasterCheckDTO dto) {
Page<RecordsMasterCheckVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.queryPageList(pageData, dto);
return Result.OK(pageData);
}
/**
* 根据区间id和线别id查询道床列表
* @param sectionId
* @param lineAliasId
* @return
*/
@AutoLog(value = "根据区间id查询道床列表")
@ApiOperation(value = "根据区间id查询道床列表", notes = "根据区间id和线别id查询道床列表")
@GetMapping(value = "/getTrackBedBySubwayIdAndLineId")
public Result<List<TrackBedManagement>> getTrackBedBySubwayIdAndLineId(@ApiParam(name = "区间id") String sectionId,
@ApiParam(name = "线别id") String lineAliasId) {
List<TrackBedManagement> listResult = trackBedManagementService.lambdaQuery()
.eq(ObjectUtil.isNotEmpty(sectionId), TrackBedManagement::getSectionId, sectionId)
.eq(ObjectUtil.isNotEmpty(lineAliasId), TrackBedManagement::getLineAliasId, lineAliasId)
.orderByAsc(TrackBedManagement::getCreateTime)
.list();
return Result.OK(listResult);
}
/**
* 根据道床使用情况记录数据表的道床id查询对应的实用情况
* @param managementId 道床id
* @return
*/
@AutoLog(value = "根据道床使用情况记录数据表的道床id和检查记录主表的id查询对应的实用情况")
@ApiOperation(value = "根据道床使用情况记录数据表的道床id和检查记录主表的id查询对应的实用情况", notes = "根据道床使用情况记录数据表的道床id和检查记录主表的id查询对应的实用情况")
@GetMapping(value = "/getTrackBedByManagementIdAndRecordId")
public Result<List<TrackBedManagementCheckVO>> getTrackBedByManagementId(@ApiParam(name = "道床id") String managementId,@ApiParam(name = "检查记录表主键id") String recordId) {
List<TrackBedManagementCheck> listResult = trackBedManagementCheckService.lambdaQuery()
.eq(ObjectUtil.isNotEmpty(managementId), TrackBedManagementCheck::getTrakBedManagementId, managementId)
.eq(ObjectUtil.isNotEmpty(recordId), TrackBedManagementCheck::getRecordsMasterCheckId, recordId)
.eq(TrackBedManagementCheck::getDelFlag,"0")
.orderByAsc(TrackBedManagementCheck::getCreateTime)
.list();
if(listResult!=null){
List<TrackBedManagementCheckVO> resultList = BeanCopyUtil.copyListProperties(listResult, TrackBedManagementCheckVO::new);
return Result.OK(resultList);
}
return Result.OK(new ArrayList<>());
}
}
package org.jeecg.modules.checkData.equipmentCheckData.controller;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
import org.jeecg.modules.checkData.equipmentCheckData.service.IRecordsMasterCheckService;
import org.jeecg.modules.checkData.equipmentCheckData.service.ITrackBedManagementCheckService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.system.base.controller.JeecgController;
/**
* <p>
* 设备检查记录数据-道床使用情况记录数据 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@RestController
@RequestMapping("/recordsMaster/trackBedManagementCheck")
public class TrackBedManagementCheckController extends JeecgController<TrackBedManagementCheck, ITrackBedManagementCheckService> {
}
package org.jeecg.modules.checkData.equipmentCheckData.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 设备检查记录主表
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Getter
@Setter
@TableName("t_ek_records_master_check")
@ApiModel(value = "RecordsMasterCheck对象", description = "设备检查记录主表")
public class RecordsMasterCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("检查批次编号")
@TableField("ek_code")
private String ekCode;
@ApiModelProperty("工单编号")
@TableField("work_code")
private String workCode;
@ApiModelProperty("轨距水平尺编号")
@TableField("gauge_code")
private String gaugeCode;
@ApiModelProperty("检查区间id")
@TableField("subway_section_id")
private String subwaySectionId;
@ApiModelProperty("检查区间名称")
@TableField("subway_section_name")
private String subwaySectionName;
@ApiModelProperty("所属线路id")
@TableField("light_rail_id")
private String lightRailId;
@ApiModelProperty("所属线路名称")
@TableField("light_rail_name")
private String lightRailName;
@ApiModelProperty("所属线别id")
@TableField("line_alias_id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
@TableField("line_alias_name")
private String lineAliasName;
@ApiModelProperty("起始里程")
@TableField("starting_mileage")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
@TableField("end_mileage")
private BigDecimal endMileage;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
@ApiModelProperty("检查人姓名")
@TableField("check_by")
private String checkBy;
@ApiModelProperty("检查日期")
@TableField("check_time")
private Date checkTime;
@ApiModelProperty("审核人姓名")
@TableField("verify_by")
private String verifyBy;
@ApiModelProperty("审核时间")
@TableField("verify_time")
private Date verifyTime;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
@TableField("del_flag")
private String delFlag;
}
package org.jeecg.modules.checkData.equipmentCheckData.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 设备检查记录数据-道床使用情况记录数据
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Getter
@Setter
@TableName("t_ek_track_bed_management_check")
@ApiModel(value = "TrackBedManagementCheck对象", description = "设备检查记录数据-道床使用情况记录数据")
public class TrackBedManagementCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("设备检查记录主表id->外键")
@TableField("records_master_check_id")
private String recordsMasterCheckId;
@ApiModelProperty("道床id->外键")
@TableField("trak_bed_management_id")
private String trakBedManagementId;
@ApiModelProperty("检查项目名称")
@TableField("ek_project_name")
private String ekProjectName;
@ApiModelProperty("检查项目内容")
@TableField("ek_project_content")
private String ekProjectContent;
@ApiModelProperty("检查合格评判标准")
@TableField("ek_peoject_template")
private String ekPeojectTemplate;
@ApiModelProperty("现场检查项目状态(1:合格;2:良好;3:不合格)")
@TableField("ek_project_status")
private String ekProjectStatus;
@ApiModelProperty("现场检查项目状态名称(1:合格;2:良好;3:不合格)")
@TableField(exist = false)
private String ekProjectStatusName;
@ApiModelProperty("是否删除(0:未删除,1:已删除)")
@TableField("del_flag")
private String delFlag;
}
package org.jeecg.modules.checkData.equipmentCheckData.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO;
import org.jeecg.modules.deviceAsset.vo.TrackBedManagementVO;
/**
* <p>
* 设备检查记录主表 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-07
*/
public interface RecordsMasterCheckMapper extends BaseMapper<RecordsMasterCheck> {
/**
* 设备检查记录-分页列表查询
* @param pageData
* @param dto
* @return
*/
Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto);
}
package org.jeecg.modules.checkData.equipmentCheckData.mapper;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 设备检查记录数据-道床使用情况记录数据 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-07
*/
public interface TrackBedManagementCheckMapper extends BaseMapper<TrackBedManagementCheck> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.equipmentCheckData.mapper.RecordsMasterCheckMapper">
<select id="queryPageList" resultType="org.jeecg.modules.checkData.equipmentCheckData.vo.RecordsMasterCheckVO">
SELECT
t1.*
FROM
t_ek_records_master_check t1
<where>
1=1
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.subwaySectionName != null and dto.subwaySectionName != ''">
AND t1.subway_section_name like concat('%',#{dto.subwaySectionName},'%')
</if>
<if test="dto.lightRailName != null and dto.lightRailName != ''">
AND t1.light_rail_name like concat('%',#{dto.lightRailName},'%')
</if>
<if test="dto.lineAliasName != null and dto.lineAliasName != ''">
AND t1.line_alias_name like concat('%',#{dto.lineAliasName},'%')
</if>
order by t1.create_time desc
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.equipmentCheckData.mapper.TrackBedManagementCheckMapper">
</mapper>
package org.jeecg.modules.checkData.equipmentCheckData.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RecordsMasterCheckVO;
import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO;
import org.jeecg.modules.deviceAsset.vo.TrackBedManagementVO;
/**
* <p>
* 设备检查记录主表 服务类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
public interface IRecordsMasterCheckService extends IService<RecordsMasterCheck> {
/**
* 设备检查记录-分页列表查询
* @param pageData
* @param dto
* @return
*/
Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto);
}
package org.jeecg.modules.checkData.equipmentCheckData.service;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 设备检查记录数据-道床使用情况记录数据 服务类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
public interface ITrackBedManagementCheckService extends IService<TrackBedManagementCheck> {
}
package org.jeecg.modules.checkData.equipmentCheckData.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.equipmentCheckData.mapper.RecordsMasterCheckMapper;
import org.jeecg.modules.checkData.equipmentCheckData.service.IRecordsMasterCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.checkData.equipmentCheckData.vo.RecordsMasterCheckVO;
import org.springframework.stereotype.Service;
/**
* <p>
* 设备检查记录主表 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Service
public class RecordsMasterCheckServiceImpl extends ServiceImpl<RecordsMasterCheckMapper, RecordsMasterCheck> implements IRecordsMasterCheckService {
/**
* 设备检查记录-分页列表查询
* @param pageData
* @param dto
* @return
*/
@Override
public Page<RecordsMasterCheckVO> queryPageList(Page<RecordsMasterCheckVO> pageData, RecordsMasterCheckDTO dto) {
return this.baseMapper.queryPageList(pageData,dto);
}
}
package org.jeecg.modules.checkData.equipmentCheckData.service.impl;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
import org.jeecg.modules.checkData.equipmentCheckData.mapper.TrackBedManagementCheckMapper;
import org.jeecg.modules.checkData.equipmentCheckData.service.ITrackBedManagementCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 设备检查记录数据-道床使用情况记录数据 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-07
*/
@Service
public class TrackBedManagementCheckServiceImpl extends ServiceImpl<TrackBedManagementCheckMapper, TrackBedManagementCheck> implements ITrackBedManagementCheckService {
}
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