Sfoglia il codice sorgente

新增 V2版本首页统计/督办/进展说明

Administrator 2 anni fa
parent
commit
cd9ece1cc9

+ 12 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/ZsyzCommonController.java

@@ -60,6 +60,15 @@ public class ZsyzCommonController extends BaseController {
         return  zsyzCommonService.census();
     }
 
+    /**
+     * 首页统计折线图
+     * @return
+     */
+    @GetMapping("/censusXy")
+    public AjaxResult censusXy() {
+        return  zsyzCommonService.censusXy();
+    }
+
 
     /**
      * 生成项目编号接口
@@ -89,6 +98,7 @@ public class ZsyzCommonController extends BaseController {
      * @return
      */
     @PostMapping("/xszp")
+    @PreAuthorize("@ss.hasPermi('projectV2:common:xszp')")
     public AjaxResult xszp(ZsyzSbbzb zsyzSbbzb) {
         String zpType = zsyzSbbzb.getZpType();
         if (ONE.equals(zpType)){
@@ -148,6 +158,7 @@ public class ZsyzCommonController extends BaseController {
      * @return
      */
     @PostMapping("/xszc")
+    @PreAuthorize("@ss.hasPermi('projectV2:common:xszc')")
     public AjaxResult xszc(ZsyzSbbzb zsyzSbbzb) {
         return  toAjax(zsyzSbbzbService.updateZsyzSbbzbForZc(zsyzSbbzb));
     }
@@ -160,6 +171,7 @@ public class ZsyzCommonController extends BaseController {
      * @return
      */
     @PostMapping("/xssh")
+    @PreAuthorize("@ss.hasPermi('projectV2:common:xssh')")
     public AjaxResult xssh(@RequestBody ZsyzShyj zsyzShyj) {
         //所有审核需要往审核意见表插入数据
         return  zsyzCommonService.xssh(zsyzShyj);

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzDbd.java

@@ -95,6 +95,18 @@ public class ZsyzDbd extends BaseEntity
      */
     private String dbType;
 
+    /** 项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归 */
+    //@Excel(name = "项目进度 1:项目首谈待审核 2:项目首谈已审核 3:线索分发要素部门 4:线索已指派 5:线索已承接 6:签约待审核 7:签约已审核 8:开工待审核 9:开工已审核 10:投产待审核 11:投产已审核 12:项目已入归")
+    private String progress;
+
+    public String getProgress() {
+        return progress;
+    }
+
+    public void setProgress(String progress) {
+        this.progress = progress;
+    }
+
     public String getDbType() {
         return dbType;
     }

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/projectV2/ZsyzShyjMapper.java

@@ -28,6 +28,13 @@ public interface ZsyzShyjMapper
      */
     public List<ZsyzShyj> selectZsyzShyjList(ZsyzShyj zsyzShyj);
 
+    /**
+     * 统计使用的审核意见/一个项目统计一次
+     * @param zsyzShyj
+     * @return
+     */
+    public List<ZsyzShyj> selectZsyzShyjListByWt(ZsyzShyj zsyzShyj);
+
     /**
      * 新增招商引资_审核意见
      * 

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/ZsyzShyjServiceImpl.java

@@ -50,6 +50,17 @@ public class ZsyzShyjServiceImpl implements IZsyzShyjService
         return zsyzShyjMapper.selectZsyzShyjList(zsyzShyj);
     }
 
+    /**
+     * 统计使用的审核意见/一个项目统计一次
+     * @param zsyzShyj
+     * @return
+     */
+    @Override
+    @DataScope(deptAlias = "s")
+    public List<ZsyzShyj> selectZsyzShyjListByWt(ZsyzShyj zsyzShyj) {
+        return   zsyzShyjMapper.selectZsyzShyjListByWt(zsyzShyj);
+    }
+
     /**
      * 新增招商引资_审核意见
      * 

+ 11 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/ZsyzCommonServiceImpL.java

@@ -14,6 +14,7 @@ import com.ruoyi.system.domain.projectV2.ZsyzSkxm;
 import com.ruoyi.system.mapper.projectV2.ZsyzSbbzbMapper;
 import com.ruoyi.system.mapper.projectV2.ZsyzShyjMapper;
 import com.ruoyi.system.mapper.projectV2.ZsyzSkxmMapper;
+import com.ruoyi.system.service.projectV2.IZsyzShyjService;
 import com.ruoyi.system.service.projectV2.common.IZsyzCommonService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -42,6 +43,8 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
 
     @Autowired
     private ZsyzSkxmMapper zsyzSkxmMapper;
+    @Autowired
+    private IZsyzShyjService zsyzShyjService;
 
     @Autowired
     private RedisCache redisCache;
@@ -168,7 +171,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
             //todo 问题项目  只有要素部门意见不通过和承接地不承接的是问题项目
             ZsyzShyj zsyzShyj = new ZsyzShyj();
             zsyzShyj.setDeptId(deptId);
-            List<ZsyzShyj> zsyzShyjs = zsyzShyjMapper.selectZsyzShyjList(zsyzShyj);
+            List<ZsyzShyj> zsyzShyjs = zsyzShyjService.selectZsyzShyjListByWt(zsyzShyj);
             int wt = 0;
             if (zsyzShyjs != null ){
                 wt = zsyzShyjs.size();
@@ -183,6 +186,13 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
         return AjaxResult.success(map);
     }
 
+    //首页统计折线图
+    @Override
+    public AjaxResult censusXy() {
+
+        return null;
+    }
+
     //更改项目进度前进
     public String changeProgress(String progress) {
         if (ONE.equals(progress)) {

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/IZsyzShyjService.java

@@ -27,6 +27,7 @@ public interface IZsyzShyjService
      * @return 招商引资_审核意见集合
      */
     public List<ZsyzShyj> selectZsyzShyjList(ZsyzShyj zsyzShyj);
+    public List<ZsyzShyj> selectZsyzShyjListByWt(ZsyzShyj zsyzShyj);
 
     /**
      * 新增招商引资_审核意见

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/IZsyzCommonService.java

@@ -21,4 +21,7 @@ public interface IZsyzCommonService
 
   //首页统计接口
   public AjaxResult census();
+
+    //首页统计折线图
+  public AjaxResult censusXy();
 }

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzDbdMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="phone"    column="phone"    />
         <result property="tbTime"    column="tb_time"    />
         <result property="dbType"    column="db_type"    />
+        <result property="progress"    column="progress"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
@@ -32,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectZsyzDbdVo">
-        select id, dh, xm_id, xmbh, xmmc, dept_id, dept_name, is_hf, db_time, blsx, dbsx, jzqk, czwt, jjjy, gzjh, tbr, phone, tb_time,db_type, create_by, create_time, update_by, update_time, remark from zsyz_dbd
+        select id, dh, xm_id, xmbh, xmmc, dept_id, dept_name, is_hf, db_time, blsx, dbsx, jzqk, czwt, jjjy, gzjh, tbr, phone, tb_time,db_type,progress, create_by, create_time, update_by, update_time, remark from zsyz_dbd
     </sql>
 
     <select id="selectZsyzDbdList" parameterType="ZsyzDbd" resultMap="ZsyzDbdResult">
@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="tbTime != null "> and tb_time = #{tbTime}</if>
             <if test="dbType != null "> and db_type = #{dbType}</if>
+            <if test="progress != null "> and progress = #{progress}</if>
         </where>
     </select>
     
@@ -85,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null">phone,</if>
             <if test="tbTime != null">tb_time,</if>
             <if test="dbType != null">db_type,</if>
+            <if test="progress != null">progress,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null">#{phone},</if>
             <if test="tbTime != null">#{tbTime},</if>
             <if test="dbType != null">#{dbType},</if>
+            <if test="progress != null">#{progress},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -139,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null">phone = #{phone},</if>
             <if test="tbTime != null">tb_time = #{tbTime},</if>
             <if test="dbType != null">db_type = #{dbType},</if>
+            <if test="progress != null">progress = #{progress},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>

+ 22 - 1
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzShyjMapper.xml

@@ -70,7 +70,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectZsyzShyjVo"/>
         where l.id = #{id}
     </select>
-        
+    <select id="selectZsyzShyjListByWt" parameterType="Long" resultMap="ZsyzShyjResult">
+        SELECT
+        ANY_VALUE ( s.id ),
+        ANY_VALUE ( s.xm_id ),
+        ANY_VALUE ( s.xmbh ),
+        ANY_VALUE ( s.dept_id ),
+        ANY_VALUE ( s.shrxm ),
+        ANY_VALUE ( s.xmjd ),
+        ANY_VALUE ( s.xmmc ),
+        ANY_VALUE ( s.shjg ),
+        ANY_VALUE ( s.shyj ),
+        ANY_VALUE ( s.shsj )
+        FROM
+        zsyz_shyj s
+        where
+        s.shjg = '2'
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY
+        s.xm_id
+    </select>
+
     <insert id="insertZsyzShyj" parameterType="ZsyzShyj" useGeneratedKeys="true" keyProperty="id">
         insert into zsyz_shyj
         <trim prefix="(" suffix=")" suffixOverrides=",">