Browse Source

12.20 陈宇

chendayu 2 years ago
parent
commit
2ea3e542dd
41 changed files with 889 additions and 91 deletions
  1. 55 3
      .idea/workspace.xml
  2. 16 1
      RMS/src/main/java/cn/cslg/report/controller/ProductController.java
  3. 3 3
      RMS/src/main/java/cn/cslg/report/mapper/ProductMapper.java
  4. 1 1
      RMS/src/main/java/cn/cslg/report/pojo/entity/AssoProductFile.java
  5. 1 1
      RMS/src/main/java/cn/cslg/report/pojo/entity/Product.java
  6. 2 1
      RMS/src/main/java/cn/cslg/report/pojo/vo/ProductStandardVO.java
  7. 33 0
      RMS/src/main/java/cn/cslg/report/pojo/vo/ReportFileStandardVO.java
  8. 1 2
      RMS/src/main/java/cn/cslg/report/service/IAssoProductFileService.java
  9. 9 7
      RMS/src/main/java/cn/cslg/report/service/IProductService.java
  10. 4 5
      RMS/src/main/java/cn/cslg/report/service/impl/AssoProductFileServiceImpl.java
  11. 19 6
      RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java
  12. 39 45
      RMS/src/main/resources/mapper/ProductMapper.xml
  13. BIN
      RMS/target/classes/cn/cslg/report/common/model/vo/PatentQueryFieldSourceVO.class
  14. BIN
      RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO$personPatents.class
  15. BIN
      RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO.class
  16. BIN
      RMS/target/classes/cn/cslg/report/controller/CompareController.class
  17. BIN
      RMS/target/classes/cn/cslg/report/controller/FeatureController.class
  18. BIN
      RMS/target/classes/cn/cslg/report/controller/PatentFiledController.class
  19. BIN
      RMS/target/classes/cn/cslg/report/controller/ProductController.class
  20. BIN
      RMS/target/classes/cn/cslg/report/controller/TaskController.class
  21. BIN
      RMS/target/classes/cn/cslg/report/entity/Features.class
  22. BIN
      RMS/target/classes/cn/cslg/report/entity/Task.class
  23. BIN
      RMS/target/classes/cn/cslg/report/mapper/ProductMapper.class
  24. BIN
      RMS/target/classes/cn/cslg/report/mapper/TaskMapper.class
  25. BIN
      RMS/target/classes/cn/cslg/report/pojo/vo/ProductListItemVO.class
  26. BIN
      RMS/target/classes/cn/cslg/report/pojo/vo/ProductStandardVO.class
  27. BIN
      RMS/target/classes/cn/cslg/report/service/BaseService.class
  28. BIN
      RMS/target/classes/cn/cslg/report/service/IAssoProductFileService.class
  29. BIN
      RMS/target/classes/cn/cslg/report/service/IProductService.class
  30. BIN
      RMS/target/classes/cn/cslg/report/service/business/CompareFilesService.class
  31. BIN
      RMS/target/classes/cn/cslg/report/service/business/FeatureService.class
  32. BIN
      RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class
  33. BIN
      RMS/target/classes/cn/cslg/report/service/business/ReportFieldPatentLinkService.class
  34. BIN
      RMS/target/classes/cn/cslg/report/service/business/ReportFieldService.class
  35. BIN
      RMS/target/classes/cn/cslg/report/service/business/ReportService.class
  36. BIN
      RMS/target/classes/cn/cslg/report/service/business/TaskService.class
  37. BIN
      RMS/target/classes/cn/cslg/report/service/impl/AssoProductFileServiceImpl.class
  38. BIN
      RMS/target/classes/cn/cslg/report/service/impl/ProductServiceImpl.class
  39. 41 16
      RMS/target/classes/mapper/ProductMapper.xml
  40. 272 0
      logs/rms/rms-debug.log
  41. 393 0
      logs/rms/rms-info.log

+ 55 - 3
.idea/workspace.xml

@@ -4,7 +4,49 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="e7cd156b-23fc-410f-9ecc-be34a2e87174" name="Default Changelist" comment="12.20 陈宇" />
+    <list default="true" id="e7cd156b-23fc-410f-9ecc-be34a2e87174" name="Default Changelist" comment="12.20 陈宇">
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/controller/ProductController.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/controller/ProductController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/mapper/ProductMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/mapper/ProductMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/entity/AssoProductFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/entity/AssoProductFile.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/entity/Product.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/entity/Product.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/vo/ProductStandardVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/vo/ProductStandardVO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/vo/ReportFileStandardVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/pojo/vo/ReportFileStandardVO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/IAssoProductFileService.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/IAssoProductFileService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/IProductService.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/IProductService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/impl/AssoProductFileServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/impl/AssoProductFileServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/src/main/resources/mapper/ProductMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/src/main/resources/mapper/ProductMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/PatentQueryFieldSourceVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/PatentQueryFieldSourceVO.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO$personPatents.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO$personPatents.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/CompareController.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/CompareController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/FeatureController.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/FeatureController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/PatentFiledController.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/PatentFiledController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/ProductController.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/ProductController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/TaskController.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/controller/TaskController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/entity/Features.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/entity/Features.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/entity/Task.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/entity/Task.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/mapper/ProductMapper.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/mapper/ProductMapper.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/mapper/TaskMapper.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/mapper/TaskMapper.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/pojo/vo/ProductListItemVO.class" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/pojo/vo/ProductStandardVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/pojo/vo/ProductStandardVO.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/BaseService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/BaseService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/IAssoProductFileService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/IAssoProductFileService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/IProductService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/IProductService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/CompareFilesService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/CompareFilesService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/FeatureService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/FeatureService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportFieldPatentLinkService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportFieldPatentLinkService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportFieldService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportFieldService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/ReportService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/TaskService.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/business/TaskService.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/impl/AssoProductFileServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/impl/AssoProductFileServiceImpl.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/impl/ProductServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/cn/cslg/report/service/impl/ProductServiceImpl.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/RMS/target/classes/mapper/ProductMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/RMS/target/classes/mapper/ProductMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/logs/rms/rms-debug.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/rms/rms-debug.log" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/logs/rms/rms-info.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/rms/rms-info.log" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -41,7 +83,8 @@
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/RMS/src/main/java/cn/cslg/report" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../Wispro-CodeWarehouse-BackEnd" />
+    <property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
   </component>
   <component name="ReactorSettings">
     <option name="notificationShown" value="true" />
@@ -89,6 +132,7 @@
       <option name="presentableId" value="Default" />
       <updated>1671511900387</updated>
       <workItem from="1671511902044" duration="19866000" />
+      <workItem from="1671539384819" duration="6359000" />
     </task>
     <task id="LOCAL-00001" summary="12.20 陈宇">
       <created>1671533439152</created>
@@ -97,7 +141,14 @@
       <option name="project" value="LOCAL" />
       <updated>1671533439152</updated>
     </task>
-    <option name="localTasksCounter" value="2" />
+    <task id="LOCAL-00002" summary="12.20 陈宇">
+      <created>1671539621936</created>
+      <option name="number" value="00002" />
+      <option name="presentableId" value="LOCAL-00002" />
+      <option name="project" value="LOCAL" />
+      <updated>1671539621936</updated>
+    </task>
+    <option name="localTasksCounter" value="3" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -113,6 +164,7 @@
         </entry>
       </map>
     </option>
+    <option name="oldMeFiltersMigrated" value="true" />
   </component>
   <component name="VcsManagerConfiguration">
     <MESSAGE value="12.20 陈宇" />

+ 16 - 1
RMS/src/main/java/cn/cslg/report/controller/ProductController.java

@@ -3,12 +3,14 @@ package cn.cslg.report.controller;
 import cn.cslg.report.common.core.base.Constants;
 import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.pojo.dto.ProductDTO;
