哪位高手给我讲解一下这个电路图讲解和实物图 谢谢高分

求哪位模电高手给解析一下这个放大电路,谢谢_百度知道
求哪位模电高手给解析一下这个放大电路,谢谢
我的答案是
V1=(V2-VS)(R9+R10)/R4,不知对不对,希望给分析一下
我有更好的答案
差分电路,可以参考一下INA128之类的仪放。假设R7=R8=R9=R10,那么G=1+(R5+R6)/R4
采纳率:49%
为您推荐:
其他类似问题
放大电路的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。哪位高手帮我翻译一下这几段话,高分~谢谢~_百度知道
哪位高手帮我翻译一下这几段话,高分~谢谢~
Many institutions allow a customer to print monthly statements right at the ATM.Armed with new information ,the crook is a good position to gain full access to the account.What is being done to eliminate this threat?
From a technology st...
我有更好的答案
许多机构允许顾客每个月在ATM上打印每个月的情况。当新信息输出时,机器会发出咕咕的声音提示你已经成功到账了。什么能够消除潜在的被盗窃的威胁呢?这就涉及到了一种新的更科学取款机,新的取款机要求取款人取款的时候身子弯的更深。并且取款机被设计的让摄像头基本上不可能被装上。还有,就是一个新的被叫做&jitter&的技术,能够让卡片在读取信息的时候进入和出来都以一种不同的速度。这些进步都能够防止取款人被盗。但是因为一些老式机器依然在使用,依然给了盗贼们窃取人们钱财的机会。PS:有的地方时意译,自己添加了一些信息为了使中文更加通顺。但是一定忠实于原文意思,没有改变原文意思。
采纳率:10%
许多机构允许一个用户打印每月报表的自动取款机在. 根据新信息,骗子,是一个很好的位置来获得充分接触到帐户如何消除这种威胁吗?
从技术角度看,新机器正在建造什么读者弯曲的机器和槽机被用来使人很难附上一架照相机。
新技术,并给出了一种叫做“抖动”牌移出,以不同速度,而这是阅读信息。
这些改进将帮助但是因为旧机器中使用,小偷就有一个简单的时间找到目标。希望这翻译对你有帮助!
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。哪位高手能给我解释解释单片机点阵扫描原理不谢谢! - 工程师杂谈 -
中国电子技术论坛 -
最好最受欢迎电子论坛!
后使用快捷导航没有帐号?
哪位高手能给我解释解释单片机点阵扫描原理不谢谢!
21:49:51  
单片机菜鸟请求帮忙!
(45.04 KB, 下载次数: 18)
21:47 上传
点阵扫描原理
22:16:40  
你说的扫描属于动态显示,一般都会有译码器,以行扫描共阳点阵为例,行线高电平为选通,相对应的列线导通则点亮某个LED。比如行为第一行高电平其余低电平,列给第一列为低电平其余高电平,则第一行第一列那个LED亮其他灭,你可以想象成坐标,一般取左上角LED为0,0坐标。再举例,当行译码+列为输出寄存器的驱动芯片,如595,573等,当第一行高电平其余低电平,列驱动上595为则第一行除了第四个LED不亮,其他都亮。当然,如果你电源能提供的最大电流有限的话还是用译码+译码方式即每次少么单个LED亮。扫描根据视觉暂留的原理显示。就是说,点阵上看到的一些亮点是在你看到的那一时刻之前点亮的,从第一个到最后一个亮的LED的时间&视觉暂留时间即0.1S视觉上会呈现不闪动图像。
23:00:15  
dongyumin 发表于
你说的扫描属于动态显示,一般都会有译码器,以行扫描共阳点阵为例,行线高电平为选通,相对应的列线导通则 ...
file:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPG如果我想显示0-9的动态显示用这个程序就可以但是我还是不太清楚他的原理高手可以在指点一下吗?谢谢! file:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPGfile:///c:/users/ADMINI~1/appdata/roaming/360se6/USERDA~1/Temp/.JPG
(24.6 KB, 下载次数: 5)
22:53 上传
例如这个电路图
破天武神www.gmwxw.com/book/974.html 绝世武神www.aoswx.com/book/1076.html&
20:49:30  
和点亮数码管不是一样的吗
zxmh.net/html/book36/ 斗破苍穹&
高级工程师
10:35:02  
行扫描,在加列扫描,用循环
Powered by
供应链服务
版权所有 (C) 深圳华强聚丰电子科技有限公司哪位朋友可以帮忙把这个电路图讲解一下怎么运作_百度知道
哪位朋友可以帮忙把这个电路图讲解一下怎么运作
我有更好的答案
这是一个“星形“和“三角形”两种接法的正反转电机控制接线图。星形和三角形应有互锁控制,正反转也应有互锁控制。
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。欢迎加入我们,一同切磋技术 &
用户名: &&&
密 码: &
共有 1713 人关注过本帖
标题:哪位高手帮忙给看一下,我的查询功能一直实现不了 ????谢谢
等 级:新手上路
&&已结贴√
&&问题点数:20&&回复次数:12&&&
哪位高手帮忙给看一下,我的查询功能一直实现不了 ????谢谢
这是查询的主界面:
&%@ page language=&java& contentType=&text/ charset=UTF-8&
&&& pageEncoding=&UTF-8&%&
&!DOCTYPE html PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN& &http://www.w3.org/TR/html4/loose.dtd&&
&meta http-equiv=&Content-Type& content=&text/ charset=UTF-8&&
&title&用户信息管理&/title&
&script type=&text/javascript&&
//打开新增患者对话框
function openPatientAddDialog(){
&&& //在勾选情况下点击新增要先清除数据
&&& resetValue();
&&& $(&#dlg&).dialog(&open&).dialog(&setTitle&,&添加患者信息&);
&&& url=&patient!save&;//为url赋值
//重置对话框内数据
function resetValue(){
&&& $(&#patientName&).val(&&);
&&& $(&#zhuangtai&).combobox(&setValue&,&&);
&&& $(&#birthday&).datebox(&setValue&,&&);
&&& $(&#chuli&).datebox(&setValue&,&&);
&&& $(&#patientDesc&).val(&&);
&&& $(&#didian&).combobox(&setValue&,&&);
&&& $(&#jielun&).combobox(&setValue&,&&);
&&& $(&#tel&).val(&&);
&&& $(&#money&).val(&&);
&&& $(&#baoxiao&).val(&&);
//关闭对话框
function closePatientDialog(){
&&& $(&#dlg&).dialog(&close&);
&&& resetValue();
//提交新增患者数据
function savePatient(){
&&& $(&#fm&).form(&submit&,{
&&&&&&&&url:url,
&&&&&&&&onSubmit:function(){
&&&&&&&&&&&&if($('#zhuangtai').combobox(&getValue&)==&&){
&&&&&&&&&&&&&&& $.messager.alert(&系统提示&,&请选择手续状态&);
&&&&&&&&&&&&&&&
&&&&&&&&&&&&}
&&&&&&&&&&&&if($('#didian').combobox(&getValue&)==&&){
&&&&&&&&&&&&&&& $.messager.alert(&系统提示&,&请选择调查地点&);
&&&&&&&&&&&&&&&
&&&&&&&&&&&&}
&&&&&&&&&&&&return $(this).form(&validate&);
&&&&&&&&},
&&&&&&&&success:function(result){
&&&&&&&&&&&&if(result.errorMsg){
&&&&&&&&&&&&&&& $.messager.alert(&系统提示&,result.errorMsg);
&&&&&&&&&&&&&&&
&&&&&&&&&&&&}else{
&&&&&&&&&&&&&&& $.messager.alert(&系统提示&,&保存成功&);
&&&&&&&&&&&&&&& resetValue();
&&&&&&&&&&&&&&& $(&#dlg&).dialog(&close&);
&&&&&&&&&&&&&&& $(&#dg&).datagrid(&reload&);
&&&&&&&&&&&&}
//删除选中的患者数据
function deletePatient(){
&&& //获得选中数据对象
&&& var selectedRows=$(&#dg&).datagrid('getSelections');
&&& if(selectedRows.length==0){
&&&&&&&&$.messager.alert(&系统提示&,&请选择要删除的数据!&);
&&& var strIds=[];//要删除的序号组合
&&& for(var i=0;i&selectedRows.i++){
&&&&&&&&strIds.push(selectedRows[i].patientId);
&&& var ids=strIds.join(&,&);
&&& $.messager.confirm(&系统提示&,&您确认要删掉这&font color=red&&+selectedRows.length+&&/font&条数据吗?&,function(r){
&&&&&&&&if(r){
&&&&&&&&&&&&//ajax提交 delIds
&&&&&&&&&&&&$.post(&patient!delete&,{delIds:ids},function(result){
&&&&&&&&&&&&&&& if(result.success){
&&&&&&&&&&&&&&&&&&&&$.messager.alert(&系统提示&,&您已成功删除&font color=red&&+result.delNums+&&/font&条数据!&);
&&&&&&&&&&&&&&&&&&&&$(&#dg&).datagrid(&reload&);
&&&&&&&&&&&&&&& }else{
&&&&&&&&&&&&&&&&&&&&$.messager.alert('系统提示',result.errorMsg);
&&&&&&&&&&&&&&& }
&&&&&&&&&&&&},&json&);
//修改患者资料
function openPatientModifyDialog(){
&&& var selectedRows=$(&#dg&).datagrid('getSelections');
&&& if(selectedRows.length!=1){
&&&&&&&&$.messager.alert(&系统提示&,&请选择一条要编辑的数据!&);
&&& var row=selectedRows[0];
&&& $(&#dlg&).dialog(&open&).dialog(&setTitle&,&编辑患者资料&);
&&& $(&#patientName&).val(row.patientName);
&&& $(&#zhuangtai&).combobox(&setValue&,row.zhuangtai);
&&& $(&#birthday&).datebox(&setValue&,row.birthday);
&&& $(&#chuli&).datebox(&setValue&,row.chuli);
&&& $(&#patientDesc&).val(row.patientDesc);
&&& $(&#didian&).combobox(&setValue&,row.didian);
&&& $(&#jielun&).combobox(&setValue&,row.jielun);
&&& $(&#tel&).val(row.tel);
&&& $(&#money&).val(row.money);
&&& $(&#baoxiao&).val(row.baoxiao);
&&& url=&patient!save?patientId=&+row.patientId;
//查询符合条件的用户
function searchPatient(){
&&& $('#dg').datagrid('load',{
&&&&&&&&s_patientName:$('#s_patientName').val(&&),
&&&&&&&&zhuang:$('#zhuang').combobox(&getValue&),
&&&&&&&&jie:$('#jie').combobox(&getValue&),
//倒出excel数据
function exportPatient(){
&&& $('#export').form(&submit&,{
&&&&&&&&url:&patient!exportPatient&
&&& //window.location.href=&employee!ExportEmployee&;
&link rel=&stylesheet& type=&text/css& href=&jquery-easyui-1.3.3/themes/default/easyui.css&&
&link rel=&stylesheet& type=&text/css& href=&jquery-easyui-1.3.3/themes/icon.css&&
&script type=&text/javascript& src=&jquery-easyui-1.3.3/jquery.min.js&&&/script&
&script type=&text/javascript& src=&jquery-easyui-1.3.3/jquery.easyui.min.js&&&/script&
&script type=&text/javascript& src=&jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js&&&/script&
&body style=&margin:5px&&
&table id=&dg& title=&患者信息& class=&easyui-datagrid& fitColumns=&true&
&&&&&pagination=&true& rownumbers=&true& url=&patient& fit=&true& toolbar=&#tb&&
&&&&&&&&&thead&
&&&&&&&&&&&&&tr&
&&&&&&&&&&&&&&& &th field=&cb& checkbox=&true&&&/th&
&&&&&&&&&&&&&&& &th field=&patientId& width=&40&&&align=&center&&编号&/th&
&&&&&&&&&&&&&&& &th field=&patientName& width=&80&&&align=&center&&患者名称&/th&
&&&&&&&&&&&&&&& &th field=&zhuangtai& width=&80&&&align=&center&&手续状态&/th&
&&&&&&&&&&&&&&& &th field=&didian& width=&80&&&align=&center&&调查地点&/th&
&&&&&&&&&&&&&&& &th field=&jielun& width=&80& align=&center&&调查结论 &/th&
&&&&&&&&&&&&&&& &th field=&birthday& width=&80& align=&center&&调查日期&/th&
&&&&&&&&&&&&&&& &th field=&chuli& width=&80& align=&center&&处理日期&/th&
&&&&&&&&&&&&&&& &th field=&tel& width=&80& align=&center&&联系电话&/th&
&&&&&&&&&&&&&&& &th field=&patientDesc& width=&250& align=&center&&家庭住址&/th&
&&&&&&&&&&&&&&& &th field=&money& width=&80& align=&center&&花费金额&/th&
&&&&&&&&&&&&&&& &th field=&baoxiao& width=&80& align=&center&&报销金额&/th&
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&/tr&
&&&&&&&&&/thead&
&&& &/table&
&&& &div id=&tb&&
&&&&&&&&&div&
&&&&&&&&&&&&&a href=&javascript:openPatientAddDialog()& class=&easyui-linkbutton& iconCls=&icon-add& plain=&true&&添加&/a&
&&&&&&&&&&&&&a href=&javascript:openPatientModifyDialog()& class=&easyui-linkbutton& iconCls=&icon-edit& plain=&true&&修改&/a&
&&&&&&&&&&&&&a href=&javascript:deletePatient()& class=&easyui-linkbutton& iconCls=&icon-remove& plain=&true&&删除&/a&
&&&&&&&&&&&&&a href=&javascript:exportPatient()& class=&easyui-linkbutton& iconCls=&icon-export& plain=&true&&导出Execl&/a&
&&&&&&&&&/div&
&&&&&&&&&div&
&&&&&&&&&&&&&form id=&export& method=&post&&
&&&&&&&&&&&&&姓名:&&input type=&text& name=&s_patientName& id=&s_patientName& size=&10&/&
&&&&&&&&&&&&&手续状态:&&select&&id=&zhuang& name=&zhuang& editable=&false& panelHeight=&auto& style=&width: 155px&&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&&&请选择...&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&未调&&未调&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&已调&&已调&/option&
&&&&&&&&&&&&&&&&&&&&&/select&
&&&&&&&&&&&&&调查结论:&&select&&id=&jie& name=&jie& editable=&false& panelHeight=&auto& style=&width: 155px&&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&&&请选择...&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&正常&&正常&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&侧调&&侧调&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&拒赔&&拒赔&/option&
&&&&&&&&&&&&&&&&&&&&&/select&
&&&&&&&&&&&&&a href=&javascript:searchPatient()& class=&easyui-linkbutton& iconCls=&icon-search& plain=&true&&搜索&/a&
&&&&&&&&&&&&&/form&
&&&&&&&&&/div&
&&& &/div&
&&& &div id=&dlg& class=&easyui-dialog& style=&width: 570height: 340padding: 10px 20px&
&&&&&&&&closed=&true& buttons=&#dlg-buttons&&
&&&&&&&&&form id=&fm& method=&post& enctype=&multipart/form-data&&
&&&&&&&&&&&&&table cellspacing=&5&&
&&&&&&&&&&&&&&& &tr&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&td&患者姓名:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input type=&text& name=&patient.patientName& id=&patientName& class=&easyui-validatebox& required/&&/td&
&&&&&&&&&&&&&&&&&&&&&td&手续状态:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&select class=&easyui-combobox& id=&zhuangtai& name=&patient.zhuangtai& editable=&false& panelHeight=&auto& style=&width: 155px&&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&&&请选择...&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&未调&&未调&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&已调&&已调&/option&
&&&&&&&&&&&&&&&&&&&&&/select&&/td&
&&&&&&&&&&&&&&& &/tr&
&&&&&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&&&&&&&&td&调查地点:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&select class=&easyui-combobox& id=&didian& name=&patient.didian& editable=&false& panelHeight=&auto& style=&width: 155px&&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&&&请选择...&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&医院&&医院&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&实地&&实地&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&公司&&公司&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&无&&无&/option&
&&&&&&&&&&&&&&&&&&&&&/select&&/td&
&&&&&&&&&&&&&&&&&&&&&td&调查结论:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&select class=&easyui-combobox& id=&jielun& name=&patient.jielun& editable=&false& panelHeight=&auto& style=&width: 155px&&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&&&请选择...&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&正常&&正常&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&侧调&&侧调&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&拒赔&&拒赔&/option&
&&&&&&&&&&&&&&&&&&&&&&&&&option value=&无&&无&/option&
&&&&&&&&&&&&&&&&&&&&&/select&&/td&
&&&&&&&&&&&&&&& &/tr&
&&&&&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&& &td&调查日期:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input class=&easyui-datebox& name=&patient.birthday& id=&birthday& required editable=&false& /&&/td&
&&&&&&&&&&&&&&&&&&&&&td&处理日期:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input class=&easyui-datebox& name=&patient.chuli& id=&chuli& required editable=&false& /&&/td&
&&&&&&&&&&&&
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& &/tr&
&&&&&&&&&&&&&&& &tr&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&td&花费金额:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input type=&text& name=&patient.money& id=&money& class=&easyui-validatebox& required/&&/td&
&&&&&&&&&&&&&&&&&&&&&td&报销金额:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input type=&text& name=&patient.baoxiao& id=&baoxiao&&&required/&&/td&
&&&&&&&&&&&&&&&&&&&&&/tr&
&&&&&&&&&&&&&&&&&&&&&tr&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&td&联系电话:&/td&
&&&&&&&&&&&&&&&&&&&&&td&&input type=&text& name=&patient.tel& id=&tel& class=&easyui-validatebox& required/&&/td&
&&&&&&&&&&&&&&&&&&&&&/tr&
&&&&&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&&&&&&&&td valign=&top&&家庭住址:&/td&
&&&&&&&&&&&&&&&&&&&&&td colspan=&4&&&textarea rows=&7& cols=&46& name=&patient.patientDesc& id=&patientDesc&&&/textarea&&/td&
&&&&&&&&&&&&&&& &/tr&
&&&&&&&&&&&&&/table&
&&&&&&&&&/form&
&&& &/div&
&&& &div id=&dlg-buttons&&
&&&&&&&&&a href=&javascript:savePatient()& class=&easyui-linkbutton& iconCls=&icon-ok&&保存&/a&
&&&&&&&&&a href=&javascript:closePatientDialog()& class=&easyui-linkbutton& iconCls=&icon-cancel&&关闭&/a&
&&& &/div&
package org.com.
import java.sql.C
import java.sql.PreparedS
import java.sql.ResultS
import org.com.model.PageB
import org.com.model.P
import org.com.util.DateU
import org.com.util.StringU
public class PatientDao {
&&&&&* 得到patient查询结果
&&&&&* @param con
&&&&&* @param pageBean
&&&&&* @param patient
&&&&&* @return
&&&&&* @throws Exception
&&& public ResultSet patientList(Connection con,PageBean pageBean,Patient patient,String zhuang,String jie)throws Exception{
&&&&&&&&StringBuffer sb=new StringBuffer(&select * from t_patient&);
&&&&&&&&if(StringUtil.isNotEmpty(patient.getPatientName())){
&&&&&&&&&&&&sb.append(& and patientName like '%&+patient.getPatientName()+&%'&);
&&&&&&&&//分页
&&&&&&&&if(pageBean!=null){
&&&&&&&&&&&&sb.append(& limit &+pageBean.getStart()+&,&+pageBean.getRows());
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sb.toString());
&&&&&&&&return pstmt.executeQuery();
&&&&&* 获取数据总条数
&&&&&* @param con
&&&&&* @param grade
&&&&&* @return
&&&&&* @throws Exception
&&& public int patientCount(Connection con,Patient patient,String zhuang,String jie)throws Exception{
&&&&&&&&StringBuffer sb=new StringBuffer(&select count(*) as total from t_patient&);
&&&&&&&&if(StringUtil.isNotEmpty(patient.getPatientName())){
&&&&&&&&&&&&sb.append(& and patientName like '%&+patient.getPatientName()+&%'&);
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sb.toString().replaceFirst(&and&, &where&));
&&&&&&&&ResultSet rs=pstmt.executeQuery();
&&&&&&&&if(rs.next()){
&&&&&&&&&&&&return rs.getInt(&total&);
&&&&&&&&}else{
&&&&&&&&&&&&return 0;
&&&&&* 数据库插入数据
&&&&&* @param con
&&&&&* @param patient
&&&&&* @return
&&&&&* @throws Exception
&&& public int patientAdd(Connection con,Patient patient)throws Exception{
&&&&&&&&String sql=&insert into t_patient values(null,?,?,?,?,?,?,?,?,?,?)&;
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sql);
&&&&&&&&pstmt.setString(1, patient.getPatientName());
&&&&&&&&pstmt.setString(2, patient.getZhuangtai());
&&&&&&&&pstmt.setString(3, DateUtil.formatDate(patient.getChuli(), &yyyy-MM-dd&));
&&&&&&&&pstmt.setString(4, DateUtil.formatDate(patient.getBirthday(), &yyyy-MM-dd&));
&&&&&&&&pstmt.setString(5, patient.getDidian());
&&&&&&&&pstmt.setString(6, patient.getJielun());
&&&&&&&&pstmt.setString(7, patient.getTel());
&&&&&&&&pstmt.setString(8, patient.getPatientDesc());
&&&&&&&&pstmt.setString(9, patient.getMoney());
&&&&&&&&pstmt.setString(10, patient.getBaoxiao());
&&&&&&&&return pstmt.executeUpdate();
&&&&&* 删除数据
&&&&&* @param con
&&&&&* @param delIds
&&&&&* @return
&&&&&* @throws Exception
&&& public int patientDelete(Connection con,String delIds)throws Exception{
&&&&&&&&String sql=&delete from t_patient where patientId in(&+delIds+&)&;
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sql);
&&&&&&&&return pstmt.executeUpdate();
&&&&&* 患者资料更改
&&&&&* @param con
&&&&&* @param patient
&&&&&* @return
&&&&&* @throws Exception
&&& public int patientModify(Connection con,Patient patient)throws Exception{
&&&&&&&&String sql=&update t_patient set patientName=?,zhuangtai=?,birthday=?,chuli=?,didian=?,jielun=?,tel=?,patientDesc=?,money=?,baoxiao=? where patientId=?&;
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sql);
&&&&&&&&pstmt.setInt(11, patient.getPatientId());
&&&&&&&&pstmt.setString(1, patient.getPatientName());
&&&&&&&&pstmt.setString(2, patient.getZhuangtai());
&&&&&&&&pstmt.setString(3, DateUtil.formatDate(patient.getChuli(), &yyyy-MM-dd&));
&&&&&&&&pstmt.setString(4, DateUtil.formatDate(patient.getBirthday(), &yyyy-MM-dd&));
&&&&&&&&pstmt.setString(5, patient.getDidian());
&&&&&&&&pstmt.setString(6, patient.getJielun());
&&&&&&&&pstmt.setString(7, patient.getTel());
&&&&&&&&pstmt.setString(8, patient.getPatientDesc());
&&&&&&&&pstmt.setString(9, patient.getMoney());
&&&&&&&&pstmt.setString(10, patient.getBaoxiao());
&&&&&&&&return pstmt.executeUpdate();
Avtion.java:
package org.com.
import java.io.OutputS
import java.sql.C
import java.sql.ResultS
import java.util.D
import javax.servlet.http.HttpServletR
import javax.servlet.http.HttpS
import net.sf.json.JSONA
import net.sf.json.JSONO
import org.apache.poi.hssf.usermodel.HSSFC
import org.apache.poi.hssf.usermodel.HSSFCellS
import org.apache.poi.hssf.usermodel.HSSFF
import org.apache.poi.hssf.usermodel.HSSFR
import org.apache.poi.hssf.usermodel.HSSFS
import org.apache.poi.hssf.usermodel.HSSFW
import org.apache.poi.hssf.util.HSSFC
import org.apache.struts2.ServletActionC
import org.apache.struts2.interceptor.ServletRequestA
import org.com.dao.PatientD
import org.com.dao.UserD
import org.com.model.PageB
import org.com.model.P
import org.com.model.U
import org.com.util.DateU
import org.com.util.DbU
import org.com.util.JsonU
import org.com.util.ResponseU
import org.com.util.StringU
import com.opensymphony.xwork2.ActionS
public class PatientAction extends ActionSupport implements ServletRequestAware{
&&& private P//patient对象
&&& private S//分页数据
&&& private S//分页数据
&&& private String delI//批量删除数据的序列号
&&& private String patientId;//修改患者资料传递的患者编号
&&& //查询条件的变量
&&& private String s_patientN
&&& private S
&&& private S
&&& public String getPage() {
&&& public void setPage(String page) {
&&&&&&&&this.page =
&&& public String getRows() {
&&& public void setRows(String rows) {
&&&&&&&&this.rows =
&&& public Patient getPatient() {
&&& public void setPatient(Patient patient) {
&&&&&&&&this.patient =
&&& public String getDelIds() {
&&&&&&&&return delI
&&& public void setDelIds(String delIds) {
&&&&&&&&this.delIds = delI
&&& public String getPatientId() {
&&&&&&&&return patientId;
&&& public void setPatientId(String patientId) {
&&&&&&&&this.patientId = patientId;
&&& public String getS_patientName() {
&&&&&&&&return s_patientN
&&& public void setS_patientName(String s_patientName) {
&&&&&&&&this.s_patientName = s_patientN
&&& public String getZhuang() {
&&& public void setZhuang(String zhuang) {
&&&&&&&&this.zhuang =
&&& public String getJie() {
&&& public void setJie(String jie) {
&&&&&&&&this.jie =
&&& DbUtil dbUtil=new DbUtil();
&&& UserDao userDao=new UserDao();
&&& PatientDao patientDao=new PatientDao();
&&& HttpServletR
&&& //当前用户
&&& User currentU
&&& @Override
&&& public String execute() throws Exception {
&&&&&&&&// 获取Session
&&&&&&&&HttpSession session=request.getSession();&&&
&&&&&&&&//链接connection
&&&&&&&&Connection con=
&&&&&&&&PageBean pageBean=new PageBean(Integer.parseInt(page),Integer.parseInt(rows));//分页pageBean
&&&&&&&&if(patient==null){
&&&&&&&&&&&&patient=new Patient();
&&&&&&&&if(s_patientName!=null){
&&&&&&&&&&&&patient.setPatientName(s_patientName);
&&&&&&&&&&&&patient.setZhuangtai(zhuang);
&&&&&&&&&&&&patient.setJielun(jie);
&&&&&&&&try{
&&&&&&&&&&&&con=dbUtil.getCon();
&&&&&&&&&&&&JSONObject result=new JSONObject();
&&&&&&&&&&&&JSONArray jsonArray=JsonUtil.formatRsToJsonArray(patientDao.patientList(con, pageBean,patient,zhuang,jie));
&&&&&&&&&&&&int total=patientDao.patientCount(con,patient,zhuang,jie);
&&&&&&&&&&&&result.put(&rows&, jsonArray);
&&&&&&&&&&&&result.put(&total&, total);
&&&&&&&&&&&&ResponseUtil.write(ServletActionContext.getResponse(), result);
&&&&&&&&}catch(Exception e){
&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&}finally{
&&&&&&&&&&&&try {
&&&&&&&&&&&&&&& dbUtil.closeCon(con);
&&&&&&&&&&&&} catch (Exception e) {
&&&&&&&&&&&&&&& // TODO Auto-generated catch block
&&&&&&&&&&&&&&& e.printStackTrace();
&&&&&&&&&&&&}
&&& //保存患者数据(新增和修改)
&&& public String save()throws Exception{
&&&&&&&&//判断patientId是否为空
&&&&&&&&if(StringUtil.isNotEmpty(patientId)){
&&&&&&&&&&&&patient.setPatientId(Integer.parseInt(patientId));
&&&&&&&&Connection con=
&&&&&&&&try{
&&&&&&&&&&&&con=dbUtil.getCon();
&&&&&&&&&&&&int saveNums=0;
&&&&&&&&&&&&JSONObject result=new JSONObject();
&&&&&&&&&&&&if(StringUtil.isNotEmpty(patientId)){
&&&&&&&&&&&&//不为空,修改患者信息
&&&&&&&&&&&&&&& saveNums=patientDao.patientModify(con, patient);
&&&&&&&&&&&&}else{
&&&&&&&&&&&&//patientId为空,新增患者
&&&&&&&&&&&&&&& saveNums=patientDao.patientAdd(con, patient);
&&&&&&&&&&&&}
&&&&&&&&&&&&if(saveNums&0){
&&&&&&&&&&&&&&& result.put(&success&, &true&);
&&&&&&&&&&&&}else{
&&&&&&&&&&&&&&& result.put(&success&, &true&);//业务逻辑,需要返回success,但返回的是错误message
&&&&&&&&&&&&&&& result.put(&errorMsg&, &保存失败&);
&&&&&&&&&&&&}
&&&&&&&&&&&&ResponseUtil.write(ServletActionContext.getResponse(), result);
&&&&&&&&}catch(Exception e){
&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&}finally{
&&&&&&&&&&&&try {
&&&&&&&&&&&&&&& dbUtil.closeCon(con);
&&&&&&&&&&&&} catch (Exception e) {
&&&&&&&&&&&&&&& // TODO Auto-generated catch block
&&&&&&&&&&&&&&& e.printStackTrace();
&&&&&&&&&&&&}
&&& //删除数据
&&& public String delete()throws Exception{
&&&&&&&&Connection con=
&&&&&&&&try{
&&&&&&&&&&&&con=dbUtil.getCon();
&&&&&&&&&&&&JSONObject result=new JSONObject();
&&&&&&&&&&&&int delNums=patientDao.patientDelete(con, delIds);
&&&&&&&&&&&&if(delNums&0){
&&&&&&&&&&&&&&& result.put(&success&, &true&);
&&&&&&&&&&&&&&& result.put(&delNums&, delNums);
&&&&&&&&&&&&}else{
&&&&&&&&&&&&&&& result.put(&errorMsg&, &删除失败&);
&&&&&&&&&&&&}
&&&&&&&&&&&&ResponseUtil.write(ServletActionContext.getResponse(), result);
&&&&&&&&}catch(Exception e){
&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&}finally{
&&&&&&&&&&&&try {
&&&&&&&&&&&&&&& dbUtil.closeCon(con);
&&&&&&&&&&&&} catch (Exception e) {
&&&&&&&&&&&&&&& // TODO Auto-generated catch block
&&&&&&&&&&&&&&& e.printStackTrace();
&&&&&&&&&&&&}
&&& //下拉框赋值 如果是管理员可以查询所有用户的患者,如果是用户只能显示当前用户患者
&&& //输出excel表格(xls)
&&& public void exportPatient() throws Exception{
&&&&&&&&// 创建Excel的工作书册 Workbook,对应到一个excel文档
&&&&&&&&HSSFWorkbook wb = new HSSFWorkbook();
&&&&&&&&// 创建Excel的工作sheet,对应到一个excel文档的tab
&&&&&&&&HSSFSheet sheet = wb.createSheet(&sheet1&);
&&&&&&&&// 设置excel每列宽度
&&&&&&&&sheet.setColumnWidth(0, 4000);
&&&&&&&&sheet.setColumnWidth(1, 3500);
&&&&&&&&// 创建字体样式
&&&&&&&&HSSFFont font = wb.createFont();
&&&&&&&&font.setFontName(&Verdana&);
&&&&&&&&font.setBoldweight((short) 100);
&&&&&&&&font.setFontHeight((short) 300);
&&&&&&&&font.setColor(HSSFColor.BLUE.index);
&&&&&&&&// 创建单元格样式
&&&&&&&&HSSFCellStyle style = wb.createCellStyle();
&&&&&&&&style.setAlignment(HSSFCellStyle.ALIGN_CENTER);
&&&&&&&&style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
&&&&&&&&style.setFillForegroundColor(HSSFColor.LIGHT_TURQUOISE.index);
&&&&&&&&style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
&&&&&&&&// 设置边框
&&&&&&&&style.setBottomBorderColor(HSSFColor.RED.index);
&&&&&&&&style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
&&&&&&&&style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
&&&&&&&&style.setBorderRight(HSSFCellStyle.BORDER_THIN);
&&&&&&&&style.setBorderTop(HSSFCellStyle.BORDER_THIN);
&&&&&&&&style.setFont(font);// 设置字体
&&&&&&&&style.setWrapText(true);// 自动换行
&&&&&&&&// 创建Excel的sheet的一行
&&&&&&&&HSSFRow row = sheet.createRow(0);
&&&&&&&&row.setHeight((short) 500);// 设定行的高度
&&&&&&&&HSSFCell cell=
&&&&&&&&// 创建一个Excel的单元格
&&&&&&&&String[] cellTitle = {&编号&, &患者姓名&, &手续状态&,&调查地点&, &调查结论&, &调查日期&,&处理日期&,&家庭住址&};&&&
&&&&&&&&for (int i = 0; i & cellTitle. i++) {
&&&&&&&&&&&&cell = row.createCell(i);
&&&&&&&&&&&&// 给Excel的单元格设置样式和赋值
&&&&&&&&&&&&cell.setCellStyle(style);
&&&&&&&&&&&&cell.setCellValue(cellTitle[i]);
&&&&&&&&// 获取Session
&&&&&&&&HttpSession session=request.getSession();&&&
&&&&&&&&//链接connection
&&&&&&&&Connection con=
&&&&&&&&if(patient==null){
&&&&&&&&&&&&patient=new Patient();
&&&&&&&&//将查询条件赋值给patient对象
&&&&&&&&if(s_patientName!=null){
&&&&&&&&&&&&patient.setPatientName(s_patientName);
&&&&&&&&&&&&patient.setZhuangtai(zhuang);
&&&&&&&&&&&&patient.setJielun(jie);
&&&&&&&&ResultSet rs=
&&&&&&&&try{
&&&&&&&&&&&&con=dbUtil.getCon();
&&&&&&&&&&&&rs=patientDao.patientList(con, null,patient,zhuang,jie);
&&&&&&&&&&&&int rowIndex=1;
&&&&&&&&&&&&while(rs.next()){
&&&&&&&&&&&&&&& row = sheet.createRow(rowIndex++);
&&&&&&&&&&&&&&& cell = row.createCell(0);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getInt(&patientId&));
&&&&&&&&&&&&&&& cell = row.createCell(1);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&patientName&));
&&&&&&&&&&&&&&& cell = row.createCell(2);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&zhuangtai&));
&&&&&&&&&&&&&&& cell = row.createCell(3);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&didian&));
&&&&&&&&&&&&&&& cell = row.createCell(4);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&jielun&));
&&&&&&&&&&&&&&& cell = row.createCell(5);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&birthday&));
&&&&&&&&&&&&&&& cell = row.createCell(6);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&chuli&));
&&&&&&&&&&&&&&& cell = row.createCell(7);
&&&&&&&&&&&&&&& cell.setCellValue(rs.getString(&patientDesc&));
&&&&&&&&&&&&&&&
&&&&&&&&&&&&}
&&&&&&&&&&&&
&&&&&&&&String exportFileName = &patient.xls&;
&&&&&&&&ServletActionContext.getResponse().setHeader(&Content-Disposition&, &filename=& + new String((exportFileName).getBytes(), &ISO8859-1&));//设定输出文件头
&&&&&&&&ServletActionContext.getResponse().setContentType(&application/vnd.ms-charset=UTF-8&);// 定义输出类型
&&&&&&&&OutputStream out = ServletActionContext.getResponse().getOutputStream();
&&&&&&&&wb.write(out);
&&&&&&&&out.flush();
&&&&&&&&out.close();
&&&&&&&&}catch(Exception e){
&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&}finally{
&&&&&&&&&&&&try {
&&&&&&&&&&&&&&& dbUtil.closeCon(con);
&&&&&&&&&&&&} catch (Exception e) {
&&&&&&&&&&&&&&& // TODO Auto-generated catch block
&&&&&&&&&&&&&&& e.printStackTrace();
&&&&&&&&&&&&}
&&&&&&&&&&&&
&&& @Override
&&& public void setServletRequest(HttpServletRequest request) {
&&&&&&&&// TODO Auto-generated method stub
&&&&&&&&this.request=
&&&查询的功能就是实现不了&&&也不知道哪的问题&&& 各位大神帮帮忙看看&&谢谢
[此贴子已经被作者于 23:35编辑过]
搜索更多相关主题的帖子:
&&&&&&&&&&
来 自:湖南
等 级:版主
威 望:87
帖 子:1518
专家分:6611
&&得分:10&
程序代码: /**
&&&&&* 得到patient查询结果
&&&&&* @param con
&&&&&* @param pageBean
&&&&&* @param patient
&&&&&* @return
&&&&&* @throws Exception
&&& public ResultSet patientList(Connection con,PageBean pageBean,Patient patient,String zhuang,String jie)throws Exception{
&&&&&&&&StringBuffer sb=new StringBuffer(&select * from t_patient&);
&&&&&&&&if(StringUtil.isNotEmpty(patient.getPatientName())){
&&&&&&&&&&&&sb.append(& and patientName like '%&+patient.getPatientName()+&%'&);
&&&&&&&&//分页
&&&&&&&&if(pageBean!=null){
&&&&&&&&&&&&sb.append(& limit &+pageBean.getStart()+&,&+pageBean.getRows());
&&&&&&&&PreparedStatement pstmt=con.prepareStatement(sb.toString());
&&&&&&&&return pstmt.executeQuery();
是这个查询吗?
不过是爱情,可以走很久
等 级:新手上路
回复 2楼 林月儿
对呀!不知道怎么回事!
来 自:湖南
等 级:版主
威 望:87
帖 子:1518
专家分:6611
回复 3楼 ggskyle
先试试sql语句对不对 ,再debug调试看看调用sql语句的参数是否正常
不过是爱情,可以走很久
等 级:新手上路
回复 4楼 林月儿
sql语句我试过没有问题&&&因是自学debug我不太会用&&我能给您发过去整个项目,您帮忙给看看行么&&
[此贴子已经被作者于 23:05编辑过]
来 自:湖南
等 级:版主
威 望:87
帖 子:1518
专家分:6611
回复 5楼 ggskyle
可以吧,不会再问问前辈
不过是爱情,可以走很久
等 级:新手上路
回复 6楼 林月儿
谢谢了&&&我就用了其中的patientInfoManage的板块&&其他的没有用
[此贴子已经被作者于 23:35编辑过]
附件: 您没有浏览附件的权限,请
来 自:湖南
等 级:版主
威 望:87
帖 子:1518
专家分:6611
回复 7楼 ggskyle
初步测了下dao层的方法,没什么问题。试着传null值进去,报空指针异常。这个可能性排查清楚再说吧。
变量名命名还是要有意义的好
异常处的处理最好打log
dao那边以及其他地方(比如excel等文件处理)共通程度还可以再高,而且上层接口也没写,建议改成接口定义加下层实现的常规写法。
数据解析处理json用的jar,建议换成gson.jar或版本更高
sql语句部分,关键字大小有交替出现,统一改为大写比较方便解析。
上面的建议偏后台,对后面的编码效率提高有帮助。
异常处理很重要,错误信息有迹可循
前台呢,可以效仿后台进行分层,按对象或功能分层。
ui的文件命名正式版本要调整了
js的操作可以写到js文件里,css样式定义到.css文件里。让jsp文件代码精简逻辑清晰
相应的请求,可以的话,struts.xml那边使用通配符减少action数量
[此贴子已经被作者于 09:55编辑过]
不过是爱情,可以走很久
来 自:湖南
等 级:版主
威 望:87
帖 子:1518
专家分:6611
先不管我提的建议,先实现功能吧。
[此贴子已经被作者于 20:38编辑过]
不过是爱情,可以走很久
等 级:新手上路
呵呵&&谢谢你的建议我会注意的&&谢谢
关键是功能一直实现不了&&呵呵&&我的感觉是Dao层接受的赋值是空&&
版权所有,并保留所有权利。
Powered by , Processed in 0.096237 second(s), 8 queries.
Copyright&, BCCN.NET, All Rights Reserved}

我要回帖

更多关于 汽车电路图讲解 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信