提交 75a90627 authored 作者: whydesc's avatar whydesc

--计划管理增加流程处理人判断

上级 fd70c7aa
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { definitionStartByDeployId } from '/@/components/Process/api/definition'; import { definitionStartByDeployId } from '/@/components/Process/api/definition';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useUserStore } from "/@/store/modules/user";
// 引入待办任务组件 // 引入待办任务组件
import TodoIndex from '../../flowable/task/todo/components/TodoIndex.vue'; import TodoIndex from '../../flowable/task/todo/components/TodoIndex.vue';
import { todoList,getMyTaskFlow } from '/@/components/Process/api/todo'; import { todoList,getMyTaskFlow } from '/@/components/Process/api/todo';
...@@ -122,6 +123,9 @@ ...@@ -122,6 +123,9 @@
const taskName = ref<string>(''); const taskName = ref<string>('');
const showUpBtn = ref(false); const showUpBtn = ref(false);
const taskCache = new Map<string, any>(); const taskCache = new Map<string, any>();
const userStore = useUserStore();
//alert(userStore.getUserInfo.id);
const checkedKeys = ref<Array<string | number>>([]); const checkedKeys = ref<Array<string | number>>([]);
//注册model //注册model
...@@ -401,7 +405,7 @@ console.log("流程已启动:优先使用 record.taskId,否则尝试用 proc ...@@ -401,7 +405,7 @@ console.log("流程已启动:优先使用 record.taskId,否则尝试用 proc
{ {
label: '待办', label: '待办',
ifShow: () => { ifShow: () => {
if (record['bpmStatus'] == '2') return true; if (record['bpmStatus'] == '2' && record['uid'] ==userStore.getUserInfo.id) return true;
else return false; else return false;
}, },
onClick: handleTodoDb.bind(null, record), onClick: handleTodoDb.bind(null, record),
......
...@@ -65,4 +65,8 @@ public class MyTaskFlow implements Serializable { ...@@ -65,4 +65,8 @@ public class MyTaskFlow implements Serializable {
@Excel(name = "procDefId", width = 15) @Excel(name = "procDefId", width = 15)
@Schema(description = "procDefId") @Schema(description = "procDefId")
private java.lang.String procDefId; private java.lang.String procDefId;
/**uid*/
@Excel(name = "uid", width = 15)
@Schema(description = "uid")
private java.lang.String uid;
} }
...@@ -200,6 +200,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask ...@@ -200,6 +200,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskFlow.setTargetId(zdval); taskFlow.setTargetId(zdval);
taskFlow.setDeployId(deploymentId); taskFlow.setDeployId(deploymentId);
taskFlow.setFormTableName(sysForm.getFormTableName()); taskFlow.setFormTableName(sysForm.getFormTableName());
taskFlow.setUid(approvalId);
myTaskFlowService.save(taskFlow); myTaskFlowService.save(taskFlow);
......
...@@ -11,4 +11,5 @@ import org.jeecg.modules.stm.my.entity.MyTask; ...@@ -11,4 +11,5 @@ import org.jeecg.modules.stm.my.entity.MyTask;
*/ */
public interface MyTaskMapper extends BaseMapper<MyTask> { public interface MyTaskMapper extends BaseMapper<MyTask> {
void deleteMytaskByFlowtask(); void deleteMytaskByFlowtask();
String selecUidOftMyTaskFlow(MyTask myTask);
} }
...@@ -16,4 +16,5 @@ public interface IMyTaskService extends IService<MyTask> { ...@@ -16,4 +16,5 @@ public interface IMyTaskService extends IService<MyTask> {
void addMyTaskForMetrc(String[] mtrcNos, String uid); void addMyTaskForMetrc(String[] mtrcNos, String uid);
List<String> getUserIds(Integer fxcPjId); List<String> getUserIds(Integer fxcPjId);
public void deleteMytaskByFlowtask(); public void deleteMytaskByFlowtask();
public String selecUidOftMyTaskFlow(MyTask myTask);
} }
...@@ -112,4 +112,10 @@ public class MyTaskServiceImpl extends ServiceImpl<MyTaskMapper, MyTask> impleme ...@@ -112,4 +112,10 @@ public class MyTaskServiceImpl extends ServiceImpl<MyTaskMapper, MyTask> impleme
public void deleteMytaskByFlowtask() { public void deleteMytaskByFlowtask() {
this.baseMapper.deleteMytaskByFlowtask(); this.baseMapper.deleteMytaskByFlowtask();
} }
@Override
public String selecUidOftMyTaskFlow(MyTask myTask){
return this.baseMapper.selecUidOftMyTaskFlow(myTask);
}
} }
...@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; ...@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.stm.my.entity.MyTask;
import org.jeecg.modules.stm.my.service.IMyTaskService;
import org.jeecg.modules.stm.plan.main.entity.StPlanMan; import org.jeecg.modules.stm.plan.main.entity.StPlanMan;
import org.jeecg.modules.stm.plan.main.service.IStPlanManService; import org.jeecg.modules.stm.plan.main.service.IStPlanManService;
...@@ -25,6 +27,7 @@ import org.springframework.web.servlet.ModelAndView; ...@@ -25,6 +27,7 @@ import org.springframework.web.servlet.ModelAndView;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/** /**
* @Description: 计划编制 * @Description: 计划编制
* @Author: jeecg-boot * @Author: jeecg-boot
...@@ -40,6 +43,9 @@ public class StPlanManController extends JeecgController<StPlanMan, IStPlanManSe ...@@ -40,6 +43,9 @@ public class StPlanManController extends JeecgController<StPlanMan, IStPlanManSe
private IStPlanManService stPlanManService; private IStPlanManService stPlanManService;
@Autowired @Autowired
private ISysDictService iSysDictService; private ISysDictService iSysDictService;
@Autowired
private IMyTaskService myTaskService;
/** /**
* 分页列表查询 * 分页列表查询
...@@ -63,12 +69,25 @@ public class StPlanManController extends JeecgController<StPlanMan, IStPlanManSe ...@@ -63,12 +69,25 @@ public class StPlanManController extends JeecgController<StPlanMan, IStPlanManSe
}else{ }else{
for(StPlanMan stPlanManben:pageList.getRecords()){ for(StPlanMan stPlanManben:pageList.getRecords()){
if(stPlanManben.getDeployId()!=null){
//查询 所属处理人
//WHERE t.deploy_id=#{taskName} AND t.target_id=#{name}
MyTask myTask=new MyTask();
myTask.setTaskName(stPlanManben.getDeployId());
myTask.setName(stPlanManben.getId().toString());
String uid=myTaskService.selecUidOftMyTaskFlow(myTask);
if(uid!=null){
stPlanManben.setUid(uid);
}
}else {
String tableName = getTableNameByMyBatisPlus(); String tableName = getTableNameByMyBatisPlus();
if(tableName!=null&&!tableName.equals("")){ if (tableName != null && !tableName.equals("")) {
//需要根据 tableName 反查DeployId //需要根据 tableName 反查DeployId
String deployId=iSysDictService.queryDictTextByKeyOfformTableName(tableName); String deployId = iSysDictService.queryDictTextByKeyOfformTableName(tableName);
stPlanManben.setDeployId(deployId); stPlanManben.setDeployId(deployId);
} }
}
} }
} }
......
...@@ -147,6 +147,8 @@ public class StPlanMan implements Serializable { ...@@ -147,6 +147,8 @@ public class StPlanMan implements Serializable {
/**部署ID*/ /**部署ID*/
private java.lang.String deployId; private java.lang.String deployId;
/**处理人id*/
private java.lang.String uid;
} }
...@@ -6,4 +6,13 @@ ...@@ -6,4 +6,13 @@
delete from my_task where tp=5 delete from my_task where tp=5
</delete> </delete>
<select id="selecUidOftMyTaskFlow" resultType="String">
SELECT t.uid
FROM my_task_flow t
WHERE t.deploy_id=#{taskName} AND t.target_id=#{name}
LIMIT 1
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论