|
chain
������ 2021-6-16 11:06:06
|
|
���ó�����ͨ���ű�ֱ����ǰ̨������������û�������ҫ����ҵ��������в�����
�ű�ʾ�����£�- (function(){
- var name = "calltest";
- var loginno = "calltest1";
- var loginpwd = "123456";
- var base64pwd ="";
- var base64 = new packages.cn.myapps.common.util.base64util();
- var loginpwdsbase = new packages.java.lang.string(loginpwd);
- var bytes = loginpwdsbase.getbytes();
- var encoded = base64.encode(bytes);
- if(encoded.length()>2){
- var lp = encoded.substring(0,2);
- var rp = encoded.substring(2,encoded.length());
- base64pwd = rp lp;
- }
- var email = "email@qq.com"
- var status =1;
- var domainid=getdomainid(); //��id
- var telephone = "18379855594";
- var deptid="";
- var department = "�ܾ���";
- var rolename = "ա��";
- var process = getdepartmentprocess();
- var depts= process.getdepartmentbyname(department,getdomainid());
- for(var it=depts.iterator();depts!=null && it.hasnext();){
- var dept = it.next();
- deptid=dept.getid();
- break;
- }
-
- var uservo = new packages.cn.myapps.common.model.user.uservo();//ʵ����һ���û�����
- var uuid = new packages.cn.myapps.util.sequence.sequence().getsequence();//����uuid
- uservo.setid(uuid);
- uservo.setname(name);
- uservo.setloginno(loginno);
- uservo.setloginpwd(base64pwd);
- uservo.setemail(email);
- uservo.setstatus(status);
- uservo.setdomainid(domainid);
- uservo.settelephone(telephone);
- uservo.setdefaultdepartment(deptid);
- var roleid = getroleidbyname(rolename);
- var uprocess = getuserprocess();
- var userdepartmentroleset = new packages.cn.myapps.common.model.user.userdepartmentroleset(uuid,deptid,roleid);
- var list = new packages.java.util.hashset();
- list.add(userdepartmentroleset);
- uservo.setuserdepartmentrolesets(list);
- uprocess.docreate(uservo);
- })()
���ƴ��� |
|