⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 schedule.java

📁 一个日本流行的,功能较全的开源Web办公管理(Groupware)系统。
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
			break;

		case SCCmd.CD_NEW:// 僗働僕儏乕儖嶌惉
			//僉儍儞僙儖
			buf = (String[])hsPara.get("cansel.x");
			if(buf!=null) {
				if (mod == 3){//儊僀儞偐傜屇偽傟偨応崌
					backDisp(mainURL,res);
					return;
				}
				//儁乕僕僙僢僩(僗働僕儏乕儖夋柺)
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			}

			buf = (String[])hsPara.get(SCCmd.PA_TMP);//temp僼傽僀儖嶌惉
			if(buf!=null) {
				String mk = (String)((String[])hsPara.get(SCCmd.PA_TMP))[0];
				if(Integer.parseInt(mk)==0)
					{
					SCScheFile sfile = new SCScheFile(userDir,2,uid,cal.getstrYear()+cal.getstrMonth());
					sfile.Deluid(uid);
					sfile.Addmod(new SCScheData(uid,"0","0","0"," "," "," ","2"));
					sfile.Save();
					SCTempFile sftemp = new SCTempFile(userDir,uid);
					sftemp.Delete();
				}else{
					//temp僼傽僀儖峏怴
					TempUpd(hsPara,req,res,uid,mod,hiduke,euid);
				}
			}

			//摨帪偵搊榐偡傞儐乕僓乕嶌惉帪
			buf = (String[])hsPara.get("in.x");//捛壛
			if(buf!=null) {
				String entuid = (String)((String[])hsPara.get(SCCmd.PA_USER))[0];
				//儐乕僓temp峏怴
				buf1 = (String[])hsPara.get("usr_l");
				if(buf1!=null) {
					SCTempFile sftemp = new SCTempFile(userDir,uid);
					int bb = buf1.length;
					for( int ii=0;ii<buf1.length;ii++){
						if (Integer.parseInt(buf1[ii]) != Integer.parseInt(entuid)&&Integer.parseInt(buf1[ii])!=-1){
							sftemp.Addmod(buf1[ii],new SCTempData(buf1[ii]));
						}
						sftemp.Save();
					}
				}
			}

			buf = (String[])hsPara.get("out.x");//嶍彍
			if(buf!=null){
				//儐乕僓temp峏怴
				buf1 = (String[])hsPara.get("usr_r");
				if(buf1!=null) {
					SCTempFile sftemp = new SCTempFile(userDir,uid);
					for( int ii=0;ii<buf1.length;ii++)
					{
						sftemp.Deluid(buf1[ii]);
						sftemp.Save();
					}
				}
			}

			buf = (String[])hsPara.get("add.x");//搊榐
			if(buf!=null) {

				//強嵼曄峏
				if (uid == euid){
					uconf = new SCConfUserFile(userDir,uid);
				}else{
					uconf = new SCConfUserFile(userDir,euid);
				}

				if (Integer.parseInt(shozai)==1){
					uconf.SetShozai("1");//奜弌偵愝掕
					uconf.Save();
				}
				
				boolean addFlg = ScheAdd(hsPara,req,res,uid,mod,hiduke,gid,shozai);
				if (addFlg == false){return;}
				
				//儊僀儞偐傜屇偽傟偨応崌儊僀儞傊栠傞
				if (mod == 3){
					backDisp(mainURL,res);
					return;
				}
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			}
			page = new Createsche_new(hsInitData,hsPara,UM,mod,hiduke,gid,sub,yymmdd,euid,grid,Integer.parseInt(shozai));
			break;
		case SCCmd.CD_EDIT://  僗働僕儏乕儖曇廤
			int hid = 0;
			int tid = 0;

			String fileyymm = yymmdd.substring(0,6);
			buf = (String[])hsPara.get("cansel.x");//僉儍儞僙儖
			if(buf!=null) {
				if (mod!=3){
					//儁乕僕僙僢僩
					page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
					break;
				}else{
					backDisp(mainURL,res);
					return;
				}
			}


			//temp僼傽僀儖嶌惉
			buf = (String[])hsPara.get(SCCmd.PA_TMP);
			if(buf!=null) {
				String mk = (String)((String[])hsPara.get(SCCmd.PA_TMP))[0];
				if(Integer.parseInt(mk)==0)
				{
					SCScheFile stp = new SCScheFile(userDir,2,uid,cal.getstrYear()+cal.getstrMonth());
					stp.Deluid(uid);

					if(mod==0){
						sfile = new SCScheFile(userDir,mod,euid,fileyymm);
					}else if (mod==3){
						sfile = new SCScheFile(userDir,0,euid,fileyymm);
					}else{
						sfile = new SCScheFile(groupDir,mod,euid,fileyymm);
					}
				    SCScheData sdata = sfile.DataChk(sid);

					if (sdata==null){
						url = GSTool.removeParaFormURI(req.getRequestURI());
						strErrPara = url + "?" 
							+ SCCmd.PA_CMD + "=" + sub + "&" 
							+ SCCmd.PA_MOD + "=" + mod + "&"
							+ SCCmd.PA_UID + "=" + uid + "&"
							+ SCCmd.PA_DATE + "=" + hiduke + "&"
							+ SCCmd.PA_EDATE + "=" + yymmdd + "&"
							+ SCCmd.PA_GID + "=" + gid + "&"
							+ SCCmd.PA_MID + "=" + mid + "&"
							+ SCCmd.PA_SID + "=" + sid + "&"
							+ SCCmd.PA_GRP + "=" + grid + "&"
							+ SCCmd.PA_SUB + "=" + sub + "&"
							+ SCCmd.PA_USER + "=" + euid + "&"
							+ SCCmd.PA_SHOZAI + "=" + shozai + "&"
							+ SCCmd.SC_MAP + "=" + MapUrl + "&"
							+ SCCmd.SC_DIR + "=" + dataDir + "&"
							+ SCCmd.SC_USER + "=" + userDir + "&"
							+ SCCmd.SC_GROUP + "=" + groupDir;
						CreateErrorPage epage = new CreateErrorPage("僗働僕儏乕儖僨乕僞偑尒偮偐傝傑偣傫",MapUrl,strErrPara);
						epage.write(req,res);
						return;
					}
					stp.Addmod(new SCScheData(uid,sdata.GetUid(),sdata.GetFrom(),sdata.GetTo(),sdata.GetTitle(),GSHtml.ReturntoBR(sdata.GetContent()),GSHtml.ReturntoBR(sdata.GetBikou()),sdata.GetOpen()));
					stp.Save();
				}else{
				//temp僼傽僀儖峏怴
					SCScheFile stp = new SCScheFile(userDir,2,uid,cal.getstrYear()+cal.getstrMonth());
					stp.Deluid(uid);
					if(mod==0){
						sfile = new SCScheFile(userDir,mod,euid,fileyymm);
					}else if (mod==3){
						sfile = new SCScheFile(userDir,0,euid,fileyymm);
					}else{
						sfile = new SCScheFile(groupDir,mod,euid,fileyymm);
					}
					SCScheData sdata = sfile.DataChk(sid);

					if (sdata==null){
						url = GSTool.removeParaFormURI(req.getRequestURI());
						strErrPara = url + "?" 
							+ SCCmd.PA_CMD + "=" + sub + "&" 
							+ SCCmd.PA_MOD + "=" + mod + "&"
							+ SCCmd.PA_UID + "=" + uid + "&"
							+ SCCmd.PA_DATE + "=" + hiduke + "&"
							+ SCCmd.PA_EDATE + "=" + yymmdd + "&"
							+ SCCmd.PA_GID + "=" + gid + "&"
							+ SCCmd.PA_MID + "=" + mid + "&"
							+ SCCmd.PA_SID + "=" + sid + "&"
							+ SCCmd.PA_GRP + "=" + grid + "&"
							+ SCCmd.PA_SUB + "=" + sub + "&"
							+ SCCmd.PA_USER + "=" + euid + "&"
							+ SCCmd.PA_SHOZAI + "=" + shozai + "&"
							+ SCCmd.SC_MAP + "=" + MapUrl + "&"
							+ SCCmd.SC_DIR + "=" + dataDir + "&"
							+ SCCmd.SC_USER + "=" + userDir + "&"
							+ SCCmd.SC_GROUP + "=" + groupDir;
						CreateErrorPage epage = new CreateErrorPage("僗働僕儏乕儖僨乕僞偑尒偮偐傝傑偣傫",MapUrl,strErrPara);
						epage.write(req,res);
						return;
					}


					//曇廤尃尷僠僃僢僋
					if(mod==0){
						sfile = new SCScheFile(userDir,mod,euid,fileyymm);
					}else if (mod==3){
						sfile = new SCScheFile(userDir,0,euid,fileyymm);
					}else{
						sfile = new SCScheFile(groupDir,mod,euid,fileyymm);
					}
					sdata = sfile.DataChk(sid);
					
					if (sdata!=null){
						tid = Integer.parseInt(sdata.GetUid());
					}
					
					if (editUserChk(Integer.parseInt(uid),Integer.parseInt(gid),Integer.parseInt(euid),tid,mod)==true){
						if (mod==3){
							TempUpd(hsPara,req,res,uid,0,hiduke,euid);
						}else{
							TempUpd(hsPara,req,res,uid,mod,hiduke,euid);
						}
					}else{
						CreateErrorPage epage = new CreateErrorPage("曇廤尃尷偑偁傝傑偣傫",MapUrl,strErrPara);
						epage.write(req,res);
						return;
					}
					
				}
			}
			
			buf = (String[])hsPara.get("edit.x");//峏怴
			if(buf!=null) {
				if (mod!=3){
					boolean upFlg = ScheUpd(hsPara,req,res,uid,mod,hiduke,sid,yymmdd);
					if (upFlg == false){return;}
					//儁乕僕僙僢僩
					page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
					break;
				}else{
					boolean upFlg = ScheUpd(hsPara,req,res,uid,0,hiduke,sid,yymmdd);
					if (upFlg == false){return;}
					backDisp(mainURL,res);
					return;
				}
			}

			buf = (String[])hsPara.get("del.x");//嶍彍
			if(buf!=null) {
				ScheDelDisp(hsPara,req,res,cmd,uid,mod,gid,hiduke,sub,euid,sid,yymmdd);//嶍彍妋擣儊僢僙乕僕昞帵
				break;
			}

			buf = (String[])hsPara.get("__submit.x");//嶍彍
			if(buf!=null) {
				if (mod!=3){
					ScheDel(hsPara,req,res,cmd,uid,mod,gid,hiduke,sub,euid,sid,yymmdd);
					//儁乕僕僙僢僩
					page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
					break;
				}else{
					ScheDel(hsPara,req,res,cmd,uid,0,gid,hiduke,sub,euid,sid,yymmdd);
					backDisp(mainURL,res);
					return;
				}
			} 


			if(mod==0){
				sfile = new SCScheFile(userDir,mod,euid,fileyymm);
			}else if (mod==3){
				sfile = new SCScheFile(userDir,0,euid,fileyymm);
			}else{
				sfile = new SCScheFile(groupDir,mod,euid,fileyymm);
			}

			SCScheData sdata = sfile.DataChk(sid);
			if (sdata !=null){
				page = new Createsche_edit(hsInitData,hsPara,UM,mod,hiduke,gid,sid,sub,euid,yymmdd);
			}else{
				backDisp(GSTool.removeParaFormURI(req.getRequestURI()),res);
				return;
			}
			break;
		case SCCmd.CD_SET://  愝掕夋柺 
			buf = (String[])hsPara.get("cansel.x");//僉儍儞僙儖
			if(buf!=null) {
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			} 

			buf = (String[])hsPara.get("edit.x");//愝掕
			if(buf!=null) {
				String ft = (String)((String[])hsPara.get(SCCmd.PA_FROM))[0];
				String tt = (String)((String[])hsPara.get(SCCmd.PA_TO))[0];
				try{
				if(Integer.parseInt(ft)>=Integer.parseInt(tt))
					throw new GSException("奐巒亙廔椆偱擖椡偟偰偔偩偝偄丅");
					} catch(GSException e) {
						CreateErrorPage epage = new CreateErrorPage(e.getMessage(),MapUrl,strErrPara);
						epage.write(req,res);
						return;
				}

				uconf = new SCConfUserFile(userDir,uid);
				uconf.SetFromTime(ft);
				uconf.SetToTime(tt);
				uconf.Save();
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			}

			page = new Createschedule_setting(hsInitData,hsPara,mod,hiduke,gid,sub);
			break;
		case SCCmd.CD_MSGADD:// 揱尵嶌惉
			buf = (String[])hsPara.get("cansel.x");//僉儍儞僙儖
			if(buf!=null) {
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			} 

			buf = (String[])hsPara.get("add.x");//愝掕
			if(buf!=null) {
			/* 揱尵僨乕僞嶌惉 */
				String mission = (String)((String[])hsPara.get("mission"))[0];
				try{
				if(mission.length() == 0)
					throw new GSException("埶棅幰傪擖椡偟偰偔偩偝偄丅");
					} catch(GSException e) {
						CreateErrorPage epage = new CreateErrorPage(e.getMessage(),MapUrl,strErrPara);
						epage.write(req,res);
						return;
				}
				String title = (String)((String[])hsPara.get("title"))[0];
				try{
				if(title.length() == 0)
					throw new GSException("梡審傪擖椡偟偰偔偩偝偄丅");
					} catch(GSException e) {
						CreateErrorPage epage = new CreateErrorPage(e.getMessage(),MapUrl,strErrPara);
						epage.write(req,res);
						return;
				}
				String content = (String)((String[])hsPara.get("content"))[0];
				try{
				if(content.length() == 0)
					throw new GSException("撪梕傪擖椡偟偰偔偩偝偄丅");
					} catch(GSException e) {
						CreateErrorPage epage = new CreateErrorPage(e.getMessage(),MapUrl,strErrPara);
						epage.write(req,res);
						return;
				}
				String priority = (String)((String[])hsPara.get("priority"))[0];
				// 儐乕僓愝掕僼傽僀儖庢摼
				uconf = new SCConfUserFile(userDir,euid);
				int maxmsg = uconf.GetMsgmax();
				maxmsg++;
				uconf.SetMsgmax(maxmsg);
				uconf.Save();
				GSDate crcal = new GSDate();
				SCMsgFile mfile = new SCMsgFile(userDir,euid);
				mfile.Addmod(new SCMsgData(Integer.toString(maxmsg),
										   sessionUID.toString(),
										   //crcal.getYMDHM(),
										   crcal.getYMDHMS(),
										   chkStr(mission),
										   chkStr(title),
										   chkStr(content),
										   priority));
				mfile.Save();
				
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			}
			page = new Createmsg_new(hsInitData,hsPara,UM,mod,hiduke,gid,sub,euid);
			break;
		case SCCmd.CD_MSG:// 揱尵堦棗
			buf = (String[])hsPara.get("cansel.x");//僉儍儞僙儖
			if(buf!=null) {
				//儁乕僕僙僢僩
				page = setPageSub(Integer.parseInt(sub),hsPara,uid,mod,hiduke,gid,euid);
				break;
			} 
			buf = (String[])hsPara.get("del.x");//嶍彍
			if(buf!=null) {
				buf1 = (String[])hsPara.get(SCCmd.PA_CBOX);
				if(buf1!=null) {
					MsgDelDisp(hsPara,req,res,cmd,euid,mod,gid,hiduke,buf1,mid);
					break;
				}
			}
			//  嶍彍
			buf = (String[])hsPara.get("__submit.x");//<-嶍彍
			if(buf!=null) {
				MsgDelete(hsPara,req,res,euid);
			} 
			page = new Createmsg_chk(hsInitData,hsPara,mod,hiduke,gid,sub);
			break;

		case SCCmd.CD_MSGDSP:// 揱尵徻嵶
			String schurl = GSTool.removeParaFormURI(req.getRequestURI());

			//揱尵徻嵶夋柺
			buf = (String[])hsPara.get("cansel.x");//栠傞
			if(buf!=null) {
				if (mod != 3){//僗働僕儏乕儖
					page = new Createmsg_chk(hsInitData,hsPara,mod,hiduke,gid,sub);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -