表单 | 事件 | 代码 |
tk_wj_qx | Preloading | def main(): if args.xiao: exist = dh.Obj("select * from tk.tk_wj_qx where jgdm=@jgdm",args.xiao) if not exist: dh.Exec("insert into tk.tk_wj_qx(jgdm,jgmc,sheng,shi,qu,insertedtime,updatedtime,ddztsj,xzqmc) select jgdm,jgmc,left(fjjgdm,2),left(fjjgdm,4),left(fjjgdm,6),now(),now(),now(),xzqmc from uc.uc_jigou t1 left join uc.uc_qu t2 on left(t1.fjjgdm,6)=t2.xzqdm where jgdm=@jgdm",args.xiao) main() |
tk_xggd_sheng | Preloading | def main(): if args.sheng: sheng = args.sheng wxgl = dh.Objs("select * from uc.uc_wxgl_cjwj where sfqy=1 and sfjrrw=1") cmds = [] for row in wxgl: exist = dh.Obj("select * from tk.tk_xggd_sheng where sheng=@sheng and item=@item",sheng,row.dm) if not exist: id =ph.dd.uuid() cmds+=[dh.Cmd("insert into tk.tk_xggd_sheng(id,sheng,item,insertedtime,updatedtime) values(@id,@sheng,@item,@insertedtime,@updatdtime)",id,sheng,row.dm,ph.dd.now(),ph.dd.now())] n=dh.Exec(cmds) main() |
tk_xggd_shi | Preloading | def main(): if args.shi: shi = args.shi wxgl = dh.Objs("select * from uc.uc_wxgl_cjwj where sfqy=1 and sfjrrw=1") cmds = [] for row in wxgl: exist = dh.Obj("select * from tk.tk_xggd_shi where shi=@shi and item=@item",shi,row.dm) if not exist: id =ph.dd.uuid() cmds+=[dh.Cmd("insert into tk.tk_xggd_shi(id,sheng,shi,item,insertedtime,updatedtime) values(@id,@sheng,@shi,@item,@insertedtime,@updatdtime)",id,shi[0:2],shi,row.dm,ph.dd.now(),ph.dd.now())] n=dh.Exec(cmds) main() |
tk_task_xiao | Saving | def main(): for row in data: if row.sffb=='1': if not row.fbsj: row.fbsj=ph.dd.now() main() |
tk_xggd_qu | Saving | def main(): for row in data: exist=dh.Obj("select * from tk.tk_xggd_qu where sfyxggd is not NULL and item=@item and qu=@qu and id!=@id",row) if exist: if row.sfyxggd=='0': return '同一业务没有相关规定不能重复创建' main() |
tk_xggd_sheng | Saving | def main(): for row in data: exist=dh.Obj("select * from tk.tk_xggd_sheng where sfyxggd is not NULL and item=@item and sheng=@sheng and id!=@id",row) if exist: if row.sfyxggd=='0': return '同一业务没有相关规定不能重复创建' main() |
tk_xggd_shi | Saving | def main(): for row in data: exist=dh.Obj("select * from tk.tk_xggd_shi where sfyxggd is not NULL and item=@item and shi=@shi and id!=@id",row) if exist: if row.sfyxggd=='0': return '同一业务没有相关规定不能重复创建' main() |
tk_xggd_xiao | Saving | def main(): for row in data: exist=dh.Obj("select * from tk.tk_xggd_xiao where sfyxggd is not NULL and item=@item and jgdm=@jgdm and id!=@id",row) if exist: if row.sfyxggd=='0': return '同一业务没有相关规定不能重复创建' main() |
tk_xggd_qu | Saved | def main(): for row in data: if row.sfyxggd=='0': dh.Exec("update tk.tk_xggd_qu set sczcwb=null,sczcwb_filename=null,kcwz=null where id=@id",row.id) main() |
uc_jy_sb | Defaulted | def main(): for row in data: row.userid=args.uid if args.xiao: row.dw = dh.Obj("select * from uc.uc_jigou where jgdm=@xiao",args.xiao).jgmc row.dwdm = args.xiao break if args.qu: row.dw = dh.Obj("select * from uc.uc_qu where xzqdm=@qu",args.qu).xzjgmc row.dwdm=args.qu break if args.shi: row.dw = dh.Obj("select * from uc.uc_shi where dm=@shi",args.shi).xzjgmc row.dwdm=args.qu break if args.sheng: row.dw = dh.Obj("select * from uc.uc_sheng where ssm=@sheng",args.sheng).xzjgmc row.dwdm=args.sheng break main() |
test_xskhfwcyqk | Defaulted | def main(): for row in data: row.xxlb = '学校类别' # args.xiao 去读 main() |
uc_notice_file | Saving | def main(): for row in data: if row.ispublished=='1': row.publishtime = ph.dd.now() main() |
dim_xskhfwcyqk | Saving | def main(): for row in data: if not(row.czbtbz and row.sfyfwxsfhdsf and row.sfbz and row.sfxsczzxbzjf): return if int(row.czbtbz) > 10000 or int(row.czbtbz) <= 0 and int(row.sfxsczzxbzjf): return "有财政补贴,财政补贴金额应在1-10000范围内" if not int(row.sfyfwxsfhdsf) and row.sfbz != '0': return "无服务性收费或代收费,收费金额只能为0" if row.xszs: xss = ['cj1t','cj2t','cj3t','cj4t','cj5t'] zs=0 for xs in xss: if row[xs]:zs+=int(row[xs]) if zs>int(row.xszs): return '参加1天-5天学生数之和不能大于学生总数' if row.cj5t and row.cj5t2xs: if int(row.cj5t2xs)>int(row.cj5t): return '其中每天参加2小时学生数不能大于学生数' if str(row.sfyfwxsfhdsf)=='0': row.sfbz= 0 if row.sjd_ks and row.sjd_js: '''if row.sjd_ks[11:16]=='00:00':return '开始时间不能为0' if row.sjd_js[11:16]=='00:00':return '结束时间不能为0' ''' from System import DateTime row.sjd_min = (DateTime.Parse(row.sjd_js) - DateTime.Parse(row.sjd_ks)).TotalMinutes if row.sjd_min < 0: return '结束时间不能大于开始时间' row.updated = 1 main() |
dim_gdsqtgfwkzqk | Preloading | def main(): if not args.qu: return obj = dh.Obj("select * from dim.dim_gdsqtgfwkzqk where qu=@qu", args.qu) if obj: return dbset = db.Set("dim_gdsqtgfwkzqk") obj = dbset.Create() ph.dd.extend(obj, dh.Obj("select sheng, shengmc, shi, shimc, qu, qumc from uc.uc_qu where qu=@qu", args.qu)) dbset.Insert(obj, False) main() |
dim_ywjykhfwkzqktj_qu | Transfering | def main(): if args.qu: undo = dh.Obj("select count(0) zs from dim.dim_ywjykhfwkzqktj_qu where qu=@qu and saved=0",args.qu).zs if undo>0: return '您有{0}条数据尚未填写完整'.format(undo) main() |
dim_ywjykhfwkzqktj_qu | Transfered | def main(): if args.qu: undo = dh.Obj("select count(0) zs from dim.dim_ywjykhfwkzqktj_qu where qu=@qu and saved=0",args.qu).zs if undo==0: n=dh.Exec("update dim.dim_ywjykhfwkzqktj_qu set ddztm='1',ddztsj=now(),wcqxs=1 where qu=@qu",args.qu) return jh.Href("/core/uform/datagrid/dim_ywjykhfwkzqktj_qu?ff=ddztm&fv=1","_self") main() |
tk_khfw_ssfa_qu | Saving | def main(): for row in data: row.saved = 1 row._pb_saved=1 main() |
tk_khfw_ssfa_qu | Transfering | def main(): objs = dh.Objs("select * from tk.tk_khfw_ssfa_qu where qu=@qu", args.qu) for obj in objs: if not obj.ofile: return "存在文件未提交" if args.qu: undo = dh.Obj("select count(0) zs from tk.tk_khfw_ssfa_qu where qu=@qu and saved=0",args.qu).zs if undo>0: return '您有{0}条数据尚未更新'.format(undo) main() |
tk_wxgl_xxjxglbf | Transfering | def main(): if args.xiao: objs = dh.Objs("select * from tk.tk_wxgl_xxjxglbf where jgdm=@jgdm", args.xiao) for obj in objs: if not obj.ofile: return "存在管理办法未上传" undo = dh.Obj("select count(0) zs from tk.tk_wxgl_xxjxglbf where jgdm=@jgdm and saved=0",args.jgdm).zs if undo>0: return '您有{0}条数据尚未更新'.format(undo) main() |
tk_wxgl_xxjxglbf | Defaulted | def main(): for row in data: row.userid = args.uid if args.xiao: obj = dh.Obj("select * from uc.uc_jigou where jgdm=@jgdm", args.xiao) row.shengmc = obj.shengmc row.shimc = obj.shimc row.qumc = obj.qumc row.jgmc = obj.jgmc main() |
tk_task_xiao_sckb | Saving | import System import clr clr.AddReference("Aspose.Cells") import Aspose from System.IO import FileInfo, DirectoryInfo, Path def main(): njs = ['一年级','二年级','三年级','四年级','五年级','六年级','七年级','八年级','九年级'] for row in data: path = Server.MapPath('/app_data/vp/uform/tk_task_xiao_sckb/ofile{0}'.format(row.ofile)) wookbook = Aspose.Cells.Workbook(path) for i in range(9): if wookbook.Worksheets[i].Name!=njs[i]:return '上传文件与模板文件不符' row.saved = 1 def main2(): try: return main() except: return '请使用模板' main2() |
uc_user_xiao | Saving | def main(): for row in data: if row.roles: for role in row.roles.split(','): if 'C' not in role: return '禁止选择其他角色' main() |
tk_clsb | Defaulted | def main(): for row in data: row.userid = args.uid if args.xiao: row.tjdw = dh.Obj("select * from uc.uc_jigou where jgdm=@xiao", args.xiao).jgmc row.tjdwlx = '学校' row.tjdwdm = args.xiao elif args.qu: row.tjdw = dh.Obj("select * from uc.uc_qu where qu=@qu", args.qu).xzjgmc row.tjdwlx = '区县' row.tjdwdm = args.qu elif args.shi: row.tjdw = dh.Obj("select * from uc.uc_shi where shi=@shi", args.shi).xzjgmc row.tjdwlx = '地市' row.tjdwdm = args.shi elif args.sheng: row.tjdw = dh.Obj("select * from uc.uc_sheng where sheng=@sheng", args.sheng).xzjgmc row.tjdwlx = '省级' row.tjdwdm = args.sheng main() |
tk_clsb | Saving | def main(): for row in data: if row.ztm != '0': return '已推荐,不能操作' main() |
tk_clsb | Loaded | def main(): for row in data: if args.xiao and row.ztm>'4': row._rowcls = 'green' if args.qu and row.ztm>='5': row._rowcls = 'green' if args.shi and row.ztm>='6': row._rowcls = 'green' if args.sheng and row.ztm>='7': row._rowcls = 'green' if row.ztm >= '8': row._rowcls = "green" main() |
uc_jigou_tslx | Transfered | def main(): if args.qu: n=dh.Exec("update uc.uc_jigou_tslx set ddztm='1',ddztsj=now() where qu=@qu and ddztm='0'",args.qu) return jh.Href("/core/uform/datagrid/uc_jigou_tslx?ff=ddztm&fv=1","_self") main() |
tk_khfw_ssfa | Initing | def main(): if args.jgdm: row = dh.Obj("select count(0) total,coalesce(sum(case when ddztm='1' then 1 else 0 end),0) done from tk.tk_khfw_ssfa where jgdm=@jgdm",args.jgdm) if args.ddztm!='0': if row.total==0 or row.total>row.done: return jh.Href("/core/uform/datagrid/tk_khfw_ssfa?ff=ddztm&fv=0") if args.ddztm!='1': if row.total!=0 and row.total==row.done: return jh.Href("/core/uform/datagrid/tk_khfw_ssfa?ff=ddztm&fv=1") main() |
dim_ywjykhfwkzqktj_qu | Updating | def main(): for row in data: if int(row.czbtbz) > 500 or int(row.czbtbz) <= 0 and int(row.sfyczzxbzjf): return "有财政补贴,财政补贴金额应在1-500范围内" if int(row.sfbz) > 500 or int(row.sfbz) <= 0 and int(row.sfslfwxsfhdsf): return "有服务性收费或代收费,收费金额应在1-500范围内" if not int(row.sfyczzxbzjf) and row.czbtbz != '0': return "无财政补贴,财政补贴金额只能为0" if not int(row.sfslfwxsfhdsf) and row.sfbz != '0': return "无服务性收费或代收费,收费金额只能为0" main() |
dim_gdsqtgfwkzqk | Saving | def main(): for row in data: if not(row.czbtbz and row.sfcqczbt and row.sfbz and row.sfmqsfbz): return if int(row.czbtbz) > 500 or int(row.czbtbz) <= 0 and int(row.sfcqczbt): return "若采取财政补贴,财政补贴金额应在1-500范围内" if int(row.sfbz) > 500 or int(row.sfbz) <= 0 and int(row.sfmqsfbz): return "若有明确收费标准,收费金额应在1-500范围内" if not int(row.sfcqczbt) and row.czbtbz != '0': return "若不采取财政补贴,财政补贴金额只能为0" if not int(row.sfmqsfbz) and row.sfbz != '0': return "若无明确收费标准,金额只能为0" main() |
dim_xskhfwcyqk | Updated | def main(): for row in data: if row._cmd: if row.ddztm=='1': dh.Exec("update dim.dim_xskhfwcyqk set wcxxs=1 where id=@id",row.id) if row.ddztm!='1': dh.Exec("update dim.dim_xskhfwcyqk set wcxxs=0 where id=@id",row.id) if args.xiao: return jh.Href("/core/uform/datagrid/dim_xskhfwcyqk?ff=ddztm&fv=1","_self") main() |
dim_ywjykhfwkzqktj_qu | Updated | def main(): for row in data: if row._cmd: if row.ddztm=='1': dh.Exec("update dim.dim_ywjykhfwkzqktj_qu set wcqxs=1 where qu=@qu",row.qu) if row.ddztm!='1': dh.Exec("update dim.dim_ywjykhfwkzqktj_qu set wcqxs=0 where qu=@qu",row.qu) main() |
tk_task_xiao_scjxglbf | Updated | def main(): for row in data: if row._cmd: if row.ddztm=='1': dh.Exec("update tk.tk_task_xiao_scjxglbf set wcxxs=1,_pb_saved=1 where jgdm=@jgdm",row.jgdm) if row.ddztm!='1': dh.Exec("update tk.tk_task_xiao_scjxglbf set wcxxs=0,_pb_saved=0 where jgdm=@jgdm",row.jgdm) if args.xiao: return jh.Href("/core/uform/datagrid/tk_task_xiao_scjxglbf?ff=ddztm&fv=1","_self") main() |
tk_khfw_ssfa | Deleted | def main(): sql = db.Set('tk_khfw_ssfa').InsertCommand for row in data: exist = dh.Obj("select * from tk.tk_khfw_ssfa where jgdm=@jgdm",row.jgdm) if not exist: row.ofile = None row.ofile_filename = None dh.Exec(sql,row) main() |
dim_xxpxjgqktj_qu | Initing | def main(): return args if args.qu: row = dh.Obj("select count(0) total,coalesce(sum(case when ddztm='1' then 1 else 0 end),0) done from dim.dim_xxpxjgqktj_qu where qu=@qu",args.qu) if args.ddztm!='0': if row.total==0 or row.total>row.done: return jh.Href("/core/uform/datagrid/dim_xxpxjgqktj_qu?ff=ddztm&fv=0") if args.ddztm!='1': if row.total!=0 and row.total==row.done: return jh.Href("/core/uform/datagrid/dim_xxpxjgqktj_qu?ff=ddztm&fv=1") main() |
dim_xxpxjgqktj_qu | Transfered | def main(): if args.qu: undo = dh.Obj("select count(0) zs from dim.dim_xxpxjgqktj_qu where qu=@qu and saved=0",args.qu).zs if undo==0: n=dh.Exec("update dim.dim_xxpxjgqktj_qu set ddztm='1',ddztsj=now(),wcqxs=1 where qu=@qu",args.qu) return jh.Href("/core/uform/datagrid/dim_xxpxjgqktj_qu?ff=ddztm&fv=1","_self") main() |
dim_xxpxjgqktj_qu | Saved | def main(): for row in data: dh.Exec("update dim.dim_xxpxjgqktj_qu set zj=zzyy+ztyy+zx+qt,jzgzj=(jxry+qtcyrys) where qu=@qu",row.qu) main() |
tk_sjtj | Preloading | def main(): if not args.sheng: return obj = dh.Obj("select * from tk.tk_sjtj where sheng=@sheng", args.sheng) if obj: return dbset = db.Set("dim_xspxjgqktjb_sheng") obj = dbset.Create() ph.dd.extend(obj, dh.Obj("select sheng, shengmc from uc.uc_sheng where sheng=@sheng", args.sheng)) dbset.Insert(obj, False) main() |
uc_shi | Saving | def main(): for row in data: if '600' not in User.Roles and '700' not in User.Roles: if row.sfzs!='1': return '非自设市不能修改' main() |
uc_shi | Inserting | def main(): exist = dh.Obj("select shi from uc.uc_shi where sheng=@sheng and sfzs=1 order by shi desc",data[0].sheng) list = ["C"+str(i) for i in range(1,10)]+["D"+str(i) for i in range(1,10)]+["E"+str(i) for i in range(1,10)] i=0 if exist: try: i = list.index(exist.shi[2:4])+1 except: i=0 for row in data: row.shi=row.sheng+list[i] i+=1 main() |
uc_qu | Saving | def main(): for row in data: if row.qu: if row.shi!=row.qu[0:4]: return '市级代码有误' if '600' not in User.Roles and '700' not in User.Roles: if row.sfzs!='1': return '非自设区不能修改' main() |
uc_qu | Defaulted | def main(): for row in data: if args.sheng: row.sheng=args.sheng main() |
dim_sqznrxsxclyq | Saving | def main(): for row in data: if not(row.jzzyqmjgy and row.jzzsfyq and row.jzzmyqmjgy and row.jyzmyqmjgy and row.jzzmsfyq and row.jyzmsfyq and row.sbzmyqmjgy and row.sbzmsfyq): return if int(row.jzzyqmjgy) > 60 and int(row.jzzsfyq): return "居住证要求月数不能大于60个月" if not int(row.jzzmsfyq) and row.jzzmyqmjgy != '0': return "居住证明不要求,居住证明要求月数必须为0" if not int(row.sbzmsfyq) and row.sbzmyqmjgy != '0': return "社保证明不要求,社保证明要求月数必须为0" if not(row.qtcl1zqmc) or not(row.qtcl2zqmc): return "若无材料补充,则具体名称填“无”,且对应要求月数填“0”" if row.qtcl2zqmc == '无' : if row.qtcl2yqmjgy != '0': return "若无其他材料补充,要求月数必须为0" else: if int(row.qtcl2yqmjgy) > 60: return "其他材料要求月数不能大于60个月" row.updated = 1 main() |
tk_khfwjfbz_qu | Preloading | def main(): if not args.qu: return obj = dh.Obj("select * from tk.tk_khfwjfbz_qu where qu=@qu", args.qu) if obj: return dbset = db.Set("tk_khfwjfbz_qu") obj = dbset.Create() ph.dd.extend(obj, dh.Obj("select sheng, shengmc, shi, shimc, qu, qumc from uc.uc_qu where qu=@qu", args.qu)) dbset.Insert(obj, False) main() |
dim_xxwjbcb_table 表单问卷 |
Preloading | def main(): if not args.xiao: return obj = dh.Obj("select * from dim.dim_xxwjbcb_table where jgdm=@jgdm", args.xiao) if obj: return dbset = db.Set("dim_xxwjbcb_table") obj = dbset.Create() ph.dd.extend(obj, dh.Obj("select sheng, shengmc, shi, shimc, qu, qumc, jgdm, jgmc from uc.uc_jigou where jgdm=@jgdm", args.xiao)) dbset.Insert(obj, False) main() |
dim_xxwjbcb_table | Transfering | def main(): for row in data: if row.t2 and '6' in row.t2 and len(row.t2.split(","))>1: return "第1-2题:'以上都没有'与其他选项不能同时勾选" if row.t2 and len(row.t2.split(","))>1 and row.t1 in ['1']: return "第1-1题选择1次考试,第1-2题考试类型不能超过1种" if row.t2 and len(row.t2.split(","))>2 and row.t1 in ['2']: return "第1-1题选择2次考试,第1-2题考试类型不能超过2种" if row.t5 and len(row.t5.split(","))>1 and row.t4 in ['1']: return "第1-4题选择1次考试,第1-5题考试类型不能超过1种" if row.t5 and len(row.t5.split(","))>2 and row.t4 in ['2']: return "第1-4题选择2次考试,第1-5题考试类型不能超过2种" if row.t0 in ['1','3']: if not row.t1:return '1-1.本学期,学校组织了几次考试?(小学填写)必选' if not row.t2:return '1-2.本学期,学校组织的考试类型有?(可多选)(小学填写)必选' if not row.t3:return '1-3.一、二年级是否组织了纸笔考试?(小学填写)必选' if row.t0 in ['2','3']: if not row.t4:return '1-4.本学期,学校组织了几次考试?(初中填写)必选' if not row.t5:return '1-5.本学期,学校组织的考试类型有?(可多选)(初中填写)必选' if row.t11 in ['10']: if not row.t12:return '7-1.请填写学校开展的课后服务其它内容必选' main() |
dim_xxwjbcb_table | Transfered | def main(): n=0 for row in data: dh.Exec("update uc.uc_jigou set zcwjbcb=1 where jgdm=@jgdm",row.jgdm) return n main() |