Ver código fonte

Merge branch 'dev-1.1.4' into 'dev-1.1.4'

增加退药原因显示,优化排队显示机制

See merge request lihong/thmz_system!105
huangshuhua 7 meses atrás
pai
commit
5bee403573

+ 5 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzPharmacyController.java

@@ -615,7 +615,11 @@ public class MzPharmacyController {
             mzPharmacyService.updateMzDrugWinPatientNum(mzChargeDetail, 1);
 
             // 删除当天排队人信息
-            ypPdQueueService.deleteYpPdStatus(mzChargeDetail.getPatientId());
+            // 查看这次处方是否已经全部发药完成
+            List<MzChargeDetail> fy = mzPharmacyService.getMzCfWfy(mzChargeDetail);
+            if(null == fy || fy.isEmpty()){
+                ypPdQueueService.deleteYpPdStatus(mzChargeDetail.getPatientId());
+            }
 
             return resultMap;
         } catch (Exception e) {

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

@@ -296,6 +296,7 @@ public interface MzPharmacyMapper {
             "         yp_mz_fytj.self_flag,   " +
             "         yp_mz_fytj.response_type,   " +
             "         yp_mz_fytj.warn_dept  ," +
+            "         yp_mz_fytj.refund_medicine_remark  ," +
             "         real_no=yp_mz_fytj.real_no," +
             "         win_no = yp_mz_fytj.win_no " +
             "    FROM yp_mz_fytj WITH(NOLOCK) , " +
@@ -1186,4 +1187,9 @@ public interface MzPharmacyMapper {
     @Update("update mz_charge_detail set confirm_flag = #{confirmFlag}, dec_amount = 0 " +
             "where real_no =#{realNo} and group_no = #{groupNo} and order_no =#{orderNo} and receipt_no = #{receiptNo} ")
     void updateChargeDetailConfirmFlagByTy(@Param("confirmFlag") String confirmFlag, @Param("realNo") Integer realNo, @Param("groupNo") String groupNo, @Param("orderNo") Integer orderNo, @Param("receiptNo") Integer receiptNo);
+
+    @Select(" select * from mz_charge_detail " +
+            " where pay_mark = '0' and group_no = #{groupNo} and confirm_flag in ('0', '5')" +
+            " and patient_id = #{patientId} and times = #{times} and receipt_no = #{receiptNo} ")
+    List<MzChargeDetail> getMzCfWfy(MzChargeDetail mzChargeDetail);
 }

+ 9 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/MzPharmacyService.java

@@ -214,4 +214,13 @@ public interface MzPharmacyService {
      **/
     int updateMzDrugWinPatientNum(MzChargeDetail mzChargeDetail, int num);
 
+    /**
+     * @Description 根据病人就诊信息查询还有没有未发药的处方
+     * @Author hsh
+     * @param
+     * @return
+     * @Date 2025/2/27 9:40
+     */
+    List<MzChargeDetail> getMzCfWfy(MzChargeDetail mzChargeDetail);
+
 }

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzPharmacyServiceImpl.java

@@ -486,6 +486,11 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
         return 0;
     }
 
+    @Override
+    public List<MzChargeDetail> getMzCfWfy(MzChargeDetail mzChargeDetail) {
+        return mzPharmacyMapper.getMzCfWfy(mzChargeDetail);
+    }
+
     @Override
     public List<ChargeDetailInfoVo> getFyclWfyPrescription(ChargeFeeParamsVo chargeFeeParamsVo) {
         return mzPharmacyMapper.selectFyclWfyPrescription(chargeFeeParamsVo);

+ 12 - 0
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -1516,6 +1516,18 @@ function fitfymx(patientId, times, receiptNo, orderNo, groupNoOut) {
                 formatter: function (value, row, index) {
                     return '<span style="color: red">' + value + '</span>'
                 }
+            }, {
+                field: 'refund_medicine_remark',
+                title: '退药原因',
+                align: "center",
+                valign: 'middle',
+                formatter: function (value, row, index) {
+                    if(row.dec_amount > 0){
+                        return value;
+                    } else {
+                        return ''
+                    }
+                }
             }
         ],
         responseHandler: function (res) {