update code

dev_xds
haha 2024-05-04 00:57:31 +08:00
parent 9a3f8bfee8
commit c63d824aaf
7 changed files with 135 additions and 11 deletions

View File

@ -114,4 +114,17 @@ public interface IFlowBusinessKeyService {
* @return
*/
public List<SysUser> findFlowTaskUsers(String businessKey, List<String> candidateUsers, List<String> candidateGroups);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> groupFlowBySubDeptType(FlowTaskEntity where);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> listFlowBySubDeptType(FlowTaskEntity where);
}

View File

@ -203,5 +203,23 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
return flowBusinessKeyMapper.findFlowTaskUsers(businessKey,candidateUsers,candidateGroups);
}
}
/**
* -
* @param where
* @return
*/
@Override
public List<FlowTaskEntity> groupFlowBySubDeptType(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupFlowBySubDeptType(where);
}
/**
* -
* @param where
* @return
*/
@Override
public List<FlowTaskEntity> listFlowBySubDeptType(FlowTaskEntity where) {
return flowBusinessKeyMapper.listFlowBySubDeptType(where);
}
}

View File

@ -115,4 +115,16 @@ public interface FlowBusinessKeyMapper {
* @return
*/
public List<SysUser> findFlowTaskDeptUsers(@Param("businessKey") String businessKey, @Param("candidateUsers") List<String> candidateUsers, @Param("candidateGroups") List<String> candidateGroups);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> groupFlowBySubDeptType(FlowTaskEntity where);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> listFlowBySubDeptType(FlowTaskEntity where);
}

View File

@ -508,4 +508,51 @@
(SELECT 1 FROM sur_project sp WHERE sp.id=#{businessKey} and (FIND_IN_SET(sp.deptId,sd.ancestors) or sp.deptId=sd.dept_id));
</select>
<select id="groupFlowBySubDeptType" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
select x.dict_label taskName,y.taskId from (
select dict_value,dict_label
from sys_dict_data where dict_type='flow_sub_dept_type'
) x left join (
SELECT d.dict_value, d.dict_label,count(1) taskId FROM
vw_flow_all a
LEFT JOIN act_hi_varinst b ON a.procInsId=b.PROC_INST_ID_ AND b.NAME_='subDeptType'
LEFT JOIN act_hi_varinst c ON a.procInsId=c.PROC_INST_ID_ AND c.NAME_='subDeptName'
LEFT JOIN sys_dict_data D ON b.TEXT_=d.dict_value and d.dict_type='flow_sub_dept_type'
left join sur_project sp on a.businesskey=sp.id
where a.procDefKey='flow_fbzzsp_fbszzsp'
AND (A.finishTime is null OR (A.finishTime is not null and A.taskComType =1))
and sp.progressVisible=0 and sp.isDel=0
<if test="deptId !=null and deptId>0">and a.businessDeptId=#{deptId}</if>
<if test="projectId !=null and projectId>0">and a.businessKey=#{projectId}</if>
<if test="prjIds !=null and prjIds.size()>0">
and a.businessKey in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
group by d.dict_value,d.dict_label
) y on x.dict_value=y.dict_value
</select>
<select id="listFlowBySubDeptType" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT a.procInsId,a.deployId,a.createTime,a.finishTime,a.businessKey,a.businessKeyName,a.startDeptName,b.TEXT_ as taskId, c.TEXT_ as deptName,d.dict_label taskName FROM
vw_flow_all a
LEFT JOIN act_hi_varinst b ON a.procInsId=b.PROC_INST_ID_ AND b.NAME_='subDeptType'
LEFT JOIN act_hi_varinst c ON a.procInsId=c.PROC_INST_ID_ AND c.NAME_='subDeptName'
LEFT JOIN sys_dict_data D ON b.TEXT_=d.dict_value and d.dict_type='flow_sub_dept_type'
left join sur_project sp on a.businesskey=sp.id
where a.procDefKey='flow_fbzzsp_fbszzsp'
AND (A.finishTime is null OR (A.finishTime is not null and A.taskComType =1))
and sp.progressVisible=0 and sp.isDel=0
<if test="deptId !=null and deptId>0">and a.businessDeptId=#{deptId}</if>
<if test="projectId !=null and projectId>0">and a.businessKey=#{projectId}</if>
<if test="prjIds !=null and prjIds.size()>0">
and a.businessKey in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
</select>
</mapper>

View File

@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询项目项目全景列表
// 查询项目全景列表
export function listPrjphotography(query) {
return request({
url: '/video/prjphotography/list',
@ -9,7 +9,7 @@ export function listPrjphotography(query) {
})
}
// 查询项目项目全景详细
// 查询项目全景详细
export function getPrjphotography(id) {
return request({
url: '/video/prjphotography/' + id,
@ -17,7 +17,7 @@ export function getPrjphotography(id) {
})
}
// 新增项目项目全景
// 新增项目全景
export function addPrjphotography(data) {
return request({
url: '/video/prjphotography',
@ -26,7 +26,7 @@ export function addPrjphotography(data) {
})
}
// 修改项目项目全景
// 修改项目全景
export function updatePrjphotography(data) {
return request({
url: '/video/prjphotography',
@ -35,7 +35,7 @@ export function updatePrjphotography(data) {
})
}
// 删除项目项目全景
// 删除项目全景
export function delPrjphotography(id) {
return request({
url: '/video/prjphotography/' + id,

View File

@ -89,7 +89,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改项目项目全景对话框 -->
<!-- 添加或修改项目全景对话框 -->
<el-dialog :title="title" :visible.sync="open" width="720px" custom-class="prj-photography-drawer-dlg"
append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -138,7 +138,7 @@ export default {
showSearch: true,
//
total: 0,
//
//
prjphotographyList: [],
//
title: "",
@ -201,7 +201,7 @@ export default {
this.prj=prj;
this.getList();
},
/** 查询项目项目全景列表 */
/** 查询项目全景列表 */
getList() {
this.loading = true;
this.queryParams.projectId=this.prj.id;
@ -259,7 +259,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "项目项目全景 - 新增";
this.title = "项目全景 - 新增";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -269,7 +269,7 @@ export default {
this.form = response.data;
this.form.imageUrls=(this.$tryToJson(this.form.imageUrl,[]));
this.open = true;
this.title = "项目项目全景 - 修改";
this.title = "项目全景 - 修改";
});
},
/** 提交按钮 */
@ -308,7 +308,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除项目项目全景编号为"' + ids + '"的数据项?').then(function () {
this.$modal.confirm('是否确认删除项目全景编号为"' + ids + '"的数据项?').then(function () {
return delPrjphotography(ids);
}).then(() => {
this.getList();

View File

@ -57,6 +57,40 @@ public class FloweController extends BaseController {
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
}
/**
* -
* @param where
* @return
*/
@PostMapping("/groupFlowBySubDeptType")
public AjaxResult groupFlowBySubDeptType(@RequestBody FlowTaskEntity where){
long deptId=where.getDeptId();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
List<FlowTaskEntity> list=flowBusinessKeyService.groupFlowBySubDeptType(where);
return AjaxResult.success(list);
}
/**
* -
* @param where
* @return
*/
@PostMapping("/listFlowBySubDeptType")
public TableDataInfo listFlowBySubDeptType(@RequestBody FlowTaskEntity where){
long deptId=where.getDeptId();
if(deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
startPage();
List<FlowTaskEntity> list=flowBusinessKeyService.listFlowBySubDeptType(where);
return getDataTable(list);
}
@GetMapping("/groupByUnit")
public AjaxResult groupByUnit(long deptId,long projectId){