Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
3532bc3f04
|
@ -52,4 +52,8 @@ public interface IFlowBusinessKeyService {
|
|||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity);
|
||||
|
||||
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where);
|
||||
}
|
||||
|
|
|
@ -98,4 +98,14 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
|
|||
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity) {
|
||||
return flowBusinessKeyMapper.selectMyFinishedFlowTask(flowTaskEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where) {
|
||||
return flowBusinessKeyMapper.groupByCategory(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where) {
|
||||
return flowBusinessKeyMapper.groupByUnit(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,4 +45,7 @@ public interface FlowBusinessKeyMapper {
|
|||
*/
|
||||
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity);
|
||||
|
||||
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where);
|
||||
}
|
||||
|
|
|
@ -108,5 +108,41 @@
|
|||
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and fa.endTime between #{params.beginDate} and #{params.endDate}</if>
|
||||
order by fa.endTime desc
|
||||
</select>
|
||||
<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
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</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
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
GROUP BY category) c ON a.dict_value=c.category
|
||||
</select>
|
||||
<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 '总包%'
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
UNION
|
||||
SELECT *,'监理单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '监理%'
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
UNION
|
||||
SELECT *,'设计单位' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '设计%'
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
UNION
|
||||
SELECT *,'甲方代表' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '甲方%'
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
UNION
|
||||
SELECT *,'子公司' cat FROM vw_flow_all WHERE finishTime IS NULL AND taskName LIKE '工程%'
|
||||
<if test="deployId !=null and deployId!=''">and businessDeptId=#{deployId}</if>
|
||||
<if test="businessKey !=null and businessKey!=''">and businessKey=#{businessKey}</if>
|
||||
) a WHERE businessDeptId=113 AND businessKey
|
||||
GROUP BY cat
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -17,6 +17,10 @@
|
|||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-flowable</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yanzhu.jh</groupId>
|
||||
<artifactId>yanzhu-jh</artifactId>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
||||
import com.ruoyi.system.domain.FlowTaskEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/flow")
|
||||
public class FloweController {
|
||||
@Autowired
|
||||
IFlowBusinessKeyService flowBusinessKeyService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@GetMapping("/groupByCategory")
|
||||
public AjaxResult groupByCategory(long deptId,long projectId){
|
||||
FlowTaskEntity where=new FlowTaskEntity();
|
||||
where.setDeployId(deptId<1?null:""+deptId);
|
||||
where.setBusinessKey(projectId<1?null:""+projectId);
|
||||
List<FlowTaskEntity> list=flowBusinessKeyService.groupByCategory(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/groupByUnit")
|
||||
public AjaxResult groupByUnit(long deptId,long projectId){
|
||||
FlowTaskEntity where=new FlowTaskEntity();
|
||||
where.setDeployId(deptId<1?"":""+deptId);
|
||||
where.setBusinessKey(projectId<1?"":""+projectId);
|
||||
List<FlowTaskEntity> list=flowBusinessKeyService.groupByUnit(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.yanzhu.jh.project.domain.SurProjectStandard;
|
||||
import com.yanzhu.jh.project.service.ISurProjectStandardService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/standard")
|
||||
public class ProjectStandardController {
|
||||
@Autowired
|
||||
ISurProjectStandardService standardService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult getList(Long deptId,Long projectId){
|
||||
SurProjectStandard where=new SurProjectStandard();
|
||||
where.setProjectId(projectId);
|
||||
where.setIsDel(0l);
|
||||
String key="bgscreen_standard_getList_"+projectId;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return AjaxResult.success(obj);
|
||||
}
|
||||
List<SurProjectStandard> list=standardService.selectSurProjectStandardList(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue