提交diamagnetic

dev_xds
姜玉琦 2024-04-06 22:51:28 +08:00
parent 9b3feddcfb
commit ec8cf4060c
11 changed files with 75 additions and 83 deletions

View File

@ -151,7 +151,7 @@
<select id="groupByCategory" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT a.dict_label taskName,b.cnt assigneeId,c.cnt procDefVersion FROM
( SELECT * FROM sys_dict_data WHERE dict_type = 'sys_process_category') a
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NOT NULL
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NOT NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -163,7 +163,7 @@
</if>
GROUP BY category) b ON a.dict_value=b.category
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL AND taskName!='提交申请'
LEFT JOIN (SELECT category,COUNT(1) cnt FROM vw_flow_all WHERE finishTime IS NULL and businessVisible=0 and taskName!='提交申请'
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -179,7 +179,7 @@
<select id="groupByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT cat taskName, COUNT(1) assigneeId FROM (
SELECT *,'总包单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '总包%'
SELECT *,'总包单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '总包%' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -190,7 +190,7 @@
</foreach>
</if>
UNION
SELECT *,'监理单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '监理%'
SELECT *,'监理单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '监理%' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -201,7 +201,7 @@
</foreach>
</if>
UNION
SELECT *,'设计单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '设计%'
SELECT *,'设计单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '设计%' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -212,7 +212,7 @@
</foreach>
</if>
UNION
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '甲方%'
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '甲方%' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -223,7 +223,7 @@
</foreach>
</if>
UNION
SELECT *,'子公司' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '工程%'
SELECT *,'子公司' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '工程%' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -239,7 +239,7 @@
<select id="groupByUnitFinish" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT cat taskName, COUNT(1) assigneeId FROM (
SELECT *,'总包单位' cat FROM vw_flow_all WHERE taskName LIKE '总包%' AND taskName!='提交申请' and finishTime IS not NULL
SELECT *,'总包单位' cat FROM vw_flow_all WHERE taskName LIKE '总包%' AND taskName!='提交申请' and finishTime IS not NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -250,7 +250,7 @@
</foreach>
</if>
UNION
SELECT *,'监理单位' cat FROM vw_flow_all WHERE taskName LIKE '监理%' AND taskName!='提交申请' and finishTime IS not NULL
SELECT *,'监理单位' cat FROM vw_flow_all WHERE taskName LIKE '监理%' AND taskName!='提交申请' and finishTime IS not NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -261,7 +261,7 @@
</foreach>
</if>
UNION
SELECT *,'设计单位' cat FROM vw_flow_all WHERE taskName LIKE '设计%' AND taskName!='提交申请' and finishTime IS not NULL
SELECT *,'设计单位' cat FROM vw_flow_all WHERE taskName LIKE '设计%' AND taskName!='提交申请' and finishTime IS not NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -272,7 +272,7 @@
</foreach>
</if>
UNION
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE taskName LIKE '甲方%' AND taskName!='提交申请' and finishTime IS not NULL
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE taskName LIKE '甲方%' AND taskName!='提交申请' and finishTime IS not NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -283,7 +283,7 @@
</foreach>
</if>
UNION
SELECT *,'子公司' cat FROM vw_flow_all WHERE taskName LIKE '工程%' AND taskName!='提交申请' and finishTime IS not NULL
SELECT *,'子公司' cat FROM vw_flow_all WHERE taskName LIKE '工程%' AND taskName!='提交申请' and finishTime IS not NULL and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -299,7 +299,7 @@
<select id="groupByUnitTotal" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT cat taskName, COUNT(1) assigneeId FROM (
SELECT *,'总包单位' cat FROM vw_flow_all WHERE taskName LIKE '总包%' AND taskName!='提交申请'
SELECT *,'总包单位' cat FROM vw_flow_all WHERE taskName LIKE '总包%' AND taskName!='提交申请' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -310,7 +310,7 @@
</foreach>
</if>
UNION
SELECT *,'监理单位' cat FROM vw_flow_all WHERE taskName LIKE '监理%' AND taskName!='提交申请'
SELECT *,'监理单位' cat FROM vw_flow_all WHERE taskName LIKE '监理%' AND taskName!='提交申请' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -321,7 +321,7 @@
</foreach>
</if>
UNION
SELECT *,'设计单位' cat FROM vw_flow_all WHERE taskName LIKE '设计%' AND taskName!='提交申请'
SELECT *,'设计单位' cat FROM vw_flow_all WHERE taskName LIKE '设计%' AND taskName!='提交申请' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -332,7 +332,7 @@
</foreach>
</if>
UNION
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE taskName LIKE '甲方%' AND taskName!='提交申请'
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE taskName LIKE '甲方%' AND taskName!='提交申请' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -343,7 +343,7 @@
</foreach>
</if>
UNION
SELECT *,'子公司' cat FROM vw_flow_all WHERE taskName LIKE '工程%' AND taskName!='提交申请'
SELECT *,'子公司' cat FROM vw_flow_all WHERE taskName LIKE '工程%' AND taskName!='提交申请' and businessVisible=0
<if test="projectDeptId !=null and projectDeptId!=''">and businessDeptId=#{projectDeptId}</if>
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -360,6 +360,7 @@
<select id="listByCategory" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT * FROM vw_flow_all
<where>
businessVisible=0
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
@ -374,7 +375,7 @@
</select>
<select id="listByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT * FROM vw_flow_all WHERE finishTime IS NULL
SELECT * FROM vw_flow_all WHERE finishTime IS NULL and businessVisible=0
<if test="taskId!=null">
<if test="taskId==1"> AND taskName LIKE '总包%' </if>
<if test="taskId==2"> AND taskName LIKE '监理%' </if>
@ -396,6 +397,7 @@
<select id="listByState" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT * FROM vw_flow_all
<where>
businessVisible=0
<if test="taskId!=null">
<if test="taskId==1"> AND taskName!='提交申请' </if>
<if test="taskId==2"> AND finishTime IS NULL AND taskName!='提交申请' </if>
@ -415,7 +417,7 @@
<select id="groupByProject" resultType="com.ruoyi.system.domain.FlowTaskEntity" parameterType="long">
SELECT a.businessKey,a.cnt duration ,b.projectName businessKeyName FROM (
SELECT businessKey,COUNT(1) cnt FROM vw_flow_all WHERE taskName!='提交申请'
SELECT businessKey,COUNT(1) cnt FROM vw_flow_all WHERE taskName!='提交申请' and businessVisible=0
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
<if test="proType != null and proType != ''"> and businessType = #{proType}</if>
GROUP BY businessKey ) a,sur_project b WHERE a.businessKey=b.id
@ -447,6 +449,7 @@
FROM
vw_flow_all fa
<where>
businessVisible=0
<if test="proType != null and proType != ''"> and fa.businessType = #{proType}</if>
<if test="procDefKey != null and procDefKey != ''"> and fa.procDefKey = #{procDefKey}</if>
<if test="businessKey != null and businessKey != ''"> and fa.businessKey = #{businessKey}</if>

View File

@ -15,6 +15,8 @@ CREATE VIEW vw_smz_ssp_problemmodify_audit AS (
a.*, a.updateTime AS audittime,
b.deptId,
b.projectName as prjName,
b.projectType as proType,
b.progressVisible as progressVisible,
u.nick_name AS createBy
FROM
smz_ssp_problemmodify a
@ -54,6 +56,7 @@ CREATE VIEW vw_flow_all AS (
sp.deptId as businessDeptId,
sp.projectType as businessType,
sp.projectName AS businessKeyName,
sp.progressVisible AS businessVisible,
ru.user_id AS startUserId,
ru.nick_name AS startUserName,
rd.dept_name AS startDeptName,
@ -110,6 +113,7 @@ CREATE VIEW vw_flow_await AS (SELECT
sp.deptId AS businessDeptId,
sp.projectType AS businessType,
sp.projectName AS businessKeyName,
sp.progressVisible AS businessVisible,
ru.user_id AS startUserId,
ru.nick_name AS startUserName,
rd.dept_name AS startDeptName,
@ -151,6 +155,7 @@ WHERE
-- )
-- )
##审批意见
DROP view vw_flow_comment;
CREATE VIEW vw_flow_comment AS (
@ -225,6 +230,7 @@ DEF.END_TIME_ as finishTime,
sp.deptId AS businessDeptId,
sp.projectType AS businessType,
sp.projectName AS businessKeyName,
sp.progressVisible AS businessVisible,
ru.user_id AS startUserId,
ru.nick_name AS startUserName,
rd.dept_name AS startDeptName,

View File

@ -30,37 +30,34 @@ public class FloweController extends BaseController {
private RedisCache redisCache;
@GetMapping("/groupByCategory")
public AjaxResult groupByCategory(long deptId,long projectId,String proType){
public AjaxResult groupByCategory(long deptId,long projectId){
FlowTaskEntity where=new FlowTaskEntity();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_groupByCategory_"+deptId+"_"+projectId+"_"+proType+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_groupByCategory_"+deptId+"_"+projectId+"_"+where.getProType()+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
where.setProjectDeptId(deptId<1?null:""+deptId);
where.setBusinessKey(projectId<1?null:""+projectId);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<FlowTaskEntity> list=flowBusinessKeyService.groupByCategory(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
}
@GetMapping("/groupByUnit")
public AjaxResult groupByUnit(long deptId,long projectId,String proType){
public AjaxResult groupByUnit(long deptId,long projectId){
FlowTaskEntity where=new FlowTaskEntity();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_groupByUnit_"+deptId+"_"+projectId+"_"+proType+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_groupByUnit_"+deptId+"_"+projectId+"_"+where.getProType()+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
@ -68,9 +65,6 @@ public class FloweController extends BaseController {
where.setProjectDeptId(deptId<1?"":""+deptId);
where.setBusinessKey(projectId<1?"":""+projectId);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnit(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
@ -78,14 +72,14 @@ public class FloweController extends BaseController {
@GetMapping("/groupByUnitFinish")
public AjaxResult groupByUnitFinish(long deptId,long projectId,String proType){
public AjaxResult groupByUnitFinish(long deptId,long projectId){
FlowTaskEntity where=new FlowTaskEntity();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_groupByUnitFinish_"+deptId+"_"+projectId+"_"+proType+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_groupByUnitFinish_"+deptId+"_"+projectId+"_"+where.getProType()+"_"+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
@ -93,9 +87,6 @@ public class FloweController extends BaseController {
where.setProjectDeptId(deptId<1?"":""+deptId);
where.setBusinessKey(projectId<1?"":""+projectId);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnitFinish(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
@ -103,14 +94,14 @@ public class FloweController extends BaseController {
@GetMapping("/groupByUnitTotal")
public AjaxResult groupByUnitTotal(long deptId,long projectId,String proType){
public AjaxResult groupByUnitTotal(long deptId,long projectId){
FlowTaskEntity where=new FlowTaskEntity();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_groupByUnitTotal_"+deptId+"_"+projectId+"_"+proType+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_groupByUnitTotal_"+deptId+"_"+projectId+"_"+where.getProType()+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
@ -118,9 +109,6 @@ public class FloweController extends BaseController {
where.setProjectDeptId(deptId<1?"":""+deptId);
where.setBusinessKey(projectId<1?"":""+projectId);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnitTotal(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
@ -136,7 +124,7 @@ public class FloweController extends BaseController {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_listByUnit_"+pageNum+"-"+pageSize+"-"+where.getDeptId()+"_"+where.getProjectId()+"_"+where.getProType()+"_"+where.getTaskId()+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_listByUnit_"+pageNum+"-"+pageSize+"-"+where.getDeptId()+"_"+where.getProjectId()+"_"+where.getProType()+"_"+where.getTaskId()+"_"+Md5Utils.hash(where.getPrjIds());
List<Object> objs=redisCache.getCacheObject(key);
if(objs!=null){
return getDataTable(objs);
@ -192,7 +180,8 @@ public class FloweController extends BaseController {
@GetMapping("/groupByProject")
public AjaxResult groupByProject(long deptId){
String key="bgscreen_flow_groupByProject_"+deptId;
FlowTaskEntity where = new FlowTaskEntity();
String key="bgscreen_flow_groupByProject_"+deptId+"_"+where.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -207,14 +196,14 @@ public class FloweController extends BaseController {
* JiangYuQi
*/
@GetMapping("/findSafetyWorkList")
public AjaxResult findSafetyWorkList(long deptId,long projectId,String flowType,String proType){
public AjaxResult findSafetyWorkList(long deptId,long projectId,String flowType){
FlowTaskEntity where=new FlowTaskEntity();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String key="bgscreen_flow_findSafetyWorkList_"+deptId+"_"+projectId+"_"+flowType+"_"+proType+"_"+Md5Utils.hash(where.getPrjIds());
String key="bgscreen_flow_findSafetyWorkList_"+deptId+"_"+projectId+"_"+flowType+"_"+where.getProType()+"_"+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
@ -223,9 +212,6 @@ public class FloweController extends BaseController {
where.setProcDefKey(FlowTypeMapper.getFlowProcdefKey(flowType));
where.setProjectDeptId(deptId<1?"":""+deptId);
where.setBusinessKey(projectId<1?"":""+projectId);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<FlowTaskEntity> list=flowBusinessKeyService.findSafetyWorkList(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);

View File

@ -19,6 +19,7 @@ import java.util.concurrent.TimeUnit;
@RestController
@RequestMapping("/bgscreen/standard")
public class ProjectStandardController extends BaseController {
@Autowired
ISurProjectStandardService standardService;
@ -26,16 +27,17 @@ public class ProjectStandardController extends BaseController {
private RedisCache redisCache;
@GetMapping("/getList")
public AjaxResult getList(Long deptId,Long projectId,String proType){
public AjaxResult getList(Long deptId,Long projectId){
SurProjectStandard where=new SurProjectStandard();
where.setProjectId(projectId);
where.setIsDel(0l);
String key="bgscreen_standard_getList_"+projectId+proType;
String key="bgscreen_standard_getList_"+projectId+where.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
where.setActiveName("true");
List<SurProjectStandard> list=standardService.selectSurProjectStandardList(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
@ -50,6 +52,7 @@ public class ProjectStandardController extends BaseController {
where.setPrjIds(getProjectIds());
}
}
where.setActiveName("true");
List<SurProjectStandard> list=standardService.selectList(where);
return getDataTable(list);
}
@ -69,7 +72,7 @@ public class ProjectStandardController extends BaseController {
if(obj!=null){
return AjaxResult.success(obj);
}
where.setActiveName("true");
List<SysDictData> list=standardService.groupByType(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);

View File

@ -10,6 +10,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysDeptService;
import com.yanzhu.jh.video.domain.DevAiProjectData;
import com.yanzhu.jh.video.domain.SurProjectVideoConfig;
import com.yanzhu.jh.video.domain.SurProjectVideoPassage;
import com.yanzhu.jh.video.service.IDevAiProjectDataService;
import com.yanzhu.jh.video.service.ISurProjectVideoConfigService;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,7 +47,7 @@ public class VideoAiBoxController extends BaseController {
* AI
*/
@GetMapping("/listView")
public AjaxResult listView(String deptId, String projectId,String proType)
public AjaxResult listView(String deptId, String projectId)
{
DevAiProjectData devAiProjectData = new DevAiProjectData();
devAiProjectData.setNowRole(Convert.toStr(getUserFirstRole()));
@ -56,7 +57,7 @@ public class VideoAiBoxController extends BaseController {
devAiProjectData.setNowDept(Convert.toStr(getDeptId()));
}
devAiProjectData.setNowUser(Convert.toStr(getUserId()));
String key="bgscreen_aiBoxVideo_listView_"+deptId+"_"+projectId+"_"+devAiProjectData.getNowRole()+"_"+devAiProjectData.getNowDept()+"_"+devAiProjectData.getNowUser()+"_"+deptId+"_"+projectId+"_"+proType;
String key="bgscreen_aiBoxVideo_listView_"+deptId+"_"+projectId+"_"+devAiProjectData.getNowRole()+"_"+devAiProjectData.getNowDept()+"_"+devAiProjectData.getNowUser()+"_"+deptId+"_"+projectId+"_"+devAiProjectData.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -67,13 +68,11 @@ public class VideoAiBoxController extends BaseController {
if(projectId!=null && !"0".equals(projectId)){
devAiProjectData.setProjectId(Convert.toLong(projectId));
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
devAiProjectData.setProType(proType);
}
//默认查询当天数据
/*Map<String, Object> params = new HashMap<>();
params.put("date",new Date());
devAiProjectData.setParams(params);*/
devAiProjectData.setActiveName("true");
startPage();
List<DevAiProjectData> list = devAiProjectDataService.selectDevAiProjectDataList(devAiProjectData);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
@ -84,7 +83,7 @@ public class VideoAiBoxController extends BaseController {
*
*/
@GetMapping(value = "/getVideoPassage")
public AjaxResult getVideoPassage(String deptId, String projectId, String passageType, String importance,String proType)
public AjaxResult getVideoPassage(String deptId, String projectId, String passageType, String importance)
{
Map<String, Object> map = new HashMap<>();
String nowRole = Convert.toStr(getUserFirstRole());
@ -95,7 +94,8 @@ public class VideoAiBoxController extends BaseController {
map.put("nowDept",Convert.toStr(getDeptId()));
}
map.put("nowUser",Convert.toStr(getUserId()));
String key="bgscreen_aiBoxVideo_getVideoPassage_"+deptId+"_"+projectId+"_"+passageType+"_"+importance+"_"+map.get("nowRole")+"_"+map.get("nowDept")+"_"+map.get("nowUser")+"_"+proType;
SurProjectVideoPassage data = new SurProjectVideoPassage();
String key="bgscreen_aiBoxVideo_getVideoPassage_"+deptId+"_"+projectId+"_"+passageType+"_"+importance+"_"+map.get("nowRole")+"_"+map.get("nowDept")+"_"+map.get("nowUser")+"_"+data.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -112,9 +112,6 @@ public class VideoAiBoxController extends BaseController {
if(importance!=null && !"".equals(importance)){
map.put("importance",importance);
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
map.put("proType",proType);
}
clearPage();
List<SurProjectVideoConfig> list = surProjectVideoConfigService.selectSurProjectVideoConfigByParams(map);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
@ -125,7 +122,7 @@ public class VideoAiBoxController extends BaseController {
*
*/
@GetMapping("/groupCountByAlarmType")
public AjaxResult groupCountByAlarmType(String deptId,String projectId,String now,String proType)
public AjaxResult groupCountByAlarmType(String deptId,String projectId,String now)
{
DevAiProjectData devAiProjectData = new DevAiProjectData();
devAiProjectData.setNowRole(Convert.toStr(getUserFirstRole()));
@ -135,7 +132,7 @@ public class VideoAiBoxController extends BaseController {
devAiProjectData.setNowDept(Convert.toStr(getDeptId()));
}
devAiProjectData.setNowUser(Convert.toStr(getUserId()));
String key="bgscreen_aiBoxVideo_groupCountByAlarmType_"+deptId+"_"+projectId+"_"+now+"_"+devAiProjectData.getNowRole()+"_"+devAiProjectData.getNowDept()+"_"+devAiProjectData.getNowUser()+"_"+proType;
String key="bgscreen_aiBoxVideo_groupCountByAlarmType_"+deptId+"_"+projectId+"_"+now+"_"+devAiProjectData.getNowRole()+"_"+devAiProjectData.getNowDept()+"_"+devAiProjectData.getNowUser()+"_"+devAiProjectData.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -146,9 +143,6 @@ public class VideoAiBoxController extends BaseController {
if(projectId!=null && !"0".equals(projectId)){
devAiProjectData.setProjectId(Convert.toLong(projectId));
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
devAiProjectData.setProType(proType);
}
//查询当天数据
if(now!=null && "Y".equals(now)){
Map<String, Object> params = new HashMap<>();
@ -164,7 +158,7 @@ public class VideoAiBoxController extends BaseController {
*
*/
@GetMapping("/selectGroupCountVideoConfig")
public AjaxResult selectGroupCountVideoConfig(String deptId,String projectId,String proType)
public AjaxResult selectGroupCountVideoConfig(String deptId,String projectId)
{
Map<String, Object> map = new HashMap<>();
String nowRole = Convert.toStr(getUserFirstRole());
@ -175,7 +169,8 @@ public class VideoAiBoxController extends BaseController {
map.put("nowDept",Convert.toStr(getDeptId()));
}
map.put("nowUser",Convert.toStr(getUserId()));
String key="bgscreen_aiBoxVideo_selectGroupCountVideoConfig_"+deptId+"_"+projectId+"_"+map.get("nowRole")+"_"+map.get("nowDept")+"_"+map.get("nowUser")+"_"+proType;
SurProjectVideoPassage surProjectVideoPassage = new SurProjectVideoPassage();
String key="bgscreen_aiBoxVideo_selectGroupCountVideoConfig_"+deptId+"_"+projectId+"_"+map.get("nowRole")+"_"+map.get("nowDept")+"_"+map.get("nowUser")+"_"+surProjectVideoPassage.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -186,9 +181,6 @@ public class VideoAiBoxController extends BaseController {
if(projectId!=null && !"0".equals(projectId)){
map.put("projectId",projectId);
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
map.put("proType",proType);
}
List<Map<String, Object>> list = surProjectVideoConfigService.selectGroupCountVideoConfig(map);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return success(list);

View File

@ -39,7 +39,7 @@ public class VideoController extends BaseController {
*
*/
@GetMapping("/listView")
public AjaxResult listView(String deptId,String projectId,String proType)
public AjaxResult listView(String deptId,String projectId)
{
SurProjectVideoConfig surProjectVideoConfig = new SurProjectVideoConfig();
surProjectVideoConfig.setNowRole(Convert.toStr(getUserFirstRole()));
@ -50,7 +50,7 @@ public class VideoController extends BaseController {
}
surProjectVideoConfig.setNowUser(Convert.toStr(getUserId()));
String key="bgscreen_video_listView_"+surProjectVideoConfig.getNowRole()+"_"+surProjectVideoConfig.getNowDept()+"_"+surProjectVideoConfig.getNowUser()+"_"+deptId+"_"+projectId+"_"+proType;
String key="bgscreen_video_listView_"+surProjectVideoConfig.getNowRole()+"_"+surProjectVideoConfig.getNowDept()+"_"+surProjectVideoConfig.getNowUser()+"_"+deptId+"_"+projectId+"_"+surProjectVideoConfig.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
@ -61,9 +61,7 @@ public class VideoController extends BaseController {
if(projectId!=null && !"0".equals(projectId)){
surProjectVideoConfig.setProjectId(Convert.toLong(projectId));
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
surProjectVideoConfig.setProType(proType);
}
surProjectVideoConfig.setActiveName("true");
List<SurProjectVideoConfig> list = surProjectVideoConfigService.selectSurProjectVideoConfigList(surProjectVideoConfig);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return success(list);

View File

@ -71,7 +71,7 @@ public class SurProjectVideoConfigServiceImpl implements ISurProjectVideoConfigS
surProjectVideoConfig.setPassagePassCount(surProjectVideoConfig.getVideoPassageCount());
surProjectVideoConfig.setIsDel(PublicStateEnum.OK.getCode());
//新增的视频为离线
surProjectVideoConfig.setSignalState(PublicStateEnum.VIDEO_UNKNOWN.getCode());
surProjectVideoConfig.setSignalState(PublicStateEnum.VIDEO_ONLINE.getCode());
surProjectVideoConfig.setCreateBy(SecurityUtils.getUsername());
surProjectVideoConfig.setCreateTime(DateUtils.getNowDate());
int rows = surProjectVideoConfigMapper.insertSurProjectVideoConfig(surProjectVideoConfig);

View File

@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasePeriodicalList" parameterType="BasePeriodical" resultMap="BasePeriodicalResult">
<include refid="selectBasePeriodicalVo"/>
<where>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>

View File

@ -34,6 +34,7 @@
<where>
<if test="projectId != null "> and sps.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="activeName != null and activeName != ''"> and sp.progressVisible = 0</if>
<if test="deptId != null "> and sps.dept_id = #{deptId}</if>
<if test="standardDesc != null and standardDesc != ''"> and sps.standard_desc = #{standardDesc}</if>
<if test="ord != null "> and sps.ord = #{ord}</if>
@ -128,7 +129,8 @@
<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="proType != null and proType != '' "> and sp.projectType = #{proType}</if>
<if test="activeName != null and activeName != ''"> and sp.progressVisible = 0</if>
<if test="prjIds !=null and prjIds.size()>0">
and a.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
@ -144,9 +146,8 @@
select a.project_id,count(1) cnt
from sur_project_standard a where a.is_del=0
group by a.project_id )a,
sur_project b where a.project_id=b.id
sur_project b where a.project_id=b.id and b.progressVisible=0
order by a.cnt desc
</select>
<select id="selectList" parameterType="SurProjectStandard" resultMap="SurProjectStandardResult">
<include refid="selectSurProjectStandardVo"/>
@ -155,7 +156,8 @@
<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="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="activeName != null and activeName != ''"> and sp.progressVisible = 0</if>
<if test="prjIds !=null and prjIds.size()>0">
and sps.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">

View File

@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and dapd.is_del='0'
<if test="projectId != null "> and dapd.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="activeName != null and activeName != ''"> and sp.progressVisible = 0</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and dapd.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
@ -86,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept sd on sd.dept_id=dapd.dept_id
left join sys_dict_data sdd on sdd.dict_type='aibox_alarm_type' and sdd.dict_value=dapd.alarm_type
<where>
and dapd.is_del='0'
and dapd.is_del='0' and sp.progressVisible = 0
<if test="projectId != null "> and dapd.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>

View File

@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectName != null "> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="deptId != null "> and spvc.dept_id = #{deptId}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="activeName != null and activeName != ''"> and sp.progressVisible = 0</if>
<if test="deptName != null "> and sd.dept_name like concat('%', #{deptName}, '%')</if>
<if test="videoName != null "> and spvc.video_name like concat('%', #{videoName}, '%')</if>
<if test="videoOnlyType != null and videoOnlyType != ''"> and spvc.video_only_type = #{videoOnlyType}</if>
@ -102,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sur_project_video_passage b on b.video_id = a.id
left join sur_project p on a.project_id=p.id
left join dev_ai_project_config_passage dacp on dacp.video_passage_id = b.id
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!=''
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!='' and p.progressVisible = 0
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and p.projectType = #{proType}</if>
<if test="deptId != null "> and p.deptId = #{deptId}</if>
@ -126,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sur_project_video_passage b on b.video_id = a.id
left join sur_project p on a.project_id=p.id
left join dev_ai_project_config_passage dacp on dacp.video_passage_id = b.id
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!=''
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!='' and p.progressVisible = 0
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and p.projectType = #{proType}</if>
<if test="deptId != null "> and p.deptId = #{deptId}</if>