📄 addbluezaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.gensou.struts.sheji.blueprintZ.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.gensou.dao.sheji.blueprintZ.Bluez;
import com.gensou.logic.sheji.blueprintZ.AddbluezService;
import com.gensou.struts.sheji.blueprintZ.form.AddBluezForm;
import com.gensou.util.Upload;
import com.gensou.util.UtilTimestamp;
/**
* MyEclipse Struts
* Creation date: 01-18-2007
*
* XDoclet definition:
* @struts.action path="/bluez" name="addbluezForm" scope="request" validate="true"
*/
public class AddBluezAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
AddBluezForm addbluezForm = (AddBluezForm) form;// TODO Auto-generated method stub
String tupian =addbluezForm.getTupianxinxiId();
String name = addbluezForm.getTupianName();
String str;
boolean bool=false;
Bluez bluez=new Bluez();
boolean bo=bluez.querybluezone(tupian,name);
if(bo==true){
String uris=addbluezForm.getUri();
String uri ="/zuzhangPhoto/";
String photouri=Upload.upload(uri, addbluezForm.getPhoto(),uris);
if(photouri!=null&&!photouri.equals("")){
AddbluezService addbluez=new AddbluezService();
addbluez.setTupianxinxiId(tupian);
addbluez.setTupianName(name);
addbluez.setTupianUri(photouri);
addbluez.setBeizhu(addbluezForm.getBeizhu());
addbluez.setZhuangtai(addbluezForm.getZhuangtai());
bool=bluez.addbluez(addbluez);
if(bool==false){
str="组装图纸添加成功";
request.setAttribute("str", str);
return mapping.findForward("addbluez");
}else{
str="组装图纸添加失败";
request.setAttribute("str", str);
return mapping.findForward("addbluez");
}
}else{
str="组装图纸添加失败";
request.setAttribute("str", str);
return mapping.findForward("addbluez");
}
}else{
str="组装图纸添加失败";
request.setAttribute("str", str);
return mapping.findForward("addbluez");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -