Explorar el Código

科室折扣率

lihong hace 2 años
padre
commit
3b319a851d

+ 4 - 0
src/main/java/cn/hnthyy/thmz/entity/his/zd/ZdUnitCode.java

@@ -1,6 +1,8 @@
 package cn.hnthyy.thmz.entity.his.zd;
 
 import lombok.Data;
+
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
@@ -69,6 +71,8 @@ public class ZdUnitCode {
     private Integer inpatientFlag;
     //挂号最小切片号数
     private Integer unitNum;
+    //科室折扣率
+    private BigDecimal ksZkl;
     public ZdUnitCode(String code, String name) {
         this.code = code;
         this.name = name;

+ 11 - 8
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdUnitCodeMapper.java

@@ -19,7 +19,7 @@ public interface ZdUnitCodeMapper {
      */
     @Select({"<script>",
             "SELECT top ${pageSize} code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,",
-            "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num FROM (SELECT ROW_NUMBER() OVER (ORDER BY zd_unit_code_page.${orderByCase} asc) ",
+            "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl FROM (SELECT ROW_NUMBER() OVER (ORDER BY zd_unit_code_page.${orderByCase} asc) ",
             "AS RowNumber,* from dbo.zd_unit_code zd_unit_code_page WITH(NOLOCK)   where 1=1 ",
             "<when test='zdUnitCode.delFlag!=null'>",
             " and del_flag =#{zdUnitCode.delFlag,jdbcType=VARCHAR}",
@@ -150,10 +150,10 @@ public interface ZdUnitCodeMapper {
      * @return
      */
     @Insert("INSERT INTO dbo.zd_unit_code(code,name,class_code,py_code,d_code,mz_flag,del_flag,n_code,yj_flag,mzrc_flag,parent_code," +
-            "gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num )VALUES(#{code,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR}" +
+            "gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl )VALUES(#{code,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR}" +
             ",#{classCode,jdbcType=VARCHAR},#{pyCode,jdbcType=VARCHAR},#{wbCode,jdbcType=VARCHAR},#{mzFlag,jdbcType=CHAR},#{delFlag,jdbcType=CHAR},#{ynCode,jdbcType=VARCHAR},#{yjFlag,jdbcType=CHAR}" +
             ",#{mzrcFlag,jdbcType=CHAR},#{parentCode,jdbcType=CHAR},#{ghChargeFlag,jdbcType=CHAR},#{officePos,jdbcType=VARCHAR},#{supplyFlag,jdbcType=CHAR},#{xnhDeptCode,jdbcType=VARCHAR}" +
-            ",#{xnhDeptName,jdbcType=VARCHAR},#{ghjzFlag,jdbcType=CHAR},#{mzClass,jdbcType=VARCHAR},#{sortCode,jdbcType=VARCHAR},#{opId,jdbcType=VARCHAR},#{opDate,jdbcType=TIMESTAMP},#{inpatientFlag},#{unitNum}) ")
+            ",#{xnhDeptName,jdbcType=VARCHAR},#{ghjzFlag,jdbcType=CHAR},#{mzClass,jdbcType=VARCHAR},#{sortCode,jdbcType=VARCHAR},#{opId,jdbcType=VARCHAR},#{opDate,jdbcType=TIMESTAMP},#{inpatientFlag},#{unitNum},#{ksZkl}) ")
     int insertZdUnitCode(ZdUnitCode zdUnitCode);
 
     /**
@@ -234,6 +234,9 @@ public interface ZdUnitCodeMapper {
             "<when test='unitNum!=null'>",
             " ,unit_num =#{unitNum}",
             "</when>",
+            "<when test='ksZkl!=null'>",
+            " ,ks_zkl =#{ksZkl}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updateZdUnitCode(ZdUnitCode zdUnitCode);
@@ -245,7 +248,7 @@ public interface ZdUnitCodeMapper {
      * @return
      */
     @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
-            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num from dbo.zd_unit_code  WITH(NOLOCK)  where code=#{code,jdbcType=VARCHAR}")
+            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl from dbo.zd_unit_code  WITH(NOLOCK)  where code=#{code,jdbcType=VARCHAR}")
     ZdUnitCode selectByCode(@Param("code") String code);
 
     /**
@@ -253,7 +256,7 @@ public interface ZdUnitCodeMapper {
      * @return
      */
     @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
-            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num from dbo.zd_unit_code WITH(NOLOCK)  ")
+            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl from dbo.zd_unit_code WITH(NOLOCK)  ")
     List<ZdUnitCode> selectAll();
 
 
@@ -267,7 +270,7 @@ public interface ZdUnitCodeMapper {
      */
     @Select({"<script>",
             "SELECT code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,",
-            "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num FROM  dbo.zd_unit_code WITH(NOLOCK)   where 1=1 ",
+            "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl FROM  dbo.zd_unit_code WITH(NOLOCK)   where 1=1 ",
             "<when test='zdUnitCode.delFlag!=null'>",
             " and del_flag =#{zdUnitCode.delFlag,jdbcType=VARCHAR}",
             "</when>",
@@ -317,7 +320,7 @@ public interface ZdUnitCodeMapper {
      * @return
      */
     @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
-            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num from dbo.zd_unit_code  WITH(NOLOCK)  where del_flag=0 and mz_flag =1 and parent_code=#{parentCode}")
+            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl from dbo.zd_unit_code  WITH(NOLOCK)  where del_flag=0 and mz_flag =1 and parent_code=#{parentCode}")
     List<ZdUnitCode> selectChildren(@Param("parentCode") String parentCode);
 
 
@@ -326,7 +329,7 @@ public interface ZdUnitCodeMapper {
      * @return
      */
     @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
-            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num from dbo.zd_unit_code WITH(NOLOCK)   where del_flag=0 and mz_flag =1")
+            "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag,unit_num,ks_zkl from dbo.zd_unit_code WITH(NOLOCK)   where del_flag=0 and mz_flag =1")
     List<ZdUnitCode> selectAllMzZdUnitCode();
 
     /**

+ 8 - 0
src/main/resources/static/js/mz/unit_code.js

@@ -200,6 +200,11 @@ var TableInit = function () {
                     title: '就诊地点',
                     align: "center",
                     valign: 'middle',
+                }, {
+                    field: 'ksZkl',
+                    title: '科室折扣率',
+                    align: "center",
+                    valign: 'middle',
                 }],
 
             responseHandler: function (res) {
@@ -484,6 +489,7 @@ function clearModel() {
     $("#officePosPlus").val(null);
     $("#sortCodePlus").val(null);
     $("#unitNumPlus").val(null);
+    $("#ksZklPlus").val(null);
     $("#classTypePlus").selectpicker('val', null);//默认不选中
     $("#classTypePlus").selectpicker('refresh');
     $("#ynCodePlus").selectpicker('val', null);//默认不选中
@@ -532,6 +538,7 @@ function fillModel(code) {
                 $("#unitNumPlus").val(res.data.unitNum);
                 $("#officePosPlus").val(res.data.officePos);
                 $("#sortCodePlus").val(res.data.sortCode);
+                $("#ksZklPlus").val(res.data.ksZkl);
                 $("#classTypePlus").selectpicker('val', res.data.classCode);
                 $("#classTypePlus").selectpicker('refresh');
                 $("#ynCodePlus").selectpicker('val', res.data.ynCode);
@@ -616,6 +623,7 @@ $(function () {
             "yjFlag": $("#yjFlagPlus").val(),
             "supplyFlag": $("#supplyFlagPlus").val(),
             "inpatientFlag": $("#inpatientFlagPlus").val(),
+            "ksZkl": $("#ksZklPlus").val(),
             "unitNum": $("#unitNumPlus").val()
         };
         var originalCode = $("#originalCode").val();

+ 8 - 0
src/main/resources/templates/mz/unit_code.html

@@ -233,6 +233,14 @@
                                             title="请选择"></select>
                                 </div>
                             </div>
+                            <div class="item form-group" id="ksZklPlusDiv">
+                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ksZklPlus">科室折扣率
+                                </label>
+                                <div class="col-md-6 col-sm-6 col-xs-12">
+                                    <input type="text" id="ksZklPlus" data-validate-length-range="1,3"
+                                           class="form-control col-md-7 col-xs-12">
+                                </div>
+                            </div>
                         </form>
                     </div>
                     <div class="modal-footer">