Browse Source

代码新增bp附件、其他附件、备案时间

zjc 1 năm trước cách đây
mục cha
commit
e075969e00

+ 27 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectPoolController.java

@@ -147,7 +147,7 @@ public class TProjectPoolController extends BaseController
         // todo 设置公司信息关联关系
         tProjectCompany.setProjectPoolId(tProjectPool.getId());
 
-        // todo 保存附件信息
+        // todo 保存公司附件信息
         List<TUnifyFile> tUnifyFileList = tProjectPool.getListFile();
         if(!tUnifyFileList.isEmpty()){
             for (TUnifyFile tUnifyFile:
@@ -160,6 +160,32 @@ public class TProjectPoolController extends BaseController
             }
         }
 
+        // todo 保存BP附件信息
+        List<TUnifyFile> bpFileList = tProjectPool.getBpFile();
+        if(!bpFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    bpFileList) {
+                tUnifyFile.setFileId(tProjectPool.getId());
+                tUnifyFile.setFileBusinessId(tProjectPool.getId());//项目ID
+                tUnifyFile.setUploadType(String.valueOf(FileType.BP.ordinal()));//文件类型:BP
+                tUnifyFile.setCreateBy(getNickName());
+                tUnifyFileService.insertTUnifyFile(tUnifyFile);
+            }
+        }
+
+        // todo 保存其他附件信息
+        List<TUnifyFile> otherFileList = tProjectPool.getOtherFile();
+        if(!otherFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    otherFileList) {
+                tUnifyFile.setFileId(tProjectPool.getId());
+                tUnifyFile.setFileBusinessId(tProjectPool.getId());//项目ID
+                tUnifyFile.setUploadType(String.valueOf(FileType.OTHER.ordinal()));//文件类型:OTHER
+                tUnifyFile.setCreateBy(getNickName());
+                tUnifyFileService.insertTUnifyFile(tUnifyFile);
+            }
+        }
+
         tProjectCompanyService.insertTProjectCompany(tProjectCompany);
         tProjectContactsService.insertTProjectContacts(tProjectContacts);
         // todo 增加项目创建记录

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/enums/FileType.java

@@ -42,4 +42,8 @@ public enum FileType {
      * 尽职调查
      */
     INVESTIGATE,
+    /**
+     * BP附件类型
+     */
+    BP,
 }

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectCompany.java

@@ -69,6 +69,10 @@ public class TProjectCompany extends BaseEntity
     /** 状态 */
     private String delFlag;
 
+    /** 备案时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String filingTime;
+
     /**
      * 附件信息
      */
@@ -209,6 +213,14 @@ public class TProjectCompany extends BaseEntity
         this.listFile = listFile;
     }
 
+    public String getFilingTime() {
+        return filingTime;
+    }
+
+    public void setFilingTime(String filingTime) {
+        this.filingTime = filingTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 26 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectPool.java

@@ -152,6 +152,16 @@ public class TProjectPool extends BaseEntity
      */
     private List<TUnifyFile> listFile;
 
+    /**
+     * bp附件信息
+     */
+    private List<TUnifyFile> bpFile;
+
+    /**
+     * 其他附件信息
+     */
+    private List<TUnifyFile> otherFile;
+
     /**
      * 阶段名称
      */
@@ -482,6 +492,22 @@ public class TProjectPool extends BaseEntity
         this.stateName = stateName;
     }
 
+    public List<TUnifyFile> getBpFile() {
+        return bpFile;
+    }
+
+    public void setBpFile(List<TUnifyFile> bpFile) {
+        this.bpFile = bpFile;
+    }
+
+    public List<TUnifyFile> getOtherFile() {
+        return otherFile;
+    }
+
+    public void setOtherFile(List<TUnifyFile> otherFile) {
+        this.otherFile = otherFile;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/tool/mapper/TUnifyFileMapper.java

@@ -88,5 +88,5 @@ public interface TUnifyFileMapper
      * @param fileBusinessIds
      * @return
      */
-    int updateTUnifyFileBusinessIds(@Param("fileBusinessIds")String[] fileBusinessIds);
+    int updateTUnifyFileBusinessIds(String[] fileBusinessIds);
 }

+ 6 - 2
ruoyi-system/src/main/resources/mapper/invest/TProjectCompanyMapper.xml

@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="businessAddress"    column="business_address"    />
         <result property="actualBod"    column="actual_bod"    />
         <result property="phone"    column="phone"    />
-        <result property="type"    column="type"    />
+        <result property="filingTime"    column="filing_time"    />
+        <result property="delFlag"    column="del_flag"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTProjectCompanyVo">
-        select id, company_name, project_pool_id, company_code, start_time, end_time, registered_capital, registered_address, paid_capital, business_address, actual_bod, phone, type, del_flag, create_by, create_time, update_by, update_time from t_project_company
+        select id, company_name, project_pool_id, company_code, start_time, end_time, registered_capital, registered_address, paid_capital, business_address, actual_bod, phone, type,filing_time, del_flag, create_by, create_time, update_by, update_time from t_project_company
     </sql>
 
     <select id="selectTProjectCompanyList" parameterType="TProjectCompany" resultMap="TProjectCompanyResult">
@@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="actualBod != null">actual_bod,</if>
             <if test="phone != null">phone,</if>
             <if test="type != null">type,</if>
+            <if test="filingTime != null">filing_time,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -82,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="actualBod != null">#{actualBod},</if>
             <if test="phone != null">#{phone},</if>
             <if test="type != null">#{type},</if>
+            <if test="filingTime != null">#{filingTime},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -105,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="actualBod != null">actual_bod = #{actualBod},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="type != null">type = #{type},</if>
+            <if test="filingTime != null"> filing_time = #{filingTime},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>

+ 1 - 0
ruoyi-system/src/main/resources/mapper/invest/TStudyInformationMapper.xml

@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="contractName != null  and contractName != ''"> and contract_name like concat('%', #{contractName}, '%')</if>
             <if test="contractType != null  and contractType != ''"> and contract_type = #{contractType}</if>
             <if test="fileBusinessId != null  and fileBusinessId != ''"> and file_business_id = #{fileBusinessId}</if>
+            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
         </where>
     </select>