|
|
@@ -82,7 +82,7 @@ public class ChargeFeeVoController {
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "查询日结列表收费清单成功");
|
|
|
List<ChargeFeeVo> chargeFeeVos = chargeFeeVoService.queryChargeFeeVoUnAccount(tokenUser.getUserIdCode());
|
|
|
- fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.NO);
|
|
|
+ fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.YES);
|
|
|
resultMap.put("data", chargeFeeVos);
|
|
|
return resultMap;
|
|
|
} catch (MzException e) {
|
|
|
@@ -103,9 +103,9 @@ public class ChargeFeeVoController {
|
|
|
*
|
|
|
* @param chargeFeeVos
|
|
|
* @param fitEmpName 是否设置医生名称
|
|
|
- * @param fitAddress 是否设置患者地址
|
|
|
+ * @param fitPatientInfo 是否设置患者信息
|
|
|
*/
|
|
|
- private void fomartChargeVo(List<ChargeFeeVo> chargeFeeVos, YesNoEnum fitEmpName,YesNoEnum fitAddress) {
|
|
|
+ private void fomartChargeVo(List<ChargeFeeVo> chargeFeeVos, YesNoEnum fitEmpName,YesNoEnum fitPatientInfo) {
|
|
|
if (chargeFeeVos != null && chargeFeeVos.size() > 0) {
|
|
|
List<ZdChequeType> chequeTypes = zdChequeTypeService.queryAllZdChequeTypeForMz();
|
|
|
Map<String, String> employeeMap = null;
|
|
|
@@ -121,9 +121,38 @@ public class ChargeFeeVoController {
|
|
|
Map<String, String> chequeTypeMap = chequeTypes.stream().collect(Collectors.toMap(ZdChequeType::getCode, ZdChequeType::getName));
|
|
|
Map<String, String> regionMap=null;
|
|
|
StringBuffer sbf =null;
|
|
|
- if(YesNoEnum.YES.equals(fitAddress)){
|
|
|
+ Map<String, MzPatientMi> mzPatientMiMap = null;
|
|
|
+ if(YesNoEnum.YES.equals(fitPatientInfo)){
|
|
|
regionMap = regionService.queryAll().stream().collect(Collectors.toMap(CodeNameEntity::getCode, CodeNameEntity::getName));
|
|
|
sbf = new StringBuffer();
|
|
|
+ Set<String> patientIdSet= chargeFeeVos.stream().map(ChargeFeeVo::getPatientId).collect(Collectors.toSet());
|
|
|
+ List<String> patientIds = new ArrayList<>(patientIdSet);
|
|
|
+ List<String> tempList = new ArrayList<>();
|
|
|
+ List<MzPatientMi> mzPatientMis=null;
|
|
|
+ int count=0;
|
|
|
+ for(String patientId:patientIds){
|
|
|
+ tempList.add(patientId);
|
|
|
+ count++;
|
|
|
+ if(count==1000){
|
|
|
+ if(mzPatientMis==null){
|
|
|
+ mzPatientMis=mzPatientMiService.queryByPatientIds(tempList);
|
|
|
+ }else {
|
|
|
+ mzPatientMis.addAll(mzPatientMiService.queryByPatientIds(tempList));
|
|
|
+ }
|
|
|
+ count=0;
|
|
|
+ tempList=new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(count>0){
|
|
|
+ if(mzPatientMis==null){
|
|
|
+ mzPatientMis=mzPatientMiService.queryByPatientIds(tempList);
|
|
|
+ }else {
|
|
|
+ mzPatientMis.addAll(mzPatientMiService.queryByPatientIds(tempList));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (mzPatientMis != null) {
|
|
|
+ mzPatientMiMap = mzPatientMis.stream().collect(Collectors.toMap(MzPatientMi::getPatientId, mzPatientMi -> mzPatientMi));
|
|
|
+ }
|
|
|
}
|
|
|
for (ChargeFeeVo co : chargeFeeVos) {
|
|
|
PayMarkEnum payMark = PayMarkEnum.getPayMarkByCode(co.getPayMark());
|
|
|
@@ -139,8 +168,8 @@ public class ChargeFeeVoController {
|
|
|
if (YesNoEnum.YES.equals(fitEmpName)) {
|
|
|
co.setOpId(employeeMap.get(co.getOpId()));
|
|
|
}
|
|
|
- if(YesNoEnum.YES.equals(fitAddress)){
|
|
|
- MzPatientMi mzPatientMi=mzPatientMiService.queryByPatientId(co.getPatientId());
|
|
|
+ if (mzPatientMiMap != null) {
|
|
|
+ MzPatientMi mzPatientMi = mzPatientMiMap.get(co.getPatientId());
|
|
|
if(mzPatientMi==null){
|
|
|
continue;
|
|
|
}
|
|
|
@@ -164,8 +193,8 @@ public class ChargeFeeVoController {
|
|
|
sbf.setLength(0);
|
|
|
}
|
|
|
co.setAddress(mzPatientMi.getAddress());
|
|
|
+ co.setPatientName(mzPatientMi.getName());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -214,7 +243,7 @@ public class ChargeFeeVoController {
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "日结汇总的收费清单成功");
|
|
|
List<ChargeFeeVo> chargeFeeVos = chargeFeeVoService.queryChargeFeeVoCollect(chargeFeeParamsVo.getCaseType(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
- fomartChargeVo(chargeFeeVos, YesNoEnum.YES,YesNoEnum.NO);
|
|
|
+ fomartChargeVo(chargeFeeVos, YesNoEnum.YES,YesNoEnum.YES);
|
|
|
resultMap.put("data", chargeFeeVos);
|
|
|
return resultMap;
|
|
|
} catch (Exception e) {
|
|
|
@@ -253,7 +282,7 @@ public class ChargeFeeVoController {
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "重打结算单的收费清单成功");
|
|
|
List<ChargeFeeVo> chargeFeeVos = chargeFeeVoService.queryChargeFeeVoReprint(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getCaseType(), chargeFeeParamsVo.getDcountDate());
|
|
|
- fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.NO);
|
|
|
+ fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.YES);
|
|
|
resultMap.put("data", chargeFeeVos);
|
|
|
return resultMap;
|
|
|
} catch (Exception e) {
|
|
|
@@ -447,7 +476,7 @@ public class ChargeFeeVoController {
|
|
|
//重打日结收费清单
|
|
|
if (type == 1) {
|
|
|
List<ChargeFeeVo> chargeFeeVos = chargeFeeVoService.queryChargeFeeVoReprint(opId, YesNoEnum.NO.code.toString(), dcountDateD);
|
|
|
- fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.NO);
|
|
|
+ fomartChargeVo(chargeFeeVos, YesNoEnum.NO,YesNoEnum.YES);
|
|
|
ExcelUtil.exportExcelForChargeDetail(request, response, chargeFeeVos);
|
|
|
return null;
|
|
|
}
|