Pārlūkot izejas kodu

优化门诊收费清单报表和项目数量是负数的问题

hurugang 3 gadi atpakaļ
vecāks
revīzija
9b18b89169

+ 21 - 21
src/main/java/cn/hnthyy/thmz/mapper/his/mz/ChargeFeeVoMapper.java

@@ -22,17 +22,17 @@ public interface ChargeFeeVoMapper {
      */
 
     @Select("   select " +
-            "   patient_id=max(m.patient_id), " +
-            "  serial_no =max(m.serial_no), " +
-            "   total_charge=isnull(max(m.amount),0), " +
-            "   r.pay_mark," +
-            "    charge_date=max(r.charge_date)," +
+            "   patient_id=m.patient_id, " +
+            "  serial_no =m.serial_no, " +
+            "   total_charge=isnull(m.amount,0), " +
+            "   m.pay_mark," +
+            "    charge_date=m.charge_date," +
             "  r.receipt_bill," +
             "   receipt_sn=r.receipt_sn , " +
             "   m.cheque_type, " +
-            "   m.op_id,m.contract_id from mz_deposit_file  m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no where   r.pay_id=#{userIdCode} and" +
+            "   m.op_id,m.contract_id from mz_deposit_file  m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where   r.pay_id=#{userIdCode} and" +
             "   m.dcount_no=0 and m.cheque_type <>'Z' " +
-            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id,m.contract_id " +
+            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
             "   order by abs(r.receipt_sn),r.receipt_bill")
     List<ChargeFeeVo> selectChargeFeeVoUnAccount(@Param("userIdCode") String userIdCode);
 
@@ -45,19 +45,19 @@ public interface ChargeFeeVoMapper {
      * @return
      */
     @Select("   select " +
-            "   patient_id=max(m.patient_id), " +
-            "  serial_no =max(m.serial_no), " +
-            "   total_charge=isnull(max(m.amount),0), " +
-            "   r.pay_mark," +
-            "    charge_date=max(r.charge_date)," +
+            "   patient_id=m.patient_id, " +
+            "  serial_no =m.serial_no, " +
+            "   total_charge=isnull(m.amount,0), " +
+            "   m.pay_mark," +
+            "    charge_date=m.charge_date," +
             "  r.receipt_bill," +
             "   receipt_sn=r.receipt_sn , " +
             "   m.cheque_type, " +
-            "   m.op_id from mz_deposit_file m WITH(NOLOCK)  left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no where " +
+            "   m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK)  left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where " +
             "   case '1' when #{caseType} then r.charge_date else  CONVERT(varchar(100), m.dcount_date, 20) end >=#{beginDate,jdbcType=TIMESTAMP}  " +
             "  and  case '1' when #{caseType} then r.charge_date else  CONVERT(varchar(100), m.dcount_date, 20) end <=#{endDate,jdbcType=TIMESTAMP} " +
             "  and m.pay_mark <> 2 and m.cheque_type <>'Z' " +
-            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id " +
+            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
             "   order by abs(r.receipt_sn),r.receipt_bill")
     List<ChargeFeeVo> selectChargeFeeVoCollect(@Param("caseType") String caseType, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
@@ -71,18 +71,18 @@ public interface ChargeFeeVoMapper {
      * @return
      */
     @Select("   select " +
-            "   patient_id=max(m.patient_id), " +
-            "  serial_no =max(m.serial_no), " +
-            "   total_charge=isnull(max(m.amount),0), " +
-            "   r.pay_mark," +
-            "    charge_date=max(r.charge_date)," +
+            "   patient_id=m.patient_id, " +
+            "  serial_no =m.serial_no, " +
+            "   total_charge=isnull(m.amount,0), " +
+            "   m.pay_mark," +
+            "    charge_date=m.charge_date," +
             "  r.receipt_bill," +
             "   receipt_sn=r.receipt_sn , " +
             "   m.cheque_type, " +
-            "   m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial  r WITH(NOLOCK) on m.serial_no =r.serial_no where  " +
+            "   m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial  r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where  " +
             "   case '1' when #{caseType} then r.charge_date else  m.dcount_date end =#{dcountDate,jdbcType=TIMESTAMP}  " +
             "  and r.pay_mark <> 2 and m.cheque_type <>'Z' " +
-            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id,m.contract_id " +
+            "  group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
             "   order by abs(r.receipt_sn),r.receipt_bill")
     List<ChargeFeeVo> selectChargeFeeVoReprint(@Param("userIdCode") String userIdCode, @Param("caseType") String caseType, @Param("dcountDate") Date dcountDate);
 

+ 22 - 23
src/main/resources/templates/mz/clinic.html

@@ -430,16 +430,16 @@
                         <label class="my_label">一般项目:</label>
                         <div class="my_label_input" style="height: 34px;line-height: 34px;">
                             <div style="float: left;">
-                                体重<input id="weight" type="number"/>kg&nbsp;&nbsp;
-                                体温<input id="temperature" type="number"/>℃&nbsp;&nbsp;
-                                脉搏<input id="sphygmus" type="number"/>次/分&nbsp;&nbsp;
-                                呼吸<input id="breathe" type="number"/>次/分&nbsp;&nbsp;
-                                血压<input id="pressure_high" type="number"/>&nbsp;/
-                                <input id="pressure_floor" type="number"/>mmhg
+                                体重<input id="weight" type="number" min="0"/>kg&nbsp;&nbsp;
+                                体温<input id="temperature" type="number" min="0"/>℃&nbsp;&nbsp;
+                                脉搏<input id="sphygmus" type="number" min="0"/>次/分&nbsp;&nbsp;
+                                呼吸<input id="breathe" type="number" min="0"/>次/分&nbsp;&nbsp;
+                                血压<input id="pressure_high" type="number" min="0"/>&nbsp;/
+                                <input id="pressure_floor" type="number" min="0"/>mmhg
                             </div>
                             <div id="pressureLeftFlag" style="float: left;margin-left: 5px;"> 血压(左)<input
-                                    id="pressure_high_left" type="number"/>&nbsp;/
-                                <input id="pressure_floor_left" type="number"/>mmhg
+                                    id="pressure_high_left" type="number" min="0"/>&nbsp;/
+                                <input id="pressure_floor_left" type="number" min="0"/>mmhg
                             </div>
 
                         </div>
@@ -789,7 +789,7 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">水量:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyJsl" placeholder="请输入"
+                                            <input type="number" class="form-control" id="cyJsl" placeholder="请输入" min="0"
                                                    value="400"/>
                                         </div>
                                         ml
@@ -798,7 +798,7 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">煮取:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyZql" placeholder="请输入"
+                                            <input type="number" class="form-control" id="cyZql" placeholder="请输入" min="0"
                                                    value="200"/>
                                         </div>
                                         ml
@@ -809,7 +809,7 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">日剂:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyMtjs" placeholder="日付数"
+                                            <input type="number" class="form-control" id="cyMtjs" placeholder="日付数" min="0"
                                                    value="1"/>
                                         </div>
@@ -818,7 +818,7 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">总剂:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control zyfs" id="zyfs"
+                                            <input type="number" class="form-control zyfs" id="zyfs" min="0"
                                                    onchange="calculateZyAmount()" placeholder="总付数"/>
                                         </div>
@@ -955,7 +955,7 @@
                                         <label class="my_label">单量:</label>
                                         <input type="number" class="form-control my_label_input_2" id="itemQuantity"
                                                onchange="calculateZl(false)"
-                                               style="padding-left: 10px;">
+                                               style="padding-left: 10px;" min="1">
                                     </div>
                                 </div>
                                 <div class="item form-group">
@@ -1419,8 +1419,7 @@
                             <div class="col-md-8 col-sm-8 col-xs-12">
                                 <div class="input-group input-group-own">
                                     <input id="editUserAge" type="number" class="form-control"
-                                           data-validate-minmax="0,200"
-                                           placeholder="请输入" required="required">
+                                           placeholder="请输入" required="required" min="0">
                                     <div class="input-group-btn">
                                         <button type="button" class="btn btn-default dropdown-toggle"
                                                 data-toggle="dropdown"
@@ -3210,22 +3209,22 @@
                             <label class="control-label col-md-2 col-sm-2 col-xs-12">一般项目:</label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
                                 <div style="float: left;">
-                                    体重<input id="bl_weight" type="number"
+                                    体重<input id="bl_weight" type="number" min="0"
                                              style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>kg&nbsp;&nbsp;
-                                    体温<input id="bl_temperature" type="number"
+                                    体温<input id="bl_temperature" type="number" min="0"
                                              style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>℃&nbsp;&nbsp;
-                                    脉搏<input id="bl_sphygmus" type="number"
+                                    脉搏<input id="bl_sphygmus" type="number" min="0"
                                              style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>次/分&nbsp;&nbsp;
-                                    呼吸<input id="bl_breathe" type="number"
+                                    呼吸<input id="bl_breathe" type="number" min="0"
                                              style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>次/分&nbsp;&nbsp;</br>
-                                    血压<input id="bl_pressure_high" type="number"
+                                    血压<input id="bl_pressure_high" type="number" min="0"
                                              style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>&nbsp;/
-                                    <input id="bl_pressure_floor" type="number"
+                                    <input id="bl_pressure_floor" type="number" min="0"
                                            style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>mmhg
                                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;血压(左)<input
-                                        id="bl_pressure_high_left" type="number"
+                                        id="bl_pressure_high_left" type="number" min="0"
                                         style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>&nbsp;/
-                                    <input id="bl_pressure_floor_left" type="number"
+                                    <input id="bl_pressure_floor_left" type="number" min="0"
                                            style="width: 40px;border: none !important;border-radius: 0 !important;border-bottom: 1px solid #ddd !important;color: red;"/>mmhg
                                 </div>
                             </div>