update code
parent
3c6ec3fb1d
commit
19c540b97e
|
@ -70,4 +70,15 @@ public class ProjectCheckDetectionController extends BaseController {
|
||||||
List<SurProjectCheckDetection> list=checkDetectionService.getList(where);
|
List<SurProjectCheckDetection> list=checkDetectionService.getList(where);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按CheckType分组
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/groupCheckType")
|
||||||
|
public AjaxResult groupCheckType(@RequestBody SurProjectCheckDetection where){
|
||||||
|
List<SurProjectCheckDetection> list=checkDetectionService.groupCheckType(where);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||||
|
@ -51,21 +52,20 @@ public class ProjectMeasureController extends BaseController {
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
@PostMapping("/getList")
|
@PostMapping("/getList")
|
||||||
public AjaxResult getList(@RequestBody SurProjectMeasure where){
|
public TableDataInfo getList(@RequestBody SurProjectMeasure where){
|
||||||
Long deptId= where.getDeptId();
|
Long deptId= where.getDeptId();
|
||||||
if(deptId==null || deptId<=0){
|
if(deptId==null || deptId<=0){
|
||||||
if (SecurityUtils.isUserB()) {
|
if (SecurityUtils.isUserB()) {
|
||||||
where.setPrjIds(getProjectIds());
|
where.setPrjIds(getProjectIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String key="bgscreen_measure_getList_"+where.getMeasureType()+"_"+where.getDeptId()+"_"+where.getProjectId()+"_"+where.getProType()+"_"+Md5Utils.hash(where.getPrjIds());
|
startPage();
|
||||||
Object obj=redisCache.getCacheObject(key);
|
|
||||||
if(obj!=null){
|
|
||||||
return AjaxResult.success(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<SurProjectMeasure> list=measureService.getList(where);
|
List<SurProjectMeasure> list=measureService.getList(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
@PostMapping("/groupMeasureType")
|
||||||
|
public AjaxResult groupMeasureType(@RequestBody SurProjectMeasure where){
|
||||||
|
List<SurProjectMeasure> list=measureService.groupMeasureType(where);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,4 +86,10 @@ public interface SurProjectCheckDetectionMapper
|
||||||
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
|
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
|
||||||
|
|
||||||
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where);
|
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where);
|
||||||
|
/**
|
||||||
|
* 按CheckType分组
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SurProjectCheckDetection> groupCheckType(SurProjectCheckDetection where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,4 +72,6 @@ public interface SurProjectMeasureMapper
|
||||||
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
|
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
|
||||||
|
|
||||||
public List<SurProjectMeasure> getList(SurProjectMeasure where);
|
public List<SurProjectMeasure> getList(SurProjectMeasure where);
|
||||||
|
|
||||||
|
public List<SurProjectMeasure> groupMeasureType(SurProjectMeasure where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,4 +86,10 @@ public interface ISurProjectCheckDetectionService
|
||||||
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
|
public List<Map<String,Object>> findGroupCountByProjectId(Long projectId);
|
||||||
|
|
||||||
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where);
|
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where);
|
||||||
|
/**
|
||||||
|
* 按CheckType分组
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SurProjectCheckDetection> groupCheckType(SurProjectCheckDetection where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,4 +81,6 @@ public interface ISurProjectMeasureService
|
||||||
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
|
public List<SurProjectMeasure> groupMeasureInfo(SurProjectMeasure where);
|
||||||
|
|
||||||
public List<SurProjectMeasure> getList(SurProjectMeasure where);
|
public List<SurProjectMeasure> getList(SurProjectMeasure where);
|
||||||
|
|
||||||
|
public List<SurProjectMeasure> groupMeasureType(SurProjectMeasure where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,5 +203,14 @@ public class SurProjectCheckDetectionServiceImpl extends WeChatMessageServiceImp
|
||||||
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where) {
|
public List<SurProjectCheckDetection> getList(SurProjectCheckDetection where) {
|
||||||
return surProjectCheckDetectionMapper.getList(where);
|
return surProjectCheckDetectionMapper.getList(where);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 按CheckType分组
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SurProjectCheckDetection> groupCheckType(SurProjectCheckDetection where) {
|
||||||
|
return surProjectCheckDetectionMapper.groupCheckType(where);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,4 +206,10 @@ public class SurProjectMeasureServiceImpl extends WeChatMessageServiceImpl imple
|
||||||
public List<SurProjectMeasure> getList(SurProjectMeasure where) {
|
public List<SurProjectMeasure> getList(SurProjectMeasure where) {
|
||||||
return surProjectMeasureMapper.getList(where);
|
return surProjectMeasureMapper.getList(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectMeasure> groupMeasureType(SurProjectMeasure where) {
|
||||||
|
return surProjectMeasureMapper.groupMeasureType(where);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,7 +317,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getList" parameterType="SurProjectCheckDetection" resultMap="SurProjectCheckDetectionResult">
|
<select id="getList" parameterType="SurProjectCheckDetection" resultMap="SurProjectCheckDetectionResult">
|
||||||
<include refid="selectSurProjectCheckDetectionVo"/>
|
<include refid="selectSurProjectCheckDetectionVo"/>
|
||||||
WHERE spcd.is_del=0
|
WHERE spcd.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||||
<if test="detectionResult==1">and spcd.detection_result=1</if>
|
<if test="detectionResult==1">and spcd.detection_result=1</if>
|
||||||
<if test="detectionResult==0">and spcd.detection_result <> 1</if>
|
<if test="detectionResult==0">and spcd.detection_result <> 1</if>
|
||||||
<if test="checkType!=null and checkType>0">and spcd.check_type= #{checkType}</if>
|
<if test="checkType!=null and checkType>0">and spcd.check_type= #{checkType}</if>
|
||||||
|
@ -334,5 +334,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId !=null and projectId > 0 ">
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
and spcd.project_id=#{projectId}
|
and spcd.project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY detection_result
|
||||||
|
</select>
|
||||||
|
<select id="groupCheckType" parameterType="SurProjectCheckDetection" resultMap="SurProjectCheckDetectionResult">
|
||||||
|
SELECT spcd.check_type id,count(1) project_id
|
||||||
|
FROM sur_project_check_detection spcd
|
||||||
|
LEFT JOIN sur_project sp ON spcd.project_id = sp.id
|
||||||
|
where spcd.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||||
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
|
and sp.deptId=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spcd.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
|
and spcd.project_id=#{projectId}
|
||||||
|
</if>
|
||||||
|
group by spcd.check_type
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -240,6 +240,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId !=null and projectId >0">
|
<if test="projectId !=null and projectId >0">
|
||||||
AND spm.project_id=#{projectId}
|
AND spm.project_id=#{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
order by spm.approve_status
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="groupMeasureType" parameterType="SurProjectMeasure" resultMap="SurProjectMeasureResult">
|
||||||
|
SELECT spm.measure_type id,count(1) project_id
|
||||||
|
FROM sur_project_measure spm
|
||||||
|
LEFT JOIN sur_project sp ON spm.project_id = sp.id
|
||||||
|
where spm.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||||
|
<if test="deptId !=null and deptId > 0 ">
|
||||||
|
and sp.deptId=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spm.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="projectId !=null and projectId > 0 ">
|
||||||
|
and spm.project_id=#{projectId}
|
||||||
|
</if>
|
||||||
|
group by spm.measure_type
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue