?? a.java
字號:
package ui.sys;
import java.util.*;
import com.dy.action.*;
import com.dy.control.*;
import com.dy.event.*;
import com.dy.ui.*;
import com.tiis.util.Date.*;
import jdo.fee.*;
import jdo.sys.*;
import manager.*;
import pha.*;
import system.menu.*;
import ui.publics.combo.*;
import ui.publics.tree.*;
import action.util.AppDate;
import ind.*;
import javax.swing.JOptionPane;
import java.awt.Component;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author WangM
* @version 3.0
*/
public class SysPhaPriceEnactmantControl
extends DyControl {
public final static String ACTION_CLASS_NAME = "action.sys.SysAction";
//全局結(jié)點(diǎn)記錄結(jié)點(diǎn)ID
private String treeStringId="";
//全局ORDER_CODE
private String orderCodeStr="";
//獲得當(dāng)前編輯數(shù)據(jù)
private ActionParm phaAction;
//獲得藥品屬性編輯數(shù)據(jù)
private ActionParm phaBaseAction;
/**
* 得到動作對象
* @alias 得到動作對象
* @return DyAction 返回動作對象<br>
* 功能說明:<br>
* 1、將對象數(shù)據(jù)轉(zhuǎn)換為ActionParm類型<br>
*/
private DyAction getAction() {
DyAction actionObject = new DyAction();
actionObject.setClassName(ACTION_CLASS_NAME);
return actionObject;
}
public SysPhaPriceEnactmantControl() {
}
/**
* 頁面初始化方法
*/
public void onInitParm() {
Vector v =(Vector)this.getParameter();
this.setValue("ROLE",v.get(1).toString());
System.out.println("初始化Vector:"+v);
this.pageInit();
}
/**
* 初始化事件方法
*/
public void onInit() {
super.onInit();
//新增
addEventCallMethod(SysPhaPriceEnactmantMenuBar.ADD_TAG,DyEventListener.ActionPerformed,"onAdd");
//清空
addEventCallMethod(SysPhaPriceEnactmantMenuBar.CLEAN_TAG,DyEventListener.ActionPerformed,"onClean");
//導(dǎo)出Excel
addEventCallMethod(SysPhaPriceEnactmantMenuBar.EXPORT_TAG,DyEventListener.ActionPerformed,"onExport");
//保存
addEventCallMethod(SysPhaPriceEnactmantMenuBar.SAVE_TAG,DyEventListener.ActionPerformed,"onSave");
//關(guān)閉
addEventCallMethod(SysPhaPriceEnactmantMenuBar.CLOSE_TAG,DyEventListener.ActionPerformed,"onClose");
//樹點(diǎn)擊事件
addEventCallMethod("TREE",ActionPerformed,"onTree");
//全部點(diǎn)擊事件
addEventCallMethod("ALL",ActionPerformed,"onAll");
//啟用點(diǎn)擊事件
addEventCallMethod("STATR",ActionPerformed,"onStatr");
//停用點(diǎn)擊事件
addEventCallMethod("END",ActionPerformed,"onEnd");
//GRID監(jiān)聽事件
addEventCallMethod("GRID1",ActionPerformed,"onGridEvent");
//轉(zhuǎn)出單擊事件
addEventCallMethod("ZC",ActionPerformed,"onZCEvent");
//開單即執(zhí)行單擊事件
addEventCallMethod("KDJZX",ActionPerformed,"onKDJZXEvent");
//歷史明細(xì)單擊事件
addEventCallMethod("HISTORY_DATA",ActionPerformed,"onHistoryCheck");
//藥品名稱回車事件
addEventCallMethod("PHYSIC_NAME",ActionPerformed,"onFocusLost");
//別名回車事件
addEventCallMethod("OTHER_NAME",ActionPerformed,"onFocusLostBM");
//自費(fèi)價格回車事件
addEventCallMethod("ZFJG",ActionPerformed,"onZFPrice");
//缺藥設(shè)置單擊事件
addEventCallMethod("QYSZ",ActionPerformed,"onPhaType");
//管制藥品單擊事件
addEventCallMethod("GZYP",ActionPerformed,"onPhaManager");
//單位換算單擊事件
addEventCallMethod("UNITBUTTON",ActionPerformed,"onUnitChange");
//庫存單位換算單位單擊事件
addEventCallMethod("STOCKBUTTON",ActionPerformed,"onUnitStockChange");
//CHECK啟用事件
addEventCallMethod("PRICESTATR",ActionPerformed,"onQYDate");
}
/**
* 啟用CHECK事件
*/
public void onQYDate(){
System.out.println("啟用事件");
if(this.getCheckBox("PRICESTATR").isSelected()){
this.setValue("DATE_END","99991231");
}else{
this.setValue("DATE_END",manager.SysManager.getInstance().getOPTDate());
}
}
/**
* 庫存單位換算單位事件
*/
public void onUnitStockChange(){
System.out.println("庫存單位換算單位事件");
if(this.orderCodeStr.length()<=0){
this.messageBox("請選擇一筆藥品記錄!");
return;
}
INDTransUnit_M INDTransUnit_M1 = new INDTransUnit_M("1",
this.phaBaseAction.getReturnData("ORDER_CODE",0).toString(),
this.phaBaseAction.getReturnData("DISPENSE_UNIT",0).toString(),
this.phaBaseAction.getReturnData("STOCK_UNIT",0).toString().length()<=0?this.getValue("STOCKUNIT"):this.phaBaseAction.getReturnData("STOCK_UNIT",0).toString());
}
/**
* 單位換算事件
*/
public void onUnitChange(){
System.out.println("單位換算事件");
if(this.orderCodeStr.length()<=0){
this.messageBox("請選擇一筆藥品記錄!");
return;
}
String[] Qu_Data = {this.phaBaseAction.getReturnData("ORDER_CODE",0).toString(),//藥品代碼
this.phaBaseAction.getReturnData("MEDI_UNIT",0).toString(),//開藥
this.phaBaseAction.getReturnData("DISPENSE_UNIT",0).toString()//發(fā)藥
};
Vector Unit_Data = new Vector();
Unit_Data.add(Qu_Data);
PHATransUnit_M PHATransUnit_M1= new PHATransUnit_M(Unit_Data);
}
/**
* 管制藥品單擊事件
*/
public void onPhaManager(){
System.out.println("管制藥品單擊事件");
if(!this.getCheckBox("GZYP").isSelected()){
this.getComboBox("GZYPJS").setEnabled(false);
}else{
this.getComboBox("GZYPJS").setEnabled(true);
}
}
/**
* 缺藥設(shè)置單擊事件
*/
public void onPhaType(){
System.out.println("缺藥時間單擊事件");
if(!this.getCheckBox("QYSZ").isSelected()){
this.getDatePlus("STDATE").setEnabled(false);
this.getDatePlus("EXITDATE").setEnabled(false);
this.getComboBox("QYYY").setEnabled(false);
}else{
this.getDatePlus("STDATE").setEnabled(true);
this.getDatePlus("EXITDATE").setEnabled(true);
this.getComboBox("QYYY").setEnabled(true);
}
}
/**
* 自費(fèi)價格回車事件
*/
public void onZFPrice(){
this.getDyNumberic("YBJG").setValue(this.getValue("ZFJG"));
this.getDyNumberic("ZFZGJG").setValue(this.getValue("ZFJG"));
}
/**
* 藥品別名事件
*/
public void onFocusLostBM(){
System.out.println("別名拼音碼");
this.setValue("OTHER_NAMEPY",this.creatPyCode(this.getValue("OTHER_NAME").toUpperCase()));
}
/**
* 藥品名稱失去焦點(diǎn)事件
*/
public void onFocusLost(){
System.out.println("拼音碼");
this.setValue("EDH_CODE",this.creatPyCode(this.getValue("PHYSIC_NAME").toUpperCase()));
}
/**
* 組成拼音碼
* @param pyCode String
* @return String
*/
public String creatPyCode(String pyCode){
ActionParm result = new ActionParm();
result.setCommitData("NAME_PYCODE",pyCode);
return SysManager.getInstance().creatPyCode(result);
}
/**
* 歷史明細(xì)點(diǎn)擊事件
*/
public void onHistoryCheck(){
System.out.println("歷史明細(xì)");
if(this.orderCodeStr.trim().length()<=0){
this.messageBox("請在GRID上選擇一個要查看的藥品!");
return;
}
Vector historyData = this.getHistoryData(this.orderCodeStr);
if(historyData==null){
this.messageBox("無法查詢到歷史明細(xì)數(shù)據(jù)!");
return;
}
System.out.println("歷史明細(xì)數(shù)據(jù):"+historyData);
SysPhaPriceHistoryUI ui = new SysPhaPriceHistoryUI(historyData);
ui.show();
System.out.println(ui.getReturnValue());
ActionParm action = (ActionParm)ui.getReturnValue();
ActionParm phaPrice = (ActionParm)action.getCommitData("PHAPRICE");
ActionParm phaAttribute = (ActionParm)action.getCommitData("PHAATTRIBUTE");
this.setPhaAction(phaPrice);
this.setPhaBaseAction(phaAttribute);
this.setEditValue(phaPrice);
this.setPhaTwoPageData(phaAttribute);
this.initToolBar(new Boolean(true));
System.out.println("全局ORDER_CODE:"+this.orderCodeStr);
System.out.println("全局藥品費(fèi)用集合變量:"+this.phaAction);
System.out.println("全局藥品屬性集合變量:"+this.phaBaseAction);
}
/**
* 獲得用戶輸入數(shù)據(jù)SysFee
* @return ActionParm
*/
public ActionParm getPhaSysFeeData(){
ActionParm result = new ActionParm();
//藥品代碼
result.setCommitData("ORDER_CODE",this.getValue("ORDER_CODE").trim().toString());
//藥品名稱
result.setCommitData("ORDER_DESC",this.getValue("PHYSIC_NAME").trim().toString());
//字母拼音
result.setCommitData("ORD_PYCODE",this.getValue("EDH_CODE").trim().toString());
//醫(yī)保名稱
result.setCommitData("NHI_FEE_DESC",this.getValue("MEDICINE_SAFETY").trim().toString());
//英文名稱
result.setCommitData("TRADE_ENG_DESC",this.getValue("ENG_CODE").trim().toString());
//化學(xué)名稱
result.setCommitData("NOMENCLATURE",this.getValue("CHYMIST_NAME").trim().toString());
//別名(簡稱)
result.setCommitData("ORDER_ABS_DESC",this.getValue("OTHER_NAME").trim().toString());
//別名(拼音)
result.setCommitData("NOMENCLATURE_PYCODE",this.getValue("OTHER_NAMEPY").trim().toString());
//規(guī)格說明
result.setCommitData("DESCRIPTION",this.getValue("SPEC_EXPLAIN").trim().toString());
//單位
result.setCommitData("UNIT_CODE",this.getValue("UNIT"));
//備注
result.setCommitData("REMARK",this.getValue("REMARK").trim().toString());
//生效日期
result.setCommitData("START_DATE",this.getValue("DATE_STATR"));
//失效日期
result.setCommitData("END_DATE",this.getValue("DATE_END"));
//院內(nèi)代碼
result.setCommitData("CHARGE_HOSP_CODE",this.getValue("YNDM"));
//細(xì)分類
result.setCommitData("ORDER_CAT1",this.getValue("XFL"));
//自費(fèi)價格
result.setCommitData("OWN_PRICE",this.getValue("ZFJG"));
//醫(yī)保價格
result.setCommitData("NHI_PRICE",this.getValue("YBJG"));
//政府最高價格
result.setCommitData("GOV_PRICE",this.getValue("ZFZGJG"));
//衛(wèi)屬批準(zhǔn)字號
result.setCommitData("HYGIENE_TRADE_CODE",this.getValue("WSPZZH").trim().toString());
//證照類別
result.setCommitData("LCS_CLASS_CODE",this.getValue("ZZLB"));
//轉(zhuǎn)出
result.setCommitData("TRANS_OUT_FLG",this.getValue("ZC"));
//預(yù)設(shè)轉(zhuǎn)院所
result.setCommitData("TRANS_HOSP_CODE",this.getValue("YSZYS"));
//開單即執(zhí)行
result.setCommitData("RBORDER_FLG",this.getValue("KDJZX"));
//處理部門
result.setCommitData("RBORDER_DEPT_CODE",this.getValue("CLBM"));
//給付類別
result.setCommitData("INSPAY_TYPE",this.getValue("GIVETYPE"));
//增付比率
result.setCommitData("ADDPAY_RATE",this.getValue("ZFBL"));
//增付金額
result.setCommitData("ADDPAY_AMT",this.getValue("ZFJE"));
//住院醫(yī)保碼
result.setCommitData("NHI_CODE",this.getValue("IYBM").trim().toString());
//門診醫(yī)保碼
result.setCommitData("NHI_CODE_O",this.getValue("OYBM").trim().toString());
//急診醫(yī)保碼
result.setCommitData("NHI_CODE_E",this.getValue("EYBM").trim().toString());
//啟用注記
if(this.getCheckBox("PRICESTATR").isSelected()){
result.setCommitData("ACTIVE_FLG","Y");
}else{
result.setCommitData("ACTIVE_FLG","N");
}
//允許手動計價注記
if(this.getCheckBox("SDJJZJ").isSelected()){
result.setCommitData("LET_UMARMED_FLG","Y");
}else{
result.setCommitData("LET_UMARMED_FLG","N");
}
//門診使用
if(this.getCheckBox("ADMTYPE_O").isSelected()){
result.setCommitData("OPD_FLG","Y");
}else{
result.setCommitData("OPD_FLG","N");
}
//急診使用
if(this.getCheckBox("ADMTYPE_E").isSelected()){
result.setCommitData("EMG_FLG","Y");
}else{
result.setCommitData("EMG_FLG","N");
}
//住院使用
if(this.getCheckBox("ADMTYPE_I").isSelected()){
result.setCommitData("IPD_FLG","Y");
}else{
result.setCommitData("IPD_FLG","N");
}
//經(jīng)醫(yī)生處方
if(this.getCheckBox("JCFQ").isSelected()){
result.setCommitData("SPLCASE_FLG","Y");
}else{
result.setCommitData("SPLCASE_FLG","N");
}
//介入操作
if(this.getCheckBox("JRCZ").isSelected()){
result.setCommitData("PROJECT_APPLY_FLG","Y");
}else{
result.setCommitData("PROJECT_APPLY_FLG","N");
}
//健康檢查(新添字段)
if(this.getCheckBox("ADMTYPE_H").isSelected()){
result.setCommitData("HRM_FLG","Y");
}else{
result.setCommitData("HRM_FLG","N");
}
IOperator operator = SysManager.getInstance().getOperator();
operator.setActionParmCommit(result);
result.setCommitData("OPT_DATE",SysManager.getInstance().getOPTDate());
return result;
}
/**
* 獲得PhaBase數(shù)據(jù)
* @return ActionParm
*/
public ActionParm getPhaBaseData(){
ActionParm result = new ActionParm();
//藥品代碼
result.setCommitData("ORDER_CODE",this.getValue("ORDER_CODE"));
//藥品分類
result.setCommitData("TYPE_CODE",this.getValue("PHATYPE"));
//開藥單位
result.setCommitData("MEDI_UNIT",this.getValue("KYUINTCOBO"));
//發(fā)藥單位2
result.setCommitData("DISPENSE_UNIT",this.getValue("FYUNITCOMBO2"));
//發(fā)藥單位1
result.setCommitData("DISPENSE_UNIT",this.getValue("FYUNITCOMBO"));
//庫存單位
result.setCommitData("STOCK_UNIT",this.getValue("STOCKUNIT"));
//劑型
result.setCommitData("DOSE_CODE",this.getValue("JX"));
//頻率
result.setCommitData("FREQ_CODE",this.getValue("PL"));