Merge branch 'feature/bug-384' into develop

This commit is contained in:
曹鹏飞 2025-07-23 15:58:56 +08:00
commit d8343eaf1a
2 changed files with 7 additions and 3 deletions

View File

@ -570,8 +570,10 @@ public class TicketController extends ControllerBase {
@GetMapping("getTicket") @GetMapping("getTicket")
public ApiResult<TicketInfoVO> getTicket(@Valid @RequestParam @NotNull Integer id) { public ApiResult<TicketInfoVO> getTicket(@Valid @RequestParam @NotNull Integer id) {
Ticket ticket = ticketService.getById(id); Ticket ticket = ticketService.getById(id);
AppUser user = appUserService.getById(ticket.getUserId()); AdminUser adminUser=StrUtil.equals(ticket.getUserPlatform(),Constant.FROM_ADMIN)?adminUserService.getById(ticket.getUserId()):null;
AppUser user = StrUtil.equals(ticket.getUserPlatform(), Constant.FROM_APP) ? appUserService.getById(ticket.getUserId()) : null;
String areaName = ""; String areaName = "";
if (Objects.nonNull(user))
if (user.getIsPrimary()){ if (user.getIsPrimary()){
areaName=StrUtil.join(",",customerService.getAreas(Arrays.stream(user.getCompanyId().split(",")).map(Integer::parseInt).collect(Collectors.toList()))); areaName=StrUtil.join(",",customerService.getAreas(Arrays.stream(user.getCompanyId().split(",")).map(Integer::parseInt).collect(Collectors.toList())));
}else if (Objects.nonNull(user.getAreaId())){ }else if (Objects.nonNull(user.getAreaId())){
@ -617,8 +619,8 @@ public class TicketController extends ControllerBase {
.setImages(getFileVOs(ticket.getImages())) .setImages(getFileVOs(ticket.getImages()))
.setAttachments(getFileVOs(ticket.getAttachments())) .setAttachments(getFileVOs(ticket.getAttachments()))
.setCreateUserId(ticket.getUserId()) .setCreateUserId(ticket.getUserId())
.setCreateUserName(user.getName()) .setCreateUserName(Objects.nonNull(user)?user.getName():adminUser.getUserName())
.setCreateUserAvatar(user.getAvatar()) .setCreateUserAvatar(Objects.nonNull(user)?user.getAvatar():adminUser.getAvatar())
.setCreateTime(ticket.getCreateTime()) .setCreateTime(ticket.getCreateTime())
.setAreaName(areaName) .setAreaName(areaName)
.setCompanyName(device.getCustomerName()) .setCompanyName(device.getCustomerName())

View File

@ -36,6 +36,8 @@
FROM device d FROM device d
INNER JOIN t_base_device_type dt ON d.device_type=dt.device_type INNER JOIN t_base_device_type dt ON d.device_type=dt.device_type
WHERE dt.device_state=1 AND d.device_no=#{deviceNo} WHERE dt.device_state=1 AND d.device_no=#{deviceNo}
ORDER BY d.id desc
LIMIT 1
</select> </select>
<select id="getDeviceTypeCqmList" resultType="com.nflg.mobilebroken.common.pojo.vo.CqmPersionResultVO"> <select id="getDeviceTypeCqmList" resultType="com.nflg.mobilebroken.common.pojo.vo.CqmPersionResultVO">