|
@@ -1,13 +1,17 @@
|
|
|
package com.example.xiaoshiweixinback.service;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.example.xiaoshiweixinback.business.common.base.SystemFile;
|
|
|
import com.example.xiaoshiweixinback.domain.TicketRightsProtection;
|
|
|
import com.example.xiaoshiweixinback.entity.dto.ticket.TicketRightsProtectionAddDTO;
|
|
|
import com.example.xiaoshiweixinback.entity.vo.TicketRightsProtectionVO;
|
|
|
import com.example.xiaoshiweixinback.mapper.TicketRightsProtectionMapper;
|
|
|
+import com.example.xiaoshiweixinback.service.common.FileManagerService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -23,7 +27,8 @@ import java.util.List;
|
|
|
@Service
|
|
|
@RequiredArgsConstructor
|
|
|
public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProtectionMapper, TicketRightsProtection> {
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private FileManagerService fileManagerService;
|
|
|
/**
|
|
|
* 知识产权维权工单
|
|
|
*
|
|
@@ -48,6 +53,22 @@ public class TicketRightsProtectionService extends ServiceImpl<TicketRightsProte
|
|
|
rightsProtectionWrapper.eq(TicketRightsProtection::getTicketId, ticketId);
|
|
|
TicketRightsProtection ticketRightsProtection = this.getOne(rightsProtectionWrapper, false);
|
|
|
if (ticketRightsProtection != null) {
|
|
|
+ String rightProof = ticketRightsProtection.getRightProof();
|
|
|
+ String[] stringArray = rightProof.split(",");
|
|
|
+ List<String> proofGuids = new ArrayList<>(Arrays.asList(stringArray));
|
|
|
+ List<SystemFile> systemFiles = new ArrayList<>();
|
|
|
+ if (proofGuids.size() != 0) {
|
|
|
+ try {
|
|
|
+ String res = fileManagerService.getSystemFileFromFMS(proofGuids);
|
|
|
+ systemFiles = JSONObject.parseArray(res, SystemFile.class);
|
|
|
+ if (systemFiles == null) {
|
|
|
+ systemFiles = new ArrayList<>();
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rightsProtectionVO.setProofGuids(proofGuids);
|
|
|
+ rightsProtectionVO.setProofFileList(systemFiles);
|
|
|
BeanUtils.copyProperties(ticketRightsProtection, rightsProtectionVO);
|
|
|
}
|
|
|
return rightsProtectionVO;
|