-java"> 264
	@Override
265
	public CommonResponse<List<Organization>> queryChildOrgById(Long orgId) {
266
		CommonRequest<Long> organize = new CommonRequest<Long>(orgId);
267
		return organizationQuery.querySubOrgByOrgId(organize);
268
	}
269
270
	@Override
271
	public CommonResponse<List<Organization>> queryCycleChildOrg(Long orgId) {
272
		CommonRequest<Long> request = new CommonRequest<Long>(orgId);
273
274
		CommonResponse<Organization> orgParentResponse = organizationQuery.queryOrganizationById(request);
275
		if (orgParentResponse == null || !orgParentResponse.isSuccess() || orgParentResponse.getData() == null) {
276
			return CommonResponse.fail("504", "获取部门失败");
277
		}
278
279
		CommonResponse<List<Organization>> response = organizationQuery.queryAllSubOrgByOrgId(request);
280
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
281
			return response;
282
		}
283
284
		String orgParentCode = orgParentResponse.getData().getCode();
285
		response.getData().forEach(org -> {
286
			if (orgParentCode.equals(org.getParentCode())) {
287
				org.setParentCode("-1");
288
			}
289
		});
290
291
		return response;
292
	}
293
294
	@Override
295
	public List<Map<String, Object>> queryEmployeeListByOrgId(Long orgId, int pageNumber, int pageSize) {
296
		CommonRequest<Long> request = new CommonRequest<Long>(orgId);
297
		CommonResponse<Organization> orgResponse = organizationQuery.queryOrganizationById(request);
298
		if (orgResponse == null || !orgResponse.isSuccess() || orgResponse.getData() == null) {
299
			return new ArrayList<Map<String, Object>>();
300
		}
301
302
		Map<String, Object> requestMap = new HashMap<String, Object>();
303
		requestMap.put("orgCode", orgResponse.getData().getCode());
304
		CommonRequest<Map<String, Object>> conditionMapRequest = new CommonRequest<Map<String, Object>>(requestMap,
305
				pageNumber, pageSize);
306
		CommonResponse<PageBean<Map<String, Object>>> response = employeeService
307
				.queryIndividualList(conditionMapRequest);
308
309
		if (response == null || response.getData() == null || CollectionUtils.isEmpty(response.getData().getData())) {
310
			return new ArrayList<Map<String, Object>>();
311
		}
312
313
		return response.getData().getData();
314
	}
315
316
}

+ 46 - 9
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/HomePageServiceImpl.java

