Bladeren bron

号别优化

lihong 1 jaar geleden
bovenliggende
commit
467e63448e

+ 3 - 0
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -1873,6 +1873,9 @@ public class MedicalViewApiController {
                     MzyZdChargeType mzyZdChargeType = mzyZdChargeTypeService.queryByCode(chargeType);
                     if (mzyZdChargeType != null) {
                         map.put("chargeType", mzyZdChargeType.getName());
+                        map.put("isrubric", Convert.toStr(mzyZdChargeType.getIsrubric(),"0"));
+                        map.put("rubricTxt", Convert.toStr(mzyZdChargeType.getRubricTxt(),""));
+
 //                        if (mzyZdChargeType.getReqFee() == null) {
 //                            mzyZdChargeType.setReqFee(BigDecimal.ZERO);
 //                        }

+ 14 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/MzyZdChargeTypeController.java

@@ -6,6 +6,7 @@ import cn.hnthyy.thmz.Utils.Tools;
 import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.entity.his.mz.MzOrderDetail;
 import cn.hnthyy.thmz.entity.his.mz.MzyZdChargeType;
+import cn.hnthyy.thmz.enums.NumberEnum;
 import cn.hnthyy.thmz.enums.YesNoEnum;
 import cn.hnthyy.thmz.service.his.mz.MzOrderDetailService;
 import cn.hnthyy.thmz.service.his.mz.MzyZdChargeTypeService;
@@ -175,6 +176,17 @@ public class MzyZdChargeTypeController {
                 resultMap.put("message", "号别类别不能为空");
                 return resultMap;
             }
+            if(NumberEnum.ONE.getCode().equals(mzyZdChargeType.getIsrubric()) && StringUtils.isBlank(mzyZdChargeType.getRubricTxt())){
+                resultMap.put("code", -1);
+                resultMap.put("message", "挂号提示标识选择是,提示内容不能为空");
+                return resultMap;
+            }
+            if(StringUtils.isBlank(mzyZdChargeType.getIsrubric())){
+                mzyZdChargeType.setIsrubric("0");
+            }
+            if(NumberEnum.ZERO.getCode().equals(mzyZdChargeType.getIsrubric())){
+                mzyZdChargeType.setRubricTxt("");
+            }
             if(mzyZdChargeType.getReqFee()==null){
                 mzyZdChargeType.setReqFee(BigDecimal.ZERO);
             }
@@ -184,6 +196,8 @@ public class MzyZdChargeTypeController {
             if(mzyZdChargeType.getOthFee()==null){
                 mzyZdChargeType.setOthFee(BigDecimal.ZERO);
             }
+
+
             mzyZdChargeType.setPyCode(PyWbUtil.toBigFirstChar(mzyZdChargeType.getName()));
             mzyZdChargeType.setSelfCode(PyWbUtil.getWBCode(mzyZdChargeType.getName()));
             if(StringUtils.isBlank(mzyZdChargeType.getCode())){

+ 4 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzyZdChargeType.java

@@ -35,4 +35,8 @@ public class MzyZdChargeType {
     private String message;
     //号别类型名称
     private String reqTypeName;
+    //挂号提示标识 0 否 1 是
+    private String isrubric;
+    //提示内容
+    private String rubricTxt;
 }

+ 10 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzyZdChargeTypeMapper.java

@@ -13,7 +13,7 @@ public interface MzyZdChargeTypeMapper {
      * 查询所有的号别
      * @return
      */
-    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag FROM mzy_zd_charge_type WITH(NOLOCK) where (del_flag  <> 1  or del_flag is null )")
+    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag,isrubric,rubric_txt FROM mzy_zd_charge_type WITH(NOLOCK) where (del_flag  <> 1  or del_flag is null )")
     List<MzyZdChargeType> selectAllMzyZdChargeType();
 
     /**
@@ -21,7 +21,7 @@ public interface MzyZdChargeTypeMapper {
      * @param code
      * @return
      */
-    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag FROM mzy_zd_charge_type WITH(NOLOCK) where code =#{code} ")
+    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag,isrubric,rubric_txt FROM mzy_zd_charge_type WITH(NOLOCK) where code =#{code} ")
     MzyZdChargeType selectByCode(@Param("code") String code);
 
 
@@ -94,6 +94,12 @@ public interface MzyZdChargeTypeMapper {
             "<when test='delFlag!=null'>",
             ",del_flag =#{delFlag}",
             "</when>",
+            "<when test='isrubric!=null'>",
+            ",isrubric =#{isrubric}",
+            "</when>",
+            "<when test='rubricTxt!=null'>",
+            ",rubric_txt =#{rubricTxt}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updateMzyZdChargeType(MzyZdChargeType mzyZdChargeType);
@@ -104,7 +110,7 @@ public interface MzyZdChargeTypeMapper {
      * @return
      */
     @Insert("INSERT INTO mzy_zd_charge_type(code, name, py_code, d_code, req_fee, telreq_fee, clinic_fee, oth_fee, brochure_fee, " +
-            "back_fee, del_flag, req_type, sort_no, print_flag, qm_flag) VALUES" +
-            " (#{code}, #{name}, #{pyCode}, #{selfCode}, #{reqFee}, 0, #{clinicFee}, #{othFee}, 0, 0, #{delFlag}, #{reqType}, #{sortNo}, '1', NULL)")
+            "back_fee, del_flag, req_type, sort_no, print_flag, qm_flag,isrubric,rubric_txt) VALUES" +
+            " (#{code}, #{name}, #{pyCode}, #{selfCode}, #{reqFee}, 0, #{clinicFee}, #{othFee}, 0, 0, #{delFlag}, #{reqType}, #{sortNo}, '1', NULL,#{isrubric},#{rubricTxt})")
     int insetMzyZdChargeType(MzyZdChargeType mzyZdChargeType);
 }

+ 13 - 1
src/main/resources/static/js/mz/request_type.js

@@ -72,7 +72,9 @@ $(function () {
                 "sortNo": $("#sortNum").val(),
                 "reqFee": $("#reqFee").val(),
                 "clinicFee": $("#clinicFee").val(),
-                "othFee": $("#otherFee").val()
+                "othFee": $("#otherFee").val(),
+                "isrubric":$("#isrubricSelect").val(),
+                "rubricTxt":$("#rubricTxt").val()
             }),
             success: function (res) {
                 if (res == '401' || res == 401) {
@@ -143,6 +145,8 @@ function clearWorkTimeInput() {
 function clearInput() {
     $("#nameHb").val(null);
     $('#reqTypeSelect').selectpicker('val', null);
+    $('#isrubricSelect').selectpicker('val', '0');
+    $('#rubricTxt').val(null);
     $('#chargeType').selectpicker('refresh');
     $("#sortNum").val(null);
     $("#reqFee").val(null);
@@ -542,6 +546,11 @@ function initMzyZdChargeTypeList() {
                 title: '五笔码',
                 align: "center",
                 valign: 'middle'
+            }, {
+                field: 'rubricTxt',
+                title: '提示内容',
+                align: "center",
+                valign: 'middle'
             }, {
                 title: '操作',
                 field: 'op',
@@ -660,6 +669,9 @@ function updateMzyZdChargeType(code) {
                 $("#reqFee").val(res.data.reqFee);
                 $("#clinicFee").val(res.data.clinicFee);
                 $("#otherFee").val(res.data.othFee);
+                $("#rubricTxt").val(res.data.rubricTxt);
+                $("#isrubricSelect").selectpicker('val',!stringNotBlank(res.data.isrubric) ? '0':res.data.isrubric);
+                $('#isrubricSelect').selectpicker('refresh');
                 $("#mzyZdChargeTypeCode").val(code);
                 $("#editModal").modal();
             } else {

+ 19 - 0
src/main/resources/templates/mz/request_type.html

@@ -153,6 +153,25 @@
                                    placeholder="请输入">
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="isrubricSelect">挂号提示
+                        </label>
+                        <div class="col-md-6 col-sm-6 col-xs-12">
+                            <select class="form-control selectpicker show-tick"  title="请选择"
+                                    id="isrubricSelect">
+                                <option value="0" selected >否</option>
+                                <option value="1">是</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="item form-group thmz_alert">
+                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rubricTxt">提示内容 </span>
+                        </label>
+                        <div class="col-md-6 col-sm-6 col-xs-12">
+                            <textarea  id="rubricTxt" class="form-control optional"
+                                       data-validate-length-range="0,255" rows="3" />
+                        </div>
+                    </div>
                 </form>
             </div>
             <div class="modal-footer">