Commit 3d5d21aa authored by shizhilong's avatar shizhilong

检查道床记录导出及排序 --shizhilong

parent 517cc9a6
...@@ -2,13 +2,17 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller; ...@@ -2,13 +2,17 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO; import org.jeecg.modules.checkData.equipmentCheckData.dto.RecordsMasterCheckDTO;
import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck; import org.jeecg.modules.checkData.equipmentCheckData.entity.RecordsMasterCheck;
import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck; import org.jeecg.modules.checkData.equipmentCheckData.entity.TrackBedManagementCheck;
...@@ -19,6 +23,9 @@ import org.jeecg.modules.checkData.equipmentCheckData.vo.TrackBedManagementCheck ...@@ -19,6 +23,9 @@ import org.jeecg.modules.checkData.equipmentCheckData.vo.TrackBedManagementCheck
import org.jeecg.modules.deviceAsset.entity.TrackBedManagement; import org.jeecg.modules.deviceAsset.entity.TrackBedManagement;
import org.jeecg.modules.deviceAsset.service.ITrackBedManagementService; import org.jeecg.modules.deviceAsset.service.ITrackBedManagementService;
import org.jeecg.modules.utils.BeanCopyUtil; import org.jeecg.modules.utils.BeanCopyUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -26,9 +33,12 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -26,9 +33,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* <p> * <p>
...@@ -105,4 +115,18 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC ...@@ -105,4 +115,18 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
return Result.OK(new ArrayList<>()); return Result.OK(new ArrayList<>());
} }
/**
* 导出excel
* @param request
* @param ekCode 检查批次好
* @param subwaySectionName 检查区间名称
* @param lightRailName 线路
* @param lineAliasName 线别
* @return
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request,RecordsMasterCheck recordsMasterCheck) {
return super.exportXls(request, recordsMasterCheck, RecordsMasterCheck.class, "道床使用情况");
}
} }
package org.jeecg.modules.checkData.equipmentCheckData.dto; package org.jeecg.modules.checkData.equipmentCheckData.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -30,12 +32,16 @@ public class RecordsMasterCheckDTO { ...@@ -30,12 +32,16 @@ public class RecordsMasterCheckDTO {
private String createBy; private String createBy;
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
private String updateBy; private String updateBy;
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@ApiModelProperty("检查批次编号") @ApiModelProperty("检查批次编号")
...@@ -78,12 +84,16 @@ public class RecordsMasterCheckDTO { ...@@ -78,12 +84,16 @@ public class RecordsMasterCheckDTO {
private String checkBy; private String checkBy;
@ApiModelProperty("检查日期") @ApiModelProperty("检查日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date checkTime; private Date checkTime;
@ApiModelProperty("审核人姓名") @ApiModelProperty("审核人姓名")
private String verifyBy; private String verifyBy;
@ApiModelProperty("审核时间") @ApiModelProperty("审核时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date verifyTime; private Date verifyTime;
@ApiModelProperty("是否删除(0:未删除;1:已删除)") @ApiModelProperty("是否删除(0:未删除;1:已删除)")
......
package org.jeecg.modules.checkData.equipmentCheckData.dto; package org.jeecg.modules.checkData.equipmentCheckData.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
...@@ -29,12 +31,16 @@ public class TrackBedManagementCheckDTO { ...@@ -29,12 +31,16 @@ public class TrackBedManagementCheckDTO {
private String createBy; private String createBy;
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
private String updateBy; private String updateBy;
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@ApiModelProperty("设备检查记录主表id->外键") @ApiModelProperty("设备检查记录主表id->外键")
......
...@@ -6,10 +6,14 @@ import com.baomidou.mybatisplus.annotation.TableName; ...@@ -6,10 +6,14 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* <p> * <p>
...@@ -37,6 +41,8 @@ public class RecordsMasterCheck implements Serializable { ...@@ -37,6 +41,8 @@ public class RecordsMasterCheck implements Serializable {
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@TableField("create_time") @TableField("create_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
...@@ -45,14 +51,18 @@ public class RecordsMasterCheck implements Serializable { ...@@ -45,14 +51,18 @@ public class RecordsMasterCheck implements Serializable {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField("update_time") @TableField("update_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@Excel(name = "检查批次编号", width = 15, orderNum = "1")
@ApiModelProperty("检查批次编号") @ApiModelProperty("检查批次编号")
@TableField("ek_code") @TableField("ek_code")
private String ekCode; private String ekCode;
@ApiModelProperty("工单编号") @ApiModelProperty("工单编号")
@TableField("work_code") @TableField("work_code")
@Excel(name = "工单编号", width = 15, orderNum = "2")
private String workCode; private String workCode;
@ApiModelProperty("轨距水平尺编号") @ApiModelProperty("轨距水平尺编号")
...@@ -65,6 +75,7 @@ public class RecordsMasterCheck implements Serializable { ...@@ -65,6 +75,7 @@ public class RecordsMasterCheck implements Serializable {
@ApiModelProperty("检查区间名称") @ApiModelProperty("检查区间名称")
@TableField("subway_section_name") @TableField("subway_section_name")
@Excel(name = "检查区间", width = 15, orderNum = "3")
private String subwaySectionName; private String subwaySectionName;
@ApiModelProperty("所属线路id") @ApiModelProperty("所属线路id")
...@@ -73,6 +84,7 @@ public class RecordsMasterCheck implements Serializable { ...@@ -73,6 +84,7 @@ public class RecordsMasterCheck implements Serializable {
@ApiModelProperty("所属线路名称") @ApiModelProperty("所属线路名称")
@TableField("light_rail_name") @TableField("light_rail_name")
@Excel(name = "所属线路", width = 15, orderNum = "4")
private String lightRailName; private String lightRailName;
@ApiModelProperty("所属线别id") @ApiModelProperty("所属线别id")
...@@ -81,34 +93,44 @@ public class RecordsMasterCheck implements Serializable { ...@@ -81,34 +93,44 @@ public class RecordsMasterCheck implements Serializable {
@ApiModelProperty("所属线别名称") @ApiModelProperty("所属线别名称")
@TableField("line_alias_name") @TableField("line_alias_name")
@Excel(name = "所属线路", width = 15, orderNum = "5")
private String lineAliasName; private String lineAliasName;
@ApiModelProperty("起始里程") @ApiModelProperty("起始里程")
@TableField("starting_mileage") @TableField("starting_mileage")
@Excel(name = "起始里程", width = 15, orderNum = "6")
private BigDecimal startingMileage; private BigDecimal startingMileage;
@ApiModelProperty("终点里程") @ApiModelProperty("终点里程")
@TableField("end_mileage") @TableField("end_mileage")
@Excel(name = "终点里程", width = 15, orderNum = "7")
private BigDecimal endMileage; private BigDecimal endMileage;
@ApiModelProperty("备注") @ApiModelProperty("备注")
@TableField("remark") @TableField("remark")
@Excel(name = "备注", width = 15, orderNum = "12")
private String remark; private String remark;
@ApiModelProperty("检查人姓名") @ApiModelProperty("检查人姓名")
@TableField("check_by") @TableField("check_by")
@Excel(name = "检查人姓名", width = 15, orderNum = "8")
private String checkBy; private String checkBy;
@ApiModelProperty("检查日期") @ApiModelProperty("检查日期")
@TableField("check_time") @TableField("check_time")
@Excel(name = "检查日期", width = 15, format = "yyyy-MM-dd", orderNum = "9")
private Date checkTime; private Date checkTime;
@ApiModelProperty("审核人姓名") @ApiModelProperty("审核人姓名")
@TableField("verify_by") @TableField("verify_by")
@Excel(name = "审核人姓名", width = 15, orderNum = "10")
private String verifyBy; private String verifyBy;
@ApiModelProperty("审核时间") @ApiModelProperty("审核时间")
@TableField("verify_time") @TableField("verify_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审核日期", width = 15, format = "yyyy-MM-dd", orderNum = "11")
private Date verifyTime; private Date verifyTime;
@ApiModelProperty("是否删除(0:未删除;1:已删除)") @ApiModelProperty("是否删除(0:未删除;1:已删除)")
......
...@@ -5,10 +5,13 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -5,10 +5,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* <p> * <p>
...@@ -36,6 +39,8 @@ public class TrackBedManagementCheck implements Serializable { ...@@ -36,6 +39,8 @@ public class TrackBedManagementCheck implements Serializable {
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@TableField("create_time") @TableField("create_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
...@@ -44,6 +49,8 @@ public class TrackBedManagementCheck implements Serializable { ...@@ -44,6 +49,8 @@ public class TrackBedManagementCheck implements Serializable {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField("update_time") @TableField("update_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@ApiModelProperty("设备检查记录主表id->外键") @ApiModelProperty("设备检查记录主表id->外键")
......
...@@ -2,11 +2,13 @@ package org.jeecg.modules.checkData.equipmentCheckData.vo; ...@@ -2,11 +2,13 @@ package org.jeecg.modules.checkData.equipmentCheckData.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -35,6 +37,8 @@ public class RecordsMasterCheckVO { ...@@ -35,6 +37,8 @@ public class RecordsMasterCheckVO {
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@TableField("create_time") @TableField("create_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
...@@ -43,6 +47,8 @@ public class RecordsMasterCheckVO { ...@@ -43,6 +47,8 @@ public class RecordsMasterCheckVO {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField("update_time") @TableField("update_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@ApiModelProperty("检查批次编号") @ApiModelProperty("检查批次编号")
...@@ -99,6 +105,8 @@ public class RecordsMasterCheckVO { ...@@ -99,6 +105,8 @@ public class RecordsMasterCheckVO {
@ApiModelProperty("检查日期") @ApiModelProperty("检查日期")
@TableField("check_time") @TableField("check_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date checkTime; private Date checkTime;
@ApiModelProperty("审核人姓名") @ApiModelProperty("审核人姓名")
...@@ -107,6 +115,8 @@ public class RecordsMasterCheckVO { ...@@ -107,6 +115,8 @@ public class RecordsMasterCheckVO {
@ApiModelProperty("审核时间") @ApiModelProperty("审核时间")
@TableField("verify_time") @TableField("verify_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date verifyTime; private Date verifyTime;
@ApiModelProperty("是否删除(0:未删除;1:已删除)") @ApiModelProperty("是否删除(0:未删除;1:已删除)")
......
...@@ -2,12 +2,11 @@ package org.jeecg.modules.checkData.equipmentCheckData.vo; ...@@ -2,12 +2,11 @@ package org.jeecg.modules.checkData.equipmentCheckData.vo;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.jeecg.modules.utils.DicMap; import org.jeecg.modules.utils.DicMap;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
...@@ -35,6 +34,8 @@ public class TrackBedManagementCheckVO { ...@@ -35,6 +34,8 @@ public class TrackBedManagementCheckVO {
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@TableField("create_time") @TableField("create_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime; private Date createTime;
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
...@@ -43,6 +44,8 @@ public class TrackBedManagementCheckVO { ...@@ -43,6 +44,8 @@ public class TrackBedManagementCheckVO {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField("update_time") @TableField("update_time")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date updateTime; private Date updateTime;
@ApiModelProperty("设备检查记录主表id->外键") @ApiModelProperty("设备检查记录主表id->外键")
......
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