📄 advisoradd.jsp
字号:
<%--
模块名称:顾问管理
模块功能:新增一条法律顾问信息
版 本:V1.0
著 作 人:谢永刚(ui);SIMM(java)
著作日期:2001-10-17
所需文件:
使用说明:
技术说明:
参考文献:概要设计说明书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
修改日期:
修 改 人:
修改理由:
修改出处:
= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<%@ page import="system.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
Security auth = new Security();
String scu_employee_id = (String)session.getAttribute("employee_id");
if(scu_employee_id == null || scu_employee_id.equals(""))
{
response.sendRedirect(response.encodeRedirectURL("../Error/nonlogin.htm"));
}
String modelid = "Law022"; // 案件管理/顾问管理新增
int authflag = auth.popedom(scu_employee_id, modelid);
if(authflag == 0 || authflag == 2 || authflag == -1)
{%>
<jsp:forward page="../inc/noauth.jsp" >
</jsp:forward>
<%}%>
<%
GetID gid = new GetID();
ExtendString es = new ExtendString();
String fid = "GW" + es.digitToString(gid.getIDNumber("case_id")+1);
String costID = "FY" + es.digitToString(gid.getIDNumber("charge_id")+1);
String customerID = "KH" + es.digitToString(gid.getIDNumber("customer_id")+1);
String toDate = es.getNowDate(0);
ResultSet rs = null;
String str = request.getParameter("btnSave");
if (str!=null)
{
String caseID,caseReason,beginDate,endDate,lawyer,mainContent,opinion,customer;
caseID = request.getParameter("txtCaseID");
caseReason = request.getParameter("txtCaseReason");
//中文处理
caseReason = new String(caseReason.getBytes("ISO8859_1"));
beginDate = request.getParameter("txtBeginDate");
endDate = request.getParameter("txtEndDate");
lawyer = request.getParameter("txtLawyer");
mainContent = request.getParameter("txtMainContent");
mainContent = new String(mainContent.getBytes("ISO8859_1"));
opinion = request.getParameter("txtOpinion");
opinion = new String(opinion.getBytes("ISO8859_1"));
customer = request.getParameter("txtCustomer");
if((customer == null) || (customer.equals("")))
customer = request.getParameter("customer_id");
//处理t_caseinfo数据表的插入记录--------------
String sql = "insert into t_caseinfo(case_id,case_reason,case_type,case_attribute";
sql = sql + ",case_state,begin_date,end_date";
sql = sql + ",employee_id,customer_id";
sql = sql + ") values('"+caseID+"','"+caseReason;
sql = sql + "','fssaj','flgw"; //fssaj----非诉讼案件;flgw----法律顾问
sql = sql + "','sazt"; //sazt----收案状态
sql = sql + "','" + beginDate;
sql = sql + "','" + endDate;
sql = sql + "','" + lawyer;
sql = sql + "','" + customer;
sql = sql + "')";
int num = 0,num1 = 0;
num = db.executeUpdate(sql);
if (num <= 0) {%>
<script language="javascript">
alert("新增失败!");
</script>
<%}
else {
gid.setIDNumber("case_id", gid.getIDNumber("case_id")+1);
fid = "GW" + es.digitToString(gid.getIDNumber("case_id")+1);
}
//处理‘主要事务’和‘律师对客户评价’内容,写入到t_noncourt数据表
if(num > 0)
{
sql = " insert into t_noncourt(case_id";
sql = sql + ",main_content";
sql = sql + ",opinion_to_customer";
sql = sql + ") values('" + caseID;
sql = sql + "','" + mainContent;
sql = sql + "','" + opinion;
sql = sql + "')";
num1 = db.executeUpdate(sql);
if (num1 <= 0) {%>
<script language="javascript">
alert("新增失败!");
</script>
<%}
}
//----------------------------
//处理LAYER2的'顾问办理事务'
String itemID = "", //事务编号
itemName = "", //事务名称
beginTime = "", //开始时间
spendTime = "", //花费工时
itemResult = ""; //处理结果
int iFileCount = 0, iTemp = 0;
if(num > 0) //如果T_CASEINFO新增成功
{
String strTemp = request.getParameter("txtFileCount");
if(strTemp != null)
iFileCount = Integer.parseInt(strTemp);
for(int i = 1; i <= iFileCount; i++)
{
iTemp++;
itemID = String.valueOf(iTemp);
itemName = request.getParameter("txtTranCont" + i);
itemName = new String(itemName.getBytes("ISO8859_1"));
beginTime = request.getParameter("txtBeginTime" + i);
spendTime = request.getParameter("txtSpendTime" + i);
spendTime = new String(spendTime.getBytes("ISO8859_1"));
itemResult = request.getParameter("txtResult" + i);
itemResult = new String(itemResult.getBytes("ISO8859_1"));
if((itemName == null) || (itemName.equals("")))
{
iTemp--;
continue;
}
sql = "insert into t_caseafair(case_id,item_id,item_name,begin_time,spend_time,item_result)" +
" values('" + caseID +
"','" + itemID +
"','" + itemName +
"','" + beginTime +
"','" + spendTime +
"','" + itemResult + "')";
if((beginTime == null) || (beginTime.equals("")))
sql = "insert into t_caseafair(case_id,item_id,item_name,spend_time,item_result)" +
" values('" + caseID +
"','" + itemID +
"','" + itemName +
"','" + spendTime +
"','" + itemResult + "')";
num1 = db.executeUpdate(sql);
} //for()
} //if()
//END LAYER2----------------------------
//--------------------------------------
//BEGIN---处理合同费用新增---LAYER3-----
String charge_id = request.getParameter("charge_id"),
charge_sum = request.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 = request.getParameter("charge_id");
charge_sum = request.getParameter("charge_sum");
charge_sum = new String(charge_sum.getBytes("ISO8859_1"));
part_proportion = request.getParameter("part_proportion");
part_proportion = new String(part_proportion.getBytes("ISO8859_1"));
case_object = request.getParameter("case_object");
case_object = new String(case_object.getBytes("ISO8859_1"));
time_limit = request.getParameter("time_limit");
payment_method = request.getParameter("payment_method");
receive_time = request.getParameter("receive_time");
charge_standard = request.getParameter("charge_standard");
charge_standard = new String(charge_standard.getBytes("ISO8859_1"));
discount = request.getParameter("discount");
discount = new String(discount.getBytes("ISO8859_1"));
discount_person = request.getParameter("discount_person");
charge_person = request.getParameter("charge_person");
currency_kind = request.getParameter("currency_kind");
comment = request.getParameter("comment");
comment = new String(comment.getBytes("ISO8859_1"));
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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -