Browse Source

Merge branch 'invest-dev' of http://git.dgtis.com/15896567520/RuoYi-flowable-master into invest-dev

armg 1 year ago
parent
commit
4549f8471a
21 changed files with 253 additions and 19 deletions
  1. 3 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectChannelController.java
  2. 12 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectInformationController.java
  3. 8 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectMeetingController.java
  4. 16 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
  5. 13 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectChannel.java
  6. 13 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectInformation.java
  7. 24 0
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectMeeting.java
  8. 12 1
      ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectPool.java
  9. 7 0
      ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectChannelMapper.java
  10. 8 0
      ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectInformationMapper.java
  11. 7 0
      ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectMeetingMapper.java
  12. 7 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectChannelService.java
  13. 8 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectInformationService.java
  14. 7 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectMeetingService.java
  15. 10 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectChannelServiceImpl.java
  16. 11 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectInformationServiceImpl.java
  17. 10 0
      ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectMeetingServiceImpl.java
  18. 12 1
      ruoyi-system/src/main/resources/mapper/invest/TProjectChannelMapper.xml
  19. 23 7
      ruoyi-system/src/main/resources/mapper/invest/TProjectInformationMapper.xml
  20. 27 9
      ruoyi-system/src/main/resources/mapper/invest/TProjectMeetingMapper.xml
  21. 15 1
      ruoyi-system/src/main/resources/mapper/invest/TProjectPoolMapper.xml

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectChannelController.java

@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.enums.FileType;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
@@ -102,6 +103,8 @@ public class TProjectChannelController extends BaseController
     {
         tProjectChannel.setId(IdUtils.fastSimpleUUID());
         tProjectChannel.setCreateBy(getNickName());
+        int number = tProjectChannelService.selectTProjectChannelCode(DateUtils.dateTimeNow("YYYY"));
+        tProjectChannel.setChannelCode(tProjectChannel.getChannelGroup()+"-"+ DateUtils.lastTwoDigits() +"-"+ String.format("%03d",number+1));
         // todo 保存附件信息
         List<TUnifyFile> tUnifyFileList = tProjectChannel.getListFile();
         if(!tUnifyFileList.isEmpty()){

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectInformationController.java

@@ -152,4 +152,16 @@ public class TProjectInformationController extends BaseController
     {
         return toAjax(tProjectInformationService.updateTProjectInformationByIds(ids));
     }
+
+    /**
+     * 根据项目ID获取会议记录
+     */
+    @ApiOperation("根据项目ID获取会议记录")
+    @PreAuthorize("@ss.hasPermi('invest:information:query')")
+    @GetMapping(value = "/listProjectPoolId")
+    public AjaxResult listProjectPoolId(String projectPoolId)
+    {
+        return success(tProjectInformationService.listProjectPoolId(projectPoolId));
+    }
+
 }

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectMeetingController.java

@@ -5,6 +5,8 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.enums.FileType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
@@ -100,6 +102,12 @@ public class TProjectMeetingController extends BaseController
         tProjectMeeting.setId(IdUtils.fastSimpleUUID());
         tProjectMeeting.setCreateBy(getNickName());
 
+        int number = tProjectMeetingService.selectTProjectMeetingCode(DateUtils.dateTimeNow("YYYY"));
+        if(tProjectMeeting.getMeetingType().equals("LX")||tProjectMeeting.getMeetingType().equals("TJ")){
+            tProjectMeeting.setMeetingCode(tProjectMeeting.getProjectGroup()+"-"+ DateUtils.lastTwoDigits() +"-"+tProjectMeeting.getMeetingType()+"-"+ String.format("%03d",number+1));
+        }else{
+            tProjectMeeting.setMeetingCode(DateUtils.dateNow()+ String.format("%03d",number+1));
+        }
         // todo 保存附件信息
         List<TUnifyFile> tUnifyFileList = tProjectMeeting.getListFile();
         if(!tUnifyFileList.isEmpty()){

+ 16 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -8,6 +8,7 @@ import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
+import java.util.Calendar;
 import java.util.Date;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
@@ -24,6 +25,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
 
     public static String YYYY_MM_DD = "yyyy-MM-dd";
 
+    public static String YYYYMMDD = "yyyyMMdd";
     public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
 
     public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
@@ -58,6 +60,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
     }
 
+    public static final String dateNow()
+    {
+        return dateTimeNow(YYYYMMDD);
+    }
+
     public static final String dateTimeNow()
     {
         return dateTimeNow(YYYYMMDDHHMMSS);
@@ -188,4 +195,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
         return Date.from(zdt.toInstant());
     }
+
+    /**
+     * 获取当前年后两位数字
+     */
+    public static int lastTwoDigits(){
+        Calendar calendar = Calendar.getInstance();
+        int year = calendar.get(Calendar.YEAR);
+        return year % 100;
+    }
 }

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectChannel.java

