AccountDetailInfoAjax.jsp
2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%@ page import="java.text.DecimalFormat"%>
<%@ page import="weaver.general.BaseBean"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.hrm.company.SubCompanyComInfo"%>
<%@ page import="weaver.hrm.company.CompanyComInfo"%>
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs2" class="weaver.conn.RecordSet" scope="page" />
<%@ page import="weaver.hrm.*" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="java.util.*" %>
<%@ page import="org.json.JSONArray" %>
<%@ page import="org.json.JSONObject" %>
<%
User user = HrmUserVarify.getUser (request , response) ;
String id = Util.null2String(request.getParameter("id"));
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
CompanyComInfo companyComInfo = new CompanyComInfo();
JSONArray jsonArray = new JSONArray();
JSONArray ajaxData = new JSONArray();
JSONObject jsonObject=new JSONObject();
DecimalFormat df = new DecimalFormat("#####################0.00");
if(!"".equals(id) && !"0".equals(id)) {
rs.executeQuery(" select * from FnaAccountRangeSet where accountId = ? ", id);
while(rs.next()){
String orgId = Util.null2String(rs.getString("orgId"));
String subCompanyName = subCompanyComInfo.getSubCompanyname(orgId);
jsonArray = new JSONArray();
jsonObject = new JSONObject();
jsonObject.put("name", "subId");
jsonObject.put("iseditable", "true");
jsonObject.put("value", orgId);
jsonObject.put("label", orgId);
jsonObject.put("type", "input");
jsonArray.put(jsonObject);
jsonObject = new JSONObject();
jsonObject.put("name", "subCompanyName");
jsonObject.put("iseditable", "true");
jsonObject.put("value", subCompanyName);
jsonObject.put("label", subCompanyName);
jsonObject.put("type", "input");
jsonArray.put(jsonObject);
ajaxData.put(jsonArray);
}
}
out.println(ajaxData.toString());
%>