ce
public interface JGGLService {
?/**
? * 分頁查詢機構(gòu)信息
? * @param currentPage
? * @param pageSize
? * @param gsmc
? * @return
? */
?public PageValueObject<JGGLInfo> findjgglinfos(int currentPage, int pageSize, String gsmc);
?
?/**
? * 保存機構(gòu)信息
? * @param jggl
? */
?public void saveJGGLInfo(JGGLInfo jggl);
?public PageValueObject<ZCYHInfo> findJgyhs(int currentPage, int pageSize, String jgglId);
}
?
?
@Resource(name="jgglDao")
?private GenericDAO<JGGLInfo,String> jgglDao=null;
?
?
?@Override
?public PageValueObject<JGGLInfo> findjgglinfos(int currentPage,int pageSize, String gsmc) {
??PageValueObject<JGGLInfo> page =? new PageValueObject<JGGLInfo>(currentPage,pageSize);
??List<PropertyFilter> filterList = new ArrayList<PropertyFilter>(1);
??if(StringUtils.isValid(gsmc)){
???PropertyFilter filter = new PropertyFilter("gsmc",gsmc,PropertyFilter.MatchType.LIKE);
???filterList.add(filter);
??}
??
??page.setResult(jgglDao.find(filterList, page.getFirstResult(), page.getPageSize()));
??page.setTotalRows(jgglDao.getCount(filterList));
??return page;
?}
?@Transactional(readOnly=true)
?@Override
?public void saveJGGLInfo(JGGLInfo jggl) {
??jgglDao.save(jggl);
?}
?
?public PageValueObject<ZCYHInfo> findJgyhs(int currentPage, int pageSize, String jgglId){
??PageValueObject<ZCYHInfo> page =? new PageValueObject<ZCYHInfo>(currentPage,pageSize);
??String sql = "select ID,C_UPDATETIME,C_XM,I_XB,C_SJH,C_CSNY,C_MQZY,C_YHZT,C_ZHYCFWSJ,C_ZFBZH,C_ZFBMC,F_SYYJ,F_REALSYYJ,C_MM," +
????" I_XY,I_HY,I_GW,D_ZHDLWZJD,F_LJYJ,F_YZFYJ,I_ISDELETE " +
????" from app_zcyhinfo where 1=1 and ID IN (select C_ZCYHID from app_JGGL_ZCYH where C_JGGLID='"+jgglId+"')";
??String sql2 = "select count(*) from app_zcyhinfo where 1=1 and ID IN (select C_ZCYHID from app_JGGL_ZCYH where C_JGGLID='"+jgglId+"')";
??
??List<ZCYHInfo> tempResult = new LinkedList<ZCYHInfo>();
??List r = jgglDao.excuteQuerySQL(sql, page.getFirstResult(), page.getPageSize());
??if(r!=null && !r.isEmpty()){
???for(Object o:r){
????if(o!=null){
?????Object[] vs = (Object[])o;
?????if(vs.length==21){
??????ZCYHInfo z = new ZCYHInfo();
??????z.setId((String)vs[0]);
?????}
????}
???}
??}
??page.setResult(tempResult);
??page.setTotalRows(jgglDao.excuteGetCountSQL(sql2));
??return page;
??
?}
?
?
?
?
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
?String path = request.getContextPath();
?String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
?<head>
??<base href="<%=basePath%>">
??<title>選擇注冊用戶</title>
??<link href="css/comm.css" rel="stylesheet" type="text/css" />
??<link href="css/default.css" rel="stylesheet" type="text/css" />
??<link href="css/but_style.css" rel="stylesheet" type="text/css" />
??<script type="text/javascript" src="tree-table/javascripts/jquery.js"></script>
??<script type="text/javascript" src="js/comm.js"></script>
??<!-- BEGIN Plugin Code -->
??<style type="text/css">
???IMG {
????border-width: 0px;
????margin-bottom:-3px;
???}
???.font_red{
?????? color:#B9090C;
???}
??</style>
??
??<script type="text/javascript">
???//查詢
???function doSearch(){
????var form = document.getElementById("queryForm1");
????form.action = "zcyhAction!findzcyhinfos.action?Rnd="+Math.random();
????form.submit();
???}
???
???function selectZCYH(zcyhId,zcyhXm){
????parent.doSelectZCYH(zcyhId,zcyhXm);
???}
??</script>
?</head>
?<body class="body1">
??<form id="queryForm1" action="" method="post">
???<input type="hidden" name="currentPage" id="currentPage_param" value="${pageBean.currentPage }" />
??<div class="area">
???<div class="content">
????<div class="content_toolbar">
????
?????姓名:
?????<input name="xm" value="${xm }" type="text"? />
?????手機號:
?????<input name="sjh" value="${sjh }" type="text"? />
?????<input type="button" class="btn_1" οnclick="doSearch();" value="查詢" />
????</div>
????<div class="content_main">
?????<table cellspacing="0" class="list_table2" style="overflow-x:scroll;">
??????<thead>
??????<tr bgcolor="#F2F4F6">
???????<th width="5"></th>
???????<th>
????????姓名
???????</th>
???????<th>
????????手機號
???????</th>
???????<th>
????????出生年月
???????</th>
???????<th>
????????信用
???????</th>
???????<th>
????????累計傭金
???????</th>
???????<th>
????????剩余傭金
???????</th>
???????<th>
????????最后一次訪問時間
???????</th>
??????</tr>
??????</thead>
??????<tbody>
??????<c:forEach var="v" items="${pageBean.result}">
???????<tr>
????????<td align="center" width="5">
?????????<input type="radio" value="${v.id }" οnclick="selectZCYH('${v.id }','${v.xm }');" />
????????</td>
????????<td align="left">
?????????${v.xm }
????????</td>
????????<td>
?????????${v.sjh }
????????</td>
????????<td>
?????????${v.csny }
????????</td>
????????<td>
?????????${v.xy }
????????</td>
????????<td>
?????????${v.ljyj }
????????</td>
????????<td>
?????????${v.realsyyj }
????????</td>
????????<td>
?????????${v.zhycfwsj }
????????</td>
???????</tr>
??????</c:forEach>
??????</tbody>
?????</table>
?????<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
?????????????? ??<tr>
???????????????? ??<td align="right" nowrap>共
?????????????????? ??<span class="font_red">${pageBean.totalRows }</span> 條數(shù)據(jù) 當(dāng)前第 <span class="font_red">${pageBean.currentPage }</span>
?????????????????? ??頁 共 <span class="font_red">${pageBean.totalPages }</span> 頁
?????????????????? ??<img src="images/first.gif" width="18" height="18" οnclick="openPage(1)" title="首頁">
?????????????????? ??<img src="images/previous.gif" width="18" height="18" οnclick="openPage(${pageBean.prePage})" title="上一頁">
?????????????????? ??<img src="images/next.gif" width="18" height="18" οnclick="openPage(${pageBean.nextPage})" title="下一頁">
?????????????????? ??<img src="images/last.gif" width="18" height="18" οnclick="openPage(${pageBean.totalPages})" title="末頁"> </td>
?????????????? ??</tr>
???????????? ?</table>
????</div>
???</div>
??</div>
??</form>
?</body>
</html>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
?String path = request.getContextPath();
?String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
?<head>
??<base href="<%=basePath%>">
??<title>機構(gòu)管理</title>
??<link href="css/comm.css" rel="stylesheet" type="text/css" />
??<link href="css/default.css" rel="stylesheet" type="text/css" />
??<link href="css/but_style.css" rel="stylesheet" type="text/css" />
??<script type="text/javascript" src="tree-table/javascripts/jquery.js"></script>
??<script type="text/javascript" src="js/comm.js"></script>
??<!-- BEGIN Plugin Code -->
??<style type="text/css">
???IMG {
????border-width: 0px;
????margin-bottom:-3px;
???}
???.font_red{
?????? color:#B9090C;
???}
??</style>
??
??<script type="text/javascript">
???//查詢
???function doSearch(){
????var form = document.getElementById("queryForm");
????form.action = "jgglAction!findjgglinfos.action?Rnd="+Math.random();
????form.submit();
???}
???function deleteXM(){
????var formObj = document.getElementById('queryForm');
??? ?var url = "xmglAction!deleteXMInfos.action?Rnd="+Math.random();
??? ?deleteRecords(formObj,url);
???}
???
???//新增項目
???function showCreateXMWin(){
????var tital = "新建項目";
????var url = "xmglAction!toCreateXMinfoPage.action?Rnd="+Math.random();
????parent.open(tital,url,950,500);
???}
???//查詢機構(gòu)用戶信息
???function showJGYH(jgglId){
????var tital = "機構(gòu)用戶";
????var url = "jgglAction!findJgyhs.action?jgglId="+jgglId+"&Rnd="+Math.random();
????parent.open(tital,url,950,500);
???}
??</script>
?</head>
?<body class="body1">
??<form id="queryForm" action="" method="post">
???<input type="hidden" name="currentPage" id="currentPage_param" value="${pageBean.currentPage }" />
??<div class="area">
???<div class="pos_css">
????<table width="100%" border="0" cellspacing="0" cellpadding="0">
?????<tr>
??????<td style="padding-left:10px;color:#123670;">
???????<strong>您當(dāng)前的位置:</strong>
???????系統(tǒng)管理
???????>>
???????機構(gòu)用戶管理
??????</td>
?????</tr>
????</table>
???</div>
???<div class="content">
????<div class="content_toolbar">
????
?????公司名稱:
?????<input name="gsmc" value="${gsmc }" type="text"? />
?????<input type="button" class="btn_1" οnclick="doSearch();" value="查詢" />
?????<input type="button" class="btn_1" οnclick="showCreateXMWin();" value="新增機構(gòu)">
?????<input type="button" class="btn_1" οnclick="deleteXM();" value="刪除">
????</div>
????<div class="content_main">
?????<table cellspacing="0" class="list_table2" style="overflow-x:scroll;">
??????<thead>
??????<tr bgcolor="#F2F4F6">
???????<th width="5"><input id="selectAll" type="checkbox" οnclick="selectAllCheckbox()"></input></th>
???????<th>
????????公司名稱
???????</th>
???????<th>
????????公司地址
???????</th>
???????<th>
????????營業(yè)執(zhí)照編號
???????</th>
???????<th>
????????管理員姓名
???????</th>
???????<th>
????????聯(lián)系方法
???????</th>
???????<th>
????????注冊時間
???????</th>
???????<th>
????????操作
???????</th>
??????</tr>
??????</thead>
??????<tbody>
??????<c:forEach var="v" items="${pageBean.result}">
???????<tr οndblclick="showViewXMWin('${v.id }');">
????????<td align="center" width="5">
?????????<input name="checkItem" value="${v.id }" type="checkbox"></input>
????????</td>
????????<td align="left">
?????????${v.gsmc }
????????</td>
????????<td>
?????????${v.gsdz }
????????</td>
????????<td>
?????????${v.yyzzbh }
????????</td>
????????<td>
?????????${v.gly.xm }
????????</td>
????????<td>
?????????${v.gly.sjh }
????????</td>
????????<td>
?????????${v.gly.updateTime }
????????</td>
????????<td align="center">
????????? <a href="javascript:void(0);" οnclick="showJGYH('${v.id }')">用戶管理</a>
????????</td>
???????</tr>
??????</c:forEach>
??????</tbody>
?????</table>
?????<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
?????????????? ??<tr>
???????????????? ??<td align="right" nowrap>共
?????????????????? ??<span class="font_red">${pageBean.totalRows }</span> 條數(shù)據(jù) 當(dāng)前第 <span class="font_red">${pageBean.currentPage }</span>
?????????????????? ??頁 共 <span class="font_red">${pageBean.totalPages }</span> 頁
?????????????????? ??<img src="images/first.gif" width="18" height="18" οnclick="openPage(1)" title="首頁">
?????????????????? ??<img src="images/previous.gif" width="18" height="18" οnclick="openPage(${pageBean.prePage})" title="上一頁">
?????????????????? ??<img src="images/next.gif" width="18" height="18" οnclick="openPage(${pageBean.nextPage})" title="下一頁">
?????????????????? ??<img src="images/last.gif" width="18" height="18" οnclick="openPage(${pageBean.totalPages})" title="末頁"> </td>
?????????????? ??</tr>
???????????? ?</table>
????</div>
???</div>
??</div>
??</form>
?</body>
</html>
?
?
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
? <head>
??? <base href="<%=basePath%>">
??? <base target="_self">
??? <title>新增機構(gòu)管理</title>
?<meta http-equiv="pragma" content="no-cache">
?<meta http-equiv="cache-control" content="no-cache">
?<meta http-equiv="expires" content="0">???
?<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
?<meta http-equiv="description" content="This is my page">
?<link href="css/default.css" rel="stylesheet" type="text/css" />
?<link href="css/form_comm.css" rel="stylesheet" type="text/css" />
?<link href="css/comm.css" rel="stylesheet" type="text/css" />
?<script type="text/javascript" src="js/Validator.js"></script>
?<script type="text/javascript" src="js/jquery.min.js"></script>
?<script type="text/javascript" src="jsplugin/baidu_popup/popup.js"></script>
?<script type="text/javascript" src="jsplugin/baidu_popup/popupclass.js"></script>
?
?<script type="text/javascript">
??function doSubmit(){
???
???var form = document.getElementById("form1");
???form.action = "tzglAction!saveTZInfo.action?Rnd="+Math.random();
???form.submit();
??}
??
??function showOpenSelZcyhWin(){
???var tital = "選擇管理員";
???var url = "zcyhAction!findzcyhinfos.action?forward=toSelectZcyhPage&pageSize=7&Rnd="+Math.random();
???ShowIframe(tital,url,600,320);
??}
??
??function doSelectZCYH(zcyhId,zcyhXm){
???document.getElementById('glyId').value = zcyhId;
???document.getElementById('glymc').value = zcyhXm;
???
???ClosePop();
???doSearch();
??}
?</script>
? </head>
?
? <body>
??? <form id="form1" action="" method="POST">
?? <div class="from_div">
???? ?<table? border="0" cellpadding="0" cellspacing="0" class="form_table">
???? ??<tr>
???? ???<td align="right" width="10%"> 公司名稱:</td>
???? ???<td? style=" width:300px; background:#FFFFFF; text-align:left; text-align:left;">
???? ??? <input?? type="text" name="jggl.gsmc" value="${jggl.gsmc }"/>
???? ???</td>
???? ??</tr>
???? ??<tr>
???? ???<td align="right" width="10%"> 營業(yè)執(zhí)照編號:</td>
???? ???<td? style=" width:300px; background:#FFFFFF; text-align:left; text-align:left;">
???? ??? <input?? type="text" name="jggl.yyzzbh" value="${jggl.yyzzbh }"/>
???? ???</td>
???? ??</tr>
???? ??<tr>
???? ???<td align="right" width="10%"> 公司地址:</td>
???? ???<td? style=" width:300px; background:#FFFFFF; text-align:left; text-align:left;">
???? ??? <input?? type="text" name="jggl.gsdz" value="${jggl.gsdz }" size="40"/>
???? ???</td>
???? ??</tr>
???? ??<tr>
???? ???<td align="right" width="10%"> 管理員:</td>
???? ???<td? style=" width:300px; background:#FFFFFF; text-align:left; text-align:left;">
???? ??? <input id="glymc"? type="text"/>
???? ???<input id="glyId" name="glyId"? type="hidden"/>
???? ???</td>
???? ??</tr>
???? ??
???? ??<tr>
?????<td? colspan="4" style="background:#FFFFFF;text-align:center;">
??????<input type="button" class="btn_1"? οnclick="doSubmit()"? value="提交">
??????<input type="reset" class="btn_1"? value="重置">
?????</td>
????</tr>
???? ?</table>
??? ?</div>
??? </form>
? </body>
</html>
?
public String toCreatePage(){
??
??return "toShowZCYHListPage";
?}
?
?public String findjgglinfos(){
??String gsmc = this.getParameter("gsmc");
??PageValueObject<JGGLInfo> rs = jgglService.findjgglinfos(this.getCurrentPage(),this.getPageSize(),gsmc);
??setAttribute("pageBean", rs);
??setAttribute("gsmc",gsmc);
??
??return "toJGGLListPage";
?}
?
?public void saveJGGLInfo(){
??ZCYHInfo gly = zcyhService.getZCYHById(this.getParameter("glyId"));
??jggl.setGly(gly);
??jgglService.saveJGGLInfo(jggl);
??this.showMessage(this.getResponse(), "保存成功!", true);
?}
?
?
?public String findJgyhs(){
??String jgglId = this.getParameter("jgglId");
??PageValueObject<ZCYHInfo> rs = jgglService.findJgyhs(this.getCurrentPage(),this.getPageSize(),jgglId);
??
??return "";
?}
總結(jié)
- 上一篇: 云计算与云原生 — Docker 容器技
- 下一篇: 推荐一款免费的美国专利下载软件