"> 562
                            if("旷工".equals(dailyAttendance.get("goToWorkStatus"))){
563
                                //不动
564
                            }else if("倒休".equals(dailyAttendance.get("goToWorkStatus"))||"事假".equals(dailyAttendance.get("goToWorkStatus"))||"年假".equals(dailyAttendance.get("goToWorkStatus"))||"放假".equals(dailyAttendance.get("goToWorkStatus"))||"病假".equals(dailyAttendance.get("goToWorkStatus"))){
565
                                //将下午外勤移除
566
                                Iterator<Object> iterator = attendanceStatusList.iterator();
567
                                while (iterator.hasNext()){
568
                                    String next =(String) iterator.next();
569
                                    if("下午外勤".equals(next)){
570
                                        iterator.remove();
571
                                    }
572
                                }
573
                            }else{
574
                                //将attendanceStatusArray[1]移除
575
                                attendanceStatusArray[1]=null;
576
                            }
577
                        }
459 578
                        attendanceStatusList.add(attendanceStatusArray[0]);
460 579
                        attendanceStatusList.add(attendanceStatusArray[1]);
461 580
                    }
462
                    // dailyAttendance.put("descr",attendanceStatusList);
581
                }
582
                //遍历集合,将为null的值去掉
583
                Iterator<Object> iterator = attendanceStatusList.iterator();
584
                while (iterator.hasNext()){
585
                    String next =(String) iterator.next();
586
                    if(null==next){
587
                        iterator.remove();
588
                    }
463 589
                }
464 590
                dailyAttendance.put("descr",attendanceStatusList);
465 591
466 592
467
               /* String[] attendanceStatusArray = new String[2];
468
469
                if("正常".equals(dailyAttendance.get("goToWorkStatus"))&&"正常".equals(dailyAttendance.get("goOffWorkStatus"))){
470
                    //上下班都正常
471
                    dailyAttendance.put("isAbnormal",false);
472
                    attendanceStatusArray[0]="正常";
473
                    dailyAttendance.put("descr",attendanceStatusArray);
474
                }else if(!"正常".equals(dailyAttendance.get("goToWorkStatus"))&&!"正常".equals(dailyAttendance.get("goOffWorkStatus"))){
475
                    attendanceStatusArray[0]= (String) dailyAttendance.get("goToWorkStatus");
476
                    attendanceStatusArray[1]= (String) dailyAttendance.get("goOffWorkStatus");
477
                    //上下班都不正常
478
                    if("迟到".equals(dailyAttendance.get("goToWorkStatus"))){
479
                        attendanceStatusArray[0]="迟到"+dailyAttendance.get("goToWorkTime") +"分";
480
                    }
481
                    if("早退".equals(dailyAttendance.get("goOffWorkStatus"))){
482
                        attendanceStatusArray[1]="早退"+dailyAttendance.get("goOffWorkTime") +"分";
483
                    }
484
                    if("旷工".equals(dailyAttendance.get("goToWorkStatus"))){
485
                        //attendanceStatusArray[1]=null;
486
                        attendanceStatusArray[1]="旷工"+dailyAttendance.get("goOffWorkTime") +"天";
487
                        attendanceStatusArray[0]="旷工"+dailyAttendance.get("goToWorkTime") +"天";
488
                    }
489
                    if("倒休".equals(dailyAttendance.get("goToWorkStatus"))||"事假".equals(dailyAttendance.get("goToWorkStatus"))||"年假".equals(dailyAttendance.get("goToWorkStatus"))||"放假".equals(dailyAttendance.get("goToWorkStatus"))||"病假".equals(dailyAttendance.get("goToWorkStatus"))){
490
                        //attendanceStatusArray[1]=null;
491
                        attendanceStatusArray[1]=(String) dailyAttendance.get("goOffWorkStatus");
492
                        attendanceStatusArray[0]=(String) dailyAttendance.get("goToWorkStatus");
493
                    }
494
495
                    dailyAttendance.put("descr",attendanceStatusArray);
496
                }else{
497
                    //上下班一个正常一个不正常
498
                    if("正常".equals(dailyAttendance.get("goToWorkStatus"))){
499
                        attendanceStatusArray[0]= (String) dailyAttendance.get("goOffWorkStatus");
500
                    }else{
501
                        attendanceStatusArray[0]= (String) dailyAttendance.get("goToWorkStatus");
502
                    }
503
                    dailyAttendance.put("descr",attendanceStatusArray);
504
                }*/
505 593
            });
506 594
        } catch (ParseException e) {
507 595
            e.printStackTrace();
508 596
        }
509
       /* List<Map<String, Object>> dataList = attendanceReport.getData().getData();
510
        dataList.forEach((data)->{
511
            String[] attendanceStatus = (String[]) data.get("attendanceStatus");
512
            if(null!=attendanceStatus&&attendanceStatus.length>0){
513
                String[] attendanceStatusArray = new String[1];
514
                if(null==attendanceStatus[1]){
515
                    attendanceStatusArray[0]=attendanceStatus[0];
516
                    data.put("attendanceStatus",attendanceStatusArray);
517
                }
518
            }
519
        });*/
520 597
        return attendanceReport;
521 598
    }
522 599
}

+ 55 - 0
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,20 @@ 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
46
	@Autowired
47
	private SecurityProtectionMinioConfig minioConfig;
33 48
34 49
	@Override
35 50
	public CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
@ -50,6 +65,46 @@ public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageSe
50 65
		return CommonResponse.ok(list);
51 66
	}
52 67
68
69
70
	@Override
71
	public CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition) throws Exception {
72
		CommonRequest<MonitorVideoLog> request = new CommonRequest<MonitorVideoLog>(monitorVideoLogCondition);
73
		CommonResponse<List<MonitorVideoLog>> response = monitorSceneQuery.queryMonitorVideoLogByTime(request);
74
75
		List<EbcMonitorVideoLog> list = new ArrayList<EbcMonitorVideoLog>();
76
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
77
			return CommonResponse.ok(null);
78
		}
79
80
81
		StringBuffer m3u8Str = new StringBuffer();
82
		m3u8Str.append("#EXTM3U").append("\n");
83
		m3u8Str.append("#EXT-X-VERSION:3").append("\n");
84
		m3u8Str.append("#EXT-X-TARGETDURATION:65").append("\n");
85
		m3u8Str.append("#EXT-X-MEDIA-SEQUENCE:0").append("\n");
86
		String bucketName = minioConfig.getBucketM3U8();//"m3u8-index";
87
		String fileType = ".m3u8";
88
		String m3u8FileName = bucketName + SPLIT_CHAR + UUID.fastUUID().toString().replace("-", "") + fileType;
89
90
		String videoUrl = "";
91
		for (MonitorVideoLog monitorVideoLog : response.getData()) {
92
			EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(monitorVideoLog);
93
			list.add(ebcMonitorVideoLog);
94
			videoUrl = uploadFileService.getFileUrl(monitorVideoLog.getVideoUrl());// minioService.getObjectUrl(videoFileIdArr[0],ebcMonitorVideoLog.getVideoFileUrl());
95
96
			m3u8Str.append("#EXTINF:65,").append("\n");
97
			m3u8Str.append(videoUrl).append("\n");
98
		}
99
		m3u8Str.append("#EXT-X-ENDLIST").append("\n");
100
		InputStream is = new ByteArrayInputStream(m3u8Str.toString().getBytes());
101
		minioService.putObject(bucketName,m3u8FileName,is,fileType);
102
103
		String m3u8IndexFileUrl = uploadFileService.getFileUrl(m3u8FileName);
104
105
		return CommonResponse.ok(m3u8IndexFileUrl);
106
	}
107
53 108
	@Override
54 109
	public CommonResponse<EbcMonitorVideoLog> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
55 110
		CommonRequest<Long> request = new CommonRequest<Long>(monitorVideoLogId);

+ 8 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/WorkOrderManagementServiceImpl.java

@ -7,6 +7,7 @@ import java.util.HashMap;
7 7
import java.util.List;
8 8
import java.util.Map;
9 9
10
import com.ai.abc.exception.BaseException;
10 11
import com.ai.bss.components.common.util.JsonUtils;
11 12
import com.ai.bss.user.dto.UserDto;
12 13
import com.ai.bss.work.attendance.dto.LeaveApprovalDto;
@ -266,7 +267,13 @@ public class WorkOrderManagementServiceImpl implements WorkOrderManagementServic
266 267
		userDto.setId(employId);
267 268
		CommonRequest<UserDto> request = CommonRequest.<UserDto>builder().data(userDto).pageNumber(1).pageSize(1).build();
268 269
		CommonResponse<PageBean<UserDto>>  result = userDtoQuery.queryWorkEmployee(request);
269
		String  employOrgId = result.getData().getData().get(0).getOrgId();
270
		String employOrgId = "";
271
		try {
272
			employOrgId = result.getData().getData().get(0).getOrgId();
273
		}catch (Exception e){
274
			log.error("员工不存在");
275
			new BaseException("员工不存在");
276
		}
270 277
		log.info("输出参数:{}",JSON.toJSONString(result , SerializerFeature.PrettyFormat));
271 278
272 279

+ 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

+ 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
}

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

@ -65,6 +65,8 @@ spminio.bucketToolImage=tool-image
65 65
spminio.bucketAiVideo=ai-video
66 66
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
67 67
spminio.bucketAiImage=ai-image
68
# \u76d1\u63a7\u89c6\u9891\u622a\u56fe
69
spminio.bucketM3U8=m3u8-index
68 70
69 71
70 72
# CACHE

进出记录返回参数查询修改 · cc86f342c0 - Nuosi Git Service
Bladeren bron

进出记录返回参数查询修改

wangchao 4 jaren geleden
bovenliggende
commit
cc86f342c0

+ 10 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/InAndOutRecordServiceImpl.java