+import cn.cslg.report.pojo.vo.ProductStandardVO;
 import cn.cslg.report.service.impl.ProductServiceImpl;
 import com.alibaba.fastjson.JSONObject;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -36,7 +38,7 @@ public class ProductController {
     public String addProduct(String jsons, List<MultipartFile> files) {
         log.info("开始处理【新增产品】的请求,参数为:{}, {}", jsons, files);
         if (jsons != null) {
-            ProductDTO productDTO = JSONObject.parseObject(jsons,ProductDTO.class);
+            ProductDTO productDTO = JSONObject.parseObject(jsons, ProductDTO.class);
             productService.addProduct(productDTO, files);
             return Response.success("产品新增成功");
         } else {
@@ -44,4 +46,17 @@ public class ProductController {
         }
     }
 
+    @Operation(summary = "根据报告id查询产品数据信息")
+    @GetMapping("/getProduct")
+    public String getProduct(Integer reportId) {
+        log.info("开始处理【根据报告id查询产品数据信息】的请求,参数为:{}", reportId);
+        if (reportId != null) {
+            ProductStandardVO product = productService.getProduct(reportId);
+            return Response.success(product);
+        } else {
+            return Response.error("报告id不能为空");
+        }
+
+    }
+
 }

+ 3 - 3
RMS/src/main/java/cn/cslg/report/mapper/ProductMapper.java

@@ -28,11 +28,11 @@ public interface ProductMapper {
     int update(Product product);
 
     /**
-     * 根据id查询产品数据
+     * 根据reportId关联查询产品数据
      *
      * @param reportId 报告id
-     * @return 返回受影响的行数
+     * @return 返回查询到的产品数据对象
      */
-    ProductStandardVO getStandardById(Integer reportId);
+    ProductStandardVO getStandardByReportId(Integer reportId);
 
 }

+ 1 - 1
RMS/src/main/java/cn/cslg/report/pojo/entity/AssoProductFile.java

@@ -6,7 +6,7 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 
 /**
- * 产品文件关联表
+ * 产品文件关联表的实体类
  * @Author chenyu
  * @Data 2022/12/20 10:46
  */

+ 1 - 1
RMS/src/main/java/cn/cslg/report/pojo/entity/Product.java

@@ -7,7 +7,7 @@ import java.io.Serializable;
 import java.time.LocalDateTime;
 
 /**
- * 产品的实体类
+ * 产品的实体类
  *
  * @Author chenyu
  * @Data 2022/12/20 10:01

+ 2 - 1
RMS/src/main/java/cn/cslg/report/pojo/vo/ProductStandardVO.java

@@ -5,6 +5,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -47,7 +48,7 @@ public class ProductStandardVO implements Serializable {
     /**
      * 检索截止日期
      */
-    private LocalDateTime deadLine;
+    private Date deadLine;
     /**
      * 关注企业/发明人/技术方向
      */

+ 33 - 0
RMS/src/main/java/cn/cslg/report/pojo/vo/ReportFileStandardVO.java

@@ -15,16 +15,49 @@ import java.util.Date;
 @Accessors(chain = true)
 @Data
 public class ReportFileStandardVO implements Serializable {
+    /**
+     * ID
+     */
     private Integer id;
+    /**
+     * 附件名称
+     */
     private String name;
+    /**
+     * 附件上传地址
+     */
     private String address;
+    /**
+     * 专题库ID
+     */
     private Integer zid;
+    /**
+     * 备注
+     */
     private String remark;
+    /**
+     * 上传时间
+     */
     private Date updateTime;
+    /**
+     * 上传人
+     */
     private Integer uid;
+    /**
+     * 类型
+     */
     private String type;
+    /**
+     * 大小
+     */
     private Integer size;
+    /**
+     * 后缀
+     */
     private String suffix;
+    /**
+     * 文件名
+     */
     private String fileName;
 
 }

+ 1 - 2
RMS/src/main/java/cn/cslg/report/service/IAssoProductFileService.java

@@ -10,8 +10,7 @@ public interface IAssoProductFileService {
      * 插入产品与文件关联表数据 对应实体AssoReportFile 0代表上传文件为附件
      * @param productId 产品id
      * @param fileIds 文件ids
-     * @return 返回插入成功/失败信息
      */
-    String addAsso(Integer productId, List<Integer> fileIds);
+    void addAsso(Integer productId, List<Integer> fileIds);
 
 }

+ 9 - 7
RMS/src/main/java/cn/cslg/report/service/IProductService.java

@@ -2,6 +2,7 @@ package cn.cslg.report.service;
 
 import cn.cslg.report.pojo.dto.ProductDTO;
 import cn.cslg.report.pojo.vo.ProductStandardVO;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
@@ -11,22 +12,23 @@ import java.util.List;
  */
 public interface IProductService {
     /**
-     * 新增产品的方法
+     * 新增产品的业务层方法
      * @param productDTO 前端新增产品数据对象
      */
+    @Transactional(rollbackFor = Exception.class)
     void addProduct(ProductDTO productDTO, List<MultipartFile> files);
 
     /**
-     * 修改产品的方法
-     * @param productDTO 前端修改产品数据对象
+     * 根据id修改产品的业务层方法
+     * @param productDTO 待修改的产品新数据
      */
     void updateProduct(ProductDTO productDTO);
 
     /**
-     * 查询产品信息
-     * @param id 产品数据信息的id
-     * @return 返回查询到的产品信息对象
+     * 根据报告id查询产品数据的业务层方法
+     * @param reportId 报告id
+     * @return 返回查询到的产品数据对象
      */
-    ProductStandardVO getStandardById(Integer id);
+    ProductStandardVO getProduct(Integer reportId);
 
 }

+ 4 - 5
RMS/src/main/java/cn/cslg/report/service/impl/AssoProductFileServiceImpl.java

@@ -29,16 +29,15 @@ public class AssoProductFileServiceImpl implements IAssoProductFileService {
      * @return 返回插入成功/失败信息
      */
     @Override
-    public String addAsso(Integer productId, List<Integer> fileIds) {
-        List<AssoProductFile> assoProductFiles = new ArrayList<>();
+    public void addAsso(Integer productId, List<Integer> fileIds) {
+        List<AssoProductFile> list = new ArrayList<>();
         for (Integer fileId : fileIds) {
             AssoProductFile assoProductFile = new AssoProductFile()
                     .setProductId(productId)
                     .setFileId(fileId)
                     .setFileUseType(0);
-            assoProductFiles.add(assoProductFile);
+            list.add(assoProductFile);
         }
-        assoProductFileMapper.insertBatch(assoProductFiles);
-        return Response.success();
+        assoProductFileMapper.insertBatch(list);
     }
 }

+ 19 - 6
RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java

@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
@@ -30,17 +31,21 @@ public class ProductServiceImpl implements IProductService {
     @Autowired
     private AssoProductFileServiceImpl assoProductFileService;
 
+    /**
+     * 新增产品的业务层方法
+     * @param productDTO 前端新增产品数据对象
+     */
     @Override
     public void addProduct(ProductDTO productDTO, List<MultipartFile> files) {
         log.info("开始处理【新增产品】的业务,参数为:{}, {}", productDTO, files);
         Product product = new Product();
         BeanUtils.copyProperties(productDTO, product);
         //product.setProductIdentify("产品标识???");  产品标识字段未知逻辑???
-        int rows = productMapper.insert(product);
+        productMapper.insert(product);
 
         //上传图片/文件入库,返回图片/文件的ids,将ids插入产品文件关联表中
         if (files != null && files.size() != 0) {
-            //将文档上传并返回文件入库的Id集合
+            //将文档上传并返回文件入库的Ids集合
             List<Integer> fileIds = reportFileService.uploadFiles(files);
             assoProductFileService.addAsso(product.getId(), fileIds);
         }
@@ -48,6 +53,10 @@ public class ProductServiceImpl implements IProductService {
 
     }
 
+    /**
+     * 根据id修改产品的业务层方法
+     * @param productDTO 待修改的产品新数据
+     */
     @Override
     public void updateProduct(ProductDTO productDTO) {
         log.info("开始处理【修改产品】的业务,参数为:{}", productDTO);
@@ -55,10 +64,14 @@ public class ProductServiceImpl implements IProductService {
 
     }
 
+    /**
+     * 根据报告id查询产品数据的业务层方法
+     * @param reportId 报告id
+     * @return 返回查询到的产品数据对象
+     */
     @Override
-    public ProductStandardVO getStandardById(Integer id) {
-        log.info("开始处理【查询产品】的业务,参数为:{}", id);
-
-        return null;
+    public ProductStandardVO getProduct(Integer reportId) {
+        log.info("开始处理【根据报告id查询产品数据信息】的业务,参数为:{}", reportId);
+        return productMapper.getStandardByReportId(reportId);
     }
 }

+ 39 - 45
RMS/src/main/resources/mapper/ProductMapper.xml

@@ -58,46 +58,36 @@
     </update>
 
     <!--根据reportId关联查询产品数据-->
-    <!--ProductStandardVO getStandardById(Integer reportId);-->
-    <select id="getStandardById" resultMap="StandardResultMap">
-        select
-        <include refid="StandQueryFields"/>
-        from PRODUCT
-        where ID = #{id}
+    <!--ProductStandardVO getStandardByReportId(Integer reportId);-->
+    <select id="getStandardByReportId" resultMap="getStandardByReportIdResultMap">
+        select product_name,
+               product_identify,
+               product_description,
+               survey_area,
+               product_image,
+               search_policy,
+               deadline,
+               focus_information,
+               report_id,
+               create_person_name,
+               create_person_id,
+               name,
+               address,
+               zid,
+               remark,
+               update_time,
+               uid,
+               type,
+               size,
+               suffix,
+               file_name
+        from PRODUCT p
+                 left join ASSO_PRODUCT_FILE apf on p.ID = apf.PRODUCT_ID
+                 left join REPORT_FILE rf on rf.ID = apf.FILE_ID
+        where REPORT_ID = #{report_Id}
     </select>
 
-    <sql id="StandQueryFields">
-        <if test="true">
-            select product_name,
-            product_identify,
-            product_description,
-            survey_area,
-            product_image,
-            search_policy,
-            deadline,
-            focus_information,
-            report_id,
-            create_person_name,
-            create_person_id,
-            name,
-            address,
-            zid,
-            remark,
-            update_time,
-            uid,
-            type,
-            size,
-            suffix,
-            file_name
-            from PRODUCT p
-            left join ASSO_PRODUCT_FILE arf on p.ID = arf.PRODUCT_ID
-            left join REPORT_FILE rf on rf.ID = arf.FILE_ID
-            where REPORT_ID = #{report_Id}
-        </if>
-    </sql>
-
-    <resultMap id="StandardResultMap" type="cn.cslg.report.pojo.vo.ProductStandardVO">
-        <id column="ID" property="id"/>
+    <resultMap id="getStandardByReportIdResultMap" type="cn.cslg.report.pojo.vo.ProductStandardVO">
         <result column="PRODUCT_NAME" property="productName"/>
         <result column="PRODUCT_IDENTIFY" property="productIdentify"/>
         <result column="PRODUCT_DESCRIPTION" property="productDescription"/>
@@ -109,13 +99,17 @@
         <result column="REPORT_ID" property="reportId"/>
         <result column="CREATE_PERSON_NAME" property="createPersonName"/>
         <result column="CREATE_PERSON_ID" property="create_person_id"/>
-        <collection property="reportFiles" ofType="cn.cslg.report.pojo.vo.ProductStandardVO">
-            <id column="ooi_id" property="id"/>
-            <result column="order_id" property="orderId"/>
-            <result column="sku_id" property="skuId"/>
-            <result column="title" property="title"/>
-            <result column="price" property="price"/>
-            <result column="quantity" property="quantity"/>
+        <collection property="reportFiles" ofType="cn.cslg.report.pojo.vo.ReportFileStandardVO">
+            <result column="NAME" property="name"/>
+            <result column="ADDRESS" property="address"/>
+            <result column="ZID" property="zid"/>
+            <result column="REMARK" property="remark"/>
+            <result column="UPDATE_TIME" property="updateTime"/>
+            <result column="UID" property="uid"/>
+            <result column="TYPE" property="type"/>
+            <result column="SIZE" property="size"/>
+            <result column="SUFFIX" property="suffix"/>
+            <result column="FILE_NAME" property="fileName"/>
         </collection>
     </resultMap>
 

BIN
RMS/target/classes/cn/cslg/report/common/model/vo/PatentQueryFieldSourceVO.class


BIN
RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO$personPatents.class


BIN
RMS/target/classes/cn/cslg/report/common/model/vo/TaskVO.class


BIN
RMS/target/classes/cn/cslg/report/controller/CompareController.class


BIN
RMS/target/classes/cn/cslg/report/controller/FeatureController.class


BIN
RMS/target/classes/cn/cslg/report/controller/PatentFiledController.class


BIN
RMS/target/classes/cn/cslg/report/controller/ProductController.class


BIN
RMS/target/classes/cn/cslg/report/controller/TaskController.class


BIN
RMS/target/classes/cn/cslg/report/entity/Features.class


BIN
RMS/target/classes/cn/cslg/report/entity/Task.class


BIN
RMS/target/classes/cn/cslg/report/mapper/ProductMapper.class


BIN
RMS/target/classes/cn/cslg/report/mapper/TaskMapper.class


BIN
RMS/target/classes/cn/cslg/report/pojo/vo/ProductListItemVO.class


BIN
RMS/target/classes/cn/cslg/report/pojo/vo/ProductStandardVO.class


BIN
RMS/target/classes/cn/cslg/report/service/BaseService.class


BIN
RMS/target/classes/cn/cslg/report/service/IAssoProductFileService.class


BIN
RMS/target/classes/cn/cslg/report/service/IProductService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/CompareFilesService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/FeatureService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportFieldPatentLinkService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportFieldService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/TaskService.class


BIN
RMS/target/classes/cn/cslg/report/service/impl/AssoProductFileServiceImpl.class


BIN
RMS/target/classes/cn/cslg/report/service/impl/ProductServiceImpl.class


+ 41 - 16
RMS/target/classes/mapper/ProductMapper.xml

@@ -57,24 +57,37 @@
         where ID = #{id}
     </update>
 
-    <!--根据id查询产品数据-->
-    <!--ProductStandardVO getStandardById(Integer id);-->
-    <select id="getStandardById" resultMap="StandardResultMap">
-        select
-        <include refid="StandQueryFields"/>
-        from PRODUCT
-        where ID = #{id}
+    <!--根据reportId关联查询产品数据-->
+    <!--ProductStandardVO getStandardByReportId(Integer reportId);-->
+    <select id="getStandardByReportId" resultMap="getStandardByReportIdResultMap">
+        select product_name,
+               product_identify,
+               product_description,
+               survey_area,
+               product_image,
+               search_policy,
+               deadline,
+               focus_information,
+               report_id,
+               create_person_name,
+               create_person_id,
+               name,
+               address,
+               zid,
+               remark,
+               update_time,
+               uid,
+               type,
+               size,
+               suffix,
+               file_name
+        from PRODUCT p
+                 left join ASSO_PRODUCT_FILE apf on p.ID = apf.PRODUCT_ID
+                 left join REPORT_FILE rf on rf.ID = apf.FILE_ID
+        where REPORT_ID = #{report_Id}
     </select>
 
-    <sql id="StandQueryFields">
-        <if test="true">
-            id, product_name, product_identify, product_description, survey_area, product_image, search_policy,
-            deadline, focus_information, report_id, create_person_name, create_person_id
-        </if>
-    </sql>
-
-    <resultMap id="StandardResultMap" type="cn.cslg.report.pojo.vo.ProductStandardVO">
-        <id column="ID" property="id"/>
+    <resultMap id="getStandardByReportIdResultMap" type="cn.cslg.report.pojo.vo.ProductStandardVO">
         <result column="PRODUCT_NAME" property="productName"/>
         <result column="PRODUCT_IDENTIFY" property="productIdentify"/>
         <result column="PRODUCT_DESCRIPTION" property="productDescription"/>
@@ -86,6 +99,18 @@
         <result column="REPORT_ID" property="reportId"/>
         <result column="CREATE_PERSON_NAME" property="createPersonName"/>
         <result column="CREATE_PERSON_ID" property="create_person_id"/>
+        <collection property="reportFiles" ofType="cn.cslg.report.pojo.vo.ReportFileStandardVO">
+            <result column="NAME" property="name"/>
+            <result column="ADDRESS" property="address"/>
+            <result column="ZID" property="zid"/>
+            <result column="REMARK" property="remark"/>
+            <result column="UPDATE_TIME" property="updateTime"/>
+            <result column="UID" property="uid"/>
+            <result column="TYPE" property="type"/>
+            <result column="SIZE" property="size"/>
+            <result column="SUFFIX" property="suffix"/>
+            <result column="FILE_NAME" property="fileName"/>
+        </collection>
     </resultMap>
 
 </mapper>

File diff suppressed because it is too large
+ 272 - 0
logs/rms/rms-debug.log


File diff suppressed because it is too large
+ 393 - 0
logs/rms/rms-info.log