提交 276e6fcf 编写于 作者: zhouweidong's avatar zhouweidong

v2适配统一待办

上级 52a37d7d
......@@ -727,15 +727,22 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if de.hasPSDEWF()==true>
<#if isDynaSys>
Map<String,Map<String,Object>> businesskeys = fillWFTaskContext(context);
<#else>
fillWFTaskContext(context);
</#if>
</#if>
com.baomidou.mybatisplus.extension.plugins.pagination.Page<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>> pages=baseMapper.search${dedataset.getCodeName()}(context.getPages(),context,context.getSelectCond());
<#if de.hasPSDEWF()==true && isDynaSys>
fillWFParam(pages,businesskeys);
</#if>
return new PageImpl<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>>(pages.getRecords(), context.getPageable(), pages.getTotal());
<#else>
if(!StringUtils.isEmpty(context.getSrfWF())){
Map<String,Map<String,Object>> businesskeys = fillWFTaskContext2(context);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>> pages=baseMapper.search${dedataset.getCodeName()}(context.getPages(),context,context.getSelectCond());
fillWFParam(pages,businesskeys);
return new PageImpl<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>>(pages.getRecords(), context.getPageable(), pages.getTotal());
}else{
fillWFTaskContext(context);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>> pages=baseMapper.search${dedataset.getCodeName()}(context.getPages(),context,context.getSelectCond());
return new PageImpl<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
</#if>
</#if>
<#--</#list>-->
<#else>
return null ;
......@@ -799,6 +806,25 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
}
}
<#else>
/**
* 查询统一工作流待办
* @param context
*/
private Map<String,Map<String,Object>> fillWFTaskContext2(ORDERSearchContext context){
Map<String, Map<String, Object>> businessKeys = null;
if(!StringUtils.isEmpty(context.getSrfWF())){
businessKeys= ibzwfFeignClient.getMyTask("${sys.getCodeName()?lower_case}", "", "${entityName}");
if(businessKeys.size()>0){
context.getSelectCond().in("${keyfield.name?lower_case}",businessKeys.keySet());
}
else{
context.getSelectCond().apply("1<>1");
}
}
return businessKeys;
}
private void fillWFTaskContext(${item.getCodeName()}SearchContext context){
if(!StringUtils.isEmpty(context.getUserTaskId()) && !StringUtils.isEmpty(context.getProcessDefinitionKey())){
List<String> businessKeys= ibzwfFeignClient.getbusinesskeysByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}",context.getProcessDefinitionKey(),context.getUserTaskId());
......@@ -1554,7 +1580,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if>
</#list>
</#if>
@Resource
protected MongoTemplate mongoTemplate;
......
......@@ -46,4 +46,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
return null;
}
@Override
public Map<String, Map<String, Object>> getMyTask(String system, String appName, String entity) {
return null;
}
}
......@@ -42,4 +42,8 @@ public interface IBZWFFeignClient
Integer getDataAccessMode(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable("businessKey") Serializable businessKey);
<#--</#if>-->
@RequestMapping(method = RequestMethod.GET, value = "/{system}-app-{appname}/{entity}/mytasks")
Map<String,Map<String,Object>> getMyTask(@PathVariable("system") String system,@PathVariable("appname") String appName,
@PathVariable("entity") String entity);
}
......@@ -89,7 +89,13 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
*/
public String processDefinitionKey;
/**
* 工作流标识
*/
@JsonProperty("srfwf")
public String srfWF;
<#if hasESEntity>
/**
* es查询条件
*/
......@@ -127,12 +133,6 @@ public class SearchContextBase implements ISearchContext{
}
}
/**
* 工作流待办/待阅标识
*/
@JsonProperty("srfwf")
public String srfWF;
/**
* 工作流步骤标识
*/
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册