7 changed files with 259 additions and 26 deletions
@ -0,0 +1,70 @@ |
|||
package org.dromara.platform.converter; |
|||
|
|||
import com.alibaba.excel.converters.Converter; |
|||
import com.alibaba.excel.metadata.GlobalConfiguration; |
|||
import com.alibaba.excel.metadata.data.WriteCellData; |
|||
import com.alibaba.excel.metadata.property.ExcelContentProperty; |
|||
|
|||
/** |
|||
* 用户信息,性别,转换器。 |
|||
* |
|||
* @author 张德龙 |
|||
*/ |
|||
public class WorkOrderStatusConverter implements Converter<Long> { |
|||
/** |
|||
* Convert Java objects to excel objects |
|||
* |
|||
* @param value Java Data.NotNull. |
|||
* @param contentProperty Content property.Nullable. |
|||
* @param globalConfiguration Global configuration.NotNull. |
|||
* @return Data to put into a Excel |
|||
* * 当前状态 |
|||
* * 0 待派遣 |
|||
* * 1 待接单 |
|||
* * 2 处理中 |
|||
* * 3 运维单位处理时回退至派遣 |
|||
* * 4 初审 |
|||
* * 5 终审 |
|||
* * 6 结案 |
|||
* * 7 处理中(已延期) |
|||
* * 8 作废 |
|||
* * 9 待接单(派遣) |
|||
* * 10 待接单(转派) |
|||
*/ |
|||
@Override |
|||
public WriteCellData<?> convertToExcelData(Long value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
|||
if (value == null) { |
|||
return new WriteCellData<>("未知"); |
|||
} |
|||
|
|||
long status = value; // 自动拆箱为基本类型 long
|
|||
|
|||
switch ((int) status) { // 可以安全地转为 int
|
|||
case 0: |
|||
return new WriteCellData<>("待派遣"); |
|||
case 1: |
|||
return new WriteCellData<>("待接单"); |
|||
case 2: |
|||
return new WriteCellData<>("处理中"); |
|||
case 3: |
|||
return new WriteCellData<>("运维单位处理时回退至派遣"); |
|||
case 4: |
|||
return new WriteCellData<>("初审"); |
|||
case 5: |
|||
return new WriteCellData<>("终审"); |
|||
case 6: |
|||
return new WriteCellData<>("结案"); |
|||
case 7: |
|||
return new WriteCellData<>("处理中(已延期)"); |
|||
case 8: |
|||
return new WriteCellData<>("作废"); |
|||
case 9: |
|||
return new WriteCellData<>("待接单(派遣)"); |
|||
case 10: |
|||
return new WriteCellData<>("待接单(转派)"); |
|||
default: |
|||
return new WriteCellData<>("未知"); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
package org.dromara.platform.domain.dto; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import lombok.Data; |
|||
import org.dromara.platform.domain.Attachment; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 工单信息视图对象 work_order_info |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-27 |
|||
*/ |
|||
@Data |
|||
public class WorkOrderInfoDto implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 工单ID |
|||
*/ |
|||
@ExcelProperty(value = "工单ID") |
|||
private String id; |
|||
|
|||
|
|||
/** |
|||
* 当前状态 |
|||
* 0 待派遣 |
|||
* 1 待接单 |
|||
* 2 处理中 |
|||
* 3 运维单位处理时回退至派遣 |
|||
* 4 初审 |
|||
* 5 终审 |
|||
* 6 结案 |
|||
* 7 处理中(已延期) |
|||
* 8 作废 |
|||
* 9 待接单(派遣) |
|||
* 10 待接单(转派) |
|||
*/ |
|||
@ExcelProperty(value = "当前状态") |
|||
private Long status; |
|||
|
|||
|
|||
/** |
|||
* 剩余接单时间 |
|||
*/ |
|||
private String orderAcceptDeadline; |
|||
|
|||
@ExcelProperty(value = "延期理由") |
|||
private String delayReason; |
|||
|
|||
/** |
|||
* 延期时间 |
|||
*/ |
|||
@ExcelProperty(value = "延期时间") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date delayTime; |
|||
|
|||
|
|||
@ExcelProperty(value = "是否延期") |
|||
private String isDelay; |
|||
|
|||
@ExcelProperty(value = "是否超期") |
|||
private String isTimeOut; |
|||
|
|||
|
|||
@ExcelProperty(value = "响应是否超期") |
|||
private String isHandleOverTime; |
|||
|
|||
@ExcelProperty(value = "接单是否超期") |
|||
private String isOrderTakingOverTime; |
|||
|
|||
@ExcelProperty(value = "响应超时(单位:小时)") |
|||
private int handleTimeOutCount; |
|||
|
|||
@ExcelProperty(value = "接单超时(单位:小时)") |
|||
private int orderAcceptTimeOutCount; |
|||
|
|||
@ExcelProperty(value = "响应超期扣款") |
|||
private Double handleCost; |
|||
|
|||
@ExcelProperty(value = "接单超期扣款") |
|||
private Double orderTakingCost; |
|||
|
|||
@ExcelProperty(value = "总扣款") |
|||
private Double totalCost; |
|||
} |
Loading…
Reference in new issue