瀏覽代碼

优化退药的金额

DESKTOP-0GD05B0\Administrator 2 年之前
父節點
當前提交
c8e879401b

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/his/inpatient/XiangMuLuRuDao.java

@@ -249,7 +249,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
             "values " +
             "<foreach collection='list' item='item' index='index' separator=','>" +
             "(#{patNo}, #{times}, #{name}, #{bedNo}, #{wardCode},  #{wardCode}, #{item.chargeCodeMx}, #{item.chargeAmount,jdbcType=REAL}, " +
-            "        #{item.chargeFee,jdbcType=REAL}, getdate(), #{infantFlag}, #{userCode}, 'a', '1', " +
+            "       (select pack_retprice from yp_zd_dict where code = #{item.chargeCodeMx} and serial = #{item.serial}), getdate(), #{infantFlag}, #{userCode}, 'a', '1', " +
             "       #{item.drugClass},  getdate(), ${index}, #{item.serial}, #{groupNo}, " +
             "       #{item.doctorCode}, #{pageNo},#{ledgerSn},#{item.detailSn},0,'HT')" +
             "</foreach>" +
@@ -889,7 +889,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
             "       b.name         as drug_name, " +
             "       b.specification, " +
             "       a.amount, " +
-            "       a.retprice, " +
+            "       (-a.amount * b.pack_retprice) as retprice, " +
             "       b.pack_retprice, " +
             "       a.inpatient_no as pat_no, " +
             "       a.name, " +

+ 1 - 0
src/main/java/thyyxxk/webserver/service/inpatient/XiangMuLuRuService.java

@@ -293,6 +293,7 @@ public class XiangMuLuRuService {
                     // 医嘱表中会有 z 所以把所有 z 的换成 j
                     item.setDrugClass("z".equals(a.getDrugClass()) ? "j" : a.getDrugClass());
                 }
+
             }
 
             ZyActpatient patientInfo = publicServer.huoQuHuanZheXinXi(param.getInpatientNo());