@@ -33,6 +33,10 @@ public class TProjectChannel extends BaseEntity
     @Excel(name = "类别")
     private String channelType;
 
+    /** 所属组别 */
+    @Excel(name = "所属组别")
+    private String channelGroup;
+
     /** 简介 */
     private String channelBlurb;
 
@@ -183,12 +187,21 @@ public class TProjectChannel extends BaseEntity
         this.listFile = listFile;
     }
 
+    public String getChannelGroup() {
+        return channelGroup;
+    }
+
+    public void setChannelGroup(String channelGroup) {
+        this.channelGroup = channelGroup;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
             .append("channelName", getChannelName())
             .append("channelCode", getChannelCode())
+            .append("channelGroup", getChannelGroup())
             .append("channelType", getChannelType())
             .append("channelBlurb", getChannelBlurb())
             .append("contacts", getContacts())

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectInformation.java

@@ -51,6 +51,11 @@ public class TProjectInformation extends BaseEntity
      */
     private List<TUnifyFile> listFile;
 
+    /**
+     * 项目池
+     */
+    private TProjectPool tProjectPool;
+
     public void setId(String id) 
     {
         this.id = id;
@@ -128,6 +133,14 @@ public class TProjectInformation extends BaseEntity
         return listFile;
     }
 
+    public TProjectPool gettProjectPool() {
+        return tProjectPool;
+    }
+
+    public void settProjectPool(TProjectPool tProjectPool) {
+        this.tProjectPool = tProjectPool;
+    }
+
     public void setListFile(List<TUnifyFile> listFile) {
         this.listFile = listFile;
     }

+ 24 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectMeeting.java

@@ -67,6 +67,14 @@ public class TProjectMeeting extends BaseEntity
      */
     private List<TUnifyFile> listFile;
 
+    /**
+     * 项目池
+     */
+    private TProjectPool tProjectPool;
+
+    /** 所属组别 */
+    private String projectGroup;
+
     public void setId(String id) 
     {
         this.id = id;
@@ -175,6 +183,22 @@ public class TProjectMeeting extends BaseEntity
         this.listFile = listFile;
     }
 
+    public TProjectPool gettProjectPool() {
+        return tProjectPool;
+    }
+
+    public void settProjectPool(TProjectPool tProjectPool) {
+        this.tProjectPool = tProjectPool;
+    }
+
+    public String getProjectGroup() {
+        return projectGroup;
+    }
+
+    public void setProjectGroup(String projectGroup) {
+        this.projectGroup = projectGroup;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 12 - 1
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectPool.java

@@ -141,9 +141,12 @@ public class TProjectPool extends BaseEntity
     /** 公司信息 */
     private TProjectCompany tProjectCompany;
 
-    /** 公司信息 */
+    /** 联系人信息 */
     private TProjectContacts tProjectContacts;
 
+    /** 渠道信息 */
+    private TProjectChannel tProjectChannel;
+
     /**
      * 附件信息
      */
@@ -458,6 +461,14 @@ public class TProjectPool extends BaseEntity
         this.stageName = stageName;
     }
 
+    public TProjectChannel gettProjectChannel() {
+        return tProjectChannel;
+    }
+
+    public void settProjectChannel(TProjectChannel tProjectChannel) {
+        this.tProjectChannel = tProjectChannel;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectChannelMapper.java

@@ -67,4 +67,11 @@ public interface TProjectChannelMapper
      * @return 结果
      */
     public int updateTProjectChannelByIds(String[] ids);
+
+    /**
+     * 根据年查询渠道编号
+     * @param year
+     * @return
+     */
+    int selectTProjectChannelCode(String year);
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectInformationMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.invest.mapper;
 
 import com.ruoyi.invest.domain.TProjectInformation;
+import com.ruoyi.invest.domain.TProjectMeeting;
 
 import java.util.List;
 
@@ -67,4 +68,11 @@ public interface TProjectInformationMapper
      * @return 结果
      */
     public int updateTProjectInformationByIds(String[] ids);
+
+    /**
+     * 根据项目ID获取会议记录
+     * @param projectPoolId
+     * @return
+     */
+    List<TProjectInformation> listProjectPoolId(String projectPoolId);
 }

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectMeetingMapper.java

@@ -74,4 +74,11 @@ public interface TProjectMeetingMapper
      * @return
      */
     List<TProjectMeeting> listProjectPoolId(String projectPoolId);
+
+    /**
+     *  根据年查询会议编号
+     * @param year
+     * @return
+     */
+    Integer selectTProjectMeetingCode(String year);
 }

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectChannelService.java

