13 changed files with 259 additions and 11 deletions
@ -0,0 +1,43 @@
|
||||
package org.springblade.common.constant; |
||||
|
||||
/** |
||||
* 业务系统数据库字段常量 |
||||
*/ |
||||
public enum LogpmDataStatusEnum { |
||||
|
||||
CLOSE("关闭", 1), OPEN("打开", 2); |
||||
private String name; |
||||
|
||||
private Integer value; |
||||
|
||||
private LogpmDataStatusEnum(String name, int value) { |
||||
this.name = name; |
||||
this.value = value; |
||||
} |
||||
|
||||
public int getValue() |
||||
{ |
||||
return this.value; |
||||
} |
||||
|
||||
public String getName() |
||||
{ |
||||
return this.name; |
||||
} |
||||
|
||||
public static LogpmDataStatusEnum valueOf(int value) |
||||
{ |
||||
switch (value) |
||||
{ |
||||
case 1: |
||||
return LogpmDataStatusEnum.CLOSE; |
||||
case 2: |
||||
return LogpmDataStatusEnum.OPEN; |
||||
default: |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,93 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.factory.snm.excel; |
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
|
||||
/** |
||||
* 诗尼曼线路 Excel实体类 |
||||
* |
||||
* @author pref |
||||
* @since 2023-05-11 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class StationlinenumExcel implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 线路编号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("线路编号") |
||||
private String logisticsLineNumber; |
||||
/** |
||||
* 线路名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("线路名称") |
||||
private String logisticsLineName; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("创建人") |
||||
private String createdUser; |
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("创建时间") |
||||
private Date createdTime; |
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("更新人") |
||||
private String updatedUser; |
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("更新时间") |
||||
private Date updatedTime; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Integer isDeleted; |
||||
/** |
||||
* 创建部门 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("创建部门") |
||||
private Integer createdDept; |
||||
|
||||
} |
@ -0,0 +1,29 @@
|
||||
package com.logpm.factory.snm.wrapper; |
||||
|
||||
import com.logpm.factory.snm.entity.StationlinenumEntity; |
||||
import com.logpm.factory.snm.vo.StationlinenumVO; |
||||
import org.springblade.common.constant.LogpmDataStatusEnum; |
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.system.enums.DictEnum; |
||||
import org.springblade.system.feign.IDictBizClient; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 对象转换 |
||||
*/ |
||||
@Component |
||||
public class StationlinenumWrapper extends BaseEntityWrapper<StationlinenumEntity, StationlinenumVO> { |
||||
|
||||
public static StationlinenumWrapper build() { |
||||
return new StationlinenumWrapper(); |
||||
} |
||||
@Override |
||||
public StationlinenumVO entityVO(StationlinenumEntity entity) { |
||||
StationlinenumVO stationlinenumVO = Objects.requireNonNull(BeanUtil.copy(entity, StationlinenumVO.class)); |
||||
stationlinenumVO.setStatusName(LogpmDataStatusEnum.valueOf(entity.getStatus()).getName()); |
||||
return stationlinenumVO; |
||||
} |
||||
} |
Loading…
Reference in new issue