|
@@ -5,16 +5,20 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.constants.GetDateFormat;
|
|
|
+import thyyxxk.webserver.dao.his.zhuyuanyiji.PatientFee;
|
|
|
import thyyxxk.webserver.dao.his.zhuyuanyiji.QueRenYiZhuShouFeiDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
|
import thyyxxk.webserver.entity.inpatient.patient.Patient;
|
|
|
+import thyyxxk.webserver.entity.yiji.YzZyPatientFeeData;
|
|
|
import thyyxxk.webserver.service.PublicServer;
|
|
|
import thyyxxk.webserver.service.inpatient.PatientService;
|
|
|
import thyyxxk.webserver.utils.*;
|
|
@@ -32,16 +36,13 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
+@RequiredArgsConstructor
|
|
|
public class QueRenYiZhuShouFeiServer {
|
|
|
private final QueRenYiZhuShouFeiDao dao;
|
|
|
private final PublicServer publicServer;
|
|
|
private final PatientService patientService;
|
|
|
+ private final PatientFee feeDao;
|
|
|
|
|
|
- public QueRenYiZhuShouFeiServer(QueRenYiZhuShouFeiDao dao, PublicServer server, PatientService patientService) {
|
|
|
- this.dao = dao;
|
|
|
- this.publicServer = server;
|
|
|
- this.patientService = patientService;
|
|
|
- }
|
|
|
|
|
|
public QueRenYiZhuShouFeiServer getThis() {
|
|
|
return SpringUtil.getBean(this.getClass());
|
|
@@ -62,7 +63,7 @@ public class QueRenYiZhuShouFeiServer {
|
|
|
String fenLei = "a.ward_code";
|
|
|
if (yzActOrder.getFenLei() != null && yzActOrder.getFenLei().equals(1)) {
|
|
|
fenLei = "(select count(*) from yz_zy_patient_fee " +
|
|
|
- "where op_id = '" + TokenUtil.getInstance().getTokenUserId() + "' and inpatient_no = a.inpatient_no and admiss_times = a.admiss_times and charge_status <> 3) desc";
|
|
|
+ "where op_id = '" + TokenUtil.getInstance().getTokenUserId() + "' and inpatient_no = a.inpatient_no and admiss_times = a.admiss_times and charge_status <> 3) desc";
|
|
|
}
|
|
|
page.setTotal(dao.getXuQueFeiYiZhuTotal(yzActOrder.getInpatientNo(), yzActOrder.getWardCode(), execUnitList, yzActOrder.getStartTimeString(),
|
|
|
yzActOrder.getEndTimeString()));
|
|
@@ -150,7 +151,7 @@ public class QueRenYiZhuShouFeiServer {
|
|
|
Collectors.toMap(L -> L.getInpatientNo() + L.getAdmissTimes() + DateUtil.formatDatetime(L.getOccTime()) + L.getChargeCode() + L.getChargeFee() + L.getOrderCount() + L.getActOrderNo(), a -> a, (k1, k2) -> k2));
|
|
|
for (YzActOrder yzActOrder : xuYaoQueFei) {
|
|
|
String key = yzActOrder.getInpatientNo() + yzActOrder.getAdmissTimes() + DateUtil.formatDatetime(yzActOrder.getOccTime()) +
|
|
|
- yzActOrder.getChargeCode() + yzActOrder.getChargeFee() + yzActOrder.getOrderCount() + yzActOrder.getActOrderNo();
|
|
|
+ yzActOrder.getChargeCode() + yzActOrder.getChargeFee() + yzActOrder.getOrderCount() + yzActOrder.getActOrderNo();
|
|
|
if (yiQueFeiMap.containsKey(key)) {
|
|
|
YzActOrder queRenTiShi = yiQueFeiMap.get(key);
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("存在已被确费的项目,请对该项目选择不操作或刷新数据重新加载。 !!!∑(゚Д゚ノ)ノ <br>患者姓名:【%s】<br>项目:【%s】<br> 医嘱号:【%s】<br> 医嘱时间:【%s】<br>执行人:【%s】<br> 操作时间:【%s】", queRenTiShi.getPatientName(),
|
|
@@ -188,4 +189,5 @@ public class QueRenYiZhuShouFeiServer {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|