소스 검색

优化发票作废问题

hsh 2 주 전
부모
커밋
7168553b7e

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/his/medicine/YpSelinfoSoldDao.java

@@ -18,7 +18,7 @@ public interface YpSelinfoSoldDao extends BaseMapper<YpSelinfoSold> {
     @Delete("<script> " +
             " <foreach collection='list' item='item' separator=';'> " +
             "   delete from yp_selinfo_sold where pat_no = #{item.patNo} and times = #{item.times} " +
-            "   and receipt_no = #{item.receiptNo} and order_no = #{item.orderNo} and item_no = #{item.itemNo} " +
+            "   and order_no = #{item.orderNo} and item_no = #{item.itemNo} " +
             " </foreach> " +
             "</script>")
     void deleteYpSelinfoSoldBatchByIds(List<YpSelinfoSold> list);
@@ -26,7 +26,7 @@ public interface YpSelinfoSoldDao extends BaseMapper<YpSelinfoSold> {
     @Delete("<script> " +
             " <foreach collection='list' item='item' separator=';'> " +
             "   delete from yp_selinfo_sold where pat_no = #{item.patNo} and times = #{item.times} " +
-            "   and receipt_no = #{item.receiptNo} and order_no = #{item.orderNo} and item_no = #{item.itemNo} " +
+            "   and order_no = #{item.orderNo} and item_no = #{item.itemNo} " +
             " </foreach> " +
             "</script>")
     int deleteYpSelinfoSoldBatchByCodes(List<YpCodgUpload> list);

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicine/YpTracCodgDao.java

@@ -118,7 +118,7 @@ public interface YpTracCodgDao {
             "left join t_si_setlinfo as si on si.revoked = '0' and fy.patient_id = si.pat_no and fy.times = si.times " +
             "inner join (select distinct patient_id, times, receipt_no, order_no, item_no from mz_drug_trac_codg where flag = '0') as cd " +
             " on fy.patient_id = cd.patient_id and fy.times = cd.times " +
-            "and fy.receipt_no = cd.receipt_no and fy.order_no = cd.order_no and fy.item_no = cd.item_no " +
+            " and fy.order_no = cd.order_no and fy.item_no = cd.item_no " +
             "where not exists ( select 1 from yp_selinfo_sold so " +
             " where so.is_ty = '0' and so.upload_flag = '1' and fy.patient_id = so.pat_no and fy.times = so.times" +
             " and fy.receipt_no = so.receipt_no and fy.order_no = so.order_no and fy.item_no = so.item_no )" +