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

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

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