Commit 4686169c authored by 王晓倩's avatar 王晓倩

反馈列表添加设备类型、设备名称

parent 4e8e021e
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 工单反馈信息对象 t_order_feedback
*
* @author zehong
* @date 2021-07-19
*/
public class OrderFeedbackVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 工单反馈id */
private int feedbackId;
/** 工单id */
private String orderId;
/** 设备编号 */
private String deviceCode;
/** 设备名称 */
private String deviceName;
/** 设备类型 */
private String deviceType;
/** 反馈内容 */
private String contents;
/** 反馈时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date feedbackTime;
/** 是否存在隐患(1是,2否) */
private String isHiddenDanger;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
private String dealStatus;
/** 图片地址1 */
private String pictureUrl1;
/** 图片地址2 */
private String pictureUrl2;
/** 图片地址3 */
private String pictureUrl3;
/** 备注 */
private String remarks;
public void setFeedbackId(int feedbackId)
{
this.feedbackId = feedbackId;
}
public int getFeedbackId()
{
return feedbackId;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setDeviceCode(String deviceCode)
{
this.deviceCode = deviceCode;
}
public String getDeviceCode()
{
return deviceCode;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public void setContents(String contents)
{
this.contents = contents;
}
public String getContents()
{
return contents;
}
public void setFeedbackTime(Date feedbackTime)
{
this.feedbackTime = feedbackTime;
}
public Date getFeedbackTime()
{
return feedbackTime;
}
public void setIsHiddenDanger(String isHiddenDanger)
{
this.isHiddenDanger = isHiddenDanger;
}
public String getIsHiddenDanger()
{
return isHiddenDanger;
}
public void setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
}
public String getDealStatus()
{
return dealStatus;
}
public void setPictureUrl1(String pictureUrl1)
{
this.pictureUrl1 = pictureUrl1;
}
public String getPictureUrl1()
{
return pictureUrl1;
}
public void setPictureUrl2(String pictureUrl2)
{
this.pictureUrl2 = pictureUrl2;
}
public String getPictureUrl2()
{
return pictureUrl2;
}
public void setPictureUrl3(String pictureUrl3)
{
this.pictureUrl3 = pictureUrl3;
}
public String getPictureUrl3()
{
return pictureUrl3;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("feedbackId", getFeedbackId())
.append("orderId", getOrderId())
.append("deviceId", getDeviceCode())
.append("contents", getContents())
.append("feedbackTime", getFeedbackTime())
.append("isHiddenDanger", getIsHiddenDanger())
.append("dealStatus", getDealStatus())
.append("pictureUrl1", getPictureUrl1())
.append("pictureUrl2", getPictureUrl2())
.append("pictureUrl3", getPictureUrl3())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TOrderFeedback;
......@@ -44,7 +43,7 @@ public class WorkOrderVo extends BaseEntity
private List<TDeviceInfo> deviceInfoList;
/** 反馈信息列表 */
private List<TOrderFeedback> feedbackList;
private List<OrderFeedbackVo> feedbackList;
/** 设备数量 */
private int deviceNum;
......@@ -157,11 +156,11 @@ public class WorkOrderVo extends BaseEntity
this.deviceInfoList = deviceInfoList;
}
public List<TOrderFeedback> getFeedbackList() {
public List<OrderFeedbackVo> getFeedbackList() {
return feedbackList;
}
public void setFeedbackList(List<TOrderFeedback> feedbackList) {
public void setFeedbackList(List<OrderFeedbackVo> feedbackList) {
this.feedbackList = feedbackList;
}
......
......@@ -7,6 +7,7 @@ import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.*;
import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.OrderFeedbackVo;
import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.mapper.*;
import org.springframework.beans.BeanUtils;
......@@ -139,8 +140,27 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
workOrderVo.setDeviceInfoList(deviceInfoList);
List<TOrderFeedback> feedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tWorkOrder.getOrderId());
if(feedbackList.size() != 0) {
workOrderVo.setFeedbackList(feedbackList);
List<OrderFeedbackVo> feedbackVoList = new ArrayList<>();
OrderFeedbackVo feedbackVo = null;
TDeviceInfo device = null;
for(TOrderFeedback feedback : feedbackList){
if(feedback != null) {
BeanUtils.copyProperties(feedback, feedbackVo);
}
device = tDeviceInfoMapper.selectTDeviceInfoByCode(feedback.getDeviceCode());
if(device != null){
feedbackVo.setDeviceName(device.getDeviceName());
feedbackVo.setDeviceType(device.getDeviceType());
}
if(feedbackVo != null){
feedbackVoList.add(feedbackVo);
}
}
if(feedbackVoList.size() != 0) {
workOrderVo.setFeedbackList(feedbackVoList);
}
return workOrderVo;
......
......@@ -352,6 +352,8 @@
this.form.pictureUrl3 = null;
this.form.contents = null;
this.form.remarks = null;
this.fileList = [];
this.fileIndex = 0;
this.open = true;
this.title = "工单反馈";
});
......
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