@ -8,6 +8,7 @@ import com.ai.bss.user.dto.EmployeeDto;
8 8
import com.ai.bss.user.service.api.EmployeeService;
9 9
import com.ai.bss.work.safety.service.api.AiTaskQuery;
10 10
import com.ai.bss.work.tool.service.api.ResourceToolQuery;
11
import com.alibaba.fastjson.JSON;
11 12
import org.apache.bcel.verifier.statics.LONG_Upper;
12 13
import org.springframework.beans.factory.annotation.Autowired;
13 14
import org.springframework.stereotype.Service;
@ -43,6 +44,15 @@ public class InAndOutRecordServiceImpl implements InAndOutRecordService {
43 44
44 45
        if(null!=inAndOutRecordList&&inAndOutRecordList.size()>0){
45 46
            inAndOutRecordList.forEach((inAndOutRecord)->{
47
                if(null!=inAndOutRecord.get("idenResult")){
48
                    String idenResult = (String) inAndOutRecord.get("idenResult");
49
                    if(idenResult.contains(":")){
50
                        Object parse = JSON.parse(idenResult);
51
                        inAndOutRecord.put("idenResult",parse);
52
                    }
53
                }
54
55
46 56
                if(null!=inAndOutRecord.get("relateEmployeeRoleId")){
47 57
                    long relateEmployeeRoleId = Long.parseLong((String) inAndOutRecord.get("relateEmployeeRoleId"));
48 58

rest-guide - Nuosi Git Service

rest的向导工程

weihf 146573a3eb @IPU_FIXBUG_2022@删除HikariCP-java6这个支持jdk1.6的组件,只保留支持jdk1.8的HikariCP版本。 2 jaren geleden
..
backup 12cbd6d1d6 ipu-rest-scaffold优化:优化pom文件,考虑使用<dockerfile>标签。 3 jaren geleden
docker 427e4a4cba @IPU_REQ_2021@将Dockerfile移到docker子目录中,并在pom.xml里将编译环境也修改为docker/target中;否则,docker打包会报找不到文件。 4 jaren geleden
sql 146abf2e95 数据库持久层操作范例 6 jaren geleden
src 3959323a4c @IPU_REQ_2022@添加HikariCP连接池配置,并将db连接名修改为HikariCP连接名 2 jaren geleden
.classpath 3c08dfb933 rest向导工程初始化 7 jaren geleden
.gitignore 9782de437c ipu-rest-demo增加到idea中 5 jaren geleden
.project 3c08dfb933 rest向导工程初始化 7 jaren geleden
ipu.lic 1f85105a33 提交ipu license证书 7 jaren geleden
pom.xml 146573a3eb @IPU_FIXBUG_2022@删除HikariCP-java6这个支持jdk1.6的组件,只保留支持jdk1.8的HikariCP版本。 2 jaren geleden
readme.md 1abab705e3 @IPU_REQ_2021@添加springcloud consumer示例 4 jaren geleden

readme.md

一、启动服务脚本范例:java -Dipu.lic.path=D:/git/rest-guide/ipu-rest-demo/ipu.lic -jar target/ipu-rest-demo.jar --server.port=8080 注意事项:需要增加证书。参数格式[-Dipu.lic.path] 由于增加了dubbo的consumer代码,需要事先启动dubbo的provider服务后再启动ipu-rest-demo。

二、区分context-path、servlet-path、static-path,正确配置拦截器的exclude-mapping

三、待办事项

  1. Session管理, 支持redis
  2. 数据库连接统一管理
  3. 局部异常和全部异常的处理
  4. ThreadLocal统一管理
  5. 服务节点统计数据
  6. 微服务,服务注册和发现。
  7. Dubbo

四、介绍control DataController-多种数据结构的返回 SessionController--Session相关操作,支持redis和jvm。application.properties中spring.session.store-type相关配置。 DbController--基于SQL增删改查Demo,注意Dao的实例化方式。 DbTableController--基于表名增删改查Demo。

五、数据流结构 control=>service=>dao control:请求的分发。 service:业务逻辑。 dao:数据库逻辑。 service+dao后续可以移植到dubbo服务中。

六、问题排查记录 6.1 异常:request part 'file' is not present 原因:指定了上传文件的处理器CommonsMultipartResolver。 解决方法:注释掉,不指定文件处理器即可。 6.2 请求模拟器报错:[服务请求错误],有数据返回,但格式不正常。 解决方法:Controller方法中@ResponseBody

android-share - Nuosi Git Service

ipu的trunk版的android工程和服务端工程。

wangkang3 bd8dd01639 SONAR扫描问题 4 年 前
..
WEB-INF 923b5e8126 general-web-server工程中,添加对window.onMobileBackPressed()的测试 9 年 前
biz 30535017fe jar包更新、终端判断、general-web-server服务端更新。 9 年 前
res bd8dd01639 SONAR扫描问题 4 年 前
myindex.html db800c33c1 userAgent 9 年 前
myindex.html.bak 3c5dd0da49 远程app模式——ios支持 9 年 前
myindex2.html 2100e310d0 注释alter和confirm 8 年 前
myindex2.html.bak cce1ba0191 将跨域iframe功能嵌入display;(general-web-server) 8 年 前
myindex3.html 264eb540ca 更新iframe跨域 8 年 前
myindex3.html.bak cce1ba0191 将跨域iframe功能嵌入display;(general-web-server) 8 年 前
withiframe.html d066a061ed android返回键引起的ie兼容性bug修复 9 年 前
ipu/android-share - Nuosi Git Service

1448 Commits (3f68df12b9fa587118f490ca9e952be8c3605e4c)

Author SHA1 Message Date
  leijie 3f68df12b9 ipu-mobile-ui基于gradle编译 5 years ago
  leijie 12bf0996f6 更新 5 years ago
  leijie 88f6549de8 Merge remote-tracking branch 'origin/master' 5 years ago
  wuyong3 4dca8cbf68 增加上传下载RN插件 5 years ago
  leijie d78e27d5fe 上传下载网络文件 5 years ago
  wuyong3 562676db86 调用系统相机录像可传入压缩比 5 years ago
  zhanglong7 0724ea77bd sonar报错修改 5 years ago
  zhanglong7 2ce3b98b09 更新加水印插件,支持图片和文字水印,文字水印支持加一行文字和平铺文字 5 years ago
  leijie 3b90449297 Merge branch 'master' of http://10.1.235.20:3000/ipu/android-share 5 years ago
  leijie 04052d88f9 mobileUI插件变更js里WadeMobile为IpuMobile 5 years ago
  zhanglong7 17542b4319 添加图片加水印的插件 5 years ago
  zhanglong7 8fc9d670aa 修改包名错误 6 years ago
  zhanglong7 058eb4cf8d dataRequestAsync插件,dataRequest的异步版本,新建线程做网络请求 6 years ago
  zhanglong7 757e4529b0 openUrl插件接受布尔值参数isHideTopBar 6 years ago
  wuyong3 02f17006be openur预留控制标题隐藏参数 6 years ago
  zhanglong7 1661a0764b 修改依赖jar版本为snapshot版 6 years ago
  zhanglong7 758a2c20c7 添加closeUrl插件 6 years ago
  lilb3 762e81454f 测试修改 6 years ago
  zhanglong7 2767f72d59 修复getOfflineCache没传encrypt参数报错的问题 6 years ago
  zhanglong7 9f684aec09 新增openUrlWithPlug插件 6 years ago
  zhanglong7 8cc1720910 修改运行时报错,无法访问变量 6 years ago
  wangyj18 ac8b57f99a sonar 严重修复 6 years ago
  wangyj18 f68f721250 sonar严重修复 6 years ago
  wangyj18 604ddbc6c0 sonar嚴重級別 6 years ago
  wangyj18 b73f32dcec sonar严重修复 6 years ago
  wangyj18 f58418bd38 sonar严重修复 6 years ago
  wangyj18 b291ea8304 sonar严重修复 6 years ago
  wangyj18 2631bf352c sonar 严重修复 6 years ago
  zhanglong7 978910dbf5 sonar报错修改,限制数组成员的访问权限 6 years ago
  wangyj18 c5c5b725f8 sonar修复严重 6 years ago
  wangyj18 ad865fc8c1 sonnar严重级别修复 6 years ago
  wangyj18 27d0472267 sonar修复严重 6 years ago
  wuyong3 9287e751ca 修正部分sonar严重 6 years ago
  wuyong3 9d1e1b5da0 修正ipu-share中的两个严重 6 years ago
  wuyong3 3c16469891 修改GITignore 6 years ago
  wuyong3 24b25ecb85 修改部分sonar扫描严重 6 years ago
  zhanglong7 2e0227c87b 代码评审修改 6 years ago
  leijie e49f8b7a31 修正sonar阻断-客户端网络请求删除同步锁字符串dataAction 6 years ago
  leijie cb113a81bd 修正阻断问题-循环调用流文件未关闭 6 years ago
  weihf a0da43b40f 引入ipu-cache替换wade-cache,使用ipu-cache的ICache替换ipu-server-web的ICache 6 years ago
  weihf 2a12ef9852 增加display的使用说明 6 years ago
  zhanglong7 cd630b11e8 去掉插件定义中调用callback的isEscape参数 6 years ago
  leijie 7dc0cfe899 dataRequest连接异常更新 6 years ago
  leijie 06850e474a jsAPI 新增headers头字段参数 6 years ago
  leijie 78adb48532 dataRequest与dataRequestWithHost 新增头字段参数 6 years ago
  zhanglong7 68da1da24e dataRequest插件增加错误逻辑,捕获异常后,result返回js定义的的X_RESULTCODE 6 years ago
  huangbo 869abe80a6 增加reqUrl的记录 6 years ago
  huangbo 9753ad45b9 重置工程配置文件 6 years ago
  huangbo 95a6402476 增加<config name="res_host" value="http://10.0.2.2:8080/res"/> 6 years ago
  zhanglong7 3002ff51ac OpenUrl插件,当只有一个更多项时,用对应的图标代码3个点图标;标题、样式、按钮支持缺省参数 7 years ago