Ver código fonte

修改员工合同与房间床位失效后列表不显示

953954216 5 meses atrás
pai
commit
acd7080be4

+ 1 - 0
ruoyi-modules/mz-organization-jg/src/main/resources/mapper/organization/YljgFwcdCwMapper.xml

@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectYljgFwcdCwList" parameterType="YljgFwcdCw" resultMap="YljgFwcdCwResult">
         <include refid="selectYljgFwcdCwVo"/>
         <where>
+            a.cwzt='1'
             <if test="id != null  and id != ''"> and a.id = #{id}</if>
             <if test="jgId != null  and jgId != ''"> and a.jg_id = #{jgId}</if>
             <if test="lyId != null  and lyId != ''"> and d.id = #{lyId}</if>

+ 1 - 0
ruoyi-modules/mz-organization-jg/src/main/resources/mapper/organization/YljgFwcdFjMapper.xml

@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectYljgFwcdFjList" parameterType="YljgFwcdFj" resultMap="YljgFwcdFjResult">
         <include refid="selectYljgFwcdFjVo"/>
         <where>
+            a.fjzt='1'
             <if test="id != null  and id != ''"> and a.id = #{id}</if>
             <if test="lyName != null  and lyName != ''"> and c.lymc like concat('%', #{lyName}, '%')</if>
             <if test="lcName != null  and lcName != ''"> and b.lcmc like concat('%', #{lcName}, '%')</if>

+ 2 - 1
ruoyi-modules/mz-organization-yggl/src/main/java/com/ruoyi/organization/service/impl/YljgYgHtxxServiceImpl.java

@@ -96,7 +96,8 @@ public class YljgYgHtxxServiceImpl implements IYljgYgHtxxService
                 yg.setBtjssj(yljgYgHtxx.getHtjssj());
                 yljgYgJbxxMapper.updateYljgYgJbxx(yg);
             }else{ // 有历史合同,且合同连续,只更新结束日期.
-                if(Integer.parseInt(htxxResult.getHtjssj()) == Integer.parseInt(yljgYgHtxx.getHtkssj())){
+                long dayDiff = DateUtils.getDaysDiff(htxxResult.getHtjssj(),yljgYgHtxx.getHtkssj());
+                if((Integer.parseInt(htxxResult.getHtjssj()) == Integer.parseInt(yljgYgHtxx.getHtkssj())) || (dayDiff == 1 )){
                     yg.setBtjssj(yljgYgHtxx.getHtjssj());
                     yljgYgJbxxMapper.updateYljgYgJbxx(yg);
                 }