?? a.java
字號:
String oldNhiPrice = oldPriceData.getReturnData("NHI_PRICE",0).toString();
System.out.println("新自費" + Double.parseDouble(newOwnPrice));
System.out.println("舊自費" + Double.parseDouble(oldOwnPrice));
System.out.println("新醫(yī)保" + Double.parseDouble(newNhiPrice));
System.out.println("舊醫(yī)保" + 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("最后數(shù)據(jù):"+action);
}
if(this.getRadioButton("STATR").isSelected()){
System.out.println("statr");
action = this.getSysFeeStatrData(freeCode);
if(action==null){
return;
}
this.initGridData(action);
System.out.println("最后數(shù)據(jù):"+action);
}
if(this.getRadioButton("END").isSelected()){
System.out.println("end");
action = this.getSysFeeEndData(freeCode);
if(action==null){
return;
}
this.initGridData(action);
System.out.println("最后數(shù)據(jù):"+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數(shù)據(jù):"+gd);
this.getGrid("GRID1").setValue(gd);
}
/**
* 獲得GRID控件
* @param tag String
* @return DyGrid
*/
public DyGrid getGrid(String tag){
return (DyGrid)this.getComponent(tag);
}
/**
* 獲得SYS_FEE全部數(shù)據(jù)
* @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("參數(shù)不能為空!");
return null;
}
if (action.getErrCode() == -2) {
this.messageBox("查詢不到數(shù)據(jù)!");
return null;
}
return action;
}
/**
* 獲得SYS_FEE啟用數(shù)據(jù)
* @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()+"提交數(shù)據(jù):"+parm);
ActionParm action = new ActionParm();
action = SysManager.getInstance().getSysFeeStatrData(parm);
if (action.getErrCode() == -1) {
this.messageBox("參數(shù)不能為空!");
return null;
}
if (action.getErrCode() == -2) {
this.messageBox("查詢不到數(shù)據(jù)!");
return null;
}
return action;
}
/**
* 獲得SYS_FEE停用數(shù)據(jù)
* @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("參數(shù)不能為空!");
return null;
}
if (action.getErrCode() == -2) {
this.messageBox("查詢不到數(shù)據(jù)!");
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監(jiān)聽事件
*/
public void onGridEvent() {
System.out.println("點擊GRID");
int count = this.getGrid("GRID1").getTable().getSelectedRow();
this.orderCodeStr = this.getGrid("GRID1").getCellValueAt(count,0);
//藥品費用初始化數(shù)據(jù)方法
this.queryOnePage(count);
//藥品屬性初始化數(shù)據(jù)方法
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("單擊返回數(shù)據(jù):"+result);
this.setPhaBaseAction(result);
//初始化藥品屬性的數(shù)據(jù)
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("單擊返回數(shù)據(jù):"+result);
this.setPhaAction(result);
this.setEditValue(result);
this.setUserRoelOnWindow();
this.initToolBar(new Boolean(true));
System.out.println("全局變量藥品費用集合:"+this.phaAction);
}
/**
* 設置第二個頁簽的數(shù)據(jù)
*/
public void setPhaTwoPageData(ActionParm parm){
if (parm == null) {
// this.messageBox("返回數(shù)據(jù)為空!");
return;
}
if (parm.getErrCode() < 0) {
// this.messageBox("查詢參數(shù)錯誤!");
return;
}
//藥品分類
this.setValue("PHATYPE",parm.getReturnData("TYPE_CODE",0).toString());
//開藥單位
this.setValue("KYUINTCOBO",parm.getReturnData("MEDI_UNIT",0).toString());
//發(fā)藥單位2
this.setValue("FYUNITCOMBO2",parm.getReturnData("DISPENSE_UNIT",0).toString());
//發(fā)藥單位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());
//管制藥品級數(shù)
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);
}
//發(fā)藥單位
this.setValue("FYDW",parm.getReturnData("END_QTY",0).toString());
//開藥單位
this.setValue("KYDW",parm.getReturnData("START_QTY",0).toString());
//發(fā)藥單位2
this.setValue("FYDWEDIT",parm.getReturnData("START_COUNT",0).toString());
//庫存單位
this.setValue("KCDWEDIT",parm.getReturnData("STOCK_COUNT",0).toString());
//常用天數(shù)
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);
}
//不可連續(xù)使用(開封既丟)
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);
//發(fā)藥單位2
this.getComboBox("FYUNITCOMBO2").setEnabled(false);
//發(fā)藥單位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);
//管制藥品級數(shù)
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 + -