📄 arbitrationadddo.jsp
字号:
<%--
模块名称:仲 裁 调 解
模块功能:新增
版 本:V1.0
著 作 人:SIMM
著作日期:2001-11-01
该模块所需的文件:
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
修改日期:2001-12-21
修 改 人:SIMM
修改理由:
修改出处:附件上传
= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page language="java" import="com.jspsmart.upload.*,
java.util.Date,
java.util.Locale,
java.text.DateFormat,
java.io.*,
java.sql.*"%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page import="system.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<% mySmartUpload.initialize(pageContext);
mySmartUpload.upload();
%>
<%
GetID gid = new GetID();
ExtendString es = new ExtendString();
String fid = "ZC" + es.digitToString(gid.getIDNumber("case_id")+1);
int num1 = 0;
String customerSysID = "";
String toDate = es.getNowDate(0);
//BEGIN-处理附件传送------------------------------
//copy from WEBOA-AFFICHE.JSP,ADD_SUCCESS.JSP
Date timenow=new Date();
String accessory[] = new String[8]; //附件字符串
long timenownum=timenow.getTime();
DateFormat df = DateFormat.getDateTimeInstance();
int ii = 0;
for (ii=0; ii<mySmartUpload.getFiles().getCount();ii++)
{
com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(ii);
if (!myFile.isMissing())
{
myFile.saveAs("/upload/" +String.valueOf(timenownum+ii)+"."+myFile.getFileExt() , mySmartUpload.SAVE_VIRTUAL);
accessory[ii]=myFile.getFileName()+";"+String.valueOf(timenownum+ii)+"."+myFile.getFileExt()+";";
}
}
//END----------------------------
String caseID = "",
caseNo = "",
caseReason = "",
beginDate = "",
endDate = "",
agentSide = "",
customer = "", //客户名称,委托人
lawyer = "",
applicant = "", //申请人简介
appellee = "", //被申请人简介
arbitrationCourt = "", //受理仲裁委员会
proof = "", //相关证据
discussRecord = "", //案情讨论记录
notice = "", //仲裁委通知书
arbitration_judgment = "", //仲裁委裁决书
agent_word = "", //律师代理词
defensive_word = "", //律师辩护词
court_report = "", //开庭报告
accessorys = "", //附件
caseObject = "", //标的
referForeign = "",
charged = "",
noPayReason = "";
//涉外信息:referForeign
// 0 -- 无
// 1 -- 涉外
// 2 -- 涉台
// 3 -- 涉港澳
caseID = fid; //mySmartUpload.getRequest().getParameter("txtCaseID");
caseNo = mySmartUpload.getRequest().getParameter("txtCaseNo");
caseReason = mySmartUpload.getRequest().getParameter("txtCaseReason");
beginDate = mySmartUpload.getRequest().getParameter("txtBeginDate");
endDate = mySmartUpload.getRequest().getParameter("txtEndDate");
agentSide = mySmartUpload.getRequest().getParameter("txtAgentSide");
lawyer = mySmartUpload.getRequest().getParameter("txtLawyer");
applicant = mySmartUpload.getRequest().getParameter("txtApplicant"); //申请人简介
appellee = mySmartUpload.getRequest().getParameter("txtAppellee"); //被申请人简介
arbitrationCourt = mySmartUpload.getRequest().getParameter("txtArbitrationCourt"); //受理仲裁委员会
caseObject = mySmartUpload.getRequest().getParameter("txtCaseObject"); //标的
referForeign = mySmartUpload.getRequest().getParameter("txtReferForeign");
charged = mySmartUpload.getRequest().getParameter("txtCharged");
noPayReason = mySmartUpload.getRequest().getParameter("txtNoPayReason");
customer = mySmartUpload.getRequest().getParameter("txtCustomer"); //委托人
if((customer == null) || (customer.equals("")))
customer = mySmartUpload.getRequest().getParameter("customer_id");
proof = accessory[0]; //相关证据
discussRecord = accessory[1]; //案情讨论记录
notice = accessory[2]; //仲裁委通知书
arbitration_judgment = accessory[3]; //仲裁委裁决书
agent_word = accessory[4]; //律师代理词
defensive_word = accessory[5]; //律师辩护词
court_report = accessory[6]; //开庭报告
accessorys = accessory[7]; //附件
//处理t_caseinfo数据表的插入记录
String sql = "insert into t_caseinfo(case_id,case_no,case_reason";
sql = sql + ",case_type,case_attribute";
sql = sql + ",case_state";
sql = sql + ",begin_date";
if((endDate != null) && (!endDate.equals("")))
sql = sql + ",end_date";
sql = sql + ",refer_foreign,charged";
sql = sql + ",customer_id";
if(noPayReason != null)
sql = sql + ",no_pay_reason";
if(lawyer!=null)
sql = sql + ",employee_id";
sql = sql + ") values('"+caseID;
sql = sql + "','"+caseNo;
sql = sql + "','"+caseReason;
sql = sql + "','fssaj','zctj"; //fssaj----非诉讼案件;zctj----仲裁调解
sql = sql + "','sazt"; //sazt----收案状态
sql = sql + "','" + beginDate;
if((endDate != null) && (!endDate.equals("")))
sql = sql + "','" + endDate;
sql = sql + "','" + referForeign;
sql = sql + "','" + charged;
sql = sql + "','" + customer;
if(noPayReason != null)
sql = sql + "','" + noPayReason;
if(lawyer!=null)
sql = sql + "','" + lawyer;
sql = sql + "')";
int num = db.executeUpdate(sql);
if (num <= 0) {%>
<script language="javascript">
alert("新增失败!");
</script>
<%}
else //else1
{
gid.setIDNumber("case_id", gid.getIDNumber("case_id")+1);
//处理t_arbitratecase 内容--main_content--
sql = " insert into t_arbitratecase (case_id,agent_side,applicant_introduce";
sql = sql + ",appellee_introduce,arbitration_court";
sql = sql + ",proof,discuss_record,notice,arbitration_judgment,agent_word";
sql = sql + ",defensive_word,court_report,accessory";
sql = sql + ",case_object";
sql = sql + ") values('" + caseID;
sql = sql + "','" + agentSide;
sql = sql + "','" + applicant;
sql = sql + "','" + appellee;
sql = sql + "','" + arbitrationCourt;
sql = sql + "','" + proof;
sql = sql + "','" + discussRecord;
sql = sql + "','" + notice;
sql = sql + "','" + arbitration_judgment;
sql = sql + "','" + agent_word;
sql = sql + "','" + defensive_word;
sql = sql + "','" + court_report;
sql = sql + "','" + accessorys;
sql = sql + "','" + caseObject + "')";
int k = db.executeUpdate(sql);
} //else1
//--------------------------------------
//BEGIN---处理合同费用新增---LAYER2-----
String charge_id = mySmartUpload.getRequest().getParameter("charge_id"),
charge_sum = mySmartUpload.getRequest().getParameter("charge_sum");
if((num>0) && (charge_id != null) && (!charge_id.equals(""))
&& (charge_sum != null) && (!charge_sum.equals("")))
{ //费用记录存在时处理
String part_proportion, case_object;
String time_limit, payment_method, receive_time, charge_standard, discount;
String discount_person, charge_person, currency_kind, comment;
charge_id = mySmartUpload.getRequest().getParameter("charge_id");
charge_sum = mySmartUpload.getRequest().getParameter("charge_sum");
part_proportion = mySmartUpload.getRequest().getParameter("part_proportion");
case_object = mySmartUpload.getRequest().getParameter("case_object");
time_limit = mySmartUpload.getRequest().getParameter("time_limit");
payment_method = mySmartUpload.getRequest().getParameter("payment_method");
receive_time = mySmartUpload.getRequest().getParameter("receive_time");
charge_standard = mySmartUpload.getRequest().getParameter("charge_standard");
discount = mySmartUpload.getRequest().getParameter("discount");
discount_person = mySmartUpload.getRequest().getParameter("discount_person");
charge_person = mySmartUpload.getRequest().getParameter("charge_person");
currency_kind = mySmartUpload.getRequest().getParameter("currency_kind");
comment = mySmartUpload.getRequest().getParameter("comment");
sql = "insert into t_charge(charge_id, charge_sum, charge_type";
if ((caseID!=null) && (!caseID.equals("")))
sql = sql + ", case_id";
if ((part_proportion!=null) && (!part_proportion.equals("")))
sql = sql + ", part_proportion";
if ((case_object!=null) && (!case_object.equals("")))
sql = sql + ", case_object";
if ((time_limit!=null) && (!time_limit.equals("")))
sql = sql + ", time_limit";
if (payment_method!=null)
sql = sql + ", payment_method";
if ((receive_time!=null) && (!receive_time.equals("")))
sql = sql + ", receive_time";
if ((charge_standard!=null) && (!charge_standard.equals("")))
sql = sql + ", charge_standard";
if ((discount!=null) && (!discount.equals("")))
sql = sql + ", discount";
if ((discount_person!=null) && (!discount_person.equals("")))
sql = sql + ", discount_person";
if ((charge_person!=null) && (!charge_person.equals("")))
sql = sql + ", charge_person";
if (currency_kind!=null)
sql = sql + ", currency_kind";
if ((comment!=null) && (!comment.equals("")))
sql = sql + ", comment";
sql = sql + ") values('" + charge_id + "'," + charge_sum + ",'ht'";
if ((caseID!=null) && (!caseID.equals("")))
sql = sql + ",'" + caseID + "'";
if ((part_proportion!=null) && (!part_proportion.equals("")))
sql = sql + ",'" + part_proportion + "'";
if ((case_object!=null) && (!case_object.equals("")))
sql = sql + ",'" + case_object + "'";
if ((time_limit!=null) && (!time_limit.equals("")))
sql = sql + ",'" + time_limit + "'";
if (payment_method!=null)
sql = sql + ",'" + payment_method + "'";
if ((receive_time!=null) && (!receive_time.equals("")))
sql = sql + ",'" + receive_time + "'";
if ((charge_standard!=null) && (!charge_standard.equals("")))
sql = sql + ",'" + charge_standard + "'";
if ((discount!=null) && (!discount.equals("")))
sql = sql + ",'" + discount + "'";
if ((discount_person!=null) && (!discount_person.equals("")))
sql = sql + ",'" + discount_person + "'";
if ((charge_person!=null) && (!charge_person.equals("")))
sql = sql + ",'" + charge_person + "'";
if (currency_kind!=null)
sql = sql + ",'" + currency_kind + "'";
if ((comment!=null) && (!comment.equals("")))
sql = sql + ",'" + comment + "'";
sql = sql + ")";
num1 = db.executeUpdate(sql);
if (num1 > 0) gid.setIDNumber("charge_id", gid.getIDNumber("charge_id")+1);
} //if(num>0)
//END LAYER2----------------------------
//BEGIN LAYER4 ------处理客户新增信息
String customer_id = mySmartUpload.getRequest().getParameter("customer_id"),
customer_name = mySmartUpload.getRequest().getParameter("customer_name"),
tempCustomer = mySmartUpload.getRequest().getParameter("txtCustomer");
if((num>0) && (customer_id != null) && (!customer_id.equals(""))
&& (customer_name != null) && (!customer_name.equals(""))
&& ((tempCustomer == null) || (tempCustomer.equals(""))))
{ //客户记录存在时处理
String link_man, telephone, mobile_telephone;
String email, address, customer_type, customer_introduce, fax, enter_date, lawyer_id;
customer_id = mySmartUpload.getRequest().getParameter("customer_id");
customer_name = mySmartUpload.getRequest().getParameter("customer_name");
link_man = mySmartUpload.getRequest().getParameter("link_man");
telephone = mySmartUpload.getRequest().getParameter("telephone");
mobile_telephone = mySmartUpload.getRequest().getParameter("mobile_telephone");
email = mySmartUpload.getRequest().getParameter("email");
address = mySmartUpload.getRequest().getParameter("address");
customer_type = mySmartUpload.getRequest().getParameter("customer_type");
customer_introduce = mySmartUpload.getRequest().getParameter("customer_introduce");
fax = mySmartUpload.getRequest().getParameter("fax");
enter_date = toDate; //mySmartUpload.getRequest().getParameter("enter_date"); //
lawyer_id = mySmartUpload.getRequest().getParameter("txtLawyer"); //
sql = "insert into t_customer(customer_id,customer_name";
if (link_man!=null)
sql = sql + ",link_man";
if (telephone!=null)
sql = sql + ",telephone";
if (mobile_telephone!=null)
sql = sql + ",mobile_telephone";
if (email!=null)
sql = sql + ",email";
if (address!=null)
sql = sql + ",address";
if (customer_type!=null)
sql = sql + ",customer_type";
if (customer_introduce!=null)
sql = sql + ",customer_introduce";
if (fax!=null)
sql = sql + ",fax";
if ((enter_date!=null) && (!enter_date.equals("")))
sql = sql + ",enter_date";
if ((lawyer_id!=null) && (!lawyer_id.equals("")))
sql = sql + ",lawyer_id";
sql = sql + ") values('"+customer_id+"','"+customer_name+"'";
if (link_man!=null)
sql = sql + ",'" + link_man + "'";
if (telephone!=null)
sql = sql + ",'" + telephone + "'";
if (mobile_telephone!=null)
sql = sql + ",'" + mobile_telephone + "'";
if (email!=null)
sql = sql + ",'" + email + "'";
if (address!=null)
sql = sql + ",'" + address + "'";
if (customer_type!=null)
sql = sql + ",'" + customer_type + "'";
if (customer_introduce!=null)
sql = sql + ",'" + customer_introduce + "'";
if (fax!=null)
sql = sql + ",'" + fax + "'";
if ((enter_date!=null) && (!enter_date.equals("")))
sql = sql + ",'" + enter_date + "'";
if ((lawyer_id!=null) && (!lawyer_id.equals("")))
sql = sql + ",'" + lawyer_id + "'";
sql = sql + ")";
num1 = db.executeUpdate(sql);
if (num1 <= 0) {%>
<script language="javascript">
alert("客户信息新增失败!");
</script>
<%
}
else {
gid.setIDNumber("customer_id", gid.getIDNumber("customer_id")+1);
customerSysID = "KH" + es.digitToString(gid.getIDNumber("customer_id")+1);
}
} // if((num>0) &&
//END LAYER4--------------------------
%>
<html>
<script language="javascript">
location = "ArbitrationAdd.jsp";
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -