// === EIP4 P4 脚本迁移产出 === // template_id : 17a7176a-0003-4e85-a7b2-003d1c03acae // template_name: 新APP应用管理(更新包) // seq : 1 // label : NO_S3 // 处置 : 无 S3 模式,原样进 P4 def x; def y; def z; def id = ""; def company = getFieldValue("COMPANY"); def method = getFieldValue("METHOD"); def sql = "select * from NEWAPP_UPDATE where COMPANY = "+company+" order by CREATETIME DESC"; def po = GetServicesFunction.listSelectResultBySql([:],"NEWAPP_UPDATE",sql,["ID"]); if(po&&po.size()>0){ id = po.get(0).get_Value("ID"); x = id.substring(0,id.indexOf(".")); y = id.substring(id.indexOf(".")+1,id.lastIndexOf(".")); z = id.substring(id.lastIndexOf(".")+1,id.size()); if(method == 1){ z = z.toInteger()+1;//GetValueFunction.toInteger(z)+1; }else if(method == 2){ y = y.toInteger()+1; }; id = x+"."+y+"."+z; }else{ x=1; y=0; z=1; id = x+"."+y+"."+z; } bindField("ID",id)