@ -2,6 +2,7 @@ package com.ai.bss.security.protection.service.impl;
2 2
3 3
import java.util.ArrayList;
4 4
import java.util.HashMap;
5
import java.util.Iterator;
5 6
import java.util.List;
6 7
import java.util.Map;
7 8
@ -11,6 +12,7 @@ import org.springframework.util.CollectionUtils;
11 12
12 13
import com.ai.abc.api.model.CommonRequest;
13 14
import com.ai.abc.api.model.CommonResponse;
15
import com.ai.bss.characteristic.spec.model.CharacteristicSpecValue;
14 16
import com.ai.bss.security.protection.service.interfaces.CharSpecService;
15 17
import com.ai.bss.security.protection.service.interfaces.HomePageService;
16 18
import com.ai.bss.security.protection.utils.EbcConstant;
@ -69,33 +71,68 @@ public class HomePageServiceImpl implements HomePageService {
69 71
		CommonRequest<Map<String, String>> request = new CommonRequest<Map<String, String>>(params);
70 72
		CommonResponse<List<Map<String, Object>>> response = aiTaskQuery.safetyAlarmAnalysis(request);
71 73
74
		List<Map<String, Object>> dataList=null;
72 75
		if (CollectionUtils.isEmpty(response.getData())) {
73
			return CommonResponse.ok(new ArrayList<Map<String, Object>>());
76
			dataList=new ArrayList<Map<String, Object>>();
77
		}else {
78
			dataList=response.getData();
74 79
		}
75 80
76
		Map<String, String> allAiAlarmTypeMap = charSpecService.getCharSpecMap(EbcConstant.BUSINESS_SPEC_AI_ALARM_TYPE);
81
		// Map<String, String> allAiAlarmTypeMap = charSpecService.getCharSpecMap(EbcConstant.BUSINESS_SPEC_AI_ALARM_TYPE);
82
		List<CharacteristicSpecValue> allAiAlarmTypeList = charSpecService
83
				.getCharSpecList(EbcConstant.BUSINESS_SPEC_AI_ALARM_TYPE);
77 84
78 85
		List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
79 86
		int otherNum = 0;
80
		for (int i = 0; i < response.getData().size(); i++) {
81
			int num = Integer.valueOf(response.getData().get(i).get("cn").toString());
87
		for (int i = 0; i < dataList.size(); i++) {
88
			int num = Integer.valueOf(dataList.get(i).get("cn").toString());
82 89
			if (i >= dataSize) {
83 90
				// 其他
84 91
				otherNum += num;
85 92
				continue;
86 93
			}
87 94
88
			Map<String, Object> dataMap = new HashMap<String, Object>();
89
			dataMap.put("value", num);
90
			dataMap.put("name", allAiAlarmTypeMap.get(response.getData().get(i).get("alarmTypeCode").toString()));
91
			resultList.add(dataMap);
95
			Map<String, Object> map = new HashMap<String, Object>();
96
			map.put("value", num);
97
98
			// dataMap.put("name", allAiAlarmTypeMap.get(dataList.get(i).get("alarmTypeCode").toString()));
99
			for (Iterator iterator = allAiAlarmTypeList.iterator(); iterator.hasNext();) {
100
				CharacteristicSpecValue aiAlarmType = (CharacteristicSpecValue) iterator.next();
101
				if (aiAlarmType.getCode().equals(dataList.get(i).get("alarmTypeCode").toString())) {
102
					map.put("name", aiAlarmType.getValue());
103
					iterator.remove();
104
					break;
105
				}
106
			}
107
108
			resultList.add(map);
92 109
		}
93 110
94
		if (otherNum > 0) {
111
		/*if (otherNum > 0) {
95 112
			Map<String, Object> dataMap = new HashMap<String, Object>();
96 113
			dataMap.put("value", otherNum);
97 114
			dataMap.put("name", "其他");
98 115
			resultList.add(dataMap);
116
		}*/
117
		if (dataList.size() < dataSize) {
118
			// 有数据的条数小于需显示的条数(填充的项目=0)
119
			for (int i = 0; i < allAiAlarmTypeList.size(); i++) {
120
				Map<String, Object> map = new HashMap<String, Object>();
121
				map.put("value", 0);
122
				map.put("name", allAiAlarmTypeList.get(i).getValue());
123
				resultList.add(map);
124
125
				if (resultList.size() >= dataSize) {
126
					break;
127
				}
128
			}
129
130
		} else if (dataList.size() > dataSize){
131
			// 有数据的条数大于需显示的条数(其他>0)
132
			Map<String, Object> map = new HashMap<String, Object>();
133
			map.put("value", otherNum);
134
			map.put("name", "其他");
135
			resultList.add(map);
99 136
		}
100 137
101 138
		return CommonResponse.ok(resultList);

+ 115 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/LoginServiceImpl.java

@ -0,0 +1,115 @@
1
package com.ai.bss.security.protection.service.impl;
2
3
4
import com.ai.bss.security.protection.model.User;
5
import com.ai.bss.security.protection.service.interfaces.LoginService;
6
import com.ai.bss.security.protection.utils.HttpServiceUtil;
7
import com.alibaba.fastjson.JSON;
8
import org.slf4j.Logger;
9
import org.slf4j.LoggerFactory;
10
import org.springframework.beans.factory.annotation.Value;
11
import org.springframework.stereotype.Service;
12
13
import javax.servlet.http.Cookie;
14
import javax.servlet.http.HttpServletRequest;
15
import java.nio.charset.Charset;
16
import java.util.HashMap;
17
import java.util.List;
18
import java.util.Map;
19
20
/**
21
 * @Auther: 王超
22
 * @Date: 2020/12/24 15:13
23
 * @Description:
24
 */
25
26
@Service
27
public class LoginServiceImpl implements LoginService {
28
29
    Logger logger = LoggerFactory.getLogger(LoginServiceImpl.class);
30
31
    @Value("${uspa.login.vercode}")
32
    private String verCode;
33
34
    @Value("${uspa.login.url}")
35
    private String url;
36
37
    @Value("${uspa.login.menuUrl}")
38
    private String menuUrl;
39
40
    @Override
41
    public Map<String, Object> login(User user) {
42
        Map resultMap=null;
43
44
        try {
45
            HashMap<String, Object> paramsMap = new HashMap<>();
46
            paramsMap.put("userCode",user.getUserCode());
47
            paramsMap.put("passWord",user.getPassWord());
48
            paramsMap.put("vercode",verCode);
49
50
            // (1)设置字符集
51
            Charset charset = Charset.forName("utf-8");
52
53
            String result = HttpServiceUtil.sendPost(url, paramsMap, charset);
54
55
            resultMap = JSON.parseObject(result, Map.class);
56
57
        } catch (Exception e) {
58
            logger.error("调用uspa登录接口失败: " + e.getMessage());
59
            return resultMap;
60
        }
61
62
63
        return resultMap;
64
    }
65
66
    @Override
67
    public Map<String, Object> findMenus(User user, HttpServletRequest request) {
68
        Map resultMap=null;
69
70
        try {
71
            HashMap<String, Object> paramsMap = new HashMap<>();
72
            paramsMap.put("root_module","0000");
73
            paramsMap.put("userCode",user.getUserCode());
74
75
            Map<String, String> headerMap=new HashMap<>();
76
            // 取得cookie
77
            Cookie[] cookies = request.getCookies();
78
            if (cookies != null) {
79
                for (Cookie cookie : cookies) {
80
                    if (cookie.getName().equals("session_id")) {
81
                        headerMap.put("session_id", cookie.getValue());
82
                    }
83
                    if (cookie.getName().equals("sign")) {
84
                        headerMap.put("sign", cookie.getValue());
85
                    }
86
                    if (cookie.getName().equals("sign_key")) {
87
                        headerMap.put("sign_key", cookie.getValue());
88
                    }
89
                }
90
            }
91
            Map<String, String> headerMap1=new HashMap<>();
92
            //将设置拼接cookie
93
            headerMap1.put("Cookie","session_id="+headerMap.get("session_id")+";"+"sign="+headerMap.get("sign")+";"+"sign_key="+headerMap.get("sign_key"));
94
            // (1)设置字符集
95
            Charset charset = Charset.forName("utf-8");
96
97
            String result = HttpServiceUtil.sendPost(menuUrl, paramsMap, charset,headerMap1 );
98
            //将返回结果转为map
99
            resultMap = JSON.parseObject(result, Map.class);
100
101
            String result1 = (String)resultMap.get("RESULT");
102
            if(null!=result1&&!"".equals(result1)){
103
                //如果result有值返回正确,将返回结果转为List
104
                List<Map<String,List<Map>>> list = JSON.parseObject(result1, List.class);
105
                resultMap.put("RESULT",list);
106
            }
107
        } catch (Exception e) {
108
            logger.error("调用uspa获取菜单接口失败: " + e.getMessage());
109
110
            return resultMap;
111
        }
112
        return resultMap;
113
    }
114
115
}

+ 28 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/MonitorSceneTerminalServiceImpl.java

@ -7,6 +7,7 @@ import com.ai.bss.components.common.model.PageBean;
7 7
import com.ai.bss.components.common.util.JsonUtils;
8 8
import com.ai.bss.security.protection.service.interfaces.MonitorSceneTerminalService;
9 9
import com.ai.bss.work.safety.model.MonitorSceneTerminalRel;
10
import com.ai.bss.work.safety.service.api.AiTaskQuery;
10 11
import com.ai.bss.work.safety.service.api.MonitorSceneCommand;
11 12
import com.ai.bss.work.safety.service.api.MonitorSceneQuery;
12 13
import lombok.extern.slf4j.Slf4j;
@ -14,6 +15,8 @@ import org.apache.commons.lang.StringUtils;
14 15
import org.springframework.beans.factory.annotation.Autowired;
15 16
import org.springframework.stereotype.Service;
16 17
18
import java.util.ArrayList;
19
import java.util.HashMap;
17 20
import java.util.List;
18 21
import java.util.Map;
19 22
@ -26,6 +29,9 @@ public class MonitorSceneTerminalServiceImpl implements MonitorSceneTerminalServ
26 29
    @Autowired
27 30
    private MonitorSceneQuery monitorSceneQuery;
28 31
32
33
    @Autowired
34
    private AiTaskQuery aiTaskQuery;
29 35
    @Override
30 36
    public CommonResponse<MonitorSceneTerminalRel> createMonitorSceneTerminalRel(MonitorSceneTerminalRel monitorSceneTerminalRel) {
31 37
        if(monitorSceneTerminalRel.getMonitorSceneId()==null){
@ -94,10 +100,31 @@ public class MonitorSceneTerminalServiceImpl implements MonitorSceneTerminalServ
94 100
        String monitorSceneId = paramMap.get("monitorSceneId");
95 101
        Integer pageNumber = paramMap.get("pageNumber")==null?1:Integer.parseInt(paramMap.get("pageNumber"));
96 102
        Integer pageSize = paramMap.get("pageSize")==null?10:Integer.parseInt(paramMap.get("pageSize"));
97
        CommonRequest<Long> request = CommonRequest.<Long>builder().data(3L).build();
103
        CommonRequest<Long> request = CommonRequest.<Long>builder().data(Long.parseLong(monitorSceneId)).build();
98 104
        request.setPageNumber(pageNumber);
99 105
        request.setPageSize(pageSize);
100 106
        CommonResponse<PageBean<Map<String, Object>>> result = monitorSceneQuery.selectSceneTerminalRelByPage(request);
107
        List<Map<String, Object>> sceneTerminalRelList = result.getData().getData();
108
        if(sceneTerminalRelList!=null&&sceneTerminalRelList.size()>0){
109
            sceneTerminalRelList.forEach((sceneTerminalRel)->{
110
                String resourceToolId = (String) sceneTerminalRel.get("resourceToolId");
111
                if(resourceToolId!=null){
112
                    HashMap<String, Object> conditionMap = new HashMap<>();
113
                    conditionMap.put("resourceToolId", resourceToolId);
114
                    CommonResponse<List<Map<String,Object>>> aiTaskCommonResponse = aiTaskQuery.selectAiTaskDevice(CommonRequest.<Map<String,Object>>builder().data(conditionMap).build());
115
                    List<Map<String, Object>> aiTaskDeviceList = aiTaskCommonResponse.getData();
116
                    ArrayList<String> aiTaskNameList = new ArrayList<>();
117
                    aiTaskDeviceList.forEach((aiTaskDevice)->{
118
                        if(null!=aiTaskDevice.get("aiTaskName")){
119
                            aiTaskNameList.add((String) aiTaskDevice.get("aiTaskName"));
120
                        }
121
                    });
122
                    sceneTerminalRel.put("aiTaskNameList",aiTaskNameList);
123
                    sceneTerminalRel.put("aiTaskDeviceList",aiTaskDeviceList);
124
                }
125
            });
126
127
        }
101 128
102 129
        return result;
103 130

+ 55 - 4
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/MonitorVideoLogManageServiceImpl.java

@ -1,11 +1,17 @@
1 1
package com.ai.bss.security.protection.service.impl;
2 2
3
import java.io.ByteArrayInputStream;
4
import java.io.InputStream;
3 5
import java.util.ArrayList;
4 6
import java.util.Date;
5 7
import java.util.HashMap;
6 8
import java.util.List;
7 9
import java.util.Map;
8 10
11
import cn.hutool.core.lang.UUID;
12
import com.ai.bss.components.minio.service.MinioService;
13
import com.ai.bss.security.protection.model.SecurityProtectionMinioConfig;
14
import com.ai.bss.security.protection.service.interfaces.UploadFileService;
9 15
import org.apache.commons.lang.StringUtils;
10 16
import org.springframework.beans.factory.annotation.Autowired;
11 17
import org.springframework.stereotype.Service;
@ -25,11 +31,19 @@ import com.ai.bss.work.safety.service.api.MonitorSceneQuery;
25 31
@Service
26 32
public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageService {
27 33
34
	public String SPLIT_CHAR = "_";
28 35
	@Autowired
29 36
	private MonitorSceneQuery monitorSceneQuery;
30 37
31 38
	@Autowired
32 39
	private MonitorSceneCommand monitorSceneCommand;
40
	@Autowired
41
	private MinioService minioService;
42
	@Autowired
43
	private UploadFileService uploadFileService;
44
45
	@Autowired
46
	private SecurityProtectionMinioConfig minioConfig;
33 47
34 48
	@Override
35 49
	public CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
@ -51,6 +65,44 @@ public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageSe
51 65
	}
52 66
53 67
	@Override
68
	public CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition)
69
			throws Exception {
70
		CommonRequest<MonitorVideoLog> request = new CommonRequest<MonitorVideoLog>(monitorVideoLogCondition);
71
		CommonResponse<List<MonitorVideoLog>> response = monitorSceneQuery.queryMonitorVideoLogByTime(request);
72
73
		List<EbcMonitorVideoLog> list = new ArrayList<EbcMonitorVideoLog>();
74
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
75
			return CommonResponse.ok(null);
76
		}
77
78
		StringBuffer m3u8Str = new StringBuffer();
79
		m3u8Str.append("#EXTM3U").append("\n");
80
		m3u8Str.append("#EXT-X-VERSION:3").append("\n");
81
		m3u8Str.append("#EXT-X-TARGETDURATION:65").append("\n");
82
		m3u8Str.append("#EXT-X-MEDIA-SEQUENCE:0").append("\n");
83
		String bucketName = minioConfig.getBucketM3U8();// "m3u8-index";
84
		String fileType = ".m3u8";
85
		String m3u8FileName = bucketName + SPLIT_CHAR + UUID.fastUUID().toString().replace("-", "") + fileType;
86
87
		String videoUrl = "";
88
		for (MonitorVideoLog monitorVideoLog : response.getData()) {
89
			EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(monitorVideoLog);
90
			list.add(ebcMonitorVideoLog);
91
			videoUrl = uploadFileService.getFileUrl(monitorVideoLog.getVideoUrl());// minioService.getObjectUrl(videoFileIdArr[0],ebcMonitorVideoLog.getVideoFileUrl());
92
93
			m3u8Str.append("#EXTINF:65,").append("\n");
94
			m3u8Str.append(videoUrl).append("\n");
95
		}
96
		m3u8Str.append("#EXT-X-ENDLIST").append("\n");
97
		InputStream is = new ByteArrayInputStream(m3u8Str.toString().getBytes());
98
		minioService.putObject(bucketName, m3u8FileName, is, fileType);
99
100
		String m3u8IndexFileUrl = uploadFileService.getFileUrl(m3u8FileName);
101
102
		return CommonResponse.ok(m3u8IndexFileUrl);
103
	}
104
105
	@Override
54 106
	public CommonResponse<EbcMonitorVideoLog> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
55 107
		CommonRequest<Long> request = new CommonRequest<Long>(monitorVideoLogId);
56 108
		CommonResponse<MonitorVideoLog> response = monitorSceneQuery.loadMonitorVideoLog(request);
@ -105,10 +157,9 @@ public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageSe
105 157
		String fileType = videoUrl.substring(videoUrl.lastIndexOf(".") + 1);
106 158
107 159
		String newFileName = videoUrl.substring(videoUrl.lastIndexOf("_") + 1);
108
		int videoPrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO);
109
		String fileNameData = newFileName.substring(
110
				videoPrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length(),
111
				videoPrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length() + 14);
160
		int videoPrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO)
161
				+ EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length();
162
		String fileNameData = newFileName.substring(videoPrefixIndex, videoPrefixIndex + 14);
112 163
		Date fileDateTime = DateUtil.convertDate(fileNameData, DateUtil.PURE_DATETIME_PATTERN);
113 164
		String newFileNameData = DateUtil.formatDate(fileDateTime, "MM月dd日 HH:mm");
114 165
		String fileDateTimeStr = DateUtil.formatDate(fileDateTime);

+ 13 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/ResourceToolManageServiceImpl.java

@ -16,10 +16,12 @@ import com.ai.abc.api.model.CommonResponse;
16 16
import com.ai.bss.characteristic.spec.model.CharacteristicSpecValue;
17 17
import com.ai.bss.components.common.model.PageBean;
18 18
import com.ai.bss.security.protection.model.SecurityProtectionMinioConfig;
19
import com.ai.bss.security.protection.service.interfaces.AiAlarmManageService;
19 20
import com.ai.bss.security.protection.service.interfaces.CharSpecService;
20 21
import com.ai.bss.security.protection.service.interfaces.ResourceToolManageService;
21 22
import com.ai.bss.security.protection.service.interfaces.UploadFileService;
22 23
import com.ai.bss.security.protection.utils.EbcConstant;
24
import com.ai.bss.work.safety.service.api.AiTaskQuery;
23 25
import com.ai.bss.work.tool.model.ResourceTool;
24 26
import com.ai.bss.work.tool.service.api.ResourceToolCommand;
25 27
import com.ai.bss.work.tool.service.api.ResourceToolQuery;
@ -41,6 +43,9 @@ public class ResourceToolManageServiceImpl implements ResourceToolManageService
41 43
42 44
	@Autowired
43 45
	private CharSpecService charSpecService;
46
	
47
	@Autowired
48
	private AiTaskQuery aiTaskQuery;
44 49
45 50
	@Override
46 51
	public CommonResponse<PageBean<Map<String, Object>>> queryPageResourceTool(HashMap<String, Object> params,
@ -209,4 +214,12 @@ public class ResourceToolManageServiceImpl implements ResourceToolManageService
209 214
		return resultMap;
210 215
	}
211 216
217
	@Override
218
	public CommonResponse<List<Map<String, Object>>> getResourceToolAllInfo(String resourceToolCode) {
219
		Map<String, Object> conditionMap = new HashMap<String, Object>();
220
        conditionMap.put("resourceToolCode", resourceToolCode);
221
        CommonRequest<Map<String, Object>> request=new CommonRequest<Map<String, Object>>(conditionMap);
222
        return aiTaskQuery.selectAiTaskDevice(request);
223
	}
224
	
212 225
}

+ 18 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/SysConfigAiTaskServiceImpl.java

@ -5,6 +5,7 @@ import com.ai.abc.api.model.CommonResponse;
5 5
import com.ai.bss.components.common.model.PageBean;
6 6
import com.ai.bss.security.protection.model.AiQuery;
7 7
import com.ai.bss.security.protection.service.interfaces.SysConfigAiTaskService;
8
import com.ai.bss.work.safety.model.AiModel;
8 9
import com.ai.bss.work.safety.model.AiTask;
9 10
import com.ai.bss.work.safety.service.api.AiTaskCommand;
10 11
import com.ai.bss.work.safety.service.api.AiTaskQuery;
@ -35,7 +36,19 @@ public class SysConfigAiTaskServiceImpl implements SysConfigAiTaskService {
35 36
36 37
    @Override
37 38
    public CommonResponse<PageBean<Map<String, Object>>> queryPageAiTask(Map<String, Object> params, int pageNumber, int pageSize) {
39
        CommonResponse<List<AiModel>> aiModelList = aiTaskQuery.findAiModelList(new CommonRequest<Void>(null));
40
38 41
        CommonResponse<PageBean<Map<String, Object>>> queryResult = aiTaskQuery.queryAiTask(new CommonRequest<>(params, pageNumber, pageSize));
42
        List<Map<String, Object>> aiTaskList = queryResult.getData().getData();
43
        if(null!=aiTaskList&&aiTaskList.size()>0){
44
            aiTaskList.forEach((aiTask)->{
45
                aiModelList.getData().forEach((aiModel)->{
46
                    if(null!=aiTask.get("aiIdenModel")&& aiTask.get("aiIdenModel").equals(aiModel.getAiIdenModel() )){
47
                        aiTask.put("aiIdenModel", aiModel.getName());
48
                    }
49
                });
50
            });
51
        }
39 52
        return queryResult;
40 53
    }
41 54
@ -67,5 +80,10 @@ public class SysConfigAiTaskServiceImpl implements SysConfigAiTaskService {
67 80
        CommonResponse<AiTask> runningResult = aiTaskCommand.modifyAiTask(aiTaskRequest);
68 81
        return runningResult;
69 82
    }
83
    
84
    @Override
85
	public CommonResponse<List<AiModel>> queryAiTaskModelList() {
86
		return aiTaskQuery.findAiModelList(new CommonRequest<Void>(null));
87
	}
70 88
71 89
}

+ 8 - 11
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/UploadFileServiceImpl.java

@ -60,7 +60,7 @@ public class UploadFileServiceImpl implements UploadFileService {
60 60
61 61
	@Override
62 62
	public String getFileUrl(String minioFileName) throws Exception {
63
		if (StringUtils.isEmpty(minioFileName)) {
63
		if (StringUtils.isEmpty(minioFileName) || "null".equals(minioFileName)) {
64 64
			log.debug("获取文件的url为空");
65 65
			return "";
66 66
		}
@ -180,26 +180,23 @@ public class UploadFileServiceImpl implements UploadFileService {
180 180
		resultMap.put("fileType", fileType);
181 181
182 182
		if (newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO) > 0) {
183
			int videoPrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO);
183
			int videoPrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO)
184
					+ EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length();
184 185
185
			String fileNameData = newFileName.substring(
186
					videoPrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length(),
187
					videoPrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_VIDEO.length() + 14);
186
			String fileNameData = newFileName.substring(videoPrefixIndex, videoPrefixIndex + 14);
188 187
			Date fileDataTime = DateUtil.convertDate(fileNameData, DateUtil.PURE_DATETIME_PATTERN);
189 188
			String newFileNameData = DateUtil.formatDate(fileDataTime, "MM月dd日 HH:mm");
190 189
			resultMap.put("fileName", newFileNameData);
191 190
			resultMap.put("fileDateTimeStr", DateUtil.formatDate(fileDataTime));
192 191
193 192
		} else if (newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE) > 0) {
194
			int picturePrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE);
193
			int picturePrefixIndex = newFileName.lastIndexOf(EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE)
194
					+ EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE.length();
195 195
196
			String fileNameData = newFileName.substring(
197
					picturePrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE.length(),
198
					picturePrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE.length() + 14);
196
			String fileNameData = newFileName.substring(picturePrefixIndex, picturePrefixIndex + 14);
199 197
			Date fileDataTime = DateUtil.convertDate(fileNameData, DateUtil.PURE_DATETIME_PATTERN);
200 198
			String newFileNameData = DateUtil.formatDate(fileDataTime, "MM月dd日 HH:mm:ss");
201
			String pictureSerialNum = newFileName.substring(
202
					picturePrefixIndex + EbcConstant.AI_MONITOR_FILE_PREFIX_PICTURE.length() + 14, fileNameIndex);
199
			String pictureSerialNum = newFileName.substring(picturePrefixIndex + 14, fileNameIndex);
203 200
			resultMap.put("fileName", newFileNameData + " " + pictureSerialNum);
204 201
			resultMap.put("fileDateTimeStr", DateUtil.formatDate(fileDataTime));
205 202

+ 55 - 44
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/WorkOrderManagementServiceImpl.java

@ -7,16 +7,7 @@ import java.util.HashMap;
7 7
import java.util.List;
8 8
import java.util.Map;
9 9
10
import com.ai.bss.components.common.util.JsonUtils;
11
import com.ai.bss.user.dto.UserDto;
12
import com.ai.bss.work.attendance.dto.LeaveApprovalDto;
13
import com.ai.bss.work.attendance.model.AttendanceTask;
14
import com.ai.bss.work.attendance.service.api.ApprovalImportCommand;
15
import com.alibaba.fastjson.TypeReference;
16
import com.alibaba.fastjson.serializer.SerializerFeature;
17
import com.google.common.collect.Lists;
18 10
import org.apache.logging.log4j.util.Strings;
19
import org.junit.Assert;
20 11
import org.springframework.beans.factory.annotation.Autowired;
21 12
import org.springframework.stereotype.Service;
22 13
import org.springframework.util.CollectionUtils;
@ -24,15 +15,20 @@ import org.springframework.web.multipart.MultipartFile;
24 15
25 16
import com.ai.abc.api.model.CommonRequest;
26 17
import com.ai.abc.api.model.CommonResponse;
18
import com.ai.abc.exception.BaseException;
27 19
import com.ai.bss.characteristic.spec.model.CharacteristicSpecValue;
28 20
import com.ai.bss.components.common.model.PageBean;
21
import com.ai.bss.components.common.util.JsonUtils;
29 22
import com.ai.bss.security.protection.service.interfaces.CharSpecService;
30 23
import com.ai.bss.security.protection.service.interfaces.WorkOrderManagementService;
31 24
import com.ai.bss.security.protection.utils.EbcConstant;
32 25
import com.ai.bss.security.protection.utils.ExcelException;
33 26
import com.ai.bss.security.protection.utils.ExcelUtil;
27
import com.ai.bss.user.dto.UserDto;
34 28
import com.ai.bss.user.service.api.UserDtoQuery;
29
import com.ai.bss.work.attendance.dto.LeaveApprovalDto;
35 30
import com.ai.bss.work.attendance.model.AttendanceTaskSpec;
31
import com.ai.bss.work.attendance.service.api.ApprovalImportCommand;
36 32
import com.ai.bss.work.attendance.service.api.ApprovalTaskQuery;
37 33
import com.ai.bss.work.service.api.EventHandleCommand;
38 34
import com.ai.bss.work.service.api.WorkOrderCommand;
@ -41,6 +37,8 @@ import com.ai.bss.work.task.model.common.WorkOrder;
41 37
import com.ai.bss.work.task.model.common.WorkTask;
42 38
import com.alibaba.fastjson.JSON;
43 39
import com.alibaba.fastjson.JSONObject;
40
import com.alibaba.fastjson.serializer.SerializerFeature;
41
import com.google.common.collect.Lists;
44 42
45 43
import lombok.extern.slf4j.Slf4j;
46 44
@ -217,7 +215,7 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
217 215
218 216
		workEvent.setCharValueSet(JSON.toJSONString(params));
219 217
220
		log.debug("申请工单: "+JSON.toJSONString(workEvent));
218
		log.debug("申请工单: " + JSON.toJSONString(workEvent));
221 219
222 220
		CommonRequest<WorkEvent> eventRequest = new CommonRequest<WorkEvent>(workEvent);
223 221
		CommonResponse response = eventHandleCommand.handleEvent(eventRequest);
@ -244,7 +242,7 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
244 242
245 243
		workOrder.setCharValueSet(JSON.toJSONString(charValueMap));
246 244
247
		log.debug("审核工单: "+JSON.toJSONString(workOrder));
245
		log.debug("审核工单: " + JSON.toJSONString(workOrder));
248 246
249 247
		CommonRequest<WorkOrder> workOrderRequest = new CommonRequest<WorkOrder>(workOrder);
250 248
		CommonResponse<WorkTask> response = workOrderCommand.reportWorkOrderResult(workOrderRequest);
@ -257,31 +255,46 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
257 255
	}
258 256
259 257
	@Override
