Sfoglia il codice sorgente

增加了股权交易自己转自己校验以及根据公司选择交易人
增加了消息发布表决状态
增加了

LiRong 1 mese fa
parent
commit
2d3e80083a

+ 2 - 2
ruoyi-equity/src/main/java/com/ruoyi/equity/controller/ShareholderInfoController.java

@@ -63,8 +63,8 @@ public class ShareholderInfoController extends BaseController {
      */
     @ApiOperation("获取股东列表,根据股东状态1未入股2已入股")
     @GetMapping("/getNotShareholderList")
-    public AjaxResult getNotShareholderList(Integer state) {
-        List<ShareholderInfo> list = shareholderInfoService.getNotShareholderList(state);
+    public AjaxResult getNotShareholderList(Integer state,Long companyId) {
+        List<ShareholderInfo> list = shareholderInfoService.getNotShareholderList(state,companyId);
         return success(list);
     }
 

+ 3 - 0
ruoyi-equity/src/main/java/com/ruoyi/equity/domain/vo/EquityMessageRecordVO.java

@@ -1,6 +1,7 @@
 package com.ruoyi.equity.domain.vo;
 
 import com.ruoyi.equity.domain.EquityMessageRecord;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -14,5 +15,7 @@ public class EquityMessageRecordVO extends EquityMessageRecord {
     @ApiModelProperty("状态名称")
     private String stateName;
 
+    @ApiModelProperty("表决状态")
+    private String voteStatus;
 
 }

+ 3 - 1
ruoyi-equity/src/main/java/com/ruoyi/equity/mapper/ShareholderInfoMapper.java

@@ -73,7 +73,9 @@ public interface ShareholderInfoMapper extends BaseMapper<ShareholderInfo>
 
     List<ShareholderDownPicVO> getAllDownNode();
 
-    List<ShareholderInfo> getNotShareholderList(@Param("state") Integer state);
+    List<ShareholderInfo> getNotShareholderList(@Param("state") Integer state,@Param("companyId") Long companyId);
+
+
 
     List<ShareholderInfo> getAllCompany();
 

+ 1 - 1
ruoyi-equity/src/main/java/com/ruoyi/equity/service/IShareholderInfoService.java

@@ -68,7 +68,7 @@ public interface IShareholderInfoService extends IService<ShareholderInfo>
 
     ShareholderPicVO getShareholderPic();
 
-    List<ShareholderInfo> getNotShareholderList(Integer state);
+    List<ShareholderInfo> getNotShareholderList(Integer state,Long companyId);
 
     List<ShareholderInfo> getAllCompany();
 

+ 3 - 0
ruoyi-equity/src/main/java/com/ruoyi/equity/service/impl/EquityTransferRecordServiceImpl.java

@@ -96,6 +96,9 @@ public class EquityTransferRecordServiceImpl extends ServiceImpl<EquityTransferR
         if (Objects.isNull(seller) || Objects.isNull(buyer)){
             throw new RuntimeException("转让方或受让方不存在");
         }
+        if (seller.equals(buyer)){
+            throw new RuntimeException("转让方和被转让方不能是同一家公司");
+        }
         BigDecimal sellerAfterRatio = seller.getShareholdingRatio().subtract(equityTransferRecord.getTransferRatio());
         BigDecimal buyerAfterRatio = buyer.getShareholdingRatio().add(equityTransferRecord.getTransferRatio());
         if (sellerAfterRatio.compareTo(new BigDecimal(0)) < 0){

+ 3 - 2
ruoyi-equity/src/main/java/com/ruoyi/equity/service/impl/ShareholderInfoServiceImpl.java

@@ -230,8 +230,9 @@ public class ShareholderInfoServiceImpl extends ServiceImpl<ShareholderInfoMappe
     }
 
     @Override
-    public List<ShareholderInfo> getNotShareholderList(Integer state) {
-        return shareholderInfoMapper.getNotShareholderList(state);
+    public List<ShareholderInfo> getNotShareholderList(Integer state, Long companyId) {
+
+        return shareholderInfoMapper.getNotShareholderList(state,companyId);
     }
 
     @Override

+ 7 - 6
ruoyi-equity/src/main/resources/mapper/equity/EquityMessageRecordMapper.xml

@@ -31,19 +31,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectEquityMessageRecordList" resultType="com.ruoyi.equity.domain.vo.EquityMessageRecordVO">
-            select * from e_equity_message_record
-            where user_id = #{userId} and del_flag = '0'
+            select * ,(select vote_status from e_send_message_record esmr where eemr.send_id =esmr.send_message_id ) as voteStatus
+            from e_equity_message_record eemr
+            where eemr.user_id = #{userId} and eemr.del_flag = '0'
         <if test="emr.msgType != null  and emr.msgType != ''"> and msg_type = #{emr.msgType}</if>
 
         <if test="emr.selectDate != null and emr.selectDate != ''">
-            and msg_time &gt;= DATE(#{emr.selectDate})
+            and eemr.msg_time &gt;= DATE(#{emr.selectDate})
         </if>
         <if test="emr.selectDate != null and emr.selectDate != ''">
-            and msg_time &lt; DATE(DATE_ADD(#{emr.selectDate}, INTERVAL 1 DAY))
+            and eemr.msg_time &lt; DATE(DATE_ADD(#{emr.selectDate}, INTERVAL 1 DAY))
         </if>
 
         <if test="emr.isRead != null  and emr.isRead != ''">
-            and is_read =
+            and eemr.is_read =
             <choose>
                 <when test="emr.isRead == '未读'">0</when>
                 <when test="emr.isRead == '已读'">1</when>
@@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <otherwise>null</otherwise>
             </choose>
         </if>
-        order by create_time desc
+        order by eemr.create_time desc
         <!-- <if test="userId != null  and userId != ''"> and user_id = #{userId}</if>-->
         <!-- <if test="msgContent != null  and msgContent != ''"> and msg_content = #{msgContent}</if>-->
     </select>

+ 1 - 1
ruoyi-equity/src/main/resources/mapper/equity/ShareholderInfoMapper.xml

@@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
            and parent_id is null
         </if>
         <if test="state == 2 ">
-           and parent_id is not null
+           and parent_id is not null <if test="companyId != null and companyId != ''"> and controlled_company = #{companyId}</if>
         </if>
         order by update_time desc
     </select>