Explorar el Código

Merge remote-tracking branch 'origin/master'

lwhhszx hace 2 años
padre
commit
af7f80d7fb

BIN
.idea/shelf/Uncommitted_changes_before_Update_at_2022_12_21_17_18_[Default_Changelist]/ProductServiceImpl.class


+ 1 - 1
RMS/src/main/java/cn/cslg/report/common/model/dto/ProductDTO.java

@@ -12,7 +12,7 @@ import java.util.List;
  * 产品的前端传输DTO类
  *
  * @Author chenyu
- * @Data 2022/12/20 10:16
+ * @Data 2022/12/20
  */
 @Accessors(chain = true)
 @Data

+ 1 - 1
RMS/src/main/java/cn/cslg/report/common/model/dto/ProductIncludeFilesDTO.java

@@ -12,7 +12,7 @@ import java.util.List;
  * 产品关联附件的前端传输DTO类
  *
  * @Author chenyu
- * @Data 2022/12/27 10:16
+ * @Data 2022/12/27
  */
 @Accessors(chain = true)
 @Data

+ 2 - 2
RMS/src/main/java/cn/cslg/report/common/model/vo/ProductIncludeFilesVO.java

@@ -8,10 +8,10 @@ import java.util.Date;
 import java.util.List;
 
 /**
- * 产品关联附件的查询VO类
+ * 产品关联产品附件的标准查询VO类
  *
  * @Author chenyu
- * @Data 2022/12/20 10:16
+ * @Data 2022/12/20
  */
 @Accessors(chain = true)
 @Data

+ 2 - 2
RMS/src/main/java/cn/cslg/report/common/model/vo/ReportFileStandardVO.java

@@ -7,10 +7,10 @@ import java.io.Serializable;
 import java.util.Date;
 
 /**
- * 报告系统文件表的查询数据VO类
+ * 报告系统文件表的标准查询VO类
  *
  * @Author chenyu
- * @Data 2022/12/20 18:15
+ * @Data 2022/12/20
  */
 @Accessors(chain = true)
 @Data

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