260
	public CommonResponse normalClocking(Map<String,String> map) throws Throwable {
258
	public CommonResponse normalClocking(Map<String, String> map) throws Throwable {
261 259
262 260
		String clockingType = map.get("clockingType");
263 261
		String employId = map.get("employId");
264 262
265 263
		UserDto userDto = new UserDto();
266 264
		userDto.setId(employId);
267
		CommonRequest<UserDto> request = CommonRequest.<UserDto>builder().data(userDto).pageNumber(1).pageSize(1).build();
268
		CommonResponse<PageBean<UserDto>>  result = userDtoQuery.queryWorkEmployee(request);
269
		String  employOrgId = result.getData().getData().get(0).getOrgId();
270
		log.info("输出参数:{}",JSON.toJSONString(result , SerializerFeature.PrettyFormat));
271
265
		CommonRequest<UserDto> request = CommonRequest.<UserDto>builder().data(userDto).pageNumber(1).pageSize(1)
266
				.build();
267
		CommonResponse<PageBean<Map<String, Object>>> resultResponse = userDtoQuery.queryWorkEmployee(request);
268
269
		/*String employOrgId = "";
270
		try {
271
			employOrgId = result.getData().getData().get(0).get("id");
272
		}catch (Exception e){
273
			log.error("员工不存在");
274
			new BaseException("员工不存在");
275
		}*/
276
		if (resultResponse == null || resultResponse.getData() == null
277
				|| CollectionUtils.isEmpty(resultResponse.getData().getData())
278
				|| CollectionUtils.isEmpty(resultResponse.getData().getData().get(0))
279
				|| resultResponse.getData().getData().get(0).get("id") == null) {
280
			log.error("员工不存在");
281
			new BaseException("员工不存在");
282
		}
283
		String employOrgId = String.valueOf(resultResponse.getData().getData().get(0).get("id"));
284
		log.info("输出参数:{}", JSON.toJSONString(resultResponse, SerializerFeature.PrettyFormat));
272 285
273
		String clockingTime	 = map.get("clockingTime");
286
		String clockingTime = map.get("clockingTime");
274 287
		WorkEvent workEvent = new WorkEvent();
275 288
276 289
		workEvent.setWorkEmployeeRoleId(employId);
277 290
		workEvent.setWorkOrgRoleId(employOrgId);
278 291
		workEvent.setEventSpecId(clockingType);
279 292
280
		Map<String,String> charValueSet = new HashMap<>();
281
		charValueSet.put("clockingTime",clockingTime);
282
		charValueSet.put("clockingType","NORMAL");
283
		charValueSet.put("clockingLongitude","121.545500");
284
		charValueSet.put("clockingLatitude","31.281153");
293
		Map<String, String> charValueSet = new HashMap<>();
294
		charValueSet.put("clockingTime", clockingTime);
295
		charValueSet.put("clockingType", "NORMAL");
296
		charValueSet.put("clockingLongitude", "121.545500");
297
		charValueSet.put("clockingLatitude", "31.281153");
285 298
		workEvent.setCharValueSet(JSONObject.toJSONString(charValueSet));
286 299
//		"clockingTime": "2020-10-15 08:00:00",
287 300
//				"clockingType": "NORMAL",
@ -295,12 +308,9 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
295 308
//				JSON.parseObject(JSONObject.toJSONString(workEvent), new TypeReference<CommonRequest<WorkEvent>>() {
296 309
//				});
297 310
298
299 311
//		CommonRequest<WorkEvent> requestWorkEvent = new CommonRequest<WorkEvent>(workEvent);
300 312
		CommonRequest<WorkEvent> requestWorkEvent = CommonRequest.<WorkEvent>builder().data(workEvent).build();
301 313
302
303
304 314
		log.info("WorkEvent: \n{}", JSON.toJSONString(requestWorkEvent, true));
305 315
		CommonResponse runningResult = eventHandleCommand.handleEvent(requestWorkEvent);
306 316
		log.info("success: \n{}", JsonUtils.toJSONStringByDateFormat(runningResult, true));
@ -318,24 +328,24 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
318 328
319 329
		String orgCode = "0000";
320 330
		CommonRequest<String> request = CommonRequest.<String>builder().data(Strings.EMPTY).build();
321
		CommonResponse<Map<String,Map<String,Object>>>  userMapresult = userDtoQuery.queryUserCodeWithId(request);
331
		CommonResponse<Map<String, Map<String, Object>>> userMapresult = userDtoQuery.queryUserCodeWithId(request);
322 332
		log.info(JSON.toJSONString(userMapresult));
323 333
324 334
		List<LeaveApprovalDto> list = Lists.newArrayList();
325 335
		// "approvalResult": "APPROVED",
326 336
		// "approvalComment": "下次注意"
327
  /* "workEmployeeRoleId": "201057520856",
328
      "workOrgRoleId": "99",
329
      "charValueSet": {
330
        "approvalType": "ASK_LEAVE",
331
        "approvalSubType": "ASK_LEAVE-YEA",
332
        "approvalReason": "zt-test",
333
        "approvalEmployeeRoleId": "1113",
334
        "beginTime": "2020-10-12",
335
        "endTime": "2020-10-13",
336
        "duration": "2",
337
        "leaveType": "YEA"
338
        */
337
		/* "workEmployeeRoleId": "201057520856",
338
		    "workOrgRoleId": "99",
339
		    "charValueSet": {
340
		"approvalType": "ASK_LEAVE",
341
		"approvalSubType": "ASK_LEAVE-YEA",
342
		"approvalReason": "zt-test",
343
		"approvalEmployeeRoleId": "1113",
344
		"beginTime": "2020-10-12",
345
		"endTime": "2020-10-13",
346
		"duration": "2",
347
		"leaveType": "YEA"
348
		*/
339 349
		LeaveApprovalDto dto = new LeaveApprovalDto();
340 350
		dto.setApprovalComment("同意");
341 351
@ -350,13 +360,14 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
350 360
		dto.setApprovalReason(" no reason ");
351 361
		dto.setApplyTime("2020-10-12 12:00:00");
352 362
		dto.setBeginTime("2020-10-12");
353
		dto.setEndTime( "2020-10-13");
363
		dto.setEndTime("2020-10-13");
354 364
		dto.setDuration("2");
355 365
		dto.setLeaveType("YEA");
356
		list.add( dto);
357
		CommonRequest<List<LeaveApprovalDto>> conditionMapRequest = CommonRequest.<List<LeaveApprovalDto>>builder().data(list).build();
358
		Object importResult =  approvalImportCommand.leaveApprovalImport(conditionMapRequest);
359
		log.info(JSON.toJSONString( importResult));
366
		list.add(dto);
367
		CommonRequest<List<LeaveApprovalDto>> conditionMapRequest = CommonRequest.<List<LeaveApprovalDto>>builder()
368
				.data(list).build();
369
		Object importResult = approvalImportCommand.leaveApprovalImport(conditionMapRequest);
370
		log.info(JSON.toJSONString(importResult));
360 371
361 372
//        saveAskLeaveOrder(listTerminal, file.getOriginalFilename());
362 373
		return CommonResponse.OK_VOID;

+ 8 - 6
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/AiAlarmManageService.java

@ -26,16 +26,18 @@ public interface AiAlarmManageService {
26 26
	CommonResponse<Map<String,Object>> queryOneAiAlarmInfo(@RequestParam String workTaskId) throws Exception;
27 27
	
28 28
	/**
29
	 * AI任务模型匹配下拉列表
30
	 * @return
31
	 */
32
	CommonResponse<List<AiModel>> queryAiTaskModelList();
33
34
	/**
35 29
	 * 根据 设备id 和 匹配模型 查询 AI任务
36 30
	 * @param resourceToolId 设备id
37 31
	 * @param aiIdenModel 匹配模型
38 32
	 * @return
39 33
	 */
40 34
	CommonResponse<List<Map<String, Object>>> queryAiTaskByDevice(String resourceToolId, String aiIdenModel);
35
	
36
	/**
37
	 * 查询AI告警信息数量
38
	 * @param params
39
	 * @return
40
	 * @throws Exception
41
	 */
42
	List<Map<String, Object>> queryAiAlarmCount(Map<String, Object> params) throws Exception;
41 43
}

+ 79 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/AiIdenLogManageService.java

@ -0,0 +1,79 @@
1
package com.ai.bss.security.protection.service.interfaces;
2
3
import java.util.List;
4
import java.util.Map;
5
6
import com.ai.abc.api.model.CommonResponse;
7
import com.ai.bss.components.common.model.PageBean;
8
import com.ai.bss.work.safety.model.AiIdenLog;
9
10
/**
11
 * AI执行结果
12
 * @author konghl@asiainfo.com
13
 * 2020-12-24
14
 */
15
public interface AiIdenLogManageService {
16
17
	/**
18
	 * 分页查询AI执行结果信息
19
	 * @param params
20
	 * @param pageNumber
21
	 * @param pageSize
22
	 * @return
23
	 * @throws Exception
24
	 */
25
	CommonResponse<PageBean<Map<String, Object>>> queryPageAiIdenLog(Map<String, Object> params, int pageNumber,
26
			int pageSize) throws Exception;
27
28
	/**
29
	 * 查询所有AI执行结果的图片列表
30
	 * @param params
31
	 * @param pageNumber
32
	 * @param pageSize
33
	 * @return
34
	 * @throws Exception
35
	 */
36
	CommonResponse<List<Map<String, Object>>> queryAllAiIdenLogPicture(Map<String, Object> params, int pageNumber,
37
			int pageSize) throws Exception;
38
39
	/**
40
	 * 查询单个AI执行结果详情
41
	 * @param aiIdenLogId
42
	 * @return
43
	 * @throws Exception
44
	 */
45
	CommonResponse<Map<String, Object>> queryOneAiIdenLog(Long aiIdenLogId) throws Exception;
46
47
	/**
48
	 * 查询所有设备最后一个识别记录
49
	 * @param params
50
	 * @return
51
	 * @throws Exception
52
	 */
53
	CommonResponse<List<Map<String, Object>>> selectLastAiIdenLog(Map<String, String> params) throws Exception;
54
	
55
	/**
56
	 * 创建AI执行结果
57
	 * @param aiIdenLog
58
	 * @return
59
	 * @throws Exception
60
	 */
61
	CommonResponse<AiIdenLog> createAiIdenLog(AiIdenLog aiIdenLog) throws Exception;
62
63
	/**
64
	 * 修改AI执行结果
65
	 * @param aiIdenLog
66
	 * @return
67
	 * @throws Exception
68
	 */
69
	CommonResponse<AiIdenLog> modifyAiIdenLog(AiIdenLog aiIdenLog) throws Exception;
70
71
	/**
72
	 * 删除AI执行结果
73
	 * @param aiIdenLogIdList
74
	 * @return
75
	 * @throws Exception
76
	 */
77
	CommonResponse<Void> deleteAiIdenLog(List<Long> aiIdenLogIdList) throws Exception;
78
79
}

+ 2 - 2
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/AttendanceCommonService.java

@ -16,7 +16,7 @@ public interface AttendanceCommonService {
16 16
     * @return
17 17
     * @throws Exception
18 18
     */
19
    CommonResponse<PageBean<UserDto>> queryWorkEmployee(Map<String, Object> params) ;
19
    CommonResponse<PageBean<Map<String, Object>>> queryWorkEmployee(Map<String, Object> params) ;
20 20
21 21
22 22
@ -26,7 +26,7 @@ public interface AttendanceCommonService {
26 26
     * @return
27 27
     * @throws Exception
28 28
     */
29
    CommonResponse<PageBean<UserDto>> queryWorkEmployee(CommonRequest<UserDto> request) throws Exception;
29
    CommonResponse<PageBean<Map<String, Object>>> queryWorkEmployee(CommonRequest<UserDto> request) throws Exception;
30 30
31 31
    /**
32 32
     * 查询所有部门(课通过name过滤)

+ 106 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/EmployeeManagementService.java

@ -0,0 +1,106 @@
1
package com.ai.bss.security.protection.service.interfaces;
2
3
import java.util.List;
4
import java.util.Map;
5
6
import com.ai.bss.characteristic.spec.model.CharacteristicSpecValue;
7
import org.springframework.web.multipart.MultipartFile;
8
9
import com.ai.abc.api.model.CommonResponse;
10
import com.ai.bss.components.common.model.PageBean;
11
import com.ai.bss.person.model.Organization;
12
import com.ai.bss.user.dto.EmployeeDto;
13
import com.ai.bss.user.dto.UserDto;
14
15
public interface EmployeeManagementService {
16
17
	/**
18
	 * 分页查询用户信息
19
	 * @param userDto
20
	 * @param pageNumber
21
	 * @param pageSize
22
	 * @return
23
	 * @throws Exception
24
	 */
25
	CommonResponse<PageBean<Map<String, Object>>> queryEmployeeList(UserDto userDto, int pageNumber, int pageSize) throws Exception;
26
27
	/**
28
	 * 查询单个用户信息
29
	 * @param employeeId
30
	 * @return
31
	 * @throws Exception
32
	 */
33
	CommonResponse<Map<String, Object>> queryOneEmployee(Long employeeId) throws Exception;
34
35
	/**
36
	 * 新增用户信息
37
	 * @param employeeDto
38
	 * @return
39
	 * @throws Exception
40
	 */
41
	CommonResponse<Void> createEmployee(EmployeeDto employeeDto) throws Exception;
42
43
	/**
44
	 * 修改用户信息
45
	 * @param employeeDto
46
	 * @return
47
	 * @throws Exception
48
	 */
49
	CommonResponse<Void> modifyEmployee(EmployeeDto employeeDto) throws Exception;
50
51
	/**
52
	 * 删除用户信息
53
	 * @param employeeId
54
	 * @return
55
	 * @throws Exception
56
	 */
57
	CommonResponse<Void> deleteEmployee(String employeeId) throws Exception;
58
59
	/**
60
	 * 上传用户照片
61
	 * @param meFile
62
	 * @param pictureUrl
63
	 * @return
64
	 * @throws Exception
65
	 */
66
	Map<String, String> uploadEmployeePicture(MultipartFile meFile, String pictureUrl) throws Exception;
67
68
	/**
69
	 * 审核用户照片
70
	 * @param employeeId
71
	 * @param field2
72
	 * @param field3
73
	 * @return
74
	 * @throws Exception
75
	 */
76
	CommonResponse<Void> auditEmployeePicture(Long employeeId,String field2,String field3) throws Exception;
77
78
	/**
79
	 * 获取职务下拉列表
80
	 * @return
81
	 */
82
	List<CharacteristicSpecValue> queryJobPositionList() throws Exception;
83
84
	/**
85
	 * 根据部门ID查询子部门列表
86
	 * @param orgId
87
	 * @return
88
	 */
89
	CommonResponse<List<Organization>> queryChildOrgById(Long orgId);
90
91
	/**
92
	 * 根据部门ID查询下级及下下级部门列表
93
	 * @param orgId
94
	 * @return
95
	 */
96
	CommonResponse<List<Organization>> queryCycleChildOrg(Long orgId);
97
98
	/**
99
	 * 根据部门ID查询下级及下下级部门的员工列表
100
	 * @param orgId
101
	 * @param pageNumber
102
	 * @param pageSize
103
	 * @return
104
	 */
105
	List<Map<String, Object>> queryEmployeeListByOrgId(Long orgId, int pageNumber, int pageSize);
106
}

+ 22 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/LoginService.java

@ -0,0 +1,22 @@
1
package com.ai.bss.security.protection.service.interfaces;
2
3
4
5
import com.ai.bss.security.protection.model.User;
6
7
import javax.servlet.http.HttpServletRequest;
8
import java.util.Map;
9
10
/**
11
 * @Auther: 王超
12
 * @Date: 2020/12/24 15:12
13
 * @Description:
14
 */
15
public interface LoginService {
16
17
18
    Map<String, Object> findMenus(User user, HttpServletRequest request);
19
20
21
    Map<String, Object> login(User user);
22
}

+ 3 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/MonitorVideoLogManageService.java

@ -22,6 +22,9 @@ public interface MonitorVideoLogManageService {
22 22
	CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
23 23
			throws Exception;
24 24
25
26
	CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition) throws Exception;
27
25 28
	/**
26 29
	 * 根据视频日志ID查询监控视频日志
27 30
	 * @param monitorVideoLogId

+ 8 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/ResourceToolManageService.java

@ -82,4 +82,12 @@ public interface ResourceToolManageService {
82 82
	 * @throws Exception
83 83
	 */
84 84
	Map<String, String> uploadResourceToolPicture(MultipartFile meFile, String pictureUrl) throws Exception;
85
	
86
	/**
87
	 * 根据设备CODE获取AI任务等相关信息
88
	 * @param resourceToolCode
89
	 * @return
90
	 */
91
	CommonResponse<List<Map<String, Object>>> getResourceToolAllInfo(String resourceToolCode);
92
	
85 93
}

+ 6 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/SysConfigAiTaskService.java

@ -4,6 +4,7 @@ import com.ai.abc.api.model.CommonRequest;
4 4
import com.ai.abc.api.model.CommonResponse;
5 5
import com.ai.bss.components.common.model.PageBean;
6 6
import com.ai.bss.security.protection.model.AiQuery;
7
import com.ai.bss.work.safety.model.AiModel;
7 8
import com.ai.bss.work.safety.model.AiTask;
8 9
import com.ai.bss.work.task.model.common.WorkTask;
9 10
@ -21,4 +22,9 @@ public interface SysConfigAiTaskService {
21 22
22 23
    CommonResponse<AiTask> modifyAiTask(AiTask aiTask);
23 24
25
    /**
26
	 * AI任务模型匹配下拉列表
27
	 * @return
28
	 */
29
	CommonResponse<List<AiModel>> queryAiTaskModelList();
24 30
}

+ 51 - 54
security-protection-service/src/main/java/com/ai/bss/security/protection/service/task/AiResultRecordKafkaTask.java

@ -3,7 +3,6 @@ package com.ai.bss.security.protection.service.task;
3 3
import java.util.List;
4 4
import java.util.Map;
5 5
6
import org.apache.commons.lang.StringUtils;
7 6
import org.apache.kafka.clients.consumer.ConsumerRecord;
8 7
import org.springframework.beans.factory.annotation.Autowired;
9 8
import org.springframework.kafka.annotation.KafkaListener;
@ -14,9 +13,10 @@ import org.springframework.util.CollectionUtils;
14 13
import com.ai.abc.api.model.CommonRequest;
15 14
import com.ai.abc.api.model.CommonResponse;
16 15
import com.ai.abc.util.JsonUtils;
17
import com.ai.bss.security.protection.service.interfaces.AiAlarmManageService;
18
import com.ai.bss.security.protection.service.interfaces.ResourceToolManageService;
16
import com.ai.bss.security.protection.service.interfaces.AiIdenLogManageService;
19 17
import com.ai.bss.security.protection.utils.EbcConstant;
18
import com.ai.bss.user.dto.EmployeeDto;
19
import com.ai.bss.user.service.api.EmployeeService;
20 20
import com.ai.bss.work.safety.model.AiIdenLog;
21 21
import com.ai.bss.work.safety.service.api.AiTaskCommand;
22 22
import com.ai.bss.work.safety.service.api.MonitorSceneQuery;
@ -39,13 +39,13 @@ public class AiResultRecordKafkaTask {
39 39
	private AiTaskCommand aiTaskCommand;
40 40
41 41
	@Autowired
42
	private ResourceToolManageService resourceToolManageService;
42
	private MonitorSceneQuery monitorSceneQuery;
43 43
44 44
	@Autowired
45
	private MonitorSceneQuery monitorSceneQuery;
45
	private AiIdenLogManageService aiIdenLogManageService;
46 46
47 47
	@Autowired
48
	private AiAlarmManageService aiAlarmManageService;
48
	private EmployeeService employeeService;
49 49
50 50
	@KafkaListener(containerFactory = "kafkaBatchListener6", topics = "${kafka.topic.aitask:topic_ai_task}", groupId = "ai_group")
51 51
	public void AiResultRecordListener(ConsumerRecord<String, String> records, Acknowledgment ack) throws Throwable {
@ -55,75 +55,72 @@ public class AiResultRecordKafkaTask {
55 55
			String message = records.value();
56 56
			log.info("已接AI任务执行结果消息,消息为:" + message);
57 57
58
			AiIdenLog aiIdenLog = JSON.parseObject(message, new TypeReference<AiIdenLog>() {
59
			});
60
58 61
			JSONObject messageJson = JSONObject.parseObject(message);
59
			String resourceToolCod = messageJson.getString("resourceToolCode");
60
			String aiIdenModel = messageJson.getString("aiIdenModel");
62
			String resourceToolId = messageJson.getString("resourceToolId");
61 63
			String idenResultType = messageJson.getString("idenResultType");
64
			Long relateEmployeeRoleId = messageJson.getLong("relateEmployeeRoleId");
62 65
63
			// 查询相关数据
64
			Map<String, Object> resourceToolMap = resourceToolManageService.queryResourceToolByCode(resourceToolCod);
65
			if (resourceToolMap == null) {
66
				log.error("AI任务执行结果的设备CODE不存在:  resourceToolCode=" + messageJson.getString("resourceToolCode"));
67
				throw new NullPointerException("resourceToolCode not exist");
68
			}
69
70
			String resourceToolId = String.valueOf(resourceToolMap.get("resourceToolId"));
71
66
			// 关联场景信息
72 67
			CommonResponse<List<Map<String, Object>>> sceneTerminalRelResponse = monitorSceneQuery
73 68
					.selectSceneTerminalRel(new CommonRequest<Long>(Long.valueOf(resourceToolId)));
74 69
			if (sceneTerminalRelResponse == null || CollectionUtils.isEmpty(sceneTerminalRelResponse.getData())) {
75 70
				log.error("AI任务执行结果的关联场景不存在:  resourceToolId=" + resourceToolId);
76 71
				throw new NullPointerException("sceneTerminalRel not exist");
77 72
			}
78
			Map<String, Object> sceneTerminalRelMap = sceneTerminalRelResponse.getData().get(0);
79 73
80
			CommonResponse<List<Map<String, Object>>> aiTaskResponse = aiAlarmManageService
81
					.queryAiTaskByDevice(resourceToolId, aiIdenModel);
82
			if (aiTaskResponse == null || CollectionUtils.isEmpty(aiTaskResponse.getData())) {
83
				log.error("AI任务执行结果的任务不存在:  resourceToolId=" + resourceToolId + ", aiIdenModel=" + aiIdenModel);
84
				throw new NullPointerException("aiTask not exist");
85
			}
86
			Map<String, Object> aiTaskMap = aiTaskResponse.getData().get(0);
74
			Map<String, Object> sceneTerminalRelMap = sceneTerminalRelResponse.getData().get(0);
87 75
88
			// 封装数据
89
			AiIdenLog aiIdenLog = JSON.parseObject(message, new TypeReference<AiIdenLog>() {
90
			});
91
			aiIdenLog.setResourceToolId(resourceToolId);
92
			aiIdenLog.setResourceToolName(
93
					StringUtils.defaultIfBlank(String.valueOf(resourceToolMap.get("resourceToolName")), ""));
94
			aiIdenLog.setMonitorSceneId(
95
					StringUtils.defaultIfBlank(String.valueOf(sceneTerminalRelMap.get("monitorSceneId")), ""));
96
			aiIdenLog.setMonitorSceneName(
97
					StringUtils.defaultIfBlank(String.valueOf(sceneTerminalRelMap.get("monitorSceneName")), ""));
98
			// aiIdenLog.setEffectType(StringUtils.defaultIfBlank(String.valueOf(sceneTerminalRelMap.get("effectType")),EbcConstant.TERMINAL_EFFECT_TYPE_OTH));
76
			aiIdenLog.setMonitorSceneId(sceneTerminalRelMap.get("monitorSceneId") == null ? ""
77
					: String.valueOf(sceneTerminalRelMap.get("monitorSceneId")));
78
			aiIdenLog.setMonitorSceneName(sceneTerminalRelMap.get("monitorSceneName") == null ? ""
79
					: String.valueOf(sceneTerminalRelMap.get("monitorSceneName")));
80
			aiIdenLog.setEffectType(sceneTerminalRelMap.get("effectType") == null ? EbcConstant.TERMINAL_EFFECT_TYPE_OTH
81
					: String.valueOf(sceneTerminalRelMap.get("effectType")));
99 82
			aiIdenLog.setTerminalPosition(
100
					StringUtils.defaultIfBlank(String.valueOf(sceneTerminalRelMap.get("place")), ""));
83
					sceneTerminalRelMap.get("place") == null ? "" : String.valueOf(sceneTerminalRelMap.get("place")));
101 84
			aiIdenLog.setOrganizationId(
102
					StringUtils.defaultIfBlank(String.valueOf(sceneTerminalRelMap.get("orgId")), ""));
103
			aiIdenLog.setAiTaskId(
104
					aiTaskMap.get("aiTaskId") == null ? 0L : Long.valueOf(String.valueOf(aiTaskMap.get("aiTaskId"))));
105
106
			// TODO 人员信息暂时默认
107
			aiIdenLog.setRelateEmployeeRoleId("201613310867");
108
			aiIdenLog.setRelateEmployeeRoleName("王浩");
85
					sceneTerminalRelMap.get("orgId") == null ? "" : String.valueOf(sceneTerminalRelMap.get("orgId")));
86
87
			// 关联员工信息
88
			EmployeeDto employeeDto = null;
89
			if (relateEmployeeRoleId != null) {
90
				employeeDto = new EmployeeDto();
91
				employeeDto.setId(relateEmployeeRoleId);
92
				CommonRequest<EmployeeDto> employeeDtoRequest = new CommonRequest<EmployeeDto>(employeeDto);
93
				CommonResponse<EmployeeDto> employeeDtoResponse = employeeService.queryEmployee(employeeDtoRequest);
94
				if (employeeDtoResponse == null || employeeDtoResponse.getData() == null) {
95
					employeeDto = null;
96
				} else {
97
					employeeDto = employeeDtoResponse.getData();
98
				}
99
			}
100
			if (employeeDto != null) {
101
				aiIdenLog.setRelateEmployeeRoleName(employeeDto.getName());
102
				aiIdenLog.setOrganizationId(String.valueOf(employeeDto.getOrganizeId()));
103
			} else {
104
				aiIdenLog.setRelateEmployeeRoleId("-1");
105
				aiIdenLog.setRelateEmployeeRoleName(null);
106
			}
109 107
110 108
			// 执行操作
111
			CommonRequest<AiIdenLog> aiIdenLogRequest = new CommonRequest<AiIdenLog>(aiIdenLog);
112
113
			CommonResponse<AiIdenLog> runningResult = aiTaskCommand.createAiIdenLog(aiIdenLogRequest);
114
			log.debug("AI任务执行结果: \n{}", JsonUtils.toJSONStringByDateFormat(runningResult, true));
109
			CommonResponse<AiIdenLog> aiIdenLogRunningResult = aiIdenLogManageService.createAiIdenLog(aiIdenLog);
110
			log.debug("AI任务执行结果: \n{}", JsonUtils.toJSONStringByDateFormat(aiIdenLogRunningResult, true));
115 111
116
			if (!runningResult.isSuccess()) {
117
				log.error("AI任务执行结果异常: " + runningResult.getFail().getMessage());
112
			if (!aiIdenLogRunningResult.isSuccess()) {
113
				log.error("AI任务执行结果异常: " + aiIdenLogRunningResult.getFail().getMessage());
118 114
				return;
119 115
			}
120 116
121 117
			if (!EbcConstant.AI_IDENTIFY_RESULT_NORMAL.equals(idenResultType)) {
122
				CommonResponse runningResult1 = aiTaskCommand.aiIdenLogTriggerEvent(aiIdenLogRequest);
118
				CommonRequest<AiIdenLog> aiIdenLogRequest = new CommonRequest<AiIdenLog>(aiIdenLog);
119
				CommonResponse triggerEventRunningResult = aiTaskCommand.aiIdenLogTriggerEvent(aiIdenLogRequest);
123 120
124
				log.debug("AI任务非正常情况的执行结果: \n{}", JsonUtils.toJSONStringByDateFormat(runningResult1, true));
125
				if (!runningResult.isSuccess()) {
126
					log.error("AI任务非正常情况的执行结果异常: " + runningResult.getFail().getMessage());
121
				log.debug("AI任务触发事件的执行结果: \n{}", JsonUtils.toJSONStringByDateFormat(triggerEventRunningResult, true));
122
				if (!triggerEventRunningResult.isSuccess()) {
123
					log.error("AI任务触发事件的执行结果异常: " + triggerEventRunningResult.getFail().getMessage());
127 124
					return;
128 125
				}
129 126
			}

+ 11 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/utils/DateUtil.java

@ -540,7 +540,7 @@ public class DateUtil {
540 540
	/**
541 541
	 * 取得date中的纯日期部分
542 542
	 *
543
	 * @param date需要变动的日期
543
	 * @param date
544 544
	 * @return 变动后的日期
545 545
	 */
546 546
	public static Date getDateWithoutTime(Date date) {
@ -652,4 +652,14 @@ public class DateUtil {
652 652
		return Integer.parseInt(lastDay);
653 653
	}
654 654
655
656
	public static String getDateTimeString(Date date){
657
		if (date == null){
658
			return null;
659
		}
660
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat( NORM_DATETIME_PATTERN);
661
		String dateString = simpleDateFormat.format(date);
662
		return dateString;
663
	}
664
655 665
}

+ 23 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/utils/EbcConstant.java

@ -12,6 +12,9 @@ public class EbcConstant {
12 12
	// 每页默认查询条数
13 13
	public static final int DEFAULT_PAGE_SIZE = 20;
14 14
15
	// 部门列表的根节点(部门的根节点为集团,集团的下一级为公司,公司的下一级为部门)
16
	public static final Long ORGANIZE_ROOT_ID=1L;
17
	
15 18
	// 异常考勤查询常量异常取值 abnormal,
16 19
	public static final String ATTENDANCE_STATUSTYPE_ABNORMAL = "ABNORMAL";
17 20
@ -54,6 +57,9 @@ public class EbcConstant {
54 57
	// 静态常量: AI任务状态
55 58
	public static final String BUSINESS_SPEC_AI_TASK_STATUS = "AI_TASK_STATUS";
56 59
	
60
	//静态常量: 职务类型
61
	public static final String BUSINESS_SPEC_EMPLOYEE_POSITION="mainJobPosition";
62
	
57 63
	// 视频监控保存视频文件固定前缀
58 64
	public static final String AI_MONITOR_FILE_PREFIX_VIDEO= "-video";
59 65
		
@ -78,6 +84,23 @@ public class EbcConstant {
78 84
	//场景关联设备的作用类别:其他
79 85
	public static final String TERMINAL_EFFECT_TYPE_OTH="OTH";
80 86
	
87
	//审核状态:待审核
88
	public static final String AUDIT_STATUS_INI="0";
89
	
90
	//审核状态:已生效(审核通过)
91
	public static final String AUDIT_STATUS_ACC="5";
92
	
93
	//审核状态:未生效(未审核通过)
94
	public static final String AUDIT_STATUS_DIS="3";
95
	
96
	//AI匹配模型:着装违规识别
97
	public static final String AI_MODEL_CLOTHING_CODE="CLOTHING_CODE";
98
	
99
	//AI匹配模型:人脸识别
100
	public static final String AI_MODEL_FACE="FACE";
101
	
102
	//AI匹配模型:陌生人识别
103
	public static final String AI_MODEL_STRANGER="STRANGER";
81 104
	
82 105
	
83 106
	// 当前登录者的STAFF_ID

+ 295 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/utils/HttpServiceUtil.java

@ -0,0 +1,295 @@
1
package com.ai.bss.security.protection.utils;
2
3
import com.alibaba.fastjson.JSONObject;
4
import org.apache.http.HttpEntity;
5
import org.apache.http.HttpStatus;
6
import org.apache.http.client.ClientProtocolException;
7
import org.apache.http.client.HttpClient;
8
import org.apache.http.client.config.RequestConfig;
9
import org.apache.http.client.methods.CloseableHttpResponse;
10
import org.apache.http.client.methods.HttpGet;
11
import org.apache.http.client.methods.HttpPost;
12
import org.apache.http.client.methods.HttpPut;
13
import org.apache.http.entity.StringEntity;
14
import org.apache.http.entity.mime.MultipartEntityBuilder;
15
import org.apache.http.impl.client.CloseableHttpClient;
16
import org.apache.http.impl.client.HttpClients;
17
import org.apache.http.protocol.HTTP;
18
import org.apache.http.util.EntityUtils;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.springframework.util.CollectionUtils;
22
23
import java.io.*;
24
import java.net.HttpURLConnection;
25
import java.net.URL;
26
import java.net.URLEncoder;
27
import java.nio.charset.Charset;
28
import java.util.Iterator;
29
import java.util.Map;
30
import java.util.Set;
31
32
/**
33
 * http服务请求工具类
34
 *
35
 * @author chencai
36
 */
37
public class HttpServiceUtil {
38
	static Logger log = LoggerFactory.getLogger(HttpServiceUtil.class);
39
40
	private static final String HTTP_CONTENT_TYPE_JSON = "application/json; charset=utf-8";
41
42
	public static String buildUrl(Map<String, String> paramMap, String serviceUrl) {
43
		String url = null;
44
		StringBuffer urlString = new StringBuffer();
45
		urlString.append(serviceUrl);
46
47
		if (!paramMap.isEmpty()) {
48
			// 参数列表不为空,地址尾部增加'?'
49
			urlString.append('?');
50
			// 拼接参数
51
			Set<Map.Entry<String, String>> entrySet = paramMap.entrySet();
52
			for (Map.Entry<String, String> entry : entrySet) {
53
				try {
54
					urlString.append(entry.getKey()).append('=').append(URLEncoder.encode(entry.getValue(), "UTF-8"))
55
							.append('&');
56
				} catch (UnsupportedEncodingException e) {
57
					log.error(" Exception: " + e);
58
				}
59
			}
60
			// 去掉最后一个字符“&”
61
			url = urlString.substring(0, urlString.length() - 1);
62
		}
63
		return url;
64
	}
65
66
	public static String sendRequest(String url) {
67
		InputStream inputStream = null;
68
		BufferedReader bufferedReader = null;
69
		HttpURLConnection httpURLConnection = null;
70
		try {
71
			log.error("It's not error. request url: " + url);
72
			URL requestURL = new URL(url);
73
			// 获取连接
74
			httpURLConnection = (HttpURLConnection) requestURL.openConnection();
75
			httpURLConnection.setConnectTimeout(10000); // 建立连接的超时时间,毫秒
76
			httpURLConnection.setReadTimeout(25000); // 获得返回的超时时间,毫秒
77
			httpURLConnection.setRequestMethod("GET");
78
			httpURLConnection.setRequestProperty("Content-type", "text/html;charset=UTF-8");
79
			httpURLConnection.setRequestProperty("Accept",
80
					"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8");
81
			// 通过输入流获取请求的内容
82
			inputStream = httpURLConnection.getInputStream();
83
			bufferedReader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
84
			String temp = null;
85
			StringBuffer stringBuffer = new StringBuffer();
86
			// 循环读取返回的结果
87
			while ((temp = bufferedReader.readLine()) != null) {
88
				stringBuffer.append(temp);
89
			}
90
91
			return stringBuffer.toString();
92
		} catch (Exception e) {
93
			log.error("sendRequest Exception: " + e);
94
		} finally {
95
			// 断开连接
96
			if (httpURLConnection != null) {
97
				httpURLConnection.disconnect();
98
			}
99
			// 关闭流
100
			if (bufferedReader != null) {
101
				try {
102
					bufferedReader.close();
103
				} catch (IOException e) {
104
					log.error("bufferedReader Exception: " + e);
105
				}
106
			}
107
			if (inputStream != null) {
108
				try {
109
					inputStream.close();
110
				} catch (IOException e) {
111
					log.error("inputStream Exception: " + e);
112
				}
113
			}
114
		}
115
		return null;
116
	}
117
118
	public static String sendPostRequest(String url, Map<String, String> map, String encoding) {
119
		String retStr = "";
120
		try {
121
			retStr = sendPostRequest(url, map, encoding, 0, 0);
122
		} catch (Exception ex) {
123
			log.error("sendPostRequest error: " + ex);
124
		}
125
126
		return retStr;
127
	}
128
129
	public static String sendPostRequest(String url, Map<String, String> map, String encoding, int ebossConnectTimeout,
130
			int ebossServiceTimeout) {
131
		CloseableHttpClient httpClient = HttpClients.createDefault();
132
		HttpPost httpPost = new HttpPost(url);
133
		String body = "";
134
135
		try {
136
			MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
137
			if (map != null) {
138
				for (Map.Entry<String, String> entry : map.entrySet()) {
139
					multipartEntityBuilder.addTextBody(entry.getKey(), entry.getValue());
140
				}
141
			}
142
143
			log.debug("ebossConnectTimeout:" + ebossConnectTimeout);
144
			log.debug("ebossServiceTimeout:" + ebossServiceTimeout);
145
146
			httpPost.setEntity(multipartEntityBuilder.build());
147
			if (ebossConnectTimeout != 0 && ebossServiceTimeout != 0) {
148
				RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(ebossServiceTimeout)
149
						.setConnectTimeout(ebossConnectTimeout).build();// 设置请求和传输超时时间
150
				httpPost.setConfig(requestConfig);
151
			}
152
153
			CloseableHttpResponse response = httpClient.execute(httpPost);
154
155
			if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
156
				HttpEntity entity = response.getEntity();
157
				if (entity != null) {
158
					// 按指定编码转换结果实体为String类型
159
					body = EntityUtils.toString(entity, encoding);
160
				}
161
				EntityUtils.consume(entity);
162
			}
163
		} catch (ClientProtocolException e) {
164
			log.error("ClientProtocolException Exception: " + e);
165
		} catch (UnsupportedEncodingException e) {
166
			log.error("UnsupportedEncodingException Exception: " + e);
167
		} catch (IOException e) {
168
			log.error("IOException Exception: " + e);
169
			// throw new BaseException("10", "调用Eboss超时");
170
		} finally {
171
			// 关闭连接,释放资源
172
			try {
173
				httpClient.close();
174
			} catch (IOException e) {
175
				log.error("httpClient Exception: " + e);
176
			}
177
		}
178
179
		return body;
180
	}
181
182
	public static String sendGet(String url, Charset encoding, Map<String, String> headerMap) {
183
		HttpClient httpClient = HttpClients.createDefault();
184
		HttpGet httpGet = new HttpGet(url);
185
		httpGet.addHeader(HTTP.CONTENT_TYPE, HTTP_CONTENT_TYPE_JSON);
186
		CloseableHttpResponse response = null;
187
		try {
188
			log.debug("执行GET请求:url= " + url);
189
			response = (CloseableHttpResponse) httpClient.execute(httpGet);
190
		} catch (Exception e) {
191
			log.error("sendGet Exception: " + e.getMessage());
192
			return "{}";
193
		}
194
		return responseEx(httpClient, response, encoding);
195
	}
196
197
	public static String sendPost(String url, Map<String, Object> paramsMap, Charset encoding) {
198
		HttpClient httpClient = HttpClients.createDefault();
199
		HttpPost httpPost = new HttpPost(url);
200
		httpPost.addHeader(HTTP.CONTENT_TYPE, HTTP_CONTENT_TYPE_JSON);
201
		if (!CollectionUtils.isEmpty(paramsMap)) {
202
			StringEntity se = new StringEntity(JSONObject.toJSONString(paramsMap), encoding);
203
			httpPost.setEntity(se);
204
		}
205
		CloseableHttpResponse response = null;
206
		try {
207
			log.debug("执行POST无参请求:url= " + url);
208
			response = (CloseableHttpResponse) httpClient.execute(httpPost);
209
		} catch (Exception e) {
210
			log.error("sendPost Exception: " + e.getMessage());
211
			return "{}";
212
		}
213
		return responseEx(httpClient, response, encoding);
214
	}
215
216
	public static String sendPost(String url, Map<String, Object> paramsMap, Charset encoding,
217
			Map<String, String> headerMap) {
218
		HttpClient httpClient = HttpClients.createDefault();
219
		HttpPost httpPost = new HttpPost(url);
220
221
		Iterator<String> iter = headerMap.keySet().iterator();
222
		String key = "";
223
		String value = "";
224
		while (iter.hasNext()) {
225
			key = iter.next();
226
			value = headerMap.get(key);
227
			httpPost.setHeader(key, value);
228
		}
229
230
		httpPost.addHeader(HTTP.CONTENT_TYPE, HTTP_CONTENT_TYPE_JSON);
231
		if (!CollectionUtils.isEmpty(paramsMap)) {
232
			log.debug("执行POST请求:url= " + url + ",参数= " + JSONObject.toJSONString(paramsMap));
233
			StringEntity se = new StringEntity(JSONObject.toJSONString(paramsMap), encoding);
234
			httpPost.setEntity(se);
235
		}
236
		CloseableHttpResponse response = null;
237
		try {
238
			response = (CloseableHttpResponse) httpClient.execute(httpPost);
239
		} catch (Exception e) {
240
			log.error("sendPost Exception: " + e.getMessage());
241
			return "{}";
242
		}
243
		return responseEx(httpClient, response, encoding);
244
	}
245
246
	public static String sendPut(String url, Map<String, Object> paramsMap, Charset encoding) {
247
		HttpClient httpClient = HttpClients.createDefault();
248
		String resp = "";
249
		HttpPut httpPut = new HttpPut(url);
250
		httpPut.addHeader(HTTP.CONTENT_TYPE, HTTP_CONTENT_TYPE_JSON);
251
		if (!CollectionUtils.isEmpty(paramsMap)) {
252
			StringEntity se = new StringEntity(JSONObject.toJSONString(paramsMap), encoding);
253
			httpPut.setEntity(se);
254
		}
255
		CloseableHttpResponse response = null;
256
		try {
257
			log.debug("执行PUT请求:url= " + url + ",参数= " + JSONObject.toJSONString(paramsMap));
258
			response = (CloseableHttpResponse) httpClient.execute(httpPut);
259
		} catch (Exception e) {
260
			log.error("sendPut Exception: " + e.getMessage());
261
			return "{}";
262
		}
263
264
		return responseEx(httpClient, response, encoding);
265
	}
266
267
	private static String responseEx(HttpClient httpClient, CloseableHttpResponse response, Charset encoding) {
268
		String resp = "";
269
		try {
270
			if (response == null) {
271
				resp = "{}";
272
				log.error("请求执行失败,无返回信息");
273
			} else if (200 != response.getStatusLine().getStatusCode()) {
274
				resp = "{}";
275
				log.error("请求执行失败,状态码=" + response.getStatusLine().getStatusCode() + ",返回信息="
276
						+ EntityUtils.toString(response.getEntity(), encoding));
277
			} else {
278
				log.debug("请求执行成功");
279
				resp = EntityUtils.toString(response.getEntity(), encoding);
280
			}
281
		} catch (Exception e) {
282
			log.error("responseEx Exception: " + e.getMessage());
283
		} finally {
284
			if (response != null) {
285
				try {
286
					response.close();
287
				} catch (Exception e) {
288
					log.error("responseEx Exception: " + e.getMessage());
289
				}
290
			}
291
		}
292
		return resp;
293
	}
294
295
}

+ 33 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/utils/IDUtils.java

@ -0,0 +1,33 @@
1
package com.ai.bss.security.protection.utils;
2
3
/**
4
 * @Auther: 王超
5
 * @Date: 2020/12/30 13:57
6
 * @Description:
7
 */
8
public class IDUtils {
9
10
    private static byte[] lock = new byte[0];
11
12
    // 位数,默认是8位
13
    private final static long w = 100000000;
14
15
16
    /**
17
     * 创建不重复id
18
     * @param
19
     *          timeSub 时间戳一共13位,截取前端的不需要的位数
20
     *          randSub 生成随机数一共9位,截取前端的不需要的位数
21
     *
22
     */
23
    public static String createID(int timeSub,int randSub) {
24
        long r = 0;
25
        synchronized (lock) {
26
            r = (long) ((Math.random() + 1) * w);
27
        }
28
        long timeMillis = System.currentTimeMillis();
29
        String time = String.valueOf(timeMillis);
30
        return time.substring(timeSub) + String.valueOf(r).substring(randSub);
31
    }
32
33
}

+ 12 - 0
security-protection-service/src/main/resources/application-iot.properties

@ -0,0 +1,12 @@
1
#\u5317\u5411\u767b\u5f55\u8d26\u53f7\u548c\u5bc6\u7801
2
aap.iot.userCode=IOT_ADMIN
3
aap.iot.passWord=123456
4
5
#iot\u7684\u5317\u5411\u63a5\u53e3\u6ce8\u518c\u5730\u5740
6
#url.iot.login=http://60.205.219.67:80/sso/login
7
url.iot.login=http://47.105.130.83:80/sso/login
8
9
#iot\u7684\u5317\u5411\u63a5\u53e3\u7edf\u4e00\u5730\u5740
10
#url.iot.service=http://60.205.219.67:80/dmp/terminalNorthApi/
11
url.iot.service=http://47.105.130.83:80/dmp/terminalNorthApi/
12

+ 21 - 0
security-protection-service/src/main/resources/application-minio.properties

@ -0,0 +1,21 @@
1
#minio
2
minio.endpoint=http://10.19.90.34
3
minio.port=19000
4
minio.accessKey=minioadmin
5
minio.secretKey=minioadmin
6
minio.secure=false
7
minio.faceAddServiceUrl=http://10.21.10.28:9018/api/face/add
8
minio.face-del-service-url=http://10.21.10.28:9018/api/face/del
9
minio.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
10
11
# \u4eba\u8138\u8bc6\u522b
12
minio.bucketHeaderImage=prod-dev
13
14
# \u8bbe\u5907\u9ed8\u8ba4\u7167\u7247
15
spminio.bucketToolImage=tool-image
16
# \u76d1\u63a7\u89c6\u9891
17
spminio.bucketAiVideo=ai-video
18
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
19
spminio.bucketAiImage=ai-image
20
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
21
spminio.bucketM3U8=m3u8-index

+ 9 - 20
security-protection-service/src/main/resources/application.properties

@ -46,26 +46,6 @@ kafka.listener.batch-listener=false
46 46
kafka.listener.concurrencys=3,6
47 47
kafka.listener.poll-timeout=1500
48 48
49
#minio
50
minio.endpoint=http://10.19.90.34
51
minio.port=19000
52
minio.accessKey=minioadmin
53
minio.secretKey=minioadmin
54
minio.secure=false
55
minio.faceAddServiceUrl=http://10.21.10.28:9018/api/face/add
56
minio.face-del-service-url=http://10.21.10.28:9018/api/face/del
57
minio.face-recog-service-url=http://10.21.10.28:9018/api/face/recog
58
59
# \u4eba\u8138\u8bc6\u522b
60
minio.bucketHeaderImage=prod-dev
61
62
# \u8bbe\u5907\u9ed8\u8ba4\u7167\u7247
63
spminio.bucketToolImage=tool-image
64
# \u76d1\u63a7\u89c6\u9891
65
spminio.bucketAiVideo=ai-video
66
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
67
spminio.bucketAiImage=ai-image
68
69 49
70 50
# CACHE
71 51
#spring.cache.type=ehcache
@ -87,3 +67,12 @@ spring.servlet.multipart.resolve-lazily=false
87 67
# LOGGING
88 68
logging.level.com.ai=debug
89 69
logging.level.org.springframework.data=debug
70
71
uspa.login.url=http://10.19.90.34:20000/usermng/login
72
uspa.login.vercode=Hiz#8uAqkjhoPmXu8%aaa
73
74
uspa.login.menuUrl=http://10.19.90.34:20000/usermng/process/com.wframe.usermanager.services.impl.QueryMenuByUser
75
76
77
# \u5f15\u5165minio\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
78
spring.profiles.active=iot,minio

+ 81 - 0
security-protection-service/src/main/resources/sso.properties

@ -0,0 +1,81 @@
1
#\u7cfb\u7edf\u57df
2
SYSTEM_DOMAIN=LOGIN_CACHE_ROUTE
3
4
#------------------------------cookie\u914d\u7f6e-------------#
5
##COOKIE\u7684\u6709\u6548\u57df,\u4e0d\u8bbe\u7f6e\uff0c\u5219\u81ea\u52a8\u8bbe\u7f6e
6
#COOKIE_DOMAIN=crm.chinapost.yw.com
7
8
COOKIE_PATH=/
9
10
##Session \u8d85\u65f6\u65f6\u95f4(\u79d2)
11
SESSION_TIMEOUT=3600
12
COOKIE_MAXAGE=-1
13
14
15
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
16
17
18
##\u8fdc\u7a0b\u7f13\u5b58\u8c03\u7528\u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u5fc5\u987b\u6709\u4e09\u4e2a\u51fd\u6570 
19
##    public boolean set(String key,String value)
20
##    public String get(String key)
21
##    public boolean del(String key);
22
COOKIE_CACHE_CLASS=com.ai.sso.util.SessionRedisCache
23
24
LOGGING_INTERFACE_CLASS=com.wframe.baseinfo.util.BaseInfoUtil
25
26
##COOKIE_IS_CACHE \u662f\u5426\u7f13\u5b58\u5230\u8fdc\u7aef\u3002
27
COOKIE_IS_CACHE=1
28
29
30
##IS_CHECK_LOGIN \u662f\u5426\u68c0\u67e5\u767b\u9646\u3002
31
IS_CHECK_LOGIN=1
32
33
34
LOGIN_SERVICE=uspa_IOrgmodelClientCSV_loginIn
35
LOGINNOPASS_SERVICE=uspa_IOrgmodelClientCSV_loginWithNoPassword
36
37
38
Access-Control-Allow-origin=http://crm.chinapost.yw.com:18080/
39
40
##\u68c0\u67e5SesisonId,sign \u662f\u5426\u6b63\u786e
41
SESSION_CHECK_SIGN=com.ai.sso.util.SessionCheckSign
42
SESSION_CHECK_LOGIN=com.ai.sso.util.SessionCheckLogin
43
#redis
44
45
##MAIN_PAGE
46
#MAIN_PAGE=http://crm.chinapost.com:18880/
47
##RETURN TAG \u8fd4\u56de\u5b57\u7b26\u4e32
48
49
RETURN_TAG={"MESSAGE":"NOLOGIN","CODE":999999,"FLAG":"FAIL","RESULT":{"URL":"http://crm.chinapost.yw.com:18080/"}}
50
#RETURN_TAG=<html><script language="javascript"> function init(){ if(window.parent!=null) { window.parent.location.href ="http://crm.chinapost.com:18880"; } else window.location.href ="http://crm.chinapost.com:18880"; } </script><body onload="init()"></body></html>
51
52
53
54
#redis.single=10.11.20.117:6379
55
#redis.password=luMZulgbotmo71aa
56
redis.single=10.19.90.34:6379
57
redis.password=Ipu@321!
58
59
redis.pool.maxTotal=1000
60
redis.pool.minIdle=5
61
redis.pool.maxIdle=100
62
redis.pool.testOnBorrow=false
63
redis.pool.maxWait=5000
64
redis.pool.testOnReturn=true
65
redis.pool.testWhileIdle=true
66
redis.pool.timeBetweenEvictionRunsMillis=10000
67
68
69
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
70
71
#\u662f\u5426\u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 1 \u8fdb\u884c\u63a5\u53e3\u6743\u9650\u63a7\u5236 
72
is_check_interface=0
73
74
75
#BJYM\u4f7f\u7528
76
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginAuth4TestImpl
77
##\u5c0f\u7a0b\u5e8f\u4f7f\u7528
78
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
79
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
80
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
81
SIGN_KEY_CODE=TENANT_CODE

[FE] 报表样式统一修改模板 · 5fc8c9a2a2 - Nuosi Git Service
Przeglądaj źródła

[FE] 报表样式统一修改模板

chenxr3 4 lat temu
rodzic
commit
5fc8c9a2a2

+ 15 - 6
ebc-middle-platform/src/modules/attendance/track.scss

@ -5,7 +5,6 @@
5 5
  box-sizing: border-box;
6 6
  .search-container{
7 7
    width: 100%;
8
    padding: 0 0 20px;
9 8
    .search-ctn{
10 9
      width: 100%;
11 10
      overflow: hidden;
@ -14,8 +13,7 @@
14 13
      display: flex;
15 14
      position: relative;
16 15
      >div{
17
        display: flex; 
18
        margin: 0 20px 16px 0;    
16
        //margin: 0 20px 16px 0;
19 17
        line-height: 2;
20 18
        .input-rule{
21 19
          flex: 1;
@ -25,12 +23,23 @@
25 23
          }
26 24
        }
27 25
      }
28
      .btns button{
29
        margin: 0 2px;
26
      .btns{
27
        margin-left: auto;
28
        display: block;
29
        button{
30
          margin: 0 2px;
31
        }
30 32
      }
31 33
    }
32 34
  }
33 35
  .table-pager{
34 36
    margin: 20px auto;
35 37
  }
36
}
38
  .allCondition{
39
    border: 1px solid rgba(0, 0, 0, 0.09);
40
    background-color: #f8f9fa;
41
    flex-wrap: wrap;
42
    padding: 20px 20px 20px 20px;
43
    margin: 5px auto;
44
  }
45
}

+ 113 - 24
ebc-middle-platform/src/modules/attendance/track.vue

@ -1,39 +1,67 @@
1 1
<template>
2
  <div class="track-container">
2
  <div class="track-container" @click="customVisibled = false">
3 3
    <div class="search-container">
4 4
      <div class="search-ctn">
5 5
        <div>
6
          <div class="input-rule">
7
            <t-date-picker v-model="queryCondition.rangeDate"
8
                           align-right
9
                           style="width:320px;"
10
                           type="dateTimeRange"
11
                           placeholder="选择时间段"
12
                           @date-change="onChange"></t-date-picker>
6
          <div style="display: flex;">
7
            <t-input v-model="queryCondition.alarmPerson" placeholder="员工姓名/员工工号">
8
              <template slot="append">
9
                <t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
10
              </template>
11
            </t-input>
12
            <t-button icon="filter-outline" style="margin: 0 10px;" @click="slideVisible = !slideVisible"></t-button>
13 13
          </div>
14 14
        </div>
15
        <div>
16
          <div class="label">姓名:</div>
17
          <div class="input-rule">
18
            <t-input v-model="queryCondition.alarmPerson" placeholder="请输入..."></t-input>
19
          </div>
20
        </div>
21
        <div class="btns">
22
          <t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
23
          <t-button color="secondary" icon="loading" class="reset-btn" @click="onReset">重置</t-button>
15
        <div class="btns" >
24 16
          <t-button color="secondary" icon="upload-outline" @click="toExport">导出至Excel</t-button>
17
          <t-dropdown :visibled="customVisibled" trigger-mode="custom">
18
            <t-button slot="trigger" color="secondary" icon="tile-four-outline" @click="onTriggerClick"></t-button><!--aid-table-edit-->
19
            <div slot="popper">
20
              <div style="border-radius: 5px;padding: 20px 20px 20px 20px;background-color: white;">
21
                <t-checkbox-group v-model="social" vertical @change="checkAllGroupChange">
22
                  <t-checkbox v-for="(item) in columns" :key="item.label" :value="item.label" :label="item.label">
23
                    <span>{{ item.label }}</span>
24
                  </t-checkbox>
25
                </t-checkbox-group>
26
                <div style="padding-bottom: 10px">
27
                  <t-checkbox
28
                    :indeterminate="indeterminate"
29
                    :checked.sync="checkAll"
30
                    @click.prevent.native="handleCheckAll">全选
31
                  </t-checkbox>
32
                </div>
33
                <t-button color="success" size="sm" @click="onCloseClick">确认</t-button>
34
              </div>
35
            </div>
36
          </t-dropdown>
37
          <t-button color="secondary" icon="loading" class="reset-btn" @click="onReset"></t-button>
25 38
        </div>
26 39
      </div>
40
      <div class="animate-demo-wrapper">
41
        <transition name="slide-up">
42
          <div v-show="slideVisible" class="transition-box allCondition">
43
            <div class="input-rule" style="display: flex;">
44
              <div class="label" style="display: flex;align-items: center;">时间:</div>
45
              <t-date-picker v-model="queryCondition.rangeDate"
46
                             align-right
47
                             style="width:320px;"
48
                             type="dateTimeRange"
49
                             placeholder="选择时间段"
50
                             @date-change="onChange"></t-date-picker>
51
            </div>
52
          </div>
53
        </transition>
54
      </div>
27 55
    </div>
28
    <div>
56
    <div style="padding-top: 5px">
29 57
      <t-table :data="table.data" :loading="tableLoading" >
30 58
        <t-table-column type="selection" width="70"></t-table-column>
31
        <t-table-column prop="entityName" label="姓名"></t-table-column>
32
        <t-table-column prop="entityPosition" label="职务"></t-table-column>
33
        <t-table-column prop="mapAreaName" label="位置区域"></t-table-column>
34
        <t-table-column prop="durationTime" label="停留时长"></t-table-column>
35
        <t-table-column prop="inTime" :formatter="timestampToTime" label="进入时间"></t-table-column>
36
        <t-table-column prop="outTime" :formatter="timestampToTime" label="离开时间"></t-table-column>
59
        <t-table-column v-if="columns[0].show" prop="entityName" label="姓名"></t-table-column>
60
        <t-table-column v-if="columns[1].show" prop="entityPosition" label="职务"></t-table-column>
61
        <t-table-column v-if="columns[2].show" prop="mapAreaName" label="位置区域"></t-table-column>
62
        <t-table-column v-if="columns[3].show" prop="durationTime" label="停留时长"></t-table-column>
63
        <t-table-column v-if="columns[4].show" :formatter="timestampToTime" prop="inTime" label="进入时间"></t-table-column>
64
        <t-table-column v-if="columns[5].show" :formatter="timestampToTime" prop="outTime" label="离开时间"></t-table-column>
37 65
      </t-table>
38 66
      <t-pager :total="table.pager.total" :current.sync="table.pager.currentPage"
39 67
               :page-size.sync="table.pager.size"
@ -52,6 +80,32 @@ import services from '../../conf/services'
52 80
export default {
53 81
  data() {
54 82
    return {
83
      slideVisible: false,
84
      indeterminate: true,
85
      checkAll: true,
86
      social: ['姓名', '职务', '位置区域', '停留时长', '进入时间', '离开时间'],
87
      columns: [
88
        {
89
          label: '姓名',
90
          show: true
91
        }, {
92
          label: '职务',
93
          show: true
94
        }, {
95
          label: '位置区域',
96
          show: true
97
        }, {
98
          label: '停留时长',
99
          show: true
100
        }, {
101
          label: '进入时间',
102
          show: true
103
        }, {
104
          label: '离开时间',
105
          show: true
106
        }
107
      ],
108
      customVisibled: false,
55 109
      table: {
56 110
        data: [],
57 111
        pager: {
@ -72,6 +126,41 @@ export default {
72 126
    this.getList()
73 127
  },
74 128
  methods: {
129
    checkAllGroupChange () {
130
      if (this.social.length === 6) {
131
        this.indeterminate = false
132
        this.checkAll = true
133
      } else if (this.social.length > 0) {
134
        this.indeterminate = true
135
        this.checkAll = false
136
      } else {
137
        this.indeterminate = false
138
        this.checkAll = false
139
      }
140
    },
141
    handleCheckAll () {
142
      debugger
143
      if (this.indeterminate) {
144
        this.checkAll = false
145
      } else {
146
        this.checkAll = !this.checkAll
147
      }
148
      this.indeterminate = false
149
      if (this.checkAll) {
150
        this.social = ['姓名', '职务', '位置区域', '停留时长', '进入时间', '离开时间']
151
      } else {
152
        this.social = []
153
      }
154
    },
155
    onTriggerClick() {
156
      this.customVisibled = true
157
    },
158
    onCloseClick() {
159
      this.columns.forEach(e => {
160
        e.show = this.social.indexOf(e.label) >= 0
161
      })
162
      this.customVisibled = false
163
    },
75 164
    getList() {
76 165
      this.tableLoading = true
77 166
      var start = ''

openUrl插件增加参数控制悬浮按钮是否显示 · dc1987ebf3 - Nuosi Git Service
Преглед на файлове

openUrl插件增加参数控制悬浮按钮是否显示

zhanglong7 преди 3 години
родител
ревизия
dc1987ebf3
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileUI.java

+ 4 - 2
ipu-plugin-basic/src/main/java/com/ai/ipu/mobile/plugin/MobileUI.java

@ -94,10 +94,11 @@ public class MobileUI extends Plugin {
94 94
        JSONArray arrayStyles = param.optJSONArray(3);
95 95
        boolean isHideTopBar = param.optBoolean(4, false);
96 96
        JSONArray isHideIcons = param.optJSONArray(5);
97
        openUrl(url, !isHideTopBar, title, buttons, arrayStyles,isHideIcons);
97
		boolean isShowFloatButton = param.optBoolean(6, isHideTopBar);
98
		openUrl(url, !isHideTopBar, isShowFloatButton, title, buttons, arrayStyles,isHideIcons);
98 99
	}
99 100
	
100
	private void openUrl(String url, boolean isShowTopBar, String title, JSONArray buttons, JSONArray arrayStyles,JSONArray isHideIcons) throws Exception {
101
	private void openUrl(String url, boolean isShowTopBar, boolean isShowFloatButton, String title, JSONArray buttons, JSONArray arrayStyles,JSONArray isHideIcons) throws Exception {
101 102
        String[] styleNames = {"topbarbg", "iconcolor", "textcolor"};
102 103
        url = URLDecoder.decode(url);
103 104
	    Intent intent = new Intent();
@ -105,6 +106,7 @@ public class MobileUI extends Plugin {
105 106
        if(!isShowTopBar){
106 107
        	intent.putExtra("isShowTopBar", isShowTopBar);
107 108
        }
109
		intent.putExtra("isShowFloatButton", isShowFloatButton);
108 110
        if (!isNull(title)) {
109 111
            intent.putExtra("title", title);
110 112
        }