|
@@ -91,7 +91,7 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
}
|
|
|
Map<String, String> chequeTypeMap = chequeTypes.stream().collect(Collectors.toMap(ZdChequeType::getCode, ZdChequeType::getName));
|
|
|
- Map<String,List<ChargeFeeVo>> chargeFeeMap=new HashMap();
|
|
|
+ Map<String, List<ChargeFeeVo>> chargeFeeMap = new HashMap();
|
|
|
for (ChargeFeeVo co : chargeFeeVos) {
|
|
|
PayMarkEnum payMark = PayMarkEnum.getPayMarkByCode(co.getPayMark());
|
|
|
co.setPayMark(payMark == null ? co.getPayMark() : payMark.name);
|
|
@@ -107,18 +107,18 @@ public class ChargeFeeVoController {
|
|
|
co.setOpId(employeeMap.get(co.getOpId()));
|
|
|
}
|
|
|
List<ChargeFeeVo> tempList = chargeFeeMap.get(co.getSerialNo());
|
|
|
- if(tempList==null){
|
|
|
- tempList= new ArrayList<>();
|
|
|
- chargeFeeMap.put(co.getSerialNo(),tempList);
|
|
|
+ if (tempList == null) {
|
|
|
+ tempList = new ArrayList<>();
|
|
|
+ chargeFeeMap.put(co.getSerialNo(), tempList);
|
|
|
}
|
|
|
tempList.add(co);
|
|
|
}
|
|
|
- for (String key:chargeFeeMap.keySet()){
|
|
|
- if(StringUtils.isNotBlank(key)){
|
|
|
- List<ChargeFeeVo> tempList= chargeFeeMap.get(key);
|
|
|
- if(tempList.size()>1){
|
|
|
- for (ChargeFeeVo co:tempList){
|
|
|
- if((Constants.BYJZ_NAME.equals(co.getChequeType()) && StringUtils.isNotBlank(co.getReceiptBill())) || (!Constants.BYJZ_NAME.equals(co.getChequeType()) && StringUtils.isBlank(co.getReceiptBill())) ){
|
|
|
+ for (String key : chargeFeeMap.keySet()) {
|
|
|
+ if (StringUtils.isNotBlank(key)) {
|
|
|
+ List<ChargeFeeVo> tempList = chargeFeeMap.get(key);
|
|
|
+ if (tempList.size() > 1) {
|
|
|
+ for (ChargeFeeVo co : tempList) {
|
|
|
+ if ((Constants.BYJZ_NAME.equals(co.getChequeType()) && StringUtils.isNotBlank(co.getReceiptBill())) || (!Constants.BYJZ_NAME.equals(co.getChequeType()) && StringUtils.isBlank(co.getReceiptBill()))) {
|
|
|
chargeFeeVos.remove(co);
|
|
|
}
|
|
|
}
|
|
@@ -562,7 +562,7 @@ public class ChargeFeeVoController {
|
|
|
return resultMap;
|
|
|
}
|
|
|
//数据清洗,将在老系统日结的数据清洗一次
|
|
|
- // chargeFeeVoService.refeshPayManData(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
|
|
|
+ // chargeFeeVoService.refeshPayManData(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
|
|
|
//门诊部日结没有设置收费人id ,需要清洗
|
|
|
chargeFeeVoService.modifyMzService();
|
|
|
User tokenUser = userService.queryUserByUserIdCode(chargeFeeParamsVo.getOpId());
|
|
@@ -666,24 +666,6 @@ public class ChargeFeeVoController {
|
|
|
resultMap.put("message", "查询费用汇总报表失败,查询时间为空");
|
|
|
return resultMap;
|
|
|
}
|
|
|
-
|
|
|
-// List<String> operaotors = chargeFeeVoService.queryAllOperatorFromReceipt(chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
-// List<String> ghOperaotors = chargeFeeVoService.queryAllOperatorFromReqrec(chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
-// ghOperaotors.forEach(o -> {
|
|
|
-// if (!operaotors.contains(o)) {
|
|
|
-// operaotors.add(o);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// List<DcountDateListVo> dcountDateListVos = new ArrayList<>();
|
|
|
-// for (String opId : ghOperaotors) {
|
|
|
-// dcountDateListVos.addAll(chargeFeeVoService.queryDcountDateList(opId, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()));
|
|
|
-// }
|
|
|
-//
|
|
|
-// for (DcountDateListVo ddv : dcountDateListVos) {
|
|
|
-// //数据清洗,将在老系统日结的数据清洗一次
|
|
|
-// chargeFeeVoService.refeshPayManData(ddv.getOperatorId(), ddv.getDcountDate());
|
|
|
-// }
|
|
|
-// chargeFeeVoService.refeshInconformityData(chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
//门诊部日结没有设置收费人id ,需要清洗
|
|
|
chargeFeeVoService.modifyMzService();
|
|
|
//挂号收入构成表格数据
|
|
@@ -696,10 +678,10 @@ public class ChargeFeeVoController {
|
|
|
ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(null, null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()).get(0);
|
|
|
chargeCountVo.fomartChargeCountVo();
|
|
|
resultMap.put("chargeCountVo", chargeCountVo);
|
|
|
- List<WorkloadVo> ghWorkloadVos = chargeFeeVoService.queryGhWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
+ List<WorkloadVo> ghWorkloadVos = chargeFeeVoService.queryGhWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate(), null, YesNoEnum.YES);
|
|
|
frmartWorkloadVo(ghWorkloadVos);
|
|
|
resultMap.put("ghWorkloadVos", ghWorkloadVos);
|
|
|
- List<WorkloadVo> sfWorkloadVos = chargeFeeVoService.querySfWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
|
|
|
+ List<WorkloadVo> sfWorkloadVos = chargeFeeVoService.querySfWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate(), null, YesNoEnum.YES);
|
|
|
frmartWorkloadVo(sfWorkloadVos);
|
|
|
resultMap.put("sfWorkloadVos", sfWorkloadVos);
|
|
|
//resultMap.put("user", tokenUser);
|
|
@@ -723,6 +705,80 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 收费员挂号与收费工作量统计
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @UserLoginToken
|
|
|
+ @RequestMapping(value = "/getCasherWorkCount", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ public Map<String, Object> getCasherWorkCount(@RequestBody ChargeFeeParamsVo chargeFeeParamsVo) {
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ try {
|
|
|
+ if (chargeFeeParamsVo == null) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "收费员挂号与收费工作量统计失败,参数为空");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(chargeFeeParamsVo.getOpId())) {
|
|
|
+ chargeFeeParamsVo.setOpId(null);
|
|
|
+ }
|
|
|
+ if (chargeFeeParamsVo.getBeginDate() == null || chargeFeeParamsVo.getEndDate() == null) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "收费员挂号与收费工作量统计失败,查询时间为空");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ List<WorkloadVo> ghWorkloadVos = chargeFeeVoService.queryGhWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate(), chargeFeeParamsVo.getOpId(), null);
|
|
|
+ frmartWorkloadVo(ghWorkloadVos);
|
|
|
+ List<WorkloadVo> sfWorkloadVos = chargeFeeVoService.querySfWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate(), chargeFeeParamsVo.getOpId(), null);
|
|
|
+ frmartWorkloadVo(sfWorkloadVos);
|
|
|
+ List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
+ Map<String, Map<String, Object>> allMap = new HashMap<>();
|
|
|
+ for (WorkloadVo workloadVo : ghWorkloadVos) {
|
|
|
+ if(workloadVo.getOpId()==null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Map<String, Object> temp = new HashMap<>();
|
|
|
+ temp.put("opId", workloadVo.getOpId());
|
|
|
+ temp.put("opName", workloadVo.getOpName());
|
|
|
+ temp.put("ghCount", workloadVo.getPtCount());
|
|
|
+ temp.put("ghAmount", workloadVo.getPtAmount());
|
|
|
+ temp.put("thCount", workloadVo.getThCount());
|
|
|
+ temp.put("thAmount", workloadVo.getThAmount());
|
|
|
+ resultList.add(temp);
|
|
|
+ allMap.put(workloadVo.getOpId(), temp);
|
|
|
+ }
|
|
|
+ for (WorkloadVo workloadVo : sfWorkloadVos) {
|
|
|
+ if(workloadVo.getOpId()==null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Map<String, Object> temp = allMap.get(workloadVo.getOpId());
|
|
|
+ if (temp == null) {
|
|
|
+ temp = new HashMap<>();
|
|
|
+ resultList.add(temp);
|
|
|
+ allMap.put(workloadVo.getOpId(), temp);
|
|
|
+ temp.put("opId", workloadVo.getOpId());
|
|
|
+ temp.put("opName", workloadVo.getOpName());
|
|
|
+ }
|
|
|
+ temp.put("sfCount", workloadVo.getPtCount());
|
|
|
+ temp.put("sfAmount", workloadVo.getPtAmount());
|
|
|
+ temp.put("tfCount", workloadVo.getThCount());
|
|
|
+ temp.put("tfAmount", workloadVo.getThAmount());
|
|
|
+ }
|
|
|
+ resultMap.put("code", 0);
|
|
|
+ resultMap.put("message", "收费员挂号与收费工作量统计成功");
|
|
|
+ resultMap.put("data", resultList);
|
|
|
+ return resultMap;
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("收费员挂号与收费工作量统计失败,错误信息{}", e.getMessage());
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "收费员挂号与收费工作量统计失败");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private void frmartWorkloadVo(List<WorkloadVo> workloadVos) {
|
|
|
if (workloadVos != null && workloadVos.size() > 0) {
|
|
|
WorkloadVo totalWorkloadVo = new WorkloadVo();
|
|
@@ -735,7 +791,7 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
}
|
|
|
for (WorkloadVo wo : workloadVos) {
|
|
|
- wo.setOpId(employeeMap.get(wo.getOpId()));
|
|
|
+ wo.setOpName(employeeMap.get(wo.getOpId()));
|
|
|
if (totalWorkloadVo.getPtCount() == null) {
|
|
|
totalWorkloadVo.setPtCount(wo.getPtCount());
|
|
|
} else {
|
|
@@ -982,7 +1038,7 @@ public class ChargeFeeVoController {
|
|
|
List<Map<String, Object>> thmzmxsrs = chargeFeeVoService.queryThmzmxsr(thmzmxsrParamsVo);
|
|
|
thmzmxsrParamsVo.setHisData(YesNoEnum.YES);
|
|
|
List<Map<String, Object>> thmzmxsrsHis = chargeFeeVoService.queryThmzmxsr(thmzmxsrParamsVo);
|
|
|
- BigDecimal totalAmount = fomartThmzmxsr(thmzmxsrs,thmzmxsrsHis);
|
|
|
+ BigDecimal totalAmount = fomartThmzmxsr(thmzmxsrs, thmzmxsrsHis);
|
|
|
resultMap.put("data", thmzmxsrs);
|
|
|
resultMap.put("totalAmount", totalAmount);
|
|
|
return resultMap;
|
|
@@ -996,7 +1052,7 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private BigDecimal fomartThmzmxsr(List<Map<String, Object>> thmzmxsrs,List<Map<String, Object>> thmzmxsrsHis) {
|
|
|
+ private BigDecimal fomartThmzmxsr(List<Map<String, Object>> thmzmxsrs, List<Map<String, Object>> thmzmxsrsHis) {
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
if (thmzmxsrs != null && thmzmxsrs.size() > 0) {
|
|
|
List<MzBillItem> mzBillItems = mzBillItemService.queryMzBillItem();
|
|
@@ -1011,12 +1067,12 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
Set<Date> repeatSet = new HashSet<>();
|
|
|
for (Map<String, Object> map : thmzmxsrs) {
|
|
|
- repeatSet.add((Date)map.get("dcount_date"));
|
|
|
+ repeatSet.add((Date) map.get("dcount_date"));
|
|
|
totalAmount = getBigDecimal(totalAmount, mzBillItemMap, employeeMap, map);
|
|
|
}
|
|
|
|
|
|
for (Map<String, Object> map : thmzmxsrsHis) {
|
|
|
- if(repeatSet.contains(map.get("dcount_date"))){
|
|
|
+ if (repeatSet.contains(map.get("dcount_date"))) {
|
|
|
continue;
|
|
|
}
|
|
|
totalAmount = getBigDecimal(totalAmount, mzBillItemMap, employeeMap, map);
|
|
@@ -1110,7 +1166,7 @@ public class ChargeFeeVoController {
|
|
|
List<Map<String, Object>> thmzmxsrs = chargeFeeVoService.queryThmzmxsr(thmzmxsrParamsVo);
|
|
|
thmzmxsrParamsVo.setHisData(YesNoEnum.YES);
|
|
|
List<Map<String, Object>> thmzmxsrsHis = chargeFeeVoService.queryThmzmxsr(thmzmxsrParamsVo);
|
|
|
- fomartThmzmxsr(thmzmxsrs,thmzmxsrsHis);
|
|
|
+ fomartThmzmxsr(thmzmxsrs, thmzmxsrsHis);
|
|
|
ExcelUtil.exportExcelForThmzmxsrs(request, response, thmzmxsrs);
|
|
|
return null;
|
|
|
}
|