Browse Source

修改:
1.高龄补贴:各级补贴能其他区问题。
2.备案部里数据存在BUG问题
3.护理员补贴,将失效人员去掉

953954216 1 year ago
parent
commit
458066068a

+ 16 - 1
ruoyi-modules/mz-business-btgl/src/main/java/com/ruoyi/business/mapper/ZwywBtglGlbtxmMapper.java

@@ -1,14 +1,29 @@
 package com.ruoyi.business.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.business.domain.ZwywBtglGlbt;
 import com.ruoyi.business.domain.ZwywBtglGlbtxm;
+import com.ruoyi.common.datascope.handler.DataColumn;
+import com.ruoyi.common.datascope.handler.DataPermission;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
+import java.util.List;
+
 /**
  * 补贴管理高龄补贴项目信息Mapper接口
- * 
+ *
  * @author sun
  * @date 2022-11-18
  */
+@DataPermission({
+        @DataColumn(key = "deptName", value = "create_bmjsc"),
+        @DataColumn(key = "xzqhName", value = "create_qhjsc")
+})
 public interface ZwywBtglGlbtxmMapper extends BaseMapperPlus<ZwywBtglGlbtxm> {
 
+    @InterceptorIgnore(tenantLine = "true")
+    public ZwywBtglGlbtxm selectOneT(ZwywBtglGlbtxm zwywBtglGlbtxm);
+
+
 }

+ 13 - 7
ruoyi-modules/mz-business-btgl/src/main/java/com/ruoyi/business/service/impl/ZwywBtglGlbtServiceImpl.java

