Selaa lähdekoodia

优化查询已诊列表费用明细

hurugang 2 vuotta sitten
vanhempi
commit
360614dd84

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

@@ -2236,7 +2236,7 @@ public class MedicalViewApiController {
             String[] arr = djh.split("_");
             MzChargeDetail mzChargeDetail = new MzChargeDetail(arr[0], Integer.valueOf(arr[1]));
             mzChargeDetail.setReceiptNo(Integer.valueOf(arr[2]));
-            List<MzChargeDetail> mzChargeDetailList = mzChargeDetailService.queryMzChargeDetailByBillItemCode(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(), PayMarkEnum.CHARGED.code, "2", Arrays.asList("TC"));
+            List<MzChargeDetail> mzChargeDetailList = mzChargeDetailService.queryMzChargeDetailByBillItemCode(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(), PayMarkEnum.CHARGED.code, "3", Arrays.asList("TC"));
             if (mzChargeDetailList == null || mzChargeDetailList.size() == 0) {
                 results.put("resultCode", -1);
                 results.put("resultMessage", "未查询到已缴费明细记录");

+ 4 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzChargeDetailMapper.java

@@ -95,7 +95,7 @@ public interface MzChargeDetailMapper {
      * @param patientId
      * @param times
      * @param payMark
-     * @param billItemCode  0 ,1 都是in 2 not in
+     * @param billItemCode  0 医材或者在查询的编码集中;1 只在编码集中; 2 不是医材且不在编码集中;  3  不在编码集中
      * @param billItemTypes
      * @return
      */
@@ -113,6 +113,9 @@ public interface MzChargeDetailMapper {
             "rtrim(chequ_type) chequ_type,rtrim(print_flag_yj) print_flag_yj,rtrim(confirm_flag_qx) confirm_flag_qx,group_id ",
             "from dbo.mz_charge_detail WITH(NOLOCK) where pay_mark=#{payMark,jdbcType=CHAR} and patient_id =#{patientId,jdbcType=CHAR}  and times = #{times,jdbcType=INTEGER} and receipt_no=#{receiptNo,jdbcType=INTEGER}",
             "<choose>",
+            "<when test='billItemCode==3'>",
+            " and bill_item_code not in",
+            "</when>",
             "<when test='billItemCode==2'>",
             " and group_no <![CDATA[<>]]> 91 and bill_item_code not in",
             "</when>",