亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gbs_rfpattachmentsubaction.java

?? 對日軟件外包 為東芝做的一個全球商業管理系統
?? JAVA
字號:
/*
 * Created on 2004/07/30
 *
 */
package ACTION;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;

import COMMON.BaseCommonCheck;
import COMMON.BaseDispatchAction;
import COMMON.MessageList;
import COMMON.ReturnValue;
import COMMON.SystemConstants;
import DataBean.GBS_RfpAttachList_stBean;
import LOGIC.GBS_RequestActionLogic;

/**
 * <p>Title: Service Information </p>
 * <p>Description: process page action<br>
 * </p>
 * <p> Copyright (c) 2004</p>
 * @author mxx
 * @version  1.0
 */
public class GBS_RfpAttachmentSubAction extends BaseDispatchAction implements SystemConstants {

	/**
	 * init page 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	public ActionForward init(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {
		GBS_RfpAttachmentSubForm thisform = (GBS_RfpAttachmentSubForm) form;

		//get login user info from session
		this.setUserInfoFromSession(request, thisform);
		GBS_RequestActionLogic logic = new GBS_RequestActionLogic(this.getDataSource(request));
		thisform.setMethod("insert");
		if (!thisform.getLineNo().equals("") || !thisform.getSeqNo().equals("")) {
			thisform.setMethod("update");

			ArrayList rfpAttachList = (ArrayList) this.getFromSession(request, RFPATTACHLIST);

			//ReturnValue returnValue = (ReturnValue)logic.getRfpAttachment(thisform.getCustomerID(),thisform.getRfpNo(),thisform.getLineNo());
			for (int i = 0; rfpAttachList != null && i < rfpAttachList.size(); i++) {
				GBS_RfpAttachList_stBean rfpAttachListBean = (GBS_RfpAttachList_stBean) rfpAttachList.get(i);
				if (rfpAttachListBean.getLineNo().equals(thisform.getLineNo())) {
					thisform.setTitle(rfpAttachListBean.getTitle());
					thisform.setAttachmentfilename(rfpAttachListBean.getAttachmentFileName());
				}
			}
		}
		return (mapping.findForward(nextview));
	}

	public ActionForward update(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {

		GBS_RfpAttachmentSubForm thisform = (GBS_RfpAttachmentSubForm) form;
		//get login user info from session
		this.setUserInfoFromSession(request, thisform);
		//
		GBS_RequestActionLogic logic = new GBS_RequestActionLogic(this.getDataSource(request));
		//乮侾乯丂夋柺丏揧晅僼傽僀儖偑偁傞応崌
		String seqNo = "";

		//input check
		MessageList errorMsg = new MessageList();
		errorMsg = inputCheck(thisform, request);
		if (errorMsg.size() > 0) {
			//save error to request
			this.setMessage(errorMsg);
			return (mapping.findForward(nextview));
		}

		if (thisform.getAttachmentFile() != null && !thisform.getAttachmentFile().getFileName().equals("")) {
			//RfpAttachList_stBean.setAttachmentFileName(thisform.getAttachmentFile().getFileName());
			HttpSession session = request.getSession();
			ReturnValue returnValue =
				logic.addAttachmentFileIntoTempTable(
					session.getId(),
					thisform.getLoginUserId(),
					thisform.getAttachmentFile());
			if (returnValue.isError()) {
				if (returnValue.isBussinessError()) {
					this.setMessage(returnValue.getMessageList());
				}
				//getErrorCode getErrorMessage proc
				return (mapping.findForward(nextview));
			} else {
				int iSeqNo = ((Integer) returnValue.getDataValue()).intValue();
				seqNo = String.valueOf(iSeqNo);
				thisform.setAttachmentfilename(thisform.getAttachmentFile().getFileName());
				//thisform.setSeqNo(iSeqNo + "");

			}

		}

		//乮俀乯丂RFP揧晅帒椏傪僙僢僔儑儞偵曐懚偡傞
		ArrayList RfpAttachList = (ArrayList) this.getFromSession(request, RFPATTACHLIST);
		if (RfpAttachList == null) {
			RfpAttachList = new ArrayList();
		}
		for (int i = 0; i < RfpAttachList.size(); i++) {
			GBS_RfpAttachList_stBean st = (GBS_RfpAttachList_stBean) RfpAttachList.get(i);
			if (st.getLineNo().equals(thisform.getLineNo()) && st.getSeqNo().equals(thisform.getSeqNo())) {
				if (thisform.getAttachmentFile() != null && !thisform.getAttachmentFile().getFileName().equals("")) {
					st.setSeqNo(seqNo);
					st.setAttachmentFileName(thisform.getAttachmentfilename());

					//String fileType = "";
					//String fileName = thisform.getAttachmentfilename();
					//if (fileName != null) {
					//	fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
					//	if (!(fileType.equals("doc") || fileType.equals("xls") || fileType.equals("pdf")))
					//		fileType = "other";
					//}
					st.setFiletype(BaseCommonCheck.getFileType(st.getAttachmentFileName()));
				}
				if (thisform.getFdelflag().equals("on")) {
					//file delete = on 
					st.setFiletype("");
					st.setAttachmentFileName("");
					st.setFileDeleteFlg(true);
				} else {
					st.setFileDeleteFlg(false);
				}
//				if (!st.getLineNo().startsWith("A")) {
					st.setUpdateUser(thisform.getLoginUserId());
					st.setUpdateUserName(thisform.getLoginMemberNameFirst() + " " + thisform.getLoginMemberNameLast());
					st.setUpdateDate(BaseCommonCheck.convertDateToYYYYMonDD());
//				}
				st.setRecordDeleteFlg(false);
				st.setRowUpdateFlg(true);
				st.setTitle(thisform.getTitle());
				break;
			}
		}
		thisform.setMethod("close");
		return (mapping.findForward(nextview));
	}

	public ActionForward insert(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {
		GBS_RfpAttachmentSubForm thisform = (GBS_RfpAttachmentSubForm) form;
		//get login user info from session
		this.setUserInfoFromSession(request, thisform);
		//
		GBS_RequestActionLogic logic = new GBS_RequestActionLogic(this.getDataSource(request));
		//乮侾乯丂夋柺丏揧晅僼傽僀儖偑偁傞応崌
		String seqNo = "";

		//input check
		MessageList errorMsg = new MessageList();
		errorMsg = inputCheck(thisform, request);
		if (errorMsg.size() > 0) {
			//save error to request
			this.setMessage(errorMsg);
			return (mapping.findForward(nextview));
		}

		//YM
		if (thisform.getAttachmentFile() != null && !thisform.getAttachmentFile().getFileName().equals("")) {
			//RfpAttachList_stBean.setAttachmentFileName(thisform.getAttachmentFile().getFileName());
			HttpSession session = request.getSession();
			ReturnValue returnValue =
				logic.addAttachmentFileIntoTempTable(
					session.getId(),
					thisform.getLoginUserId(),
					thisform.getAttachmentFile());
			if (returnValue.isError()) {
				if (returnValue.isBussinessError()) {
					this.setMessage(returnValue.getMessageList());
				}
				//getErrorCode getErrorMessage proc
				return (mapping.findForward(nextview));
			} else {
				int iSeqNo = ((Integer) returnValue.getDataValue()).intValue();
				thisform.setAttachmentfilename(thisform.getAttachmentFile().getFileName());
				thisform.setSeqNo(iSeqNo + "");

			}

		}

		//乮俀乯丂RFP揧晅帒椏傪僙僢僔儑儞偵曐懚偡傞
		ArrayList RfpAttachList = (ArrayList) this.getFromSession(request, RFPATTACHLIST);
		if (RfpAttachList == null) {
			RfpAttachList = new ArrayList();
		}

		GBS_RfpAttachList_stBean st = new GBS_RfpAttachList_stBean();
		st.setCustomerID(thisform.getCustomerID());
		st.setRfpNo(thisform.getRfpNo());
		st.setLineNo("ADD" + RfpAttachList.size());
		st.setSeqNo(thisform.getSeqNo());
		st.setAttachmentFileName(thisform.getAttachmentfilename());
		//String fileType = "";
		st.setFiletype(BaseCommonCheck.getFileType(thisform.getAttachmentfilename()));
		//		String fileName = thisform.getAttachmentfilename();
		//		if (fileName != null) {
		//			st.setFiletype(BaseCommonCheck.getFileType(st.getAttachmentFileName()));
		//			fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
		//			if (!(fileType.equals("doc") || fileType.equals("xls") || fileType.equals("pdf")))
		//				fileType = "other";
		//		}
		//		st.setFiletype(fileType);
		st.setUpdateUser(thisform.getLoginUserId());
		st.setCreateUserName(thisform.getLoginMemberNameFirst() + " " + thisform.getLoginMemberNameLast());
		st.setCreateUser(thisform.getLoginUserId());
		//Edit by Gxk 2004/08/27:add update user and date
		st.setUpdateDate(BaseCommonCheck.convertDateToYYYYMonDD());
		st.setUpdateUserName(thisform.getLoginMemberNameFirst() + " " + thisform.getLoginMemberNameLast());
		//Edit by Gxk 2004/08/27 End
		st.setCreateDate(BaseCommonCheck.convertDateToYYYYMonDD());
		st.setRecordDeleteFlg(false);
		st.setRowUpdateFlg(true);
		st.setTitle(thisform.getTitle());
		RfpAttachList.add(st);
		request.getSession();
		this.saveToSession(request, RFPATTACHLIST, RfpAttachList);
		thisform.setMethod("close");
		return (mapping.findForward(nextview));
	}

	public ActionForward delete(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {
		GBS_RfpAttachmentSubForm thisform = (GBS_RfpAttachmentSubForm) form;
		//get login user info from session
		this.setUserInfoFromSession(request, thisform);
		//
		//乮俀乯丂RFP揧晅帒椏傪僙僢僔儑儞偵曐懚偡傞
		ArrayList RfpAttachList = (ArrayList) this.getFromSession(request, RFPATTACHLIST);
		if (RfpAttachList == null) {
			RfpAttachList = new ArrayList();
		}
		for (int i = 0; i < RfpAttachList.size(); i++) {
			GBS_RfpAttachList_stBean st = (GBS_RfpAttachList_stBean) RfpAttachList.get(i);
			if (st.getLineNo().equals(thisform.getLineNo()) && st.getSeqNo().equals(thisform.getSeqNo())) {
				st.setRecordDeleteFlg(true);
				st.setRowUpdateFlg(true);
				break;
			}
		}
		thisform.setMethod("close");
		return (mapping.findForward(nextview));
	}

	public ActionForward download(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {

		log.info("[location info]GBS_RequestAction.download method!");
		GBS_RfpAttachmentSubForm thisForm = (GBS_RfpAttachmentSubForm) form;
		this.setUserInfoFromSession(request, thisForm);

		// read data 
		GBS_RequestActionLogic logic = new GBS_RequestActionLogic(this.getDataSource(request));

		GBS_RfpAttachList_stBean st = new GBS_RfpAttachList_stBean();
		if (thisForm.getLineNo() != null && !thisForm.getLineNo().equals("")) {
			//read data from session;
			ArrayList RfpAttachList = (ArrayList) this.getFromSession(request, RFPATTACHLIST);
			for (int i = 0; RfpAttachList != null && i < RfpAttachList.size(); i++) {

				st = (GBS_RfpAttachList_stBean) RfpAttachList.get(i);
				if (String.valueOf(st.getLineNo()).equals(thisForm.getLineNo())) {
					break;
				}
			}
		}

		// read data 
		ReturnValue returnValue = logic.getAttachmentFile(st, response);

		return (null);
	}
	/**
	 * method inputCheck
	 * @param requestForm GBS_RfpAttachmentSubForm
	 * @param request HttpServletRequest
	 * @throws Exception
	 * @return ErrorMessages
	 */
	private MessageList inputCheck(GBS_RfpAttachmentSubForm requestForm, HttpServletRequest request) throws Exception {
		//create ErrorMessages to display error message
		MessageList messages = new MessageList();
		String strTitle = requestForm.getTitle();
		FormFile attachmentFile = requestForm.getAttachmentFile();
		//Title check
		//DELETE by Gxk 20040823 
//		if (BaseCommonCheck.isEmpty(strTitle)) {
//			messages.setMessage(
//				"title",
//				requestForm.getTitle(),
//				"10000009",
//				Integer.MIN_VALUE,
//				new Object[] { "Title" });
//		}
		//AttachmentFile check
		
		if( attachmentFile != null && requestForm.getAttachmentfilename().equals("") && 
			attachmentFile.getFileName().equals("") &&
			BaseCommonCheck.isEmpty(strTitle) ){
			messages.setMessage("title", requestForm.getTitle(), "10000009", Integer.MIN_VALUE,
			new Object[]{ "Title" }, "Title");
		}
		if (requestForm.getFdelflag().equals("on") && 
			BaseCommonCheck.isEmpty( strTitle )){
			messages.setMessage("title", requestForm.getTitle(), "10000009", Integer.MIN_VALUE,
				new Object[]{ "Title" }, "Title");
		}
		if((attachmentFile != null && !attachmentFile.getFileName().equals("")) && attachmentFile.getFileSize()==0){
			messages.setMessage( "attachmentFile", null, "10000012", Integer.MIN_VALUE,
			new Object[]{ "AttachmentFile" }, "AttachmentFile");						
		}
		//AttachmentFile's name check
		if(attachmentFile != null && attachmentFile.getFileName().length() > 100){
			messages.setMessage("","", "10000018", Integer.MIN_VALUE);
		}
		return messages;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情综合在线| 中文乱码免费一区二区| 99久久精品一区| 成人黄色在线视频| 波多野结衣在线aⅴ中文字幕不卡| 美女免费视频一区| 国产主播一区二区三区| 狠狠色狠狠色合久久伊人| 国产在线播放一区| 大胆亚洲人体视频| 91福利在线播放| 69精品人人人人| 欧美性大战久久久久久久| 制服丝袜亚洲色图| 久久久久国产免费免费 | 国产精品香蕉一区二区三区| 免费成人性网站| 国产乱色国产精品免费视频| 成人一区二区三区视频在线观看| 99久久精品99国产精品| 欧美色偷偷大香| 26uuu国产在线精品一区二区| 久久久久国产精品麻豆ai换脸 | 成人av动漫在线| 91极品美女在线| 欧美成人一级视频| 综合中文字幕亚洲| 日本不卡一二三| 成人午夜av电影| 欧美久久婷婷综合色| 精品久久久久香蕉网| 91精品国产综合久久国产大片| 久久青草国产手机看片福利盒子 | 在线观看三级视频欧美| 欧美一级在线观看| 国产精品国产成人国产三级| 午夜精品久久久久久久久久久| 久久精品久久久精品美女| 成人h动漫精品| 日韩亚洲欧美高清| 成人欧美一区二区三区| 日日夜夜免费精品| 99久久精品国产麻豆演员表| 日韩欧美激情四射| 亚洲精选一二三| 风间由美一区二区av101| 欧美日韩国产另类不卡| 中文字幕亚洲综合久久菠萝蜜| 男女男精品视频网| 欧美天堂亚洲电影院在线播放| 国产亚洲精品精华液| 视频在线观看一区| 色欧美片视频在线观看| 久久久久国产精品厨房| 另类人妖一区二区av| 91国产免费观看| 亚洲欧洲综合另类| 成a人片国产精品| 国产亚洲一区二区在线观看| 婷婷开心久久网| 欧美日韩高清一区二区| 亚洲精品欧美专区| 97se亚洲国产综合自在线观| 久久免费视频色| 激情综合网av| 精品国产网站在线观看| 日本欧美肥老太交大片| 91蝌蚪porny| 亚洲美女在线国产| 91片在线免费观看| 一区二区三区四区五区视频在线观看| 国产成人av一区二区三区在线观看| 欧美一区二区精品| 日本在线不卡视频| 欧美剧在线免费观看网站| 亚洲高清一区二区三区| 色老汉一区二区三区| 中文文精品字幕一区二区| 成人高清视频在线| 亚洲男人的天堂在线aⅴ视频| 成av人片一区二区| 亚洲综合丝袜美腿| 欧美精三区欧美精三区| 亚洲1区2区3区视频| 宅男在线国产精品| 久久精品国产77777蜜臀| 精品免费日韩av| 国产精品一线二线三线精华| 久久久久久一级片| 成人app在线观看| 亚洲女同ⅹxx女同tv| 欧美肥妇free| 国产在线精品一区二区夜色| 国产精品嫩草影院av蜜臀| 91色视频在线| 视频一区中文字幕国产| 久久久久国产精品厨房| 91网站在线播放| 日本系列欧美系列| 国产视频一区二区在线观看| 91免费在线看| 蜜臀av一区二区在线观看| 欧美国产综合一区二区| 色又黄又爽网站www久久| 日本亚洲欧美天堂免费| 欧美国产精品一区二区三区| 欧洲在线/亚洲| 老色鬼精品视频在线观看播放| 国产精品青草久久| 91精品国产欧美一区二区| 国产精品77777| 日韩激情av在线| 国产精品私人影院| 欧美精选在线播放| www.av精品| 蜜桃视频一区二区| 一区二区高清免费观看影视大全| 欧美一区二区三区的| 成人免费视频视频在线观看免费| 亚洲第一在线综合网站| 中文av字幕一区| 91精品国产综合久久久久| 不卡的av电影在线观看| 免费高清在线一区| 一区二区三区久久| 欧美国产日韩一二三区| 91精品国产麻豆| 欧美在线观看18| av资源网一区| 狠狠狠色丁香婷婷综合激情| 亚洲成av人综合在线观看| 国产精品国产精品国产专区不蜜| 精品国产一区二区三区忘忧草| 91精品久久久久久久91蜜桃| 国产精品综合一区二区| 蜜臀av一区二区在线观看| 亚洲第一在线综合网站| 一区二区三区欧美视频| 国产女主播在线一区二区| 91精品国产色综合久久不卡电影| 91亚洲资源网| 色香蕉成人二区免费| eeuss影院一区二区三区| 国产精品综合一区二区| 国产一区在线精品| 国产一区二区毛片| 激情综合亚洲精品| 国产精品 欧美精品| 国产精品一区二区免费不卡 | 欧美精品一区二区三区高清aⅴ | 6080午夜不卡| 欧美日韩免费一区二区三区 | 亚洲高清三级视频| 一区二区三区**美女毛片| 伊人开心综合网| 一区二区三区四区乱视频| 亚洲猫色日本管| 亚洲激情图片一区| 国产一区二区不卡老阿姨| 国产一区二区三区在线观看免费| 午夜av一区二区三区| 奇米在线7777在线精品| 精品一区二区三区在线观看国产 | 精品视频一区二区不卡| 欧美三级在线视频| 欧美一区二区播放| 久久精品亚洲精品国产欧美| 国产视频一区在线观看| 亚洲色图清纯唯美| 亚洲电影视频在线| 激情综合色综合久久| 成人黄色综合网站| 在线免费观看日韩欧美| 91精品国产全国免费观看| 欧美成人三级在线| 日本一区二区视频在线观看| 一区二区在线观看视频| 日韩国产欧美在线播放| 国产福利一区二区三区在线视频| 成人免费视频caoporn| 在线免费观看一区| 精品国产三级电影在线观看| 国产精品国产三级国产a| 亚洲一区二区三区三| 老司机一区二区| 99久久精品国产一区二区三区| 欧美日韩黄色一区二区| 精品少妇一区二区三区在线视频| 久久久国产综合精品女国产盗摄| 中文一区二区完整视频在线观看| 亚洲综合男人的天堂| 国产麻豆精品一区二区| 欧美亚洲精品一区| 国产午夜精品一区二区三区嫩草| 亚洲人123区| 国产伦精品一区二区三区免费| 91小视频在线免费看| 久久日韩粉嫩一区二区三区| 亚洲综合成人在线视频| 国产不卡视频在线观看|