lihong пре 2 година
родитељ
комит
554ec066cf

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

@@ -73,6 +73,8 @@ public class ZdUnitCode {
     private Integer unitNum;
     //科室折扣率
     private BigDecimal ksZkl;
+    //科室描述
+    private String deptDescribe;
     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,ks_zkl 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,dept_describe 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,ks_zkl )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,dept_describe )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},#{ksZkl}) ")
+            ",#{xnhDeptName,jdbcType=VARCHAR},#{ghjzFlag,jdbcType=CHAR},#{mzClass,jdbcType=VARCHAR},#{sortCode,jdbcType=VARCHAR},#{opId,jdbcType=VARCHAR},#{opDate,jdbcType=TIMESTAMP},#{inpatientFlag},#{unitNum},#{ksZkl},#{deptDescribe}) ")
     int insertZdUnitCode(ZdUnitCode zdUnitCode);
 
     /**
@@ -237,6 +237,9 @@ public interface ZdUnitCodeMapper {
             "<when test='ksZkl!=null'>",
             " ,ks_zkl =#{ksZkl}",
             "</when>",
+            "<when test='deptDescribe!=null'>",
+            " ,dept_describe =#{deptDescribe}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updateZdUnitCode(ZdUnitCode zdUnitCode);
@@ -248,7 +251,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,ks_zkl 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,dept_describe from dbo.zd_unit_code  WITH(NOLOCK)  where code=#{code,jdbcType=VARCHAR}")
     ZdUnitCode selectByCode(@Param("code") String code);
 
     /**
@@ -256,7 +259,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,ks_zkl 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,dept_describe from dbo.zd_unit_code WITH(NOLOCK)  ")
     List<ZdUnitCode> selectAll();
 
 
@@ -270,7 +273,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,ks_zkl 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,dept_describe FROM  dbo.zd_unit_code WITH(NOLOCK)   where 1=1 ",
             "<when test='zdUnitCode.delFlag!=null'>",
             " and del_flag =#{zdUnitCode.delFlag,jdbcType=VARCHAR}",
             "</when>",
@@ -320,7 +323,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,ks_zkl 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,dept_describe 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);
 
 
@@ -329,7 +332,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,ks_zkl 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,dept_describe from dbo.zd_unit_code WITH(NOLOCK)   where del_flag=0 and mz_flag =1")
     List<ZdUnitCode> selectAllMzZdUnitCode();
 
     /**

+ 10 - 1
src/main/resources/static/js/mz/unit_code.js

@@ -205,7 +205,13 @@ var TableInit = function () {
                     title: '科室折扣率',
                     align: "center",
                     valign: 'middle',
-                }],
+                }, {
+                    field: 'deptDescribe',
+                    title: '科室描述',
+                    align: "center",
+                    valign: 'middle',
+                }
+            ],
 
             responseHandler: function (res) {
                 if (res == '401' || res == 401) {
@@ -490,6 +496,7 @@ function clearModel() {
     $("#sortCodePlus").val(null);
     $("#unitNumPlus").val(null);
     $("#ksZklPlus").val(null);
+    $("#deptDescribePlus").val(null);
     $("#classTypePlus").selectpicker('val', null);//默认不选中
     $("#classTypePlus").selectpicker('refresh');
     $("#ynCodePlus").selectpicker('val', null);//默认不选中
@@ -539,6 +546,7 @@ function fillModel(code) {
                 $("#officePosPlus").val(res.data.officePos);
                 $("#sortCodePlus").val(res.data.sortCode);
                 $("#ksZklPlus").val(res.data.ksZkl);
+                $("#deptDescribePlus").val(res.data.deptDescribe);
                 $("#classTypePlus").selectpicker('val', res.data.classCode);
                 $("#classTypePlus").selectpicker('refresh');
                 $("#ynCodePlus").selectpicker('val', res.data.ynCode);
@@ -624,6 +632,7 @@ $(function () {
             "supplyFlag": $("#supplyFlagPlus").val(),
             "inpatientFlag": $("#inpatientFlagPlus").val(),
             "ksZkl": $("#ksZklPlus").val(),
+            "deptDescribe": $("#deptDescribePlus").val(),
             "unitNum": $("#unitNumPlus").val()
         };
         var originalCode = $("#originalCode").val();

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

@@ -241,6 +241,14 @@
                                            class="form-control col-md-7 col-xs-12">
                                 </div>
                             </div>
+                            <div class="item form-group" id="deptDescribePlusDiv">
+                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="deptDescribePlus">科室描述
+                                </label>
+                                <div class="col-md-6 col-sm-6 col-xs-12">
+                                    <input type="text" id="deptDescribePlus" data-validate-length-range="1,3"
+                                           class="form-control col-md-7 col-xs-12">
+                                </div>
+                            </div>
                         </form>
                     </div>
                     <div class="modal-footer">