Prechádzať zdrojové kódy

Merge branch 'master' of http://124.70.58.209:3000/ytrd-project-management/GeoHazardMonitor

gao.qiang 1 rok pred
rodič
commit
ac1c1287db

+ 6 - 6
business-service/src/main/resources/mapper/service/BaseDeviceDynamicManagementMapper.xml

@@ -14,15 +14,15 @@
 		    base_camera_management AS a inner join
 		    base_railway_management AS l  on  a.railway_code=l.railway_code
 		<where>
-			<if test="name != null and name !=''">
+			<if test="arg0 != null and arg0 !=''">
 				concat(l.railway_name,a.camera_code)
-				like concat("%",#{name},"%")
+				like concat("%",#{arg0},"%")
 			</if>
-			<if test="lineDir != null and lineDir != ''">
-				line_dir = #{lineDir}
+			<if test="arg1 != null and arg1 != ''">
+				line_dir = #{arg1}
 			</if>
-			<if test="beginMile != null and beginMile != ''">
-				concat(a.install_mile, a.begin_mile, a.end_mile) = #{beginMile}
+			<if test="arg2 != null and arg2 != ''">
+				concat(a.install_mile, a.begin_mile, a.end_mile) = #{arg2}
 			</if>
 		</where>
     </select>

+ 6 - 3
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseCameraManagementController.java

@@ -605,10 +605,13 @@ public class BaseCameraManagementController extends BaseController {
     public AjaxResult cameraTree(@RequestParam(value = "name", required = false) String name,
                                  @RequestParam(value = "lineDir", required = false) Integer lineDir,
                                  @RequestParam(value = "beginMile", required = false) String mils) {
-        if (!mils.matches(PATTERN)) {
-            return error("里程位置填写格式不正确!");
+        Integer milsInt = null;
+        if (!StringUtils.isEmpty(mils)) {
+            if (!mils.matches(PATTERN)) {
+                return error("里程位置填写格式不正确!");
+            }
+            milsInt = AppendUtils.stringSplit(mils);
         }
-        Integer milsInt = AppendUtils.stringSplit(mils);
         CameraTree cameraTree = baseDeviceDynamicManagementService.cameraTree(name, lineDir, milsInt);
         List<CameraTree> children = cameraTree.getChildren();
         children.sort(new Comparator<CameraTree>() {