|
@@ -236,6 +236,7 @@ public class IsvMedicCardServiceImpl implements IsvMedicCardService {
|
|
return item;
|
|
return item;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 查询就诊卡列表
|
|
@Override
|
|
@Override
|
|
public PageVO<QueryListCardResponseData> queryListMedicCard(QueryListCardRequest request) throws Exception {
|
|
public PageVO<QueryListCardResponseData> queryListMedicCard(QueryListCardRequest request) throws Exception {
|
|
int hospitalId = BizUtil.getCurrentHospitalId();
|
|
int hospitalId = BizUtil.getCurrentHospitalId();
|
|
@@ -246,32 +247,30 @@ public class IsvMedicCardServiceImpl implements IsvMedicCardService {
|
|
.build();
|
|
.build();
|
|
GetMedicalCardListResponse getMedicalCardListResponse = userServiceBlockingStub.getMedicalCardList(getMedicalCardListRequest);
|
|
GetMedicalCardListResponse getMedicalCardListResponse = userServiceBlockingStub.getMedicalCardList(getMedicalCardListRequest);
|
|
Result result = getMedicalCardListResponse.getResult();
|
|
Result result = getMedicalCardListResponse.getResult();
|
|
-
|
|
|
|
- int total = 0;
|
|
|
|
|
|
+ if (result.getCode() != ResultCode.SUCCEED) throw new AppMessageException(result.getInfo());
|
|
|
|
+ int total;
|
|
List<QueryListCardResponseData> lst = new LinkedList<>();
|
|
List<QueryListCardResponseData> lst = new LinkedList<>();
|
|
- if (result.getCode() == ResultCode.SUCCEED) {
|
|
|
|
- total = Checker.getIntegerValue(getMedicalCardListResponse.getMedicalCardsList().size());
|
|
|
|
- for (MedicalCard medicalCard : getMedicalCardListResponse.getMedicalCardsList()) {
|
|
|
|
- double balance = medicalCard.getBalance() / 100d;
|
|
|
|
- QueryListCardResponseData item = new QueryListCardResponseData();
|
|
|
|
- item.setCardNum(medicalCard.getCardNo());//就诊卡卡号/医保卡卡号
|
|
|
|
- String cardType = medicalCard.getCardType();
|
|
|
|
- item.setType(1);//标记查询卡类型
|
|
|
|
- item.setName(medicalCard.getPatientName());//姓名
|
|
|
|
- item.setSex(SexEnum.getSexDisplayName(medicalCard.getSex()));//性别
|
|
|
|
- item.setBirthDay(medicalCard.getBirthday());//生日
|
|
|
|
- item.setIdCardNo(medicalCard.getIdNo());//身份证号码
|
|
|
|
- item.setPhoneNumber(medicalCard.getMobile());//手机号
|
|
|
|
- item.setBalance(balance + "");//卡内余额
|
|
|
|
- item.setIsDefault(medicalCard.getIsDefault());//是否是默认就诊卡
|
|
|
|
- item.setCity("");//如果是医保卡,传参保城市
|
|
|
|
- item.setCardOrgName("");//如果是医保卡,传发卡机构
|
|
|
|
- lst.add(item);
|
|
|
|
- }
|
|
|
|
|
|
+ List<MedicalCard> medicalCards = getMedicalCardListResponse.getMedicalCardsList();
|
|
|
|
+ total = medicalCards.size();
|
|
|
|
+ for (MedicalCard medicalCard : medicalCards) {
|
|
|
|
+ double balance = medicalCard.getBalance() / 100d;
|
|
|
|
+ QueryListCardResponseData item = new QueryListCardResponseData();
|
|
|
|
+ item.setCardNum(medicalCard.getCardNo());//就诊卡卡号/医保卡卡号
|
|
|
|
+ String cardType = medicalCard.getCardType();
|
|
|
|
+ item.setType(1);//标记查询卡类型
|
|
|
|
+ item.setName(medicalCard.getPatientName());//姓名
|
|
|
|
+ item.setSex(SexEnum.getSexDisplayName(medicalCard.getSex()));//性别
|
|
|
|
+ item.setBirthDay(medicalCard.getBirthday());//生日
|
|
|
|
+ item.setIdCardNo(medicalCard.getIdNo());//身份证号码
|
|
|
|
+ item.setPhoneNumber(medicalCard.getMobile());//手机号
|
|
|
|
+ item.setBalance(balance + "");//卡内余额
|
|
|
|
+ item.setIsDefault(medicalCard.getIsDefault());//是否是默认就诊卡
|
|
|
|
+ item.setCity("");//如果是医保卡,传参保城市
|
|
|
|
+ item.setCardOrgName("");//如果是医保卡,传发卡机构
|
|
|
|
+ lst.add(item);
|
|
}
|
|
}
|
|
Pagination pagination = new Pagination(1, 1, total);
|
|
Pagination pagination = new Pagination(1, 1, total);
|
|
- PageVO<QueryListCardResponseData> res = new PageVO<>(pagination, lst);
|
|
|
|
- return res;
|
|
|
|
|
|
+ return new PageVO<>(pagination, lst);
|
|
}
|
|
}
|
|
|
|
|
|
// 删除就诊卡
|
|
// 删除就诊卡
|
|
@@ -344,6 +343,7 @@ public class IsvMedicCardServiceImpl implements IsvMedicCardService {
|
|
return resp;
|
|
return resp;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 就诊人列表
|
|
@Override
|
|
@Override
|
|
public List<QueryPatientListResponse> queryPatientList(QueryPatientListRequest request) throws Exception {
|
|
public List<QueryPatientListResponse> queryPatientList(QueryPatientListRequest request) throws Exception {
|
|
return null;
|
|
return null;
|