Sfoglia il codice sorgente

本院记账收费优化

hurugang 5 anni fa
parent
commit
c3d247b6d0

+ 1 - 1
src/main/java/cn/hnthyy/thmz/controller/MzChargeDetailController.java

@@ -113,7 +113,7 @@ public class MzChargeDetailController {
                 }
                 pageViewVo.setPageIndex(mzChargeDetailPageDto.getPageIndex());
                 pageViewVo.setPageSize(mzChargeDetailPageDto.getPageSize());
-                mzChargeDetailService.refshOldSystemReceiptData();
+                //mzChargeDetailService.refshOldSystemReceiptData();
                 pageViewVo.setTotal(mzChargeDetailService.countMzChargeDetail(mzChargeDetailPageDto));
                 mzChargeDetails = mzChargeDetailService.queryMzChargeDetailWithPage(mzChargeDetailPageDto);
             }

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

@@ -402,6 +402,12 @@ public interface MzChargeDetailMapper {
             "<when test='confirmFlag!=null'>",
             ",confirm_flag =#{confirmFlag,jdbcType=CHAR}",
             "</when>",
+            "<when test='serialNo!=null'>",
+            ",serial_no =#{serialNo,jdbcType=INTEGER}",
+            "</when>",
+            "<when test='realNo!=null'>",
+            ",real_no =#{realNo,jdbcType=INTEGER}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updatePayMakAndPrintFlag(MzChargeDetail mzChargeDetail);

+ 8 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/MzYpFydlMapper.java

@@ -35,4 +35,12 @@ public interface MzYpFydlMapper {
      */
     @Delete("delete from mz_yp_fydl  where patient_id = #{patientId} and times = #{times}")
     int deleteMzYpFydl(@Param(value = "patientId") String patientId, @Param("times") Integer times);
+
+    /**
+     * 修改本院记账的发药队列的流水号为新收款的流水号
+     * @param mzYpFydl
+     * @return
+     */
+    @Update("update mz_yp_fydl set serial_no=#{serialNo} where patient_id = #{patientId} and times = #{times} ")
+    int updateSeralNoForByjz(MzYpFydl mzYpFydl);
 }

+ 7 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/YpMzFytjMapper.java

@@ -173,6 +173,12 @@ public interface YpMzFytjMapper {
             "ORDER BY yp_mz_fytj.item_no ASC ",
             "</script>"})
     List<Map<String,Object>> selectYpMx(ChargeFeeParamsVo chargeFeeParamsVo);
-
+    /**
+     * 修改本院记账的发药统计的流水号为新收款的流水号
+     * @param ypMzFytj
+     * @return
+     */
+    @Update("update yp_mz_fytj set serial_no=#{serialNo} where patient_id = #{patientId} and times = #{times} ")
+    int updateSeralNoForByjz(YpMzFytj ypMzFytj);
 
 }

+ 18 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/MzChargeDetailServiceImpl.java

@@ -423,6 +423,24 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         mzDepositFileService.batchSaveMzDepositFile(newMzDepositFileList);
         List<MzReceiptSerial> newMzReceiptSerialList = getMzReceiptSerials(opId, mzDepositFileVo, now, serialNo);
         mzReceiptSerialService.batchSaveMzReceiptSerial(newMzReceiptSerialList);
+        //将新生成的收费流水号设置到收费明细
+        MzChargeDetail mzChargeDetail = new MzChargeDetail(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes());
+        mzChargeDetail.setSerialNo(serialNo);
+        mzChargeDetail.setRealNo(serialNo);
+        //如果有发药队列,修改发药统计的流水号
+        MzYpFydl mzYpFydl = new MzYpFydl();
+        mzYpFydl.setSerialNo(serialNo);
+        mzYpFydl.setPatientId(mzDepositFileVo.getPatientId());
+        mzYpFydl.setTimes(mzDepositFileVo.getTimes());
+        mzYpFydlMapper.updateSeralNoForByjz(mzYpFydl);
+        //如果有发药统计,修改发药统计的流水号
+        YpMzFytj ypMzFytj = new YpMzFytj();
+        ypMzFytj.setSerialNo(serialNo);
+        ypMzFytj.setPatientId(mzDepositFileVo.getPatientId());
+        ypMzFytj.setTimes(mzDepositFileVo.getTimes());
+        ypMzFytjMapper.updateSeralNoForByjz(ypMzFytj);
+        mzChargeDetailMapper.updatePayMakAndPrintFlag(mzChargeDetail);
+
         return newMzDepositFileList.get(0).getReceiptNo();
     }