fix: BUG-706
This commit is contained in:
parent
e2df5c07d0
commit
43f87574d4
|
|
@ -205,6 +205,15 @@ public class TicketController extends ControllerBase {
|
||||||
return ApiResult.success(partService.getSimpleList(name));
|
return ApiResult.success(partService.getSimpleList(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有设备代理商
|
||||||
|
* @return 代理商列表
|
||||||
|
*/
|
||||||
|
@GetMapping("getDeviceAgents")
|
||||||
|
public ApiResult<List<DeviceAgentVO>> getDeviceAgents(){
|
||||||
|
return ApiResult.success(deviceService.getAgents());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索工单
|
* 搜索工单
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@ public class AdminTicketSearchRequest extends TicketSearchRequest {
|
||||||
//工单处理人
|
//工单处理人
|
||||||
private String handleUserName;
|
private String handleUserName;
|
||||||
|
|
||||||
//代理商id
|
|
||||||
private Integer companyId;
|
|
||||||
|
|
||||||
//问题类型
|
//问题类型
|
||||||
private String question;
|
private String question;
|
||||||
|
|
||||||
|
|
@ -35,4 +32,7 @@ public class AdminTicketSearchRequest extends TicketSearchRequest {
|
||||||
|
|
||||||
//区域编码
|
//区域编码
|
||||||
private String areaCode;
|
private String areaCode;
|
||||||
|
|
||||||
|
//代理商编码
|
||||||
|
private String agentCode;
|
||||||
}
|
}
|
||||||
|
|
@ -63,17 +63,25 @@ public class AdminTicketVO {
|
||||||
@ExcelColumn("区域")
|
@ExcelColumn("区域")
|
||||||
private String areaName;
|
private String areaName;
|
||||||
|
|
||||||
//代理商名称
|
// //代理商名称
|
||||||
@ExcelColumn("代理商")
|
// @ExcelColumn("代理商")
|
||||||
private String primaryUserName;
|
// private String primaryUserName;
|
||||||
|
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@IgnoreExport
|
// @IgnoreExport
|
||||||
private String companyId;
|
// private String companyId;
|
||||||
|
|
||||||
|
// //客户
|
||||||
|
// @ExcelColumn("客户")
|
||||||
|
// private String companyName;
|
||||||
|
|
||||||
|
//代理商
|
||||||
|
@ExcelColumn("代理商")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
//客户
|
//客户
|
||||||
@ExcelColumn("客户")
|
@ExcelColumn("客户")
|
||||||
private String companyName;
|
private String customerName;
|
||||||
|
|
||||||
//设备编号
|
//设备编号
|
||||||
@ExcelColumn("设备编号")
|
@ExcelColumn("设备编号")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.nflg.mobilebroken.common.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeviceAgentVO {
|
||||||
|
|
||||||
|
//代理编码
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
//代理名称
|
||||||
|
private String agentName;
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
||||||
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.ComponentInfo;
|
import com.nflg.mobilebroken.common.pojo.vo.ComponentInfo;
|
||||||
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceAgentVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
||||||
import com.nflg.mobilebroken.repository.entity.Device;
|
import com.nflg.mobilebroken.repository.entity.Device;
|
||||||
|
|
@ -43,4 +44,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
||||||
void taskWarrantyStateNotOutsideWithinWarranty();
|
void taskWarrantyStateNotOutsideWithinWarranty();
|
||||||
|
|
||||||
List<ComponentInfo> getComponents(Integer componentId,String language);
|
List<ComponentInfo> getComponents(Integer componentId,String language);
|
||||||
|
|
||||||
|
List<DeviceAgentVO> getAgents();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
||||||
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
||||||
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceAgentVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
||||||
import com.nflg.mobilebroken.repository.entity.Device;
|
import com.nflg.mobilebroken.repository.entity.Device;
|
||||||
|
|
@ -35,4 +36,6 @@ public interface IDeviceService extends IService<Device> {
|
||||||
void taskWarrantyStateNotOutsideWarranty();
|
void taskWarrantyStateNotOutsideWarranty();
|
||||||
|
|
||||||
void taskWarrantyStateNotOutsideWithinWarranty();
|
void taskWarrantyStateNotOutsideWithinWarranty();
|
||||||
|
|
||||||
|
List<DeviceAgentVO> getAgents();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
||||||
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
import com.nflg.mobilebroken.common.pojo.request.SearchDeviceRequest;
|
||||||
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceAgentVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO;
|
||||||
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
import com.nflg.mobilebroken.common.pojo.vo.DeviceVO;
|
||||||
import com.nflg.mobilebroken.common.util.AppUserUtil;
|
import com.nflg.mobilebroken.common.util.AppUserUtil;
|
||||||
|
|
@ -69,4 +70,9 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||||
public void taskWarrantyStateNotOutsideWithinWarranty(){
|
public void taskWarrantyStateNotOutsideWithinWarranty(){
|
||||||
baseMapper.taskWarrantyStateNotOutsideWithinWarranty();
|
baseMapper.taskWarrantyStateNotOutsideWithinWarranty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceAgentVO> getAgents() {
|
||||||
|
return baseMapper.getAgents();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,4 +97,10 @@
|
||||||
LEFT JOIN t_base_language_data ld ON dcd.model_part_id = ld.source_id
|
LEFT JOIN t_base_language_data ld ON dcd.model_part_id = ld.source_id
|
||||||
WHERE p.enable=1 AND dcd.device_component_id=#{componentId} AND ld.language_code=#{language}
|
WHERE p.enable=1 AND dcd.device_component_id=#{componentId} AND ld.language_code=#{language}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getAgents" resultType="com.nflg.mobilebroken.common.pojo.vo.DeviceAgentVO">
|
||||||
|
SELECT DISTINCT agent_code,agent_name
|
||||||
|
FROM device
|
||||||
|
WHERE LENGTH(agent_code)>0
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
<if test="request.handleUserName!=null and request.handleUserName!=''">
|
<if test="request.handleUserName!=null and request.handleUserName!=''">
|
||||||
AND t.handle_name LIKE CONCAT('%', #{request.handleUserName}, '%')
|
AND t.handle_name LIKE CONCAT('%', #{request.handleUserName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="request.companyId!=null">
|
<if test="request.agentCode!=null and request.agentCode!=''">
|
||||||
AND u.company_id=#{request.companyId}
|
AND d.agent_code=#{request.agentCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||||
AND FIND_IN_SET(#{request.areaCode},c.area_code)>0
|
AND FIND_IN_SET(#{request.areaCode},c.area_code)>0
|
||||||
|
|
@ -118,10 +118,10 @@
|
||||||
<select id="searchFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
<select id="searchFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
||||||
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
||||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
,d.customer_name AS 'customerName',d.agent_name AS 'agentName',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||||
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
,t.create_time AS 'createTime',t.update_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',auc.user_name AS 'cqm'
|
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed',auc.user_name AS 'cqm'
|
||||||
,t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
,t.solve_time AS 'closeTime',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
||||||
,t.handle_name AS 'handle'
|
,t.handle_name AS 'handle'
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN app_user u ON t.user_id=u.id
|
LEFT JOIN app_user u ON t.user_id=u.id
|
||||||
|
|
@ -149,10 +149,10 @@
|
||||||
<select id="searchAllFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
<select id="searchAllFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
||||||
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
||||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
,d.customer_name AS 'customerName',d.agent_name AS 'agentName',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||||
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
,t.create_time AS 'createTime',t.update_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',auc.user_name AS 'cqm'
|
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed',auc.user_name AS 'cqm'
|
||||||
,t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
,t.solve_time AS 'closeTime',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
||||||
,t.handle_name AS 'handle'
|
,t.handle_name AS 'handle'
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN app_user u ON t.user_id=u.id
|
LEFT JOIN app_user u ON t.user_id=u.id
|
||||||
|
|
@ -171,10 +171,10 @@
|
||||||
<select id="searchFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
<select id="searchFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
||||||
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
||||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
,d.customer_name AS 'customerName',d.agent_name AS 'agentName',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||||
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
,t.create_time AS 'createTime',t.update_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'
|
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||||
,t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
,t.solve_time AS 'closeTime',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
||||||
,t.handle_name AS 'handle'
|
,t.handle_name AS 'handle'
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN app_user u ON t.user_id=u.id
|
LEFT JOIN app_user u ON t.user_id=u.id
|
||||||
|
|
@ -193,9 +193,9 @@
|
||||||
<select id="searchAllFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
<select id="searchAllFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
||||||
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
||||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
,d.customer_name AS 'customerName',d.agent_name AS 'agentName',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||||
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',true AS 'followed'
|
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',true AS 'followed'
|
||||||
,auc.user_name AS 'cqm',t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle'
|
,auc.user_name AS 'cqm',t.solve_time AS 'closeTime',auh.user_name AS 'currentHandle'
|
||||||
,dt.cqm_person_name AS 'cqms',t.handle_name AS 'handle'
|
,dt.cqm_person_name AS 'cqms',t.handle_name AS 'handle'
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN app_user u ON t.user_id=u.id
|
LEFT JOIN app_user u ON t.user_id=u.id
|
||||||
|
|
@ -224,10 +224,10 @@
|
||||||
<select id="searchByFavouritesId" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
<select id="searchByFavouritesId" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution
|
||||||
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),'') AS 'areaName',IF(u.is_primary,'',a2.`name`) AS 'agentAreaName'
|
||||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
,d.customer_name AS 'customerName',d.agent_name AS 'agentName',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||||
,t.create_time AS 'createTime',t.update_time AS 'completeTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
,t.create_time AS 'createTime',t.update_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'
|
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||||
,t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
,t.solve_time AS 'closeTime',auh.user_name AS 'currentHandle',dt.cqm_person_name AS 'cqms'
|
||||||
,t.handle_name AS 'handle'
|
,t.handle_name AS 'handle'
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN app_user u ON t.user_id=u.id
|
LEFT JOIN app_user u ON t.user_id=u.id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue