將Oracle時間字串轉換為時間
系統單月抓出來有空格,雙月無空格
var str = new java.lang.String("05-8月-13"); str = str.replaceAll(" ",""); var inFormatter = new java.text.SimpleDateFormat("dd-MM月-yy"); var inDate = inFormatter.parse(str); var flowDate = new Packages.pase.agenda.MyDate(inDate); flowDate.addDay(flowDate.toString(),21); var outDate = new java.util.Date(flowDate); var outFormatter = new java.text.SimpleDateFormat("yyyy/MM/dd"); Form.setValue("script",outFormatter.format(outDate));
DepID取得部門主管欄位,再透過部門主管欄位取得主管職務MemID
var rol = Client.getDepartment("DEP02671199157696281").getManagerID(); var DivisionMemid = Client.getRole(rol).getMemberList().get(0); Form.setValue("script",DivisionMemid );
專案職務取MemId與姓名
var prjRoleID = "ROL03451172741554296"; var prjmemid = Client.getRole(prjRoleID).getMemberList().get(0); var MemberBymID = Client.getMember(prjmemid).getName(); Form.setValue("script",MemberBymID );
Name_To_MemId
var mem=Client.getMemberByCName("王小明"); var mail=mem.getID(); Form.setValue("script",mail);
MemID_To_RoleID
var MemberRecord = Client.getMember("MEM47111273625147618"); var RoleID = MemberRecord.getMainRoleID(); Form.setValue("script",RoleID );
沒有留言:
張貼留言