|
@@ -89,7 +89,7 @@ public class InpatientServiceImpl implements InpatientService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<InpatientListResponseData> inpatientList(InpatientListRequest request) {
|
|
|
+ public List<InpatientListResponseData> inpatientList(InpatientListRequest request) throws Exception {
|
|
|
int userId = Checker.parseInt(request.getUserId());
|
|
|
List<InpatientListResponseData> list = new ArrayList<>();
|
|
|
if (userId <= 0) return list; // 这个接口进入小程序首页就会调用;如果用户没有授权,返回空数据,而不是弹出获取用户信息授权(会违反小程序审核规则);
|
|
@@ -111,6 +111,8 @@ public class InpatientServiceImpl implements InpatientService {
|
|
|
data.setSex(medicalCard.getSex() == 1 ? "男" : "女");
|
|
|
Date date = DateUtil.stringToDate(medicalCard.getBirthday(), DateUtil.DADE_FROMAT_YMD);
|
|
|
data.setInpatientAge(Integer.parseInt(getAgeFromMedicalCard(medicalCard)));
|
|
|
+ InpatientVo vo = getInpatientVo(userId, medicalCard.getPatientId());
|
|
|
+ data.setAdmNo(Checker.getStringValue(vo.getAdmNo()));
|
|
|
list.add(data);
|
|
|
}
|
|
|
return list;
|
|
@@ -193,8 +195,8 @@ public class InpatientServiceImpl implements InpatientService {
|
|
|
.build();
|
|
|
GetInPatInfoResponse resp = taiheServiceBlockingStub.getInPatInfo(req);
|
|
|
if (resp.getCode() == BaseResponse.SUCCEED) {
|
|
|
- String totalAmount = String.format("%.2f", resp.getTotalAmount() / 100d);
|
|
|
- String depositBalance = String.format("%.2f", resp.getDepositBalance() / 100d);
|
|
|
+ String totalAmount = String.format("%.2f", Checker.getDoubleValue(resp.getTotalAmount() / 100d));
|
|
|
+ String depositBalance = String.format("%.2f", Checker.getDoubleValue(resp.getDepositBalance() / 100d));
|
|
|
vo.setAdmNo(resp.getAdmNo());
|
|
|
vo.setTotalAmount(totalAmount);
|
|
|
vo.setDepositBalance(depositBalance);
|
|
@@ -329,6 +331,7 @@ public class InpatientServiceImpl implements InpatientService {
|
|
|
da.setDepositBalance(depositBalance);
|
|
|
da.setStatus(Checker.getStringValue(""));
|
|
|
da.setDepositId(Checker.getStringValue(i.getReceiptNo()));
|
|
|
+ da.setAdmNo(Checker.getStringValue(admNo));
|
|
|
depositList.add(da);
|
|
|
}
|
|
|
return depositList;
|