⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a.java

📁 医院药品管理范例
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
   String oldNhiPrice = oldPriceData.getReturnData("NHI_PRICE",0).toString();
   System.out.println("新自费" + Double.parseDouble(newOwnPrice));
   System.out.println("旧自费" + Double.parseDouble(oldOwnPrice));
   System.out.println("新医保" + Double.parseDouble(newNhiPrice));
   System.out.println("旧医保" + Double.parseDouble(oldNhiPrice));
   if((Double.parseDouble(newOwnPrice)==Double.parseDouble(oldOwnPrice))&&(Double.parseDouble(newNhiPrice)==Double.parseDouble(oldNhiPrice))){
     return true;
   }
   return false;
 }
 /**
  * 关闭方法
  */
 public void onClose(){
   System.out.println("关闭");
   this.getFrame().callEventListener(SystemMenu.CLOSE_TAG, "");
 }
 /**
   * 获得树
   * @return SysFeeTree
   */
  public SysFeeTree getTree(String tag){
    return (SysFeeTree)this.getComponent(tag);
  }
 /**
  * 树点击事件
  */
 public void onTree(){
   System.out.println("树点击事件");
   IFeeClassify feeClassify = (IFeeClassify)getTree("TREE").getValue();
   String freeCode = feeClassify.getID();
   System.out.println("当前结点ID:"+freeCode);
   this.treeStringId = freeCode;
   ActionParm action = new ActionParm();
   if(this.getRadioButton("ALL").isSelected()){
     action = this.getSysFeeAllData(freeCode);
     if(action==null){
       return;
     }
     this.initGridData(action);
     System.out.println("最后数据:"+action);
   }
   if(this.getRadioButton("STATR").isSelected()){
     System.out.println("statr");
     action = this.getSysFeeStatrData(freeCode);
     if(action==null){
       return;
     }
     this.initGridData(action);
     System.out.println("最后数据:"+action);
   }
   if(this.getRadioButton("END").isSelected()){
     System.out.println("end");
     action = this.getSysFeeEndData(freeCode);
     if(action==null){
       return;
     }
     this.initGridData(action);
     System.out.println("最后数据:"+action);
   }
 }
 /**
  * 初始化GRID
  * @param parm ActionParm
  */
 public void initGridData(ActionParm parm){
   System.out.println("初始化GRID:"+parm);
   Vector gd = new Vector();
   gd = parm.getReturnVector("ORDER_CODE,ORDER_DESC,DESCRIPTION,OWN_PRICE,UNIT_CODE");
   System.out.println("VECTOR数据:"+gd);
   this.getGrid("GRID1").setValue(gd);
 }
 /**
  * 获得GRID控件
  * @param tag String
  * @return DyGrid
  */
 public DyGrid getGrid(String tag){
   return (DyGrid)this.getComponent(tag);
 }
 /**
  * 获得SYS_FEE全部数据
  * @param freeCode String
  * @return ActionParm
  */
 public ActionParm getSysFeeAllData(String freeCode){
   ActionParm parm = new ActionParm();
   parm.setCommitData("OPERATOR_OBJECT",SysManager.getInstance().getOperator());
   parm.setCommitData("ORDER_CODE",freeCode);
   ActionParm action = new ActionParm();
   action = SysManager.getInstance().getSysFeeAllData(parm);
   if (action.getErrCode() == -1) {
     this.messageBox("参数不能为空!");
     return null;
   }
   if (action.getErrCode() == -2) {
     this.messageBox("查询不到数据!");
     return null;
   }
   return action;
 }
 /**
  * 获得SYS_FEE启用数据
  * @param freeCode String
  * @return ActionParm
  */
 public ActionParm getSysFeeStatrData(String freeCode){
   ActionParm parm = new ActionParm();
   parm.setCommitData("OPERATOR_OBJECT", SysManager.getInstance().getOperator());
   parm.setCommitData("ORDER_CODE", freeCode);
   parm.setCommitData("DATE_TIME",SysManager.getInstance().getOPTDate());
   System.out.println("时间:"+SysManager.getInstance().getOPTDate()+"提交数据:"+parm);
   ActionParm action = new ActionParm();
   action = SysManager.getInstance().getSysFeeStatrData(parm);
   if (action.getErrCode() == -1) {
     this.messageBox("参数不能为空!");
     return null;
   }
   if (action.getErrCode() == -2) {
     this.messageBox("查询不到数据!");
     return null;
   }
   return action;
 }
 /**
  * 获得SYS_FEE停用数据
  * @param freeCode String
  * @return ActionParm
  */
 public ActionParm getSysFeeEndData(String freeCode){
   ActionParm parm = new ActionParm();
   parm.setCommitData("OPERATOR_OBJECT", SysManager.getInstance().getOperator());
   parm.setCommitData("ORDER_CODE", freeCode);
   parm.setCommitData("DATE_TIME",SysManager.getInstance().getOPTDate());
   System.out.println("时间:"+SysManager.getInstance().getOPTDate());
   ActionParm action = new ActionParm();
   action = SysManager.getInstance().getSysFeeEndData(parm);
   if (action.getErrCode() == -1) {
     this.messageBox("参数不能为空!");
     return null;
   }
   if (action.getErrCode() == -2) {
     this.messageBox("查询不到数据!");
     return null;
   }
   return action;
 }

 /**
  * 获得RadioButton
  * @param tag String
  * @return DyRadioButton
  */
 public DyRadioButton getRadioButton(String tag){
   return (DyRadioButton)this.getComponent(tag);
 }
 /**
  * 全部点击事件
  */
 public void onAll(){
   System.out.println("全部");
   this.initGridData(this.getSysFeeAllData(this.treeStringId));

 }
 /**
  * 启用点击事件
  */
 public void onStatr(){
   System.out.println("启用");
    this.initGridData(this.getSysFeeStatrData(this.treeStringId));
 }
 /**
  * 停用点击事件
  */
 public void onEnd(){
   System.out.println("停用");
    this.initGridData(this.getSysFeeEndData(this.treeStringId));
 }
 /**
  * GRID监听事件
  */
 public void onGridEvent() {
   System.out.println("点击GRID");
   int count = this.getGrid("GRID1").getTable().getSelectedRow();
   this.orderCodeStr = this.getGrid("GRID1").getCellValueAt(count,0);
   //药品费用初始化数据方法
   this.queryOnePage(count);
   //药品属性初始化数据方法
   this.queryTwoPage(count);
 }
 /**
  * 第二个页签属性页签的查询事件
  * @param count int
  */
 public void queryTwoPage(int count){
   System.out.println("当前ORDER_CODE:"+this.orderCodeStr);
   ActionParm action = new ActionParm();
   action.setCommitData("OPERATOR_OBJECT",SysManager.getInstance().getOperator());
   action.setCommitData("ORDER_CODE",this.getGrid("GRID1").getCellValueAt(count,0));
   ActionParm result = SysManager.getInstance().queryTwoPage(action);
   System.out.println("单击返回数据:"+result);
   this.setPhaBaseAction(result);
   //初始化药品属性的数据
   this.setPhaTwoPageData(result);
   this.setUserRoelOnWindow();
   this.initToolBar(new Boolean(true));
   System.out.println("全局变量药品属性集合:"+this.phaBaseAction);
 }
 /**
  * 第一个页签费用页签的查询事件
  * @param count int
  * @param orderCode String
  */
 public void queryOnePage(int count){
   System.out.println("当前ORDER_CODE:"+this.orderCodeStr);
   ActionParm action = new ActionParm();
   action.setCommitData("OPERATOR_OBJECT",SysManager.getInstance().getOperator());
   action.setCommitData("ORDER_CODE",this.getGrid("GRID1").getCellValueAt(count,0));
   ActionParm result = SysManager.getInstance().onGridEvent(action);
   System.out.println("单击返回数据:"+result);
   this.setPhaAction(result);
   this.setEditValue(result);
   this.setUserRoelOnWindow();
   this.initToolBar(new Boolean(true));
   System.out.println("全局变量药品费用集合:"+this.phaAction);
 }
 /**
  * 设置第二个页签的数据
  */
 public void setPhaTwoPageData(ActionParm parm){
   if (parm == null) {
//     this.messageBox("返回数据为空!");
     return;
   }
   if (parm.getErrCode() < 0) {
//     this.messageBox("查询参数错误!");
     return;
   }
   //药品分类
   this.setValue("PHATYPE",parm.getReturnData("TYPE_CODE",0).toString());
   //开药单位
   this.setValue("KYUINTCOBO",parm.getReturnData("MEDI_UNIT",0).toString());
   //发药单位2
   this.setValue("FYUNITCOMBO2",parm.getReturnData("DISPENSE_UNIT",0).toString());
   //发药单位1
   this.setValue("FYUNITCOMBO",parm.getReturnData("DISPENSE_UNIT",0).toString());
   //库存单位
   this.setValue("STOCKUNIT",parm.getReturnData("STOCK_UNIT",0).toString());
   //剂型
   this.setValue("JX",parm.getReturnData("DOSE_CODE",0).toString());
   //频率
   this.setValue("PL",parm.getReturnData("FREQ_CODE",0).toString());
   //途径
   this.setValue("TJ",parm.getReturnData("ROUTE_CODE",0).toString());
   //缺药原因
   this.setValue("QYYY",parm.getReturnData("LACK_REASON_CODE",0).toString());
   //管制药品级数
   this.setValue("GZYPJS",parm.getReturnData("CTRLDRUGCLASS_CODE",0).toString());
   //抗生素等级
   this.setValue("KSSDJ",parm.getReturnData("ANTIBIOTIC_CODE",0).toString());
   //包药机门诊
   this.setValue("BYJO",parm.getReturnData("DRUG_OPD_MACHINE",0).toString());
   //包药机住院
   this.setValue("BYJI",parm.getReturnData("DRUG_IPD_MACHINE",0).toString());
   if(parm.getReturnData("PHA_TYPE",0).toString().equals("W")){
     this.getRadioButton("XY").setSelected(true);
   }else if(parm.getReturnData("PHA_TYPE",0).toString().equals("G")){
     this.getRadioButton("ZCY").setSelected(true);
   }else if(parm.getReturnData("PHA_TYPE",0).toString().equals("C")){
     this.getRadioButton("ZCAOY").setSelected(true);
   }
   //发药单位
   this.setValue("FYDW",parm.getReturnData("END_QTY",0).toString());
   //开药单位
   this.setValue("KYDW",parm.getReturnData("START_QTY",0).toString());
   //发药单位2
   this.setValue("FYDWEDIT",parm.getReturnData("START_COUNT",0).toString());
   //库存单位
   this.setValue("KCDWEDIT",parm.getReturnData("STOCK_COUNT",0).toString());
   //常用天数
   this.setValue("CYTS",parm.getReturnData("TAKE_DAYS",0).toString());
   //常用剂型
   this.setValue("CYJX",parm.getReturnData("TAKE_QTY",0).toString());
   //默认总量
   this.setValue("DUFROUTCOUNT",parm.getReturnData("DEFA_TOTQTY",0).toString());
   //开始日期
   this.setValue("STDATE",parm.getReturnData("LACK_START_DATE",0).toString());
   //退出日期
   this.setValue("EXITDATE",parm.getReturnData("LACK_END_DATE",0).toString());
   //缺药设置
   if(parm.getReturnData("LACK_FLG",0).toString().equals("Y")){
     this.getCheckBox("QYSZ").setSelected(true);
   }else if(parm.getReturnData("LACK_FLG",0).toString().equals("N")){
     this.getCheckBox("QYSZ").setSelected(false);
   }
   //管制药品
   if(parm.getReturnData("CTRL_FLG",0).toString().equals("Y")){
     this.getCheckBox("GZYP").setSelected(true);
   }else if(parm.getReturnData("CTRL_FLG",0).toString().equals("N")){
     this.getCheckBox("GZYP").setSelected(false);
   }
   //包药机使用
   if(parm.getReturnData("ATC_FLG",0).toString().equals("Y")){
     this.getCheckBox("BYJSY").setSelected(true);
   }
   else if (parm.getReturnData("ATC_FLG", 0).toString().equals("N")) {
     this.getCheckBox("BYJSY").setSelected(false);
   }
   //可拨半
   if (parm.getReturnData("HALF_USE_FLG", 0).toString().equals("Y")) {
     this.getCheckBox("KBB").setSelected(true);
   }
   else if (parm.getReturnData("HALF_USE_FLG", 0).toString().equals("N")) {
     this.getCheckBox("KBB").setSelected(false);
   }
   //可退药
   if (parm.getReturnData("UDD_REFUND_FLG", 0).toString().equals("Y")) {
     this.getCheckBox("KTY").setSelected(true);
   }
   else if (parm.getReturnData("UDD_REFUND_FLG", 0).toString().equals("N")) {
     this.getCheckBox("KTY").setSelected(false);
   }
   //不可连续使用(开封既丢)
   if (parm.getReturnData("REUSE_FLG", 0).toString().equals("Y")) {
     this.getCheckBox("BKLXSY").setSelected(true);
   }
   else if (parm.getReturnData("REUSE_FLG", 0).toString().equals("N")) {
     this.getCheckBox("BKLXSY").setSelected(false);
   }
   //不可零星用药(门诊)
   if (parm.getReturnData("ODD_FLG", 0).toString().equals("Y")) {
     this.getCheckBox("BKLXYYO").setSelected(true);
   }
   else if (parm.getReturnData("ODD_FLG", 0).toString().equals("N")) {
     this.getCheckBox("BKLXYYO").setSelected(false);
   }
   //不可零星用药(住院)
   if (parm.getReturnData("UDCARRY_FLG", 0).toString().equals("Y")) {
     this.getCheckBox("BKLXYYI").setSelected(true);
   }
   else if (parm.getReturnData("UDCARRY_FLG", 0).toString().equals("N")) {
     this.getCheckBox("BKLXYYI").setSelected(false);
   }
 }
 /**
  * 设置药品费用权限
  */
 public void setPhaPricePopedom(){
   this.initToolBarAdd(new Boolean(true));
   this.getDatePlus("DATE_STATR").setEnabled(false);
   this.getEdit("MEDICINE_SAFETY").setEnabled(false);
   this.getDyNumberic("YBJG").setEnabled(false);
   this.getComboBox("GIVETYPE").setEnabled(false);
   this.getDyNumberic("ZFBL").setEnabled(false);
   this.getDyNumberic("ZFJE").setEnabled(false);
   this.getEdit("IYBM").setEnabled(false);
   this.getEdit("OYBM").setEnabled(false);
   this.getEdit("EYBM").setEnabled(false);
   //药品分类
   this.getComboBox("PHATYPE").setEnabled(false);
   //开药单位
   this.getComboBox("KYUINTCOBO").setEnabled(false);
   //发药单位2
   this.getComboBox("FYUNITCOMBO2").setEnabled(false);
   //发药单位1
   this.getComboBox("FYUNITCOMBO").setEnabled(false);
   //库存单位
   this.getComboBox("STOCKUNIT").setEnabled(false);
   //剂型
   this.getComboBox("JX").setEnabled(false);
   //频率
   this.getComboBox("PL").setEnabled(false);
   //途径
   this.getComboBox("TJ").setEnabled(false);
   //缺药原因
   this.getComboBox("QYYY").setEnabled(false);
   //管制药品级数
   this.getComboBox("GZYPJS").setEnabled(false);
   //抗生素等级
   this.getComboBox("KSSDJ").setEnabled(false);
   //包药机门诊
   this.getComboBox("BYJO").setEnabled(false);
   //包药机住院
   this.getComboBox("BYJI").setEnabled(false);
   //西药
   this.getRadioButto

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -