提交代码

dev_xds
姜玉琦 2024-07-31 23:59:29 +08:00
parent a453a2a9a8
commit 436d65f7be
14 changed files with 159 additions and 30 deletions

View File

@ -173,7 +173,7 @@
/>
<el-alert
v-if="options.procDefKey=='flow_spl_spb' || options.procDefKey=='flow_spl_spb_cope'"
title="各方会签表、验收记录等。"
title="费用索赔申请表、费用索赔审批表等。"
type="warning"
show-icon
/>

View File

@ -167,7 +167,7 @@
/>
<el-alert
v-if="options.flowKey=='flow_spl_spb' || options.flowKey=='flow_spl_spb_cope'"
title="各方会签表、验收记录等。"
title="费用索赔申请表、费用索赔审批表等。"
type="warning"
show-icon
/>

View File

@ -271,7 +271,7 @@
size="mini"
type="text"
icon="el-icon-paperclip"
@click="handledownload(scope.row)"
@click="handleDownload(scope.row)"
v-hasPermi="['project:projectFunVerify:list']"
>下载附件</el-button
>
@ -302,7 +302,6 @@
>修改</el-button
>
<el-button
v-if="scope.row.approveStatus != '4'"
size="mini"
type="text"
icon="el-icon-delete"
@ -756,8 +755,7 @@ export default {
},
/** 下载附件 */
handleDownload(row) {
this.files = row.checkFiles.split(",");
this.files.forEach((item) => {
row.checkFiles.split(",").forEach((item) => {
this.$download.resource(item);
});
},

View File

@ -213,7 +213,6 @@
>修改</el-button
>
<el-button
v-if="scope.row.approveStatus != '4'"
size="mini"
type="text"
icon="el-icon-delete"

View File

@ -3,6 +3,7 @@ package com.ruoyi.web.project.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DictUtils;
import com.yanzhu.jh.project.domain.SurProjectChecking;
@ -10,6 +11,10 @@ import com.yanzhu.jh.project.service.ISurProjectCheckingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @version : V1.0
* @ClassName: ProjectCheckingController
@ -21,6 +26,9 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/wechat/projectchecking")
public class ProjectCheckingController extends BaseController {
@Autowired
private RedisCache redisCache;
@Autowired
private ISurProjectCheckingService surProjectCheckingService;
@ -101,7 +109,33 @@ public class ProjectCheckingController extends BaseController {
*/
@GetMapping("/findStatisticsByProjectId")
public AjaxResult findStatisticsByProjectId(Long projectId){
return success(surProjectCheckingService.findStatisticsByProjectId(projectId));
//设置缓存
String key="wechat_projectchecking_findStatisticsByProjectId_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
}
List<Map<String,Object>> dataList = surProjectCheckingService.findStatisticsByProjectId(projectId);
redisCache.setCacheObject(key, dataList, 30, TimeUnit.SECONDS);
return success(dataList);
}
/**
*
* @param projectId
* @return
*/
@GetMapping("/findStatisticsInfosByProjectId")
public AjaxResult findStatisticsInfosByProjectId(Long projectId){
//设置缓存
String key="wechat_projectchecking_findStatisticsInfosByProjectId_"+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
}
List<Map<String,Object>> dataList = surProjectCheckingService.findStatisticsInfosByProjectId(projectId);
redisCache.setCacheObject(key, dataList, 30, TimeUnit.SECONDS);
return success(dataList);
}
/**

View File

@ -1,8 +1,10 @@
package com.ruoyi.web.project.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.system.service.ISysDictDataService;
@ -13,6 +15,10 @@ import com.yanzhu.jh.work.service.IWorkTrainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @version : V1.0
* @ClassName: ProjectTrainController
@ -25,7 +31,7 @@ import org.springframework.web.bind.annotation.*;
public class ProjectTrainController extends BaseController {
@Autowired
private ISysDictDataService sysDictDataService;
private RedisCache redisCache;
@Autowired
private IWorkTrainService workTrainService;
@ -117,6 +123,24 @@ public class ProjectTrainController extends BaseController {
return success(workTrainService.findGroupCountByProjectId(projectId));
}
/**
*
* @param workTrain
* @return
*/
@GetMapping("/selectGroupCountByProjectIdV2")
public AjaxResult selectGroupCountByProjectIdV2(WorkTrain workTrain){
//设置缓存
String key="wechat_projectTrain_selectGroupCountByProjectIdV2_"+workTrain.getProjectId()+"_"+workTrain.getTrainType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
}
List<Map<String,Object>> dataList = workTrainService.findGroupCountByProjectIdV2(workTrain);
redisCache.setCacheObject(key, dataList, 30, TimeUnit.SECONDS);
return success(dataList);
}
/**
*
* @return

View File

@ -89,6 +89,14 @@ public interface SurProjectCheckingMapper
*/
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findStatisticsInfosByProjectId(Long projectId);
public List<SurProjectChecking> playVideo(SurProjectChecking where);
List<SurProjectChecking> selectProjectCheckingGroupFoChart(SurProjectChecking surProjectChecking);

View File

@ -101,6 +101,14 @@ public interface ISurProjectCheckingService
*/
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId);
/**
*
*
* @param projectId
* @return
*/
public List<Map<String,Object>> findStatisticsInfosByProjectId(Long projectId);
/**
* 2-
* @param surProjectChecking

View File

@ -253,6 +253,17 @@ public class SurProjectCheckingServiceImpl extends WeChatMessageServiceImpl impl
return surProjectCheckingMapper.findStatisticsByProjectId(projectId);
}
/**
*
*
* @param projectId
* @return
*/
@Override
public List<Map<String,Object>> findStatisticsInfosByProjectId(Long projectId){
return surProjectCheckingMapper.findStatisticsInfosByProjectId(projectId);
}
@Override
public List<SurProjectChecking> getProjectCheckingGroupFoChart(SurProjectChecking surProjectChecking) {
return surProjectCheckingMapper.selectProjectCheckingGroupFoChart(surProjectChecking);

View File

@ -119,6 +119,14 @@ public interface WorkTrainMapper
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
/**
*
*
* @param workTrain
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectIdV2(WorkTrain workTrain);
public List<WorkTrain> getGroupByDataType(WorkTrain workTrain);
public List<WorkTrain> queryWorkTrainList(WorkTrain where);

View File

@ -101,6 +101,14 @@ public interface IWorkTrainService
*/
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
/**
*
*
* @param workTrain
* @return
*/
public List<Map<String,Object>> findGroupCountByProjectIdV2(WorkTrain workTrain);
public List<WorkTrain> getGroupByDataType(WorkTrain workTrain);
public List<WorkTrain> queryWorkTrainList(WorkTrain where);

View File

@ -227,6 +227,17 @@ public class WorkTrainServiceImpl implements IWorkTrainService
return workTrainMapper.findGroupCountByProjectId(projectId);
}
/**
*
*
* @param workTrain
* @return
*/
@Override
public List<Map<String,Object>> findGroupCountByProjectIdV2(WorkTrain workTrain){
return workTrainMapper.findGroupCountByProjectIdV2(workTrain);
}
@Override
public List<WorkTrain> getGroupByDataType(WorkTrain workTrain) {
return workTrainMapper.getGroupByDataType(workTrain);

View File

@ -221,31 +221,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findStatisticsByProjectId" parameterType="Long" resultType="map">
SELECT
spc.project_id,
count(1) AS total,
pass.pass
spc.data_type_lvl1 as type,
sdd1.dict_label as typeName,
count(1) AS total,
(select count(1) as pass FROM
sur_project_checking ps where ps.is_del = 0 AND ps.check_result = '1' and ps.project_id = spc.project_id and ps.data_type_lvl1 = spc.data_type_lvl1) as pass
FROM
sur_project_checking spc
LEFT JOIN (
SELECT
pass.project_id,
count(1) AS pass
FROM
sur_project_checking pass
WHERE
pass.is_del = 0
AND pass.check_result = '1'
AND pass.project_id = #{projectId}
GROUP BY
pass.project_id
) pass ON pass.project_id = spc.project_id
WHERE
is_del = 0
AND spc.project_id = #{projectId}
sur_project_checking spc
left join sys_dict_data sdd1 on sdd1.dict_type='project_checking_data_type_lvl1' and sdd1.dict_value = spc.data_type_lvl1
WHERE spc.is_del = 0
AND spc.project_id = #{projectId}
GROUP BY
spc.project_id
spc.data_type_lvl1
</select>
<select id="findStatisticsInfosByProjectId" parameterType="Long" resultType="map">
SELECT
spc.data_type_lvl2 as type,
sdd2.dict_label as typeName,
sdd2.remark as remark,
count(1) AS total,
(select count(1) as pass FROM
sur_project_checking ps where ps.is_del = 0 AND ps.check_result = '1' and ps.project_id = spc.project_id and ps.data_type_lvl2 = spc.data_type_lvl2) as pass
FROM
sur_project_checking spc
left join sys_dict_data sdd2 on sdd2.dict_type='project_checking_data_type_lvl2' and sdd2.dict_value = spc.data_type_lvl2
WHERE spc.is_del = 0
AND spc.project_id = 678
GROUP BY
spc.data_type_lvl2
ORDER BY sdd2.dict_sort
</select>
<insert id="insertSurProjectChecking" parameterType="SurProjectChecking" useGeneratedKeys="true" keyProperty="id">
insert into sur_project_checking

View File

@ -163,6 +163,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY
wt.train_type
</select>
<select id="findGroupCountByProjectIdV2" parameterType="WorkTrain" resultType="map">
SELECT
wt.data_type as type,
sdd.dict_label as typeName,
count(1) AS total
FROM
work_train wt
left join sys_dict_data sdd on sdd.dict_type='work_train_data_type' and sdd.dict_value=wt.data_type
WHERE wt.is_del=0
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
<if test="trainType != null and trainType != ''"> and wt.train_type = #{trainType}</if>
GROUP BY wt.data_type
</select>
<insert id="insertWorkTrain" parameterType="WorkTrain" useGeneratedKeys="true" keyProperty="id">
insert into work_train