chendayu 2 年 前
コミット
b22c685e07

+ 0 - 1
PAS/src/main/java/cn/cslg/pas/controller/ReportController.java

@@ -51,7 +51,6 @@ public class ReportController {
     }
 
 
-
     @checkAuth(FunId = "/workspace/folder/analyticSystem/generateReport")
     @Permission(roles = {2})
     @PostMapping("add")

+ 5 - 2
PAS/src/main/java/cn/cslg/pas/service/PatentApplicantLinkService.java

@@ -42,8 +42,11 @@ public class PatentApplicantLinkService extends ServiceImpl<PatentApplicantLinkM
         return this.list(queryWrapper);
     }
 
-    public void updatePatentApplicantLink(List<String> name, List<String> shortName, Integer type, Integer patentId,List<PatentApplicant> patentApplicantList) {
-        List<Integer> applicableIds = patentApplicantService.updatePatentApplicant(name, shortName,patentApplicantList);
+    public void updatePatentApplicantLink(List<String> name, List<String> shortName, Integer type, Integer patentId, List<PatentApplicant> patentApplicantList) {
+        if (shortName == null) {
+            shortName = new ArrayList<>();
+        }
+        List<Integer> applicableIds = patentApplicantService.updatePatentApplicant(name, shortName, patentApplicantList);
         if (applicableIds.size() != 0) {
             this.remove(Wrappers.<PatentApplicantLink>lambdaQuery().eq(PatentApplicantLink::getPatentId, patentId).eq(PatentApplicantLink::getType, type));
             for (int i = 0; i < applicableIds.size(); i++) {

+ 5 - 1
PAS/src/main/java/cn/cslg/pas/service/PatentInstructionService.java

@@ -50,6 +50,7 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
     private final PatentService patentService;
     private final ProjectFileService projectFileService;
     private final LoginUtils loginUtils;
+
     public IPage<PatentInstruction> getPageList(PatentInstructionVO params) {
         LambdaQueryWrapper<PatentInstruction> queryWrapper = new LambdaQueryWrapper<>();
         if (StringUtils.isNotEmpty(params.getPatentNo())) {
@@ -159,15 +160,18 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
         patentInstruction.insert();
         return Response.success(true);
     }
+
     @Transactional
     public String edit(String patentNo, UploadFileDTO pdf) {
-      PatentInstruction patentInstruction =new PatentInstruction();
+        PatentInstruction patentInstruction = new PatentInstruction();
         patentInstruction.setUrl(pdf.getPath());
         patentInstruction.setFileName(pdf.getFileName());
         patentInstruction.setSize(pdf.getFileSize());
+        patentInstruction.setPatentNo(patentNo);
         patentInstruction.insert();
         return Response.success(true);
     }
+
     public String delete(Integer id) {
         PatentInstruction temp = this.getById(id);
         this.removeById(id);

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/ReportService.java

@@ -544,7 +544,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
     }
 
     //根据Id删除报告
-    public String deleteById(List<Integer> ids){
+    public String deleteById(List<Integer> ids) {
         this.deleteById(ids);
         return Response.success();
 

+ 3 - 1
PAS/src/main/java/cn/cslg/pas/service/UploadPatentBatchService.java

@@ -689,7 +689,9 @@ public class UploadPatentBatchService {
         //设置摘要附图
         patent.setAbstractPath(patentCell.getPicUrl());
         //设置pdf文档
-        patentInstructionService.edit(patentCell.getPatentNo(), patentCell.getPdf());
+        if (patentCell.getPdf() != null) {
+            patentInstructionService.edit(patentCell.getPatentNo(), patentCell.getPdf());
+        }
         //设置公开号
         patent.setPublicNo(patentCell.getPublicNo());
         uploadParamsVO.setSimpleStatus(patentCell.getStatue());