Selaa lähdekoodia

中草药单确认生成费用后不允许再发药上账

hsh 8 kuukautta sitten
vanhempi
commit
924a254a95

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

@@ -345,4 +345,7 @@ public interface YpZyPatientMapper {
             "</script>"})
     void insertSummaryData(List<YpSummaryPrint> summaryData);
 
+    @Select(" select count(1) as cs from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and order_no = #{orderNo} ")
+    int selectYpZyPatientFyFee(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("orderNo") Integer orderNo);
+
 }

+ 4 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/yf/YfWardPrescriptionServiceImpl.java

@@ -729,6 +729,10 @@ public class YfWardPrescriptionServiceImpl implements YfWardPrescriptionService
             if(cy != null){
                 throw new MzException("确认发药失败,请勿重复发药!药单号:" + pageNo);
             }
+            int num = ypZyPatientMapper.selectYpZyPatientFyFee(yzActOrderCy.getInpatientNo(), yzActOrderCy.getAdmissTimes(), yzActOrderCy.getOrderNo());
+            if(num > 0){
+                throw new MzException("确认发药失败,该药单已生成费用!药单号:" + pageNo);
+            }
             zyDetailChargeMapper.updateChargeStatus("2", yzActOrderCy.getOrderNo(), yzActOrderCy.getOrderCodeDj());
             ZyLedgerFile zyLedgerFile = new ZyLedgerFile();
             zyLedgerFile.setInpatientNo(yzActOrderCy.getInpatientNo());