LIVE_YE 2 роки тому
батько
коміт
6615bf5809

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fgw/FgwXmsbController.java

@@ -114,4 +114,14 @@ public class FgwXmsbController extends BaseController
     {
         return toAjax(fgwXmsbService.deleteFgwXmsbByIds(ids));
     }
+
+    /**
+     * 查询发改委_申报_主列表
+     */
+    @PreAuthorize("@ss.hasPermi('fgw:xmsb:num')")
+    @GetMapping("/num")
+    public AjaxResult num(FgwXmsb fgwXmsb)
+    {
+        return fgwXmsbService.selectFgwXmsbListAll(fgwXmsb);
+    }
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/fgw/FgwXmsbMapper.java

@@ -69,4 +69,6 @@ public interface FgwXmsbMapper
     public int deleteFgwXmsbByIds(Long[] ids);
 
     List<FgwXmsb> ldpsList(FgwXmsb fgwXmsb);
+
+    List<FgwXmsb> selectFgwXmsbListAll(FgwXmsb fgwXmsb);
 }

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/fgw/IFgwXmsbService.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.service.fgw;
 
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.system.domain.fgw.FgwXmsb;
 
 import java.util.List;
@@ -63,4 +64,6 @@ public interface IFgwXmsbService
     public int deleteFgwXmsbById(Long id);
 
     List<FgwXmsb> ldpsList(FgwXmsb fgwXmsb);
+
+    AjaxResult selectFgwXmsbListAll(FgwXmsb fgwXmsb);
 }

+ 26 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwXmsbServiceImpl.java

@@ -1,12 +1,17 @@
 package com.ruoyi.system.service.impl.fgw;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.fgw.FgwDbd;
 import com.ruoyi.system.domain.fgw.FgwFj;
 import com.ruoyi.system.domain.fgw.FgwXmsb;
+import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
 import com.ruoyi.system.mapper.fgw.FgwDbdMapper;
 import com.ruoyi.system.mapper.fgw.FgwFjMapper;
 import com.ruoyi.system.mapper.fgw.FgwXmsbMapper;
@@ -59,7 +64,6 @@ public class FgwXmsbServiceImpl implements IFgwXmsbService
      * @return 发改委_申报_主
      */
     @Override
-    @DataScope
     public List<FgwXmsb> selectFgwXmsbList(FgwXmsb fgwXmsb)
     {
         return fgwXmsbMapper.selectFgwXmsbList(fgwXmsb);
@@ -149,8 +153,28 @@ public class FgwXmsbServiceImpl implements IFgwXmsbService
     }
 
     @Override
-    @DataScope
     public List<FgwXmsb> ldpsList(FgwXmsb fgwXmsb) {
         return fgwXmsbMapper.ldpsList(fgwXmsb);
     }
+
+    @Override
+    public AjaxResult selectFgwXmsbListAll(FgwXmsb fgwXmsb) {
+        Map<String,Integer> map = new HashMap<>();
+        map.put("all",0);
+        map.put("sbk",0);
+        map.put("xmk",0);
+        List<FgwXmsb> fgwXmsbList = fgwXmsbMapper.selectFgwXmsbListAll(fgwXmsb);
+        Map<String, List<FgwXmsb>> fgwXmsbMap = fgwXmsbList.stream().collect(Collectors.groupingBy(FgwXmsb::getType));
+        if(fgwXmsbList!=null && fgwXmsbList.size()>0){
+            map.put("all",fgwXmsbList.size());
+        }
+        if(fgwXmsbMap.get("1")!=null && fgwXmsbMap.get("1").size()>0){
+            map.put("sbk",fgwXmsbMap.get("1").size());
+        }
+        if(fgwXmsbMap.get("2")!=null && fgwXmsbMap.get("2").size()>0){
+            map.put("xmk",fgwXmsbMap.get("2").size());
+        }
+
+        return AjaxResult.success(map);
+    }
 }

+ 41 - 0
ruoyi-system/src/main/resources/mapper/system/fgw/FgwXmsbMapper.xml

@@ -138,6 +138,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         ${params.dataScope}
     </select>
+    <select id="selectFgwXmsbListAll" resultMap="FgwXmsbResult">
+        <include refid="selectFgwXmsbVo"/>
+        <where>
+            <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
+            <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
+            <if test="xmdw != null  and xmdw != ''"> and xmdw = #{xmdw}</if>
+            <if test="qtzrdw != null  and qtzrdw != ''"> and qtzrdw = #{qtzrdw}</if>
+            <if test="qtsld != null  and qtsld != ''"> and qtsld = #{qtsld}</if>
+            <if test="gmnr != null  and gmnr != ''"> and gmnr = #{gmnr}</if>
+            <if test="jhkgsj != null "> and jhkgsj = #{jhkgsj}</if>
+            <if test="xmztz != null  and xmztz != ''"> and xmztz = #{xmztz}</if>
+            <if test="sjbz != null  and sjbz != ''"> and sjbz = #{sjbz}</if>
+            <if test="sczbj != null  and sczbj != ''"> and sczbj = #{sczbj}</if>
+            <if test="zxz != null  and zxz != ''"> and zxz = #{zxz}</if>
+            <if test="ppp != null  and ppp != ''"> and ppp = #{ppp}</if>
+            <if test="rz != null  and rz != ''"> and rz = #{rz}</if>
+            <if test="ndjh != null  and ndjh != ''"> and ndjh = #{ndjh}</if>
+            <if test="sjbzzjqd != null  and sjbzzjqd != ''"> and sjbzzjqd = #{sjbzzjqd}</if>
+            <if test="rzqd != null  and rzqd != ''"> and rzqd = #{rzqd}</if>
+            <if test="dq != null  and dq != ''"> and dq = #{dq}</if>
+            <if test="jsdw != null  and jsdw != ''"> and jsdw = #{jsdw}</if>
+            <if test="jsDeptId != null "> and js_dept_id = #{jsDeptId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null "> and dept_name = #{deptName}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="kgsj != null "> and kgsj = #{kgsj}</if>
+            <if test="ntsj != null "> and ntsj = #{ntsj}</if>
+            <if test="ntxmtc != null  and ntxmtc != ''"> and ntxmtc = #{ntxmtc}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="progress != null  and progress != ''"> and progress = #{progress}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+            </if>
+        </where>
+        ${params.dataScope}
+    </select>
 
     <insert id="insertFgwXmsb" parameterType="FgwXmsb" useGeneratedKeys="true" keyProperty="id">
         insert into fgw_xmsb
@@ -259,6 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update fgw_xmsb
         <trim prefix="SET" suffixOverrides=",">
             <if test="status != null">status = #{status},</if>
+            <if test="type != null">type = #{type},</if>
         </trim>
         where id = #{id}
     </update>