定制模版记录优化
This commit is contained in:
parent
5e9727821a
commit
747bbb47b1
@ -63,10 +63,17 @@ public class TemplateWeb extends ActionWeb {
|
||||
ResponseObject ro =ResponseObject.newOkResponse();
|
||||
UserContext me = super.getContext();
|
||||
ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance(TemplateConstant.mapping_dw_id,me.getUID(), "新增");
|
||||
BO bo =new BO();
|
||||
bo.set("TPLID",tplId);
|
||||
bo.set("PALID",palId);
|
||||
SDK.getBOAPI().create(TemplateConstant.BO_EU_TPL_PAL_MAPPING, bo, processInstance, me);
|
||||
BO bo = SDK.getBOAPI().query(TemplateConstant.BO_EU_TPL_PAL_MAPPING).addQuery("CREATEUSER=", me.getUID()).addQuery("PALID=", palId).orderByCreated().desc().detail();
|
||||
if(null!=bo){//存在则走更新,不存在则走修改
|
||||
bo.set("TPLID",tplId);
|
||||
bo.set("PALID",palId);
|
||||
SDK.getBOAPI().update(TemplateConstant.BO_EU_TPL_PAL_MAPPING, bo);
|
||||
}else{
|
||||
bo =new BO();
|
||||
bo.set("TPLID",tplId);
|
||||
bo.set("PALID",palId);
|
||||
SDK.getBOAPI().create(TemplateConstant.BO_EU_TPL_PAL_MAPPING, bo, processInstance, me);
|
||||
}
|
||||
return ro.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user