|
@@ -18,6 +18,7 @@ import cn.hnthyy.thmz.service.his.mz.*;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdChequeTypeService;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
|
|
|
import cn.hnthyy.thmz.service.his.zy.ZyZdAuditItemService;
|
|
|
+import cn.hnthyy.thmz.service.thmz.ClinicService;
|
|
|
import cn.hnthyy.thmz.service.thmz.FileUploadService;
|
|
|
import cn.hnthyy.thmz.service.thmz.MzmxsrService;
|
|
|
import cn.hnthyy.thmz.service.thmz.UserService;
|
|
@@ -31,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -68,6 +70,8 @@ public class ChargeFeeVoController {
|
|
|
private ZyZdAuditItemService zyZdAuditItemService;
|
|
|
@Autowired
|
|
|
private RegionService regionService;
|
|
|
+ @Autowired
|
|
|
+ private ClinicService clinicService;
|
|
|
/**
|
|
|
* 查询日结列表收费清单 未结账
|
|
|
*
|
|
@@ -1369,6 +1373,11 @@ public class ChargeFeeVoController {
|
|
|
for (Map<String, Object> map : mzList) {
|
|
|
tempMap.put(map.get("doctor_code") + "_" + map.get("charge_date"), map);
|
|
|
Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
|
|
|
+ // 门诊就诊人数
|
|
|
+ Map<String, Object> rsMap = clinicService.queryMzVisitRs(beginDate, endDate, (String) map.get("doctor_code"), (String) map.get("charge_date"));
|
|
|
+ map.put("patient_num", rsMap.get("patient_num"));
|
|
|
+ map.put("avg_fee", (String.valueOf(rsMap.get("patient_num")).equals("0")) ? "" :
|
|
|
+ BigDecimal.valueOf((Double) map.get("je")).divide(new BigDecimal((Long) rsMap.get("patient_num")), RoundingMode.CEILING));
|
|
|
if(employee!=null){
|
|
|
map.put("doctor_name",employee.getEmployeeName());
|
|
|
map.put("codeRs",employee.getCodeRs());
|
|
@@ -1396,6 +1405,11 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
for (Map<String, Object> map : mzList) {
|
|
|
Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
|
|
|
+ // 门诊就诊人数
|
|
|
+ Map<String, Object> rsMap = clinicService.queryMzVisitRs(beginDate, endDate, (String) map.get("doctor_code"), (String) map.get("charge_date"));
|
|
|
+ map.put("patient_num", rsMap.get("patient_num"));
|
|
|
+ map.put("avg_fee", (String.valueOf(rsMap.get("patient_num")).equals("0")) ? "" :
|
|
|
+ BigDecimal.valueOf((Double) map.get("je")).divide(new BigDecimal((Long) rsMap.get("patient_num")), RoundingMode.CEILING));
|
|
|
if(employee!=null){
|
|
|
map.put("doctor_name",employee.getEmployeeName());
|
|
|
map.put("codeRs",employee.getCodeRs());
|
|
@@ -1463,6 +1477,11 @@ public class ChargeFeeVoController {
|
|
|
for (Map<String, Object> map : mzList) {
|
|
|
tempMap.put((String) map.get("doctor_code"), map);
|
|
|
Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
|
|
|
+ // 门诊就诊人数
|
|
|
+ Map<String, Object> rsMap = clinicService.queryMzVisitRs(beginDate, endDate, (String) map.get("doctor_code"), null);
|
|
|
+ map.put("patient_num", rsMap.get("patient_num"));
|
|
|
+ map.put("avg_fee", (String.valueOf(rsMap.get("patient_num")).equals("0")) ? "" :
|
|
|
+ BigDecimal.valueOf((Double) map.get("je")).divide(new BigDecimal((Long) rsMap.get("patient_num")), RoundingMode.CEILING));
|
|
|
if(employee!=null){
|
|
|
map.put("doctor_name",employee.getEmployeeName());
|
|
|
map.put("codeRs",employee.getCodeRs());
|
|
@@ -1490,6 +1509,11 @@ public class ChargeFeeVoController {
|
|
|
}
|
|
|
for (Map<String, Object> map : mzList) {
|
|
|
Employee employee=employeeService.queryByUserCode((String) map.get("doctor_code"));
|
|
|
+ // 门诊就诊人数
|
|
|
+ Map<String, Object> rsMap = clinicService.queryMzVisitRs(beginDate, endDate, (String) map.get("doctor_code"), null);
|
|
|
+ map.put("patient_num", rsMap.get("patient_num"));
|
|
|
+ map.put("avg_fee", (String.valueOf(rsMap.get("patient_num")).equals("0")) ? "" :
|
|
|
+ BigDecimal.valueOf((Double) map.get("je")).divide(new BigDecimal((Long) rsMap.get("patient_num")), RoundingMode.CEILING));
|
|
|
if(employee!=null){
|
|
|
map.put("doctor_name",employee.getEmployeeName());
|
|
|
map.put("codeRs",employee.getCodeRs());
|