Parcourir la source

添加退药日期

WANGJIALIANG il y a 4 ans
Parent
commit
e49f7d8078

+ 3 - 2
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzPharmacyMapper.java

@@ -173,6 +173,7 @@ public interface MzPharmacyMapper {
                     "         yp_mz_fytj.group_no ," ,
                     "         charge_date," ,
                     "         confirm_time," ,
+                    "         input_time," ,
                     "         confirm_flag," ,
                     "doctor_id," ,
                     "doctor_name," ,
@@ -200,7 +201,7 @@ public interface MzPharmacyMapper {
             "</when>",
             "<when test='endDate!=null'>",
             " and confirm_time <![CDATA[<=]]> #{endDate}",
-            "</when> group by name,real_no,order_no,patient_id,times,receipt_no ,group_no ,charge_date,confirm_time,doctor_id,doctor_name,warn_dept,confirm_flag",
+            "</when> group by input_time,name,real_no,order_no,patient_id,times,receipt_no ,group_no ,charge_date,confirm_time,doctor_id,doctor_name,warn_dept,confirm_flag",
             ") as A WHERE RowNumber >#{pageSize}*#{pageIndex} order by RowNumber ASC",
             "</script>"})
     List<YpMzFytjVo> selectYpMzRefundSucceedFytjPage(ChargeFeeParamsVo chargeFeeParamsVo);
@@ -315,7 +316,7 @@ public interface MzPharmacyMapper {
      * @param mzRefundMedicineVo
      * @return
      */
-    @Update("update yp_mz_fytj set confirm_flag =#{confirmFlag} where patient_id =#{patientId} and times =#{times} and receipt_no =-#{receiptNo}" +
+    @Update("update yp_mz_fytj set confirm_flag =#{confirmFlag},input_time=#{inputTime} where patient_id =#{patientId} and times =#{times} and receipt_no =-#{receiptNo}" +
             " and order_no =#{orderNo} and real_no =-#{realNo}  ")
     int updateFytjConfirmFlag(MzRefundMedicineVo mzRefundMedicineVo);
 

+ 0 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/yf/YfDrugApplyMapper.java

@@ -1,6 +1,5 @@
 package cn.hnthyy.thmz.mapper.his.yf;
 
-import cn.hnthyy.thmz.entity.his.YpZdDict;
 import cn.hnthyy.thmz.pageDto.PageBean;
 import cn.hnthyy.thmz.vo.YpBaseYfBoundVo;
 import org.apache.ibatis.annotations.Param;

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

@@ -105,6 +105,7 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
             }
             mzRefundMedicineVo.setConfirmFlag(3);
             mzRefundMedicineVo.setConfirmTime(date);
+            mzRefundMedicineVo.setInputTime(date);
             mzRefundMedicineVo.setConfirmId(userIdCode);
             flag++;
             if (flag == 1) {

+ 4 - 0
src/main/java/cn/hnthyy/thmz/vo/MzRefundMedicineVo.java

@@ -39,6 +39,10 @@ public class MzRefundMedicineVo implements Serializable {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
     private Date confirmTime;
+    //录入时间 (用做退药时间)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date inputTime;
     //发药人
     private String confirmId;
     //标识:1确认发药 医技确认 2.打印药品清单 3.配药确认 5.

+ 12 - 7
src/main/resources/static/js/common/pharmacy-com.js

@@ -41,26 +41,31 @@ function saveCellData($table, index, field, value) {
 /**
  * 科室列表
  */
-function initDeptSelect() {
+function initDeptSelect(flag,id) {
+    let url="";
+    if(flag == 0){
+        url = "/thmz/allUnitCode"
+    }else if(flag == 1){
+        url = "/thmz/allMzUnitCode"
+    }
     //科室列表
     $.ajax({
         type: "GET",
-        url: '/thmz/allMzUnitCode',
+        url: url,
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
         success: function (data) {
             if (data == '401' || data == 401) {
-                window.location.href = '/thmz/login/view'
+                window.location.href = '/thmz/login/view';
                 return;
             }
             var html = '';
             $.each(data.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
             });
-
-            $('#unitCode').empty();
-            $('#unitCode').html(html);
-            $('#unitCode').selectpicker('refresh');
+            $('#'+id).empty();
+            $('#'+id).html(html);
+            $('#'+id).selectpicker('refresh');
         }
     });
 }

+ 21 - 2
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -19,7 +19,7 @@ $(function () {
     });
     init_daterangepicker();
     initTbTable();
-    initDeptSelect();
+    initDeptSelect(1,"unitCode");
     //重置查询参数
     $('#btn_clean').click(function () {
         cleanParams();
@@ -222,9 +222,16 @@ function sendMedicineProcessing(realNo, groupNo, orderNo, receiptNo, times, pati
 function initTbTable(pageIndex) {
     var sendRefundGroup = getIndex("send_refund_group");
     var visible = false;
+    var qrsjVisible = false;
+    var tysjVisible = false;
     var url = "/thmz/getSendMedicinePrescription";
     if (sendRefundGroup == 1) {
         visible = true;
+        if($("#confirmFlagSearch").val()==2){
+            qrsjVisible = true;
+        }else{
+            tysjVisible = true;
+        }
         url = "/thmz/getYfRefundMedicine";
         $("#tb_table_div").attr("class", "col-md-7 col-sm-7 col-xs-12");
     } else {
@@ -357,7 +364,19 @@ function initTbTable(pageIndex) {
                 title: '确认日期',
                 align: "center",
                 valign: 'middle',
-                visible: visible,
+                visible: qrsjVisible,
+                formatter: function (value, row, index) {
+                    if (value != null && value != "") {
+                        return format(value, "yyyy-MM-dd HH:mm:ss");
+                    }
+                    return "";
+                }
+            }, {
+                field: 'inputTime',
+                title: '退药日期',
+                align: "center",
+                valign: 'middle',
+                visible: tysjVisible,
                 formatter: function (value, row, index) {
                     if (value != null && value != "") {
                         return format(value, "yyyy-MM-dd HH:mm:ss");