Procházet zdrojové kódy

文件业务关联

zishan-an před 1 rokem
rodič
revize
4920904709

+ 2 - 2
src/main/java/com/kexun/controller/ReportController.java

@@ -36,9 +36,9 @@ public class ReportController {
 
 
     @GetMapping("reportFileList")
-    public Result businessToDoList() {
+    public Result businessToDoList(@RequestParam String businessNum) {
         JSONObject resJson=new JSONObject();
-        List<ReportFileEntity> list= reportFileService.list();
+        List<ReportFileEntity> list= reportFileService.QueryFileByNum(businessNum);
         resJson.put("report_file_list",list);
 
         return Result.success("ok",resJson);

+ 3 - 0
src/main/java/com/kexun/entity/BusinessInfo.java

@@ -41,6 +41,9 @@ public class BusinessInfo implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
     private Date createTime;
 
+    @TableField(value = "file_name")
+    private String fileName;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 }

+ 3 - 0
src/main/java/com/kexun/mapper/ReportFileMapper.java

@@ -3,12 +3,15 @@ package com.kexun.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.kexun.entity.ReportFileEntity;
 
+import java.util.List;
+
 /**
  * @Entity com.kexun.entity.PartnerInfo
  */
 public interface ReportFileMapper extends BaseMapper<ReportFileEntity> {
 
 
+    List<ReportFileEntity> QueryFileByNum(String businessNum);
 }
 
 

+ 3 - 0
src/main/java/com/kexun/service/ReportFileService.java

@@ -3,12 +3,15 @@ package com.kexun.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.kexun.entity.ReportFileEntity;
 
+import java.util.List;
+
 /**
  * 文件信息表service
  */
 public interface ReportFileService extends IService<ReportFileEntity> {
 
 
+    List<ReportFileEntity> QueryFileByNum(String businessNum);
 }
 
 

+ 12 - 2
src/main/java/com/kexun/service/impl/ReportFileServiceImpl.java

@@ -1,11 +1,16 @@
 package com.kexun.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.kexun.entity.BusinessInfo;
 import com.kexun.entity.ReportFileEntity;
+import com.kexun.mapper.BusinessMapper;
 import com.kexun.mapper.ReportFileMapper;
 import com.kexun.service.ReportFileService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * 报文文件服务Service
  */
@@ -13,8 +18,13 @@ import org.springframework.stereotype.Service;
 public class ReportFileServiceImpl extends ServiceImpl<ReportFileMapper, ReportFileEntity>
     implements ReportFileService {
 
-
-
+    @Resource
+    ReportFileMapper reportFileMapper;
+    @Override
+    public List<ReportFileEntity> QueryFileByNum(String businessNum) {
+        List<ReportFileEntity> l = reportFileMapper.QueryFileByNum(businessNum);
+        return l;
+    }
 
 }
 

+ 1 - 0
src/main/resources/mapper/BusinessMapper.xml

@@ -146,6 +146,7 @@
             report_info.certificate_num,
             report_info.coop_business_num,
             report_info.product_num,
+            report_info.file_name,
             cooperator_info.cooperator_name,
             prd_product.product_name
         FROM

+ 8 - 1
src/main/resources/mapper/ReportFileMapper.xml

@@ -24,7 +24,14 @@
         id,rpt_no,file_name_xml,file_name_txt,file_name_model,create_time
     </sql>
 
-
+    <select id="QueryFileByNum" resultType="com.kexun.entity.ReportFileEntity">
+        SELECT *
+        FROM
+            report_file
+
+        WHERE
+            report_file.business_num = #{businessNum}
+    </select>
 
 
 </mapper>