@@ -31,7 +31,7 @@ import java.util.List;
 @RequestMapping(Constants.REPORT_API + "/product")
 @RequiredArgsConstructor
 public class ProductController {
-    private final IProductService productService;  //装配产品的Service层接口实现类
+    private final IProductService productService;  //装配产品的Service层接口实现类
 
     @Operation(summary = "新增产品")
     @PostMapping("/addProduct")

+ 3 - 2
RMS/src/main/java/cn/cslg/report/entity/AssoProductFile.java

@@ -7,8 +7,9 @@ import java.io.Serializable;
 
 /**
  * 产品文件关联表的实体类
+ *
  * @Author chenyu
- * @Data 2022/12/20 10:46
+ * @Data 2022/12/20
  */
 @Accessors(chain = true)
 @Data
@@ -26,7 +27,7 @@ public class AssoProductFile implements Serializable {
      */
     private Integer fileId;
     /**
-     * 文件使用类型 0=什么?, 1=什么?, 2=什么?
+     * 文件使用类型 0=什么类型, 1=什么类型, 2=什么类型
      */
     private Integer fileUseType;
 

+ 6 - 6
RMS/src/main/java/cn/cslg/report/mapper/AssoProductFileMapper.java

@@ -8,8 +8,8 @@ import java.util.List;
 /**
  * 产品文件关联表的Mapper层接口
  *
- * @author chenyu
- * @date 2022/12/20
+ * @Author chenyu
+ * @Data 2022/12/20
  */
 @Repository
 public interface AssoProductFileMapper {
@@ -22,15 +22,15 @@ public interface AssoProductFileMapper {
     int insertBatch(List<AssoProductFile> assoProductFiles);
 
     /**
-     * 根据fileId(文件id)删除产品文件关联表数据
+     * 根据附件fileId批量删除产品文件关联表数据
      *
-     * @param fileIds 件id集合
+     * @param fileIds 件id集合
      * @return 返回受影响的行数
      */
-    int deleteByFileId(List<Integer> fileIds);
+    int deleteByFileIds(List<Integer> fileIds);
 
     /**
-     * 根据产品id删除产品文件关联表数据
+     * 根据产品productId删除产品文件关联表数据
      *
      * @param productId 产品id
      * @return 返回受影响的行数

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

@@ -1,11 +1,11 @@
 package cn.cslg.report.mapper;
 
-import cn.cslg.report.entity.Product;
 import cn.cslg.report.common.model.vo.ProductIncludeFilesVO;
+import cn.cslg.report.entity.Product;
 import org.springframework.stereotype.Repository;
 
 /**
- * 产品的Mapper层接口
+ * 产品的Mapper层接口
  *
  * @Author chenyu
  * @Data 2022/12/20
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface ProductMapper {
     /**
-     * 插入产品数据
+     * 插入产品数据
      *
      * @param product 产品数据对象
      * @return 返回受影响的行数
@@ -21,7 +21,7 @@ public interface ProductMapper {
     int insert(Product product);
 
     /**
-     * 根据id修改产品数据
+     * 根据id修改产品数据
      *
      * @param product 产品数据对象
      * @return 返回受影响的行数
@@ -29,15 +29,15 @@ public interface ProductMapper {
     int update(Product product);
 
     /**
-     * 根据reportId关联查询产品数据(产品表和图片附件文件表数据)
+     * 根据报告reportId关联查询产品和产品附件数据(产品表、产品文件关联表、报告系统文件表)
      *
      * @param reportId 报告id
-     * @return 返回查询到的产品数据对象
+     * @return 返回查询到的数据
      */
-    ProductIncludeFilesVO getStandardByReportId(Integer reportId);
+    ProductIncludeFilesVO getWholeByReportId(Integer reportId);
 
     /**
-     * 根据报告id删除产品表数据
+     * 根据报告reportId删除产品表数据
      *
      * @param reportId 报告id
      * @return 返回受影响的行数

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

@@ -3,31 +3,31 @@ package cn.cslg.report.service;
 import java.util.List;
 
 /**
- * 产品文件关联表的业务层接口
+ * 产品文件关联的Service层接口
  *
- * @author chenyu
- * @date 2022/12/20
+ * @Author chenyu
+ * @Data 2022/12/20
  */
 public interface IAssoProductFileService {
     /**
-     * 插入产品与文件关联表数据 对应实体AssoReportFile 0代表上传文件为附件
+     * 新增产品文件关联数据
      *
      * @param productId 产品id
-     * @param fileIds   文件ids
+     * @param fileIds   附件id集合
      */
     void addAsso(Integer productId, List<Integer> fileIds);
 
     /**
-     * 根据文件id删除产品与文件关联表数据
+     * 根据附件fileId删除产品文件关联数据
      *
-     * @param fileIds 件id集合
+     * @param fileIds 件id集合
      */
     void deleteAssoByFileIds(List<Integer> fileIds);
 
     /**
-     * 根据产品id删除产品与文件关联表数据
+     * 根据产品productId删除产品文件关联数据
      *
-     * @param productId
+     * @param productId 产品id
      */
     void deleteAssoByProductId(Integer productId);
 

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

@@ -16,37 +16,37 @@ import java.util.List;
  */
 public interface IProductService {
     /**
-     * 新增产品的业务层方法
+     * 新增产品
      *
-     * @param productDTO 产品的前端传输DTO类
-     * @param files      产品附件
+     * @param productDTO 产品数据前端传输DTO对象
+     * @param files      附件
      */
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional
     void addProduct(ProductDTO productDTO, List<MultipartFile> files);
 
     /**
-     * 修改产品的业务层方法
+     * 修改产品
      *
-     * @param productIncludeFilesDTO 产品新数据
-     * @param files                  产品的新附件
+     * @param productIncludeFilesDTO 产品新数据
+     * @param files                  新附件
      */
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional
     void updateProduct(ProductIncludeFilesDTO productIncludeFilesDTO, List<MultipartFile> files);
 
     /**
-     * 根据reportId关联查询产品数据(产品表和图片附件文件表数据)
+     * 根据报告reportId关联查询产品和产品附件数据(产品表、产品文件关联表、报告系统文件表)
      *
      * @param reportId 报告id
-     * @return 返回查询到的产品数据对象
+     * @return 返回查询到的产品和产品附件数据对象
      */
     ProductIncludeFilesVO getProduct(Integer reportId);
 
     /**
-     * 根据报告id删除产品表数据
+     * 根据报告reportId删除产品及所有关联数据
      *
      * @param reportId 报告id
      */
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional
     void deleteProduct(Integer reportId);
 
 }

+ 14 - 11
RMS/src/main/java/cn/cslg/report/service/impl/AssoProductFileServiceImpl.java

@@ -4,17 +4,16 @@ import cn.cslg.report.entity.AssoProductFile;
 import cn.cslg.report.mapper.AssoProductFileMapper;
 import cn.cslg.report.service.IAssoProductFileService;
 import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
 
 /**
- * 产品文件关联表的业务层实现类
+ * 产品文件关联的Service层实现类
  *
  * @Author chenyu
- * @Data 2022/12/20 14:13
+ * @Data 2022/12/20
  */
 @Service
 @RequiredArgsConstructor
@@ -22,10 +21,10 @@ public class AssoProductFileServiceImpl implements IAssoProductFileService {
     private final AssoProductFileMapper assoProductFileMapper;
 
     /**
-     * 插入产品与文件关联表数据 对应实体AssoProductFile 0代表上传文件为附件
+     * 新增产品文件关联数据
      *
      * @param productId 产品id
-     * @param fileIds   文件ids
+     * @param fileIds   附件id
      */
     @Override
     public void addAsso(Integer productId, List<Integer> fileIds) {
@@ -41,23 +40,27 @@ public class AssoProductFileServiceImpl implements IAssoProductFileService {
     }
 
     /**
-     * 根据文件id删除产品与文件关联表数据
+     * 根据附件fileId删除产品文件关联数据
      *
-     * @param fileIds 件id集合
+     * @param fileIds 件id集合
      */
     @Override
     public void deleteAssoByFileIds(List<Integer> fileIds) {
-        assoProductFileMapper.deleteByFileId(fileIds);
+        if (fileIds != null) {
+            assoProductFileMapper.deleteByFileIds(fileIds);
+        }
     }
 
     /**
-     * 根据产品id删除产品与文件关联表数据
+     * 根据产品productId删除产品文件关联数据
      *
-     * @param productId
+     * @param productId 产品id
      */
     @Override
     public void deleteAssoByProductId(Integer productId) {
-        assoProductFileMapper.deleteByProductId(productId);
+        if (productId != null) {
+            assoProductFileMapper.deleteByProductId(productId);
+        }
     }
 
 

+ 23 - 22
RMS/src/main/java/cn/cslg/report/service/impl/ProductServiceImpl.java

@@ -1,15 +1,15 @@
 package cn.cslg.report.service.impl;
 
+import cn.cslg.report.common.model.dto.ProductDTO;
 import cn.cslg.report.common.model.dto.ProductIncludeFilesDTO;
 import cn.cslg.report.common.model.vo.PersonnelVO;
+import cn.cslg.report.common.model.vo.ProductIncludeFilesVO;
 import cn.cslg.report.common.model.vo.ReportFileStandardVO;
 import cn.cslg.report.common.utils.CacheUtils;
-import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
-import cn.cslg.report.mapper.ProductMapper;
-import cn.cslg.report.common.model.dto.ProductDTO;
 import cn.cslg.report.entity.Product;
-import cn.cslg.report.common.model.vo.ProductIncludeFilesVO;
+import cn.cslg.report.mapper.ProductMapper;
+import cn.cslg.report.service.IAssoProductFileService;
 import cn.cslg.report.service.IProductService;
 import cn.cslg.report.service.business.ReportFileService;
 import lombok.RequiredArgsConstructor;
@@ -33,15 +33,15 @@ import java.util.List;
 public class ProductServiceImpl implements IProductService {
     private final ProductMapper productMapper;  //产品的Mapper层接口
     private final ReportFileService reportFileService;  //报告系统文件的Service层实现类
-    private final AssoProductFileServiceImpl assoProductFileService;  //产品文件关联的Service层实现类
+    private final IAssoProductFileService assoProductFileService;  //产品文件关联的Service层实现类
     private final CacheUtils cacheUtils;
     private final LoginUtils loginUtils;
 
     /**
-     * 新增产品的业务层方法
+     * 新增产品
      *
-     * @param productDTO 产品的前端传输DTO类
-     * @param files      产品附件
+     * @param productDTO 产品数据前端传输DTO对象
+     * @param files      附件
      */
     @Override
     public void addProduct(ProductDTO productDTO, List<MultipartFile> files) {
@@ -68,10 +68,10 @@ public class ProductServiceImpl implements IProductService {
     }
 
     /**
-     * 修改产品的业务层方法
+     * 修改产品
      *
-     * @param productIncludeFilesDTO 产品新数据
-     * @param files                  产品的新附件
+     * @param productIncludeFilesDTO 产品新数据
+     * @param files                  新附件
      */
     @Override
     public void updateProduct(ProductIncludeFilesDTO productIncludeFilesDTO, List<MultipartFile> files) {
@@ -84,7 +84,8 @@ public class ProductServiceImpl implements IProductService {
         productMapper.update(product);
 
         //2.根据reportId(报告id)关联查询出产品关联附件的数据信息
-        ProductIncludeFilesVO queryResult = productMapper.getStandardByReportId(product.getReportId());
+        Integer reportId = product.getReportId();
+        ProductIncludeFilesVO queryResult = productMapper.getWholeByReportId(reportId);
 
         //3.取出对象中的附件集合属性,遍历取出原所有附件fileIds
         List<ReportFileStandardVO> oldReportFiles = queryResult.getReportFiles();
@@ -123,36 +124,32 @@ public class ProductServiceImpl implements IProductService {
     }
 
     /**
-     * 根据报告id查询产品表数据和报告系统文件表中产品图片数据的业务层方法
+     * 根据报告reportId关联查询产品和产品附件数据(产品表、产品文件关联表、报告系统文件表)
      *
      * @param reportId 报告id
-     * @return 返回查询到的产品数据对象
+     * @return 返回查询到的产品和产品附件数据对象
      */
     @Override
     public ProductIncludeFilesVO getProduct(Integer reportId) {
         log.info("开始处理【查询产品】的业务,参数为:{}", reportId);
-        ProductIncludeFilesVO queryResult = productMapper.getStandardByReportId(reportId);
-        return productMapper.getStandardByReportId(reportId);
+        return productMapper.getWholeByReportId(reportId);
 
     }
 
     /**
-     * 根据报告id删除产品表数据和产品文件关联表数据和报告系统文件表中产品图片数据的业务层方法
+     * 根据报告reportId删除产品及所有关联数据
      *
      * @param reportId 报告id
      */
     @Override
     public void deleteProduct(Integer reportId) {
         log.info("开始处理【删除产品】的业务,参数为:{}", reportId);
-        //1.根据报告id删除产品表数据
-        productMapper.deleteByReportId(reportId);
-
-        //2.删除产品文件关联表数据:根据报告id关联查询产品数据,取出产品id,根据产品id删除产品与文件关联表数据
+        //1.根据产品productId删除产品文件关联表数据:先根据报告id关联查询产品关联附件的数据,取出产品id,根据产品id删除产品与文件关联表数据
         ProductIncludeFilesVO queryResult = this.getProduct(reportId);
         Integer productId = queryResult.getId();
         assoProductFileService.deleteAssoByProductId(productId);
 
-        //3.删除报告系统文件表中产品图片数据:根据报告id关联查询产品数据,取出产品附件,遍历取出fileId存入集合,调用报告业务层的通过fileId集合删除报告系统文件表数据方法
+        //2.根据附件fileId集合删除报告系统文件表数据:产品关联附件的数据中取出附件数据,遍历附件取出附件fileId存入集合,调用报告的业务层方法删除报告系统文件表数据
         List<ReportFileStandardVO> reportFiles = queryResult.getReportFiles();
         ArrayList<Integer> list = new ArrayList<>();
         for (ReportFileStandardVO reportFile : reportFiles) {
@@ -160,6 +157,10 @@ public class ProductServiceImpl implements IProductService {
             list.add(fileId);
         }
         reportFileService.deleteFiles(list);
+
+        //3.根据报告reportId删除产品表数据
+        productMapper.deleteByReportId(reportId);
+
         log.info("产品删除完成");
 
     }

+ 5 - 5
RMS/src/main/resources/mapper/AssoProductFileMapper.xml

@@ -4,7 +4,7 @@
 
 <mapper namespace="cn.cslg.report.mapper.AssoProductFileMapper">
 
-    <!--批量插入文件关联表数据-->
+    <!--批量插入产品文件关联表数据-->
     <!--int insertBatch(List<AssoProductFile> assoProductFiles);-->
     <insert id="insertBatch" useGeneratedKeys="true" keyProperty="id">
         insert into ASSO_PRODUCT_FILE (PRODUCT_ID, FILE_ID, FILE_USE_TYPE)
@@ -14,9 +14,9 @@
         </foreach>
     </insert>
 
-    <!--根据fileId(文件id)删除文件关联表数据-->
-    <!--int deleteByFileId(List<Integer> fileIds);-->
-    <delete id="deleteByFileId">
+    <!--根据附件fileId批量删除产品文件关联表数据-->
+    <!--int deleteByFileIds(List<Integer> fileIds);-->
+    <delete id="deleteByFileIds">
         delete
         from ASSO_PRODUCT_FILE
         where FILE_ID in (
@@ -26,7 +26,7 @@
         )
     </delete>
 
-    <!--根据产品id删除产品文件关联表数据-->
+    <!--根据产品reportId删除产品文件关联表数据-->
     <!--int deleteByProductId(Integer productId);-->
     <delete id="deleteByProductId">
         delete

+ 31 - 31
RMS/src/main/resources/mapper/ProductMapper.xml

@@ -4,7 +4,7 @@
 
 <mapper namespace="cn.cslg.report.mapper.ProductMapper">
 
-    <!--插入产品数据-->
+    <!--插入产品数据-->
     <!--int insert(Product product);-->
     <insert id="insert" useGeneratedKeys="true" keyProperty="id">
         insert into PRODUCT (PRODUCT_NAME, PRODUCT_IDENTIFY, PRODUCT_DESCRIPTION, SURVEY_AREA, PRODUCT_IMAGE,
@@ -15,7 +15,7 @@
                 #{createPersonId})
     </insert>
 
-    <!--根据id修改产品数据-->
+    <!--根据id修改产品数据-->
     <!--int update(Product product);-->
     <update id="update">
         update PRODUCT
@@ -57,41 +57,41 @@
         where ID = #{id}
     </update>
 
-    <!--根据reportId关联查询产品数据-->
-    <!--ProductIncludeFilesVO getStandardByReportId(Integer reportId);-->
-    <select id="getStandardByReportId" resultMap="getStandardByReportIdResultMap">
-        select p.ID,
-               p.product_name,
-               p.product_identify,
-               p.product_description,
-               p.survey_area,
-               p.product_image,
-               p.search_policy,
-               p.deadline,
-               p.focus_information,
-               p.report_id,
-               p.create_person_name,
-               p.create_person_id,
+    <!--根据报告reportId关联查询产品和产品附件数据(产品表、产品文件关联表、报告系统文件表)-->
+    <!--ProductIncludeFilesVO getWholeByReportId(Integer reportId);-->
+    <select id="getWholeByReportId" resultMap="WholeResultMap">
+        select p.ID p_ID,
+               product_name,
+               product_identify,
+               product_description,
+               survey_area,
+               product_image,
+               search_policy,
+               deadline,
+               focus_information,
+               report_id,
+               create_person_name,
+               create_person_id,
                rf.ID rf_ID,
-               rf.name,
-               rf.address,
-               rf.zid,
-               rf.remark,
-               rf.update_time,
-               rf.uid,
-               rf.type,
-               rf.size,
-               rf.suffix,
-               rf.file_name
+               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 apf.FILE_ID = rf.ID
-        where p.REPORT_ID = #{reportId}
+        where REPORT_ID = #{reportId}
         order by rf_ID
     </select>
 
-    <resultMap id="getStandardByReportIdResultMap" type="cn.cslg.report.common.model.vo.ProductIncludeFilesVO">
-        <id column="id" property="id"/>
+    <resultMap id="WholeResultMap" type="cn.cslg.report.common.model.vo.ProductIncludeFilesVO">
+        <id column="p_ID" property="id"/>
         <result column="PRODUCT_NAME" property="productName"/>
         <result column="PRODUCT_IDENTIFY" property="productIdentify"/>
         <result column="PRODUCT_DESCRIPTION" property="productDescription"/>
@@ -118,7 +118,7 @@
         </collection>
     </resultMap>
 
-    <!--根据报告id删除产品表数据-->
+    <!--根据报告reportId删除产品表数据-->
     <!--int deleteByReportId(Integer reportId);-->
     <delete id="deleteByReportId">
         delete

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


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


+ 61 - 27
RMS/target/classes/mapper/ProductMapper.xml

@@ -58,40 +58,40 @@
     </update>
 
     <!--根据reportId关联查询产品数据-->
-    <!--ProductIncludeFilesVO getStandardByReportId(Integer reportId);-->
-    <select id="getStandardByReportId" resultMap="getStandardByReportIdResultMap">
-        select p.ID,
-               p.product_name,
-               p.product_identify,
-               p.product_description,
-               p.survey_area,
-               p.product_image,
-               p.search_policy,
-               p.deadline,
-               p.focus_information,
-               p.report_id,
-               p.create_person_name,
-               p.create_person_id,
+    <!--ProductIncludeFilesVO getWholeByReportId(Integer reportId);-->
+    <select id="getWholeByReportId" resultMap="WholeResultMap">
+        select p.ID p_ID,
+               product_name,
+               product_identify,
+               product_description,
+               survey_area,
+               product_image,
+               search_policy,
+               deadline,
+               focus_information,
+               report_id,
+               create_person_name,
+               create_person_id,
                rf.ID rf_ID,
-               rf.name,
-               rf.address,
-               rf.zid,
-               rf.remark,
-               rf.update_time,
-               rf.uid,
-               rf.type,
-               rf.size,
-               rf.suffix,
-               rf.file_name
+               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 apf.FILE_ID = rf.ID
-        where p.REPORT_ID = #{reportId}
+        where REPORT_ID = #{reportId}
         order by rf_ID
     </select>
 
-    <resultMap id="getStandardByReportIdResultMap" type="cn.cslg.report.common.model.vo.ProductIncludeFilesVO">
-        <id column="id" property="id"/>
+    <resultMap id="WholeResultMap" type="cn.cslg.report.common.model.vo.ProductIncludeFilesVO">
+        <id column="p_ID" property="id"/>
         <result column="PRODUCT_NAME" property="productName"/>
         <result column="PRODUCT_IDENTIFY" property="productIdentify"/>
         <result column="PRODUCT_DESCRIPTION" property="productDescription"/>
@@ -118,6 +118,40 @@
         </collection>
     </resultMap>
 
+    <!--根据reportId查询产品数据-->
+    <!--ProductStandardVO getStandardByReportId(Integer reportId);-->
+    <select id="getStandardByReportId" resultMap="StandardResultMap">
+        select id,
+               product_name,
+               product_identify,
+               product_description,
+               survey_area,
+               product_image,
+               search_policy,
+               deadline,
+               focus_information,
+               report_id,
+               create_person_name,
+               create_person_id
+        from PRODUCT
+        where REPORT_ID = #{reportId}
+    </select>
+
+    <resultMap id="StandardResultMap" type="cn.cslg.report.common.model.vo.ProductStandardVO">
+        <id column="id" property="id"/>
+        <result column="PRODUCT_NAME" property="productName"/>
+        <result column="PRODUCT_IDENTIFY" property="productIdentify"/>
+        <result column="PRODUCT_DESCRIPTION" property="productDescription"/>
+        <result column="SURVEY_AREA" property="surveyArea"/>
+        <result column="PRODUCT_IMAGE" property="productImage"/>
+        <result column="SEARCH_POLICY" property="searchPolicy"/>
+        <result column="DEADLINE" property="deadLine"/>
+        <result column="FOCUS_INFORMATION" property="focusInformation"/>
+        <result column="REPORT_ID" property="reportId"/>
+        <result column="CREATE_PERSON_NAME" property="createPersonName"/>
+        <result column="CREATE_PERSON_ID" property="createPersonId"/>
+    </resultMap>
+
     <!--根据报告id删除产品表数据-->
     <!--int deleteByReportId(Integer reportId);-->
     <delete id="deleteByReportId">