📄 wxysinfo.java
字号:
package com.chis.model.person;
import java.util.List;
import com.stframe.dao.DaoUtil;
import com.stframe.form.ActionForm;
import com.stframe.form.DataForm;
import com.stframe.servlet.ActionInstance;
/**
* 危险因素信息查询
*
* @author 翟昌强
*
*/
public class WxysInfo extends ActionInstance {
public int execute(ActionForm af) throws Exception {
int func = Integer.parseInt(af.getHttpRequest().getParameter("FUNC").toString());
String corp_code = af.getHttpSession().getAttribute("CORP_CODE").toString();
String JMJKDAH = af.getHttpRequest().getParameter("JMJKDAH");
StringBuffer sql = new StringBuffer();
sql.append("select a.* from DA_WXYS a \n");
sql.append("where 1=1 and CORP_CODE='"+corp_code+"'\n");
sql.append("and JMJKDAH='"+JMJKDAH+"'\n");
List list=DaoUtil.select(af.getConnection(), sql.toString(), new DataForm("DA_WXYS"));
if (list.size()==0){
DaoUtil.execute(af.getConnection(), "insert into DA_WXYS(ID,JMJKDAH,CORP_CODE) values(newid(),'"+JMJKDAH+"','"+corp_code+"')");
}
DataForm df = (DataForm)DaoUtil.select(af.getConnection(), sql.toString(), new DataForm("DA_WXYS")).get(0);
af.getHttpRequest().setAttribute("wxysinfo", df);
return func;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -