package com.huiton.cerp.sam;
/**
* Title: SCG2200 程序定义
* Description: 程序定义,包括增加,修改,删除
* Copyright: Copyright Reserved By BRITC
* Company: BRITC
* @author 张爱军
* @version 1.0
*/
import com.huiton.cerp.pub.util.*;
import com.huiton.cerp.pub.util.functions.*;
import com.huiton.mainframe.control.event.CERPEvent;
import com.huiton.mainframe.control.exceptions.DuplicateRecordException;
import com.huiton.mainframe.control.web.CustomerWebImpl;
import com.huiton.mainframe.control.web.ModelManager;
import com.huiton.mainframe.control.web.handlers.RequestHandlerSupport;
import com.huiton.mainframe.util.tracer.Debug;
import com.huiton.pub.dbx.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SAM0120Handler extends RequestHandlerSupport
{
public SAM0120Handler()
{
}
public CERPEvent processRequest(HttpServletRequest request)
throws Exception, DuplicateRecordException, SQLException
{
Debug.println("----SAM0120Handler: processRequest()");
HttpSession session = request.getSession();
ModelManager mm = (ModelManager)session.getAttribute("mm");
CustomerWebImpl customer = mm.getCustomerWebImpl();
String companyCode = customer.getCompanyCode();
String sessionCode = customer.getSessionCode();
String userUniqueNo = customer.getUserUniqueNo();
String lang = customer.getLanguage();
String opFlag = null; //operation flag
String outFlag = "1"; // outcome flag, 1 means succeeds
Vector vct = null; //保存记录
Vector sysVct = null ;
String sql = null;
int currentPage = 1; //当前页
int pageCount = 1; //总页数
int pageSize = 16;
ResultSet rs = null;
String strFields = null;
String strTables = null;
String strConditions = null;
opFlag = request.getParameter("opFlag");
opFlag = (opFlag==null ? "" : opFlag.trim());
//进入时不查询
//opFlag = (opFlag.length()<1 ? "query" : opFlag);
// get currentPage and pageCount
String m_currentPage = request.getParameter("currentPage");
m_currentPage = (m_currentPage==null ? "1" : m_currentPage.trim());
currentPage = Integer.parseInt(m_currentPage);
currentPage = (currentPage < 1 ? 1 : currentPage);
m_currentPage = request.getParameter("pageCount");
m_currentPage = (m_currentPage==null ? "1" : m_currentPage.trim());
pageCount = Integer.parseInt(m_currentPage);
pageCount = (pageCount < 1 ? 1 : pageCount);
//查询条件
String condition = ""; // set query Condition to nothing
String queryType = request.getParameter("queryType");//查询方式
queryType = (queryType==null ? "" : queryType.trim());
String queryValue = request.getParameter("queryValue");//查询值
queryValue = (queryValue==null ? "" : queryValue.trim());
String querySysCode = request.getParameter("querySysCode");//子系统代码
querySysCode = (querySysCode==null ? "" : querySysCode.trim());
//查询条件的处理
if (querySysCode.length()>0)
{
condition = "sys_code='" + querySysCode + "'";
}
else
{
condition = "1=1";
}
if (queryValue.length()>0 && queryType.length()>0)
{
if (queryType.equals("progCode"))
{
condition += " and prog_code like '%" + queryValue + "%'" ;
}
else if (queryType.equals("progNameCn"))
{
condition += " and prog_name_cn like '%" + queryValue + "%'" ;
}
else if (queryType.equals("progNameEn"))
{
condition += " and prog_name_en like '%" + queryValue + "%'" ;
}
else if (queryType.equals("checkRight"))
{
condition += " and check_right='" + queryValue + "'" ;
}
else if (queryType.equals("mendFlag"))
{
condition += " and mend_flag='" + queryValue + "'" ;
}
else if (queryType.equals("progLevel"))
{
if (queryValue.indexOf("=")>-1 ||
queryValue.indexOf(">")>-1 ||
queryValue.indexOf("<")>-1)
{
condition += " and prog_level" + queryValue ;
}else
{
condition += " and prog_level=" + queryValue ;
}
}
else if (queryType.equals("progValue"))
{
condition += " and prog_value like '%" + queryValue + "%'";
}
else if (queryType.equals("nodeFlag"))
{
condition += " and node_flag='" + queryValue + "'";
}
else if (queryType.equals("progCodeFather"))
{
condition += " and prog_code_father like '%" + queryValue + "%'";
}
else
{
//do nothing
}
}
if (condition.length()>0)
{
strConditions = "(" + condition + ") and company_code='"
+ companyCode
+ "' order by sys_code,prog_code_father,prog_code";
}
else
{
strConditions = "company_code='" + companyCode
+ "' order by sys_code,prog_code_father,prog_code";
}
strTables = "scg_program" ;
strFields = "sys_code,prog_code,prog_name_cn,prog_name_en,prog_value,"
+ "prog_params,prog_code_father,prog_level,check_right,rst_url,"
+ "mend_flag,oper_flag,node_flag,table_name";
Debug.println("----opFlag=" + opFlag);
try
{
PageQuery pageQuery = DBOperators.getPageQuery(request,
sessionCode, SubsystemKeys.SAM, "SAM0120Handler");
if (opFlag.equals("addNew")) //新增
{
}
else if (opFlag.equals("insert") || opFlag.equals("insMore")) //插入
{
String sys_code= request.getParameter("sys_code");
String prog_code = request.getParameter("prog_code");
String prog_name_cn = request.getParameter("prog_name_cn");
String prog_name_en = request.getParameter("prog_name_en");
String prog_value = request.getParameter("prog_value");
String prog_level = request.getParameter("prog_level");
String check_right = request.getParameter("check_right");
String oper_flag = request.getParameter("oper_flag");
String rst_url = request.getParameter("rst_url");
String node_flag = request.getParameter("node_flag");
String prog_params = request.getParameter("prog_params");
String table_name = request.getParameter("table_name");
String prog_code_father =
request.getParameter("prog_code_father");
String mend_flag = "Y" ; //用户增加的程序默认可维护
sys_code = (sys_code==null ? "" : sys_code.trim());
prog_code = (prog_code==null ? "" : prog_code.trim());
prog_name_cn = (prog_name_cn==null ? "" : prog_name_cn.trim());
prog_name_en = (prog_name_en==null ? "" : prog_name_en.trim());
prog_value = (prog_value==null ? "" : prog_value.trim());
prog_level = (prog_level==null ? "" : prog_level.trim());
check_right = (check_right==null ? "" : check_right.trim());
oper_flag = (oper_flag==null ? "" : oper_flag.trim());
rst_url = (rst_url==null ? "" : rst_url.trim());
node_flag = (node_flag==null ? "" : node_flag.trim());
pro
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
CERP.rar_CERP.rar_cERP_weblogic (176个子文件)
CommonDate.class 5KB
seed.class 717B
CerpPPCFrame.dat 14.37MB
JdbOp.java 30KB
CerpSAM.java 23KB
SAM0130Handler.java 21KB
ScreenFlowXmlDAO.java 19KB
DBOperators.java 17KB
AddFavorHandler.java 17KB
Schedule.java 15KB
SAM0040Handler.java 15KB
MultiDBOperator.java 13KB
SamDbInfo.java 13KB
JdbObj.java 13KB
MainServlet.java 12KB
SamUserRight.java 12KB
SAM3340Handler.java 12KB
SAM2200Handler.java 11KB
SAM3311Handler.java 11KB
SAM3310Handler.java 11KB
SAM3300Handler.java 10KB
PageQuery.java 10KB
ScreenFlowManager.java 10KB
SAM3350Handler.java 10KB
SAM2400Handler.java 9KB
SAM2500Handler.java 9KB
DateFunc.java 9KB
SamRes_en.java 9KB
SAM2600Handler.java 9KB
LoginRes_en.java 9KB
SAM2300Handler.java 9KB
HeadLineTag.java 8KB
SAM0110Handler.java 8KB
SamRes.java 8KB
CommonDate.java 8KB
LoginRes.java 8KB
SelectProgHandler.java 8KB
SelectMenuHandler.java 7KB
FootNavTag.java 7KB
LinkTag.java 7KB
JSPUtil.java 7KB
VectorRS.java 7KB
CERPClientControllerTestClient1.java 7KB
WebKeys.java 7KB
SAM2100Handler.java 6KB
PublicRes_en.java 6KB
XMLParser.java 5KB
PublicRes.java 5KB
SelectPositionHandler.java 5KB
SelectDeptHandler.java 5KB
JdbQuery.java 5KB
ScheduleDaily.java 5KB
RequestProcessor.java 5KB
CustomerWebImpl.java 4KB
ModelManager.java 4KB
SAM2700Handler.java 4KB
SelectRoleHandler.java 4KB
StateMachine.java 4KB
EJBUtil.java 4KB
TodayHintHandler.java 4KB
SAM0020Handler.java 4KB
SAM0010Handler.java 4KB
SAM0030Handler.java 4KB
ScheduleMonthly.java 4KB
ScheduleWeekly.java 4KB
DeskTopHandler.java 4KB
VerifyPasswdHandler.java 4KB
CERPClientControllerWebImpl.java 3KB
DraftMailHandler.java 3KB
LanTools.java 3KB
LookField.java 3KB
DateUtil.java 3KB
ConnectionPool.java 3KB
WebKeys.java 3KB
SelectFavorTypeHandler.java 3KB
ScheduleMonthlyHandler.java 3KB
ScheduleWeeklyHandler.java 3KB
LookField.java 3KB
URLMapping.java 3KB
FavorHandler.java 3KB
MenuTreeHandler.java 3KB
ScheduleDailyHandler.java 3KB
SetDefaultPageHandler.java 3KB
CerpTopHandler.java 3KB
FileUtil.java 3KB
StringFunction.java 3KB
InsertTag.java 3KB
SwitchLanguageHandler.java 2KB
MenuListHandler.java 2KB
AboutHandler.java 2KB
ToolsHandler.java 2KB
JNDINames.java 2KB
JNDINames.java 2KB
ModelUpdateNotifier.java 2KB
SigninHandler.java 2KB
SamUtil.java 2KB
CERPClientControllerEJB.java 2KB
ReloginHandler.java 2KB
ScreenFlowData.java 2KB
CerpGetNo.java 2KB
共 176 条
- 1
- 2
资源评论
林当时
- 粉丝: 114
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Yanxiu 2.81.rar
- C#编写的一款读取xml文件的mapping图软件 可以自由定位位置,统计数量,蛇形走位 主要用在晶圆图谱识别
- 电梯控制器 Verilog语言课程设计
- 《1+X移动互联网应用开发初级》试卷答案3
- 《1+X移动互联网应用开发初级》试卷答案2
- 《1+X移动互联网应用开发初级》试卷答案
- PLC机械手课程设计样本PLC机械手课程设计样本.doc
- 格雷码,外差 基于c++版本相位编码与解码 GrayCoding 类 为相移+格雷码的编码与解码程序 MultiFrequency 类 为三频外差的编码与解码程序 Main为运行代码的主程序,包含
- python 代码实现了一个目标检测应用程序,使用YOLOv8模型对视频中的目标进行检测 它从指定的视频文件中读取帧,使用模型进行检测,并在窗口中显示带有检测结果的帧,直到用户按下q键退出
- 基于语音识别的智能垃圾分类系统源代码(完整前后端+mysql+说明文档+LW).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功