1455 GFGD-202604210008,工单里带出的服务代理商公司不对,目前带出了资产的代理商,应该得带出资产的服务代理商才对。带出的区域辽宁也不对。
This commit is contained in:
parent
3d3e429cf9
commit
8193f0021f
|
|
@ -342,11 +342,13 @@ public class TicketController extends ControllerBase {
|
|||
if (Objects.nonNull(part)) {
|
||||
vo.setComponent(part.getPartName());
|
||||
}
|
||||
vo.setPrimaryUserName(companyName);
|
||||
} else {
|
||||
GongfuDevicePart part = part1Service.getByIdAndLanguage(ticket.getComponentId(), MultilingualUtil.getLanguage());
|
||||
if (Objects.nonNull(part)) {
|
||||
vo.setComponent(part.getPartName());
|
||||
}
|
||||
vo.setPrimaryUserName(ticket.getAgencyCompanyName());
|
||||
}
|
||||
vo.setCanReopen((StrUtil.equals(ticket.getUserPlatform(), AppUserUtil.getFrom()) && Objects.equals(ticket.getUserId(), AppUserUtil.getUserId()))
|
||||
&& Objects.equals(ticket.getState(), TicketState.ProcessingCompleted.getState())
|
||||
|
|
|
|||
|
|
@ -153,4 +153,14 @@ public class TicketDTO {
|
|||
* 产量
|
||||
*/
|
||||
private String throughput;
|
||||
|
||||
/**
|
||||
* 代理公司编码
|
||||
*/
|
||||
private String agencyCompanyCode;
|
||||
|
||||
/**
|
||||
* 代理公司名称
|
||||
*/
|
||||
private String agencyCompanyName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ public class AnonymousTicketSearchVO {
|
|||
private String equipmentModel;
|
||||
|
||||
/**
|
||||
* 代理商
|
||||
* 服务代理商
|
||||
*/
|
||||
private String agentName;
|
||||
private String serviceAgentName;
|
||||
|
||||
/**
|
||||
* 客户
|
||||
|
|
|
|||
|
|
@ -65,4 +65,9 @@ public class DeviceInfoVO {
|
|||
* 产品线
|
||||
*/
|
||||
private String productLine;
|
||||
|
||||
private String serviceAgentCode;
|
||||
|
||||
private String serviceAgentName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class DispatchVO {
|
|||
/**
|
||||
* 代理商名称
|
||||
*/
|
||||
private String agentName;
|
||||
private String serviceAgentName;
|
||||
|
||||
/**
|
||||
* 计划开始日期
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.nflg.mobilebroken.common.constant.TicketState;
|
|||
import com.nflg.mobilebroken.common.pojo.ApiResult;
|
||||
import com.nflg.mobilebroken.common.pojo.PageData;
|
||||
import com.nflg.mobilebroken.common.pojo.request.*;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.DispatchVO;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.FileUploadVO;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.GongfuFileVO;
|
||||
|
|
@ -79,6 +80,8 @@ public class DispatchController extends ControllerBase {
|
|||
@Resource
|
||||
private IDictionaryItemService dictionaryItemService;
|
||||
|
||||
@Resource
|
||||
private IGongfuDeviceService deviceService;
|
||||
/**
|
||||
* 新增派工单
|
||||
*/
|
||||
|
|
@ -86,6 +89,7 @@ public class DispatchController extends ControllerBase {
|
|||
public ApiResult<Void> add(@Valid @RequestBody DispatchAddRequest request) {
|
||||
VUtils.trueThrowBusinessError(!Objects.equals(request.getType(), 4) && StrUtil.isBlank(request.getDeviceNo()))
|
||||
.throwMessage("机台编号需必填");
|
||||
DeviceInfoVO device = deviceService.getByDeviceNo(request.getDeviceNo());
|
||||
GongfuDispatch dispatch = new GongfuDispatch()
|
||||
.setTitle(request.getTitle())
|
||||
.setType(request.getType())
|
||||
|
|
@ -103,7 +107,9 @@ public class DispatchController extends ControllerBase {
|
|||
.setCreateById(AdminUserUtil.getUserId())
|
||||
.setCreateBy(AdminUserUtil.getUserName())
|
||||
.setCreateTime(LocalDateTime.now())
|
||||
.setCode(genCode(dispatchService.getMaxCode()));
|
||||
.setCode(genCode(dispatchService.getMaxCode()))
|
||||
.setAgencyCompanyCode(device.getServiceAgentCode())
|
||||
.setAgencyCompanyName(device.getServiceAgentName());
|
||||
if (Objects.nonNull(request.getActualStartDate())) {
|
||||
dispatch.setActualStartDate(DateTimeUtil.format(request.getActualStartDate(), "yyyy-MM-dd"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nflg.mobilebroken.gongfu.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
|
|
@ -18,6 +19,8 @@ import com.nflg.mobilebroken.common.pojo.request.*;
|
|||
import com.nflg.mobilebroken.common.pojo.vo.*;
|
||||
import com.nflg.mobilebroken.common.util.*;
|
||||
import com.nflg.mobilebroken.gongfu.annotation.ApiMark;
|
||||
import com.nflg.mobilebroken.gongfu.pojo.vo.GongfuTicketReportVO;
|
||||
import com.nflg.mobilebroken.gongfu.pojo.vo.GongfuTicketVO;
|
||||
import com.nflg.mobilebroken.gongfu.pojo.vo.SolutionImageVO;
|
||||
import com.nflg.mobilebroken.gongfu.publisher.TicketEventPublisher;
|
||||
import com.nflg.mobilebroken.gongfu.service.ShengWangService;
|
||||
|
|
@ -29,6 +32,7 @@ import com.nflg.mobilebroken.starter.service.UniPushService;
|
|||
import com.nflg.mobilebroken.starter.service.impl.AliYunTranslate;
|
||||
import com.nflg.mobilebroken.starter.service.impl.DeepSeekTranslate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.RegionUtil;
|
||||
|
|
@ -299,14 +303,14 @@ public class TicketController extends ControllerBase {
|
|||
return ApiResult.success(partService.getSimpleList(name));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 获取所有设备代理商
|
||||
// * @return 代理商列表
|
||||
// */
|
||||
// @GetMapping("getDeviceAgents")
|
||||
// public ApiResult<List<DeviceAgentVO>> getDeviceAgents() {
|
||||
// return ApiResult.success(deviceService.getAgents());
|
||||
// }
|
||||
/**
|
||||
* 获取所有设备服务代理商
|
||||
* @return 代理商列表
|
||||
*/
|
||||
@GetMapping("getDeviceAgents")
|
||||
public ApiResult<List<DeviceAgentVO>> getDeviceAgents() {
|
||||
return ApiResult.success(deviceService.getAgents());
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索工单
|
||||
|
|
@ -409,7 +413,8 @@ public class TicketController extends ControllerBase {
|
|||
public void exportSearchTicket(HttpServletResponse response, @Valid @RequestBody AdminTicketSearchRequest request) throws IOException {
|
||||
request.setPageSize(Integer.MAX_VALUE);
|
||||
List<AdminTicketVO> datas = ticketService.exportSearch(request);
|
||||
EecExcelUtil.export("工单", "sheet1", datas, response);
|
||||
List<GongfuTicketVO> vos = BeanUtil.copyToList(datas, GongfuTicketVO.class);
|
||||
EecExcelUtil.export("工单", "sheet1", vos, response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -748,7 +753,7 @@ public class TicketController extends ControllerBase {
|
|||
.setUrgency(ticket.getUrgency())
|
||||
.setSolveTime(ticket.getSolveTime())
|
||||
.setDeviceTypeSub(device.getDeviceTypeSub())
|
||||
.setPrimaryUserName(device.getAgentName())
|
||||
.setPrimaryUserName(ticket.getAgencyCompanyName())
|
||||
.setImages(getFileVOs(ticket.getImages()))
|
||||
.setAttachments(getFileVOs(ticket.getAttachments()))
|
||||
.setCreateUserId(ticket.getUserId())
|
||||
|
|
@ -1060,7 +1065,7 @@ public class TicketController extends ControllerBase {
|
|||
public void exportTicketReport(HttpServletResponse response, @Valid @RequestBody AdminTicketSearchRequest request) throws IOException {
|
||||
request.setPageSize(Integer.MAX_VALUE);
|
||||
List<AdminTicketVO> datas = ticketService.exportSearch(request);
|
||||
EecExcelUtil.export("工单报表", "sheet1", Convert.toList(AdminTicketReportVO.class, datas), response);
|
||||
EecExcelUtil.export("工单报表", "sheet1", Convert.toList(GongfuTicketReportVO.class, datas), response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ public class DispatchDTO {
|
|||
/**
|
||||
* 代理商名称
|
||||
*/
|
||||
@ExcelColumn("代理商名称")
|
||||
private String agentName;
|
||||
@ExcelColumn("服务代理商")
|
||||
private String serviceAgentName;
|
||||
|
||||
/**
|
||||
* 计划开始日期
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
package com.nflg.mobilebroken.gongfu.pojo.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nflg.mobilebroken.common.constant.TicketState;
|
||||
import com.nflg.mobilebroken.common.constant.TicketUrgency;
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
import org.ttzero.excel.annotation.IgnoreExport;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
public class GongfuTicketReportVO {
|
||||
|
||||
//工单编号
|
||||
@ExcelColumn("工单编号")
|
||||
private String no;
|
||||
|
||||
//解决状态
|
||||
@ExcelColumn("解决状态")
|
||||
private String stateDesc;
|
||||
|
||||
//紧急程度
|
||||
@IgnoreExport
|
||||
@JsonIgnore
|
||||
private Byte urgency;
|
||||
|
||||
//紧急程度
|
||||
@ExcelColumn("紧急程度")
|
||||
private String urgencyDesc;
|
||||
|
||||
//设备编号
|
||||
@ExcelColumn("设备编号")
|
||||
private String deviceNo;
|
||||
|
||||
//设备类型
|
||||
@ExcelColumn("设备类型")
|
||||
private String deviceType;
|
||||
|
||||
//使用时长
|
||||
@ExcelColumn("使用时长(小时)")
|
||||
private Integer useTime;
|
||||
|
||||
//代理商
|
||||
@ExcelColumn("服务代理商")
|
||||
private String agentName;
|
||||
|
||||
//客户
|
||||
@ExcelColumn("客户")
|
||||
private String customerName;
|
||||
|
||||
//提交时间
|
||||
@ExcelColumn("提交时间")
|
||||
private LocalDate createTime;
|
||||
|
||||
//根本原因分析
|
||||
@IgnoreExport
|
||||
private String reason;
|
||||
|
||||
//工单状态
|
||||
@JsonIgnore
|
||||
@IgnoreExport
|
||||
private Byte state;
|
||||
|
||||
//处理完成时间
|
||||
@JsonIgnore
|
||||
@IgnoreExport
|
||||
private LocalDateTime completeTime;
|
||||
|
||||
//处理时长
|
||||
@ExcelColumn("处理时长")
|
||||
private Long processingTime;
|
||||
|
||||
public String getUrgencyDesc() {
|
||||
if (Objects.isNull(urgency)) {
|
||||
return "";
|
||||
}
|
||||
return TicketUrgency.findByValue(urgency).getDescription();
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return StrUtil.subWithLength(reason, 0, 10);
|
||||
}
|
||||
|
||||
public String getReason1() {
|
||||
return reason;
|
||||
}
|
||||
//根本原因分析
|
||||
@ExcelColumn("根本原因分析")
|
||||
private String reason1;
|
||||
|
||||
public Long getProcessingTime() {
|
||||
if (TicketState.Processing.getState().compareTo(state)>=0){
|
||||
return ChronoUnit.DAYS.between(createTime,LocalDateTime.now().toLocalDate())+1;
|
||||
}
|
||||
if (TicketState.Closed.getState().compareTo(state)>=0) {
|
||||
return ChronoUnit.DAYS.between(completeTime, LocalDateTime.now()) + 1;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
package com.nflg.mobilebroken.gongfu.pojo.vo;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nflg.mobilebroken.common.constant.TicketAccidentLevel;
|
||||
import com.nflg.mobilebroken.common.constant.TicketState;
|
||||
import com.nflg.mobilebroken.common.constant.TicketUrgency;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.TicketEvaluateVO;
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
import org.ttzero.excel.annotation.IgnoreExport;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
public class GongfuTicketVO {
|
||||
//工单id
|
||||
@IgnoreExport
|
||||
private Long id;
|
||||
|
||||
//工单编号
|
||||
@ExcelColumn("工单编号")
|
||||
private String no;
|
||||
|
||||
//工单标题
|
||||
@ExcelColumn("标题")
|
||||
private String title;
|
||||
|
||||
@ExcelColumn("标题翻译")
|
||||
private String titleTranslate = "";
|
||||
|
||||
//工单状态
|
||||
@JsonIgnore
|
||||
@IgnoreExport
|
||||
private Byte state;
|
||||
|
||||
//解决状态
|
||||
@ExcelColumn("解决状态")
|
||||
private String stateDesc;
|
||||
|
||||
//紧急程度
|
||||
@IgnoreExport
|
||||
@JsonIgnore
|
||||
private Byte urgency;
|
||||
|
||||
//紧急程度
|
||||
@ExcelColumn("紧急程度")
|
||||
private String urgencyDesc;
|
||||
|
||||
//问题部位
|
||||
@ExcelColumn("问题部位")
|
||||
private String component;
|
||||
|
||||
//问题类型
|
||||
@ExcelColumn("问题类型")
|
||||
private String question;
|
||||
|
||||
//根本原因分析
|
||||
@IgnoreExport
|
||||
private String reason;
|
||||
|
||||
public String getReason() {
|
||||
return StrUtil.subWithLength(reason, 0, 10);
|
||||
}
|
||||
|
||||
//根本原因分析
|
||||
@JsonIgnore
|
||||
@ExcelColumn("根本原因分析")
|
||||
private String reason1;
|
||||
|
||||
public String getReason1() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
//代理区域
|
||||
@ExcelColumn("代理区域")
|
||||
private String agentAreaName;
|
||||
|
||||
//区域
|
||||
@ExcelColumn("区域")
|
||||
private String areaName;
|
||||
|
||||
// //代理商名称
|
||||
// @ExcelColumn("代理商")
|
||||
// private String primaryUserName;
|
||||
|
||||
// @JsonIgnore
|
||||
// @IgnoreExport
|
||||
// private String companyId;
|
||||
|
||||
// //客户
|
||||
// @ExcelColumn("客户")
|
||||
// private String companyName;
|
||||
|
||||
//代理商
|
||||
@ExcelColumn("服务代理商")
|
||||
private String agentName;
|
||||
|
||||
//客户
|
||||
@ExcelColumn("客户")
|
||||
private String customerName;
|
||||
|
||||
//设备编号
|
||||
@ExcelColumn("设备编号")
|
||||
private String deviceNo;
|
||||
|
||||
//设备类型
|
||||
@ExcelColumn("设备类型")
|
||||
private String deviceType;
|
||||
|
||||
//设备机型
|
||||
@ExcelColumn("设备机型")
|
||||
private String equipmentModel;
|
||||
|
||||
//发货日期
|
||||
@ExcelColumn("发货日期")
|
||||
private String shipmentDate;
|
||||
|
||||
//使用时长
|
||||
@ExcelColumn("使用时长(小时)")
|
||||
private Integer useTime;
|
||||
|
||||
//质保状态
|
||||
@ExcelColumn("质保状态")
|
||||
private String warrantyStatusDesc;
|
||||
|
||||
//提交时间
|
||||
@ExcelColumn("提交时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
//提交人
|
||||
@ExcelColumn("提交人")
|
||||
private String createBy;
|
||||
|
||||
//所属CQM
|
||||
@ExcelColumn("所属CQM")
|
||||
private String cqms;
|
||||
|
||||
//工单负责人
|
||||
@IgnoreExport
|
||||
private String cqm;
|
||||
|
||||
@ExcelColumn("主要负责人")
|
||||
private String firstHandle;
|
||||
|
||||
public String getFirstHandle() {
|
||||
return CollectionUtil.get(StrUtil.split(handle, ","), 0);
|
||||
}
|
||||
|
||||
//被分配人
|
||||
@ExcelColumn("被分配人")
|
||||
private String handle;
|
||||
|
||||
//当前处理人
|
||||
@IgnoreExport
|
||||
private String currentHandle;
|
||||
|
||||
//处理完成时间
|
||||
@ExcelColumn("处理完成时间")
|
||||
private LocalDateTime completeTime;
|
||||
|
||||
//关闭时间
|
||||
@ExcelColumn("关闭时间")
|
||||
private LocalDateTime closeTime;
|
||||
|
||||
//事故等级,0:一般;1:较严重;2:严重
|
||||
@IgnoreExport
|
||||
private Byte accidentLevel;
|
||||
|
||||
//事故等级
|
||||
@ExcelColumn("事故等级")
|
||||
private String accidentLevelDesc;
|
||||
|
||||
public String getAccidentLevelDesc() {
|
||||
if (Objects.isNull(accidentLevel)) {
|
||||
return "";
|
||||
}
|
||||
return Objects.requireNonNull(TicketAccidentLevel.findByValue(accidentLevel), "无效的事故等级:" + accidentLevel).getDescription();
|
||||
}
|
||||
|
||||
//是否已关注
|
||||
@IgnoreExport
|
||||
private boolean followed;
|
||||
|
||||
@ExcelColumn("关注")
|
||||
private String followedDesc;
|
||||
|
||||
public String getStateDesc() {
|
||||
return Objects.requireNonNull(TicketState.findByValue(state), "无效的状态:" + state).getDescription();
|
||||
}
|
||||
|
||||
public String getUrgencyDesc() {
|
||||
if (Objects.isNull(urgency)) {
|
||||
return "";
|
||||
}
|
||||
return Objects.requireNonNull(TicketUrgency.findByValue(urgency), "无效的紧急程度:" + urgency).getDescription();
|
||||
}
|
||||
|
||||
public String getFollowedDesc() {
|
||||
return followed ? "已关注" : "未关注";
|
||||
}
|
||||
|
||||
//评价
|
||||
@IgnoreExport
|
||||
private TicketEvaluateVO evaluate;
|
||||
|
||||
//处理时长
|
||||
@ExcelColumn("处理时长")
|
||||
private Long processingTime;
|
||||
|
||||
public Long getProcessingTime() {
|
||||
if (TicketState.Processing.getState().compareTo(state) >= 0) {
|
||||
return ChronoUnit.DAYS.between(createTime.toLocalDate(), LocalDateTime.now().toLocalDate()) + 1;
|
||||
}
|
||||
if (TicketState.Closed.getState().compareTo(state) >= 0) {
|
||||
return ChronoUnit.DAYS.between(createTime.toLocalDate(), completeTime.toLocalDate()) + 1;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
@IgnoreExport
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 产量
|
||||
*/
|
||||
private String throughput;
|
||||
}
|
||||
|
|
@ -82,4 +82,15 @@ public class GongfuAnonymousTicket implements Serializable {
|
|||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 代理公司编码
|
||||
*/
|
||||
private String agencyCompanyCode;
|
||||
|
||||
/**
|
||||
* 代理公司名称
|
||||
*/
|
||||
private String agencyCompanyName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,4 +162,15 @@ public class GongfuDispatch implements Serializable {
|
|||
* 最后更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
/**
|
||||
* 代理公司编码
|
||||
*/
|
||||
private String agencyCompanyCode;
|
||||
|
||||
/**
|
||||
* 代理公司名称
|
||||
*/
|
||||
private String agencyCompanyName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,4 +174,14 @@ public class GongfuTicket implements Serializable {
|
|||
*/
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer isDelete;
|
||||
|
||||
/**
|
||||
* 代理公司编码
|
||||
*/
|
||||
private String agencyCompanyCode;
|
||||
|
||||
/**
|
||||
* 代理公司名称
|
||||
*/
|
||||
private String agencyCompanyName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public class GongfuAnonymousTicketServiceImpl extends ServiceImpl<GongfuAnonymou
|
|||
.last("LIMIT 1")
|
||||
.one();
|
||||
String no = lastTicket == null ? TicketUtil.getNextNo("GFGD", null) : TicketUtil.getNextNo("GFGD", lastTicket.getNo());
|
||||
DeviceInfoVO device = deviceService.getByDeviceNo(request.getDeviceNo());
|
||||
GongfuAnonymousTicket ticket = new GongfuAnonymousTicket()
|
||||
.setNo(no)
|
||||
.setDeviceNo(request.getDeviceNo())
|
||||
|
|
@ -72,7 +73,9 @@ public class GongfuAnonymousTicketServiceImpl extends ServiceImpl<GongfuAnonymou
|
|||
.setDescription(request.getDescription())
|
||||
.setPhone(request.getPhone())
|
||||
.setEmail(request.getEmail())
|
||||
.setCreateTime(LocalDateTime.now());
|
||||
.setCreateTime(LocalDateTime.now())
|
||||
.setAgencyCompanyCode(device.getServiceAgentCode())
|
||||
.setAgencyCompanyName(device.getServiceAgentName());
|
||||
save(ticket);
|
||||
List<FileUploadRecord> imagesRecords = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(request.getImages())) {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public class GongfuTicketServiceImpl extends ServiceImpl<GongfuTicketMapper, Gon
|
|||
@Resource
|
||||
private IAppMessageService appMessageService;
|
||||
|
||||
@Resource
|
||||
private IDeviceService deviceService;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public GongfuTicket add(TicketAddRequest request, Integer userId) {
|
||||
|
|
@ -102,6 +105,11 @@ public class GongfuTicketServiceImpl extends ServiceImpl<GongfuTicketMapper, Gon
|
|||
ticket.setState(TicketState.Processing.getState());
|
||||
}
|
||||
ticket.setCustomerName(AppUserUtil.getCustomerName());
|
||||
|
||||
DeviceInfoVO device = deviceService.getByDeviceNo(ticket.getDeviceNo());
|
||||
ticket.setAgencyCompanyCode(device.getAgentCode());
|
||||
ticket.setAgencyCompanyName(device.getAgentName());
|
||||
|
||||
save(ticket);
|
||||
// Collection<String> files=CollectionUtil.addAll(request.getImages(),request.getAttachments());
|
||||
List<FileUploadRecord> imagesRecords = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@
|
|||
<mapper namespace="com.nflg.mobilebroken.repository.mapper.GongfuAnonymousTicketMapper">
|
||||
|
||||
<select id="search" resultType="com.nflg.mobilebroken.common.pojo.vo.AnonymousTicketSearchVO">
|
||||
SELECT t.id,t.`no`,t.title,p.part_name AS 'component',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
SELECT t.id,t.`no`,t.title,p.part_name AS 'component',d.customer_name AS 'customerName',t.agency_company_name AS 'serviceAgentName'
|
||||
,t.device_no AS 'deviceNo',t.use_time AS 'useTime',t.create_time AS 'createTime',di.name AS 'warrantyStatusDesc'
|
||||
,d.device_type AS 'deviceType',d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',t.phone,t.email
|
||||
,t.description,c.area_name
|
||||
FROM gongfu_anonymous_ticket t
|
||||
LEFT JOIN gongfu_device d ON t.device_no=d.device_no
|
||||
LEFT JOIN gongfu_device_type dt ON d.device_type=dt.device_type
|
||||
LEFT JOIN gongfu_device d ON t.device_no=d.device_no and d.data_valid_state = 1
|
||||
LEFT JOIN dictionary_item di ON d.warranty_state=di.id
|
||||
LEFT JOIN gongfu_device_part p ON t.component_id=p.id
|
||||
LEFT JOIN t_base_customer c ON c.agency_company_code=d.service_agent_code
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.nflg.mobilebroken.repository.mapper.GongfuDispatchMapper">
|
||||
|
||||
<select id="search" resultType="com.nflg.mobilebroken.common.pojo.vo.DispatchVO">
|
||||
SELECT da.*,dv.customer_name,bc.agency_company_name as agent_name,af.reason as "delayReason",af2.id as
|
||||
SELECT da.*,dv.customer_name,da.agency_company_name as serviceAgentName,af.reason as "delayReason",af2.id as
|
||||
"applyforId",if(da.create_by_id =#{userId} or da.handler_user_id = #{userId},1,0) AS usort,di.name as "typeDesc"
|
||||
FROM gongfu_dispatch da
|
||||
LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
AND t.handle_name LIKE CONCAT('%', #{request.handleUserName}, '%')
|
||||
</if>
|
||||
<if test="request.agentCode!=null and request.agentCode!=''">
|
||||
AND d.agent_code=#{request.agentCode}
|
||||
AND t.agency_company_code=#{request.agentCode}
|
||||
</if>
|
||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||
AND u.is_primary AND FIND_IN_SET(#{request.areaCode},fun_getPrimaryUserAreaCode(u.company_id))>0
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
|
||||
<select id="searchFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,p.part_name AS 'component',t.question,t.reason
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',t.agency_company_name AS 'agentName'
|
||||
,IF(t.user_platform='admin',au.user_name,u.`name`) AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.solve_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
|
||||
<select id="searchAllFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,p.part_name AS 'component',t.question,t.reason
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',t.agency_company_name AS 'agentName'
|
||||
,IF(t.user_platform='admin',au.user_name,u.`name`) AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.solve_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
|
||||
<select id="searchFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,p.part_name AS 'component',t.question,t.reason
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',t.agency_company_name AS 'agentName'
|
||||
,IF(t.user_platform='admin',au.user_name,u.`name`) AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.solve_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
|
||||
<select id="searchAllFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,p.part_name AS 'component',t.question,t.reason
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',t.agency_company_name AS 'agentName'
|
||||
,IF(t.user_platform='admin',au.user_name,u.`name`) AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.solve_time AS 'completeTime',di.name AS 'warrantyStatusDesc',true AS 'followed'
|
||||
,auc.user_name AS 'cqm',t.update_time AS 'closeTime',auh.user_name AS 'currentHandle'
|
||||
|
|
@ -262,7 +262,7 @@
|
|||
|
||||
<select id="searchByFavouritesId" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,p.part_name AS 'component',t.question,t.reason
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',d.agent_name AS 'agentName'
|
||||
,a1.area_name AS 'areaName','' AS 'agentAreaName',d.customer_name AS 'customerName',t.agency_company_name AS 'agentName'
|
||||
,IF(t.user_platform='admin',au.user_name,u.`name`) AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.solve_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
|
|||
Loading…
Reference in New Issue