标签:
var year;
var constr;
var maxseq;
//var name;
year=ABS_DATESTRING($DateTime.Today,"yyyy");
//name=ABS_SQLVALUE("select substr(?,instr(?,‘.‘)+1) from dual ",[FAppUser.OrgID.FFullName,FAppUser.OrgID.FFullName]);
maxseq=ABS_SQLVALUE("select nvl(max(to_number(substr(a.FCode,-4))),0)+1 from HRM_ZRLeave a where substr(a.FCode,-9,4)=? and a.fcompany=?",[year,FCompany]);
constr=‘0000‘+maxseq;
FCompany.Name+‘-XZ001-‘+year+‘-‘+constr.substr(-4);
标签:
原文地址:http://www.cnblogs.com/zkx4213/p/4976703.html