fix: 修复一些问题
This commit is contained in:
parent
1a42618421
commit
e2df5c07d0
|
|
@ -89,7 +89,7 @@
|
|||
<dependency>
|
||||
<groupId>org.xhtmlrenderer</groupId>
|
||||
<artifactId>flying-saucer-pdf</artifactId>
|
||||
<version>9.1.22</version>
|
||||
<version>9.3.1</version>
|
||||
</dependency>
|
||||
<!-- iText (required by Flying Saucer) -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -78,9 +78,6 @@ public class TicketController extends ControllerBase {
|
|||
@Resource
|
||||
private IAppAreaService appAreaService;
|
||||
|
||||
@Resource
|
||||
private ITBaseAreaService adminAreaService;
|
||||
|
||||
@Resource
|
||||
private IDictionaryItemService dictionaryItemService;
|
||||
|
||||
|
|
@ -99,6 +96,9 @@ public class TicketController extends ControllerBase {
|
|||
@Resource
|
||||
private ITicketFavoritesService ticketFavoritesService;
|
||||
|
||||
@Resource
|
||||
private ITBasePartService partService;
|
||||
|
||||
/**
|
||||
* 获取问题类型
|
||||
* @return 问题类型列表
|
||||
|
|
@ -195,6 +195,16 @@ public class TicketController extends ControllerBase {
|
|||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有设备部件
|
||||
* @param name 部件名称,模糊查询
|
||||
* @return 部件列表
|
||||
*/
|
||||
@GetMapping("getDeviceComponents")
|
||||
public ApiResult<List<String>> getDeviceComponents(@RequestParam String name){
|
||||
return ApiResult.success(partService.getSimpleList(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索工单
|
||||
* @param request 请求参数
|
||||
|
|
@ -427,9 +437,9 @@ public class TicketController extends ControllerBase {
|
|||
if (StrUtil.isNotBlank(ticket.getAttachments())) {
|
||||
StrUtil.split(ticket.getAttachments(), ",").forEach(item -> {
|
||||
if (item.endsWith(".jpg") || item.endsWith(".png") || item.endsWith(".jpeg")) {
|
||||
images.add(new FileInfo(item.substring(item.lastIndexOf("/")+1),item));
|
||||
images.add(new FileInfo(item.substring(item.lastIndexOf("/")+1),urlEncode(item)));
|
||||
} else {
|
||||
files.add(new FileInfo(item.substring(item.lastIndexOf("/")+1),item));
|
||||
files.add(new FileInfo(item.substring(item.lastIndexOf("/")+1),urlEncode(item)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -438,6 +448,24 @@ public class TicketController extends ControllerBase {
|
|||
images.add(new FileInfo(item.substring(item.lastIndexOf("/")+1),item));
|
||||
});
|
||||
}
|
||||
//加上聊天中的图片和文件
|
||||
List<ChatMessageVO> messageVOS=ticketChatService.getMessages(ticket.getId());
|
||||
messageVOS.forEach(messageVO -> {
|
||||
if (CollectionUtil.isNotEmpty(messageVO.getImages())){
|
||||
messageVO.getImages().forEach(image -> {
|
||||
images.add(new FileInfo(image.substring(image.lastIndexOf("/")+1),image));
|
||||
});
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(messageVO.getAttachments())){
|
||||
messageVO.getAttachments().forEach(attachment -> {
|
||||
if (attachment.endsWith(".jpg") || attachment.endsWith(".png") || attachment.endsWith(".jpeg")) {
|
||||
images.add(new FileInfo(attachment.substring(attachment.lastIndexOf("/")+1),urlEncode(attachment)));
|
||||
} else {
|
||||
files.add(new FileInfo(attachment.substring(attachment.lastIndexOf("/")+1),urlEncode(attachment)));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
TicketPdfVO vo = new TicketPdfVO()
|
||||
.setNo(ticket.getNo())
|
||||
.setTitle(ticket.getTitle())
|
||||
|
|
@ -489,7 +517,7 @@ public class TicketController extends ControllerBase {
|
|||
// renderer.layout();
|
||||
// renderer.createPDF(response.getOutputStream());
|
||||
ITextRenderer renderer = new ITextRenderer();
|
||||
BaseFont baseFont = BaseFont.createFont("fonts/simsun.ttc,0", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
||||
// BaseFont baseFont = BaseFont.createFont("fonts/simsun.ttc,0", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
||||
renderer.getFontResolver().addFont("fonts/simsun.ttc", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
|
||||
renderer.setDocumentFromString(html);
|
||||
renderer.layout();
|
||||
|
|
@ -503,6 +531,13 @@ public class TicketController extends ControllerBase {
|
|||
}
|
||||
}
|
||||
|
||||
private String urlEncode(String url){
|
||||
int index = url.lastIndexOf("/");
|
||||
String pre= url.substring(0,index+1);
|
||||
String end = url.substring(index+1);
|
||||
return pre+URLEncoder.encode(end, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单详情
|
||||
* @param id 工单编号
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div th:each="file:${ticket.files}">
|
||||
<a th:href="${file.url}" th:text="${file.name}"></a>
|
||||
<div>
|
||||
<a th:each="file:${ticket.files}" th:href="${file.url}" th:text="${file.name}"></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div style="background-color: red;" th:each="file:${ticket.images}">
|
||||
<div th:each="file:${ticket.images}">
|
||||
<img class="cimg" alt="" th:src="${file.url}"/>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ public class TiketController extends ControllerBase {
|
|||
@GetMapping("getTicket")
|
||||
public ApiResult<TicketInfoVO> getTicket(@Valid @RequestParam @NotNull Integer id) {
|
||||
Ticket ticket = ticketService.getById(id);
|
||||
VUtils.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("未找到工单");
|
||||
AppUser user = appUserService.getById(ticket.getUserId());
|
||||
String areaName;
|
||||
if (user.getIsPrimary()){
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nflg.mobilebroken.cfs.service.WXQRCodeService;
|
||||
import com.nflg.mobilebroken.common.constant.Constant;
|
||||
import com.nflg.mobilebroken.common.constant.MessageSubType;
|
||||
|
|
@ -265,7 +266,16 @@ public class UserController extends ControllerBase {
|
|||
@PostMapping("deleteUser")
|
||||
//@SaUserCheckRole("primary")
|
||||
public ApiResult<Boolean> deleteUser(@Valid @RequestBody @NotEmpty List<Integer> ids){
|
||||
return ApiResult.success(appUserService.removeByIds(ids));
|
||||
appUserService.remove(new LambdaQueryWrapper<AppUser>()
|
||||
.eq(AppUser::getIsPrimary, false)
|
||||
.eq(AppUser::getCreateBy, AppUserUtil.getUserName())
|
||||
.in(AppUser::getId, ids));
|
||||
appUserApplyforService.remove(new LambdaQueryWrapper<AppUserApplyfor>()
|
||||
.eq(AppUserApplyfor::getState, 0)
|
||||
.eq(AppUserApplyfor::getIsPrimary, false)
|
||||
.eq(AppUserApplyfor::getCreateBy, AppUserUtil.getUserId())
|
||||
.in(AppUserApplyfor::getId, ids));
|
||||
return ApiResult.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -32,4 +32,7 @@ public class AdminTicketSearchRequest extends TicketSearchRequest {
|
|||
|
||||
//收藏夹id
|
||||
private Integer favouritesId;
|
||||
|
||||
//区域编码
|
||||
private String areaCode;
|
||||
}
|
||||
|
|
@ -55,7 +55,11 @@ public class AdminTicketVO {
|
|||
@ExcelColumn("解决方案")
|
||||
private String solution;
|
||||
|
||||
//区域名称
|
||||
//代理区域
|
||||
@ExcelColumn("代理区域")
|
||||
private String agentAreaName;
|
||||
|
||||
//区域
|
||||
@ExcelColumn("区域")
|
||||
private String areaName;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ public class FileVO {
|
|||
public String getSourceDesc() {
|
||||
if (source == 0) {
|
||||
return "工单";
|
||||
}else if (source==1){
|
||||
return "代理商";
|
||||
}else if (source==2){
|
||||
return "账号";
|
||||
}
|
||||
return "未知";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@ public class AppUserApplyfor implements Serializable {
|
|||
*/
|
||||
private String salesUserName;
|
||||
|
||||
/**
|
||||
* 是否主账号
|
||||
*/
|
||||
private Boolean isPrimary;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nflg.mobilebroken.common.pojo.dto.ExportPartDTO;
|
||||
import com.nflg.mobilebroken.common.pojo.query.PageBaseQuery;
|
||||
import com.nflg.mobilebroken.common.pojo.vo.DepartmentSimpleVO;
|
||||
import com.nflg.mobilebroken.repository.entity.DeviceComponent;
|
||||
import com.nflg.mobilebroken.repository.entity.TBaseDepartment;
|
||||
import com.nflg.mobilebroken.repository.entity.TBasePart;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -25,4 +22,6 @@ public interface ITBasePartService extends IService<TBasePart> {
|
|||
Page<TBasePart> selectListByPage(@Param("query") PageBaseQuery query);
|
||||
|
||||
List<ExportPartDTO> exportPart(@Param("partNo")String partNo, @Param("partName") String partName);
|
||||
|
||||
List<String> getSimpleList(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nflg.mobilebroken.repository.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nflg.mobilebroken.common.pojo.dto.ExportPartDTO;
|
||||
|
|
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -31,4 +33,15 @@ public class TBasePartServiceImpl extends ServiceImpl<TBasePartMapper, TBasePart
|
|||
public List<ExportPartDTO> exportPart(@Param("partNo")String partNo, @Param("partName") String partName){
|
||||
return this.getBaseMapper().exportPart(partNo,partName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSimpleList(String name) {
|
||||
return lambdaQuery()
|
||||
.eq(TBasePart::getEnable, 1)
|
||||
.like(StrUtil.isNotBlank(name),TBasePart::getPartName, name)
|
||||
.list()
|
||||
.stream()
|
||||
.map(TBasePart::getPartName)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@
|
|||
SELECT d.device_no AS 'deviceNo',d.device_name AS 'deviceName',d.model_no AS 'modelNo',d.device_type AS 'deviceType',d.shipment_date AS 'shipmentDate'
|
||||
FROM device d
|
||||
INNER JOIN t_base_customer c ON d.agent_code=c.agency_company_code
|
||||
WHERE d.data_valid_state=1 AND c.id IN
|
||||
INNER JOIN dictionary_item di ON di.id=d.device_state
|
||||
WHERE d.data_valid_state=1 AND di.`code`='Normal' AND c.id IN
|
||||
<foreach collection="companyIds" open="(" close=")" item="companyId" separator=",">
|
||||
#{companyId}
|
||||
</foreach>
|
||||
|
|
@ -94,6 +95,6 @@
|
|||
FROM device_component_detail dcd
|
||||
INNER JOIN t_base_part p ON dcd.model_part_id = p.id
|
||||
LEFT JOIN t_base_language_data ld ON dcd.model_part_id = ld.source_id
|
||||
WHERE 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>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@
|
|||
<if test="request.companyId!=null">
|
||||
AND u.company_id=#{request.companyId}
|
||||
</if>
|
||||
<if test="request.areaId!=null">
|
||||
AND u.area_id=#{request.areaId}
|
||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||
AND FIND_IN_SET(#{request.areaCode},c.area_code)>0
|
||||
</if>
|
||||
<if test="request.question!=null and request.question!=''">
|
||||
AND t.question=#{request.question}
|
||||
|
|
@ -78,11 +78,10 @@
|
|||
</sql>
|
||||
|
||||
<select id="searchMy" resultType="com.nflg.mobilebroken.common.pojo.vo.TicketVO">
|
||||
SELECT t.*,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
SELECT t.*,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),a2.`name`) AS 'areaName',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
,u.`name` AS 'createBy',t.handle
|
||||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
LEFT JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.user_id=#{userId} AND tf.from=0
|
||||
WHERE t.user_id=#{userId} AND t.state!=4
|
||||
|
|
@ -91,10 +90,9 @@
|
|||
</select>
|
||||
|
||||
<select id="searchFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.TicketVO">
|
||||
SELECT t.*,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName',true AS 'followed',u.`name` AS 'createBy',true AS 'followed',t.handle
|
||||
SELECT t.*,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),a2.`name`) AS 'areaName',true AS 'followed',u.`name` AS 'createBy',true AS 'followed',t.handle
|
||||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
INNER JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.from=0
|
||||
WHERE tf.user_id=#{userId} AND t.state!=4
|
||||
|
|
@ -103,11 +101,10 @@
|
|||
</select>
|
||||
|
||||
<select id="searchArea" resultType="com.nflg.mobilebroken.common.pojo.vo.TicketVO">
|
||||
SELECT t.*,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
SELECT t.*,IF(u.is_primary,fun_getPrimaryUserArea(u.company_id),a2.`name`) AS 'areaName',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
,u.`name` AS 'createBy',t.handle
|
||||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
LEFT JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.user_id=#{userId} AND tf.from=0
|
||||
WHERE t.state!=4 AND u.company_id IN
|
||||
|
|
@ -119,7 +116,8 @@
|
|||
</select>
|
||||
|
||||
<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,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName'
|
||||
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'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',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'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
@ -128,7 +126,6 @@
|
|||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_customer c ON u.company_id=c.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
LEFT JOIN device d ON t.device_no=d.device_no AND d.data_valid_state=1
|
||||
LEFT JOIN t_base_device_type dt ON d.device_type=dt.device_type
|
||||
|
|
@ -150,7 +147,8 @@
|
|||
<!-- </select>-->
|
||||
|
||||
<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,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName'
|
||||
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'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',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'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
@ -159,7 +157,6 @@
|
|||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_customer c ON u.company_id=c.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
LEFT JOIN device d ON t.device_no=d.device_no AND d.data_valid_state=1
|
||||
LEFT JOIN t_base_device_type dt ON d.device_type=dt.device_type
|
||||
|
|
@ -172,7 +169,8 @@
|
|||
</select>
|
||||
|
||||
<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,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName'
|
||||
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'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',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'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
@ -181,7 +179,6 @@
|
|||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_customer c ON u.company_id=c.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
INNER JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.user_id=#{userId} AND tf.from=1
|
||||
LEFT JOIN device d ON t.device_no=d.device_no AND d.data_valid_state=1
|
||||
|
|
@ -194,7 +191,8 @@
|
|||
</select>
|
||||
|
||||
<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,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName'
|
||||
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'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',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'
|
||||
,auc.user_name AS 'cqm',t.solve_time AS 'closeTime',u.name AS 'primaryUserName',auh.user_name AS 'currentHandle'
|
||||
|
|
@ -202,7 +200,6 @@
|
|||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_customer c ON u.company_id=c.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
INNER JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.user_id=#{userId} AND tf.from=1
|
||||
LEFT JOIN device d ON t.device_no=d.device_no AND d.data_valid_state=1
|
||||
|
|
@ -225,7 +222,8 @@
|
|||
</select>
|
||||
|
||||
<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,IF(u.is_primary,a1.area_name,a2.`name`) AS 'areaName'
|
||||
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'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',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'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',true AS 'followed',auc.user_name AS 'cqm'
|
||||
|
|
@ -234,7 +232,6 @@
|
|||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
LEFT JOIN t_base_customer c ON u.company_id=c.id
|
||||
LEFT JOIN t_base_area a1 ON u.area_id=a1.id
|
||||
LEFT JOIN app_area a2 ON u.area_id=a2.id
|
||||
INNER JOIN ticket_follow tf ON t.id=tf.ticket_id AND tf.user_id=#{userId} AND tf.from=1 AND tf.favorites_id=#{favouritesId}
|
||||
LEFT JOIN device d ON t.device_no=d.device_no AND d.data_valid_state=1
|
||||
|
|
|
|||
Loading…
Reference in New Issue