Browse Source

优化了股东退股

LiRong 2 months ago
parent
commit
f7205bc433

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

@@ -83,9 +83,9 @@ public class ShareholderInfoServiceImpl extends ServiceImpl<ShareholderInfoMappe
         }
         }
         //校验重复添加
-
         Long l = shareholderInfoMapper.selectShareholderInfo(shareholderInfo.getShareholderName());
         if (l != null){
+
             throw new RuntimeException("已存在股东:"+shareholderInfo.getShareholderName());
         }
         return this.save(shareholderInfo);
@@ -309,7 +309,7 @@ public class ShareholderInfoServiceImpl extends ServiceImpl<ShareholderInfoMappe
     public void exitUpdateById(Long shareholderId){
         ShareholderInfo info = new ShareholderInfo();
         info.setAncestors(null);
-        info.setParentId(0L);
+        info.setParentId(null);
         info.setShareholdingRatio(null);
         info.setControlledCompany(null);
         info.setNodeType(null);

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

@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from e_shareholder_info
         where 1=1
         <if test="state == 1 ">
-           and parent_id is null
+           and parent_id is not null
         </if>
         <if test="state == 2 ">
            and parent_id is not null

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

@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
 			</if>
 	    </where>
+	    order by create_time desc
 	</select>
 	
 	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">