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

补充动态实例标记

上级 0309cbe6
...@@ -759,19 +759,21 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa ...@@ -759,19 +759,21 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if isDynaSys> <#if isDynaSys>
private Map<String,Map<String,Object>> fillWFTaskContext(${item.getCodeName()}SearchContext context){ private Map<String,Map<String,Object>> fillWFTaskContext(${item.getCodeName()}SearchContext context){
Map<String, Map<String, Object>> businessKeys = null; Map<String, Map<String, Object>> businessKeys = null;
if (!StringUtils.isEmpty(context.getSrfDynaInstId()) && !StringUtils.isEmpty(context.getSrfWF())) { if (!StringUtils.isEmpty(context.getSrfInstTag()) && !StringUtils.isEmpty(context.getSrfWF())) {
String instTag = context.getSrfInstTag();
String instTag2 = context.getSrfInstTag2();
String srfWF = context.getSrfWF(); String srfWF = context.getSrfWF();
if ("toread".equals(srfWF)) { if ("toread".equals(srfWF)) {
businessKeys= ibzwfFeignClient.getUnReadTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", context.getSrfDynaInstId()); businessKeys= ibzwfFeignClient.getUnReadTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", instTag, instTag2);
} }
else if ("todo".equals(srfWF)) { else if ("todo".equals(srfWF)) {
businessKeys= ibzwfFeignClient.getTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", context.getSrfDynaInstId()); businessKeys= ibzwfFeignClient.getTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", instTag, instTag2);
} }
else if ("done".equals(srfWF)) { else if ("done".equals(srfWF)) {
businessKeys= ibzwfFeignClient.getDoneTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", context.getSrfDynaInstId()); businessKeys= ibzwfFeignClient.getDoneTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", instTag, instTag2);
} }
else if ("finish".equals(srfWF)) { else if ("finish".equals(srfWF)) {
businessKeys= ibzwfFeignClient.getFinishTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", context.getSrfDynaInstId()); businessKeys= ibzwfFeignClient.getFinishTaskByUserId("${sys.getCodeName()?lower_case}", ${pub.getPKGCodeName()}.util.security.AuthenticationUser.getAuthenticationUser().getUserid(),"${entityName}", instTag, instTag2);
} }
if(!ObjectUtils.isEmpty(businessKeys)){ if(!ObjectUtils.isEmpty(businessKeys)){
context.getSelectCond().in("${keyfield.name?lower_case}",businessKeys.keySet()); context.getSelectCond().in("${keyfield.name?lower_case}",businessKeys.keySet());
......
...@@ -41,22 +41,22 @@ public class IBZWFFallback implements IBZWFFeignClient { ...@@ -41,22 +41,22 @@ public class IBZWFFallback implements IBZWFFeignClient {
<#if isDynaSys> <#if isDynaSys>
@Override @Override
public Map<String, Map<String, Object>> getTaskByUserId(String system, String userId, String entity, String dynainstid) { public Map<String, Map<String, Object>> getTaskByUserId(String system, String userId, String entity, String instTag, String instTag2) {
return null; return null;
} }
@Override @Override
public Map<String, Map<String, Object>> getUnReadTaskByUserId(String system, String userId, String entity, String dynainstid) { public Map<String, Map<String, Object>> getUnReadTaskByUserId(String system, String userId, String entity, String instTag, String instTag2) {
return null; return null;
} }
@Override @Override
public Map<String, Map<String, Object>> getDoneTaskByUserId(String system, String userId, String entity, String dynainstid) { public Map<String, Map<String, Object>> getDoneTaskByUserId(String system, String userId, String entity, String instTag, String instTag2) {
return null; return null;
} }
@Override @Override
public Map<String, Map<String, Object>> getFinishTaskByUserId(String system, String userId, String entity, String dynainstid) { public Map<String, Map<String, Object>> getFinishTaskByUserId(String system, String userId, String entity, String instTag, String instTag2) {
return null; return null;
} }
</#if> </#if>
......
...@@ -38,20 +38,20 @@ public interface IBZWFFeignClient ...@@ -38,20 +38,20 @@ public interface IBZWFFeignClient
@PathVariable("businessKey") String businessKey, @RequestBody JSONObject instance); @PathVariable("businessKey") String businessKey, @RequestBody JSONObject instance);
<#if isDynaSys> <#if isDynaSys>
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{dynainstid}/{entity}/tasks") @RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks")
Map<String,Map<String,Object>> getTaskByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId, Map<String, Map<String, Object>> getTaskByUserId(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity,@PathVariable("dynainstid") String dynainstid); @PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2);
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{dynainstid}/{entity}/tasks/unread") @RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks/unread")
Map<String,Map<String,Object>> getUnReadTaskByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId, Map<String, Map<String, Object>> getUnReadTaskByUserId(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity,@PathVariable("dynainstid") String dynainstid); @PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2);
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{dynainstid}/{entity}/tasks/done") @RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks/done")
Map<String,Map<String,Object>> getDoneTaskByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId, Map<String, Map<String, Object>> getDoneTaskByUserId(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity,@PathVariable("dynainstid") String dynainstid); @PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2);
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{dynainstid}/{entity}/tasks/finish") @RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks/finish")
Map<String,Map<String,Object>> getFinishTaskByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId, Map<String, Map<String, Object>> getFinishTaskByUserId(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity,@PathVariable("dynainstid") String dynainstid); @PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2);
</#if> </#if>
} }
...@@ -100,16 +100,30 @@ public class SearchContextBase implements ISearchContext{ ...@@ -100,16 +100,30 @@ public class SearchContextBase implements ISearchContext{
/** /**
* 动态实例标识 * 动态实例标识
*/ */
@JsonProperty("srfdynainstid") @JsonProperty("srfinsttag")
public String srfDynaInstId; public String srfInstTag;
public String getSrfDynaInstId() { /**
if(StringUtils.isEmpty(srfDynaInstId)){ * 动态实例标识2
Object dynainstid=params.get("srfdynainstid"); */
return StringUtils.isEmpty(dynainstid)?null:String.valueOf(dynainstid); @JsonProperty("srfinsttag2")
public String srfInstTag2;
public String getSrfInstTag() {
if (StringUtils.isEmpty(srfInstTag)) {
Object instTag = params.get("srfinsttag");
return ObjectUtils.isEmpty(instTag) ? null : String.valueOf(instTag);
} else {
return srfInstTag;
} }
else{ }
return srfDynaInstId;
public String getSrfInstTag2() {
if (StringUtils.isEmpty(srfInstTag2)) {
Object instTag2 = params.get("srfinsttag2");
return ObjectUtils.isEmpty(instTag2) ? null : String.valueOf(instTag2);
} else {
return srfInstTag2;
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册