@@ -93,13 +93,19 @@ public class ZwywBtglGlbtServiceImpl implements IZwywBtglGlbtService
             if (ObjectUtils.isNotEmpty(dept)) {
                 String[] deptCodeList = dept.getAncestors().split(",");
                 for (String deptCode: deptCodeList) {
-                    LambdaQueryWrapper<ZwywBtglGlbtxm> xmLqw = new LambdaQueryWrapper<ZwywBtglGlbtxm>()
-                            .eq(ZwywBtglGlbtxm::getXmzt, GlbtXmztStatus.QY.getCode())
-                            .eq(ZwywBtglGlbtxm::getXzqh, deptCode)
-                            .le(ZwywBtglGlbtxm::getQyrq, DateUtils.dateTime())
-                            .and(wq -> wq.ge(ZwywBtglGlbtxm::getTyrq, DateUtils.dateTime())
-                                    .or().isNull(ZwywBtglGlbtxm::getTyrq));
-                    ZwywBtglGlbtxm xm = zwywBtglGlbtxmMapper.selectOne(xmLqw);
+//                    LambdaQueryWrapper<ZwywBtglGlbtxm> xmLqw = new LambdaQueryWrapper<ZwywBtglGlbtxm>()
+//                            .eq(ZwywBtglGlbtxm::getXmzt, GlbtXmztStatus.QY.getCode())
+//                            .eq(ZwywBtglGlbtxm::getXzqh, deptCode)
+//                            .le(ZwywBtglGlbtxm::getQyrq, DateUtils.dateTime())
+//                            .and(wq -> wq.ge(ZwywBtglGlbtxm::getTyrq, DateUtils.dateTime())
+//                                    .or().isNull(ZwywBtglGlbtxm::getTyrq));
+                    ZwywBtglGlbtxm xmLqw = new ZwywBtglGlbtxm();
+                    xmLqw.setXmzt(GlbtXmztStatus.QY.getCode());
+                    xmLqw.setXzqh(deptCode);
+                    xmLqw.setQyrq(DateUtils.dateTime());
+                    xmLqw.setTyrq(DateUtils.dateTime());
+
+                    ZwywBtglGlbtxm xm = zwywBtglGlbtxmMapper.selectOneT(xmLqw);
                     if (ObjectUtils.isNotEmpty(xm)) {
                         int age = DateUtils.getCurrentAge(DateUtils.dateTime(YYYYMMDD, res.getCsrq()));
                         if (80 <= age && age <= 89) {

+ 10 - 0
ruoyi-modules/mz-business-btgl/src/main/resources/mapper/business/ZwywBtglGlbtxmMapper.xml

@@ -33,4 +33,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateUnitName"    column="update_unit_name"    />
     </resultMap>
 
+    <select id="selectOneT" parameterType="String" resultMap="ZwywBtglGlbtxmResult">
+        SELECT * from Zwyw_btgl_glbtxm
+        <where>
+            <if test="xmzt != null  and xmzt != ''"> and xmzt = #{xmzt}</if>
+            <if test="xzqh != null  and xzqh != ''"> and xzqh = #{xzqh}</if>
+            <if test="qyrq != null  and qyrq != ''"> and qyrq &lt;= #{qyrq}</if>
+            <if test="tyrq != null  and tyrq != ''"> and ( tyrq &gt;= #{tyrq} or tyrq is null )</if>
+        </where>
+    </select>
+
 </mapper>

+ 4 - 4
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywJgBnMapper.xml

@@ -106,8 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         getxzqhmcbycode(a.ssxzqh) ssxzqh_name,
         a.*
         FROM zwyw_jg_bn a
-        RIGHT JOIN ( SELECT MAX(create_time_str) str FROM zwyw_jg_bn GROUP BY jg_id ) b
-        ON a.create_time_str = b.str
+        RIGHT JOIN ( SELECT jg_id, MAX(create_time_str) str FROM zwyw_jg_bn GROUP BY jg_id ) b
+        ON a.create_time_str = b.str AND a.jg_id = b.jg_id
         <where>
             <if test="tyshxydm != null and tyshxydm != ''"> and a.tyshxydm = #{tyshxydm}</if>
             <if test="ssxzqh != null  and ssxzqh != ''"> and a.ssxzqh like concat(#{ssxzqh}, '%')</if>
@@ -184,8 +184,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 --         a.create_time_str, a.create_user_id, a.create_by, a.create_unit, a.create_unit_name,
 --         a.update_time_str, a.update_user_id, a.update_by, a.update_unit, a.update_unit_name
         FROM zwyw_jg_bn a
-        RIGHT JOIN ( SELECT MAX(create_time_str) str FROM zwyw_jg_bn GROUP BY jg_id ) b
-        ON a.create_time_str = b.str
+        RIGHT JOIN ( SELECT jg_id, MAX(create_time_str) str FROM zwyw_jg_bn GROUP BY jg_id ) b
+        ON a.create_time_str = b.str AND a.jg_id = b.jg_id
         <where>
             <if test="tyshxydm != null and tyshxydm != ''"> and a.tyshxydm = #{tyshxydm}</if>
             <if test="ssxzqh != null  and ssxzqh != ''"> and a.ssxzqh like concat(#{ssxzqh}, '%')</if>

+ 3 - 3
ruoyi-modules/mz-organization-jg/src/main/java/com/ruoyi/organization/domain/YljgJcxx.java

@@ -56,19 +56,19 @@ public class YljgJcxx extends BaseEntity
     private String tyshxydm;
 
     /** 机构封面图 */
-    @Excel(name = "机构封面图")
+//    @Excel(name = "机构封面图")
     @ApiModelProperty(value = "机构封面图")
     @Size(max = 500, message = "{机构封面图}")
     private String jgUrl;
 
     /** 机构经度 */
-    @Excel(name = "机构经度")
+//    @Excel(name = "机构经度")
     @ApiModelProperty(value = "机构经度")
     @Digits(integer = 10,fraction = 6,message = "{机构经度}")
     private String lat;
 
     /** 机构纬度 */
-    @ApiModelProperty(value = "机构纬度")
+//    @ApiModelProperty(value = "机构纬度")
     @Digits(integer = 10,fraction = 6,message = "{机构纬度}")
     private String lng;
 

+ 2 - 0
ruoyi-modules/mz-organization-yggl/src/main/resources/mapper/organization/YljgYgJbxxMapper.xml

@@ -150,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             zylx = '01'
             AND a.is_jnsb = '01'
             AND a.is_sybz = '0'
+            AND a.state = '1'
             AND a.zzzt = '1'
             AND a.jg_id in (
             SELECT id FROM YLJG_JCXX
@@ -449,6 +450,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <where>
         AND a.zzzt = '1'
         AND a.zylx = '01'
+        AND a.state = '1'
         AND a.is_jnsb = '01'
         AND a.is_sybz = '0'
         AND a.jg_id in (