代码如下:
#include "mf_oa_performance_service";
(function(){
var username = getWebUser().getName();
var p_domainid = getDomainid();
var p_cnt = 0;
var sql = "";
var c1 = "";
var a = "11e5-97f9-7df5ce8b-ac1d-a71ff75c2789";
var d = "11e5-97f8-c3340d66-ac1d-a71ff75c2789";
//请假申请
sql = "select ITEM_APPLICANT,DOMAINID from tlk_t_bpm_hr_apply where statelabel <> '终止' and auditornames like '%" + username + "%' union all select ITEM_APPLICANT,DOMAINID from tlk_t_bpm_hr_overtime_apply where statelabel <> '终止' and auditornames like '%" + username + "%' union all select ITEM_APPLICANT,DOMAINID from tlk_t_bpm_hr_nightwork where statelabel <> '终止' and auditornames like '%" + username + "%' union all select ITEM_APPLICANT,DOMAINID from tlk_t_bpm_hr_correction_apply where statelabel <> '终止' and auditornames like '%" + username + "%' UNION ALL select ITEM_APPLICANT,DOMAINID from tlk_t_bpm_hr_travel_out_apply where statelabel <> '终止' and auditornames like '%" + username + "%' ";
var process = getDocProcess(a);
p_cnt = process.countBySQL(sql, d);
if (p_cnt == null || p_cnt == "") {
p_cnt = "0";
}
c1 = "<a href='/obpm/portal/dynaform/view/displayViewWithPermission.action?_viewid=11e5-bbfc-19e5520d-96d3-43516d36ece4&clearTemp=true&application=11e5-97f9-7df5ce8b-ac1d-a71ff75c2789&_resourceid=11e5-bbfc-75372930-96d3-43516d36ece4'>考勤待办数 (<b style='color:red'>" + p_cnt + "</b>)</a>";
//费用申请
p_cnt=0;
sql = "SELECT *,statelabel item_statelabel from tlk_t_bpm_finance_apply where statelabel <> '终止' and AUDITORNAMES like '%"+username+"%' ";
p_cnt = process.countBySQL(sql, d);
c1 = c1+ "<br> <a href='/obpm/portal/dynaform/view/displayViewWithPermission.action?_viewid=11e5-b815-c15b7b85-8cca-a5f9b17ee71b&clearTemp=true&application=11e5-97f9-7df5ce8b-ac1d-a71ff75c2789&_resourceid=11e5-b831-a28d84c7-a168-a9fbd1b69a98'>费用申请待办数 (<b style='color:red'>" + p_cnt + "</b>)</a>";
c1; |