@@ -66,4 +66,11 @@ public interface ITProjectChannelService
      * @return
      */
     public int updateTProjectChannelByIds(String[] ids);
+
+    /**
+     * 根据年查询渠道编号
+     * @param year
+     * @return
+     */
+    int selectTProjectChannelCode(String year);
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectInformationService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.invest.service;
 
 import com.ruoyi.invest.domain.TProjectInformation;
+import com.ruoyi.invest.domain.TProjectMeeting;
 
 import java.util.List;
 
@@ -67,4 +68,11 @@ public interface ITProjectInformationService
      * @return 结果
      */
     public int updateTProjectInformationByIds(String[] ids);
+
+    /**
+     * 根据项目ID获取会议记录
+     * @param projectPoolId
+     * @return
+     */
+    public List<TProjectInformation> listProjectPoolId(String projectPoolId);
 }

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectMeetingService.java

@@ -74,4 +74,11 @@ public interface ITProjectMeetingService
      * @return
      */
     public List<TProjectMeeting> listProjectPoolId(String projectPoolId);
+
+    /**
+     * 根据年查询会议编号
+     * @param year
+     * @return
+     */
+    public Integer selectTProjectMeetingCode(String year);
 }

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectChannelServiceImpl.java

@@ -106,4 +106,14 @@ public class TProjectChannelServiceImpl implements ITProjectChannelService
     public int updateTProjectChannelByIds(String[] ids) {
         return tProjectChannelMapper.updateTProjectChannelByIds(ids);
     }
+
+    /**
+     * 根据年查询渠道编号
+     * @param year
+     * @return
+     */
+    @Override
+    public int selectTProjectChannelCode(String year) {
+        return tProjectChannelMapper.selectTProjectChannelCode(year);
+    }
 }

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectInformationServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.invest.service.impl;
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.invest.domain.TProjectInformation;
+import com.ruoyi.invest.domain.TProjectMeeting;
 import com.ruoyi.invest.mapper.TProjectInformationMapper;
 import com.ruoyi.invest.service.ITProjectInformationService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -104,4 +105,14 @@ public class TProjectInformationServiceImpl implements ITProjectInformationServi
     public int updateTProjectInformationByIds(String[] ids) {
         return tProjectInformationMapper.updateTProjectInformationByIds(ids);
     }
+
+    /**
+     * 根据项目ID获取会议记录
+     * @param projectPoolId
+     * @return
+     */
+    @Override
+    public List<TProjectInformation> listProjectPoolId(String projectPoolId) {
+        return tProjectInformationMapper.listProjectPoolId(projectPoolId);
+    }
 }

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectMeetingServiceImpl.java

@@ -114,4 +114,14 @@ public class TProjectMeetingServiceImpl implements ITProjectMeetingService
     public List<TProjectMeeting> listProjectPoolId(String projectPoolId) {
         return tProjectMeetingMapper.listProjectPoolId(projectPoolId);
     }
+
+    /**
+     * 根据年查询会议编号
+     * @param year
+     * @return
+     */
+    @Override
+    public Integer selectTProjectMeetingCode(String year) {
+        return tProjectMeetingMapper.selectTProjectMeetingCode(year);
+    }
 }

+ 12 - 1
ruoyi-system/src/main/resources/mapper/invest/TProjectChannelMapper.xml

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="channelName"    column="channel_name"    />
         <result property="channelCode"    column="channel_code"    />
         <result property="channelType"    column="channel_type"    />
+        <result property="channelGroup"    column="channel_group"    />
         <result property="channelBlurb"    column="channel_blurb"    />
         <result property="contacts"    column="contacts"    />
         <result property="telephone"    column="telephone"    />
