Переглянути джерело

优化门诊修改姓名后费用清单异常的问题

hurugang 5 роки тому
батько
коміт
7857a53fc7

+ 3 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/MzChargeDetailMapper.java

@@ -452,6 +452,9 @@ public interface MzChargeDetailMapper {
     @Update({"<script>",
             "update mz_charge_detail ",
             "<trim prefix='set' prefixOverrides=',' suffix=' where patient_id = #{patientId} and times=#{times} and receipt_no=#{receiptNo}' >",
+            "<when test='name!=null'>",
+            ",name =#{name,jdbcType=CHAR}",
+            "</when>",
             "<when test='payMark!=null'>",
             ",pay_mark =#{payMark,jdbcType=CHAR}",
             "</when>",

+ 3 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -397,6 +397,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzVisitTable == null) {
             throw new MzException("当前病人就诊基础资料【MzVisitTable】不存在,请检查");
         }
+        MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(mzDepositFileVo.getPatientId());
         Integer receiptNo = mzVisitTable.getReceiptNo() + 1;
         //入库收费明细数据开始
         MzChargeDetail mzChargeDetail = new MzChargeDetail(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes());
@@ -404,11 +405,12 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         getMzChargeDetailService().saveMzChargeDetail(mzChargeDetails);
         mzChargeDetail.setPrintFlag(YesNoEnum.NO.code.toString());
         mzChargeDetail.setReceiptNo(receiptNo);
+        mzChargeDetail.setName(mzPatientMi.getName());
         mzChargeDetailMapper.setTempDataReceiptNo(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), receiptNo);
         mzChargeDetailMapper.updatePayMakAndPrintFlag(mzChargeDetail);
         //入库收费明细数据结束
 
-        MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(mzDepositFileVo.getPatientId());
+
         List<MzChargeDetail> mzChargeDetailList = mzChargeDetailMapper.selectMzChargeDetailByPatientId(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), null, PayMarkEnum.NO_CHARGE.code);
         //所有应收费用的明细 将所有费用按照类型归类
         Map<String, BigDecimal> feeMap = new HashMap<>();