**
11、实现点击叶签某行数据实现弹框并输入值
**
package nc.ui.hfet.hfet_declearinfomt.ace.action;
import java.awt.event.ActionEvent;
import java.util.List;
import javax.swing.ListSelectionModel;
import nc.bs.framework.common.NCLocator;
import nc.itf.uap.IUAPQueryBS;
import nc.jdbc.framework.processor.BeanListProcessor;
import nc.jdbc.framework.processor.BeanProcessor;
import nc.ui.pubapp.uif2app.model.BillManageModel;
import nc.ui.pubapp.uif2app.view.BillListView;
import nc.ui.pubapp.uif2app.view.ShowUpableBillForm;
import nc.ui.uif2.NCAction;
import nc.ui.hfet.hfet_declearinfomt.ace.action.TrainQueryDialog;
import nc.vo.hfet.hfet_declearinfomt.AggHfet_declearinfomt;
import nc.vo.hfet.hfet_declearinfomt.Hfet_declearinfomt;
import nc.vo.hfet.hfet_declearinfomt.Hfet_declearzg;
import nc.vo.hfet.hfet_declearinfomt.Hfet_declearzg_dt1;
import nc.vo.pub.CircularlyAccessibleValueObject;
import nc.vo.pub.lang.UFBoolean;
public class pingguiAction extends NCAction {
private static final long serialVersionUID = 1L;
private ShowUpableBillForm editor;
private BillManageModel model;
private BillListView listView;
public pingguiAction(){
setCode("ExcelOutput");
setBtnName("拼柜分摊维护");
}
//由于开发系统没有数据暂时用pk_psndoc来代替工号
@Override
public void doAction(ActionEvent arg0) throws Exception {
IUAPQueryBS server = NCLocator.getInstance().lookup(IUAPQueryBS.class);
AggHfet_declearinfomt aggvo = (AggHfet_declearinfomt) getModel().getSelectedData();
if(aggvo==null){
throw new Exception("请选择数据后操作!");
}
Hfet_declearinfomt headvo = aggvo.getParentVO();
String pk_hfet_declearinfomt = headvo.getPk_hfet_declearinfomt();
int kk = listView.getBillListPanel().getBodyTable("fk_hfet_declearzg").getSelectedRow();
if(kk==-1){
int r1 = getEditor().getBillCardPanel().getBillTable("fk_hfet_declearzg").getSelectedRow();
if(r1==-1){
throw new Exception("请在<列表界面>或<卡片界面>选择装柜信息行数据再操作!");
}else{
Hfet_declearzg Hfet_declearzg = (nc.vo.hfet.hfet_declearinfomt.Hfet_declearzg) editor.getBillCardPanel().getBodyPanel("fk_hfet_declearzg").getTableModel().getBodyValueRowVO(r1, Hfet_declearzg.class.getName());
String pid = Hfet_declearzg.getPk_hfet_declearzg();
if(Hfet_declearzg.getSfpg()==null){
throw new Exception("当前选择行没有勾选是否拼柜!");
}else{
if(Hfet_declearzg.getSfpg().equals(new UFBoolean(false))){
throw new Exception("当前选择行没有勾选是否拼柜!");
}
}
TrainQueryDialog dialog = new TrainQueryDialog("2",Hfet_declearzg.getPk_hfet_declearzg()); //new 一个
dialog.showModal();
//List<Hfet_declearzg_dt1> Hfet_declearzg_dt1s = ()server.executeQuery(sql, new BeanListProcessor(Hfet_declearzg_dt1.class));
}
}else{
String sql = "select * from (select a.*,row_number() over(PARTITION by pk_hfet_declearinfomt order by pk_hfet_declearinfomt ) rn from hfet_declearzg a where nvl(dr, 0) = 0 and pk_hfet_declearinfomt = '"+pk_hfet_declearinfomt+"') where rn = '"+(kk+1)+"'";
Hfet_declearzg Hfet_declearzg = (Hfet_declearzg)server.executeQuery(sql,new BeanProcessor(Hfet_declearzg.class));
if(Hfet_declearzg.getSfpg()==null){
throw new Exception("当前选择行没有勾选是否拼柜!");
}else{
if(Hfet_declearzg.getSfpg().equals(new UFBoolean(false))){
throw new Exception("当前选择行没有勾选是否拼柜!");
}
}
TrainQueryDialog dialog = new TrainQueryDialog("2",Hfet_declearzg.getPk_hfet_declearzg()); //new 一个
dialog.showModal();
//String sql1 = "select *from hfet_declearzg a where a.pk_hfet_declearinfomt='"+pk_hfet_declearinfomt+"' and dr=0 ;";
}
// ListSelectionModel ListSelectionModel = listView.getBillListPanel().getBodyTable("fk_hfet_declearzg").getSelectionModel();
/* SendDialog send = new SendDialog();
send.showModal(); //显示
String wzlb = send.getSelectedlb();*/
//获取按钮的值,如果取消则提示
/*if(send.getOkCanel()==null){
MessageDialog.showWarningDlg(null, "提示", "取消成功!");
return;
}else{
if(send.getOkCanel().equals("取消")){
MessageDialog.showWarningDlg(null, "提示", "取消成功!");
return;
}
}*/
}
public ShowUpableBillForm getEditor() {
return editor;
}
public void setEditor(ShowUpableBillForm editor) {
this.editor = editor;
}
public BillManageModel getModel() {
return model;
}
public void setModel(BillManageModel model) {
this.model = model;
}
public BillListView getListView() {
return listView;
}
public void setListView(BillListView listView) {
this.listView = listView;
}
}