@@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTProjectChannelVo">
-        select id, channel_name, channel_code, channel_type, channel_blurb, contacts, telephone, address, channel_head, status, mark, del_flag, create_by, create_time, update_by, update_time from t_project_channel
+        select id, channel_name, channel_code, channel_type, channel_group, channel_blurb, contacts, telephone, address, channel_head, status, mark, del_flag, create_by, create_time, update_by, update_time from t_project_channel
     </sql>
 
     <select id="selectTProjectChannelList" parameterType="TProjectChannel" resultMap="TProjectChannelResult">
@@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             del_flag = 0
             <if test="channelName != null  and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
             <if test="channelCode != null  and channelCode != ''"> and channel_code = #{channelCode}</if>
+            <if test="channelGroup != null  and channelGroup != ''"> and channel_group = #{channelGroup}</if>
             <if test="channelType != null  and channelType != ''"> and channel_type = #{channelType}</if>
             <if test="contacts != null  and contacts != ''"> and contacts = #{contacts}</if>
             <if test="telephone != null  and telephone != ''"> and telephone = #{telephone}</if>
@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channelName != null">channel_name,</if>
             <if test="channelCode != null">channel_code,</if>
             <if test="channelType != null">channel_type,</if>
+            <if test="channelGroup != null">channel_group,</if>
             <if test="channelBlurb != null">channel_blurb,</if>
             <if test="contacts != null">contacts,</if>
             <if test="telephone != null">telephone,</if>
@@ -71,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channelName != null">#{channelName},</if>
             <if test="channelCode != null">#{channelCode},</if>
             <if test="channelType != null">#{channelType},</if>
+            <if test="channelGroup != null">#{channelGroup},</if>
             <if test="channelBlurb != null">#{channelBlurb},</if>
             <if test="contacts != null">#{contacts},</if>
             <if test="telephone != null">#{telephone},</if>
@@ -92,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="channelName != null">channel_name = #{channelName},</if>
             <if test="channelCode != null">channel_code = #{channelCode},</if>
             <if test="channelType != null">channel_type = #{channelType},</if>
+            <if test="channelGroup != null">channel_group = #{channelGroup},</if>
             <if test="channelBlurb != null">channel_blurb = #{channelBlurb},</if>
             <if test="contacts != null">contacts = #{contacts},</if>
             <if test="telephone != null">telephone = #{telephone},</if>
@@ -128,4 +133,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
 
