Browse Source

报单水印增加公司

wangzhuo 1 year ago
parent
commit
7db1c4e26f

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wx/AttachmngsController.java

@@ -66,7 +66,7 @@ public class AttachmngsController {
                 latitude != null && !"".equals(latitude)) {
             address = mapUtils.pointsToLocationsAll(longitude + "," + latitude);
 
-            String regex = "((?<province>[^省]+省|.+自治区)|上海|北京|天津|重庆)(?<city>[^市]+市|.+自治州)(?<county>[^县]+县|.+区|.+镇|.+局)?(?<town>[^区]+区|.+镇)?(?<village>.*)";
+            String regex = "((?<province>[^省]+省|.+自治区)|上海|北京|天津|重庆)(?<city>[^市]+市|.+自治州)(?<county>[^县]+县|.+区|.+镇|.+局)?(?<town>[^区]+区|.+镇)?(?<street>[^街道]+街道|.+街|.+路)?(?<village>.*)";
             Matcher m = Pattern.compile(regex).matcher(address);
             String province = null, city = null, county = null, town = null, village = null;
             List<Map<String, String>> table = new ArrayList<>();
@@ -85,7 +85,7 @@ public class AttachmngsController {
                 row.put("village", village == null ? "" : village.trim());
                 table.add(row);
             }
-            address = province + city + county;
+            address = province + city + county + village;
         }
         String watermark = address + "||" + date + "||" + carRegNo;
         File file2 = AddWatermarkUtil.transferToFile(file);