浏览代码

发药记录查询和撤销退药修改

WANGJIALIANG 2 年之前
父节点
当前提交
cc637ce154

+ 2 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/yf/YfSpiritAnestheticPrintMapper.java

@@ -39,6 +39,7 @@ public interface YfSpiritAnestheticPrintMapper {
             " from yp_mz_fytj a WITH(NOLOCK),yp_zd_dict b WITH(NOLOCK),mz_patient_mi c WITH(NOLOCK)" +
             " where a.charge_item_code=b.code and" +
             "       a.serial=b.serial and" +
+            "       a.quantity !=0 and" +
             "       b.drug_flag in " +
             "       <foreach item='item' collection='drugFlags' separator=',' open='(' close=')'>  " +
             "           #{item}  " +
@@ -260,6 +261,7 @@ public interface YfSpiritAnestheticPrintMapper {
             "       a.item_no = g.item_no and" +
             "       g.supply_code = k.supply_code and" +
             "       isnull(a.confirm_flag,2) != 2 and" +
+            "       a.quantity !=0 and" +
             "       <when test='sendDrugRecordVo.beginDate != null'>" +
             "       a.confirm_time<![CDATA[>]]>#{sendDrugRecordVo.beginDate} and" +
             "       </when>" +

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

@@ -134,7 +134,7 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
         if (ypMzFytjs.size() > 0) {
             for (int i = 0; i < ypMzFytjs.size(); i++) {
                 YpMzFytj ypMzFytj = ypMzFytjs.get(i);
-                int j = ypBaseYfMapper.updateStockAmount(ypMzFytj.getChargeItemCode(), ypMzFytj.getSerial(), groupNo, ypMzFytj.getQuantity(),
+                int j = ypBaseYfMapper.updateStockAmount(ypMzFytj.getChargeItemCode(), ypMzFytj.getSerial(), groupNo, -ypMzFytj.getQuantity(),
                         BigDecimal.valueOf(ypMzFytj.getQuantity()).multiply(ypMzFytj.getUnitPrice()));
                 if (j != 1) {
                     log.error("撤销退药失败,退回库存异常,错误信息{}", ypMzFytj.getChargeItemCode()+","+ypMzFytj.getSerial()+","+groupNo);

+ 4 - 4
src/main/resources/templates/yk/drug_info.html

@@ -110,7 +110,7 @@
                             <span class="required">*</span>
                         </label>
                         <div class="col-md-8 col-sm-8 col-xs-12">
-                            <input id="code" name="code" class="form-control col-md-7 col-xs-12" type="text" required="required" readonly>
+                            <input id="code" name="code" class="form-control col-md-7 col-xs-12" type="text" readonly>
                         </div>
                     </div>
                     <div class="col-md-2 col-sm-2 col-xs-12 item">
@@ -118,7 +118,7 @@
                             <span class="required">*</span>
                         </label>
                         <div class="col-md-8 col-sm-8 col-xs-12">
-                            <input id="serial" name="serial" class="form-control col-md-7 col-xs-12" type="text" required="required" readonly>
+                            <input id="serial" name="serial" class="form-control col-md-7 col-xs-12" type="text" readonly>
                         </div>
                     </div>
                     <div class="col-md-2 col-sm-2 col-xs-12 item">
@@ -126,7 +126,7 @@
                             <span class="required">*</span>
                         </label>
                         <div class="col-md-8 col-sm-8 col-xs-12">
-                            <input id="buyPrice" name="buyPrice" class="form-control col-md-7 col-xs-12" type="number">
+                            <input id="buyPrice" name="buyPrice" class="form-control col-md-7 col-xs-12" type="number" required="required">
                         </div>
                     </div>
                     <div class="col-md-2 col-sm-2 col-xs-12 item">
@@ -134,7 +134,7 @@
                             <span class="required">*</span>
                         </label>
                         <div class="col-md-8 col-sm-8 col-xs-12">
-                            <input id="packRetprice" name="packRetprice" class="form-control col-md-7 col-xs-12" type="number">
+                            <input id="packRetprice" name="packRetprice" class="form-control col-md-7 col-xs-12" type="number" required="required">
                         </div>
                     </div>
                     <div class="col-md-2 col-sm-2 col-xs-12 item">

+ 1 - 1
src/main/resources/templates/yk/drug_storage.html

@@ -55,7 +55,7 @@
                                 title="重置"><i class="fa fa-rotate-left"></i>
                         </button>
                         <button type="button" style="margin-left:3px" id="btn_record" class="btn btn-primary"
-                                title="库单记录"><i class="fa fa-list-alt"></i>
+                                title="库单记录"><i class="fa fa-list-alt"></i>
                         </button>
                     </div>
                 </div>