+    <select id="selectTProjectChannelCode" parameterType="String" resultType="java.lang.Integer">
+        select count(*) from t_project_channel
+        where channel_code like concat('%', #{year}, '%')
+    </select>
+
+
 </mapper>

+ 23 - 7
ruoyi-system/src/main/resources/mapper/invest/TProjectInformationMapper.xml

@@ -18,26 +18,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+
+        <association property="tProjectPool" javaType="TProjectPool"  resultMap="TProjectPoolResult" />
+    </resultMap>
+
+    <resultMap type="TProjectPool" id="TProjectPoolResult">
+        <result property="projectName"    column="project_name"    />
+        <result property="projectStage"    column="project_stage"    />
+        <result property="projectState"    column="project_state"    />
     </resultMap>
 
     <sql id="selectTProjectInformationVo">
-        select id, file_name, file_type, project_pool_id, project_stage, meeting_code, file_business_id, del_flag, remark, create_by, create_time, update_by, update_time from t_project_information
+        select a.id, a.file_name, a.file_type, a.project_pool_id, a.project_stage, a.meeting_code, a.file_business_id, a.del_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
+            b.project_name, b.project_stage, b.project_state
+        from t_project_information a
+            left join t_project_pool b ON a.project_pool_id = b.id
     </sql>
 
     <select id="selectTProjectInformationList" parameterType="TProjectInformation" resultMap="TProjectInformationResult">
         <include refid="selectTProjectInformationVo"/>
         <where>
-            del_flag = 0
-            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
-            <if test="fileType != null  and fileType != ''"> and file_type = #{fileType}</if>
-            <if test="projectStage != null  and projectStage != ''"> and project_stage = #{projectStage}</if>
-            <if test="meetingCode != null  and meetingCode != ''"> and meeting_code = #{meetingCode}</if>
+            a.del_flag = 0
+            <if test="fileName != null  and fileName != ''"> and a.file_name like concat('%', #{fileName}, '%')</if>
+            <if test="fileType != null  and fileType != ''"> and a.file_type = #{fileType}</if>
+            <if test="projectStage != null  and projectStage != ''"> and a.project_stage = #{projectStage}</if>
+            <if test="meetingCode != null  and meetingCode != ''"> and a.meeting_code = #{meetingCode}</if>
         </where>
     </select>
     
     <select id="selectTProjectInformationById" parameterType="String" resultMap="TProjectInformationResult">
         <include refid="selectTProjectInformationVo"/>
-        where id = #{id}
+        where a.id = #{id}
     </select>
         
     <insert id="insertTProjectInformation" parameterType="TProjectInformation">
@@ -113,4 +124,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
 
+    <select id="listProjectPoolId" parameterType="String" resultMap="TProjectInformationResult">
+        <include refid="selectTProjectInformationVo"/>
+        where a.project_pool_id = #{projectPoolId} and a.del_flag = 0
+    </select>
+
 </mapper>

+ 27 - 9
ruoyi-system/src/main/resources/mapper/invest/TProjectMeetingMapper.xml

@@ -20,27 +20,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+
+        <association property="tProjectPool" javaType="TProjectPool"  resultMap="TProjectPoolResult" />
+
+    </resultMap>
+
+    <resultMap type="TProjectPool" id="TProjectPoolResult">
+        <result property="projectName"    column="project_name"    />
+        <result property="projectStage"    column="project_stage"    />
+        <result property="projectState"    column="project_state"    />
+        <result property="projectGroup"    column="project_group"    />
+        <result property="projectCode"    column="project_code"    />
     </resultMap>
 
     <sql id="selectTProjectMeetingVo">
-        select id, meeting_theme, meeting_code, meeting_type, project_pool_id, start_time, end_time, place, promoter, participants, del_flag, create_by, create_time, update_by, update_time from t_project_meeting
+        select a.id, a.meeting_theme, a.meeting_code, a.meeting_type, a.project_pool_id, a.start_time, a.end_time, a.place, a.promoter, a.participants, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
+               b.project_name, b.project_stage, b.project_state, b.project_group ,b.project_code
+        from t_project_meeting a
+             left join t_project_pool b ON a.project_pool_id = b.id
     </sql>
 
     <select id="selectTProjectMeetingList" parameterType="TProjectMeeting" resultMap="TProjectMeetingResult">
         <include refid="selectTProjectMeetingVo"/>
         <where>
-            del_flag = 0
-            <if test="meetingTheme != null  and meetingTheme != ''"> and meeting_theme = #{meetingTheme}</if>
-            <if test="meetingCode != null  and meetingCode != ''"> and meeting_code = #{meetingCode}</if>
-            <if test="meetingType != null  and meetingType != ''"> and meeting_type = #{meetingType}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
+            a.del_flag = 0
+            <if test="meetingTheme != null  and meetingTheme != ''"> and a.meeting_theme = #{meetingTheme}</if>
+            <if test="meetingCode != null  and meetingCode != ''"> and a.meeting_code = #{meetingCode}</if>
+            <if test="meetingType != null  and meetingType != ''"> and a.meeting_type = #{meetingType}</if>
+            <if test="startTime != null "> and a.start_time = #{startTime}</if>
+            <if test="endTime != null "> and a.end_time = #{endTime}</if>
         </where>
     </select>
     
     <select id="selectTProjectMeetingById" parameterType="String" resultMap="TProjectMeetingResult">
         <include refid="selectTProjectMeetingVo"/>
-        where id = #{id}
+        where a.id = #{id}
     </select>
         
     <insert id="insertTProjectMeeting" parameterType="TProjectMeeting">
@@ -124,8 +138,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="listProjectPoolId" parameterType="String" resultMap="TProjectMeetingResult">
         <include refid="selectTProjectMeetingVo"/>
-        where project_pool_id = #{projectPoolId} and del_flag = 0
+        where a.project_pool_id = #{projectPoolId} and a.del_flag = 0
     </select>
 
+    <select id="selectTProjectMeetingCode" parameterType="String" resultType="java.lang.Integer">
+        select count(*) from t_project_meeting
+        where meeting_code like concat('%', #{year}, '%')
+    </select>
 
 </mapper>

File diff suppressed because it is too large
+ 15 - 1
ruoyi-system/src/main/resources/mapper/invest/TProjectPoolMapper.xml