Browse Source

解决挂号列表看不到号子问题

hurugang 3 years ago
parent
commit
b1bd18dad7

+ 5 - 5
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzyRequestMapper.java

@@ -14,7 +14,7 @@ public interface MzyRequestMapper {
      * @param requestDay
      * @return
      */
-    @Select(" select id,request_day,ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE}")
+    @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE}")
     List<MzyRequest> selectMzyRequestByRequestDay(@Param("requestDay") String requestDay);
 
     /**
@@ -52,7 +52,7 @@ public interface MzyRequestMapper {
      *
      * @param id 主键
      */
-    @Select(" select id,request_day,ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag" +
+    @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag" +
             " from mzy_request_new WITH(NOLOCK) where id = #{id,jdbcType=BIGINT}")
     MzyRequest selectMzyRequestById(@Param("id") Long id);
 
@@ -92,7 +92,7 @@ public interface MzyRequestMapper {
      * @return
      */
     @Insert("insert into mzy_request_new(request_day,ampm,unit_code,group_code,doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag) " +
-            "select request_day,ampm,unit_code,group_code,doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag " +
+            "select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag " +
             " from mzy_request where request_day >=(select top 1 request_day from mzy_request_new WITH(NOLOCK) order by request_day desc ) and request_day <> '7019-10-27 00:00:00.000' order by request_day asc")
     int synchronizationRequest();
 
@@ -103,7 +103,7 @@ public interface MzyRequestMapper {
      *
      * @return
      */
-    @Select("select request_day,ampm,unit_code,group_code,doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag " +
+    @Select("select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,total_num,left_num,bespeak_no,check_fee,sys_date,del_flag " +
             " from mzy_request WITH(NOLOCK) where request_day =#{today,jdbcType=DATE}")
     List<MzyRequest> selectRequestForToday(Date today);
 
@@ -162,7 +162,7 @@ public interface MzyRequestMapper {
      * @return
      */
     @Select({"<script>",
-            "  SELECT id,request_day,ampm,unit_code,group_code,doctor_code,charge_type,total_num,op_id,left_num,check_fee,bespeak_no " +
+            "  SELECT id,request_day,rtrim(ampm) ampm ,unit_code,group_code,doctor_code,charge_type,total_num,op_id,left_num,check_fee,bespeak_no " +
                     "    FROM mzy_request_new WITH(NOLOCK) " +
                     " where " +
                     "         request_day <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP} and " +

+ 6 - 2
src/main/resources/static/js/mz/request.js

@@ -251,8 +251,10 @@ function initSourceList() {
                 align: "center",
                 valign: 'middle',
                 formatter: function (value, row, index) {
-                    var text = '上午';
-                    if (value == 'p') {
+                    var text;
+                    if(value=='a'){
+                        text='上午';
+                    } else if (value == 'p') {
                         text = '下午';
                     } else if (value == 'd') {
                         text = '全天';
@@ -262,6 +264,8 @@ function initSourceList() {
                         text = '晚班';
                     }else if (value == 'l') {
                         text = '夜班';
+                    }else {
+                        text= value;
                     }
                     return text;
                 }