|
|
|
@ -1,6 +1,12 @@ |
|
|
|
|
package com.his.mz.ghmanage.mzgh; |
|
|
|
|
|
|
|
|
|
import java.util.Calendar; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import com.his.mz.ghmanage.model.MzghModel; |
|
|
|
|
import com.his.mz.ghmanage.model.ZffsModel; |
|
|
|
|
import com.his.mz.mzsfmanage.model.MzsfParamsModel; |
|
|
|
|
import com.his.mz.service.MzGhService; |
|
|
|
|
import com.util.MainUtil; |
|
|
|
|
import com.wat.component.DxDataBeds; |
|
|
|
|
import com.wat.core.component.DxColor; |
|
|
|
@ -12,6 +18,7 @@ import com.wat.core.component.event.WindowAdapter; |
|
|
|
|
import com.wat.core.component.event.WindowEvent; |
|
|
|
|
import com.wat.core.config.DaoCreator; |
|
|
|
|
import com.wat.core.dal.DxNormalDataManager; |
|
|
|
|
import com.wat.core.util.MathUtil; |
|
|
|
|
import com.wat.delphi.util.Delphi; |
|
|
|
|
|
|
|
|
|
public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
@ -38,24 +45,24 @@ public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
|
super.customerInitUI(); |
|
|
|
|
|
|
|
|
|
bedGhrq.setJgHeight(0); |
|
|
|
|
bedGhrq.setBedWidth(140); |
|
|
|
|
bedGhrq.setBedHeight(25); |
|
|
|
|
bedGhrq.setBackground(new DxColor(239, 239, 239)); |
|
|
|
|
bedGhrq.setBedWidth(100); |
|
|
|
|
bedGhrq.setBedHeight(80); |
|
|
|
|
bedGhrq.setBackground(new DxColor(255, 255, 255)); |
|
|
|
|
|
|
|
|
|
bedGhks.setJgHeight(0); |
|
|
|
|
bedGhks.setBedWidth(140); |
|
|
|
|
bedGhks.setBedHeight(25); |
|
|
|
|
bedGhks.setBackground(new DxColor(239, 239, 239)); |
|
|
|
|
bedGhks.setBedWidth(100); |
|
|
|
|
bedGhks.setBedHeight(60); |
|
|
|
|
bedGhks.setBackground(new DxColor(255, 255, 255)); |
|
|
|
|
|
|
|
|
|
bedGhys.setJgHeight(0); |
|
|
|
|
bedGhys.setBedWidth(140); |
|
|
|
|
bedGhys.setBedHeight(25); |
|
|
|
|
bedGhys.setBackground(new DxColor(239, 239, 239)); |
|
|
|
|
bedGhys.setBedWidth(100); |
|
|
|
|
bedGhys.setBedHeight(60); |
|
|
|
|
bedGhys.setBackground(new DxColor(255, 255, 255)); |
|
|
|
|
|
|
|
|
|
bedGhhy.setJgHeight(0); |
|
|
|
|
bedGhhy.setBedWidth(140); |
|
|
|
|
bedGhhy.setBedHeight(25); |
|
|
|
|
bedGhhy.setBackground(new DxColor(239, 239, 239)); |
|
|
|
|
bedGhhy.setBedWidth(100); |
|
|
|
|
bedGhhy.setBedHeight(120); |
|
|
|
|
bedGhhy.setBackground(new DxColor(255, 255, 255)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -63,11 +70,64 @@ public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
|
public void beforeShowLoad() { |
|
|
|
|
super.beforeShowLoad(); |
|
|
|
|
this.centerWindow(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DxNormalDataManager hzBaseDao = (DxNormalDataManager) DaoCreator.getNormalDao(this, "hzBaseDao"); |
|
|
|
|
hzBaseDao.setNormalParameters(new Object[] { MainUtil.getCurCompanyID(), "651795474806607872"}); |
|
|
|
|
hzBaseDao.reload(); |
|
|
|
|
|
|
|
|
|
DxNormalDataManager mzghCardDao = (DxNormalDataManager) DaoCreator.getNormalDao(this, "mzghCardDao"); |
|
|
|
|
mzghCardDao.setNormalParameters(new Object[] { MainUtil.getCurCompanyID(), "651795474806607872" }); |
|
|
|
|
mzghCardDao.reload(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setXmlControlDao(0, hzBaseDao); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoBedGhrq = DaoCreator.getNormalDao(this, "daoBedGhrq"); |
|
|
|
|
daoBedGhrq.reload(); |
|
|
|
|
bedGhrq.setDataSource(daoBedGhrq); |
|
|
|
|
selectGhrqAction(); |
|
|
|
|
bedGhys.setDataSource(daoBedGhrq); |
|
|
|
|
for (int i = 0; i < 7; i++) { |
|
|
|
|
Calendar begin = Calendar.getInstance(); |
|
|
|
|
begin.set(Calendar.DAY_OF_MONTH,begin.get(Calendar.DAY_OF_MONTH) + i); |
|
|
|
|
String date=MainUtil.format(begin.getTime(),"yyyy-MM-dd"); |
|
|
|
|
int today = begin.get(Calendar.DAY_OF_WEEK); // 1代表星期日,2代表星期一,以此类推
|
|
|
|
|
String dayName=""; |
|
|
|
|
switch (today) { |
|
|
|
|
case 1: |
|
|
|
|
dayName="星期日"; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
dayName="星期一"; |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
dayName="星期二"; |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
dayName="星期三"; |
|
|
|
|
break; |
|
|
|
|
case 5: |
|
|
|
|
dayName="星期四"; |
|
|
|
|
break; |
|
|
|
|
case 6: |
|
|
|
|
dayName="星期五"; |
|
|
|
|
break; |
|
|
|
|
case 7: |
|
|
|
|
dayName="星期六"; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dayName="<div style=\"background-color:#fef9f9;text-align:center;border:2px solid red;border-radius-example;border-radius: 5px;\"><p>"+dayName+"</p><p>"+date+"</p></div>"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
daoBedGhrq.absolute(daoBedGhrq.insert(daoBedGhrq.getRowCount())); |
|
|
|
|
daoBedGhrq.setColumnValue("key",date); |
|
|
|
|
daoBedGhrq.setColumnValue("value",dayName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoBedGhks = DaoCreator.getNormalDao(this, "daoBedGhks"); |
|
|
|
@ -84,21 +144,6 @@ public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
|
daoBedGhhy.reload(); |
|
|
|
|
bedGhhy.setDataSource(daoBedGhhy); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoMzghPbinfo = DaoCreator.getNormalDao(this, "daoMzghPbinfo"); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(), Delphi.getDateStr(System.currentTimeMillis()), "%", "%" }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//DxNormalDataManager daoMzghSelectKs = DaoCreator.getNormalDao(this, "daoMzghSelectKs");
|
|
|
|
|
//daoMzghSelectKs.reload(new Object[] { MainUtil.getCurCompanyID(), "%", "%", "%" });
|
|
|
|
|
for (int i = 0; i < daoMzghPbinfo.getRowCount(); i++) { |
|
|
|
|
if (!daoBedGhks.local("key", daoMzghPbinfo.getColumnValueAsString(i,"DPTID"))) { |
|
|
|
|
daoBedGhks.absolute(daoBedGhks.insert(daoBedGhks.getRowCount())); |
|
|
|
|
daoBedGhks.setColumnValue("key",daoMzghPbinfo.getColumnValueAsString(i,"DPTID")); |
|
|
|
|
daoBedGhks.setColumnValue("value",daoMzghPbinfo.getColumnValueAsString(i,"DPTNAME")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void modalFunction(int flag, Object para) { |
|
|
|
@ -111,55 +156,267 @@ public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void selectGhrqAction() { |
|
|
|
|
/** |
|
|
|
|
* 日期 |
|
|
|
|
* @param key 日期 |
|
|
|
|
*/ |
|
|
|
|
private void selectGhrqAction(String key) { |
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoMzghPbinfo = DaoCreator.getNormalDao(this, "daoMzghPbinfo"); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(),key, "%", "%" }); |
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoBedGhrq = DaoCreator.getNormalDao(this, "daoBedGhrq"); |
|
|
|
|
daoBedGhrq.reload(); |
|
|
|
|
bedGhys.setDataSource(daoBedGhrq); |
|
|
|
|
for (int i = 0; i < 7; i++) { |
|
|
|
|
|
|
|
|
|
Calendar begin = Calendar.getInstance(); |
|
|
|
|
begin.set(Calendar.DAY_OF_MONTH,begin.get(Calendar.DAY_OF_MONTH) + i); |
|
|
|
|
String date=MainUtil.format(begin.getTime(),"yyyy-MM-dd"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
daoBedGhrq.absolute(daoBedGhrq.insert(daoBedGhrq.getRowCount())); |
|
|
|
|
daoBedGhrq.setColumnValue("key",date); |
|
|
|
|
daoBedGhrq.setColumnValue("value",date); |
|
|
|
|
DxNormalDataManager daoBedGhks = DaoCreator.getNormalDao(this, "daoBedGhks"); |
|
|
|
|
daoBedGhks.reload(); |
|
|
|
|
DxNormalDataManager daoBedGhys = DaoCreator.getNormalDao(this, "daoBedGhys"); |
|
|
|
|
daoBedGhys.reload(); |
|
|
|
|
DxNormalDataManager daoBedGhhy = DaoCreator.getNormalDao(this, "daoBedGhhy"); |
|
|
|
|
daoBedGhhy.reload(); |
|
|
|
|
for (int i = 0; i < daoMzghPbinfo.getRowCount(); i++) { |
|
|
|
|
if (!daoBedGhks.local("key", daoMzghPbinfo.getColumnValueAsString(i,"DPTID"))) { |
|
|
|
|
daoBedGhks.absolute(daoBedGhks.insert(daoBedGhks.getRowCount())); |
|
|
|
|
daoBedGhks.setColumnValue("key",daoMzghPbinfo.getColumnValueAsString(i,"DPTID")); |
|
|
|
|
|
|
|
|
|
String ksName="<div style=\"background-color:#fef9f9;text-align:center;border:2px solid red;border-radius-example;border-radius: 5px;\"><p>"+daoMzghPbinfo.getColumnValueAsString(i,"DPTNAME")+"</p></div>"; |
|
|
|
|
daoBedGhks.setColumnValue("value",ksName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bedGhks.setDataSource(daoBedGhks); |
|
|
|
|
bedGhys.setDataSource(daoBedGhys); |
|
|
|
|
bedGhhy.setDataSource(daoBedGhhy); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calendar begin = Calendar.getInstance(); |
|
|
|
|
System.err.println(Delphi.isSaturDay(begin.getTime().getTime())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void selectGhysAction(String key) { |
|
|
|
|
/** |
|
|
|
|
* 科室 |
|
|
|
|
* @param key0 日期 |
|
|
|
|
* @param key1 科室 |
|
|
|
|
*/ |
|
|
|
|
private void selectGhksAction(String key0, String key1) { |
|
|
|
|
DxNormalDataManager daoMzghPbinfo = DaoCreator.getNormalDao(this, "daoMzghPbinfo"); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(), Delphi.getDateStr(System.currentTimeMillis()), key, "%" }); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(), key0, key1, "%" }); |
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoBedGhys = DaoCreator.getNormalDao(this, "daoBedGhys"); |
|
|
|
|
daoBedGhys.reload(); |
|
|
|
|
bedGhys.setDataSource(daoBedGhys); |
|
|
|
|
DxNormalDataManager daoBedGhhy = DaoCreator.getNormalDao(this, "daoBedGhhy"); |
|
|
|
|
daoBedGhhy.reload(); |
|
|
|
|
for (int i = 0; i < daoMzghPbinfo.getRowCount(); i++) { |
|
|
|
|
if (!daoBedGhys.local("key", daoMzghPbinfo.getColumnValueAsString(i,"YSPKEY"))) { |
|
|
|
|
daoBedGhys.absolute(daoBedGhys.insert(daoBedGhys.getRowCount())); |
|
|
|
|
daoBedGhys.setColumnValue("key",daoMzghPbinfo.getColumnValueAsString(i,"YSPKEY")); |
|
|
|
|
daoBedGhys.setColumnValue("value",daoMzghPbinfo.getColumnValueAsString(i,"NAME")); |
|
|
|
|
|
|
|
|
|
String ysName="<div style=\"background-color:#fef9f9;text-align:center;border:2px solid red;border-radius-example;border-radius: 5px;\"><p>"+daoMzghPbinfo.getColumnValueAsString(i,"NAME")+"</p></div>"; |
|
|
|
|
daoBedGhys.setColumnValue("value",ysName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bedGhys.setDataSource(daoBedGhys); |
|
|
|
|
bedGhhy.setDataSource(daoBedGhhy); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void selectGhhyAction(String key0,String key1) { |
|
|
|
|
/** |
|
|
|
|
* 医生 |
|
|
|
|
* @param key0 日期 |
|
|
|
|
* @param key1 科室 |
|
|
|
|
* @param key2 医生 |
|
|
|
|
*/ |
|
|
|
|
private void selectGhysAction(String key0,String key1,String key2) { |
|
|
|
|
DxNormalDataManager daoMzghPbinfo = DaoCreator.getNormalDao(this, "daoMzghPbinfo"); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(), Delphi.getDateStr(System.currentTimeMillis()), key0, key1 }); |
|
|
|
|
daoMzghPbinfo.reload(new Object[] { MainUtil.getCurCompanyID(), key0, key1,key2 }); |
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoBedGhhy = DaoCreator.getNormalDao(this, "daoBedGhhy"); |
|
|
|
|
daoBedGhhy.reload(); |
|
|
|
|
bedGhhy.setDataSource(daoBedGhhy); |
|
|
|
|
for (int i = 0; i < daoMzghPbinfo.getRowCount(); i++) { |
|
|
|
|
for (int rowNum = 0; rowNum < daoMzghPbinfo.getRowCount(); rowNum++) { |
|
|
|
|
daoBedGhhy.absolute(daoBedGhhy.insert(daoBedGhhy.getRowCount())); |
|
|
|
|
daoBedGhhy.setColumnValue("key",daoMzghPbinfo.getColumnValueAsString(i,"PKEY")); |
|
|
|
|
daoBedGhhy.setColumnValue("value",daoMzghPbinfo.getColumnValueAsString(i,"MC")+daoMzghPbinfo.getColumnValueAsString(i,"GHZC")); |
|
|
|
|
daoBedGhhy.setColumnValue("key",daoMzghPbinfo.getColumnValueAsString(rowNum,"PKEY")); |
|
|
|
|
|
|
|
|
|
String hyztlb = daoMzghPbinfo.getColumnValueAsString(rowNum, "hyztlb"); |
|
|
|
|
String bzh = daoMzghPbinfo.getColumnValueAsString(rowNum, "BZH"); |
|
|
|
|
String jh = daoMzghPbinfo.getColumnValueAsString(rowNum, "JH"); |
|
|
|
|
String yyh = daoMzghPbinfo.getColumnValueAsString(rowNum, "YYH"); |
|
|
|
|
String GHZC = daoMzghPbinfo.getColumnValueAsString(rowNum, "GHZC"); |
|
|
|
|
Map lbMap = Delphi.toMapByJson(hyztlb); |
|
|
|
|
List bzhghList = (List) lbMap.get("b"); |
|
|
|
|
List jhghList = (List) lbMap.get("j"); |
|
|
|
|
int ygbzh = 0; |
|
|
|
|
int ygjh = 0; |
|
|
|
|
if (bzhghList != null) { |
|
|
|
|
for (int i = 0; i < bzhghList.size(); i++) { |
|
|
|
|
int ghbm = Integer.parseInt(bzhghList.get(i).toString()); |
|
|
|
|
if (ghbm > 0) { |
|
|
|
|
ygbzh++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (jhghList != null) { |
|
|
|
|
for (int i = 0; i < jhghList.size(); i++) { |
|
|
|
|
int ghbm = Integer.parseInt(jhghList.get(i).toString()); |
|
|
|
|
if (ghbm > 0) { |
|
|
|
|
ygjh++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
int ygh = ygbzh + ygjh; |
|
|
|
|
String zhs = MathUtil.add(bzh, jh); |
|
|
|
|
String syhs = MathUtil.subtract(zhs, ygh); |
|
|
|
|
|
|
|
|
|
DxNormalDataManager ghlbDic = DaoCreator.getNormalDao(this, "ghlbDic"); |
|
|
|
|
ghlbDic.setNormalParameters(new Object[] { MainUtil.getCurCompanyID() }); |
|
|
|
|
ghlbDic.reloadByDictionary("MC", "PKEY"); |
|
|
|
|
|
|
|
|
|
String hyName="<div style=\"background-color:#fef9f9;text-align:center;border:2px solid red;border-radius-example;border-radius: 5px;\"><p>"+daoMzghPbinfo.getColumnValueAsString(rowNum,"MC")+"</p><p>"+ghlbDic.getDicValue(GHZC)+"</p><p>剩余号:"+syhs+"</p></div>"; |
|
|
|
|
daoBedGhhy.setColumnValue("value",hyName); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
bedGhhy.setDataSource(daoBedGhhy); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 号源 |
|
|
|
|
*/ |
|
|
|
|
private void selectGhhyAction() { |
|
|
|
|
|
|
|
|
|
DxNormalDataManager hzBaseDao = (DxNormalDataManager) DaoCreator.getNormalDao(this, "hzBaseDao"); |
|
|
|
|
DxNormalDataManager mzgh_cardDao = (DxNormalDataManager) DaoCreator.getNormalDao(this, "mzghCardDao"); |
|
|
|
|
if (hzBaseDao.getRowCount() == 0 || mzgh_cardDao.getRowCount() == 0) { |
|
|
|
|
setLabelShow("提示:当前没有选择挂号患者,请输入卡号或者进行刷卡操作"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
long csrq = hzBaseDao.getColumnValueAsLong("CSRQ"); |
|
|
|
|
int age2 = Integer.parseInt(Delphi.getAge(Delphi.getDateStr(csrq))); |
|
|
|
|
String kspkey = bedGhks.getSelected(); |
|
|
|
|
|
|
|
|
|
if(age2 >= 18 && "410".equals(kspkey)) { |
|
|
|
|
setLabelShow("提示:当前就诊患者年龄大于18,不允许挂儿科号别"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// HisGHjcszDaoMapper hisGHjcszDaoMapper = HisGHjcszDaoMapper.getMapper(new Object[] { MainUtil.getCurCompanyID() });
|
|
|
|
|
// boolean issfxzlhff = hisGHjcszDaoMapper.isSFXZLHFF();//是否先诊疗后付费模式
|
|
|
|
|
// String edit3Str = "";
|
|
|
|
|
// if (!issfxzlhff) {
|
|
|
|
|
// int dblookupcombobox2Select = dblookupcombobox2.getSelectedIndex();
|
|
|
|
|
// if (dblookupcombobox2Select < 0) {
|
|
|
|
|
// setLabelShow("提示:支付方式必须选择!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// edit3Str = edit3.getText();
|
|
|
|
|
// if (Delphi.isNullString(edit3Str)) {
|
|
|
|
|
// setLabelShow("提示:合计金额异常!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// String edit4Str = edit4.getText();
|
|
|
|
|
// if (Delphi.isNullString(edit4Str)) {
|
|
|
|
|
// setLabelShow("提示:请实收金额!");
|
|
|
|
|
// edit4.setFocus();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (Double.parseDouble(MathUtil.subtract(edit4Str, edit3Str)) < 0) {
|
|
|
|
|
// setLabelShow("提示:实收金额小于合计金额!");
|
|
|
|
|
// edit4.setFocus();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
DxNormalDataManager daoMzghPbinfo = DaoCreator.getNormalDao(this, "daoMzghPbinfo"); |
|
|
|
|
daoMzghPbinfo.local("PKEY", bedGhhy.getSelected()); |
|
|
|
|
String pkey = daoMzghPbinfo.getColumnValueAsString("GHZC"); |
|
|
|
|
DxNormalDataManager lbglyzxDao = (DxNormalDataManager) DaoCreator.getNormalDao(this, "lbglyzxDao"); |
|
|
|
|
lbglyzxDao.setNormalParameters(new Object[] { MainUtil.getCurCompanyID(), pkey }); |
|
|
|
|
lbglyzxDao.reload(); |
|
|
|
|
|
|
|
|
|
String hjje = lbglyzxDao.getSumColumnValue("je"); |
|
|
|
|
if (Delphi.isNullString(hjje)) { |
|
|
|
|
hjje = "0"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MzghModel model = new MzghModel(); |
|
|
|
|
model.setHzpkey(hzBaseDao.getColumnValueAsString("PKEY")); |
|
|
|
|
model.setCardNo(mzgh_cardDao.getColumnValueAsString("KH")); |
|
|
|
|
model.setCardPkey(mzgh_cardDao.getColumnValueAsString("PKEY")); |
|
|
|
|
ZffsModel zffsModel = new ZffsModel(); |
|
|
|
|
zffsModel.setZffs("2");//暂时默认微信2
|
|
|
|
|
zffsModel.setZfje(hjje); |
|
|
|
|
model.addZffs(zffsModel); |
|
|
|
|
// model.setPjtype("F");
|
|
|
|
|
model.setSytype("MG"); |
|
|
|
|
model.setCzry(MainUtil.getCurUserAccount()); |
|
|
|
|
model.setCzryks(MainUtil.getCurKs()); |
|
|
|
|
model.setCompanyId(MainUtil.getCurCompanyID()); |
|
|
|
|
model.setHjje(hjje); |
|
|
|
|
model.setPbPkey(bedGhhy.getSelected()); |
|
|
|
|
model.setPbyyhPkey("");//预约号取号
|
|
|
|
|
model.setHasBlb(checkbox1.isSelected()); |
|
|
|
|
model.setIsAccount(true); |
|
|
|
|
model.setWindow(this); |
|
|
|
|
MzGhService mzghService = new MzGhService(); |
|
|
|
|
|
|
|
|
|
//60岁免费挂号
|
|
|
|
|
if ("1".equals(str)) { |
|
|
|
|
mzghService.createGhMfNoFk(model); |
|
|
|
|
if (model.getResult() == 0) { |
|
|
|
|
printDjhNoJf(model); |
|
|
|
|
refreshData(); |
|
|
|
|
//insertNewContent();
|
|
|
|
|
} else { |
|
|
|
|
setLabelShow("提示:挂号业务保存失败,原因:" + model.getMessage()); |
|
|
|
|
} |
|
|
|
|
}else if (!issfxzlhff) { |
|
|
|
|
mzghService.createGhBill(model); |
|
|
|
|
if (model.getResult() == 0) { |
|
|
|
|
model.setDzp(false); |
|
|
|
|
MzsfParamsModel paramsmodel = (MzsfParamsModel) getWinParams("mzparamsmodel"); |
|
|
|
|
if (paramsmodel.isSFDYPJ() && !"fzgh".equals(getWinParams("type"))) {//分诊台挂号不用打印发票
|
|
|
|
|
model.setFp(true); |
|
|
|
|
model.setPjtype(paramsmodel.getMRGHPJLX()); |
|
|
|
|
} else { |
|
|
|
|
model.setFp(false); |
|
|
|
|
} |
|
|
|
|
mzghService.createGhJsFp(model); |
|
|
|
|
if (model.getResult() == 0) { |
|
|
|
|
printDjh(model); |
|
|
|
|
refreshData(); |
|
|
|
|
//insertNewContent();
|
|
|
|
|
// dlg.messageDlg("提示:挂号成功,当前患者是否继续挂号",DxMessageDlg.CONFIRM,310,300);
|
|
|
|
|
} else { |
|
|
|
|
setLabelShow("提示:挂号业务收费失败,原因:" + model.getMessage()); |
|
|
|
|
dbedit2Action(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
setLabelShow("提示:挂号业务保存失败,原因:" + model.getMessage()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
mzghService.createGhBillNoFk(model); |
|
|
|
|
if (model.getResult() == 0) { |
|
|
|
|
printDjhNoJf(model); |
|
|
|
|
refreshData(); |
|
|
|
|
} else { |
|
|
|
|
setLabelShow("提示:挂号业务保存失败,原因:" + model.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (model.getResult() == 0) {//修改年龄小于6岁的hzinfo,jz_baseinfo两张表的nl;
|
|
|
|
|
DxNormalDataManager hzBaseDao1 = (DxNormalDataManager) DaoCreator.getNormalDao("hzBaseDao"); |
|
|
|
|
hzBaseDao1.setNormalParameters(new Object[] { MainUtil.getCurCompanyID(), hzBaseDao.getColumnValueAsString("PKEY") }); |
|
|
|
|
hzBaseDao1.reload(); |
|
|
|
|
String[] age = edit1.getText().split("岁"); |
|
|
|
|
if(!Delphi.isNullString(age[0])) { |
|
|
|
|
if(Integer.valueOf(age[0]) < 18) { |
|
|
|
|
hzBaseDao1.setColumnValue("NL", edit1.getText()); |
|
|
|
|
hzBaseDao1.commit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
insertNewContent(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void initEvent() { |
|
|
|
|
super.initEvent(); |
|
|
|
|
this.addWindowListener(new WindowAdapter(){ |
|
|
|
@ -168,17 +425,30 @@ public class MzGhWindow_test extends WatSDIWindow { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
bedGhrq.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
|
selectGhrqAction(bedGhrq.getSelected()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
bedGhks.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
|
selectGhysAction(bedGhks.getSelected()); |
|
|
|
|
selectGhksAction(bedGhrq.getSelected(),bedGhks.getSelected()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
bedGhys.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
|
selectGhhyAction(bedGhks.getSelected(),bedGhys.getSelected()); |
|
|
|
|
selectGhysAction(bedGhrq.getSelected(),bedGhks.getSelected(),bedGhys.getSelected()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
bedGhhy.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
|
selectGhhyAction(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|