Ver código fonte

增加191的手机号码 还有父类码优化

hurugang 5 anos atrás
pai
commit
a22211f2ad

+ 1 - 1
src/main/java/cn/hnthyy/thmz/Utils/StringUtil.java

@@ -195,7 +195,7 @@ public class StringUtil {
      * @return
      */
     public static String isPhone(String phone) {
-        String regex = "^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[8|9]))\\d{8}$";
+        String regex = "^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[1|8|9]))\\d{8}$";
         if (phone.length() != 11) {
             return "手机号应为11位数";
         } else {

+ 1 - 1
src/main/java/cn/hnthyy/thmz/controller/ChargeFeeVoController.java

@@ -1055,7 +1055,7 @@ public class ChargeFeeVoController {
     private BigDecimal fomartThmzmxsr(List<Map<String, Object>> thmzmxsrs, List<Map<String, Object>> thmzmxsrsHis) {
         BigDecimal totalAmount = BigDecimal.ZERO;
         if (thmzmxsrs != null && thmzmxsrs.size() > 0) {
-            List<MzBillItem> mzBillItems = mzBillItemService.queryMzBillItem();
+            List<MzBillItem> mzBillItems = mzBillItemService.queryZyBillItem();
             Map<String, String> mzBillItemMap = null;
             if (mzBillItems != null) {
                 mzBillItemMap = mzBillItems.stream().collect(Collectors.toMap(MzBillItem::getCode, MzBillItem::getName));

+ 24 - 0
src/main/java/cn/hnthyy/thmz/controller/CommonController.java

@@ -165,4 +165,28 @@ public class CommonController {
         }
     }
 
+
+    /**
+     * 查询所有父类码
+     *
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/getAllParentCodes", method = {RequestMethod.GET, RequestMethod.POST})
+    public Map<String, Object> getAllParentCodes() {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            resultMap.put("code", 0);
+            resultMap.put("message", "查询所有父类码成功");
+            resultMap.put("data", mzBillItemService.queryZyBillItem());
+            return resultMap;
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("查询所有父类码失败,错误信息{}", e.getMessage());
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询所有父类码失败");
+            return resultMap;
+        }
+    }
+
 }

+ 1 - 1
src/main/resources/static/js/mzsrmx.js

@@ -53,7 +53,7 @@ function initBillItemSelect() {
     //科室列表
     $.ajax({
         type: "GET",
-        url: '/thmz/getAllBillItems',
+        url: '/thmz/getAllParentCodes',
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
         success: function (data) {