|
@@ -37,6 +37,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.collections4.Transformer;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
@@ -149,6 +150,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
@SuppressWarnings("all")
|
|
|
@Autowired
|
|
|
private MzZyReqMapper mzZyReqMapper;
|
|
|
+ //是否加收开关
|
|
|
+ @Value("${setUnitPrice}")
|
|
|
+ private boolean setUnitPrice;
|
|
|
|
|
|
@Override
|
|
|
public int countMzChargeDetail(MzChargeDetailPageDto mzChargeDetailPageDto) {
|
|
@@ -684,7 +688,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
MzChargeDetail mzChargeDetail = new MzChargeDetail(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes());
|
|
|
mzChargeDetail.setReceiptNo(mzDepositFileVo.getReceiptNo());
|
|
|
if (mzChargeDetailList == null || mzChargeDetailList.size() == 0) {
|
|
|
- // mzChargeDetailMapper.reInsertDetail(mzChargeDetail);
|
|
|
+ // mzChargeDetailMapper.reInsertDetail(mzChargeDetail);
|
|
|
//mzChargeDetailMapper.deleteFromBak(mzChargeDetail);
|
|
|
mzChargeDetail.setChequType(Constants.BYJZ);
|
|
|
mzChargeDetailMapper.updateMzChargeDetailFull(mzChargeDetail);
|
|
@@ -724,7 +728,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> queryChargeListByPatient(String patientId, String name, String serialNo, Date beginDate, Date endDate) {
|
|
|
- List<Map<String, Object>> chargeListByPatient= mzChargeDetailMapper.selectChargeListByPatient(patientId, name, serialNo, beginDate, endDate);
|
|
|
+ List<Map<String, Object>> chargeListByPatient = mzChargeDetailMapper.selectChargeListByPatient(patientId, name, serialNo, beginDate, endDate);
|
|
|
// if (YesNoEnum.YES.equals(hisDate)) {
|
|
|
// chargeListByPatient = mzChargeDetailMapper.selectHisChargeListByPatient(patientId, name, serialNo, beginDate, endDate);
|
|
|
// } else {
|
|
@@ -844,7 +848,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
}
|
|
|
if (mzPrescriptionVo.getMzZyReq() != null && mzPrescriptionVo.getMzZyReq().getReqDept() != null && StringUtils.isNotBlank(mzPrescriptionVo.getMzZyReq().getReqDept())) {
|
|
|
- if(mzPrescriptionVo.getIcdCode()!=null && mzPrescriptionVo.getIcdCode().indexOf(",")>0){
|
|
|
+ if (mzPrescriptionVo.getIcdCode() != null && mzPrescriptionVo.getIcdCode().indexOf(",") > 0) {
|
|
|
//因为住院申请系统不支持超过10个长度的诊断编码
|
|
|
throw new MzException("住院证不允许同时出现两个及以上诊断!");
|
|
|
}
|
|
@@ -1121,8 +1125,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(otherList.size()>0){
|
|
|
- for(ZdChargeItem zd:otherList){
|
|
|
+ if (otherList.size() > 0) {
|
|
|
+ for (ZdChargeItem zd : otherList) {
|
|
|
tempAmount = (zd.getChargeAmount() == null ? BigDecimal.ZERO : zd.getChargeAmount()).multiply(zd.getNum() == null ? BigDecimal.ONE : zd.getNum());
|
|
|
//项目加价且加收比例不为空
|
|
|
tempAmount = getRaisePrice(birthDay, tempAmount, zd);
|
|
@@ -1217,7 +1221,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (amount == null) {
|
|
|
amount = BigDecimal.ZERO;
|
|
|
}
|
|
|
- if (birthDay != null) {
|
|
|
+ if (setUnitPrice && birthDay != null) {
|
|
|
int age = DateUtil.getAge(birthDay);
|
|
|
//6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
if (age < 6) {
|
|
@@ -1384,7 +1388,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
*/
|
|
|
private BigDecimal getRaisePrice(Date birthDay, BigDecimal tempAmount, ZdChargeItem tempZdChargeItem) {
|
|
|
//项目加价且加收比例不为空
|
|
|
- if (tempZdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(tempZdChargeItem.getCo()) && tempZdChargeItem.getXlCode() != null && StringUtils.isNotBlank(tempZdChargeItem.getXlCode()) && birthDay != null) {
|
|
|
+ if (setUnitPrice && tempZdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(tempZdChargeItem.getCo()) && tempZdChargeItem.getXlCode() != null && StringUtils.isNotBlank(tempZdChargeItem.getXlCode()) && birthDay != null) {
|
|
|
int age = DateUtil.getAge(birthDay);
|
|
|
//6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
if (age < 6) {
|
|
@@ -2127,7 +2131,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
// }
|
|
|
if (dbMzChargeDetail != null) {
|
|
|
mzChargeDetailMapper.updatePriceTime("mz_charge_detail", mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(), dbMzChargeDetail.getPriceTime() == null ? dbMzChargeDetail.getChargeDate() : dbMzChargeDetail.getPriceTime(), dbMzChargeDetail.getChargeDate(), dbMzChargeDetail.getSerialNo(), dbMzChargeDetail.getRealNo());
|
|
|
- // mzChargeDetailMapper.updatePriceTime("mz_charge_detail_b", mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(), dbMzChargeDetail.getPriceTime() == null ? dbMzChargeDetail.getChargeDate() : dbMzChargeDetail.getPriceTime(), dbMzChargeDetail.getChargeDate(), dbMzChargeDetail.getSerialNo(), dbMzChargeDetail.getRealNo());
|
|
|
+ // mzChargeDetailMapper.updatePriceTime("mz_charge_detail_b", mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(), dbMzChargeDetail.getPriceTime() == null ? dbMzChargeDetail.getChargeDate() : dbMzChargeDetail.getPriceTime(), dbMzChargeDetail.getChargeDate(), dbMzChargeDetail.getSerialNo(), dbMzChargeDetail.getRealNo());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4188,7 +4192,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
*/
|
|
|
private void setUnitPrice(MzPatientMi mzPatientMi, ZdChargeItem zdChargeItem, MzChargeDetail newMzChargeDetail) {
|
|
|
//项目加价且加收比例不为空
|
|
|
- if (mzPatientMi != null && mzPatientMi.getBirthDay() != null && zdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(zdChargeItem.getCo()) && zdChargeItem.getXlCode() != null && StringUtils.isNotBlank(zdChargeItem.getXlCode())) {
|
|
|
+ if (setUnitPrice && mzPatientMi != null && mzPatientMi.getBirthDay() != null && zdChargeItem.getCo() != null && YesNoEnum.YES.code.equals(zdChargeItem.getCo()) && zdChargeItem.getXlCode() != null && StringUtils.isNotBlank(zdChargeItem.getXlCode())) {
|
|
|
int age = DateUtil.getAge(mzPatientMi.getBirthDay());
|
|
|
//6岁以内的小朋友费用上调50% 根据【湘医保发〔2020〕51 号】价格通知,6岁以内的小朋友费用上调50%!
|
|
|
if (age < 6) {
|