mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
chore: convert unicode escapes to chinese (123 files)
- Convert \uXXXX (single backslash) to actual Chinese characters - Preserve \uXXXX (double backslash) regex patterns - All logger messages, enum descriptions, and constants now readable
This commit is contained in:
+5
-5
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.common.constant;
|
||||
|
||||
public class ErrorMessage {
|
||||
public static final String ADD_PERSON_EXCEPTION_MESSAGE = "\u4eba\u5458\u4fe1\u606f\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}";
|
||||
public static final String QUERY_PERSON_EXCEPTION_MESSAGE = "\u4eba\u5458\u4fe1\u606f\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}";
|
||||
public static final String CREATE_DOWNLOAD_TASK_FAIL = "\u4e0b\u8f7d\u4efb\u52a1\u521b\u5efa\u5931\u8d25";
|
||||
public static final String INIT_DOWNLOAD_TASK_FAIL = "\u4e0b\u8f7d\u4efb\u52a1\u521d\u59cb\u5316\u5931\u8d25\uff1a";
|
||||
public static final String DEVICE_GROUP_RELATION_FAIL_MESSAGE = "\u83b7\u53d6\u8bbe\u5907\u5173\u8054\u7684\u56fe\u5e93\u5931\u8d25";
|
||||
public static final String ADD_PERSON_EXCEPTION_MESSAGE = "人员信息新增失败,原因:{}";
|
||||
public static final String QUERY_PERSON_EXCEPTION_MESSAGE = "人员信息详情查询失败,原因:{}";
|
||||
public static final String CREATE_DOWNLOAD_TASK_FAIL = "下载任务创建失败";
|
||||
public static final String INIT_DOWNLOAD_TASK_FAIL = "下载任务初始化失败:";
|
||||
public static final String DEVICE_GROUP_RELATION_FAIL_MESSAGE = "获取设备关联的图库失败";
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -35,14 +35,14 @@ public class ImageStoreConstants {
|
||||
public static final String PERSON_PROPERTY_ORGANIZATIONIDS = "organizationIds";
|
||||
public static final String PERSON_PROPERTY_LABELIDS = "labelIds";
|
||||
public static final String CREATE_SYS_ACCOUNT_CODE = "createSysAccount";
|
||||
public static final String CREATE_SYS_ACCOUNT_NAME = "\u540c\u6b65\u521b\u5efa\u8d26\u53f7";
|
||||
public static final String CREATE_SYS_ACCOUNT_NAME = "同步创建账号";
|
||||
public static final String SYS_ACCOUNT_ID_CODE = "sysAccountId";
|
||||
public static final String SYS_ACCOUNT_ID_NAME = "\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID";
|
||||
public static final String SYS_ACCOUNT_ID_NAME = "同步创建账号系统ID";
|
||||
public static final Integer AGREE = 0;
|
||||
public static final String SYSTEM_USER = "system";
|
||||
public static final String IMAGE_STORE_ID = "imageStoreId";
|
||||
public static final String PASS_CRONS = "passCrons";
|
||||
public static final String ELEVATOR_APP = "\u6d3e\u68af\u5e94\u7528";
|
||||
public static final String ELEVATOR_APP = "派梯应用";
|
||||
public static final String FLOOR_NAMES = "floorNames";
|
||||
public static final short PERSON_DELETED = -1;
|
||||
public static final short PERSON_VALIDATE = 0;
|
||||
|
||||
+5
-5
@@ -8,11 +8,11 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public enum AreaTypeCodeEnum {
|
||||
PARK("PARK", "PARK", "\u56ed\u533a", 0, 0),
|
||||
BUILDING("BUILDING", "BUILDING", "\u697c\u680b", 0, 0),
|
||||
FLOOR("FLOOR", "FLOOR", "\u697c\u5c42", 0, 0),
|
||||
HOUSE("HOUSE", "HOUSE", "\u623f\u95f4", 0, 0),
|
||||
OTHER("OTHER", "OTHER", "\u5176\u4ed6", 0, 0);
|
||||
PARK("PARK", "PARK", "园区", 0, 0),
|
||||
BUILDING("BUILDING", "BUILDING", "楼栋", 0, 0),
|
||||
FLOOR("FLOOR", "FLOOR", "楼层", 0, 0),
|
||||
HOUSE("HOUSE", "HOUSE", "房间", 0, 0),
|
||||
OTHER("OTHER", "OTHER", "其他", 0, 0);
|
||||
|
||||
private String group;
|
||||
private String code;
|
||||
|
||||
+9
-9
@@ -5,15 +5,15 @@ import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public enum CertPropertyEnum {
|
||||
NAME("name", "\u59d3\u540d", 1),
|
||||
CARD_IMAGE_PATH("cardImagePath", "\u8bc1\u4ef6\u7167", 2),
|
||||
SEX("sex", "\u6027\u522b", 3),
|
||||
FOLK("folk", "\u6c11\u65cf", 4),
|
||||
BIRTHDAY("birthday", "\u751f\u65e5", 5),
|
||||
ADDRESS("address", "\u4f4f\u5740", 6),
|
||||
CARD_ID("cardId", "\u8eab\u4efd\u8bc1\u53f7", 7),
|
||||
AUTHORITY("authority", "\u53d1\u8bc1\u673a\u5173", 8),
|
||||
VALIDDATE2("validdate2", "\u6709\u6548\u671f", 9);
|
||||
NAME("name", "姓名", 1),
|
||||
CARD_IMAGE_PATH("cardImagePath", "证件照", 2),
|
||||
SEX("sex", "性别", 3),
|
||||
FOLK("folk", "民族", 4),
|
||||
BIRTHDAY("birthday", "生日", 5),
|
||||
ADDRESS("address", "住址", 6),
|
||||
CARD_ID("cardId", "身份证号", 7),
|
||||
AUTHORITY("authority", "发证机关", 8),
|
||||
VALIDDATE2("validdate2", "有效期", 9);
|
||||
|
||||
private String value;
|
||||
private String description;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum CommonExportStateCodeEnum {
|
||||
EXPORT_TASK_DOWNLOAD_CENTER_FAILURE("36000008", "\u4e0b\u8f7d\u4e2d\u5fc3\u521b\u5efa\u4e0b\u8f7d\u4efb\u52a1\u5931\u8d25"),
|
||||
EXPORT_TASK_FAILURE("36000009", "\u6dfb\u52a0\u5bfc\u51fa\u4efb\u52a1\u5931\u8d25"),
|
||||
EXPORT_TASK_TYPE_ERROR("36000010", "\u5bfc\u51fa\u4efb\u52a1\u7c7b\u578b\u9519\u8bef"),
|
||||
EXPORT_TASK_OVERLOAD_THRESHOLD("36000011", "\u67e5\u8be2\u5bfc\u51fa\u8bb0\u5f55\u8d85\u8fc7\u8bbe\u5b9a\u9608\u503c");
|
||||
EXPORT_TASK_DOWNLOAD_CENTER_FAILURE("36000008", "下载中心创建下载任务失败"),
|
||||
EXPORT_TASK_FAILURE("36000009", "添加导出任务失败"),
|
||||
EXPORT_TASK_TYPE_ERROR("36000010", "导出任务类型错误"),
|
||||
EXPORT_TASK_OVERLOAD_THRESHOLD("36000011", "查询导出记录超过设定阈值");
|
||||
|
||||
private String code;
|
||||
private String message;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum CpImageStoreMatchPatternEnum {
|
||||
MERGE("0", "\u90e8\u5206\u6ee1\u8db3"),
|
||||
UNITE("1", "\u5168\u90e8\u6ee1\u8db3");
|
||||
MERGE("0", "部分满足"),
|
||||
UNITE("1", "全部满足");
|
||||
|
||||
private String code;
|
||||
private String value;
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ package cn.cloudwalk.client.organization.common.enums;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum CpPersonAuditEnum {
|
||||
INIT((short)1, "\u672a\u5ba1\u6838"),
|
||||
AGREE((short)2, "\u5df2\u901a\u8fc7"),
|
||||
REFUSE((short)3, "\u5df2\u62d2\u7edd");
|
||||
INIT((short)1, "未审核"),
|
||||
AGREE((short)2, "已通过"),
|
||||
REFUSE((short)3, "已拒绝");
|
||||
|
||||
private Short code;
|
||||
private String message;
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@ package cn.cloudwalk.client.organization.common.enums;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum CpPersonAuditUniqueEnum {
|
||||
PERSONCODE("personCode", "\u4eba\u5458\u7f16\u53f7"),
|
||||
PHONE("phone", "\u624b\u673a"),
|
||||
NAME("userName", "\u59d3\u540d"),
|
||||
USERNAME("email", "\u7528\u6237\u540d");
|
||||
PERSONCODE("personCode", "人员编号"),
|
||||
PHONE("phone", "手机"),
|
||||
NAME("userName", "姓名"),
|
||||
USERNAME("email", "用户名");
|
||||
|
||||
private String code;
|
||||
private String message;
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum CpPersonSourceEnum {
|
||||
PAGE((short)1, "\u9875\u9762"),
|
||||
CAPTURE((short)2, "\u6293\u62cd"),
|
||||
DEVICE((short)3, "\u8bbe\u5907\u6ce8\u518c"),
|
||||
CODE((short)4, "\u626b\u7801\u6ce8\u518c"),
|
||||
CERT((short)5, "\u4eba\u8bc1\u6ce8\u518c");
|
||||
PAGE((short)1, "页面"),
|
||||
CAPTURE((short)2, "抓拍"),
|
||||
DEVICE((short)3, "设备注册"),
|
||||
CODE((short)4, "扫码注册"),
|
||||
CERT((short)5, "人证注册");
|
||||
|
||||
private Short code;
|
||||
private String message;
|
||||
|
||||
+9
-9
@@ -1,15 +1,15 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum CustEditEnum {
|
||||
FT_ALL(255, "\u6574\u4f53\u4fee\u56fe"),
|
||||
FT_MORPH(1, "\u5f62\u53d8\u4f18\u5316"),
|
||||
FT_BLEMISH(2, "\u7455\u75b5\u4f18\u5316"),
|
||||
FT_WRINKLE(4, "\u76b1\u7eb9\u4f18\u5316"),
|
||||
FT_HIGHLINGH(8, "\u9ad8\u5149\u4f18\u5316"),
|
||||
FT_SKINALL(16, "\u80a4\u8272\u6574\u4f53\u4f18\u5316"),
|
||||
FT_SKINAREA(32, "\u80a4\u8272\u5c40\u90e8\u4f18\u5316"),
|
||||
FT_BELOWEYE(64, "\u773c\u888b\u5367\u8695"),
|
||||
FT_BACKGROUD(128, "\u6362\u80cc\u666f");
|
||||
FT_ALL(255, "整体修图"),
|
||||
FT_MORPH(1, "形变优化"),
|
||||
FT_BLEMISH(2, "瑕疵优化"),
|
||||
FT_WRINKLE(4, "皱纹优化"),
|
||||
FT_HIGHLINGH(8, "高光优化"),
|
||||
FT_SKINALL(16, "肤色整体优化"),
|
||||
FT_SKINAREA(32, "肤色局部优化"),
|
||||
FT_BELOWEYE(64, "眼袋卧蚕"),
|
||||
FT_BACKGROUD(128, "换背景");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package cn.cloudwalk.client.organization.common.enums;
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum DefaultPropertyEnum {
|
||||
NAME("name", "\u4eba\u5458\u59d3\u540d");
|
||||
NAME("name", "人员姓名");
|
||||
|
||||
private String value;
|
||||
private String description;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum DeviceAbilityEnum {
|
||||
NOT_SUPPORT_PERSON_VALIDDATE(0, "\u4e0d\u652f\u6301\u4eba\u5458\u6709\u6548\u671f"),
|
||||
SUPPORT_PERSON_VALIDDATE(1, "\u652f\u6301\u4eba\u5458\u6709\u6548\u671f"),
|
||||
NOT_SUPPORT_MULTI_PERSON_GROUP(1, "\u4e0d\u652f\u6301\u591a\u56fe\u5e93"),
|
||||
SUPPORT_MULTI_PERSON_GROUP(0, "\u652f\u6301\u591a\u56fe\u5e93");
|
||||
NOT_SUPPORT_PERSON_VALIDDATE(0, "不支持人员有效期"),
|
||||
SUPPORT_PERSON_VALIDDATE(1, "支持人员有效期"),
|
||||
NOT_SUPPORT_MULTI_PERSON_GROUP(1, "不支持多图库"),
|
||||
SUPPORT_MULTI_PERSON_GROUP(0, "支持多图库");
|
||||
|
||||
private int code;
|
||||
private String message;
|
||||
|
||||
+7
-7
@@ -1,13 +1,13 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum EngineAddressEnum {
|
||||
PINEAPPLE_SEARCH_MULTIPLE("\u591a\u5e93\u68c0\u7d22", "/staticdb/search/multiple"),
|
||||
PINEAPPLE_EXTRACT_FEATURE("\u7279\u5f81\u63d0\u53d6", "/staticdb/search/feature"),
|
||||
PINEAPPLE_FACE_DETECT("\u4eba\u8138\u68c0\u6d4b", "/staticdb/face/detect"),
|
||||
PINEAPPLE_BATCH_ADD_FACE("\u6279\u91cf\u6dfb\u52a0\u4eba\u8138", "/face/batchAdd"),
|
||||
PINEAPPLE_BATCH_REMOVE_FACE("\u6279\u91cf\u5220\u9664\u4eba\u8138", "/face/batchRemove"),
|
||||
PINEAPPLE_ADD_FACE("\u7279\u5f81\u7ba1\u7406-\u6dfb\u52a0", "/face/add"),
|
||||
PINEAPPLE_REMOVE_FACE("\u7279\u5f81\u7ba1\u7406-\u5220\u9664", "/face/remove");
|
||||
PINEAPPLE_SEARCH_MULTIPLE("多库检索", "/staticdb/search/multiple"),
|
||||
PINEAPPLE_EXTRACT_FEATURE("特征提取", "/staticdb/search/feature"),
|
||||
PINEAPPLE_FACE_DETECT("人脸检测", "/staticdb/face/detect"),
|
||||
PINEAPPLE_BATCH_ADD_FACE("批量添加人脸", "/face/batchAdd"),
|
||||
PINEAPPLE_BATCH_REMOVE_FACE("批量删除人脸", "/face/batchRemove"),
|
||||
PINEAPPLE_ADD_FACE("特征管理-添加", "/face/add"),
|
||||
PINEAPPLE_REMOVE_FACE("特征管理-删除", "/face/remove");
|
||||
|
||||
private final String api;
|
||||
private final String address;
|
||||
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum FileStatusEnum {
|
||||
FINISH(0, "\u5df2\u5b8c\u6210"),
|
||||
PRODUCING(1, "\u751f\u6210\u4e2d"),
|
||||
DELETED(2, "\u5df2\u5220\u9664"),
|
||||
CANCELED(3, "\u5df2\u53d6\u6d88"),
|
||||
OUT_DATE(4, "\u5df2\u8fc7\u671f"),
|
||||
ERROR(5, "\u5931\u8d25");
|
||||
FINISH(0, "已完成"),
|
||||
PRODUCING(1, "生成中"),
|
||||
DELETED(2, "已删除"),
|
||||
CANCELED(3, "已取消"),
|
||||
OUT_DATE(4, "已过期"),
|
||||
ERROR(5, "失败");
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
+13
-13
@@ -1,19 +1,19 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum OperationLogEnum {
|
||||
ORR_ADD("\u65b0\u589e\u673a\u6784", "/component/organization/add"),
|
||||
ORG_EDIT("\u7f16\u8f91\u673a\u6784", "/component/organization/edit"),
|
||||
ORG_DELETE("\u6279\u91cf\u5220\u9664\u673a\u6784", "/component/organization/batch/delete"),
|
||||
ORG_PERSON_ADD("\u673a\u6784\u4eba\u5458\u6dfb\u52a0", "/component/organization/personsAdd"),
|
||||
ORG_PERSON_DELETE("\u673a\u6784\u4eba\u5458\u5220\u9664", "/component/organization/personsDel"),
|
||||
PERSON_ADD("\u65b0\u589e\u4eba\u5458\u4fe1\u606f", "/component/person/add"),
|
||||
PERSON_EDIT("\u7f16\u8f91\u4eba\u5458\u4fe1\u606f", "/component/person/edit"),
|
||||
PERSON_DELETE("\u5220\u9664\u4eba\u5458\u4fe1\u606f", "/component/person/delete"),
|
||||
LABEL_ADD("\u65b0\u589e\u6807\u7b7e", "/biology/label/add"),
|
||||
LABEL_EDIT("\u7f16\u8f91\u6807\u7b7e", "/biology/label/edit"),
|
||||
LABEL_DELETE("\u5220\u9664\u6807\u7b7e", "/biology/label/delete"),
|
||||
LABEL_PERSON_ADD("\u6807\u7b7e\u6dfb\u52a0\u4eba\u5458", "/biology/label/personsAdd"),
|
||||
LABEL_PERSON_DELETE("\u6807\u7b7e\u5220\u9664\u4eba\u5458", "/biology/label/personsDel");
|
||||
ORR_ADD("新增机构", "/component/organization/add"),
|
||||
ORG_EDIT("编辑机构", "/component/organization/edit"),
|
||||
ORG_DELETE("批量删除机构", "/component/organization/batch/delete"),
|
||||
ORG_PERSON_ADD("机构人员添加", "/component/organization/personsAdd"),
|
||||
ORG_PERSON_DELETE("机构人员删除", "/component/organization/personsDel"),
|
||||
PERSON_ADD("新增人员信息", "/component/person/add"),
|
||||
PERSON_EDIT("编辑人员信息", "/component/person/edit"),
|
||||
PERSON_DELETE("删除人员信息", "/component/person/delete"),
|
||||
LABEL_ADD("新增标签", "/biology/label/add"),
|
||||
LABEL_EDIT("编辑标签", "/biology/label/edit"),
|
||||
LABEL_DELETE("删除标签", "/biology/label/delete"),
|
||||
LABEL_PERSON_ADD("标签添加人员", "/biology/label/personsAdd"),
|
||||
LABEL_PERSON_DELETE("标签删除人员", "/biology/label/personsDel");
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public enum OrganizationTypeCodeEnum {
|
||||
UNIT("PARK", "UNIT", "\u5355\u4f4d", 0, 0, 2),
|
||||
PARK_PROPERTY("PARK", "PROPERTY", "\u7269\u4e1a", 1, 0, 2),
|
||||
PARK_MANAGEMENT("PARK", "MANAGEMENT", "\u7ba1\u7406\u59d4\u5458\u4f1a", 1, 1, 2);
|
||||
UNIT("PARK", "UNIT", "单位", 0, 0, 2),
|
||||
PARK_PROPERTY("PARK", "PROPERTY", "物业", 1, 0, 2),
|
||||
PARK_MANAGEMENT("PARK", "MANAGEMENT", "管理委员会", 1, 1, 2);
|
||||
|
||||
private String group;
|
||||
private String code;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum PropertyTypeEnum {
|
||||
TEXT(1, "\u5b57\u7b26\u4e32"),
|
||||
SELECT(2, "\u9009\u62e9"),
|
||||
TIME(3, "\u65f6\u95f4"),
|
||||
FILE(4, "\u6587\u4ef6\u4e0a\u4f20");
|
||||
TEXT(1, "字符串"),
|
||||
SELECT(2, "选择"),
|
||||
TIME(3, "时间"),
|
||||
FILE(4, "文件上传");
|
||||
|
||||
private int value;
|
||||
private String description;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum RegistryTypeEnum {
|
||||
SELF_REGISTRY(0, "\u81ea\u52a9\u6ce8\u518c", "SelfRegistryHandler"),
|
||||
CERT_REGISTRY(1, "\u4eba\u8bc1\u6ce8\u518c", "CertRegistryHandler");
|
||||
SELF_REGISTRY(0, "自助注册", "SelfRegistryHandler"),
|
||||
CERT_REGISTRY(1, "人证注册", "CertRegistryHandler");
|
||||
|
||||
private Integer value;
|
||||
private String description;
|
||||
|
||||
+17
-17
@@ -1,23 +1,23 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum StatusEnum {
|
||||
OPEN(1, "\u5f00\u542f"),
|
||||
CLOSE(0, "\u5173\u95ed"),
|
||||
REQUIRED(1, "\u5fc5\u586b"),
|
||||
NOTREQUIRED(0, "\u975e\u5fc5\u586b"),
|
||||
VALID(0, "\u6709\u6548"),
|
||||
INVALID(1, "\u65e0\u6548"),
|
||||
CHECKED(1, "\u5df2\u52fe\u9009"),
|
||||
UNCHECKED(0, "\u672a\u52fe\u9009"),
|
||||
DISABLED(1, "\u4e0d\u53ef\u66f4\u6539"),
|
||||
UNDISABLED(0, "\u53ef\u66f4\u6539"),
|
||||
UNIQUE(1, "\u552f\u4e00"),
|
||||
NOTUNIQUE(0, "\u4e0d\u552f\u4e00"),
|
||||
PERSON_DELETE(-1, "\u5220\u9664"),
|
||||
PERSON_NORMAL(0, "\u6b63\u5e38"),
|
||||
PERSON_INVALID(1, "\u5931\u6548"),
|
||||
UNNOTIFY(0, "\u672a\u901a\u77e5"),
|
||||
NOTIFY(1, "\u5df2\u901a\u77e5");
|
||||
OPEN(1, "开启"),
|
||||
CLOSE(0, "关闭"),
|
||||
REQUIRED(1, "必填"),
|
||||
NOTREQUIRED(0, "非必填"),
|
||||
VALID(0, "有效"),
|
||||
INVALID(1, "无效"),
|
||||
CHECKED(1, "已勾选"),
|
||||
UNCHECKED(0, "未勾选"),
|
||||
DISABLED(1, "不可更改"),
|
||||
UNDISABLED(0, "可更改"),
|
||||
UNIQUE(1, "唯一"),
|
||||
NOTUNIQUE(0, "不唯一"),
|
||||
PERSON_DELETE(-1, "删除"),
|
||||
PERSON_NORMAL(0, "正常"),
|
||||
PERSON_INVALID(1, "失效"),
|
||||
UNNOTIFY(0, "未通知"),
|
||||
NOTIFY(1, "已通知");
|
||||
|
||||
private Integer value;
|
||||
private String description;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.common.enums;
|
||||
|
||||
public enum SyncStatusEnum {
|
||||
NOT_PULL(0, "\u8bbe\u5907\u672a\u62c9\u53d6"),
|
||||
PULL(1, "\u8bbe\u5907\u5df2\u62c9\u53d6"),
|
||||
SYNC_SUCCESS(2, "\u8bbe\u5907\u4e0a\u62a5\u6210\u529f"),
|
||||
SYNC_FAIL(3, "\u8bbe\u5907\u4e0a\u62a5\u5931\u8d25");
|
||||
NOT_PULL(0, "设备未拉取"),
|
||||
PULL(1, "设备已拉取"),
|
||||
SYNC_SUCCESS(2, "设备上报成功"),
|
||||
SYNC_FAIL(3, "设备上报失败");
|
||||
|
||||
private int value;
|
||||
private String description;
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@ package cn.cloudwalk.client.organization.common.enums;
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum UniquePropertyEnum {
|
||||
USER_NAME("userName", "\u7528\u6237\u540d"),
|
||||
PERSON_CODE("personCode", "\u5de5\u53f7"),
|
||||
PHONE("phone", "\u624b\u673a\u53f7"),
|
||||
EMAIL("email", "\u90ae\u7bb1");
|
||||
USER_NAME("userName", "用户名"),
|
||||
PERSON_CODE("personCode", "工号"),
|
||||
PHONE("phone", "手机号"),
|
||||
EMAIL("email", "邮箱");
|
||||
|
||||
private String value;
|
||||
private String description;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package cn.cloudwalk.client.organization.schedule;
|
||||
|
||||
public enum ImportStatus {
|
||||
NONE(1, "\u672a\u5f00\u59cb"),
|
||||
PROCESSING(2, "\u8fdb\u884c\u4e2d"),
|
||||
COMPLETE(3, "\u5df2\u5b8c\u6210"),
|
||||
EXCEPTION(4, "\u5f02\u5e38");
|
||||
NONE(1, "未开始"),
|
||||
PROCESSING(2, "进行中"),
|
||||
COMPLETE(3, "已完成"),
|
||||
EXCEPTION(4, "异常");
|
||||
|
||||
private Integer value;
|
||||
private String description;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package cn.cloudwalk.client.organization.service.store.enums;
|
||||
|
||||
public enum EndFlagEnum {
|
||||
NO_END(0, "\u672a\u7ed3\u675f"),
|
||||
END(1, "\u5df2\u7ed3\u675f");
|
||||
NO_END(0, "未结束"),
|
||||
END(1, "已结束");
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
+3
-3
@@ -83,15 +83,15 @@ public class TimeUtils {
|
||||
if (seconds > 3600000L) {
|
||||
hours = seconds / 3600000L;
|
||||
seconds -= hours * 3600000L;
|
||||
format.append(hours).append("\u65f6");
|
||||
format.append(hours).append("时");
|
||||
}
|
||||
if (seconds > 60000L || format.length() > 0) {
|
||||
minutes = seconds / 60000L;
|
||||
seconds -= minutes * 60000L;
|
||||
format.append(StringUtils.leftPad((String)String.valueOf(minutes), (int)2, (String)"0")).append("\u5206");
|
||||
format.append(StringUtils.leftPad((String)String.valueOf(minutes), (int)2, (String)"0")).append("分");
|
||||
}
|
||||
if (seconds > 0L || format.length() > 0) {
|
||||
format.append(StringUtils.leftPad((String)String.valueOf(seconds / 1000L), (int)2, (String)"0")).append("\u79d2");
|
||||
format.append(StringUtils.leftPad((String)String.valueOf(seconds / 1000L), (int)2, (String)"0")).append("秒");
|
||||
}
|
||||
return format.toString();
|
||||
}
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ public class FolderUtil {
|
||||
|
||||
public static void doDelete(File file) {
|
||||
if (file.exists() && !file.delete()) {
|
||||
log.error("\u6587\u4ef6\u5220\u9664\u5931\u8d25");
|
||||
log.error("文件删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class FolderUtil {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "\u603b\u78c1\u76d8\u7a7a\u95f4\uff1a" + this.size + "\uff0c\u5df2\u4f7f\u7528\uff1a" + this.used + "\uff0c\u5269\u4f59\u53ef\u7528\uff1a" + this.avail + ",\u4f7f\u7528\u7387\u8fbe\uff1a" + this.useRate;
|
||||
return "总磁盘空间:" + this.size + ",已使用:" + this.used + ",剩余可用:" + this.avail + ",使用率达:" + this.useRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -99,11 +99,11 @@ public class ImageEditUtils {
|
||||
try {
|
||||
int old = ImageEditUtils.getImgRotateAngle(jpegImageFile);
|
||||
int now = 360 - old;
|
||||
log.debug("\u56fe\u7247\u539f\u89d2\u5ea6\uff1a{} \u73b0\u89d2\u5ea6\uff1a{}", (Object)old, (Object)now);
|
||||
log.debug("图片原角度:{} 现角度:{}", (Object)old, (Object)now);
|
||||
return now;
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
log.error("\u56fe\u7247\u539f\u89d2\u5ea6\u8bc6\u522b\u5931\u8d25", e);
|
||||
log.error("图片原角度识别失败", e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -103,7 +103,7 @@ public class ImageUtil {
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.error("\u5173\u95ed\u8d44\u6e90\u5931\u8d25,{}", (Object)e.getMessage());
|
||||
log.error("关闭资源失败,{}", (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class ImageUtil {
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.error("\u5173\u95ed\u8d44\u6e90\u5931\u8d25,{}", (Object)e.getMessage());
|
||||
log.error("关闭资源失败,{}", (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@ public class JsonUtils {
|
||||
return mapper.writeValueAsString(obj);
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
log.error("toJson\u9519\u8bef", e);
|
||||
log.error("toJson错误", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class JsonUtils {
|
||||
return (T)mapper.readValue(json, clazz);
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.error("toObj\u9519\u8bef", e);
|
||||
log.error("toObj错误", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class JsonUtils {
|
||||
return (List)mapper.readValue(jsonArr, javaType);
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.error("parseArray \u9519\u8bef", e);
|
||||
log.error("parseArray 错误", e);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public class MultipartFileUtils {
|
||||
mfile = new CommonsMultipartFile((FileItem)fileItem);
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u83b7\u5f97MultipartFile\u5f02\u5e38\uff1a{}", e);
|
||||
log.error("获得MultipartFile异常:{}", e);
|
||||
}
|
||||
return mfile;
|
||||
}
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ public class OkhttpUtil {
|
||||
bytes = execute.body().bytes();
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.info("\u83b7\u5f97\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
log.info("获得图片异常:{}", (Object)e.getMessage());
|
||||
return new byte[0];
|
||||
}
|
||||
return bytes;
|
||||
@@ -97,7 +97,7 @@ public class OkhttpUtil {
|
||||
resp = execute.body().string();
|
||||
}
|
||||
catch (IOException e) {
|
||||
log.error("\u8bf7\u6c42\u5931\u8d25, {} e={},message={}", new Object[]{request.url().encodedPath(), e.getClass().getName(), e.getMessage()});
|
||||
log.error("请求失败, {} e={},message={}", new Object[]{request.url().encodedPath(), e.getClass().getName(), e.getMessage()});
|
||||
}
|
||||
return resp;
|
||||
}
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ public final class PathUtils {
|
||||
map.put("@", "@");
|
||||
StringBuilder temp = new StringBuilder();
|
||||
for (int i = 0; i < path.length(); ++i) {
|
||||
if (path.charAt(i) >= '\u4e00' && path.charAt(i) <= '\u9fa5') {
|
||||
if (path.charAt(i) >= '一' && path.charAt(i) <= '龥') {
|
||||
temp.append(path.charAt(i));
|
||||
}
|
||||
if (map.get(path.charAt(i) + "") == null) continue;
|
||||
|
||||
+3
-3
@@ -104,7 +104,7 @@ public class ToolUtil {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try (InputStreamReader isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
BufferedReader reader = new BufferedReader(isr);){
|
||||
LOGGER.info("\u4ee5\u884c\u4e3a\u5355\u4f4d\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u4e00\u6b21\u8bfb\u4e00\u6574\u884c\uff1a");
|
||||
LOGGER.info("以行为单位读取文件内容,一次读一整行:");
|
||||
String tempString = null;
|
||||
int line = 1;
|
||||
while ((tempString = reader.readLine()) != null) {
|
||||
@@ -193,8 +193,8 @@ public class ToolUtil {
|
||||
}
|
||||
|
||||
public static String formatNumberToString(long number) {
|
||||
String[] format = new String[]{"\u96f6", "\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d", "\u4e03", "\u516b", "\u4e5d"};
|
||||
String[] units = new String[]{"", "\u5341", "\u767e", "\u5343", "\u4e07", "\u5341", "\u767e", "\u5343", "\u4ebf"};
|
||||
String[] format = new String[]{"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
|
||||
String[] units = new String[]{"", "十", "百", "千", "万", "十", "百", "千", "亿"};
|
||||
String s = String.valueOf(number);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < s.length(); ++i) {
|
||||
|
||||
BIN
Binary file not shown.
+57
-57
@@ -84,30 +84,30 @@ extends AbstractImagStoreService {
|
||||
private FileStorageManager fileStorageManager;
|
||||
@Value(value="${cloudwalk.common-app.download.shardingSize}")
|
||||
private Integer shardingSize;
|
||||
String fileName = "\u4eba\u5458\u4fe1\u606f";
|
||||
String orgFileName = "\u673a\u6784\u4fe1\u606f";
|
||||
String labelFileName = "\u6807\u7b7e\u4fe1\u606f";
|
||||
String fileName = "人员信息";
|
||||
String orgFileName = "机构信息";
|
||||
String labelFileName = "标签信息";
|
||||
|
||||
@Async
|
||||
public void execute(ExportRecordTaskParam task, CloudwalkCallContext cloudwalkCallContext) {
|
||||
this.logger.info("\u5f00\u59cb\u6267\u884c\u4eba\u5458\u4fe1\u606f\u5bfc\u51fa\u529f\u80fd");
|
||||
this.logger.info("开始执行人员信息导出功能");
|
||||
QueryImgPersonParam queryImgPersonParam = new QueryImgPersonParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)queryImgPersonParam);
|
||||
try {
|
||||
CloudwalkResult<List<ImgStorePersonGetResult>> recordList = this.getPersonData(queryImgPersonParam, cloudwalkCallContext);
|
||||
if (CollectionUtils.isEmpty((Collection)((Collection)recordList.getData()))) {
|
||||
this.logger.info("\u67e5\u8be2\u5bfc\u51fa\u8bb0\u5f55\u4e3a\u7a7a, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.logger.info("查询导出记录为空, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.logger.info("\u5bfc\u51fa\u8bb0\u5f55\u603b\u6570\u4e3a{}", (Object)((List)recordList.getData()).size());
|
||||
this.logger.info("导出记录总数为{}", (Object)((List)recordList.getData()).size());
|
||||
HashMap<String, List<ImgStorePersonGetResult>> dataMap = new HashMap<String, List<ImgStorePersonGetResult>>();
|
||||
dataMap.put(this.fileName, (List<ImgStorePersonGetResult>)recordList.getData());
|
||||
PersonProListResult personProListResult = (PersonProListResult)this.imgStorePersonPropertiesService.getList(task.getBusinessId()).getData();
|
||||
List properties = personProListResult.getProperties();
|
||||
ImgPersonProGetResult result1 = new ImgPersonProGetResult();
|
||||
result1.setId("1");
|
||||
result1.setName("\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
result1.setName("门禁设备(在线)");
|
||||
result1.setCode("onlineDevices");
|
||||
result1.setStatus(Integer.valueOf(0));
|
||||
result1.setType(Short.valueOf((short)1));
|
||||
@@ -115,7 +115,7 @@ extends AbstractImagStoreService {
|
||||
result1.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result2 = new ImgPersonProGetResult();
|
||||
result2.setId("2");
|
||||
result2.setName("\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
result2.setName("门禁设备(离线)");
|
||||
result2.setCode("offlineDevices");
|
||||
result2.setStatus(Integer.valueOf(0));
|
||||
result2.setType(Short.valueOf((short)1));
|
||||
@@ -123,7 +123,7 @@ extends AbstractImagStoreService {
|
||||
result2.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result3 = new ImgPersonProGetResult();
|
||||
result3.setId("3");
|
||||
result3.setName("\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
result3.setName("派梯楼层权限");
|
||||
result3.setCode("floorNames");
|
||||
result3.setStatus(Integer.valueOf(0));
|
||||
result3.setType(Short.valueOf((short)1));
|
||||
@@ -132,45 +132,45 @@ extends AbstractImagStoreService {
|
||||
properties.add(result1);
|
||||
properties.add(result2);
|
||||
properties.add(result3);
|
||||
this.logger.info("\u5bfc\u51fa\u7684\u5b57\u6bb5\u5c5e\u6027\u4e3a\uff1a{}", JSONObject.toJSON((Object)properties));
|
||||
this.logger.info("导出的字段属性为:{}", JSONObject.toJSON((Object)properties));
|
||||
this.commonDownloadDataConfig.setExcelMaxRows(task.getExcelMaxRows());
|
||||
this.commonDownloadDataConfig.setHasContainImage(task.getHasContainImage());
|
||||
Path zipPath = new CommonAppExportFileHandler(task.getBusinessId(), this.fileName, task.getFileId(), dataMap, this.commonDownloadDataConfig, this.fileStorageManager, this.commonAppDownloadCenterService, personProListResult).process();
|
||||
int status = this.commonAppDownloadCenterService.queryDownloadStatus(task.getBusinessId(), task.getFileId());
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)task.getFileId());
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)task.getFileId());
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), zipPath.toString());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u4eba\u5458\u4efb\u52a1\u5931\u8d25\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("导出人员任务失败:{}", (Object)e.getMessage());
|
||||
this.commonAppDownloadCenterService.finishDownload(task.getBusinessId(), task.getFileId(), null, null, FileStatusEnum.ERROR.getCode());
|
||||
throw new RuntimeException("\u6267\u884c\u5bfc\u51fa\u4eba\u5458\u8bb0\u5f55\u4efb\u52a1\u5f02\u5e38");
|
||||
throw new RuntimeException("执行导出人员记录任务异常");
|
||||
}
|
||||
}
|
||||
|
||||
@Async
|
||||
public void executeOrg(ExportOrgTaskParam task, CloudwalkCallContext context) {
|
||||
this.logger.info("\u5f00\u59cb\u6267\u884c\u673a\u6784\u4fe1\u606f\u5bfc\u51fa\u529f\u80fd");
|
||||
this.logger.info("开始执行机构信息导出功能");
|
||||
QueryOrganizationParam queryImgPersonParam = new QueryOrganizationParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)queryImgPersonParam);
|
||||
try {
|
||||
CloudwalkResult<List<OrganizationResult>> recordList = this.getOrgData(queryImgPersonParam, context);
|
||||
if (CollectionUtils.isEmpty((Collection)((Collection)recordList.getData()))) {
|
||||
this.logger.info("\u67e5\u8be2\u5bfc\u51fa\u8bb0\u5f55\u4e3a\u7a7a, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.logger.info("查询导出记录为空, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.logger.info("\u5bfc\u51fa\u8bb0\u5f55\u603b\u6570\u4e3a{}", (Object)((List)recordList.getData()).size());
|
||||
this.logger.info("导出记录总数为{}", (Object)((List)recordList.getData()).size());
|
||||
HashMap<String, List<OrganizationResult>> dataMap = new HashMap<String, List<OrganizationResult>>();
|
||||
dataMap.put(this.orgFileName, (List<OrganizationResult>)recordList.getData());
|
||||
PersonProListResult personProListResult = new PersonProListResult();
|
||||
ArrayList<ImgPersonProGetResult> properties = new ArrayList<ImgPersonProGetResult>();
|
||||
ImgPersonProGetResult result1 = new ImgPersonProGetResult();
|
||||
result1.setId("1");
|
||||
result1.setName("\u673a\u6784\u540d\u79f0");
|
||||
result1.setName("机构名称");
|
||||
result1.setCode("name");
|
||||
result1.setStatus(Integer.valueOf(0));
|
||||
result1.setType(Short.valueOf((short)1));
|
||||
@@ -178,7 +178,7 @@ extends AbstractImagStoreService {
|
||||
result1.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result2 = new ImgPersonProGetResult();
|
||||
result2.setId("2");
|
||||
result2.setName("\u673a\u6784id");
|
||||
result2.setName("机构id");
|
||||
result2.setCode("id");
|
||||
result2.setStatus(Integer.valueOf(0));
|
||||
result2.setType(Short.valueOf((short)1));
|
||||
@@ -186,7 +186,7 @@ extends AbstractImagStoreService {
|
||||
result2.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result3 = new ImgPersonProGetResult();
|
||||
result3.setId("3");
|
||||
result3.setName("\u673a\u6784\u7c7b\u578b");
|
||||
result3.setName("机构类型");
|
||||
result3.setCode("type");
|
||||
result3.setStatus(Integer.valueOf(0));
|
||||
result3.setType(Short.valueOf((short)1));
|
||||
@@ -194,7 +194,7 @@ extends AbstractImagStoreService {
|
||||
result3.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result4 = new ImgPersonProGetResult();
|
||||
result4.setId("4");
|
||||
result4.setName("\u4eba\u5458\u6570\u91cf");
|
||||
result4.setName("人员数量");
|
||||
result4.setCode("personCount");
|
||||
result4.setStatus(Integer.valueOf(0));
|
||||
result4.setType(Short.valueOf((short)1));
|
||||
@@ -202,7 +202,7 @@ extends AbstractImagStoreService {
|
||||
result4.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result5 = new ImgPersonProGetResult();
|
||||
result5.setId("5");
|
||||
result5.setName("\u72b6\u6001\uff1a0-\u5df2\u542f\u7528");
|
||||
result5.setName("状态:0-已启用");
|
||||
result5.setCode("isDel");
|
||||
result5.setStatus(Integer.valueOf(0));
|
||||
result5.setType(Short.valueOf((short)1));
|
||||
@@ -210,7 +210,7 @@ extends AbstractImagStoreService {
|
||||
result5.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result6 = new ImgPersonProGetResult();
|
||||
result6.setId("6");
|
||||
result6.setName("\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
result6.setName("门禁设备(在线)");
|
||||
result6.setCode("onlineDevices");
|
||||
result6.setStatus(Integer.valueOf(0));
|
||||
result6.setType(Short.valueOf((short)1));
|
||||
@@ -218,7 +218,7 @@ extends AbstractImagStoreService {
|
||||
result6.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result7 = new ImgPersonProGetResult();
|
||||
result7.setId("7");
|
||||
result7.setName("\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
result7.setName("门禁设备(离线)");
|
||||
result7.setCode("offlineDevices");
|
||||
result7.setStatus(Integer.valueOf(0));
|
||||
result7.setType(Short.valueOf((short)1));
|
||||
@@ -226,7 +226,7 @@ extends AbstractImagStoreService {
|
||||
result7.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result8 = new ImgPersonProGetResult();
|
||||
result8.setId("8");
|
||||
result8.setName("\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
result8.setName("派梯楼层权限");
|
||||
result8.setCode("floorNames");
|
||||
result8.setStatus(Integer.valueOf(0));
|
||||
result8.setType(Short.valueOf((short)1));
|
||||
@@ -241,44 +241,44 @@ extends AbstractImagStoreService {
|
||||
properties.add(result7);
|
||||
properties.add(result8);
|
||||
personProListResult.setProperties(properties);
|
||||
this.logger.info("\u5bfc\u51fa\u7684\u5b57\u6bb5\u5c5e\u6027\u4e3a\uff1a{}", JSONObject.toJSON(properties));
|
||||
this.logger.info("导出的字段属性为:{}", JSONObject.toJSON(properties));
|
||||
this.commonDownloadDataConfig.setExcelMaxRows(task.getExcelMaxRows());
|
||||
Path zipPath = new CommonAppExportFileByOrgHandler(task.getBusinessId(), this.fileName, task.getFileId(), dataMap, this.commonDownloadDataConfig, this.fileStorageManager, this.commonAppDownloadCenterService, personProListResult).process();
|
||||
int status = this.commonAppDownloadCenterService.queryDownloadStatus(task.getBusinessId(), task.getFileId());
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)task.getFileId());
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)task.getFileId());
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), zipPath.toString());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u673a\u6784\u4efb\u52a1\u5931\u8d25\uff1a{}", e);
|
||||
this.logger.error("导出机构任务失败:{}", e);
|
||||
this.commonAppDownloadCenterService.finishDownload(task.getBusinessId(), task.getFileId(), null, null, FileStatusEnum.ERROR.getCode());
|
||||
throw new RuntimeException("\u6267\u884c\u5bfc\u51fa\u673a\u6784\u4fe1\u606f\u4efb\u52a1\u5f02\u5e38");
|
||||
throw new RuntimeException("执行导出机构信息任务异常");
|
||||
}
|
||||
}
|
||||
|
||||
@Async
|
||||
public void executeLabel(ExportLabelTaskParam task, CloudwalkCallContext context) {
|
||||
this.logger.info("\u5f00\u59cb\u6267\u884c\u6807\u7b7e\u4fe1\u606f\u5bfc\u51fa\u529f\u80fd");
|
||||
this.logger.info("开始执行标签信息导出功能");
|
||||
PageLabelParam pageLabelParam = new PageLabelParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)pageLabelParam);
|
||||
try {
|
||||
CloudwalkResult<List<PageLabelResult>> recordList = this.getLabelData(pageLabelParam, context);
|
||||
if (CollectionUtils.isEmpty((Collection)((Collection)recordList.getData()))) {
|
||||
this.logger.info("\u67e5\u8be2\u5bfc\u51fa\u8bb0\u5f55\u4e3a\u7a7a, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.logger.info("查询导出记录为空, businessId = {}, task = {}", (Object)task.getBusinessId(), (Object)task);
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.logger.info("\u5bfc\u51fa\u8bb0\u5f55\u603b\u6570\u4e3a{}", (Object)((List)recordList.getData()).size());
|
||||
this.logger.info("导出记录总数为{}", (Object)((List)recordList.getData()).size());
|
||||
HashMap<String, List<PageLabelResult>> dataMap = new HashMap<String, List<PageLabelResult>>();
|
||||
dataMap.put(this.labelFileName, (List<PageLabelResult>)recordList.getData());
|
||||
PersonProListResult personProListResult = new PersonProListResult();
|
||||
ArrayList<ImgPersonProGetResult> properties = new ArrayList<ImgPersonProGetResult>();
|
||||
ImgPersonProGetResult result1 = new ImgPersonProGetResult();
|
||||
result1.setId("1");
|
||||
result1.setName("\u6807\u7b7e\u540d\u79f0");
|
||||
result1.setName("标签名称");
|
||||
result1.setCode("name");
|
||||
result1.setStatus(Integer.valueOf(0));
|
||||
result1.setType(Short.valueOf((short)1));
|
||||
@@ -286,7 +286,7 @@ extends AbstractImagStoreService {
|
||||
result1.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result2 = new ImgPersonProGetResult();
|
||||
result2.setId("2");
|
||||
result2.setName("\u6807\u7b7eid");
|
||||
result2.setName("标签id");
|
||||
result2.setCode("id");
|
||||
result2.setStatus(Integer.valueOf(0));
|
||||
result2.setType(Short.valueOf((short)1));
|
||||
@@ -294,7 +294,7 @@ extends AbstractImagStoreService {
|
||||
result2.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result3 = new ImgPersonProGetResult();
|
||||
result3.setId("3");
|
||||
result3.setName("\u6807\u7b7e\u7f16\u53f7");
|
||||
result3.setName("标签编号");
|
||||
result3.setCode("code");
|
||||
result3.setStatus(Integer.valueOf(0));
|
||||
result3.setType(Short.valueOf((short)1));
|
||||
@@ -302,7 +302,7 @@ extends AbstractImagStoreService {
|
||||
result3.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result4 = new ImgPersonProGetResult();
|
||||
result4.setId("4");
|
||||
result4.setName("\u4eba\u5458\u6570\u91cf");
|
||||
result4.setName("人员数量");
|
||||
result4.setCode("personCount");
|
||||
result4.setStatus(Integer.valueOf(0));
|
||||
result4.setType(Short.valueOf((short)1));
|
||||
@@ -310,7 +310,7 @@ extends AbstractImagStoreService {
|
||||
result4.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result5 = new ImgPersonProGetResult();
|
||||
result5.setId("5");
|
||||
result5.setName("\u6807\u7b7e\u7c7b\u578b\uff1a0-\u624b\u52a8\u521b\u5efa\uff0c1-\u5e94\u7528\u521d\u59cb\uff0c2-\u5e94\u7528\u521b\u5efa");
|
||||
result5.setName("标签类型:0-手动创建,1-应用初始,2-应用创建");
|
||||
result5.setCode("addType");
|
||||
result5.setStatus(Integer.valueOf(0));
|
||||
result5.setType(Short.valueOf((short)1));
|
||||
@@ -318,7 +318,7 @@ extends AbstractImagStoreService {
|
||||
result5.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result6 = new ImgPersonProGetResult();
|
||||
result6.setId("6");
|
||||
result6.setName("\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
result6.setName("门禁设备(在线)");
|
||||
result6.setCode("onlineDevices");
|
||||
result6.setStatus(Integer.valueOf(0));
|
||||
result6.setType(Short.valueOf((short)1));
|
||||
@@ -326,7 +326,7 @@ extends AbstractImagStoreService {
|
||||
result6.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result7 = new ImgPersonProGetResult();
|
||||
result7.setId("7");
|
||||
result7.setName("\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
result7.setName("门禁设备(离线)");
|
||||
result7.setCode("offlineDevices");
|
||||
result7.setStatus(Integer.valueOf(0));
|
||||
result7.setType(Short.valueOf((short)1));
|
||||
@@ -334,7 +334,7 @@ extends AbstractImagStoreService {
|
||||
result7.setHasDefault(Integer.valueOf(1));
|
||||
ImgPersonProGetResult result8 = new ImgPersonProGetResult();
|
||||
result8.setId("8");
|
||||
result8.setName("\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
result8.setName("派梯楼层权限");
|
||||
result8.setCode("floorNames");
|
||||
result8.setStatus(Integer.valueOf(0));
|
||||
result8.setType(Short.valueOf((short)1));
|
||||
@@ -349,21 +349,21 @@ extends AbstractImagStoreService {
|
||||
properties.add(result7);
|
||||
properties.add(result8);
|
||||
personProListResult.setProperties(properties);
|
||||
this.logger.info("\u5bfc\u51fa\u7684\u5b57\u6bb5\u5c5e\u6027\u4e3a\uff1a{}", JSONObject.toJSON(properties));
|
||||
this.logger.info("导出的字段属性为:{}", JSONObject.toJSON(properties));
|
||||
this.commonDownloadDataConfig.setExcelMaxRows(task.getExcelMaxRows());
|
||||
Path zipPath = new CommonAppExportFileByLabelHandler(task.getBusinessId(), this.fileName, task.getFileId(), dataMap, this.commonDownloadDataConfig, this.fileStorageManager, this.commonAppDownloadCenterService, personProListResult).process();
|
||||
int status = this.commonAppDownloadCenterService.queryDownloadStatus(task.getBusinessId(), task.getFileId());
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)task.getFileId());
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)task.getFileId());
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), null);
|
||||
return;
|
||||
}
|
||||
this.exportUpload(task.getBusinessId(), task.getFileId(), zipPath.toString());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u6807\u7b7e\u4efb\u52a1\u5931\u8d25\uff1a{}", e);
|
||||
this.logger.error("导出标签任务失败:{}", e);
|
||||
this.commonAppDownloadCenterService.finishDownload(task.getBusinessId(), task.getFileId(), null, null, FileStatusEnum.ERROR.getCode());
|
||||
throw new RuntimeException("\u6267\u884c\u5bfc\u51fa\u6807\u7b7e\u4fe1\u606f\u4efb\u52a1\u5f02\u5e38");
|
||||
throw new RuntimeException("执行导出标签信息任务异常");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ extends AbstractImagStoreService {
|
||||
recordList = this.imgStorePersonService.listByPage(queryImgPersonParam, cloudwalkCallContext);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bb0\u5f55\u6570\u636e\u5931\u8d25");
|
||||
this.logger.error("查询记录数据失败");
|
||||
}
|
||||
return recordList;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ extends AbstractImagStoreService {
|
||||
recordList = this.organizationService.listByPage(param, context);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u673a\u6784\u8bb0\u5f55\u6570\u636e\u5931\u8d25");
|
||||
this.logger.error("查询机构记录数据失败");
|
||||
}
|
||||
return recordList;
|
||||
}
|
||||
@@ -395,7 +395,7 @@ extends AbstractImagStoreService {
|
||||
recordList = this.labelService.listByPage(param, cloudwalkCallContext);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u6807\u7b7e\u8bb0\u5f55\u6570\u636e\u5931\u8d25");
|
||||
this.logger.error("查询标签记录数据失败");
|
||||
}
|
||||
return recordList;
|
||||
}
|
||||
@@ -410,11 +410,11 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5c06\u5bfc\u51fa\u6587\u4ef6\u751f\u6210\u7684zip\u4e0a\u4f20\u5230\u6587\u4ef6\u7ba1\u7406\u4e2d\u5fc3\u53d1\u751f\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("\u5c06\u5bfc\u51fa\u6587\u4ef6\u751f\u6210\u7684zip\u4e0a\u4f20\u5230\u6587\u4ef6\u7ba1\u7406\u4e2d\u5fc3\u53d1\u751f\u5f02\u5e38");
|
||||
this.logger.error("将导出文件生成的zip上传到文件管理中心发生异常:{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("将导出文件生成的zip上传到文件管理中心发生异常");
|
||||
}
|
||||
finally {
|
||||
this.logger.debug("\u5220\u9664\u538b\u7f29\u5305\uff1a{}", (Object)zipPathStr);
|
||||
this.logger.debug("删除压缩包:{}", (Object)zipPathStr);
|
||||
File file = new File(zipPathStr);
|
||||
if (file.exists()) {
|
||||
Files.delete(file.toPath());
|
||||
@@ -426,7 +426,7 @@ extends AbstractImagStoreService {
|
||||
String uuidCode = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
String name = new StringBuffer(uuidCode).append(this.commonDownloadDataConfig.getCompressionType()).toString();
|
||||
String filePath = this.commonAppStorageService.saveFileBySharding(name, data);
|
||||
this.logger.info("\u5b58\u50a8\u6587\u4ef6\u540d\uff1afileId = {}, filePath = {}", (Object)fileId, (Object)filePath);
|
||||
this.logger.info("存储文件名:fileId = {}, filePath = {}", (Object)fileId, (Object)filePath);
|
||||
int status = this.commonAppDownloadCenterService.queryDownloadStatus(businessId, fileId);
|
||||
if (status == FileStatusEnum.PRODUCING.getCode() || status == FileStatusEnum.ERROR.getCode()) {
|
||||
this.commonAppDownloadCenterService.finishDownload(businessId, fileId, filePath, Long.valueOf(fileSize), FileStatusEnum.FINISH.getCode());
|
||||
@@ -444,30 +444,30 @@ extends AbstractImagStoreService {
|
||||
String name = new StringBuffer(uuidCode).append(this.commonDownloadDataConfig.getCompressionType()).toString();
|
||||
FilePartInitResult resp = this.iCommonAppFileManageService.filePartInit(name);
|
||||
if (resp == null) {
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u521d\u59cb\u5316\u8fd4\u56de\u503c\u4e3a\u7a7a");
|
||||
this.logger.info("分片上传文件初始化返回值为空");
|
||||
return;
|
||||
}
|
||||
AtomicInteger i = new AtomicInteger(1);
|
||||
long fileSize = 0L;
|
||||
while (reader.read() != -1) {
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u7b2c{}\u6b21", (Object)i.get());
|
||||
this.logger.info("分片上传第{}次", (Object)i.get());
|
||||
fileSize += (long)reader.getArray().length;
|
||||
this.uploadFileBySharding(reader.getArray(), resp.getFilePath(), resp.getUploadId(), this.fileName, String.valueOf(i.getAndAdd(1)));
|
||||
}
|
||||
String filePath = this.filePartFinish(fileSize, resp);
|
||||
if (filePath == null) {
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u5b8c\u6210\u63a5\u53e3\u8fd4\u56de\u503c\u4e3a\u7a7a");
|
||||
this.logger.info("分片上传文件完成接口返回值为空");
|
||||
return;
|
||||
}
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u5b8c\u6210\u63a5\u53e3\u8fd4\u56de\u503c filePath = {}", (Object)filePath);
|
||||
this.logger.info("\u5b58\u50a8\u6587\u4ef6\u540d\uff1afileId = {}, filePath = {}", (Object)fileId, (Object)filePath);
|
||||
this.logger.info("分片上传文件完成接口返回值 filePath = {}", (Object)filePath);
|
||||
this.logger.info("存储文件名:fileId = {}, filePath = {}", (Object)fileId, (Object)filePath);
|
||||
int status = this.commonAppDownloadCenterService.queryDownloadStatus(businessId, fileId);
|
||||
if (status == FileStatusEnum.PRODUCING.getCode() || status == FileStatusEnum.ERROR.getCode()) {
|
||||
this.commonAppDownloadCenterService.finishDownload(businessId, fileId, filePath, Long.valueOf(fileSize), FileStatusEnum.FINISH.getCode());
|
||||
} else {
|
||||
this.commonAppStorageService.deleteFile(filePath);
|
||||
}
|
||||
this.logger.info("\u5b8c\u6210\u4e0a\u4f20\u4efb\u52a1 fileId = {}", (Object)fileId);
|
||||
this.logger.info("完成上传任务 fileId = {}", (Object)fileId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ extends AbstractImagStoreService {
|
||||
PartInitResultDTO partInitResultDTO = this.filePartManager.append(filePath, Integer.valueOf(partNumber), uploadId, mfile);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u7247\u66f4\u65b0\u6587\u4ef6\u9519\u8bef{}:{}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("分片更新文件错误{}:{}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -64,7 +64,7 @@ public class CommonAppExportFileByLabelHandler {
|
||||
IntStream.range(0, subCount).forEach(i -> {
|
||||
int status = this.iCommonAppDownloadCenterService.queryDownloadStatus(this.businessId, this.fileId);
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)this.fileId);
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)this.fileId);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -74,8 +74,8 @@ public class CommonAppExportFileByLabelHandler {
|
||||
CommonRecordExcelByLabelCreater.getCreater(v.subList(i * this.commonDownloadDataConfig.getExcelMaxRows(), endIndex), dirPath, index, this.personProListResult).createFile();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u521b\u5efaExcel\u6587\u4ef6\u5931\u8d25\uff1a{}", e);
|
||||
throw new RuntimeException("\u8bb0\u5f55\u751f\u6210Excel\u6587\u4ef6\u5f02\u5e38");
|
||||
this.logger.error("创建Excel文件失败:{}", e);
|
||||
throw new RuntimeException("记录生成Excel文件异常");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -89,7 +89,7 @@ public class CommonAppExportFileByLabelHandler {
|
||||
new ZipFile(zipFile).addFolder(new File(filePath));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u538b\u7f29\u4eba\u5458\u5bfc\u51fa\u6587\u4ef6,\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("压缩人员导出文件,执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -64,7 +64,7 @@ public class CommonAppExportFileByOrgHandler {
|
||||
IntStream.range(0, subCount).forEach(i -> {
|
||||
int status = this.iCommonAppDownloadCenterService.queryDownloadStatus(this.businessId, this.fileId);
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)this.fileId);
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)this.fileId);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -74,8 +74,8 @@ public class CommonAppExportFileByOrgHandler {
|
||||
CommonRecordExcelByOrgCreater.getCreater(v.subList(i * this.commonDownloadDataConfig.getExcelMaxRows(), endIndex), dirPath, index, this.personProListResult).createFile();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u521b\u5efaExcel\u6587\u4ef6\u5931\u8d25\uff1a{}", e);
|
||||
throw new RuntimeException("\u8bb0\u5f55\u751f\u6210Excel\u6587\u4ef6\u5f02\u5e38");
|
||||
this.logger.error("创建Excel文件失败:{}", e);
|
||||
throw new RuntimeException("记录生成Excel文件异常");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -89,7 +89,7 @@ public class CommonAppExportFileByOrgHandler {
|
||||
new ZipFile(zipFile).addFolder(new File(filePath));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u538b\u7f29\u4eba\u5458\u5bfc\u51fa\u6587\u4ef6,\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("压缩人员导出文件,执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -64,7 +64,7 @@ public class CommonAppExportFileHandler {
|
||||
IntStream.range(0, subCount).forEach(i -> {
|
||||
int status = this.iCommonAppDownloadCenterService.queryDownloadStatus(this.businessId, this.fileId);
|
||||
if (status > 1) {
|
||||
this.logger.info("\u4e0b\u8f7d\u4e2d\u5fc3\u5df2\u53d6\u6d88\u4e0b\u8f7d\u6587\u4ef6\uff0cfileId = {}", (Object)this.fileId);
|
||||
this.logger.info("下载中心已取消下载文件,fileId = {}", (Object)this.fileId);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -74,8 +74,8 @@ public class CommonAppExportFileHandler {
|
||||
CommonRecordExcelCreater.getCreater(v.subList(i * this.commonDownloadDataConfig.getExcelMaxRows(), endIndex), dirPath, index, this.fileStorageManager, this.personProListResult, this.commonDownloadDataConfig.getHasContainImage()).createFile();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u521b\u5efaExcel\u6587\u4ef6\u5931\u8d25\uff1a{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("\u8bb0\u5f55\u751f\u6210Excel\u6587\u4ef6\u5f02\u5e38");
|
||||
this.logger.error("创建Excel文件失败:{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("记录生成Excel文件异常");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -89,7 +89,7 @@ public class CommonAppExportFileHandler {
|
||||
new ZipFile(zipFile).addFolder(new File(filePath));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u538b\u7f29\u4eba\u5458\u5bfc\u51fa\u6587\u4ef6,\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("压缩人员导出文件,执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -24,14 +24,14 @@ extends CommonRecordExcelByLabelCreater {
|
||||
protected void createTitleRow() {
|
||||
XSSFRow titleRow = this.sheet.createRow(2);
|
||||
int columnNum = 0;
|
||||
this.createHeadCell(titleRow, columnNum, "\u6807\u7b7e\u540d\u79f0");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6807\u7b7eid");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6807\u7b7e\u7f16\u53f7");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u4eba\u5458\u6570\u91cf");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6807\u7b7e\u7c7b\u578b\uff1a0-\u624b\u52a8\u521b\u5efa\uff0c1-\u5e94\u7528\u521d\u59cb\uff0c2-\u5e94\u7528\u521b\u5efa");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
this.createHeadCell(titleRow, columnNum, "标签名称");
|
||||
this.createHeadCell(titleRow, ++columnNum, "标签id");
|
||||
this.createHeadCell(titleRow, ++columnNum, "标签编号");
|
||||
this.createHeadCell(titleRow, ++columnNum, "人员数量");
|
||||
this.createHeadCell(titleRow, ++columnNum, "标签类型:0-手动创建,1-应用初始,2-应用创建");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(在线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(离线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "派梯楼层权限");
|
||||
this.sheet.setColumnWidth(1, 5000);
|
||||
this.sheet.setColumnWidth(3, 4000);
|
||||
this.createInfoRow(columnNum);
|
||||
@@ -39,7 +39,7 @@ extends CommonRecordExcelByLabelCreater {
|
||||
|
||||
private void createInfoRow(int columnNum) {
|
||||
XSSFRow row0 = this.sheet.createRow(0);
|
||||
this.createHeadCell(row0, 0, "default-\u6807\u7b7e\u6279\u91cf\u5bfc\u51fa\u6a21\u677f");
|
||||
this.createHeadCell(row0, 0, "default-标签批量导出模板");
|
||||
CellRangeAddress region0 = new CellRangeAddress(0, 0, 0, columnNum);
|
||||
this.sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(1, 1, 0, columnNum);
|
||||
@@ -67,7 +67,7 @@ extends CommonRecordExcelByLabelCreater {
|
||||
row.createCell(7).setCellValue(commonRecord.getFloorNames());
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
this.logger.info("\u5bfc\u51faexcel\u603b\u8017\u65f6:{}", (Object)(end - start));
|
||||
this.logger.info("导出excel总耗时:{}", (Object)(end - start));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -24,14 +24,14 @@ extends CommonRecordExcelByOrgCreater {
|
||||
protected void createTitleRow() {
|
||||
XSSFRow titleRow = this.sheet.createRow(2);
|
||||
int columnNum = 0;
|
||||
this.createHeadCell(titleRow, columnNum, "\u673a\u6784\u540d\u79f0");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u673a\u6784id");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u673a\u6784\u7c7b\u578b");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u4eba\u5458\u6570\u91cf");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u72b6\u6001\uff1a0-\u5df2\u542f\u7528");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
this.createHeadCell(titleRow, columnNum, "机构名称");
|
||||
this.createHeadCell(titleRow, ++columnNum, "机构id");
|
||||
this.createHeadCell(titleRow, ++columnNum, "机构类型");
|
||||
this.createHeadCell(titleRow, ++columnNum, "人员数量");
|
||||
this.createHeadCell(titleRow, ++columnNum, "状态:0-已启用");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(在线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(离线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "派梯楼层权限");
|
||||
this.sheet.setColumnWidth(1, 5000);
|
||||
this.sheet.setColumnWidth(3, 4000);
|
||||
this.createInfoRow(columnNum);
|
||||
@@ -39,7 +39,7 @@ extends CommonRecordExcelByOrgCreater {
|
||||
|
||||
private void createInfoRow(int columnNum) {
|
||||
XSSFRow row0 = this.sheet.createRow(0);
|
||||
this.createHeadCell(row0, 0, "default-\u673a\u6784\u6279\u91cf\u5bfc\u51fa\u6a21\u677f");
|
||||
this.createHeadCell(row0, 0, "default-机构批量导出模板");
|
||||
CellRangeAddress region0 = new CellRangeAddress(0, 0, 0, columnNum);
|
||||
this.sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(1, 1, 0, columnNum);
|
||||
@@ -67,7 +67,7 @@ extends CommonRecordExcelByOrgCreater {
|
||||
row.createCell(7).setCellValue(commonRecord.getFloorNames());
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
this.logger.info("\u5bfc\u51faexcel\u603b\u8017\u65f6:{}", (Object)(end - start));
|
||||
this.logger.info("导出excel总耗时:{}", (Object)(end - start));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-19
@@ -47,21 +47,21 @@ extends CommonRecordExcelCreater {
|
||||
protected void createTitleRow() {
|
||||
XSSFRow titleRow = this.sheet.createRow(2);
|
||||
int columnNum = 0;
|
||||
this.createHeadCell(titleRow, columnNum, "\u59d3\u540d");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u7528\u6237\u540d");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u624b\u673a\u53f7");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u90ae\u7bb1");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u5de5\u53f7");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6240\u5c5e\u673a\u6784");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6240\u5c5e\u6807\u7b7e");
|
||||
this.createHeadCell(titleRow, ++columnNum, "IC\u5361\u53f7");
|
||||
this.createHeadCell(titleRow, ++columnNum, "IC\u5361\u7c7b\u578b");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u8bc6\u522b\u7167");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6b22\u8fce\u8bed");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u5c55\u793a\u7167");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u5728\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u95e8\u7981\u8bbe\u5907\uff08\u79bb\u7ebf\uff09");
|
||||
this.createHeadCell(titleRow, ++columnNum, "\u6d3e\u68af\u697c\u5c42\u6743\u9650");
|
||||
this.createHeadCell(titleRow, columnNum, "姓名");
|
||||
this.createHeadCell(titleRow, ++columnNum, "用户名");
|
||||
this.createHeadCell(titleRow, ++columnNum, "手机号");
|
||||
this.createHeadCell(titleRow, ++columnNum, "邮箱");
|
||||
this.createHeadCell(titleRow, ++columnNum, "工号");
|
||||
this.createHeadCell(titleRow, ++columnNum, "所属机构");
|
||||
this.createHeadCell(titleRow, ++columnNum, "所属标签");
|
||||
this.createHeadCell(titleRow, ++columnNum, "IC卡号");
|
||||
this.createHeadCell(titleRow, ++columnNum, "IC卡类型");
|
||||
this.createHeadCell(titleRow, ++columnNum, "识别照");
|
||||
this.createHeadCell(titleRow, ++columnNum, "欢迎语");
|
||||
this.createHeadCell(titleRow, ++columnNum, "展示照");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(在线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "门禁设备(离线)");
|
||||
this.createHeadCell(titleRow, ++columnNum, "派梯楼层权限");
|
||||
for (ImgPersonProGetResult imgPersonProGetResult : this.personProListResult.getProperties()) {
|
||||
if (!imgPersonProGetResult.getCode().contains("ext")) continue;
|
||||
this.createHeadCell(titleRow, ++columnNum, imgPersonProGetResult.getName());
|
||||
@@ -75,8 +75,8 @@ extends CommonRecordExcelCreater {
|
||||
private void createInfoRow(int columnNum) {
|
||||
XSSFRow row0 = this.sheet.createRow(0);
|
||||
XSSFRow row1 = this.sheet.createRow(1);
|
||||
this.createHeadCell(row0, 0, "default-\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u6a21\u677f");
|
||||
this.createHeadCell(row1, 0, "\u6ce8\uff1a\u6b64\u8868\u4e2d\u7684\u5c5e\u6027\u5b57\u6bb5\u7531\u7528\u6237\u5728\u4eba\u5458\u5c5e\u6027\u7ba1\u7406\u4e2d\u914d\u7f6e\u6309\u5e8f\u751f\u6210");
|
||||
this.createHeadCell(row0, 0, "default-人员批量导入模板");
|
||||
this.createHeadCell(row1, 0, "注:此表中的属性字段由用户在人员属性管理中配置按序生成");
|
||||
CellRangeAddress region0 = new CellRangeAddress(0, 0, 0, columnNum);
|
||||
this.sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(1, 1, 0, columnNum);
|
||||
@@ -289,7 +289,7 @@ extends CommonRecordExcelCreater {
|
||||
}
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
this.logger.info("\u5bfc\u51faexcel\u53ca\u56fe\u7247\u603b\u8017\u65f6:{}", (Object)(end - start));
|
||||
this.logger.info("导出excel及图片总耗时:{}", (Object)(end - start));
|
||||
}
|
||||
|
||||
private void downloadImage(String picturePath, String name, XSSFRow row, int columnIndex) {
|
||||
@@ -306,7 +306,7 @@ extends CommonRecordExcelCreater {
|
||||
}
|
||||
}
|
||||
catch (DavinciServiceException | IOException e) {
|
||||
this.logger.error("\u4eba\u5458\u5bfc\u51fa\u56fe\u7247,\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("人员导出图片,执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public abstract class CommonRecordExcelByLabelCreater<T> {
|
||||
this.wb.write(out);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u751f\u6210\u6587\u4ef6\u5931\u8d25", e);
|
||||
this.logger.error("生成文件失败", e);
|
||||
FolderUtil.deleteFolder(this.dirPath);
|
||||
throw e;
|
||||
}
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ public abstract class CommonRecordExcelByOrgCreater<T> {
|
||||
this.wb.write(out);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u751f\u6210\u6587\u4ef6\u5931\u8d25", e);
|
||||
this.logger.error("生成文件失败", e);
|
||||
FolderUtil.deleteFolder(this.dirPath);
|
||||
throw e;
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public abstract class CommonRecordExcelCreater<T> {
|
||||
this.wb.write(out);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u751f\u6210\u6587\u4ef6\u5931\u8d25", e);
|
||||
this.logger.error("生成文件失败", e);
|
||||
FolderUtil.deleteFolder(this.dirPath);
|
||||
throw e;
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ implements EventListener {
|
||||
this.logger.debug("receive enterpriseChangeEvent kafka message {}", (Object)enterpriseChangeEvent);
|
||||
((EnterpriseChangeHandler)ApplicationContextUtils.getBean(EnterpriseChangeHandler.class)).handler(enterpriseChangeEvent);
|
||||
} else {
|
||||
this.logger.info("\u4e0d\u80fd\u8bc6\u522b\u7684baseEvent\uff1a{}", (Object)baseEvent);
|
||||
this.logger.info("不能识别的baseEvent:{}", (Object)baseEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -120,10 +120,10 @@ public class BatchImportContext {
|
||||
ImgStorePersonProperties imgStorePersonProperties = new ImgStorePersonProperties();
|
||||
imgStorePersonProperties.setBusinessId(this.getBatchImport().getBusinessId());
|
||||
imgStorePersonProperties.setCode("sysAccountId");
|
||||
imgStorePersonProperties.setName("\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID");
|
||||
imgStorePersonProperties.setName("同步创建账号系统ID");
|
||||
imgStorePersonProperties.setHasRequired(ImageStoreConstants.AGREE);
|
||||
imgStorePersonProperties.setType(Short.valueOf((short)1));
|
||||
nameCodeMap.put("\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID", imgStorePersonProperties);
|
||||
nameCodeMap.put("同步创建账号系统ID", imgStorePersonProperties);
|
||||
this.nameCodeMap = nameCodeMap;
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -114,7 +114,7 @@ extends AbstractJob {
|
||||
QueryZoneForm queryZoneForm = new QueryZoneForm();
|
||||
queryZoneForm.setBusinessId(context.getBatchImport().getBusinessId());
|
||||
CloudwalkResult<List<ZoneResult>> zoneDetail = this.zoneFeignClient.findZonelist(queryZoneForm);
|
||||
logger.info("\u5f53\u524d\u697c\u5c42\u4fe1\u606fTask{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
logger.info("当前楼层信息Task{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
if ("00000000".equals(zoneDetail.getCode())) {
|
||||
List data = (List)zoneDetail.getData();
|
||||
context.setZoneMap(data);
|
||||
@@ -128,8 +128,8 @@ extends AbstractJob {
|
||||
for (int i = 0; i < endIndex; ++i) {
|
||||
Cell cell = titleRow.getCell(i);
|
||||
String value = cell.getStringCellValue();
|
||||
if (value.contains("\uff08")) {
|
||||
value = value.split("\uff08")[0];
|
||||
if (value.contains("(")) {
|
||||
value = value.split("(")[0];
|
||||
}
|
||||
nameIndexMap.put(i, value);
|
||||
}
|
||||
@@ -174,7 +174,7 @@ extends AbstractJob {
|
||||
private void parallelBatchAdd(final List<List<String>> batchRecordList, final BatchImportContext context, final String filePath) {
|
||||
try {
|
||||
BATCH_SEMAPHORE.acquire();
|
||||
logger.info("person import task concurrent number \uff1a{}", (Object)(3 - BATCH_SEMAPHORE.availablePermits()));
|
||||
logger.info("person import task concurrent number :{}", (Object)(3 - BATCH_SEMAPHORE.availablePermits()));
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
logger.error("", e);
|
||||
@@ -245,7 +245,7 @@ extends AbstractJob {
|
||||
this.cleanFiles(batchImportContext);
|
||||
long cleanSpendTime = System.currentTimeMillis() - cleanStartTime;
|
||||
long processSpendTime = System.currentTimeMillis() - unzipStartTime;
|
||||
remark = String.format("\u5bfc\u5165\u5b8c\u6210\uff0c\u5bfc\u5165\u6210\u529f[%s]\u6761\uff0c\u5931\u8d25[%s]\u6761\uff0c\u603b\u8017\u65f6[%s]\uff0c\u89e3\u538b\u8017\u65f6[%s], \u7edf\u8ba1\u603b\u6570\u8017\u65f6[%s]\uff0c\u56fe\u7247\u590d\u5236\u8017\u65f6[%s]\uff0c\u6570\u636e\u63d2\u5165\u8017\u65f6[%s], \u6e05\u7406\u6587\u4ef6\u8017\u65f6[%s]", batchImportContext.getSuccessCount(), batchImportContext.getFailCount(), PersonBatchImportTask.convertTime(processSpendTime), PersonBatchImportTask.convertTime(unzipSpendTime), PersonBatchImportTask.convertTime(calculateSpendTime), PersonBatchImportTask.convertTime(batchImportContext.getImageCopyTime().get() / (long)this.taskExecutor.getMaxPoolSize()), PersonBatchImportTask.convertTime(batchImportContext.getInsertTime().get() / (long)this.taskExecutor.getMaxPoolSize()), PersonBatchImportTask.convertTime(cleanSpendTime));
|
||||
remark = String.format("导入完成,导入成功[%s]条,失败[%s]条,总耗时[%s],解压耗时[%s], 统计总数耗时[%s],图片复制耗时[%s],数据插入耗时[%s], 清理文件耗时[%s]", batchImportContext.getSuccessCount(), batchImportContext.getFailCount(), PersonBatchImportTask.convertTime(processSpendTime), PersonBatchImportTask.convertTime(unzipSpendTime), PersonBatchImportTask.convertTime(calculateSpendTime), PersonBatchImportTask.convertTime(batchImportContext.getImageCopyTime().get() / (long)this.taskExecutor.getMaxPoolSize()), PersonBatchImportTask.convertTime(batchImportContext.getInsertTime().get() / (long)this.taskExecutor.getMaxPoolSize()), PersonBatchImportTask.convertTime(cleanSpendTime));
|
||||
BatchImport batchImport = this.personBatchImportMapper.selectById(batchImportRecord.getId());
|
||||
this.updateBatchImportRecord(ImportStatus.COMPLETE, remark, batchImportRecord.getId(), batchImport.getTotalCount());
|
||||
}
|
||||
@@ -257,7 +257,7 @@ extends AbstractJob {
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
if (batchImportRecord != null) {
|
||||
this.updateBatchImportRecord(ImportStatus.EXCEPTION, "\u5bfc\u5165\u4efb\u52a1\u5f02\u5e38\u7ec8\u6b62", batchImportRecord.getId(), null);
|
||||
this.updateBatchImportRecord(ImportStatus.EXCEPTION, "导入任务异常终止", batchImportRecord.getId(), null);
|
||||
}
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
@@ -314,7 +314,7 @@ extends AbstractJob {
|
||||
}
|
||||
}
|
||||
catch (IOException | InvalidFormatException e) {
|
||||
logger.warn("\u5f53\u524d\u6587\u4ef6\u7edf\u8ba1\u603b\u8bb0\u5f55\u6570\u5f02\u5e38\uff0c\u6587\u4ef6\u540d\uff1a{},\u6587\u4ef6\u8def\u5f84\uff1a{}", (Object)file.getName(), (Object)file.getPath());
|
||||
logger.warn("当前文件统计总记录数异常,文件名:{},文件路径:{}", (Object)file.getName(), (Object)file.getPath());
|
||||
}
|
||||
}
|
||||
return totalCount;
|
||||
@@ -357,7 +357,7 @@ extends AbstractJob {
|
||||
String unzipPath = PathUtils.joinPaths(this.tempPath, "temp", CloudwalkDateUtils.getUUID());
|
||||
unzipFolder = new File(unzipPath);
|
||||
unzipFolder.mkdirs();
|
||||
logger.info("\u89e3\u538b\u524d\u6587\u4ef6\u8def\u5f84:{}\uff0c\u89e3\u538b\u540e\u6587\u4ef6\u8def\u5f84:{}\uff0c\u7f16\u7801\u65b9\u5f0f:{}", new Object[]{file.getPath(), unzipFolder.getPath(), "utf-8"});
|
||||
logger.info("解压前文件路径:{},解压后文件路径:{},编码方式:{}", new Object[]{file.getPath(), unzipFolder.getPath(), "utf-8"});
|
||||
String commandLine = String.format("unzip -q -O %s %s -d %s", "GBK", file.getPath(), unzipFolder.getPath());
|
||||
ProcessBuilder processBuilder = new ProcessBuilder("/bin/sh", "-c", commandLine);
|
||||
processBuilder.redirectErrorStream(true);
|
||||
@@ -368,7 +368,7 @@ extends AbstractJob {
|
||||
}
|
||||
int result = process.waitFor();
|
||||
if (result == 1 || result == 2) {
|
||||
logger.warn("---unzip \u8fdb\u7a0b\u9000\u51fa\u7801\uff1a{}", (Object)result);
|
||||
logger.warn("---unzip 进程退出码:{}", (Object)result);
|
||||
}
|
||||
if (result != 0 && result != 1 && result != 2) {
|
||||
throw new ImageStoreException("53014038", this.getMessage("53014038"));
|
||||
@@ -409,10 +409,10 @@ extends AbstractJob {
|
||||
logger.error("exception:{}", (Object)ignored.getMessage());
|
||||
}
|
||||
if (outputResult.contains("-O")) {
|
||||
logger.info("\u652f\u6301unzip\u89e3\u538b\uff0c\u4f7f\u7528unzip\u8fdb\u884c\u89e3\u538b");
|
||||
logger.info("支持unzip解压,使用unzip进行解压");
|
||||
return true;
|
||||
}
|
||||
logger.warn("\u4e0d\u652f\u6301unzip\u89e3\u538b\uff0c\u8bf7\u5347\u7ea7\u81f3\u6700\u65b0unzip");
|
||||
logger.warn("不支持unzip解压,请升级至最新unzip");
|
||||
}
|
||||
catch (IOException | InterruptedException e) {
|
||||
logger.error(e.getMessage());
|
||||
@@ -455,26 +455,26 @@ extends AbstractJob {
|
||||
long milliSeconds = executeTime % ms;
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (days != 0L) {
|
||||
builder.append(days).append("\u5929");
|
||||
builder.append(days).append("天");
|
||||
}
|
||||
if (hours != 0L) {
|
||||
builder.append(hours).append("\u5c0f\u65f6");
|
||||
builder.append(hours).append("小时");
|
||||
}
|
||||
if (minutes != 0L) {
|
||||
builder.append(minutes).append("\u5206");
|
||||
builder.append(minutes).append("分");
|
||||
}
|
||||
if (seconds != 0L) {
|
||||
builder.append(seconds).append("\u79d2");
|
||||
builder.append(seconds).append("秒");
|
||||
}
|
||||
if (builder.length() < 1) {
|
||||
builder.append(milliSeconds).append("\u6beb\u79d2");
|
||||
builder.append(milliSeconds).append("毫秒");
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
private void updateBatchImportRecord(ImportStatus status, String remark, String id, Long currentCount) {
|
||||
try {
|
||||
logger.info("\u8bbe\u7f6e\u5f53\u524d\u4efb\u52a1[{}]\u72b6\u6001\u4e3a[{}]", (Object)id, (Object)status);
|
||||
logger.info("设置当前任务[{}]状态为[{}]", (Object)id, (Object)status);
|
||||
BatchImport bi = new BatchImport();
|
||||
bi.setId(id);
|
||||
bi.setStatus(status.value());
|
||||
|
||||
+7
-7
@@ -46,8 +46,8 @@ implements CommandLineRunner {
|
||||
|
||||
private void initBatchPersonImportTask() {
|
||||
TaskModifyParam taskModifyParam = new TaskModifyParam();
|
||||
taskModifyParam.setJobDescription("\u89e3\u6790\u4eba\u5458\u7ba1\u7406\u9875\u9762\u4e0a\u4f20\u7684\u6279\u91cf\u5bfc\u5165\u6587\u4ef6\uff0c\u5bfc\u5165\u4eba\u5458\u6570\u636e");
|
||||
taskModifyParam.setJobName("\u901a\u7528\u4eba\u5458\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u5b9a\u65f6\u4efb\u52a1");
|
||||
taskModifyParam.setJobDescription("解析人员管理页面上传的批量导入文件,导入人员数据");
|
||||
taskModifyParam.setJobName("通用人员人员批量导入定时任务");
|
||||
taskModifyParam.setJobGroup(BATCH_PERSON_IMPORT_JOB);
|
||||
taskModifyParam.setClazz(PersonBatchImportTask.class);
|
||||
taskModifyParam.setRetry(Boolean.valueOf(false));
|
||||
@@ -64,21 +64,21 @@ implements CommandLineRunner {
|
||||
JobKey jobKey = new JobKey("PERSON_VALIDATE_JOB_NAME", "QZ_PERSON_VALIDATE_JOB");
|
||||
boolean exist = scheduler.checkExists(jobKey);
|
||||
if (exist) {
|
||||
log.info("{},{}:\u5df2\u5b58\u5728", (Object)"PERSON_VALIDATE_JOB_NAME", (Object)"QZ_PERSON_VALIDATE_JOB");
|
||||
log.info("{},{}:已存在", (Object)"PERSON_VALIDATE_JOB_NAME", (Object)"QZ_PERSON_VALIDATE_JOB");
|
||||
return;
|
||||
}
|
||||
JobDetail jobDetail = JobBuilder.newJob(PersonValidateTask.class).withIdentity("PERSON_VALIDATE_JOB_NAME", "QZ_PERSON_VALIDATE_JOB").storeDurably().withDescription("\u4eba\u5458\u6709\u6548\u671f\u540c\u6b65\u4e0b\u53d1\u4efb\u52a1").build();
|
||||
JobDetail jobDetail = JobBuilder.newJob(PersonValidateTask.class).withIdentity("PERSON_VALIDATE_JOB_NAME", "QZ_PERSON_VALIDATE_JOB").storeDurably().withDescription("人员有效期同步下发任务").build();
|
||||
scheduler.addJob(jobDetail, false);
|
||||
}
|
||||
catch (SchedulerException e) {
|
||||
log.error("\u521b\u5efajob\u5931\u8d25:{}", (Object)e.getLocalizedMessage());
|
||||
log.error("创建job失败:{}", (Object)e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void initDelayPersonValidateTask() {
|
||||
TaskModifyParam taskModifyParam = new TaskModifyParam();
|
||||
taskModifyParam.setJobDescription("\u5ef6\u8fdf\u5904\u7406\u4eba\u5458\u6709\u6548\u671f\u4efb\u52a1");
|
||||
taskModifyParam.setJobName("\u5ef6\u8fdf\u5904\u7406\u4eba\u5458\u6709\u6548\u671f\u4efb\u52a1");
|
||||
taskModifyParam.setJobDescription("延迟处理人员有效期任务");
|
||||
taskModifyParam.setJobName("延迟处理人员有效期任务");
|
||||
taskModifyParam.setJobGroup("CP_DELAY_HANDLE_VALIDATE");
|
||||
taskModifyParam.setClazz(DelayPersonValidateTask.class);
|
||||
taskModifyParam.setRetry(Boolean.valueOf(false));
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ implements AreaService {
|
||||
area.setBusinessId(businessId);
|
||||
area.setTypeId(areaType.getId());
|
||||
area.setIsDel(Short.valueOf((short)0));
|
||||
area.setName("\u9ed8\u8ba4\u6839\u8282\u70b9");
|
||||
area.setName("默认根节点");
|
||||
area.setId(CloudwalkDateUtils.getUUID());
|
||||
area.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
area.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ implements AreaTypeService {
|
||||
return CloudwalkResult.success((Object)pageAble);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u533a\u57df\u7c7b\u578b\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询区域类型信息失败,原因:", e);
|
||||
throw new ServiceException("53004804", this.getMessage("53004804"));
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -91,22 +91,22 @@ implements IPersonRegistryHandler {
|
||||
|
||||
private CloudwalkResult<Boolean> validateParams(AddPersonRegistryParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
if (Objects.equals(param.getDeviceStatus(), StatusEnum.CLOSE.getValue()) && StringUtils.isBlank((CharSequence)param.getOrganizationIds()) && StringUtils.isBlank((CharSequence)param.getLabelIds())) {
|
||||
this.logger.warn("\u4eba\u8bc1\u6ce8\u518c\u5ba1\u6838\u5173\u95ed,\u6ce8\u518c\u9ed8\u8ba4\u7ec4\u7ec7/\u6ce8\u518c\u9ed8\u8ba4\u6807\u7b7e\u9700\u8981\u4e8c\u9009\u4e00,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("人证注册审核关闭,注册默认组织/注册默认标签需要二选一,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014529", (String)this.getMessage("53014529"));
|
||||
}
|
||||
if (CollectionUtils.isEmpty((Collection)param.getPropertyList())) {
|
||||
this.logger.warn("\u8eab\u4efd\u8bc1\u5c5e\u6027\u672a\u8bbe\u7f6e,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("身份证属性未设置,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014525", (String)this.getMessage("53014525"));
|
||||
}
|
||||
Optional<BindPropertyParam> optionalCardId = param.getPropertyList().stream().filter(propertyParam -> Objects.equals(propertyParam.getProperty(), CertPropertyEnum.CARD_ID.getValue())).findFirst();
|
||||
if (!optionalCardId.isPresent() || optionalCardId.isPresent() && StringUtils.isBlank((CharSequence)optionalCardId.get().getBindPropertyId())) {
|
||||
this.logger.warn("\u8eab\u4efd\u8bc1\u53f7\u672a\u9009\u62e9\u5173\u8054\u5c5e\u6027,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("身份证号未选择关联属性,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014526", (String)this.getMessage("53014526"));
|
||||
}
|
||||
Optional<BindPropertyParam> optionalName = param.getPropertyList().stream().filter(propertyParam -> Objects.equals(propertyParam.getProperty(), CertPropertyEnum.NAME.getValue())).findFirst();
|
||||
if (optionalName.isPresent()) {
|
||||
if (StringUtils.isBlank((CharSequence)optionalName.get().getBindPropertyId())) {
|
||||
this.logger.warn("\u59d3\u540d\u672a\u6b63\u786e\u5173\u8054\u5c5e\u6027,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("姓名未正确关联属性,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014527", (String)this.getMessage("53014527"));
|
||||
}
|
||||
ImgStorePersonProperties queryPersonPro = new ImgStorePersonProperties();
|
||||
@@ -115,7 +115,7 @@ implements IPersonRegistryHandler {
|
||||
queryPersonPro.setId(optionalName.get().getBindPropertyId());
|
||||
List personPropertyList = this.imgStorePersonPropertiesMapper.select(queryPersonPro);
|
||||
if (CollectionUtils.isEmpty((Collection)personPropertyList) || !Objects.equals(((ImgStorePersonProperties)personPropertyList.get(0)).getCode(), "name")) {
|
||||
this.logger.warn("\u59d3\u540d\u672a\u6b63\u786e\u5173\u8054\u5c5e\u6027,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("姓名未正确关联属性,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014527", (String)this.getMessage("53014527"));
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ implements IPersonRegistryHandler {
|
||||
bindPropertySet.add(propertyParam.getBindPropertyId());
|
||||
});
|
||||
if (propertySet.size() < param.getPropertyList().size() || bindPropertySet.size() < param.getPropertyList().size()) {
|
||||
this.logger.warn("\u8eab\u4efd\u8bc1\u5c5e\u6027\u548c\u4eba\u5458\u5c5e\u6027\u4e3a\u4e00\u5bf9\u4e00\u5173\u7cfb\uff0c\u4e0d\u80fd\u4e00\u5bf9\u591a,\u8eab\u4efd\u8bc1\u5c5e\u6027:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
this.logger.warn("身份证属性和人员属性为一对一关系,不能一对多,身份证属性:[{}]", (Object)JSON.toJSONString((Object)param.getPropertyList()));
|
||||
return CloudwalkResult.fail((String)"53014528", (String)this.getMessage("53014528"));
|
||||
}
|
||||
this.commonPersonRegistryService.validateOrg(param);
|
||||
|
||||
+11
-11
@@ -48,8 +48,8 @@ implements ICommonAppDownloadCenterService {
|
||||
return this.fileInit(cloudwalkCallContext, fileName);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u521d\u59cb\u5316\u63a5\u53e3\u9519\u8bef", (Object)e.getMessage());
|
||||
throw new RuntimeException("\u4e0b\u8f7d\u4efb\u52a1\u521b\u5efa\u5931\u8d25");
|
||||
log.error("下载任务初始化接口错误", (Object)e.getMessage());
|
||||
throw new RuntimeException("下载任务创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,18 +58,18 @@ implements ICommonAppDownloadCenterService {
|
||||
fileInitParam.setFileName(fileName);
|
||||
fileInitParam.setApplicationId(cloudwalkCallContext.getApplicationId());
|
||||
cloudwalkCallContext.setCallTime(CloudwalkDateUtils.getCurrentDate());
|
||||
log.info("\u521b\u5efa\u4e0b\u8f7d\u4efb\u52a1 context\uff1a{}", (Object)JsonUtils.toJson(cloudwalkCallContext));
|
||||
log.info("创建下载任务 context:{}", (Object)JsonUtils.toJson(cloudwalkCallContext));
|
||||
try {
|
||||
CloudwalkResult<String> result = this.messageCenterFeignClient.initFile(fileInitParam, cloudwalkCallContext.getCompany().getCompanyId(), cloudwalkCallContext.getUser().getCaller());
|
||||
if ("00000000".equals(result.getCode())) {
|
||||
return (String)result.getData();
|
||||
}
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u521b\u5efa\u5931\u8d25,code={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
throw new RuntimeException("\u4e0b\u8f7d\u4efb\u52a1\u521b\u5efa\u5931\u8d25");
|
||||
log.error("下载任务创建失败,code={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
throw new RuntimeException("下载任务创建失败");
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u521d\u59cb\u5316\u5931\u8d25\uff1a{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("\u4e0b\u8f7d\u4efb\u52a1\u521b\u5efa\u5931\u8d25");
|
||||
log.error("下载任务初始化失败:{}", (Object)e.getMessage());
|
||||
throw new RuntimeException("下载任务创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,10 +102,10 @@ implements ICommonAppDownloadCenterService {
|
||||
if ("00000000".equals(result.getCode())) {
|
||||
return true;
|
||||
}
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u521d\u59cb\u5316\u5931\u8d25\uff1acode={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
log.error("下载任务初始化失败:code={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u5b8c\u6210\u63a5\u53e3\u9519\u8bef", (Object)e.getMessage());
|
||||
log.error("下载任务完成接口错误", (Object)e.getMessage());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -120,10 +120,10 @@ implements ICommonAppDownloadCenterService {
|
||||
if ("00000000".equals(result.getCode())) {
|
||||
return ((FileResult)result.getData()).getStatus();
|
||||
}
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u521d\u59cb\u5316\u5931\u8d25\uff1acode={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
log.error("下载任务初始化失败:code={},message={}", (Object)result.getCode(), (Object)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
log.error("\u4e0b\u8f7d\u4efb\u52a1\u5b8c\u6210\u63a5\u53e3\u9519\u8bef", (Object)e.getMessage());
|
||||
log.error("下载任务完成接口错误", (Object)e.getMessage());
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
+6
-6
@@ -37,13 +37,13 @@ implements ICommonAppExportTaskService {
|
||||
private CommonDownloadDataConfig commonAppRecordDataConfig;
|
||||
@Autowired
|
||||
private ComponentInnerKafkaConfig componentInnerKafkaConfig;
|
||||
String fileName = "\u4eba\u5458\u4fe1\u606f";
|
||||
String orgFileName = "\u673a\u6784\u4fe1\u606f";
|
||||
String labelFileName = "\u6807\u7b7e\u4fe1\u606f";
|
||||
String fileName = "人员信息";
|
||||
String orgFileName = "机构信息";
|
||||
String labelFileName = "标签信息";
|
||||
|
||||
public String add(CloudwalkCallContext cloudwalkCallContext, ExportRecordTaskParam task) throws ServiceException {
|
||||
String name = this.createFileName(this.fileName);
|
||||
this.logger.info("\u521b\u5efa\u4e0b\u8f7d\u4efb\u52a1\uff0c\u4efb\u52a1\u6587\u4ef6\u540d\u79f0\uff1aname = {}", (Object)name);
|
||||
this.logger.info("创建下载任务,任务文件名称:name = {}", (Object)name);
|
||||
this.updateCloudwalkContext(cloudwalkCallContext, task);
|
||||
String fileId = this.commonAppDownloadCenterService.createDownload(cloudwalkCallContext, name, task.getBusinessId());
|
||||
task.setFileId(fileId);
|
||||
@@ -54,7 +54,7 @@ implements ICommonAppExportTaskService {
|
||||
|
||||
public String addOrgExport(CloudwalkCallContext context, ExportOrgTaskParam task) throws ServiceException {
|
||||
String name = this.createFileName(this.orgFileName);
|
||||
this.logger.info("\u521b\u5efa\u4e0b\u8f7d\u4efb\u52a1\uff0c\u4efb\u52a1\u6587\u4ef6\u540d\u79f0\uff1aname = {}", (Object)name);
|
||||
this.logger.info("创建下载任务,任务文件名称:name = {}", (Object)name);
|
||||
ExportRecordTaskParam taskParam = new ExportRecordTaskParam();
|
||||
taskParam.setBusinessId(task.getBusinessId());
|
||||
this.updateCloudwalkContext(context, taskParam);
|
||||
@@ -67,7 +67,7 @@ implements ICommonAppExportTaskService {
|
||||
|
||||
public String addLabelExport(CloudwalkCallContext context, ExportLabelTaskParam task) throws ServiceException {
|
||||
String name = this.createFileName(this.labelFileName);
|
||||
this.logger.info("\u521b\u5efa\u4e0b\u8f7d\u4efb\u52a1\uff0c\u4efb\u52a1\u6587\u4ef6\u540d\u79f0\uff1aname = {}", (Object)name);
|
||||
this.logger.info("创建下载任务,任务文件名称:name = {}", (Object)name);
|
||||
ExportRecordTaskParam taskParam = new ExportRecordTaskParam();
|
||||
taskParam.setBusinessId(task.getBusinessId());
|
||||
this.updateCloudwalkContext(context, taskParam);
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ implements ICommonAppFileManageService {
|
||||
partInitResultDTO = this.filePartManager.init(dto);
|
||||
}
|
||||
catch (DavinciServiceException e) {
|
||||
log.error("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u521d\u59cb\u5316\u63a5\u53e3\u9519\u8bef request = {}", (Object)fileName);
|
||||
log.error("分片上传文件初始化接口错误 request = {}", (Object)fileName);
|
||||
}
|
||||
BeanUtils.copyProperties((Object)partInitResultDTO, (Object)result);
|
||||
return result;
|
||||
@@ -51,7 +51,7 @@ implements ICommonAppFileManageService {
|
||||
return this.filePartManager.finish(partFinishDTO);
|
||||
}
|
||||
catch (DavinciServiceException e) {
|
||||
log.error("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u5b8c\u6210\u63a5\u53e3\u9519\u8bef{}:{}", (Object)((Object)((Object)e)).getClass().getName(), (Object)e.getMessage());
|
||||
log.error("分片上传文件完成接口错误{}:{}", (Object)((Object)((Object)e)).getClass().getName(), (Object)e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -54,7 +54,7 @@ implements ICommonStorageService {
|
||||
return this.fileStorageManager.fileUpload(mfile);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4e0a\u4f20\u6587\u4ef6\u9519\u8bef request = {}", (Object)mfile);
|
||||
this.logger.error("上传文件错误 request = {}", (Object)mfile);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ implements ICommonStorageService {
|
||||
this.fileStorageManager.remove(fileRemoveDTO);
|
||||
}
|
||||
catch (DavinciServiceException e) {
|
||||
this.logger.error("\u5220\u9664\u6587\u4ef6\u5931\u8d25 request = {}", (Object)fileRemoveDTO);
|
||||
this.logger.error("删除文件失败 request = {}", (Object)fileRemoveDTO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ implements ICommonStorageService {
|
||||
public String saveFileBySharding(String fileName, byte[] bytes) {
|
||||
FilePartInitResult resp = this.iCommonAppFileManageService.filePartInit(fileName);
|
||||
if (resp == null) {
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u521d\u59cb\u5316\u8fd4\u56de\u503c\u4e3a\u7a7a");
|
||||
this.logger.info("分片上传文件初始化返回值为空");
|
||||
return null;
|
||||
}
|
||||
int byteSize = bytes.length;
|
||||
@@ -106,10 +106,10 @@ implements ICommonStorageService {
|
||||
}
|
||||
String filePath = this.filePartFinish(bytes, resp);
|
||||
if (filePath == null) {
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u5b8c\u6210\u63a5\u53e3\u8fd4\u56de\u503c\u4e3a\u7a7a");
|
||||
this.logger.info("分片上传文件完成接口返回值为空");
|
||||
return null;
|
||||
}
|
||||
this.logger.info("\u5206\u7247\u4e0a\u4f20\u6587\u4ef6\u5b8c\u6210\u63a5\u53e3\u8fd4\u56de\u503c filePath = {}", (Object)filePath);
|
||||
this.logger.info("分片上传文件完成接口返回值 filePath = {}", (Object)filePath);
|
||||
return filePath;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ implements ICommonStorageService {
|
||||
PartInitResultDTO partInitResultDTO = this.filePartManager.append(filePath, Integer.valueOf(partNumber), uploadId, mfile);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u7247\u66f4\u65b0\u6587\u4ef6\u9519\u8bef{}:{}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("分片更新文件错误{}:{}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -86,7 +86,7 @@ extends AbstractImagStoreService {
|
||||
queryPersonRegistry.setType(type);
|
||||
List personRegistryList = this.personRegistryMapper.selectByCondition(queryPersonRegistry);
|
||||
if (CollectionUtils.isEmpty((Collection)personRegistryList)) {
|
||||
this.logger.warn("\u8be5\u79df\u6237\u4e0d\u5b58\u5728\u4eba\u5458\u6ce8\u518c\u914d\u7f6e,\u79df\u6237ID:[{}]", (Object)businessId);
|
||||
this.logger.warn("该租户不存在人员注册配置,租户ID:[{}]", (Object)businessId);
|
||||
throw new ServiceException("53014517", this.getMessage("53014517"));
|
||||
}
|
||||
return CloudwalkResult.success(personRegistryList.get(0));
|
||||
@@ -101,7 +101,7 @@ extends AbstractImagStoreService {
|
||||
personRegistry.setLastUpdateUserId(context.getUser().getCaller());
|
||||
int result = this.personRegistryMapper.insertSelective(personRegistry);
|
||||
if (result == 0) {
|
||||
this.logger.warn("\u65b0\u589e\u4eba\u5458\u6ce8\u518c\u914d\u7f6e\u5931\u8d25,\u4eba\u5458\u6ce8\u518c\u914d\u7f6e:[{}]", (Object)JSONObject.toJSONString((Object)personRegistry));
|
||||
this.logger.warn("新增人员注册配置失败,人员注册配置:[{}]", (Object)JSONObject.toJSONString((Object)personRegistry));
|
||||
throw new ServiceException("53014515", this.getMessage("53014515"));
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ extends AbstractImagStoreService {
|
||||
personRegistry.setLastUpdateUserId(context.getUser().getCaller());
|
||||
int result = this.personRegistryMapper.updateByPrimaryKeySelective(personRegistry);
|
||||
if (result == 0) {
|
||||
this.logger.warn("\u4fee\u6539\u4eba\u5458\u6ce8\u518c\u914d\u7f6e\u5931\u8d25,\u4eba\u5458\u6ce8\u518c\u914d\u7f6e:[{}]", (Object)JSONObject.toJSONString((Object)personRegistry));
|
||||
this.logger.warn("修改人员注册配置失败,人员注册配置:[{}]", (Object)JSONObject.toJSONString((Object)personRegistry));
|
||||
throw new ServiceException("53014516", this.getMessage("53014516"));
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ extends AbstractImagStoreService {
|
||||
public void validateOrg(AddPersonRegistryParam param) throws ServiceException {
|
||||
List dbOrganizationList;
|
||||
if (StringUtils.isNotBlank((CharSequence)param.getOrganizationIds()) && (CollectionUtils.isEmpty((Collection)(dbOrganizationList = this.imgStoreOrganizationMapper.getOrgByIds(Arrays.asList(param.getOrganizationIds().split(",")), param.getBusinessId()))) || dbOrganizationList.size() != param.getOrganizationIds().split(",").length)) {
|
||||
this.logger.warn("\u6ce8\u518c\u9ed8\u8ba4\u7ec4\u7ec7\u4e0d\u5c5e\u4e8e\u8be5\u79df\u6237,\u6ce8\u518c\u9ed8\u8ba4\u7ec4\u7ec7\u5217\u8868:[{}]", (Object)param.getOrganizationIds());
|
||||
this.logger.warn("注册默认组织不属于该租户,注册默认组织列表:[{}]", (Object)param.getOrganizationIds());
|
||||
throw new ServiceException("53014512", this.getMessage("53014512"));
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ extends AbstractImagStoreService {
|
||||
public void validateLabel(AddPersonRegistryParam param) throws ServiceException {
|
||||
List dbLabelList;
|
||||
if (StringUtils.isNotBlank((CharSequence)param.getLabelIds()) && (CollectionUtils.isEmpty((Collection)(dbLabelList = this.imgStoreLabelMapper.selectByIds(param.getBusinessId(), Arrays.asList(param.getLabelIds().split(","))))) || dbLabelList.size() != param.getLabelIds().split(",").length)) {
|
||||
this.logger.warn("\u6ce8\u518c\u9ed8\u8ba4\u6807\u7b7e\u4e0d\u5c5e\u4e8e\u8be5\u79df\u6237,\u6ce8\u518c\u9ed8\u8ba4\u6807\u7b7e\u5217\u8868:[{}]", (Object)param.getLabelIds());
|
||||
this.logger.warn("注册默认标签不属于该租户,注册默认标签列表:[{}]", (Object)param.getLabelIds());
|
||||
throw new ServiceException("53014513", this.getMessage("53014513"));
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ extends AbstractImagStoreService {
|
||||
coreDeviceQueryParam.setDeviceCodes(param.getDeviceCodeList());
|
||||
CloudwalkResult deviceGetResult = this.atomicDeviceService.list(coreDeviceQueryParam, context);
|
||||
if (CollectionUtils.isEmpty((Collection)((Collection)deviceGetResult.getData())) || ((List)deviceGetResult.getData()).size() != param.getDeviceCodeList().size()) {
|
||||
this.logger.warn("\u8bbe\u5907\u4e0d\u5c5e\u4e8e\u8be5\u79df\u6237,\u8bbe\u5907\u5217\u8868:[{}]", (Object)param.getDeviceCodeList());
|
||||
this.logger.warn("设备不属于该租户,设备列表:[{}]", (Object)param.getDeviceCodeList());
|
||||
throw new ServiceException("53014514", this.getMessage("53014514"));
|
||||
}
|
||||
}
|
||||
@@ -248,12 +248,12 @@ extends AbstractImagStoreService {
|
||||
public void validateDevice(QueryPersonRegistryParam param, PersonRegistry personRegistry) throws ServiceException {
|
||||
if (StringUtils.isNotBlank((CharSequence)param.getDeviceCode())) {
|
||||
if (Objects.equals(personRegistry.getStatus(), StatusEnum.CLOSE.getValue())) {
|
||||
this.logger.warn("\u8be5\u8bbe\u5907\u672a\u5f00\u542f\u6ce8\u518c,\u79df\u6237ID:[{}],\u8bbe\u5907Code:[{}]", (Object)personRegistry.getBusinessId(), (Object)param.getDeviceCode());
|
||||
this.logger.warn("该设备未开启注册,租户ID:[{}],设备Code:[{}]", (Object)personRegistry.getBusinessId(), (Object)param.getDeviceCode());
|
||||
throw new ServiceException("53014518", this.getMessage("53014518"));
|
||||
}
|
||||
List dbPersonRegistryDeviceList = this.personRegistryDeviceMapper.select(personRegistry.getId(), Arrays.asList(param.getDeviceCode()));
|
||||
if (CollectionUtils.isEmpty((Collection)dbPersonRegistryDeviceList)) {
|
||||
this.logger.warn("\u8be5\u8bbe\u5907\u672a\u6ce8\u518c,\u79df\u6237ID:[{}],\u8bbe\u5907Code:[{}]", (Object)personRegistry.getBusinessId(), (Object)param.getDeviceCode());
|
||||
this.logger.warn("该设备未注册,租户ID:[{}],设备Code:[{}]", (Object)personRegistry.getBusinessId(), (Object)param.getDeviceCode());
|
||||
throw new ServiceException("53014519", this.getMessage("53014519"));
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -229,7 +229,7 @@ implements CpDeviceImagePersonService {
|
||||
ApplicationImageStoreQueryParam queryParam = new ApplicationImageStoreQueryParam();
|
||||
queryParam.setImageStoreId(imageStoreId);
|
||||
CloudwalkResult appImageStoreResult = this.appImageStoreService.query(queryParam, context);
|
||||
if (appImageStoreResult.isSuccess() && !CollectionUtils.isEmpty((Collection)((Collection)appImageStoreResult.getData())) && "\u6d3e\u68af\u5e94\u7528".equals(((ApplicationImageStoreQueryResult)((List)appImageStoreResult.getData()).get(0)).getApplicationName())) {
|
||||
if (appImageStoreResult.isSuccess() && !CollectionUtils.isEmpty((Collection)((Collection)appImageStoreResult.getData())) && "派梯应用".equals(((ApplicationImageStoreQueryResult)((List)appImageStoreResult.getData()).get(0)).getApplicationName())) {
|
||||
elevatorGroup = true;
|
||||
}
|
||||
return elevatorGroup;
|
||||
@@ -347,9 +347,9 @@ implements CpDeviceImagePersonService {
|
||||
if (StringUtils.isNotBlank((CharSequence)imgStorePerson.getDefaultFloor())) {
|
||||
QueryZoneForm queryZoneForm = new QueryZoneForm();
|
||||
queryZoneForm.setIds(Collections.singletonList(imgStorePerson.getDefaultFloor()));
|
||||
this.logger.info("\u697c\u5c42\u4fe1\u606f\u67e5\u8be2\u5165\u53c2\u4e3a{}", (Object)JSON.toJSONString((Object)queryZoneForm));
|
||||
this.logger.info("楼层信息查询入参为{}", (Object)JSON.toJSONString((Object)queryZoneForm));
|
||||
CloudwalkResult<List<ZoneResult>> zoneDetail = this.zoneFeignClient.findZonelist(queryZoneForm);
|
||||
this.logger.info("\u697c\u5c42\u4fe1\u606f{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
this.logger.info("楼层信息{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
if (!CollectionUtils.isEmpty((Collection)((Collection)zoneDetail.getData()))) {
|
||||
json.put("defaultFloor", (Object)((ZoneResult)((List)zoneDetail.getData()).get(0)).getName());
|
||||
}
|
||||
@@ -441,7 +441,7 @@ implements CpDeviceImagePersonService {
|
||||
@Async(value="saveSyncLogExecutor")
|
||||
public void saveSyncLog(String deviceId, String groupId, List<UpdatePersonResult.PersonData> personData) {
|
||||
if (CollectionUtils.isEmpty(personData)) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4eba\u5458\u66f4\u65b0\u6570\u636e\u4e3a\u7a7a", (Object)deviceId, (Object)groupId);
|
||||
this.logger.warn("设备[{}]图库[{}]人员更新数据为空", (Object)deviceId, (Object)groupId);
|
||||
return;
|
||||
}
|
||||
DevicePersonSyncLogDTO dto = new DevicePersonSyncLogDTO();
|
||||
@@ -452,7 +452,7 @@ implements CpDeviceImagePersonService {
|
||||
String personId = personInfo.getUserId();
|
||||
dto.setPersonId(personId);
|
||||
syncLogs = this.devicePersonSyncLogMapper.query(dto);
|
||||
this.logger.debug("\u6839\u636e\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4eba\u5458[{}]\u67e5\u8be2\u540c\u6b65\u8bb0\u5f55:[{}]", new Object[]{deviceId, groupId, personId, JSON.toJSONString((Object)syncLogs)});
|
||||
this.logger.debug("根据设备[{}]图库[{}]人员[{}]查询同步记录:[{}]", new Object[]{deviceId, groupId, personId, JSON.toJSONString((Object)syncLogs)});
|
||||
if (!CollectionUtils.isEmpty((Collection)syncLogs)) {
|
||||
this.updateSyncLog((DevicePersonSyncLog)syncLogs.get(0), personInfo);
|
||||
continue;
|
||||
@@ -462,7 +462,7 @@ implements CpDeviceImagePersonService {
|
||||
queryGroupPersonDTO.setPersonId(personId);
|
||||
List groupPersonRefList = this.groupPersonRefMapper.query(queryGroupPersonDTO);
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.debug("\u6839\u636e\u56fe\u5e93Id[{}],\u4eba\u5458Id[{}]\u67e5\u8be2\u4e0d\u5b58\u5728\u56fe\u5e93\u4eba\u5458\u5173\u8054\u8bb0\u5f55", (Object)groupId, (Object)personInfo.getUserId());
|
||||
this.logger.debug("根据图库Id[{}],人员Id[{}]查询不存在图库人员关联记录", (Object)groupId, (Object)personInfo.getUserId());
|
||||
continue;
|
||||
}
|
||||
if (this.lockSyncLog(deviceId, groupId, personId)) {
|
||||
@@ -488,16 +488,16 @@ implements CpDeviceImagePersonService {
|
||||
dbSyncLog.setCode("");
|
||||
dbSyncLog.setErrorMessage("");
|
||||
dbSyncLog.setLastPullTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dbSyncLog.setUpdateInfo("\u5b58\u5728\u540c\u6b65\u8bb0\u5f55,\u66f4\u65b0\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u5df2\u62c9\u53d6");
|
||||
dbSyncLog.setUpdateInfo("存在同步记录,更新同步状态:设备已拉取");
|
||||
dbSyncLog.setIsDel(personInfo.getType());
|
||||
if (!CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
dbSyncLog.setImageId(((UpdatePersonResult.PersonData.FaceData)personInfo.getFaceData().get(0)).getFaceId());
|
||||
} else {
|
||||
dbSyncLog.setErrorMessage("\u65e0\u8bc6\u522b\u7167,\u8bbe\u5907\u65e0\u9700\u4e0a\u62a5");
|
||||
dbSyncLog.setErrorMessage("无识别照,设备无需上报");
|
||||
}
|
||||
this.devicePersonSyncLogMapper.updateStatusAndCountInc(dbSyncLog);
|
||||
this.logger.debug("\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}],\u8bbe\u5907\u5df2\u62c9\u53d6,count[{}]", (Object)dbSyncLog.getId(), (Object)(dbSyncLog.getCount() + 1));
|
||||
this.logger.debug("\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}],[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog);
|
||||
this.logger.debug("更新同步记录[{}],设备已拉取,count[{}]", (Object)dbSyncLog.getId(), (Object)(dbSyncLog.getCount() + 1));
|
||||
this.logger.debug("更新同步记录[{}],[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog);
|
||||
}
|
||||
|
||||
private void insertSyncLog(String deviceId, String groupId, String personId, UpdatePersonResult.PersonData personInfo, GroupPersonRef groupPersonRef) {
|
||||
@@ -535,20 +535,20 @@ implements CpDeviceImagePersonService {
|
||||
if (!CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
newSyncLog.setImageId(((UpdatePersonResult.PersonData.FaceData)personInfo.getFaceData().get(0)).getFaceId());
|
||||
}
|
||||
newSyncLog.setUpdateInfo("\u751f\u6210\u540c\u6b65\u8bb0\u5f55,\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u5df2\u62c9\u53d6");
|
||||
newSyncLog.setUpdateInfo("生成同步记录,同步状态:设备已拉取");
|
||||
newSyncLog.setDevicePersonRefId(null != dbDevicePerson ? dbDevicePerson.getId() : null);
|
||||
newSyncLog.setIsDel(personInfo.getType());
|
||||
if (CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
newSyncLog.setErrorMessage("\u65e0\u8bc6\u522b\u7167,\u8bbe\u5907\u65e0\u9700\u4e0a\u62a5");
|
||||
newSyncLog.setErrorMessage("无识别照,设备无需上报");
|
||||
}
|
||||
this.logger.debug("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55[{}],[{}]", (Object)newSyncLog.getId(), (Object)newSyncLog);
|
||||
this.logger.debug("新增同步记录[{}],[{}]", (Object)newSyncLog.getId(), (Object)newSyncLog);
|
||||
try {
|
||||
this.devicePersonSyncLogMapper.insertSelective(newSyncLog);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55\u5931\u8d25,\u62a5\u9519\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("新增同步记录失败,报错:{}", (Object)e.getMessage());
|
||||
}
|
||||
this.logger.debug("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55[{}],\u8bbe\u5907\u5df2\u62c9\u53d6,count[1]", (Object)newSyncLog.getId());
|
||||
this.logger.debug("新增同步记录[{}],设备已拉取,count[1]", (Object)newSyncLog.getId());
|
||||
}
|
||||
|
||||
private synchronized boolean lockSyncLog(String deviceId, String imageStoreId, String personId) {
|
||||
|
||||
+16
-16
@@ -369,7 +369,7 @@ extends AbstractImagStoreService {
|
||||
excludePersonIds.forEach(personResultMap::remove);
|
||||
}
|
||||
if (!TransactionSynchronizationManager.isActualTransactionActive()) {
|
||||
this.logger.error("getCurrentAssociatedPersonIds\u63a5\u53e3 \u4e8b\u52a1\u672a\u751f\u6548");
|
||||
this.logger.error("getCurrentAssociatedPersonIds接口 事务未生效");
|
||||
}
|
||||
return personResultMap;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
|
||||
public void handleGroupPersonChange() throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u56fe\u5e93\u56fe\u7247\u540c\u6b65:[{}]", (Object)System.currentTimeMillis());
|
||||
this.logger.info("开始图库图片同步:[{}]", (Object)System.currentTimeMillis());
|
||||
Long lastSynTime = 0L;
|
||||
String lastImageId = "0";
|
||||
String lastImageStoreId = null;
|
||||
@@ -399,7 +399,7 @@ extends AbstractImagStoreService {
|
||||
String lastFlagValue = (String)this.redisTemplate.opsForValue().get((Object)LAST_SYNC_IMAGE_KEY);
|
||||
lastSynTime = Long.valueOf(lastFlagValue.split(",")[0]);
|
||||
lastImageId = lastFlagValue.split(",")[1];
|
||||
this.logger.info("\u83b7\u53d6\u7f13\u5b58\u6570\u636e,key={},value={}", (Object)LAST_SYNC_IMAGE_KEY, (Object)lastFlagValue);
|
||||
this.logger.info("获取缓存数据,key={},value={}", (Object)LAST_SYNC_IMAGE_KEY, (Object)lastFlagValue);
|
||||
}
|
||||
AgImageStoreImageSyncParam imageQuery = new AgImageStoreImageSyncParam();
|
||||
imageQuery.setLastSynTime(lastSynTime);
|
||||
@@ -407,7 +407,7 @@ extends AbstractImagStoreService {
|
||||
imageQuery.setImageStoreId(lastImageStoreId);
|
||||
CloudwalkResult imageQueryResult = this.agImageStoreImageService.sync(imageQuery);
|
||||
if (!imageQueryResult.isSuccess()) {
|
||||
this.logger.error("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,result:{}", (Object)JSONObject.toJSONString((Object)imageQueryResult));
|
||||
this.logger.error("图库图片同步失败,result:{}", (Object)JSONObject.toJSONString((Object)imageQueryResult));
|
||||
throw new ServiceException(imageQueryResult.getCode(), imageQueryResult.getMessage());
|
||||
}
|
||||
List resultList = (List)imageQueryResult.getData();
|
||||
@@ -419,14 +419,14 @@ extends AbstractImagStoreService {
|
||||
imgStorePersonQuery.setImageId(result.getImageId());
|
||||
List getsResult = this.personMapper.gets(imgStorePersonQuery);
|
||||
if (CollectionUtils.isEmpty((Collection)getsResult)) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,\u6839\u636eimageId:[{}]\u83b7\u53d6\u4e0d\u5230\u4eba\u5458\u4fe1\u606f", (Object)result.getImageId());
|
||||
this.logger.warn("图库图片同步失败,根据imageId:[{}]获取不到人员信息", (Object)result.getImageId());
|
||||
continue;
|
||||
}
|
||||
groupPersonRef = new GroupPersonRef();
|
||||
groupPersonRef.setImageStoreId(result.getImageStoreId());
|
||||
List groupPersonRefList = this.groupPersonRefMapper.selectByCondition(groupPersonRef, Collections3.extractToList((Collection)getsResult, (String)"id"));
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,\u6839\u636eimageStoreId:[{}],personId:[{}]\u83b7\u53d6\u4e0d\u5230\u56fe\u5e93\u4eba\u5458\u5217\u8868\u4fe1\u606f", (Object)result.getImageStoreId(), (Object)Collections3.extractToString((Collection)getsResult, (String)"id", (String)","));
|
||||
this.logger.warn("图库图片同步失败,根据imageStoreId:[{}],personId:[{}]获取不到图库人员列表信息", (Object)result.getImageStoreId(), (Object)Collections3.extractToString((Collection)getsResult, (String)"id", (String)","));
|
||||
continue;
|
||||
}
|
||||
groupPersonRef.setGender(result.getGender());
|
||||
@@ -449,21 +449,21 @@ extends AbstractImagStoreService {
|
||||
if (null == lastResult) continue;
|
||||
if (null == lastResult.getLastUpdateTime()) {
|
||||
lastResult.setLastUpdateTime(lastSynTime);
|
||||
this.logger.warn("\u6700\u540e\u66f4\u65b0\u65f6\u95f4\u4e3a\u7a7a,imageStoreId:[{}],imageId:[{}]", (Object)lastResult.getImageStoreId(), (Object)lastResult.getImageId());
|
||||
this.logger.warn("最后更新时间为空,imageStoreId:[{}],imageId:[{}]", (Object)lastResult.getImageStoreId(), (Object)lastResult.getImageId());
|
||||
}
|
||||
this.redisTemplate.opsForValue().set((Object)LAST_SYNC_IMAGE_KEY, (Object)(lastResult.getLastUpdateTime() + "," + lastResult.getImageId()));
|
||||
this.logger.info("\u8bbe\u7f6e\u7f13\u5b58\u6570\u636e,key={},value={}", (Object)LAST_SYNC_IMAGE_KEY, (Object)(lastResult.getLastUpdateTime() + "," + lastResult.getImageId()));
|
||||
this.logger.info("设置缓存数据,key={},value={}", (Object)LAST_SYNC_IMAGE_KEY, (Object)(lastResult.getLastUpdateTime() + "," + lastResult.getImageId()));
|
||||
}
|
||||
this.logger.warn("\u6ca1\u6709\u9700\u8981\u540c\u6b65\u7684\u56fe\u5e93\u56fe\u7247");
|
||||
this.logger.info("\u7ed3\u675f\u56fe\u5e93\u56fe\u7247\u540c\u6b65:{}", (Object)System.currentTimeMillis());
|
||||
this.logger.warn("没有需要同步的图库图片");
|
||||
this.logger.info("结束图库图片同步:{}", (Object)System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public void handleGroupPersonChange2() throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u56fe\u5e93\u56fe\u7247\u540c\u6b65:[{}]", (Object)System.currentTimeMillis());
|
||||
this.logger.info("开始图库图片同步:[{}]", (Object)System.currentTimeMillis());
|
||||
Long syncTime = System.currentTimeMillis() - 600000L;
|
||||
List syncList = this.groupPersonRefMapper.waitSyncList(syncTime);
|
||||
if (CollectionUtils.isEmpty((Collection)syncList)) {
|
||||
this.logger.warn("\u6ca1\u6709\u9700\u8981\u540c\u6b65\u7684\u56fe\u5e93\u56fe\u7247");
|
||||
this.logger.warn("没有需要同步的图库图片");
|
||||
return;
|
||||
}
|
||||
Map<String, List<GroupPersonRefDTO>> groupSyncList = syncList.stream().collect(Collectors.groupingBy(GroupPersonRef::getImageStoreId));
|
||||
@@ -471,7 +471,7 @@ extends AbstractImagStoreService {
|
||||
String imageStoreId = entry.getKey();
|
||||
this.updateGroupPerson(imageStoreId, entry.getValue());
|
||||
}
|
||||
this.logger.info("\u7ed3\u675f\u56fe\u5e93\u56fe\u7247\u540c\u6b65:{}", (Object)System.currentTimeMillis());
|
||||
this.logger.info("结束图库图片同步:{}", (Object)System.currentTimeMillis());
|
||||
}
|
||||
|
||||
private void updateGroupPerson(String imageStoreId, List<GroupPersonRefDTO> list) {
|
||||
@@ -499,21 +499,21 @@ extends AbstractImagStoreService {
|
||||
GroupPersonRef groupPersonRef = null;
|
||||
for (SearchFaceResult result : resultList) {
|
||||
if (StringUtils.isEmpty((Object)result.getUserId())) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,imageId\u4e3a\u7a7a:[{}]", (Object)result.getUserId());
|
||||
this.logger.warn("图库图片同步失败,imageId为空:[{}]", (Object)result.getUserId());
|
||||
continue;
|
||||
}
|
||||
imgStorePersonQuery = new ImgStorePersonQueryDto();
|
||||
imgStorePersonQuery.setImageId(result.getUserId());
|
||||
List getsResult = this.personMapper.gets(imgStorePersonQuery);
|
||||
if (CollectionUtils.isEmpty((Collection)getsResult)) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,\u6839\u636eimageId:[{}]\u83b7\u53d6\u4e0d\u5230\u4eba\u5458\u4fe1\u606f", (Object)result.getUserId());
|
||||
this.logger.warn("图库图片同步失败,根据imageId:[{}]获取不到人员信息", (Object)result.getUserId());
|
||||
continue;
|
||||
}
|
||||
groupPersonRef = new GroupPersonRef();
|
||||
groupPersonRef.setImageStoreId(imageStoreId);
|
||||
List groupPersonRefList = this.groupPersonRefMapper.selectByCondition(groupPersonRef, Collections3.extractToList((Collection)getsResult, (String)"id"));
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,\u6839\u636eimageStoreId:[{}],personId:[{}]\u83b7\u53d6\u4e0d\u5230\u56fe\u5e93\u4eba\u5458\u5217\u8868\u4fe1\u606f", (Object)imageStoreId, (Object)Collections3.extractToString((Collection)getsResult, (String)"id", (String)","));
|
||||
this.logger.warn("图库图片同步失败,根据imageStoreId:[{}],personId:[{}]获取不到图库人员列表信息", (Object)imageStoreId, (Object)Collections3.extractToString((Collection)getsResult, (String)"id", (String)","));
|
||||
continue;
|
||||
}
|
||||
groupPersonRef.setGroupStatus(GroupModelStatusEnum.MODEL_WAIT.getCode());
|
||||
|
||||
+16
-16
@@ -142,7 +142,7 @@ implements CpImageStorePersonService {
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<ImageStorePersonResult> save(AddImageStorePersonParam addParam, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("\u56fe\u5e93\u4eba\u5458\u65b0\u589e\u6216\u66f4\u65b0 start");
|
||||
this.logger.info("图库人员新增或更新 start");
|
||||
if (StringUtils.isBlank((CharSequence)addParam.getComparePicture()) && StringUtils.isBlank((CharSequence)addParam.getImageBase64())) {
|
||||
throw new ServiceException("53013531", this.getMessage("53013531"));
|
||||
}
|
||||
@@ -189,7 +189,7 @@ implements CpImageStorePersonService {
|
||||
CpImageStorePersonServiceImpl proxyObj = (CpImageStorePersonServiceImpl)AopContext.currentProxy();
|
||||
String personId = proxyObj.saveTransactional(addParam, context, groupPersonRef, syncPersonDTO, imagePath, ((AgImageUploadResult)imageAddResult.getData()).getId());
|
||||
this.cpImageStorePersonValidateManager.addValidateData(Lists.newArrayList((Object[])new SyncPersonDTO[]{syncPersonDTO}));
|
||||
this.logger.info("\u56fe\u5e93\u4eba\u5458\u65b0\u589e\u6216\u66f4\u65b0 end");
|
||||
this.logger.info("图库人员新增或更新 end");
|
||||
AgFeatureExtractParam extractParam = new AgFeatureExtractParam();
|
||||
extractParam.setImageUrl(imagePath);
|
||||
CloudwalkResult extractResult = this.cpImageStoreToolService.extractFeature(extractParam);
|
||||
@@ -201,7 +201,7 @@ implements CpImageStorePersonService {
|
||||
gender = new BigDecimal((String)qualityScoreList.get(11)).shortValue();
|
||||
}
|
||||
groupPersonRef = this.groupPersonRefMapper.selectByPrimaryKey(groupPersonRef.getId());
|
||||
this.logger.debug("\u56fe\u5e93[{}]\u4eba\u5458[{}]\u65b0\u589e\u6216\u66f4\u65b0\u5b8c\u67e5\u8be2\u6570\u636e\u5e93:[{}]", new Object[]{addParam.getImageStoreId(), personId, JSON.toJSONString((Object)groupPersonRef)});
|
||||
this.logger.debug("图库[{}]人员[{}]新增或更新完查询数据库:[{}]", new Object[]{addParam.getImageStoreId(), personId, JSON.toJSONString((Object)groupPersonRef)});
|
||||
ImageStorePersonResult result = new ImageStorePersonResult();
|
||||
result.setPersonId(personId);
|
||||
result.setExpiryBeginDate(groupPersonRef.getExpiryBeginDate());
|
||||
@@ -361,7 +361,7 @@ implements CpImageStorePersonService {
|
||||
this.groupPersonRefMapper.logicDeleteExpireNullByParam(delGroupPersonDTO);
|
||||
if (Collections3.isNotEmpty((Collection)queryResult)) {
|
||||
GroupPersonRef groupPersonRef = (GroupPersonRef)queryResult.get(0);
|
||||
this.logger.info("bind\u63a5\u53e3service del \u67e5\u8be2GroupPersonRef\uff1a{}", (Object)JSONObject.toJSONString((Object)groupPersonRef));
|
||||
this.logger.info("bind接口service del 查询GroupPersonRef:{}", (Object)JSONObject.toJSONString((Object)groupPersonRef));
|
||||
SyncPersonDTO syncPersonDTO = new SyncPersonDTO();
|
||||
syncPersonDTO.setImageStoreId(deleteParam.getImageStoreId());
|
||||
syncPersonDTO.setImageId(imgStorePerson.getImageId());
|
||||
@@ -478,7 +478,7 @@ implements CpImageStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93[{}]\u4eba\u5458[{}]\u7ed1\u5b9a\u5f02\u5e38:{}", new Object[]{batchBindParam.getImageStoreId(), dbPerson.getId(), e.getMessage()});
|
||||
this.logger.error("图库[{}]人员[{}]绑定异常:{}", new Object[]{batchBindParam.getImageStoreId(), dbPerson.getId(), e.getMessage()});
|
||||
}
|
||||
});
|
||||
ArrayList failIds = new ArrayList(batchBindParam.getPersonIds());
|
||||
@@ -604,7 +604,7 @@ implements CpImageStorePersonService {
|
||||
groupPersonDTO.setImageStoreId(bindParam.getImageStoreId());
|
||||
groupPersonDTO.setPersonId(bindParam.getPersonId());
|
||||
List queryResult = this.groupPersonRefMapper.query(groupPersonDTO);
|
||||
this.logger.info("bind\u63a5\u53e3service \u67e5\u8be2GroupPersonRef\uff1a{}", (Object)JSONObject.toJSONString((Object)queryResult));
|
||||
this.logger.info("bind接口service 查询GroupPersonRef:{}", (Object)JSONObject.toJSONString((Object)queryResult));
|
||||
GroupPersonRef groupPersonRef = new GroupPersonRef();
|
||||
long time = System.currentTimeMillis();
|
||||
if (CollectionUtils.isEmpty((Collection)queryResult)) {
|
||||
@@ -661,7 +661,7 @@ implements CpImageStorePersonService {
|
||||
param.setImageStoreId(agImageStore.getId());
|
||||
param.setImageIds(imgStorePerson.getImageId());
|
||||
CloudwalkResult imageRefQueryResult = this.cpImageStoreToolService.searchFace(param);
|
||||
this.logger.info("\u56fe\u5e93\u4eba\u5458\u65b0\u589e\u6216\u66f4\u65b0\u67e5\u8be2\u56fe\u7247\u4fe1\u606f\uff1a{}", (Object)JSONObject.toJSONString((Object)imageRefQueryResult));
|
||||
this.logger.info("图库人员新增或更新查询图片信息:{}", (Object)JSONObject.toJSONString((Object)imageRefQueryResult));
|
||||
if (imageRefQueryResult.isSuccess() && null != imageRefQueryResult.getData()) {
|
||||
groupPersonRefParam.setGroupTime(((SearchFaceResult)imageRefQueryResult.getData()).getTime());
|
||||
groupPersonRefParam.setErrorMessage(((SearchFaceResult)imageRefQueryResult.getData()).getInfo());
|
||||
@@ -710,11 +710,11 @@ implements CpImageStorePersonService {
|
||||
return string;
|
||||
}
|
||||
catch (ServiceException se) {
|
||||
this.logger.error("\u56fe\u7247\u4fdd\u5b58service\u5f02\u5e38,code:[{}], message:[{}]", (Object)se.getCode(), (Object)se.getMessage());
|
||||
this.logger.error("图片保存service异常,code:[{}], message:[{}]", (Object)se.getCode(), (Object)se.getMessage());
|
||||
throw new ServiceException(se.getCode(), se.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u7247\u4fdd\u5b58\u672a\u77e5\u5f02\u5e38", e);
|
||||
this.logger.error("图片保存未知异常", e);
|
||||
throw new ServiceException("53013211", this.getMessage("53013211"));
|
||||
}
|
||||
}
|
||||
@@ -731,11 +731,11 @@ implements CpImageStorePersonService {
|
||||
return string;
|
||||
}
|
||||
catch (DavinciServiceException se) {
|
||||
this.logger.error("\u56fe\u7247\u4fdd\u5b58service\u5f02\u5e38,code:[{}], message:[{}]", (Object)se.getCode(), (Object)se.getMessage());
|
||||
this.logger.error("图片保存service异常,code:[{}], message:[{}]", (Object)se.getCode(), (Object)se.getMessage());
|
||||
throw new ServiceException(se.getCode(), se.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u7247\u4fdd\u5b58\u672a\u77e5\u5f02\u5e38", e);
|
||||
this.logger.error("图片保存未知异常", e);
|
||||
throw new ServiceException("53013211", this.getMessage("53013211"));
|
||||
}
|
||||
}
|
||||
@@ -776,13 +776,13 @@ implements CpImageStorePersonService {
|
||||
cpHandleFaceParam.setImageId(imgStorePerson.getImageId());
|
||||
CloudwalkResult deleteResult = this.cpImageStoreToolService.removeFace(cpHandleFaceParam);
|
||||
if (!deleteResult.isSuccess()) {
|
||||
this.logger.warn("\u4eba\u5458\u56fe\u7247\u66f4\u65b0\uff0c\u539f\u5173\u8054\u5220\u9664\u5931\u8d25\uff0cresult:[{}]", (Object)JSONObject.toJSONString((Object)deleteResult));
|
||||
this.logger.warn("人员图片更新,原关联删除失败,result:[{}]", (Object)JSONObject.toJSONString((Object)deleteResult));
|
||||
}
|
||||
AgImageKeyParam imageKeyParam = new AgImageKeyParam();
|
||||
imageKeyParam.setImageId(imgStorePerson.getImageId());
|
||||
CloudwalkResult imageDeleteResult = this.agImageService.deleteImage(imageKeyParam, context);
|
||||
if (!imageDeleteResult.isSuccess()) {
|
||||
this.logger.warn("\u4eba\u5458\u56fe\u7247\u66f4\u65b0\uff0c\u539f\u56fe\u7247\u5220\u9664\u5931\u8d25\uff0cresult:[{}]", (Object)JSONObject.toJSONString((Object)deleteResult));
|
||||
this.logger.warn("人员图片更新,原图片删除失败,result:[{}]", (Object)JSONObject.toJSONString((Object)deleteResult));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -803,14 +803,14 @@ implements CpImageStorePersonService {
|
||||
personIdList.addAll(labelPersonIds);
|
||||
personIdList.addAll(Optional.ofNullable(param.getPersonIds()).orElse(new ArrayList()));
|
||||
if (CollectionUtils.isEmpty(personIdList)) {
|
||||
this.logger.warn("CpImageStorePersonService updateGroupPersonRef,\u5173\u8054\u4eba\u5458\u4e3a\u7a7a");
|
||||
this.logger.warn("CpImageStorePersonService updateGroupPersonRef,关联人员为空");
|
||||
return CloudwalkResult.success((Object)true);
|
||||
}
|
||||
GroupPersonRef query = new GroupPersonRef();
|
||||
query.setImageStoreId(param.getImageStoreId());
|
||||
List groupPersonRefList = this.groupPersonRefMapper.selectByCondition(query, personIdList);
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.warn("CpImageStorePersonService updateGroupPersonRef,\u56fe\u5e93\u4eba\u5458\u4e3a\u7a7a");
|
||||
this.logger.warn("CpImageStorePersonService updateGroupPersonRef,图库人员为空");
|
||||
return CloudwalkResult.success((Object)true);
|
||||
}
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
@@ -825,7 +825,7 @@ implements CpImageStorePersonService {
|
||||
updateSyncLog.setCode("");
|
||||
updateSyncLog.setErrorMessage("");
|
||||
updateSyncLog.setLastUpdateTime(currentTime);
|
||||
updateSyncLog.setUpdateInfo("\u66f4\u65b0\u56fe\u5e93\u4eba\u5458\u4fe1\u606f,\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55\u72b6\u6001:\u8bbe\u5907\u672a\u62c9\u53d6");
|
||||
updateSyncLog.setUpdateInfo("更新图库人员信息,更新同步记录状态:设备未拉取");
|
||||
groupPersonIdPartition.stream().forEach(partition -> this.devicePersonSyncLogMapper.updateByGroupRefIds(updateSyncLog, new HashSet(partition)));
|
||||
HashSet<String> changeGroupIds = new HashSet<String>();
|
||||
changeGroupIds.add(param.getImageStoreId());
|
||||
|
||||
+29
-29
@@ -99,9 +99,9 @@ extends AbstractImagStoreService {
|
||||
for (String imageStoreId : imageStoreIdList) {
|
||||
Long addWaitSynTaskRes = this.addWaitSynTask(imageStoreId, jsonData);
|
||||
if (0 == addWaitSynTaskRes.intValue()) {
|
||||
this.logger.info("CpImageStorePersonSynManager addGroupPersonSynTask addWaitSynTaskRes : \u65b0\u589e\u56fe\u5e93\u3010{}\u3011\u4efb\u52a1", (Object)imageStoreId);
|
||||
this.logger.info("CpImageStorePersonSynManager addGroupPersonSynTask addWaitSynTaskRes : 新增图库【{}】任务", (Object)imageStoreId);
|
||||
} else {
|
||||
this.logger.info("CpImageStorePersonSynManager addGroupPersonSynTask addWaitSynTaskRes : \u56fe\u5e93\u3010{}\u3011\u5df2\u5b58\u5728\u5168\u91cf\u4efb\u52a1", (Object)imageStoreId);
|
||||
this.logger.info("CpImageStorePersonSynManager addGroupPersonSynTask addWaitSynTaskRes : 图库【{}】已存在全量任务", (Object)imageStoreId);
|
||||
}
|
||||
this.handleGroupPersonSynTask(imageStoreId);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ extends AbstractImagStoreService {
|
||||
public List<String> addGroupPersonSynTask(String personId) {
|
||||
Map<String, GroupPersonRef> imageStoreIdsMap;
|
||||
ArrayList imageStoreIds;
|
||||
this.logger.info("addGroupPersonSynTask - \u65b0\u589e\u56fe\u5e93\u5f85\u540c\u6b65\u4efb\u52a1(\u65b0\u589e\u4eba\u5458\u6ce8\u518c\u7167) personId\uff1a{}", (Object)personId);
|
||||
this.logger.info("addGroupPersonSynTask - 新增图库待同步任务(新增人员注册照) personId:{}", (Object)personId);
|
||||
ArrayList imageIdResultList = Lists.newArrayList();
|
||||
if (StringUtils.isNotBlank((CharSequence)personId) && Collections3.isNotEmpty((Collection)(imageStoreIds = Lists.newArrayList((imageStoreIdsMap = this.cpImageStorePersonManager.getImageStoreIdsByPerson(personId)).keySet())))) {
|
||||
GroupPersonSynData groupPersonSynData = new GroupPersonSynData();
|
||||
@@ -154,7 +154,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
|
||||
public List<String> addGroupPersonSynTask(String personId, String oldImageId, List<String> oldImageStoreIds) {
|
||||
this.logger.info("addGroupPersonSynTask - \u65b0\u589e\u56fe\u5e93\u5f85\u540c\u6b65\u4efb\u52a1(\u66f4\u65b0\u4eba\u5458\u6ce8\u518c\u7167) personId\uff1a{}\uff1boldImageId: {}\uff1boldImageStoreIds: {}", new Object[]{personId, oldImageId, oldImageStoreIds});
|
||||
this.logger.info("addGroupPersonSynTask - 新增图库待同步任务(更新人员注册照) personId:{};oldImageId: {};oldImageStoreIds: {}", new Object[]{personId, oldImageId, oldImageStoreIds});
|
||||
ArrayList imageIdResultList = Lists.newArrayList();
|
||||
if (StringUtils.isNotBlank((CharSequence)personId)) {
|
||||
Map<String, GroupPersonRef> imageStoreIdsMap = this.cpImageStorePersonManager.getImageStoreIdsByPerson(personId);
|
||||
@@ -173,7 +173,7 @@ extends AbstractImagStoreService {
|
||||
HashSet imageStoreIdsAfter = Sets.newHashSet((Iterable)imageStoreIds);
|
||||
imageStoreIdsBefore.removeAll(imageStoreIdsAfter);
|
||||
ArrayList imageStoreIdsNeedDelete = Lists.newArrayList((Iterable)imageStoreIdsBefore);
|
||||
this.logger.info("addGroupPersonSynTask - \u65b0\u589e\u56fe\u5e93\u5f85\u540c\u6b65\u4efb\u52a1(\u66f4\u65b0\u4eba\u5458\u6ce8\u518c\u7167) imageStoreIdsAfter\uff1a{}\uff1bimageStoreIdsNeedDelete: {}", (Object)imageStoreIds, (Object)imageStoreIdsNeedDelete);
|
||||
this.logger.info("addGroupPersonSynTask - 新增图库待同步任务(更新人员注册照) imageStoreIdsAfter:{};imageStoreIdsNeedDelete: {}", (Object)imageStoreIds, (Object)imageStoreIdsNeedDelete);
|
||||
if (Collections3.isNotEmpty((Collection)imageStoreIdsNeedDelete)) {
|
||||
GroupPersonSynData groupPersonSynData = new GroupPersonSynData();
|
||||
groupPersonSynData.setDelPersonIds((List)Lists.newArrayList((Object[])new String[]{personId}));
|
||||
@@ -226,17 +226,17 @@ extends AbstractImagStoreService {
|
||||
if (0 == lockHandleSynTaskRes.intValue()) {
|
||||
this.taskExecutor.submit(() -> {
|
||||
try {
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHandleSynTaskRes : \u52a0\u9501\u6d88\u8d39\u56fe\u5e93{}\u6210\u529f", (Object)imageStoreId);
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHandleSynTaskRes : 加锁消费图库{}成功", (Object)imageStoreId);
|
||||
String synQueueHeadDataKey = SYN_QUEUE_HEAD_DATA + imageStoreId;
|
||||
if (this.redisTemplate.hasKey((Object)synQueueHeadDataKey).booleanValue()) {
|
||||
this.logger.warn("CpImageStorePersonSynManager handleGroupPersonSynTask synQueueHeadDataKey : \u5df2\u5b58\u5728\u540c\u6b65\u4efb\u52a1\u961f\u9996\u6570\u636e{}", (Object)synQueueHeadDataKey);
|
||||
this.logger.warn("CpImageStorePersonSynManager handleGroupPersonSynTask synQueueHeadDataKey : 已存在同步任务队首数据{}", (Object)synQueueHeadDataKey);
|
||||
this.groupPersonSyn(imageStoreId, synQueueHeadDataKey);
|
||||
} else {
|
||||
Long lockHeadSynTaskRes = this.lockHeadSynTask(imageStoreId);
|
||||
if (0 == lockHeadSynTaskRes.intValue()) {
|
||||
this.groupPersonSyn(imageStoreId, synQueueHeadDataKey);
|
||||
} else {
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHeadSynTaskRes : \u56fe\u5e93{}\u5f85\u540c\u6b65\u961f\u5217\u5df2\u7a7a", (Object)imageStoreId);
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHeadSynTaskRes : 图库{}待同步队列已空", (Object)imageStoreId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHandleSynTaskRes : \u5df2\u5b58\u5728\u670d\u52a1\u8282\u70b9\u6d88\u8d39\u56fe\u5e93{}", (Object)imageStoreId);
|
||||
this.logger.info("CpImageStorePersonSynManager handleGroupPersonSynTask lockHandleSynTaskRes : 已存在服务节点消费图库{}", (Object)imageStoreId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
|
||||
private void handleImageStoreFullSyn(AgImageStoreResult waitSyncImageStore) throws Exception {
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn\u5904\u7406\u5f85\u540c\u6b65\u56fe\u5e93start");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn处理待同步图库start");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn params : {}", (Object)waitSyncImageStore.getId());
|
||||
AgImageStoreEditParam updateParam = new AgImageStoreEditParam();
|
||||
updateParam.setId(waitSyncImageStore.getId());
|
||||
@@ -285,10 +285,10 @@ extends AbstractImagStoreService {
|
||||
updateParam.setStatus(SyncStatusEnum.SYNC_ING.getCode());
|
||||
CloudwalkResult updateResult = this.agImageStoreService.edit(updateParam, this.context);
|
||||
if (!updateResult.isSuccess()) {
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreFullSyn error\uff0cupdateResult:[{}]", (Object)JsonUtils.toJson(updateResult));
|
||||
throw new Exception("cwos\u66f4\u65b0\u56fe\u5e93\u4fe1\u606f\u5931\u8d25");
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreFullSyn error,updateResult:[{}]", (Object)JsonUtils.toJson(updateResult));
|
||||
throw new Exception("cwos更新图库信息失败");
|
||||
}
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn \u6574\u7406\u5f85\u5904\u7406\u56fe\u5e93\u4eba\u5458\u6570\u636estart");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn 整理待处理图库人员数据start");
|
||||
Map<String, GroupPersonRef> associatedPersonResultsAfterUpdate = this.cpImageStorePersonManager.getCurrentAssociatedPersonIds(waitSyncImageStore.getId());
|
||||
HashSet associatedPersonIdsAfterUpdate = Sets.newHashSet(associatedPersonResultsAfterUpdate.keySet());
|
||||
List associatedPersonExpiryDateAfterUpdate = CollectionUtil.isNotEmpty((Collection)associatedPersonIdsAfterUpdate) ? this.imgStorePersonMapper.selectExpiryDateByIds((List)Lists.newArrayList((Iterable)associatedPersonIdsAfterUpdate)) : Lists.newArrayList();
|
||||
@@ -302,7 +302,7 @@ extends AbstractImagStoreService {
|
||||
ArrayList refNeedDelete = Lists.newArrayList();
|
||||
associatedPersonIdsAfterUpdate.forEach(personId -> {
|
||||
ImgStorePerson personExpiryDate;
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn \u904d\u5386\u83b7\u53d6\u56fe\u5e93\u4e2d\u6709\u6548\u4eba\u5458");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn 遍历获取图库中有效人员");
|
||||
GroupPersonRef refAfterUpdate = (GroupPersonRef)associatedPersonResultsAfterUpdate.get(personId);
|
||||
if (associatedPersonExpiryDateAfterUpdateMap.containsKey(refAfterUpdate.getPersonId()) && ((personExpiryDate = (ImgStorePerson)associatedPersonExpiryDateAfterUpdateMap.get(refAfterUpdate.getPersonId())).getExpiryBeginDate() != null || personExpiryDate.getExpiryEndDate() != null)) {
|
||||
refAfterUpdate.setExpiryBeginDate(personExpiryDate.getExpiryBeginDate());
|
||||
@@ -331,32 +331,32 @@ extends AbstractImagStoreService {
|
||||
refNeedDelete.add(refBeforeUpdate);
|
||||
}
|
||||
});
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn \u6574\u7406\u5f85\u5904\u7406\u56fe\u5e93\u4eba\u5458\u6570\u636eend");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn 整理待处理图库人员数据end");
|
||||
List<SyncPersonDTO> syncPersonList = this.cpImageStorePersonTxHandler.handleImageStoreChange(waitSyncImageStore, refNeedAdd, refNeedUpdate, refNeedDelete);
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn \u6dfb\u52a0\u6709\u6548\u671f\u4efb\u52a1\uff0c\u5e76\u5224\u65ad\u4e0b\u53d1");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn 添加有效期任务,并判断下发");
|
||||
this.cpImageStorePersonValidateManager.addValidateData(syncPersonList);
|
||||
updateParam.setStatus(SyncStatusEnum.SYNC_COMPLETED.getCode());
|
||||
try {
|
||||
updateResult = this.agImageStoreService.edit(updateParam, this.context);
|
||||
if (!updateResult.isSuccess()) {
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreFullSyn error\uff0cupdateResult:[{}]", (Object)JSONObject.toJSONString((Object)updateResult));
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreFullSyn error,updateResult:[{}]", (Object)JSONObject.toJSONString((Object)updateResult));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("CpImageStorePersonSynManager handleImageStoreFullSyn exception,imageStoreId:[{}]", (Object)waitSyncImageStore.getId(), (Object)e);
|
||||
}
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn\u5904\u7406\u5f85\u540c\u6b65\u56fe\u5e93end");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreFullSyn处理待同步图库end");
|
||||
}
|
||||
|
||||
private void handleImageStoreIncrementSyn(AgImageStoreResult waitSyncImageStore, String jsonData) throws Exception {
|
||||
Map<String, GroupPersonRef> associatedPersonResultsAfterUpdate;
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn\u589e\u91cf\u5904\u7406\u5f85\u540c\u6b65\u56fe\u5e93start: {};{}", (Object)waitSyncImageStore.getId(), (Object)jsonData);
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn增量处理待同步图库start: {};{}", (Object)waitSyncImageStore.getId(), (Object)jsonData);
|
||||
ArrayList refNeedAdd = Lists.newArrayList();
|
||||
ArrayList refNeedUpdate = Lists.newArrayList();
|
||||
ArrayList refNeedDelete = Lists.newArrayList();
|
||||
GroupPersonSynData synData = JsonUtils.toObj(jsonData, GroupPersonSynData.class);
|
||||
if (synData == null) {
|
||||
this.logger.error("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u540c\u6b65\u6570\u636e\u4e3anull");
|
||||
this.logger.error("CpImageStorePersonSynManager handleImageStoreIncrementSyn 同步数据为null");
|
||||
return;
|
||||
}
|
||||
if (Collections3.isNotEmpty((Collection)synData.getAddPersonIds())) {
|
||||
@@ -407,12 +407,12 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
});
|
||||
}
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u6574\u7406\u5f85\u5904\u7406\u56fe\u5e93\u4eba\u5458\u6570\u636eend");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn 整理待处理图库人员数据end");
|
||||
ArrayList syncPersonList = Lists.newArrayList();
|
||||
if (StringUtils.isNotBlank((CharSequence)synData.getPersonId())) {
|
||||
ImgStorePerson personExpiryDate;
|
||||
List associatedPersonExpiryDateAfterUpdate;
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u5355\u4eba\u5458\u66f4\u65b0\u6ce8\u518c\u7167\uff1a{}\uff0c{}", (Object)synData.getPersonId(), (Object)synData.getOldImageId());
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn 单人员更新注册照:{},{}", (Object)synData.getPersonId(), (Object)synData.getOldImageId());
|
||||
Map<String, GroupPersonRef> associatedPersonResultsAfterUpdate2 = this.cpImageStorePersonManager.getGroupPersonRefByPersons(waitSyncImageStore.getId(), Lists.newArrayList((Object[])new String[]{synData.getPersonId()}));
|
||||
Map<String, GroupPersonRef> associatedPersonResultsBeforeUpdate = this.cpImageStorePersonManager.getOldAssociatedPersonIds(waitSyncImageStore.getId(), Lists.newArrayList((Object[])new String[]{synData.getPersonId()}));
|
||||
GroupPersonRef refAfterUpdate = associatedPersonResultsAfterUpdate2.get(synData.getPersonId());
|
||||
@@ -434,13 +434,13 @@ extends AbstractImagStoreService {
|
||||
} else if (refAfterUpdate != null) {
|
||||
refNeedAdd.add(refAfterUpdate);
|
||||
} else {
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u66f4\u65b0\u524d\u540e\u6570\u636e\u4e22\u5931");
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreIncrementSyn 更新前后数据丢失");
|
||||
}
|
||||
}
|
||||
syncPersonList.addAll(this.cpImageStorePersonTxHandler.handleImageStoreChange(waitSyncImageStore, refNeedAdd, refNeedUpdate, refNeedDelete));
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u6dfb\u52a0\u6709\u6548\u671f\u4efb\u52a1\uff0c\u5e76\u5224\u65ad\u4e0b\u53d1");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn 添加有效期任务,并判断下发");
|
||||
this.cpImageStorePersonValidateManager.addValidateData(syncPersonList);
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn \u589e\u91cf\u5904\u7406\u5f85\u540c\u6b65\u56fe\u5e93end");
|
||||
this.logger.info("CpImageStorePersonSynManager handleImageStoreIncrementSyn 增量处理待同步图库end");
|
||||
}
|
||||
|
||||
private AgImageStoreResult getImageStoreById(String imageStoreId) throws Exception {
|
||||
@@ -450,7 +450,7 @@ extends AbstractImagStoreService {
|
||||
CloudwalkResult waitSyncImageStoreChangeResult = this.agImageStoreService.query(imageStoreQueryParamChange);
|
||||
if (!waitSyncImageStoreChangeResult.isSuccess()) {
|
||||
this.logger.warn("CpImageStorePersonSynManager handleImageStoreFullSyn query is_del change list fail,result:{}", (Object)JSONObject.toJSONString((Object)waitSyncImageStoreChangeResult));
|
||||
throw new Exception("cwos\u67e5\u8be2\u56fe\u5e93\u4fe1\u606f\u5931\u8d25");
|
||||
throw new Exception("cwos查询图库信息失败");
|
||||
}
|
||||
if (Collections3.isEmpty((Collection)((Collection)waitSyncImageStoreChangeResult.getData()))) {
|
||||
return null;
|
||||
@@ -459,7 +459,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
|
||||
public Long addWaitSynTask(String imageStoreId, String jsonData) {
|
||||
this.logger.info("addWaitSynTask - \u56fe\u5e93\u5f85\u540c\u6b65\u4efb\u52a1\u961f\u5217\u961f\u5c3e\u65b0\u589e\u4efb\u52a1 imageStoreId\uff1a{}; jsonData: {}", (Object)imageStoreId, (Object)jsonData);
|
||||
this.logger.info("addWaitSynTask - 图库待同步任务队列队尾新增任务 imageStoreId:{}; jsonData: {}", (Object)imageStoreId, (Object)jsonData);
|
||||
return (Long)this.redisTemplate.execute(connection -> (Long)connection.eval(this.addWaitSynTaskRedisScript.getScriptAsString().getBytes(), ReturnType.INTEGER, 0, (byte[][])new byte[][]{imageStoreId.getBytes(), jsonData.getBytes()}));
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ extends AbstractImagStoreService {
|
||||
String imageStoreId = synQueueHeadDataKey.replaceFirst(SYN_QUEUE_HEAD_DATA, "");
|
||||
Set lockKeys = this.redisTemplate.keys((Object)(imageStoreId + ":*"));
|
||||
if (Collections3.isEmpty((Collection)lockKeys)) {
|
||||
this.logger.info("CpImageStorePersonSynManager checkHandleSynTaskException \u6d88\u8d39\u52a0\u9501");
|
||||
this.logger.info("CpImageStorePersonSynManager checkHandleSynTaskException 消费加锁");
|
||||
this.handleFailSynTask(imageStoreId);
|
||||
this.handleGroupPersonSynTask(imageStoreId);
|
||||
}
|
||||
@@ -500,7 +500,7 @@ extends AbstractImagStoreService {
|
||||
String imageStoreId = waitSynTaskKey.replaceFirst(WAIT_SYN_TASK_KEY, "");
|
||||
Set lockKeys = this.redisTemplate.keys((Object)(imageStoreId + ":*"));
|
||||
if (Collections3.isEmpty((Collection)lockKeys)) {
|
||||
this.logger.info("CpImageStorePersonSynManager checkHandleSynTaskException \u672a\u6d88\u8d39");
|
||||
this.logger.info("CpImageStorePersonSynManager checkHandleSynTaskException 未消费");
|
||||
this.handleFailSynTask(imageStoreId);
|
||||
this.handleGroupPersonSynTask(imageStoreId);
|
||||
}
|
||||
|
||||
+19
-19
@@ -71,18 +71,18 @@ extends AbstractImagStoreService {
|
||||
@Transactional(rollbackFor={Exception.class}, propagation=Propagation.REQUIRED)
|
||||
public List<SyncPersonDTO> handleImageStoreChange(AgImageStoreResult waitSyncImageStore, List<GroupPersonRef> personIdsNeedAdd, List<GroupPersonRef> personIdsNeedUpdate, List<GroupPersonRef> personIdsNeedDelete) {
|
||||
ArrayList<SyncPersonDTO> resultList = new ArrayList<SyncPersonDTO>();
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u65b0\u589e\u4eba\u5458start");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理新增人员start");
|
||||
resultList.addAll(this.handleImageStorePersonChange(personIdsNeedAdd, true));
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u65b0\u589e\u4eba\u5458end");
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u66f4\u65b0\u4eba\u5458start");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理新增人员end");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理更新人员start");
|
||||
resultList.addAll(this.handleImageStorePersonChange(personIdsNeedUpdate, false));
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u66f4\u65b0\u4eba\u5458end");
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u5220\u9664\u4eba\u5458start");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理更新人员end");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理删除人员start");
|
||||
for (GroupPersonRef delGroupPersonRef : personIdsNeedDelete) {
|
||||
resultList.add(this.generateDelSyncPersonDTO(delGroupPersonRef, -1, delGroupPersonRef.getExpiryBeginDate(), delGroupPersonRef.getExpiryEndDate()));
|
||||
}
|
||||
this.handleImageStorePersonDelete(waitSyncImageStore.getId(), personIdsNeedDelete.stream().map(GroupPersonRef::getPersonId).collect(Collectors.toList()));
|
||||
this.logger.info("CpImageStorePersonUpdateTask\uff0c\u5904\u7406\u5220\u9664\u4eba\u5458end");
|
||||
this.logger.info("CpImageStorePersonUpdateTask,处理删除人员end");
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -145,9 +145,9 @@ extends AbstractImagStoreService {
|
||||
dto.setCode("");
|
||||
dto.setErrorMessage("");
|
||||
dto.setLastUpdateTime(modGroupPersonRef.getLastUpdateTime());
|
||||
dto.setUpdateInfo("\u66f4\u65b0\u56fe\u5e93\u4eba\u5458\u4fe1\u606f,\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55\u72b6\u6001:\u8bbe\u5907\u672a\u62c9\u53d6");
|
||||
dto.setUpdateInfo("更新图库人员信息,更新同步记录状态:设备未拉取");
|
||||
int res = this.devicePersonSyncLogMapper.updateStatusByGroupPersonRef(dto);
|
||||
this.logger.debug("\u66f4\u65b0\u56fe\u5e93\u4eba\u5458\u4fe1\u606f[{}],\u66f4\u65b0[{}]\u6761\u540c\u6b65\u8bb0\u5f55\u72b6\u6001\u4e3a\u672a\u62c9\u53d6", (Object)modGroupPersonRef.getId(), (Object)res);
|
||||
this.logger.debug("更新图库人员信息[{}],更新[{}]条同步记录状态为未拉取", (Object)modGroupPersonRef.getId(), (Object)res);
|
||||
}
|
||||
}
|
||||
return syncPersonList;
|
||||
@@ -195,7 +195,7 @@ extends AbstractImagStoreService {
|
||||
devicePersonSyncLogDTO.setCode("");
|
||||
devicePersonSyncLogDTO.setErrorMessage("");
|
||||
devicePersonSyncLogDTO.setLastUpdateTime(deleteParam.getLastUpdateTime());
|
||||
devicePersonSyncLogDTO.setUpdateInfo("\u5220\u9664\u4eba\u5458,\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55\u72b6\u6001:\u8bbe\u5907\u672a\u62c9\u53d6");
|
||||
devicePersonSyncLogDTO.setUpdateInfo("删除人员,更新同步记录状态:设备未拉取");
|
||||
devicePersonSyncLogDTO.setIsDel(Integer.valueOf(DelStatusEnum.DELETED.getCode().shortValue()));
|
||||
List partition = Lists.partition(changePersonIds, (int)this.delBatchSize);
|
||||
for (List list : partition) {
|
||||
@@ -203,7 +203,7 @@ extends AbstractImagStoreService {
|
||||
devicePersonSyncLogDTO.setPersonIds(list);
|
||||
this.groupPersonRefMapper.logicDeleteExpireNullByParam(deleteParam);
|
||||
int res = this.devicePersonSyncLogMapper.updateStatusByCondition(devicePersonSyncLogDTO);
|
||||
this.logger.debug("\u5220\u9664\u4eba\u5458,\u66f4\u65b0[{}]\u6761\u540c\u6b65\u8bb0\u5f55,\u56fe\u5e93Id:[{}],\u4eba\u5458Id\u5217\u8868[{}]", new Object[]{res, imageStoreId, JSON.toJSONString((Object)list)});
|
||||
this.logger.debug("删除人员,更新[{}]条同步记录,图库Id:[{}],人员Id列表[{}]", new Object[]{res, imageStoreId, JSON.toJSONString((Object)list)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,14 +261,14 @@ extends AbstractImagStoreService {
|
||||
queryDto.setImageIds(Arrays.asList(imageId));
|
||||
List personList = this.imgStorePersonMapper.getByImageId(queryDto);
|
||||
if (CollectionUtils.isEmpty((Collection)personList)) {
|
||||
this.logger.warn("\u6839\u636eimageId[{}]\u83b7\u53d6\u4e0d\u5230\u4eba\u5458\u4fe1\u606f", (Object)imageId);
|
||||
throw new ServiceException("\u4eba\u5458\u4fe1\u606f\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", this.getMessage("\u4eba\u5458\u4fe1\u606f\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}"));
|
||||
this.logger.warn("根据imageId[{}]获取不到人员信息", (Object)imageId);
|
||||
throw new ServiceException("人员信息详情查询失败,原因:{}", this.getMessage("人员信息详情查询失败,原因:{}"));
|
||||
}
|
||||
GroupPersonRef groupPersonRef = new GroupPersonRef();
|
||||
groupPersonRef.setImageStoreId(imageStoreId);
|
||||
List groupPersonRefList = this.groupPersonRefMapper.selectByCondition(groupPersonRef, personList.stream().map(ImgStorePerson::getId).collect(Collectors.toList()));
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.warn("\u56fe\u5e93\u56fe\u7247\u540c\u6b65\u5931\u8d25,\u6839\u636eimageStoreId:[{}],personId:[{}]\u83b7\u53d6\u4e0d\u5230\u56fe\u5e93\u4eba\u5458\u5217\u8868\u4fe1\u606f", (Object)imageStoreId, (Object)((HandleFaceResult)handleFaceResult.getData()).getPersonId());
|
||||
this.logger.warn("图库图片同步失败,根据imageStoreId:[{}],personId:[{}]获取不到图库人员列表信息", (Object)imageStoreId, (Object)((HandleFaceResult)handleFaceResult.getData()).getPersonId());
|
||||
throw new ServiceException("53014702", this.getMessage("53014702"));
|
||||
}
|
||||
groupPersonRef.setGroupStatus(add ? GroupModelStatusEnum.MODEL_FAILED.getCode() : GroupModelStatusEnum.MODEL_DEL_FAILED.getCode());
|
||||
@@ -356,17 +356,17 @@ extends AbstractImagStoreService {
|
||||
long s1 = System.currentTimeMillis();
|
||||
List list = this.groupPersonRefMapper.queryHandleFaceException(DelStatusEnum.NORAML.getCode(), Arrays.asList(GroupModelStatusEnum.MODEL_WAIT.getCode(), GroupModelStatusEnum.MODEL_FAILED.getCode()));
|
||||
long e1 = System.currentTimeMillis();
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u67e5\u8be2\u4eba\u5458\u6b63\u5e38\u4f46\u672a\u5165\u5e93\u3001\u5165\u5e93\u5931\u8d25 \u8017\u65f6\uff1a[{}]", (Object)(e1 - s1));
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 查询人员正常但未入库、入库失败 耗时:[{}]", (Object)(e1 - s1));
|
||||
Map<Short, List<GroupPersonRefDTO>> groupPersonMap = list.stream().collect(Collectors.groupingBy(GroupPersonRef::getGroupStatus));
|
||||
if (!CollectionUtils.isEmpty((Collection)list)) {
|
||||
List<GroupPersonRefDTO> modelWaitList = groupPersonMap.get(GroupModelStatusEnum.MODEL_WAIT.getCode());
|
||||
List<GroupPersonRefDTO> modelFailedList = groupPersonMap.get(GroupModelStatusEnum.MODEL_FAILED.getCode());
|
||||
if (!CollectionUtils.isEmpty(modelWaitList)) {
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u5904\u7406\u672a\u5165\u5e93[{}]", (Object)modelWaitList.size());
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 处理未入库[{}]", (Object)modelWaitList.size());
|
||||
modelWaitList.stream().forEach(groupPersonRef -> this.addFace((GroupPersonRefDTO)groupPersonRef));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(modelFailedList)) {
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u5904\u7406\u5165\u5e93\u5931\u8d25[{}]", (Object)modelFailedList.size());
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 处理入库失败[{}]", (Object)modelFailedList.size());
|
||||
modelFailedList.stream().forEach(groupPersonRef -> this.addFace((GroupPersonRefDTO)groupPersonRef));
|
||||
}
|
||||
}
|
||||
@@ -374,16 +374,16 @@ extends AbstractImagStoreService {
|
||||
long s2 = System.currentTimeMillis();
|
||||
list = this.groupPersonRefMapper.queryHandleFaceException(DelStatusEnum.DELETED.getCode(), Arrays.asList(GroupModelStatusEnum.MODEL_COMPLETED.getCode(), GroupModelStatusEnum.MODEL_DEL_FAILED.getCode()));
|
||||
long e2 = System.currentTimeMillis();
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u67e5\u8be2\u4eba\u5458\u5220\u9664\u4f46\u5165\u5e93\u5b8c\u6210\u3001\u5220\u9664\u5931\u8d25 \u8017\u65f6\uff1a[{}]", (Object)(e2 - s2));
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 查询人员删除但入库完成、删除失败 耗时:[{}]", (Object)(e2 - s2));
|
||||
groupPersonMap = list.stream().collect(Collectors.groupingBy(GroupPersonRef::getGroupStatus));
|
||||
List<GroupPersonRefDTO> modelCompleteList = groupPersonMap.get(GroupModelStatusEnum.MODEL_COMPLETED.getCode());
|
||||
List<GroupPersonRefDTO> modelDelFailedList = groupPersonMap.get(GroupModelStatusEnum.MODEL_DEL_FAILED.getCode());
|
||||
if (!CollectionUtils.isEmpty(modelCompleteList)) {
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u5904\u7406\u5165\u5e93\u6210\u529f[{}]", (Object)modelCompleteList.size());
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 处理入库成功[{}]", (Object)modelCompleteList.size());
|
||||
modelCompleteList.stream().forEach(groupPersonRef -> this.removeFace((GroupPersonRefDTO)groupPersonRef));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(modelDelFailedList)) {
|
||||
this.logger.debug("HandleGroupFaceExceptionTask \u5904\u7406\u5220\u9664\u5931\u8d25[{}]", (Object)modelDelFailedList.size());
|
||||
this.logger.debug("HandleGroupFaceExceptionTask 处理删除失败[{}]", (Object)modelDelFailedList.size());
|
||||
modelDelFailedList.stream().forEach(groupPersonRef -> this.removeFace((GroupPersonRefDTO)groupPersonRef));
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -78,7 +78,7 @@ public class CpImageStorePersonValidateManager {
|
||||
*/
|
||||
public void addValidateData(List<SyncPersonDTO> syncPersonList) {
|
||||
Long lockValue;
|
||||
log.info("bind\u63a5\u53e3service \u67e5\u8be2syncPersonList\uff1a{}", (Object)JSONObject.toJSONString(syncPersonList));
|
||||
log.info("bind接口service 查询syncPersonList:{}", (Object)JSONObject.toJSONString(syncPersonList));
|
||||
ConcurrentHashSet deleteSet = new ConcurrentHashSet();
|
||||
ConcurrentHashMap addMap = new ConcurrentHashMap();
|
||||
ConcurrentHashMap removeMap = new ConcurrentHashMap();
|
||||
@@ -121,10 +121,10 @@ public class CpImageStorePersonValidateManager {
|
||||
log.error("CpImageStorePersonValidateManager addValidateData removeJob time out");
|
||||
}
|
||||
catch (SchedulerException e) {
|
||||
log.error("\u83b7\u53d6trigger\u5f02\u5e38\uff1a{}", (Object)e.getLocalizedMessage());
|
||||
log.error("获取trigger异常:{}", (Object)e.getLocalizedMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u79fb\u9664trigger\u672a\u77e5\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
log.error("移除trigger未知异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
finally {
|
||||
this.validateJobGroupUnLock(l, lockValue);
|
||||
@@ -155,10 +155,10 @@ public class CpImageStorePersonValidateManager {
|
||||
log.error("CpImageStorePersonValidateManager addValidateData addOrModJob time out");
|
||||
}
|
||||
catch (SchedulerException e) {
|
||||
log.error("\u6dfb\u52a0trigger\u5f02\u5e38\uff1a{}", (Object)e.getLocalizedMessage());
|
||||
log.error("添加trigger异常:{}", (Object)e.getLocalizedMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u6dfb\u52a0trigger\u672a\u77e5\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
log.error("添加trigger未知异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
finally {
|
||||
this.validateJobGroupUnLock(l, lockValue);
|
||||
@@ -199,7 +199,7 @@ public class CpImageStorePersonValidateManager {
|
||||
|
||||
private boolean validateJobGroupLock(Long key, Long lockValue) {
|
||||
Long start = System.currentTimeMillis();
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupLock\uff1a{},{},{}", new Object[]{key, lockValue, start});
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupLock:{},{},{}", new Object[]{key, lockValue, start});
|
||||
String lockKey = "validate_job_group_lock:" + key;
|
||||
while (true) {
|
||||
Long lockResult;
|
||||
@@ -208,7 +208,7 @@ public class CpImageStorePersonValidateManager {
|
||||
return true;
|
||||
}
|
||||
long waitTime = System.currentTimeMillis() - start;
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupLock wait\uff1a{},{}", (Object)key, (Object)waitTime);
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupLock wait:{},{}", (Object)key, (Object)waitTime);
|
||||
if (waitTime >= Long.valueOf(this.lockValidateJobGroupTimeOut)) {
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupLock wait out:{}", (Object)key);
|
||||
return false;
|
||||
@@ -227,14 +227,14 @@ public class CpImageStorePersonValidateManager {
|
||||
}
|
||||
|
||||
private boolean validateJobGroupUnLock(Long key, Long lockValue) {
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupUnLock\uff1a{},{}", (Object)key, (Object)lockValue);
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupUnLock:{},{}", (Object)key, (Object)lockValue);
|
||||
String lockKey = "validate_job_group_lock:" + key;
|
||||
Long lockResult = (Long)this.redisTemplate.execute(connection -> (Long)connection.eval(this.unlockValidateJobRedisScript.getScriptAsString().getBytes(), ReturnType.INTEGER, 0, (byte[][])new byte[][]{lockKey.getBytes(), String.valueOf(lockValue).getBytes()}));
|
||||
if (0L == lockResult) {
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupUnLock success\uff1a{},{}", (Object)key, (Object)lockValue);
|
||||
log.info("CpImageStorePersonValidateManager validateJobGroupUnLock success:{},{}", (Object)key, (Object)lockValue);
|
||||
return true;
|
||||
}
|
||||
log.error("CpImageStorePersonValidateManager validateJobGroupUnLock fail\uff1a{},{}", (Object)key, (Object)lockValue);
|
||||
log.error("CpImageStorePersonValidateManager validateJobGroupUnLock fail:{},{}", (Object)key, (Object)lockValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ public class CpImageStorePersonValidateManager {
|
||||
|
||||
public void syncDataToGroup(String dataJson) {
|
||||
Set<String> keySet;
|
||||
log.info("CpImageStorePersonValidateManager syncDataToGroup start dataJson\uff1a{}", (Object)dataJson);
|
||||
log.info("CpImageStorePersonValidateManager syncDataToGroup start dataJson:{}", (Object)dataJson);
|
||||
List<SyncPersonLocal> syncPersonDTOS = JsonUtils.toObjList(dataJson, SyncPersonLocal.class);
|
||||
Map<Integer, List<SyncPersonLocal>> map = syncPersonDTOS.parallelStream().collect(Collectors.groupingBy(SyncPersonLocal::getAction));
|
||||
List<SyncPersonLocal> addList = map.get(0);
|
||||
@@ -402,7 +402,7 @@ public class CpImageStorePersonValidateManager {
|
||||
*/
|
||||
public void delayAddValidateTrigger() {
|
||||
if (!this.delayAddValidateData.booleanValue()) {
|
||||
log.debug("DelayPersonValidateTask \u672a\u5f00\u542f\u5ef6\u8fdf\u6dfb\u52a0\u5b9a\u65f6\u4efb\u52a1\u5f00\u5173");
|
||||
log.debug("DelayPersonValidateTask 未开启延迟添加定时任务开关");
|
||||
return;
|
||||
}
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
@@ -414,7 +414,7 @@ public class CpImageStorePersonValidateManager {
|
||||
queryGroupPersonDTO.setExpiryEndDateStatus(Integer.valueOf(0));
|
||||
List waitAddValidateList = this.groupPersonRefMapper.queryByExpiryDateStatus(queryGroupPersonDTO);
|
||||
if (CollectionUtils.isEmpty((Collection)waitAddValidateList)) {
|
||||
log.debug("[{}-{}]\u65f6\u95f4\u8303\u56f4\u5185\u6ca1\u6709\u9700\u8981\u6dfb\u52a0\u7684trigger", (Object)queryGroupPersonDTO.getStartTime(), (Object)queryGroupPersonDTO.getEndTime());
|
||||
log.debug("[{}-{}]时间范围内没有需要添加的trigger", (Object)queryGroupPersonDTO.getStartTime(), (Object)queryGroupPersonDTO.getEndTime());
|
||||
}
|
||||
ConcurrentHashMap addMap = new ConcurrentHashMap();
|
||||
ConcurrentHashSet addSet = new ConcurrentHashSet();
|
||||
@@ -458,10 +458,10 @@ public class CpImageStorePersonValidateManager {
|
||||
log.error("CpImageStorePersonValidateManager addValidateData addOrModJob time out");
|
||||
}
|
||||
catch (SchedulerException e) {
|
||||
log.error("\u6dfb\u52a0trigger\u5f02\u5e38\uff1a{}", (Object)e.getLocalizedMessage());
|
||||
log.error("添加trigger异常:{}", (Object)e.getLocalizedMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u6dfb\u52a0trigger\u672a\u77e5\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
log.error("添加trigger未知异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
finally {
|
||||
this.validateJobGroupUnLock(l, lockValue);
|
||||
|
||||
+6
-6
@@ -300,14 +300,14 @@ implements CpImageStoreService {
|
||||
result.setBusinessName(this.getBusinessName(result.getBusinessId()));
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u4f01\u4e1a\u540d\u79f0\u9519\u8befe:{}", (Object)e.getMessage());
|
||||
this.logger.error("查询企业名称错误e:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
try {
|
||||
result.setSourceApplicationName(this.getSourceApplicationName(result.getSourceApplicationId()));
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u6765\u6e90\u5e94\u7528\u540d\u79f0\u9519\u8befe:{}", (Object)e.getMessage());
|
||||
this.logger.error("查询来源应用名称错误e:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
this.getAssociated(result);
|
||||
@@ -317,7 +317,7 @@ implements CpImageStoreService {
|
||||
if (deviceResult.isSuccess()) {
|
||||
result.setDevices(this.getDeviceList((List)deviceResult.getData(), context));
|
||||
} else {
|
||||
this.logger.error("\u56fe\u5e93\u8be6\u60c5\u5173\u8054\u8bbe\u5907\u540d\u79f0\u83b7\u53d6\u5931\u8d25\uff0cresult:[{}]", (Object)JSONObject.toJSONString((Object)deviceResult));
|
||||
this.logger.error("图库详情关联设备名称获取失败,result:[{}]", (Object)JSONObject.toJSONString((Object)deviceResult));
|
||||
}
|
||||
ApplicationImageStoreQueryParam appParam = new ApplicationImageStoreQueryParam();
|
||||
appParam.setImageStoreId(param.getId());
|
||||
@@ -325,7 +325,7 @@ implements CpImageStoreService {
|
||||
if (appResult.isSuccess()) {
|
||||
result.setApplicationNames(Collections3.extractToList((Collection)((Collection)appResult.getData()), (String)"applicationName"));
|
||||
} else {
|
||||
this.logger.error("\u56fe\u5e93\u8be6\u60c5\u5173\u8054\u5e94\u7528\u540d\u79f0\u83b7\u53d6\u5931\u8d25\uff0cresult:[{}]", (Object)JSONObject.toJSONString((Object)appResult));
|
||||
this.logger.error("图库详情关联应用名称获取失败,result:[{}]", (Object)JSONObject.toJSONString((Object)appResult));
|
||||
}
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
@@ -714,7 +714,7 @@ implements CpImageStoreService {
|
||||
}
|
||||
});
|
||||
long endTime = System.currentTimeMillis();
|
||||
this.logger.info("\u56fe\u5e93\u5206\u9875\u67e5\u8be2\u8017\u65f6:[{}],searchSize:[{}]", (Object)(endTime - startTime), (Object)this.searchSize);
|
||||
this.logger.info("图库分页查询耗时:[{}],searchSize:[{}]", (Object)(endTime - startTime), (Object)this.searchSize);
|
||||
Map<String, Integer> countMap = countByImageStoreIds.stream().filter(imageStoreCountDTO -> null != imageStoreCountDTO).collect(Collectors.toMap(ImageStoreCountDTO::getId, ImageStoreCountDTO::getCount, (k1, k2) -> k1));
|
||||
Map<String, String> businessNameMap = this.getBusinessNameMap();
|
||||
Map<String, String> sourceApplicationNameMap = this.getSourceApplicationNameMap(businessId);
|
||||
@@ -745,7 +745,7 @@ implements CpImageStoreService {
|
||||
}
|
||||
});
|
||||
long endTime = System.currentTimeMillis();
|
||||
this.logger.info("\u56fe\u5e93\u5206\u9875\u67e5\u8be2\u8017\u65f6:[{}],searchSize:[{}]", (Object)(endTime - startTime), (Object)this.searchSize);
|
||||
this.logger.info("图库分页查询耗时:[{}],searchSize:[{}]", (Object)(endTime - startTime), (Object)this.searchSize);
|
||||
Map<String, Integer> countMap = countByImageStoreIds.stream().filter(imageStoreCountDTO -> null != imageStoreCountDTO).collect(Collectors.toMap(ImageStoreCountDTO::getId, ImageStoreCountDTO::getCount, (k1, k2) -> k1));
|
||||
Map<String, String> businessNameMap = this.getBusinessNameMap();
|
||||
Map<String, String> sourceApplicationNameMap = this.getSourceApplicationNameMap(businessId);
|
||||
|
||||
+4
-4
@@ -30,10 +30,10 @@ public class CpImageStoreSyncManager {
|
||||
CloudwalkResult addSyncResult = this.aggDeviceImageStoreService.sync(addParam, new CloudwalkCallContext());
|
||||
if (addSyncResult.isSuccess()) continue;
|
||||
String message = JSON.toJSONString((Object)addSyncResult);
|
||||
this.logger.warn("addImageStoreSync error\uff0cresult:[{}]", (Object)message);
|
||||
this.logger.warn("addImageStoreSync error,result:[{}]", (Object)message);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.warn("addImageStoreSync exception\uff0cimageStoreId:[{}]", (Object)changeGroupId, (Object)e);
|
||||
this.logger.warn("addImageStoreSync exception,imageStoreId:[{}]", (Object)changeGroupId, (Object)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,10 +52,10 @@ public class CpImageStoreSyncManager {
|
||||
CloudwalkResult addSyncResult = this.aggDeviceImageStoreService.sync(addParam, new CloudwalkCallContext());
|
||||
if (addSyncResult.isSuccess()) continue;
|
||||
String message = JSON.toJSONString((Object)addSyncResult);
|
||||
this.logger.warn("addImageStoreSync error\uff0cresult:[{}]", (Object)message);
|
||||
this.logger.warn("addImageStoreSync error,result:[{}]", (Object)message);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.warn("addImageStoreSync exception\uff0cimageStoreId:[{}]", (Object)changeGroupId, (Object)e);
|
||||
this.logger.warn("addImageStoreSync exception,imageStoreId:[{}]", (Object)changeGroupId, (Object)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+37
-37
@@ -73,7 +73,7 @@ implements CpImageStoreToolService {
|
||||
public CloudwalkResult<List<CpFeatureQueryResult>> searchMultiple(CpFeatureQueryParam queryParam) throws ServiceException {
|
||||
String groupId;
|
||||
if (this.logger.isDebugEnabled()) {
|
||||
this.logger.debug("\u5f00\u59cb\u67e5\u8be2\u6240\u6709\u56fe\u5e93topN,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)queryParam));
|
||||
this.logger.debug("开始查询所有图库topN,参数:{}", (Object)JSON.toJSONString((Object)queryParam));
|
||||
}
|
||||
if (StringUtils.isEmpty((Object)(groupId = queryParam.getImageStoreId())) && !CollectionUtils.isEmpty((Collection)queryParam.getImageStoreIds())) {
|
||||
groupId = String.join((CharSequence)",", queryParam.getImageStoreIds());
|
||||
@@ -95,11 +95,11 @@ implements CpImageStoreToolService {
|
||||
}
|
||||
SearchFaceMutipleParam searchMutipleParam = SearchFaceMutipleParam.builder().groupId(groupId).topN(queryParam.getTopN()).feature(feature).mode("all").bTime(queryParam.getBeginTime()).eTime(queryParam.getEndTime()).build();
|
||||
if (this.logger.isDebugEnabled()) {
|
||||
this.logger.debug("\u67e5\u8be2\u6240\u6709\u56fe\u5e93topN,\u5f15\u64ce\u591a\u5e93\u68c0\u7d22\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)searchMutipleParam));
|
||||
this.logger.debug("查询所有图库topN,引擎多库检索参数:{}", (Object)JSON.toJSONString((Object)searchMutipleParam));
|
||||
}
|
||||
SearchFaceMutipleResult searchMutipleResult = this.pineappleClient.searchMultiple(searchMutipleParam);
|
||||
if (this.logger.isDebugEnabled()) {
|
||||
this.logger.debug("\u67e5\u8be2\u6240\u6709\u56fe\u5e93topN,\u5f15\u64ce\u591a\u5e93\u68c0\u7d22\u7ed3\u679c:{}", (Object)JSON.toJSONString((Object)searchMutipleResult));
|
||||
this.logger.debug("查询所有图库topN,引擎多库检索结果:{}", (Object)JSON.toJSONString((Object)searchMutipleResult));
|
||||
}
|
||||
if (searchMutipleResult.getResult() != 0) {
|
||||
throw new ServiceException(searchMutipleResult.getResult().toString(), searchMutipleResult.getInfo());
|
||||
@@ -119,7 +119,7 @@ implements CpImageStoreToolService {
|
||||
public CloudwalkResult<Map<String, List<CpFeatureQueryResult>>> searchMultipleEveryGroup(CpFeatureQueryParam queryParam) throws ServiceException {
|
||||
String groupId;
|
||||
if (this.logger.isDebugEnabled()) {
|
||||
this.logger.debug("\u5f00\u59cb\u67e5\u8be2\u6bcf\u4e2a\u56fe\u5e93topN,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)queryParam));
|
||||
this.logger.debug("开始查询每个图库topN,参数:{}", (Object)JSON.toJSONString((Object)queryParam));
|
||||
}
|
||||
if (StringUtils.isEmpty((Object)(groupId = queryParam.getImageStoreId()))) {
|
||||
groupId = String.join((CharSequence)",", queryParam.getImageStoreIds());
|
||||
@@ -140,9 +140,9 @@ implements CpImageStoreToolService {
|
||||
throw new ServiceException("53060436", this.getMessage("53060436"));
|
||||
}
|
||||
SearchFaceMutipleParam searchMutipleParam = SearchFaceMutipleParam.builder().groupId(groupId).topN(queryParam.getTopN()).feature(feature).mode("perGroup").bTime(queryParam.getBeginTime()).eTime(queryParam.getEndTime()).build();
|
||||
this.logger.info("\u67e5\u8be2\u6bcf\u4e2a\u56fe\u5e93topN,\u5f15\u64ce\u591a\u5e93\u68c0\u7d22\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)searchMutipleParam));
|
||||
this.logger.info("查询每个图库topN,引擎多库检索参数:{}", (Object)JSON.toJSONString((Object)searchMutipleParam));
|
||||
SearchFaceMutiplePerGroupResult searchMutiplePerGroupResult = this.pineappleClient.searchMultipleEveryGroup(searchMutipleParam);
|
||||
this.logger.info("\u67e5\u8be2\u6bcf\u4e2a\u56fe\u5e93topN,\u5f15\u64ce\u591a\u5e93\u68c0\u7d22\u7ed3\u679c:{}", (Object)JSON.toJSONString((Object)searchMutiplePerGroupResult));
|
||||
this.logger.info("查询每个图库topN,引擎多库检索结果:{}", (Object)JSON.toJSONString((Object)searchMutiplePerGroupResult));
|
||||
if (searchMutiplePerGroupResult.getResult() != 0) {
|
||||
throw new ServiceException(searchMutiplePerGroupResult.getResult().toString(), searchMutiplePerGroupResult.getInfo());
|
||||
}
|
||||
@@ -168,7 +168,7 @@ implements CpImageStoreToolService {
|
||||
}
|
||||
|
||||
public CloudwalkResult<AgFeatureExtractResult> extractFeature(AgFeatureExtractParam extractParam) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u7279\u5f81\u63d0\u53d6,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)extractParam));
|
||||
this.logger.info("开始特征提取,参数:{}", (Object)JSON.toJSONString((Object)extractParam));
|
||||
String img = extractParam.getImageBase64();
|
||||
if (StringUtils.isEmpty((Object)img) && !StringUtils.isEmpty((Object)extractParam.getImageUrl())) {
|
||||
try {
|
||||
@@ -176,7 +176,7 @@ implements CpImageStoreToolService {
|
||||
img = ImageUtil.encodeByte2Base64(bytes);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4e0b\u8f7d\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("下载图片异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("80014016", this.getMessage("80014016"));
|
||||
}
|
||||
}
|
||||
@@ -190,11 +190,11 @@ implements CpImageStoreToolService {
|
||||
extractFeatureResult = future.get();
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
this.logger.error("\u5f15\u64ce\u63d0\u53d6\u7279\u5f81\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("引擎提取特征异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("53060435", this.getMessage("53060435"));
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
this.logger.error("\u5f15\u64ce\u63d0\u53d6\u7279\u5f81\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("引擎提取特征异常:{}", (Object)e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
if (null == extractFeatureResult) {
|
||||
@@ -211,12 +211,12 @@ implements CpImageStoreToolService {
|
||||
result.setScore((Double)quality.get(0));
|
||||
result.setAge(Integer.valueOf(new BigDecimal(qualityScores.get(10)).setScale(0, 4).intValue()));
|
||||
result.setGender(Integer.valueOf(new BigDecimal(qualityScores.get(11)).setScale(0).intValue()));
|
||||
this.logger.info("\u7ed3\u675f\u7279\u5f81\u63d0\u53d6,\u7ed3\u679c:{}", (Object)JSON.toJSONString((Object)result));
|
||||
this.logger.info("结束特征提取,结果:{}", (Object)JSON.toJSONString((Object)result));
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
|
||||
public CloudwalkResult<FaceDetectResult> faceDetect(CpFaceDetectParam faceDetectParam) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u4eba\u8138\u68c0\u6d4b,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)faceDetectParam));
|
||||
this.logger.info("开始人脸检测,参数:{}", (Object)JSON.toJSONString((Object)faceDetectParam));
|
||||
String img = faceDetectParam.getImageBase64();
|
||||
if (StringUtils.isEmpty((Object)img) && !StringUtils.isEmpty((Object)faceDetectParam.getImageUrl())) {
|
||||
try {
|
||||
@@ -237,11 +237,11 @@ implements CpImageStoreToolService {
|
||||
faceDetectResult = future.get();
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
this.logger.error("\u5f15\u64ce\u4eba\u8138\u68c0\u6d4b\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("引擎人脸检测异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("53060439", this.getMessage("53060439"));
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
this.logger.error("\u5f15\u64ce\u4eba\u8138\u68c0\u6d4b\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("引擎人脸检测异常:{}", (Object)e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
if (null == faceDetectResult) {
|
||||
@@ -250,12 +250,12 @@ implements CpImageStoreToolService {
|
||||
if (faceDetectResult.getResult() != 0) {
|
||||
throw new ServiceException(faceDetectResult.getResult().toString(), faceDetectResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u7ed3\u675f\u4eba\u8138\u68c0\u6d4b,\u7ed3\u679c:{}", (Object)JSON.toJSONString((Object)faceDetectResult));
|
||||
this.logger.info("结束人脸检测,结果:{}", (Object)JSON.toJSONString((Object)faceDetectResult));
|
||||
return CloudwalkResult.success((Object)faceDetectResult);
|
||||
}
|
||||
|
||||
public CloudwalkResult<BatchHandleFaceResult> batchAddFace(CpBatchHandleFaceParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u6279\u91cf\u6dfb\u52a0\u4eba\u8138,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("开始批量添加人脸,参数:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkBatchHandleFaceParam(param);
|
||||
ArrayList items = Lists.newArrayListWithCapacity((int)param.getImageIds().size());
|
||||
BatchAddFaceParam batchAddFaceParam = BatchAddFaceParam.builder().items((List)items).build();
|
||||
@@ -276,7 +276,7 @@ implements CpImageStoreToolService {
|
||||
items.add(item);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u63d0\u53d6\u7279\u5f81\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("提取特征异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
batchAddFaceParam.setItems((List)items);
|
||||
@@ -284,12 +284,12 @@ implements CpImageStoreToolService {
|
||||
if (batchHandleFaceResult.getResult() != 0) {
|
||||
throw new ServiceException(batchHandleFaceResult.getResult().toString(), batchHandleFaceResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u7ed3\u675f\u6279\u91cf\u6dfb\u52a0\u4eba\u8138");
|
||||
this.logger.info("结束批量添加人脸");
|
||||
return CloudwalkResult.success((Object)batchHandleFaceResult);
|
||||
}
|
||||
|
||||
public CloudwalkResult<BatchHandleFaceResult> batchRemoveFace(CpBatchHandleFaceParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u6279\u91cf\u5220\u9664\u4eba\u8138,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("开始批量删除人脸,参数:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkBatchHandleFaceParam(param);
|
||||
ArrayList items = Lists.newArrayListWithCapacity((int)param.getImageIds().size());
|
||||
BatchRemoveFaceParam batchRemoveFaceParam = BatchRemoveFaceParam.builder().items((List)items).build();
|
||||
@@ -304,12 +304,12 @@ implements CpImageStoreToolService {
|
||||
if (batchHandleFaceResult.getResult() != 0) {
|
||||
throw new ServiceException(batchHandleFaceResult.getResult().toString(), batchHandleFaceResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u7ed3\u675f\u6279\u91cf\u5220\u9664\u4eba\u8138");
|
||||
this.logger.info("结束批量删除人脸");
|
||||
return CloudwalkResult.success((Object)batchHandleFaceResult);
|
||||
}
|
||||
|
||||
public CloudwalkResult<Boolean> addFace(CpBatchHandleFaceParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u6dfb\u52a0\u4eba\u8138,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("开始添加人脸,参数:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkBatchHandleFaceParam(param);
|
||||
Map<String, ImgStorePerson> personMap = this.getPersonMap(param.getImageIds());
|
||||
AddFaceParam addFaceParam = AddFaceParam.builder().groupId(param.getImageStoreId()).build();
|
||||
@@ -327,21 +327,21 @@ implements CpImageStoreToolService {
|
||||
addFaceParam.setQualityScore(String.join((CharSequence)",", qualityScoreList));
|
||||
PineappleBaseResult result = this.pineappleClient.addFace(addFaceParam);
|
||||
if (result.getResult() != 0) {
|
||||
this.logger.warn("\u56fe\u5e93[{}]\u6dfb\u52a0\u4eba\u8138[{}]\u5931\u8d25:{}", new Object[]{param.getImageStoreId(), imageId, result.getInfo()});
|
||||
this.logger.warn("图库[{}]添加人脸[{}]失败:{}", new Object[]{param.getImageStoreId(), imageId, result.getInfo()});
|
||||
continue;
|
||||
}
|
||||
++successCount;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93[{}]\u6dfb\u52a0\u4eba\u8138[{}]\u5f02\u5e38:{}", new Object[]{param.getImageStoreId(), imageId, e.getMessage()});
|
||||
this.logger.error("图库[{}]添加人脸[{}]异常:{}", new Object[]{param.getImageStoreId(), imageId, e.getMessage()});
|
||||
}
|
||||
}
|
||||
this.logger.info("\u7ed3\u675f\u6dfb\u52a0\u4eba\u8138");
|
||||
this.logger.info("结束添加人脸");
|
||||
return CloudwalkResult.success((Object)(successCount > 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
public CloudwalkResult<HandleFaceResult> addFace(CpHandleFaceParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u6dfb\u52a0\u4eba\u8138,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("开始添加人脸,参数:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkHandleFaceParam(param);
|
||||
HandleFaceResult handleFaceResult = new HandleFaceResult();
|
||||
try {
|
||||
@@ -349,7 +349,7 @@ implements CpImageStoreToolService {
|
||||
personQueryDto.setImageId(param.getImageId());
|
||||
List personList = this.personMapper.gets(personQueryDto);
|
||||
ImgStorePerson imgStorePerson = CollectionUtils.isEmpty((Collection)personList) ? new ImgStorePerson() : (ImgStorePerson)personList.get(0);
|
||||
this.logger.debug("addFace\u6839\u636eImageId[{}]\u67e5\u8be2person:[{}]", (Object)param.getImageId(), (Object)JSON.toJSONString((Object)imgStorePerson));
|
||||
this.logger.debug("addFace根据ImageId[{}]查询person:[{}]", (Object)param.getImageId(), (Object)JSON.toJSONString((Object)imgStorePerson));
|
||||
AgFeatureExtractParam extractParam = new AgFeatureExtractParam();
|
||||
extractParam.setImageUrl(imgStorePerson.getComparePicture());
|
||||
CloudwalkResult<AgFeatureExtractResult> extractResult = this.extractFeature(extractParam);
|
||||
@@ -369,13 +369,13 @@ implements CpImageStoreToolService {
|
||||
handleFaceResult.setPersonId(Optional.ofNullable(imgStorePerson).map(p -> p.getId()).orElse(""));
|
||||
handleFaceResult.setAge(CollectionUtils.isEmpty(qualityScoreList) ? null : Integer.valueOf(new BigDecimal((String)qualityScoreList.get(10)).setScale(2, 3).intValue()));
|
||||
handleFaceResult.setGender(CollectionUtils.isEmpty(qualityScoreList) ? null : Short.valueOf(new BigDecimal((String)qualityScoreList.get(11)).shortValue()));
|
||||
this.logger.info("\u56fe\u5e93[{}]\u4eba\u8138[{}]\u5df2\u5b58\u5728", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
this.logger.info("图库[{}]人脸[{}]已存在", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
return CloudwalkResult.success((Object)handleFaceResult);
|
||||
}
|
||||
if (extractResult.isSuccess()) {
|
||||
AddFaceParam addFaceParam = AddFaceParam.builder().groupId(param.getImageStoreId()).userId(param.getImageId()).feature(((AgFeatureExtractResult)extractResult.getData()).getFeature()).qualityScore(String.join((CharSequence)",", qualityScoreList)).build();
|
||||
PineappleBaseResult result = this.pineappleClient.addFace(addFaceParam);
|
||||
this.logger.info("\u6dfb\u52a0\u56fe\u5e93[{}]\u4eba\u8138[{}]\u5f15\u64ce\u8fd4\u56de\u7ed3\u679c[{}]", new Object[]{param.getImageStoreId(), param.getImageId(), JSON.toJSONString((Object)result)});
|
||||
this.logger.info("添加图库[{}]人脸[{}]引擎返回结果[{}]", new Object[]{param.getImageStoreId(), param.getImageId(), JSON.toJSONString((Object)result)});
|
||||
if (result.getResult() == 0) {
|
||||
handleFaceResult = (HandleFaceResult)BeanCopyUtils.copyProperties((Object)result, (Object)handleFaceResult);
|
||||
handleFaceResult.setImageStoreId(param.getImageStoreId());
|
||||
@@ -383,20 +383,20 @@ implements CpImageStoreToolService {
|
||||
handleFaceResult.setPersonId(Optional.ofNullable(imgStorePerson).map(p -> p.getId()).orElse(""));
|
||||
handleFaceResult.setAge(Integer.valueOf(new BigDecimal((String)qualityScoreList.get(10)).setScale(2, 3).intValue()));
|
||||
handleFaceResult.setGender(Short.valueOf(new BigDecimal((String)qualityScoreList.get(11)).shortValue()));
|
||||
this.logger.info("\u7ed3\u675f\u6dfb\u52a0\u56fe\u5e93[{}]\u4eba\u8138[{}]", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
this.logger.info("结束添加图库[{}]人脸[{}]", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
return CloudwalkResult.success((Object)handleFaceResult);
|
||||
}
|
||||
this.logger.warn("\u56fe\u5e93[{}]\u6dfb\u52a0\u4eba\u8138[{}]\u5931\u8d25:{}", new Object[]{param.getImageStoreId(), param.getImageId(), result.getInfo()});
|
||||
this.logger.warn("图库[{}]添加人脸[{}]失败:{}", new Object[]{param.getImageStoreId(), param.getImageId(), result.getInfo()});
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93[{}]\u6dfb\u52a0\u4eba\u8138[{}]\u5f02\u5e38:{}", new Object[]{param.getImageStoreId(), param.getImageId(), e.getMessage()});
|
||||
this.logger.error("图库[{}]添加人脸[{}]异常:{}", new Object[]{param.getImageStoreId(), param.getImageId(), e.getMessage()});
|
||||
}
|
||||
return CloudwalkResult.fail((String)"53060447", (String)this.getMessage("53060447"));
|
||||
}
|
||||
|
||||
public CloudwalkResult<HandleFaceResult> removeFace(CpHandleFaceParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u5220\u9664\u4eba\u8138,\u53c2\u6570:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("开始删除人脸,参数:{}", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkHandleFaceParam(param);
|
||||
try {
|
||||
ImgStorePersonQueryDto personQueryDto = new ImgStorePersonQueryDto();
|
||||
@@ -405,17 +405,17 @@ implements CpImageStoreToolService {
|
||||
ImgStorePerson imgStorePerson = CollectionUtils.isEmpty((Collection)personList) ? null : (ImgStorePerson)personList.get(0);
|
||||
RemoveFaceParam removeFaceParam = RemoveFaceParam.builder().groupId(param.getImageStoreId()).userId(param.getImageId()).build();
|
||||
PineappleBaseResult result = this.pineappleClient.removeFace(removeFaceParam);
|
||||
this.logger.info("\u5220\u9664\u56fe\u5e93[{}]\u4eba\u8138[{}]\u5f15\u64ce\u8fd4\u56de\u7ed3\u679c[{}]", new Object[]{param.getImageStoreId(), param.getImageId(), JSON.toJSONString((Object)result)});
|
||||
this.logger.info("删除图库[{}]人脸[{}]引擎返回结果[{}]", new Object[]{param.getImageStoreId(), param.getImageId(), JSON.toJSONString((Object)result)});
|
||||
if (result.getResult() == 0) {
|
||||
HandleFaceResult handleFaceResult = (HandleFaceResult)BeanCopyUtils.copyProperties((Object)result, HandleFaceResult.class);
|
||||
handleFaceResult.setPersonId(Optional.ofNullable(imgStorePerson).map(p -> p.getId()).orElse(""));
|
||||
this.logger.info("\u7ed3\u675f\u5220\u9664\u56fe\u5e93[{}]\u4eba\u8138[{}]", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
this.logger.info("结束删除图库[{}]人脸[{}]", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
return CloudwalkResult.success((Object)handleFaceResult);
|
||||
}
|
||||
this.logger.warn("\u56fe\u5e93[{}]\u5220\u9664\u4eba\u8138[{}]\u5931\u8d25", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
this.logger.warn("图库[{}]删除人脸[{}]失败", (Object)param.getImageStoreId(), (Object)param.getImageId());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93[{}]\u5220\u9664\u4eba\u8138[{}]\u5f02\u5e38:{}", new Object[]{param.getImageStoreId(), param.getImageId(), e.getMessage()});
|
||||
this.logger.error("图库[{}]删除人脸[{}]异常:{}", new Object[]{param.getImageStoreId(), param.getImageId(), e.getMessage()});
|
||||
}
|
||||
return CloudwalkResult.fail((String)"53060448", (String)this.getMessage("53060448"));
|
||||
}
|
||||
@@ -450,7 +450,7 @@ implements CpImageStoreToolService {
|
||||
}
|
||||
BatchSearchFaceResult result = (BatchSearchFaceResult)JSON.parseObject((String)resultStr, BatchSearchFaceResult.class);
|
||||
if (result.getResult() != 0) {
|
||||
this.logger.warn("\u6279\u91cf\u67e5\u8be2\u56fe\u5e93[]\u4eba\u8138[]\u5931\u8d25", (Object)param.getImageStoreId(), (Object)String.join((CharSequence)",", param.getImageIds()));
|
||||
this.logger.warn("批量查询图库[]人脸[]失败", (Object)param.getImageStoreId(), (Object)String.join((CharSequence)",", param.getImageIds()));
|
||||
return CloudwalkResult.fail((String)"53060444", (String)this.getMessage("53060444"));
|
||||
}
|
||||
return CloudwalkResult.success((Object)result);
|
||||
|
||||
+21
-21
@@ -369,7 +369,7 @@ implements CpOrgDevieKitService {
|
||||
|
||||
private void saveSyncLog(String deviceId, String groupId, List<UpdatePersonResult.PersonData> personData) {
|
||||
if (CollectionUtils.isEmpty(personData)) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4eba\u5458\u66f4\u65b0\u6570\u636e\u4e3a\u7a7a", (Object)deviceId, (Object)groupId);
|
||||
this.logger.warn("设备[{}]图库[{}]人员更新数据为空", (Object)deviceId, (Object)groupId);
|
||||
return;
|
||||
}
|
||||
DevicePersonSyncLogDTO dto = new DevicePersonSyncLogDTO();
|
||||
@@ -380,7 +380,7 @@ implements CpOrgDevieKitService {
|
||||
String personId = personInfo.getUserId();
|
||||
dto.setPersonId(personId);
|
||||
syncLogs = this.devicePersonSyncLogMapper.query(dto);
|
||||
this.logger.debug("\u6839\u636e\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4eba\u5458[{}]\u67e5\u8be2\u540c\u6b65\u8bb0\u5f55:[{}]", new Object[]{deviceId, groupId, personId, JSON.toJSONString((Object)syncLogs)});
|
||||
this.logger.debug("根据设备[{}]图库[{}]人员[{}]查询同步记录:[{}]", new Object[]{deviceId, groupId, personId, JSON.toJSONString((Object)syncLogs)});
|
||||
if (!CollectionUtils.isEmpty((Collection)syncLogs)) {
|
||||
this.updateSyncLog((DevicePersonSyncLog)syncLogs.get(0), personInfo);
|
||||
continue;
|
||||
@@ -390,7 +390,7 @@ implements CpOrgDevieKitService {
|
||||
queryGroupPersonDTO.setPersonId(personId);
|
||||
List groupPersonRefList = this.groupPersonRefMapper.query(queryGroupPersonDTO);
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefList)) {
|
||||
this.logger.debug("\u6839\u636e\u56fe\u5e93Id[{}],\u4eba\u5458Id[{}]\u67e5\u8be2\u4e0d\u5b58\u5728\u56fe\u5e93\u4eba\u5458\u5173\u8054\u8bb0\u5f55", (Object)groupId, (Object)personInfo.getUserId());
|
||||
this.logger.debug("根据图库Id[{}],人员Id[{}]查询不存在图库人员关联记录", (Object)groupId, (Object)personInfo.getUserId());
|
||||
continue;
|
||||
}
|
||||
if (this.lockSyncLog(deviceId, groupId, personId)) {
|
||||
@@ -446,20 +446,20 @@ implements CpOrgDevieKitService {
|
||||
if (!CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
newSyncLog.setImageId(((UpdatePersonResult.PersonData.FaceData)personInfo.getFaceData().get(0)).getFaceId());
|
||||
}
|
||||
newSyncLog.setUpdateInfo("\u751f\u6210\u540c\u6b65\u8bb0\u5f55,\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u5df2\u62c9\u53d6");
|
||||
newSyncLog.setUpdateInfo("生成同步记录,同步状态:设备已拉取");
|
||||
newSyncLog.setDevicePersonRefId(null != dbDevicePerson ? dbDevicePerson.getId() : null);
|
||||
newSyncLog.setIsDel(personInfo.getType());
|
||||
if (CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
newSyncLog.setErrorMessage("\u65e0\u8bc6\u522b\u7167,\u8bbe\u5907\u65e0\u9700\u4e0a\u62a5");
|
||||
newSyncLog.setErrorMessage("无识别照,设备无需上报");
|
||||
}
|
||||
this.logger.debug("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55[{}],[{}]", (Object)newSyncLog.getId(), (Object)newSyncLog);
|
||||
this.logger.debug("新增同步记录[{}],[{}]", (Object)newSyncLog.getId(), (Object)newSyncLog);
|
||||
try {
|
||||
this.devicePersonSyncLogMapper.insertSelective(newSyncLog);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55\u5931\u8d25,\u62a5\u9519\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("新增同步记录失败,报错:{}", (Object)e.getMessage());
|
||||
}
|
||||
this.logger.debug("\u65b0\u589e\u540c\u6b65\u8bb0\u5f55[{}],\u8bbe\u5907\u5df2\u62c9\u53d6,count[1]", (Object)newSyncLog.getId());
|
||||
this.logger.debug("新增同步记录[{}],设备已拉取,count[1]", (Object)newSyncLog.getId());
|
||||
}
|
||||
|
||||
private void updateSyncLog(DevicePersonSyncLog dbSyncLog, UpdatePersonResult.PersonData personInfo) {
|
||||
@@ -467,21 +467,21 @@ implements CpOrgDevieKitService {
|
||||
dbSyncLog.setCode("");
|
||||
dbSyncLog.setErrorMessage("");
|
||||
dbSyncLog.setLastPullTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dbSyncLog.setUpdateInfo("\u5b58\u5728\u540c\u6b65\u8bb0\u5f55,\u66f4\u65b0\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u5df2\u62c9\u53d6");
|
||||
dbSyncLog.setUpdateInfo("存在同步记录,更新同步状态:设备已拉取");
|
||||
dbSyncLog.setIsDel(personInfo.getType());
|
||||
if (!CollectionUtils.isEmpty((Collection)personInfo.getFaceData())) {
|
||||
dbSyncLog.setImageId(((UpdatePersonResult.PersonData.FaceData)personInfo.getFaceData().get(0)).getFaceId());
|
||||
} else {
|
||||
dbSyncLog.setErrorMessage("\u65e0\u8bc6\u522b\u7167,\u8bbe\u5907\u65e0\u9700\u4e0a\u62a5");
|
||||
dbSyncLog.setErrorMessage("无识别照,设备无需上报");
|
||||
}
|
||||
this.devicePersonSyncLogMapper.updateStatusAndCountInc(dbSyncLog);
|
||||
this.logger.debug("\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}],\u8bbe\u5907\u5df2\u62c9\u53d6,count[{}]", (Object)dbSyncLog.getId(), (Object)(dbSyncLog.getCount() + 1));
|
||||
this.logger.debug("\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}],[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog);
|
||||
this.logger.debug("更新同步记录[{}],设备已拉取,count[{}]", (Object)dbSyncLog.getId(), (Object)(dbSyncLog.getCount() + 1));
|
||||
this.logger.debug("更新同步记录[{}],[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog);
|
||||
}
|
||||
|
||||
private void updatePersonData(AtomicDeviceGetResult device, UpdatePersonParam updatePersonParam, List<UpdatePersonResult.PersonData> personData) {
|
||||
if (null != device.getSupportMultiPersonGroup() && Objects.equals(device.getSupportMultiPersonGroup().intValue(), DeviceAbilityEnum.SUPPORT_MULTI_PERSON_GROUP.getCode())) {
|
||||
this.logger.debug("\u8bbe\u5907code[{}]\u652f\u6301\u591a\u56fe\u5e93", (Object)updatePersonParam.getDeviceId());
|
||||
this.logger.debug("设备code[{}]支持多图库", (Object)updatePersonParam.getDeviceId());
|
||||
return;
|
||||
}
|
||||
List imageStoreIds = Optional.ofNullable(this.deviceImageStoreMapper.findImageStoreIds(device.getId(), Short.valueOf((short)1))).orElse(new ArrayList());
|
||||
@@ -504,15 +504,15 @@ implements CpOrgDevieKitService {
|
||||
this.devicePersonMapper.updateSelective(devicePerson);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u66f4\u65b0personData\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("更新personData异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handlePersonValidDate(UpdatePersonParam updatePersonParam, DevicePersonSyncLogDTO dto, UpdatePersonResult.PersonData personInfo, boolean del) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u5904\u7406\u4eba\u5458[{}],Type[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), personInfo.getType()});
|
||||
this.logger.debug("设备[{}]处理人员[{}],Type[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), personInfo.getType()});
|
||||
if (CollectionUtils.isEmpty((Collection)dto.getImageStoreIds())) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u672a\u5173\u8054\u5176\u4ed6\u56fe\u5e93", (Object)dto.getDeviceId());
|
||||
this.logger.warn("设备[{}]未关联其他图库", (Object)dto.getDeviceId());
|
||||
return;
|
||||
}
|
||||
QueryGroupPersonDTO queryGroupPersonDTO = new QueryGroupPersonDTO();
|
||||
@@ -521,22 +521,22 @@ implements CpOrgDevieKitService {
|
||||
List otherGroupPersons = Optional.ofNullable(this.groupPersonRefMapper.query(queryGroupPersonDTO)).orElse(new ArrayList());
|
||||
otherGroupPersons = otherGroupPersons.stream().filter(groupPersonRef -> -1 != groupPersonRef.getStatus() || DelStatusEnum.DELETED.getCode().shortValue() != groupPersonRef.getIsDel().shortValue()).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(otherGroupPersons)) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u4eba\u5458[{}]\u672a\u5173\u8054\u5176\u4ed6\u56fe\u5e93", (Object)dto.getDeviceId(), (Object)dto.getPersonId());
|
||||
this.logger.warn("设备[{}]人员[{}]未关联其他图库", (Object)dto.getDeviceId(), (Object)dto.getPersonId());
|
||||
return;
|
||||
}
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
if (null == updatePersonParam.getSupportPersonValiddate() || updatePersonParam.getSupportPersonValiddate().intValue() == DeviceAbilityEnum.NOT_SUPPORT_PERSON_VALIDDATE.getCode()) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4e0d\u652f\u6301\u6709\u6548\u671f", (Object)dto.getDeviceId());
|
||||
this.logger.debug("设备[{}]不支持有效期", (Object)dto.getDeviceId());
|
||||
Optional<GroupPersonRef> optional = otherGroupPersons.stream().filter(result -> null == result.getExpiryBeginDate() && null == result.getExpiryEndDate() || currentTime >= result.getExpiryBeginDate() && currentTime <= result.getExpiryEndDate()).findFirst();
|
||||
if (optional.isPresent()) {
|
||||
GroupPersonRef groupPersonRef2 = optional.get();
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4eba\u5458[{}]\u5728\u56fe\u5e93[{}]\u4e2d\u6709\u6548,\u6709\u6548\u671f[{}]-[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), groupPersonRef2.getImageStoreId(), groupPersonRef2.getExpiryBeginDate(), groupPersonRef2.getExpiryEndDate()});
|
||||
this.logger.debug("设备[{}]人员[{}]在图库[{}]中有效,有效期[{}]-[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), groupPersonRef2.getImageStoreId(), groupPersonRef2.getExpiryBeginDate(), groupPersonRef2.getExpiryEndDate()});
|
||||
personInfo.setType(Integer.valueOf(DelStatusEnum.NORAML.getCode().shortValue()));
|
||||
personInfo.setStatus(Integer.valueOf(1));
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u652f\u6301\u6709\u6548\u671f", (Object)dto.getDeviceId());
|
||||
this.logger.debug("设备[{}]支持有效期", (Object)dto.getDeviceId());
|
||||
HashSet validDateCronSet = new HashSet();
|
||||
JSONObject jsonObject = JSONObject.parseObject((String)personInfo.getReserveInfo());
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("passCrons");
|
||||
@@ -573,7 +573,7 @@ implements CpOrgDevieKitService {
|
||||
personInfo.setExpiryEndDate(expiryEndDate);
|
||||
jsonObject.put("passCrons", validDateCronSet);
|
||||
personInfo.setReserveInfo(JSON.toJSONString((Object)jsonObject));
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4eba\u5458[{}]\u8bbe\u7f6e\u6709\u6548\u671f[{}]-[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), expiryBeginDate, expiryEndDate});
|
||||
this.logger.debug("设备[{}]人员[{}]设置有效期[{}]-[{}]", new Object[]{dto.getDeviceId(), dto.getPersonId(), expiryBeginDate, expiryEndDate});
|
||||
}
|
||||
|
||||
private synchronized boolean lockSyncLog(String deviceId, String imageStoreId, String personId) {
|
||||
|
||||
+2
-2
@@ -45,10 +45,10 @@ implements CpOrgImageStoreService {
|
||||
this.applicationImageStoreService.add((ApplicationImageStoreAddParam)BeanCopyUtils.copyProperties((Object)addParam, ApplicationImageStoreAddParam.class), context);
|
||||
}
|
||||
catch (DuplicateKeyException e) {
|
||||
this.logger.warn("\u5df2\u5173\u8054\u5e94\u7528");
|
||||
this.logger.warn("已关联应用");
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u56fe\u5e93\u5e94\u7528\u5173\u8054\u5f02\u5e38", e);
|
||||
this.logger.error("新增图库应用关联异常", e);
|
||||
throw new ServiceException("53013522", this.getMessage("53013522"));
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
|
||||
+19
-19
@@ -63,21 +63,21 @@ extends AbstractImagStoreService {
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank((CharSequence)event.getDeviceId()) || StringUtils.isBlank((CharSequence)event.getGroupId())) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u6216\u8005\u56fe\u5e93[{}]\u4e3a\u7a7a", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
this.logger.warn("设备[{}]或者图库[{}]为空", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
return;
|
||||
}
|
||||
this.logger.debug("Kafka\u6d88\u8d39\u8bbe\u5907\u56fe\u5e93\u53d8\u66f4\u6570\u636e:[{}]", (Object)JSON.toJSONString((Object)event));
|
||||
this.logger.debug("Kafka消费设备图库变更数据:[{}]", (Object)JSON.toJSONString((Object)event));
|
||||
try {
|
||||
AtomicDeviceCommonParam queryDevice = new AtomicDeviceCommonParam();
|
||||
queryDevice.setId(event.getDeviceId());
|
||||
CloudwalkResult deviceResult = this.atomicDeviceService.detail(queryDevice, this.getCloudwalkContext());
|
||||
if (!deviceResult.isSuccess() || null == deviceResult.getData()) {
|
||||
this.logger.warn("\u67e5\u8be2\u8bbe\u5907[{}]\u5931\u8d25", (Object)event.getDeviceId());
|
||||
this.logger.warn("查询设备[{}]失败", (Object)event.getDeviceId());
|
||||
return;
|
||||
}
|
||||
CoreDeviceDetailResult device = (CoreDeviceDetailResult)deviceResult.getData();
|
||||
if (device.getIdentifyType() != 0) {
|
||||
this.logger.warn("\u8bbe\u5907[{}]\u975e\u524d\u7aef\u8bc6\u522b", (Object)device.getId());
|
||||
this.logger.warn("设备[{}]非前端识别", (Object)device.getId());
|
||||
return;
|
||||
}
|
||||
this.saveDeviceImageStoreChange(event);
|
||||
@@ -85,7 +85,7 @@ extends AbstractImagStoreService {
|
||||
this.bindDeviceImageStore(event);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,12 +98,12 @@ extends AbstractImagStoreService {
|
||||
query.setLastUpdateTime(time);
|
||||
List result = this.deviceImageStoreMapper.select(query);
|
||||
if (CollectionUtils.isEmpty((Collection)result)) {
|
||||
this.logger.debug("\u6839\u636e\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u672a\u67e5\u8be2\u5230\u53d8\u66f4\u8bb0\u5f55,\u65b0\u589e", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
this.logger.debug("根据设备[{}]图库[{}]未查询到变更记录,新增", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
query.setId(this.uuidSerial.uuid());
|
||||
query.setCreateTime(time);
|
||||
return this.deviceImageStoreMapper.insertSelective(query);
|
||||
}
|
||||
this.logger.debug("\u6839\u636e\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u67e5\u8be2\u5230\u53d8\u66f4\u8bb0\u5f55[{}],\u4fee\u6539", new Object[]{event.getDeviceId(), event.getGroupId(), ((DeviceImageStore)result.get(0)).getId()});
|
||||
this.logger.debug("根据设备[{}]图库[{}]查询到变更记录[{}],修改", new Object[]{event.getDeviceId(), event.getGroupId(), ((DeviceImageStore)result.get(0)).getId()});
|
||||
query.setFinishPullTime(null);
|
||||
query.setStatus(StatusEnum.UNNOTIFY.getValue());
|
||||
return this.deviceImageStoreMapper.update(query);
|
||||
@@ -113,16 +113,16 @@ extends AbstractImagStoreService {
|
||||
if (event.getType() != 2) {
|
||||
return;
|
||||
}
|
||||
this.logger.debug("\u5f00\u59cb\u5904\u7406\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u89e3\u7ed1", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
this.logger.debug("开始处理设备[{}]图库[{}]解绑", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
try {
|
||||
DeviceImageStoreQueryParam storeQueryParam = new DeviceImageStoreQueryParam();
|
||||
storeQueryParam.setDeviceId(event.getDeviceId());
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, this.getCloudwalkContext());
|
||||
if (imageStoreResult.isSuccess() && !CollectionUtils.isEmpty((Collection)((Collection)imageStoreResult.getData()))) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4ecd\u7ed1\u5b9a\u5176\u4ed6\u56fe\u5e93", (Object)event.getDeviceId());
|
||||
this.logger.debug("设备[{}]仍绑定其他图库", (Object)event.getDeviceId());
|
||||
String deviceCode = device.getDeviceCode();
|
||||
if (null == device.getSupportMultiPersonGroup() || Objects.equals(device.getSupportMultiPersonGroup().intValue(), DeviceAbilityEnum.NOT_SUPPORT_MULTI_PERSON_GROUP.getCode())) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]code[{}]\u4e0d\u652f\u6301\u591a\u56fe\u5e93,\u4e0b\u53d150009", (Object)event.getDeviceId(), (Object)deviceCode);
|
||||
this.logger.debug("设备[{}]code[{}]不支持多图库,下发50009", (Object)event.getDeviceId(), (Object)deviceCode);
|
||||
List<String> imageStoreIds = ((List)imageStoreResult.getData()).stream().map(DeviceImageStoreQueryResult::getImageStoreId).collect(Collectors.toList());
|
||||
this.updateSyncLog(event, imageStoreIds);
|
||||
HashSet changeGroupIdSet = Sets.newHashSet();
|
||||
@@ -135,7 +135,7 @@ extends AbstractImagStoreService {
|
||||
this.notify50010(event);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u89e3\u7ed1\u6267\u884c\u5f02\u5e38:{}", new Object[]{event.getDeviceId(), event.getGroupId(), e.getMessage()});
|
||||
this.logger.error("设备[{}]图库[{}]解绑执行异常:{}", new Object[]{event.getDeviceId(), event.getGroupId(), e.getMessage()});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ extends AbstractImagStoreService {
|
||||
List personIdList = this.devicePersonSyncLogMapper.findPersonIds(query);
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
if (!CollectionUtils.isEmpty((Collection)personIdList)) {
|
||||
this.logger.info("\u79fb\u9664\u5728\u5176\u4ed6\u56fe\u5e93\u4e2d\u7684\u4eba\u5458:[{}]", (Object)personIdList);
|
||||
this.logger.info("移除在其他图库中的人员:[{}]", (Object)personIdList);
|
||||
personIdSet.removeAll(personIdList);
|
||||
query.setPersonIds(personIdList);
|
||||
query.setLastUpdateTime(currentTime);
|
||||
@@ -161,7 +161,7 @@ extends AbstractImagStoreService {
|
||||
query.setIsDel(Integer.valueOf(StatusEnum.INVALID.getValue()));
|
||||
query.setStatus(Integer.valueOf(SyncStatusEnum.NOT_PULL.getValue()));
|
||||
int res = this.devicePersonSyncLogMapper.updateIsDel(query);
|
||||
this.logger.info("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u66f4\u65b0[{}]\u6761\u4eba\u5458\u5b58\u5728\u5176\u4ed6\u56fe\u5e93\u4e2d", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
this.logger.info("设备[{}]图库[{}]更新[{}]条人员存在其他图库中", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
}
|
||||
this.groupPersonRefMapper.updateLastUpdateTimeByPersonIds(event.getGroupId(), personIds, currentTime);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ extends AbstractImagStoreService {
|
||||
query.setIsDel(Integer.valueOf(StatusEnum.INVALID.getValue()));
|
||||
query.setStatus(Integer.valueOf(SyncStatusEnum.NOT_PULL.getValue()));
|
||||
int res = this.devicePersonSyncLogMapper.updateIsDel(query);
|
||||
this.logger.info("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u66f4\u65b0[{}]\u6761\u4eba\u5458\u4e0d\u5b58\u5728\u5176\u4ed6\u56fe\u5e93\u4e2d", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
this.logger.info("设备[{}]图库[{}]更新[{}]条人员不存在其他图库中", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,8 +190,8 @@ extends AbstractImagStoreService {
|
||||
query.setIsDel(Integer.valueOf(StatusEnum.INVALID.getValue()));
|
||||
query.setStatus(Integer.valueOf(SyncStatusEnum.NOT_PULL.getValue()));
|
||||
int res = this.devicePersonSyncLogMapper.updateIsDel(query);
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u89e3\u7ed1,\u903b\u8f91\u5220\u9664[{}]\u6761\u540c\u6b65\u8bb0\u5f55", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4e0b\u53d150010", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
this.logger.debug("设备[{}]图库[{}]解绑,逻辑删除[{}]条同步记录", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
this.logger.debug("设备[{}]图库[{}]下发50010", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
DeviceImageStoreReSyncParam deviceImageStoreReSyncParam = new DeviceImageStoreReSyncParam();
|
||||
deviceImageStoreReSyncParam.setDeviceId(event.getDeviceId());
|
||||
deviceImageStoreReSyncParam.setImageStoreId(event.getGroupId());
|
||||
@@ -210,7 +210,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u89e3\u7ed1\u6267\u884c\u5f02\u5e38:{}", new Object[]{event.getDeviceId(), event.getGroupId(), e.getMessage()});
|
||||
this.logger.error("设备[{}]图库[{}]解绑执行异常:{}", new Object[]{event.getDeviceId(), event.getGroupId(), e.getMessage()});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ extends AbstractImagStoreService {
|
||||
if (event.getType() != 1) {
|
||||
return;
|
||||
}
|
||||
this.logger.debug("\u5f00\u59cb\u5904\u7406\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u7ed1\u5b9a", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
this.logger.debug("开始处理设备[{}]图库[{}]绑定", (Object)event.getDeviceId(), (Object)event.getGroupId());
|
||||
DevicePersonSyncLogDTO query = new DevicePersonSyncLogDTO();
|
||||
query.setDeviceId(event.getDeviceId());
|
||||
query.setImageStoreId(event.getGroupId());
|
||||
@@ -226,7 +226,7 @@ extends AbstractImagStoreService {
|
||||
query.setIsDel(Integer.valueOf(StatusEnum.VALID.getValue()));
|
||||
query.setStatus(Integer.valueOf(SyncStatusEnum.NOT_PULL.getValue()));
|
||||
int res = this.devicePersonSyncLogMapper.updateIsDel(query);
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u7ed1\u5b9a,\u66f4\u65b0[{}]\u6761\u540c\u6b65\u8bb0\u5f55", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
this.logger.debug("设备[{}]图库[{}]绑定,更新[{}]条同步记录", new Object[]{event.getDeviceId(), event.getGroupId(), res});
|
||||
HashSet changeGroupIdSet = Sets.newHashSet();
|
||||
changeGroupIdSet.add(event.getGroupId());
|
||||
this.cpImageStoreSyncManager.sendChangeToDevice(event.getDeviceId(), changeGroupIdSet, false);
|
||||
|
||||
+13
-13
@@ -78,7 +78,7 @@ extends AbstractImagStoreService {
|
||||
this.devicePersonSyncLogMapper.resetSyncLog(devicePersonSyncLog);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u8bbe\u5907-\u4eba\u5458\u540c\u6b65\u5b9a\u65f6\u5668\u4efb\u52a1\u6267\u884c\u62a5\u9519:{}", (Object)e.getMessage());
|
||||
this.logger.error("设备-人员同步定时器任务执行报错:{}", (Object)e.getMessage());
|
||||
}
|
||||
});
|
||||
this.cpImageStoreSyncManager.sendChangeToDevice(changeGroupIdSet, false);
|
||||
@@ -87,10 +87,10 @@ extends AbstractImagStoreService {
|
||||
public void excuteDeleteDevicePerson() {
|
||||
Long lastUpdateTime = System.currentTimeMillis() - (long)(this.keepDays * 24 * 60 * 60) * 1000L;
|
||||
int res = this.devicePersonSyncLogMapper.deleteByTime(lastUpdateTime);
|
||||
this.logger.info("\u5b9a\u65f6\u5220\u9664lastUpdateTime < {}\u7684\u540c\u6b65\u8bb0\u5f55{}\u6761", (Object)lastUpdateTime, (Object)res);
|
||||
this.logger.info("定时删除lastUpdateTime < {}的同步记录{}条", (Object)lastUpdateTime, (Object)res);
|
||||
lastUpdateTime = System.currentTimeMillis() - 2592000000L;
|
||||
res = this.groupPersonRefMapper.deleteByTime(lastUpdateTime);
|
||||
this.logger.info("\u5b9a\u65f6\u5220\u9664status\u4e3a\u5220\u9664,lastUpdateTime < {}\u56fe\u5e93\u4eba\u5458\u8bb0\u5f55{}\u6761", (Object)lastUpdateTime, (Object)res);
|
||||
this.logger.info("定时删除status为删除,lastUpdateTime < {}图库人员记录{}条", (Object)lastUpdateTime, (Object)res);
|
||||
}
|
||||
|
||||
public void excuteNotifyDevice() throws ServiceException {
|
||||
@@ -98,12 +98,12 @@ extends AbstractImagStoreService {
|
||||
deviceQueryParam.setIdentifyType("0");
|
||||
CloudwalkResult result = this.atomicDeviceService.list(deviceQueryParam, this.getCloudwalkContext());
|
||||
if (!result.isSuccess()) {
|
||||
this.logger.debug("\u901a\u77e5\u8bbe\u5907\u62c9\u53d6,\u83b7\u53d6\u524d\u7aef\u8bbe\u5907\u5931\u8d25");
|
||||
this.logger.debug("通知设备拉取,获取前端设备失败");
|
||||
throw new ServiceException(result.getCode(), result.getMessage());
|
||||
}
|
||||
List deviceList = (List)result.getData();
|
||||
if (CollectionUtils.isEmpty((Collection)deviceList)) {
|
||||
this.logger.debug("\u901a\u77e5\u8bbe\u5907\u62c9\u53d6,\u83b7\u53d6\u524d\u7aef\u8bbe\u5907\u4e3a\u7a7a");
|
||||
this.logger.debug("通知设备拉取,获取前端设备为空");
|
||||
return;
|
||||
}
|
||||
deviceList = deviceList.stream().filter(device -> StringUtils.isEmpty((CharSequence)device.getParentCode())).collect(Collectors.toList());
|
||||
@@ -113,19 +113,19 @@ extends AbstractImagStoreService {
|
||||
storeQueryParam.setDeviceId(atomicDeviceGetResult.getId());
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, this.getCloudwalkContext());
|
||||
if (!imageStoreResult.isSuccess()) {
|
||||
this.logger.debug("\u901a\u77e5\u8bbe\u5907\u62c9\u53d6,\u6839\u636e\u8bbe\u5907[{}]\u83b7\u53d6\u5173\u8054\u56fe\u5e93\u5931\u8d25", (Object)atomicDeviceGetResult.getId());
|
||||
this.logger.debug("通知设备拉取,根据设备[{}]获取关联图库失败", (Object)atomicDeviceGetResult.getId());
|
||||
continue;
|
||||
}
|
||||
List imageStoreList = (List)imageStoreResult.getData();
|
||||
if (CollectionUtils.isEmpty((Collection)imageStoreList)) {
|
||||
this.logger.debug("\u901a\u77e5\u8bbe\u5907\u62c9\u53d6,\u6839\u636e\u8bbe\u5907[{}]\u83b7\u53d6\u5173\u8054\u56fe\u5e93\u4e3a\u7a7a", (Object)atomicDeviceGetResult.getId());
|
||||
this.logger.debug("通知设备拉取,根据设备[{}]获取关联图库为空", (Object)atomicDeviceGetResult.getId());
|
||||
continue;
|
||||
}
|
||||
Set imageStoreIds = imageStoreList.stream().map(DeviceImageStoreQueryResult::getImageStoreId).collect(Collectors.toSet());
|
||||
deviceGroupsMap.put(atomicDeviceGetResult.getId(), imageStoreIds);
|
||||
}
|
||||
for (Map.Entry entry : deviceGroupsMap.entrySet()) {
|
||||
this.logger.debug("\u901a\u77e5\u8bbe\u5907\u62c9\u53d6,\u8bbe\u5907[{}]\u62c9\u53d6\u56fe\u5e93[{}]", entry.getKey(), entry.getValue());
|
||||
this.logger.debug("通知设备拉取,设备[{}]拉取图库[{}]", entry.getKey(), entry.getValue());
|
||||
this.cpImageStoreSyncManager.sendChangeToDevice((String)entry.getKey(), (Set)entry.getValue(), false);
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ extends AbstractImagStoreService {
|
||||
queryDevice.setId(notify.getDeviceId());
|
||||
CloudwalkResult deviceResult = this.atomicDeviceService.detail(queryDevice, this.getCloudwalkContext());
|
||||
if (!deviceResult.isSuccess() || null == deviceResult.getData()) {
|
||||
this.logger.warn("\u67e5\u8be2\u8bbe\u5907[{}]\u5931\u8d25", (Object)notify.getDeviceId());
|
||||
this.logger.warn("查询设备[{}]失败", (Object)notify.getDeviceId());
|
||||
return;
|
||||
}
|
||||
deviceMap.put(notify.getDeviceId(), deviceResult.getData());
|
||||
@@ -154,10 +154,10 @@ extends AbstractImagStoreService {
|
||||
storeQueryParam.setDeviceId(notify.getDeviceId());
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, this.getCloudwalkContext());
|
||||
if (imageStoreResult.isSuccess() && !CollectionUtils.isEmpty((Collection)((Collection)imageStoreResult.getData()))) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4ecd\u7ed1\u5b9a\u5176\u4ed6\u56fe\u5e93", (Object)notify.getDeviceId());
|
||||
this.logger.debug("设备[{}]仍绑定其他图库", (Object)notify.getDeviceId());
|
||||
CoreDeviceDetailResult device = (CoreDeviceDetailResult)deviceMap.get(notify.getDeviceId());
|
||||
if (null == device.getSupportMultiPersonGroup() || Objects.equals(device.getSupportMultiPersonGroup().intValue(), DeviceAbilityEnum.NOT_SUPPORT_MULTI_PERSON_GROUP.getCode())) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]code[{}]\u4e0d\u652f\u6301\u591a\u56fe\u5e93,\u4e0b\u53d150009", (Object)notify.getDeviceId(), (Object)device.getDeviceCode());
|
||||
this.logger.debug("设备[{}]code[{}]不支持多图库,下发50009", (Object)notify.getDeviceId(), (Object)device.getDeviceCode());
|
||||
HashSet changeGroupIdSet = Sets.newHashSet();
|
||||
changeGroupIdSet.add(notify.getImageStoreId());
|
||||
((List)imageStoreResult.getData()).stream().forEach(imageStore -> {
|
||||
@@ -170,7 +170,7 @@ extends AbstractImagStoreService {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4e0b\u53d150010", (Object)notify.getDeviceId(), (Object)notify.getImageStoreId());
|
||||
this.logger.debug("设备[{}]图库[{}]下发50010", (Object)notify.getDeviceId(), (Object)notify.getImageStoreId());
|
||||
DeviceImageStoreReSyncParam deviceImageStoreReSyncParam = new DeviceImageStoreReSyncParam();
|
||||
deviceImageStoreReSyncParam.setDeviceId(notify.getDeviceId());
|
||||
deviceImageStoreReSyncParam.setImageStoreId(notify.getImageStoreId());
|
||||
@@ -182,7 +182,7 @@ extends AbstractImagStoreService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u89e3\u7ed1\u5f02\u5e38:{}", new Object[]{notify.getDeviceId(), notify.getImageStoreId(), e.getMessage()});
|
||||
this.logger.error("设备[{}]图库[{}]解绑异常:{}", new Object[]{notify.getDeviceId(), notify.getImageStoreId(), e.getMessage()});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+13
-13
@@ -83,11 +83,11 @@ implements DevicePersonSyncService {
|
||||
private int keepDays;
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<DeviceImageStoreSynLogQueryResult>> page(DeviceImageStoreSynLogQueryParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("\u56fe\u5e93\u540c\u6b65\u8bb0\u5f55\u8be6\u60c5\u5206\u9875\u67e5\u8be2\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.info("图库同步记录详情分页查询参数:[{}]", (Object)JSON.toJSONString((Object)param));
|
||||
CloudwalkResult<CloudwalkPageAble<DeviceImageStoreSynLogQueryResult>> result = this.imageStoreSyncClient.page(param);
|
||||
this.logger.debug("\u56fe\u5e93\u540c\u6b65\u8bb0\u5f55\u8be6\u60c5\u5206\u9875\u67e5\u8be2\u7ed3\u679c:[{}]", (Object)JSON.toJSONString(result));
|
||||
this.logger.debug("图库同步记录详情分页查询结果:[{}]", (Object)JSON.toJSONString(result));
|
||||
if (!result.isSuccess()) {
|
||||
this.logger.warn("\u83b7\u53d6\u56fe\u5e93\u540c\u6b65\u8bb0\u5f55\u8be6\u60c5\u5206\u9875\u67e5\u8be2\u5931\u8d25");
|
||||
this.logger.warn("获取图库同步记录详情分页查询失败");
|
||||
return CloudwalkResult.fail((String)"53013549", (String)this.getMessage("53013549"));
|
||||
}
|
||||
CloudwalkPageAble pageAble = (CloudwalkPageAble)result.getData();
|
||||
@@ -98,11 +98,11 @@ implements DevicePersonSyncService {
|
||||
ImgStorePersonQueryDto queryDto = new ImgStorePersonQueryDto();
|
||||
queryDto.setIds(personIdList);
|
||||
queryDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
this.logger.debug("\u4eba\u5458\u5217\u8868\u67e5\u8be2\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)queryDto));
|
||||
this.logger.debug("人员列表查询参数:[{}]", (Object)JSON.toJSONString((Object)queryDto));
|
||||
List personList = this.imgStorePersonMapper.gets(queryDto);
|
||||
this.logger.debug("\u4eba\u5458\u5217\u8868\u67e5\u8be2\u7ed3\u679c:[{}]", (Object)JSON.toJSONString((Object)personList));
|
||||
this.logger.debug("人员列表查询结果:[{}]", (Object)JSON.toJSONString((Object)personList));
|
||||
Map<String, ImgStorePerson> personMap = personList.stream().collect(Collectors.toMap(ImgStorePerson::getId, a -> a, (k1, k2) -> k1));
|
||||
this.logger.debug("\u4eba\u5458\u5217\u8868\u67e5\u8be2\u7ed3\u679cMap:[{}]", (Object)JSON.toJSONString(personMap));
|
||||
this.logger.debug("人员列表查询结果Map:[{}]", (Object)JSON.toJSONString(personMap));
|
||||
resultList.forEach(synLogResult -> {
|
||||
synLogResult.setImageUrl(((ImgStorePerson)personMap.get(synLogResult.getPersonId())).getComparePicture());
|
||||
synLogResult.setName(((ImgStorePerson)personMap.get(synLogResult.getPersonId())).getName());
|
||||
@@ -137,7 +137,7 @@ implements DevicePersonSyncService {
|
||||
}
|
||||
CloudwalkPageAble pageAble = new CloudwalkPageAble(deviceList, page, totalCount);
|
||||
long end = System.currentTimeMillis();
|
||||
this.logger.debug("\u67e5\u8be2\u5f53\u524d\u79df\u6237\u8bbe\u5907\u5217\u8868\u8017\u65f6[{}]", (Object)(end - start));
|
||||
this.logger.debug("查询当前租户设备列表耗时[{}]", (Object)(end - start));
|
||||
return CloudwalkResult.success((Object)pageAble);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ implements DevicePersonSyncService {
|
||||
storeQueryParam.setDeviceId(deviceId);
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, this.getCloudwalkContext());
|
||||
if (!imageStoreResult.isSuccess()) {
|
||||
this.logger.warn("\u83b7\u53d6\u8bbe\u5907\u5173\u8054\u7684\u56fe\u5e93\u5931\u8d25");
|
||||
this.logger.warn("获取设备关联的图库失败");
|
||||
throw new ServiceException("53013551", this.getMessage("53013551"));
|
||||
}
|
||||
return imageStoreResult;
|
||||
@@ -180,7 +180,7 @@ implements DevicePersonSyncService {
|
||||
}
|
||||
});
|
||||
long end = System.currentTimeMillis();
|
||||
this.logger.debug("\u7ec4\u88c5\u6210\u8bbe\u5907-\u56fe\u5e93Map\u8017\u65f6[{}]", (Object)(end - start));
|
||||
this.logger.debug("组装成设备-图库Map耗时[{}]", (Object)(end - start));
|
||||
return deviceStoreMap;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ implements DevicePersonSyncService {
|
||||
long s1 = System.currentTimeMillis();
|
||||
List syncFailList = this.devicePersonSyncLogMapper.deviceSyncCount(deviceIds, Arrays.asList(SyncStatusEnum.SYNC_FAIL.getValue()));
|
||||
long e1 = System.currentTimeMillis();
|
||||
this.logger.debug("\u67e5\u8be2\u8bbe\u5907\u540c\u6b65\u5931\u8d25\u6570\u8017\u65f6[{}]", (Object)(e1 - s1));
|
||||
this.logger.debug("查询设备同步失败数耗时[{}]", (Object)(e1 - s1));
|
||||
syncFailList.forEach(syncFail -> {
|
||||
if (syncFailMap.containsKey(syncFail.getDeviceId())) {
|
||||
syncFailMap.put(syncFail.getDeviceId(), syncFail.getCount());
|
||||
@@ -209,7 +209,7 @@ implements DevicePersonSyncService {
|
||||
validCount = this.groupPersonRefMapper.imageStoreCount(imageStoreIds, Arrays.asList((int)StatusEnum.PERSON_NORMAL.getValue()));
|
||||
failureCount = syncFailMap.get(result.getDeviceId());
|
||||
long e2 = System.currentTimeMillis();
|
||||
this.logger.debug("\u67e5\u8be2\u8bbe\u5907[{}]\u5173\u8054\u56fe\u5e93\u6b63\u5e38\u4eba\u5458\u6570\u8017\u65f6[{}]", (Object)entry.getKey(), (Object)(e2 - s2));
|
||||
this.logger.debug("查询设备[{}]关联图库正常人员数耗时[{}]", (Object)entry.getKey(), (Object)(e2 - s2));
|
||||
}
|
||||
result.setValidCount(validCount);
|
||||
result.setFailureCount(failureCount);
|
||||
@@ -287,7 +287,7 @@ implements DevicePersonSyncService {
|
||||
storeQueryParam.setDeviceId(param.getDeviceId());
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, context);
|
||||
if (!imageStoreResult.isSuccess()) {
|
||||
this.logger.warn("\u83b7\u53d6\u8bbe\u5907\u5173\u8054\u7684\u56fe\u5e93\u5931\u8d25");
|
||||
this.logger.warn("获取设备关联的图库失败");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty((Collection)((Collection)imageStoreResult.getData()))) {
|
||||
List imageStoreIds = ((List)imageStoreResult.getData()).stream().map(DeviceImageStoreQueryResult::getImageStoreId).collect(Collectors.toList());
|
||||
@@ -324,7 +324,7 @@ implements DevicePersonSyncService {
|
||||
storeQueryParam.setDeviceId(param.getDeviceId());
|
||||
CloudwalkResult imageStoreResult = this.aggDeviceImageStoreService.query(storeQueryParam, context);
|
||||
if (!imageStoreResult.isSuccess()) {
|
||||
this.logger.warn("\u83b7\u53d6\u8bbe\u5907\u5173\u8054\u7684\u56fe\u5e93\u5931\u8d25");
|
||||
this.logger.warn("获取设备关联的图库失败");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty((Collection)((Collection)imageStoreResult.getData()))) {
|
||||
imageStoreMap = ((List)imageStoreResult.getData()).stream().collect(Collectors.toMap(result -> result.getImageStoreId(), result -> result.getImageStoreName()));
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ implements ImgPersonBatchDetailService {
|
||||
pageAble = new CloudwalkPageAble((Collection)result.getResult(), page, result.getTotal());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u5165\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("导入详情查询失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
result = BeanCopyUtils.copy((Collection)pageAble.getDatas(), BatchDetailResult.class);
|
||||
|
||||
+22
-22
@@ -141,7 +141,7 @@ implements ImgPersonBatchService {
|
||||
catch (Exception e) {
|
||||
this.logger.error("person import data insert exception", e);
|
||||
for (ImgStorePerson storePerson : needInsertList) {
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, storePerson.getName(), "\u6570\u636e\u63d2\u5165\u5f02\u5e38", 2));
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, storePerson.getName(), "数据插入异常", 2));
|
||||
}
|
||||
needInsertList.clear();
|
||||
}
|
||||
@@ -211,7 +211,7 @@ implements ImgPersonBatchService {
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("package person data exception:{}", (Object)e.getMessage());
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, personParam.getName(), "\u4eba\u5458\u6570\u636e\u5c01\u88c5\u5f02\u5e38", 2));
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, personParam.getName(), "人员数据封装异常", 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ implements ImgPersonBatchService {
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("Batch import person,checkRecordAndFillParam exception:{}", (Object)e.getMessage());
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, record.get(0), "\u672a\u77e5\u9519\u8bef", 2));
|
||||
batchDetailInsertBatchParams.add(this.generateBatchDetail(importContext, record.get(0), "未知错误", 2));
|
||||
}
|
||||
}
|
||||
return personParamList;
|
||||
@@ -297,7 +297,7 @@ implements ImgPersonBatchService {
|
||||
Map<String, Label> labelNameMap = importContext.getLabelNameMap();
|
||||
Map<String, ZoneResult> zoneMap = importContext.getZoneMap();
|
||||
if (namePropertiesMap.size() < 12) {
|
||||
throw new ImageStoreException("53014029", "\u4eba\u5458\u5c5e\u6027\u672a\u8bbe\u7f6e");
|
||||
throw new ImageStoreException("53014029", "人员属性未设置");
|
||||
}
|
||||
for (int i = 0; i < record.size(); ++i) {
|
||||
Pattern pattern;
|
||||
@@ -310,25 +310,25 @@ implements ImgPersonBatchService {
|
||||
this.checkField(properties, value);
|
||||
}
|
||||
catch (ImageStoreException e) {
|
||||
this.logger.warn("\u5f53\u524d\u5c5e\u6027\u503c\u7f3a\u5931{}", (Object)JSONObject.toJSONString(record));
|
||||
throw new ImageStoreException("53014017", properties.getName() + "\u6ca1\u6709\u6709\u6548\u503c");
|
||||
this.logger.warn("当前属性值缺失{}", (Object)JSONObject.toJSONString(record));
|
||||
throw new ImageStoreException("53014017", properties.getName() + "没有有效值");
|
||||
}
|
||||
if (StringUtils.isEmpty((CharSequence)value)) continue;
|
||||
if ("personCode".equals(properties.getCode()) && !(matcher = (pattern = Pattern.compile("^[^\\u4e00-\\u9fa5]+$")).matcher(value)).matches()) {
|
||||
this.logger.warn("\u6587\u4ef6\u5185\u5de5\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e\uff0cname:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014001", String.format("%s[%s]\u6587\u4ef6\u5185\u5de5\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e", properties.getName(), value));
|
||||
this.logger.warn("文件内工号格式不正确,name:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014001", String.format("%s[%s]文件内工号格式不正确", properties.getName(), value));
|
||||
}
|
||||
if ("userName".equals(properties.getCode()) && !(matcher = (pattern = Pattern.compile("^[^\\u4e00-\\u9fa5]+$")).matcher(value)).matches()) {
|
||||
this.logger.warn("\u6587\u4ef6\u5185\u7528\u6237\u540d\u683c\u5f0f\u4e0d\u6b63\u786e\uff0cname:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014003", String.format("%s[%s]\u6587\u4ef6\u5185\u7528\u6237\u540d\u683c\u5f0f\u4e0d\u6b63\u786e", properties.getName(), value));
|
||||
this.logger.warn("文件内用户名格式不正确,name:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014003", String.format("%s[%s]文件内用户名格式不正确", properties.getName(), value));
|
||||
}
|
||||
if ("phone".equals(properties.getCode()) && !(matcher = (pattern = Pattern.compile("^[1][3,4,5,6,7,8,9][0-9]{9}$")).matcher(value)).matches()) {
|
||||
this.logger.warn("\u6587\u4ef6\u5185\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e\uff0cname:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014017", String.format("%s[%s]\u6587\u4ef6\u5185\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e", properties.getName(), value));
|
||||
this.logger.warn("文件内手机号格式不正确,name:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014017", String.format("%s[%s]文件内手机号格式不正确", properties.getName(), value));
|
||||
}
|
||||
if ("email".equals(properties.getCode()) && !(matcher = (pattern = Pattern.compile("^[A-Za-z0-9]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")).matcher(value)).matches()) {
|
||||
this.logger.warn("\u6587\u4ef6\u5185\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e\uff0cname:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014017", String.format("%s[%s]\u6587\u4ef6\u5185\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e", properties.getName(), value));
|
||||
this.logger.warn("文件内邮箱格式不正确,name:[{}], value:[{}]", (Object)properties.getName(), (Object)value);
|
||||
throw new ImageStoreException("53014017", String.format("%s[%s]文件内邮箱格式不正确", properties.getName(), value));
|
||||
}
|
||||
if ("floorName".equals(properties.getCode())) {
|
||||
addPersonParam.setDefaultFloor(this.handlerZoneName(value, zoneMap));
|
||||
@@ -359,8 +359,8 @@ implements ImgPersonBatchService {
|
||||
this.handlerPropertyTypeAndFillParam(properties, value, filePath, addPersonParam, importContext);
|
||||
}
|
||||
if (CollectionUtils.isEmpty((Collection)addPersonParam.getLabelIds()) && CollectionUtils.isEmpty((Collection)addPersonParam.getOrganizationIds())) {
|
||||
this.logger.warn("\u7ec4\u7ec7/\u6807\u7b7e\u81f3\u5c11\u4e8c\u9009\u4e00");
|
||||
throw new ImageStoreException("53014020", "\u7ec4\u7ec7/\u6807\u7b7e\u81f3\u5c11\u4e8c\u9009\u4e00");
|
||||
this.logger.warn("组织/标签至少二选一");
|
||||
throw new ImageStoreException("53014020", "组织/标签至少二选一");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ implements ImgPersonBatchService {
|
||||
break;
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new ImageStoreException("53014017", properties.getName() + "\u4e0d\u5b58\u5728/\u65e0\u6548");
|
||||
throw new ImageStoreException("53014017", properties.getName() + "不存在/无效");
|
||||
}
|
||||
}
|
||||
case 3: {
|
||||
@@ -434,8 +434,8 @@ implements ImgPersonBatchService {
|
||||
date = simpleDateFormat.parse(value);
|
||||
}
|
||||
catch (ParseException e) {
|
||||
this.logger.warn("\u5f53\u524d\u65f6\u95f4\u683c\u5f0f\u4e0d\u5408\u6cd5", e);
|
||||
throw new ImageStoreException("53014017", properties.getName() + "\u683c\u5f0f\u4e0d\u5408\u6cd5");
|
||||
this.logger.warn("当前时间格式不合法", e);
|
||||
throw new ImageStoreException("53014017", properties.getName() + "格式不合法");
|
||||
}
|
||||
this.populateBeanValue(properties, date.getTime(), addPersonParam);
|
||||
break;
|
||||
@@ -446,8 +446,8 @@ implements ImgPersonBatchService {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.logger.warn("\u5f53\u524d\u5c5e\u6027\u7c7b\u578b\u4e0d\u5408\u6cd5");
|
||||
throw new ImageStoreException("53014017", "\u5f53\u524d\u5c5e\u6027\u7c7b\u578b\u4e0d\u5408\u6cd5");
|
||||
this.logger.warn("当前属性类型不合法");
|
||||
throw new ImageStoreException("53014017", "当前属性类型不合法");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ implements ImgPersonBatchService {
|
||||
pageAble = new CloudwalkPageAble((Collection)result.getResult(), page, result.getTotal());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u6279\u91cf\u5bfc\u5165\u8bb0\u5f55\u5217\u8868\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询批量导入记录列表信息失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
result = BeanCopyUtils.copy((Collection)pageAble.getDatas(), BatchImportQueryResult.class);
|
||||
|
||||
+5
-5
@@ -152,14 +152,14 @@ extends AbstractImagStoreService {
|
||||
AgFeatureExtractParam featureExtractParam = new AgFeatureExtractParam();
|
||||
featureExtractParam.setImageUrl(param.getComparePicture());
|
||||
CloudwalkResult result = this.cpImageStoreToolService.extractFeature(featureExtractParam);
|
||||
this.logger.info("scoreResult\uff1a{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
this.logger.info("scoreResult:{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
if (result.isSuccess()) {
|
||||
AgFeatureExtractResult featureExtractResult = (AgFeatureExtractResult)result.getData();
|
||||
if (featureExtractResult != null) {
|
||||
Double score = featureExtractResult.getScore();
|
||||
this.logger.info("score\uff1a{}", (Object)score);
|
||||
this.logger.info("score:{}", (Object)score);
|
||||
if (this.imgQualityScore > score) {
|
||||
String errorMessage = "\u7cfb\u7edf\u8981\u6c42\u8bc6\u522b\u8d28\u91cf\u5206>=" + this.imgQualityScore + ",\u5f53\u524d\u8bc6\u522b\u8d28\u91cf\u5206:" + score + ",\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002";
|
||||
String errorMessage = "系统要求识别质量分>=" + this.imgQualityScore + ",当前识别质量分:" + score + ",请重新上传。";
|
||||
throw new ServiceException("53003820", errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -251,8 +251,8 @@ extends AbstractImagStoreService {
|
||||
addVehiclePersonParam.setVehicleList(vehicleList);
|
||||
CloudwalkResult<Boolean> result = this.vehicleFeignClient.setVehiclePerson(addVehiclePersonParam);
|
||||
if (result == null || result.getData() == null || !((Boolean)result.getData()).booleanValue()) {
|
||||
this.logger.error("\u4eba\u5458\u7ed1\u5b9a\u8f66\u8f86\u5173\u7cfb\u5931\u8d25");
|
||||
throw new ServiceException("50001", "\u4eba\u5458\u7ed1\u5b9a\u8f66\u8f86\u5173\u7cfb\u5931\u8d25");
|
||||
this.logger.error("人员绑定车辆关系失败");
|
||||
throw new ServiceException("50001", "人员绑定车辆关系失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -39,12 +39,12 @@ public class ImgPersonManager {
|
||||
private ImgStorePersonMapper personMapper;
|
||||
|
||||
public String addAgImage(String comparePicture, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("addAgImage start\uff1a{}", (Object)comparePicture);
|
||||
this.logger.info("addAgImage start:{}", (Object)comparePicture);
|
||||
AgImageUploadParam uploadParam = new AgImageUploadParam();
|
||||
uploadParam.setType("person");
|
||||
uploadParam.setPath(comparePicture);
|
||||
CloudwalkResult addAgImageResult = this.agImageService.uploadImage(uploadParam, context);
|
||||
this.logger.info("addAgImage end\uff1a{}", (Object)comparePicture);
|
||||
this.logger.info("addAgImage end:{}", (Object)comparePicture);
|
||||
if (!addAgImageResult.isSuccess()) {
|
||||
throw new ServiceException(addAgImageResult.getCode(), addAgImageResult.getMessage());
|
||||
}
|
||||
@@ -67,17 +67,17 @@ public class ImgPersonManager {
|
||||
public void checkImageFile(String filePath) throws ImageStoreException {
|
||||
File imageFile = new File(filePath);
|
||||
if (!imageFile.exists() || !imageFile.isFile()) {
|
||||
throw new ImageStoreException("53014017", "\u6587\u4ef6\u4e0d\u5b58\u5728");
|
||||
throw new ImageStoreException("53014017", "文件不存在");
|
||||
}
|
||||
if (!filePath.contains(FILE_DOT)) {
|
||||
throw new ImageStoreException("53014017", "\u83b7\u53d6\u6587\u4ef6\u683c\u5f0f\u5931\u8d25");
|
||||
throw new ImageStoreException("53014017", "获取文件格式失败");
|
||||
}
|
||||
String format = filePath.substring(filePath.lastIndexOf(FILE_DOT) + 1);
|
||||
if (!IMAGE_FILE_FORMAT.contains(format)) {
|
||||
throw new ImageStoreException("53014017", "\u56fe\u7247\u683c\u5f0f\u4e0d\u652f\u6301");
|
||||
throw new ImageStoreException("53014017", "图片格式不支持");
|
||||
}
|
||||
if (imageFile.length() > (long)ImageStoreConstants.MAX_FILE.intValue()) {
|
||||
throw new ImageStoreException("53014017", "\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc73M");
|
||||
throw new ImageStoreException("53014017", "图片大小不能超过3M");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-21
@@ -174,29 +174,29 @@ implements ImgStorePersonPropertiesService {
|
||||
this.personPropertiesMapper.insertSelective(personProperty);
|
||||
}
|
||||
} else {
|
||||
ImgStorePersonProperties personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("name").setName("\u4eba\u5458\u59d3\u540d").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(1)).setReminder("\u8bf7\u8f93\u5165\u4eba\u5458\u59d3\u540d").bulid();
|
||||
ImgStorePersonProperties personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("name").setName("人员姓名").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(1)).setReminder("请输入人员姓名").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("userName").setName("\u7528\u6237\u540d").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(2)).setReminder("\u8bf7\u8f93\u5165\u7528\u6237\u540d").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("userName").setName("用户名").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(2)).setReminder("请输入用户名").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("phone").setName("\u624b\u673a\u53f7\u7801").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(3)).setReminder("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u7801").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("phone").setName("手机号码").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(3)).setReminder("请输入手机号码").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("email").setName("\u90ae\u7bb1").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(4)).setReminder("\u8bf7\u8f93\u5165\u90ae\u7bb1").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("email").setName("邮箱").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(4)).setReminder("请输入邮箱").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("personCode").setName("\u5de5\u53f7").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(5)).setReminder("\u8bf7\u8f93\u5165\u5de5\u53f7").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("personCode").setName("工号").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(1)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(5)).setReminder("请输入工号").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("organizationIds").setName("\u6240\u5c5e\u673a\u6784").setType(Short.valueOf((short)2)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(6)).setReminder("\u8bf7\u9009\u62e9\u6240\u5c5e\u673a\u6784").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("organizationIds").setName("所属机构").setType(Short.valueOf((short)2)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(6)).setReminder("请选择所属机构").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("labelIds").setName("\u4eba\u5458\u6807\u7b7e").setType(Short.valueOf((short)2)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(7)).setReminder("\u8bf7\u9009\u62e9\u4eba\u5458\u6807\u7b7e").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("labelIds").setName("人员标签").setType(Short.valueOf((short)2)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(7)).setReminder("请选择人员标签").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("icCardNo").setName("IC\u5361\u53f7").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(8)).setReminder("\u8bf7\u8f93\u5165IC\u5361\u53f7").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("icCardNo").setName("IC卡号").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(8)).setReminder("请输入IC卡号").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("icCardType").setName("IC\u5361\u7c7b\u578b").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(9)).setReminder("\u8bf7\u8f93\u5165IC\u5361\u7c7b\u578b").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("icCardType").setName("IC卡类型").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(9)).setReminder("请输入IC卡类型").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("comparePicture").setName("\u6ce8\u518c\u7167").setType(Short.valueOf((short)4)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(10)).setReminder("\u8bf7\u4e0a\u4f20\u4eba\u5458\u9ad8\u6e05\u6b63\u9762\u7167\u7528\u4f5cAI\u6bd4\u5bf9").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("comparePicture").setName("注册照").setType(Short.valueOf((short)4)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(10)).setReminder("请上传人员高清正面照用作AI比对").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("welcome").setName("\u6b22\u8fce\u8bed").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(11)).setReminder("\u8bf7\u8f93\u5165\u6b22\u8fce\u8bed").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("welcome").setName("欢迎语").setType(Short.valueOf((short)1)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(11)).setReminder("请输入欢迎语").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("showPicture").setName("\u5c55\u793a\u7167").setType(Short.valueOf((short)4)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(12)).setReminder("\u8bf7\u4e0a\u4f20\u5c55\u793a\u7167").bulid();
|
||||
personPropertyinit = ImgStorePersonProperties.getBuilder().setId(CloudwalkDateUtils.getUUID()).setBusinessId("cloudwalk").setCode("showPicture").setName("展示照").setType(Short.valueOf((short)4)).setStatus(ImageStoreConstants.COMMON_PROPERTIES_STATUS).setHasDefault(Integer.valueOf(1)).setHasSysAccount(Integer.valueOf(0)).setHasSysAccountAvailable(Integer.valueOf(0)).setHasRequired(Integer.valueOf(0)).setCreateTime(Long.valueOf(System.currentTimeMillis())).setCreateUserId(cloudwalkContext.getUser().getCaller()).setLastUpdateTime(Long.valueOf(System.currentTimeMillis())).setLastUpdateUserId(cloudwalkContext.getUser().getCaller()).setOrderNum(Integer.valueOf(12)).setReminder("请上传展示照").bulid();
|
||||
this.personPropertiesMapper.insertSelective(personPropertyinit);
|
||||
}
|
||||
return CloudwalkResult.success((Object)Boolean.TRUE);
|
||||
@@ -259,12 +259,12 @@ implements ImgStorePersonPropertiesService {
|
||||
}
|
||||
if (!CollectionUtils.isEmpty((Collection)arrayList2)) {
|
||||
List dbRegistryProperyList;
|
||||
this.logger.info("\u4eba\u5458\u6ce8\u518c\u914d\u7f6e\u5f85\u5220\u9664\u7684\u5173\u8054\u5c5e\u6027,\u5c5e\u6027\u4e3b\u952e\u5217\u8868:[{}]", (Object)StringUtils.join((Iterable)arrayList2, (String)","));
|
||||
this.logger.info("人员注册配置待删除的关联属性,属性主键列表:[{}]", (Object)StringUtils.join((Iterable)arrayList2, (String)","));
|
||||
PersonRegistryDTO personRegistryDTO = new PersonRegistryDTO();
|
||||
personRegistryDTO.setBusinessId(businessId);
|
||||
List dbPersonRegistryList = this.personRegistryMapper.selectByCondition(personRegistryDTO);
|
||||
if (!CollectionUtils.isEmpty((Collection)dbPersonRegistryList) && !CollectionUtils.isEmpty((Collection)(dbRegistryProperyList = this.personRegistryPropertiesMapper.select(((PersonRegistry)dbPersonRegistryList.get(0)).getId(), (List)arrayList2)))) {
|
||||
this.logger.info("\u5220\u9664\u4eba\u5458\u6ce8\u518c\u914d\u7f6e\u5173\u8054\u5c5e\u6027,\u6ce8\u518c\u914d\u7f6e\u8868\u4e3b\u952e:[{}],\u5c5e\u6027\u4e3b\u952e\u5217\u8868:[{}]", (Object)((PersonRegistry)dbPersonRegistryList.get(0)).getId(), (Object)Collections3.extractToString((Collection)dbRegistryProperyList, (String)"personPropertyId", (String)","));
|
||||
this.logger.info("删除人员注册配置关联属性,注册配置表主键:[{}],属性主键列表:[{}]", (Object)((PersonRegistry)dbPersonRegistryList.get(0)).getId(), (Object)Collections3.extractToString((Collection)dbRegistryProperyList, (String)"personPropertyId", (String)","));
|
||||
this.personRegistryPropertiesMapper.delete(((PersonRegistry)dbPersonRegistryList.get(0)).getId(), Collections3.extractToList((Collection)dbRegistryProperyList, (String)"personPropertyId"));
|
||||
}
|
||||
}
|
||||
@@ -272,13 +272,13 @@ implements ImgStorePersonPropertiesService {
|
||||
if (newList != null && newList.size() > 0) {
|
||||
for (ImgStorePersonProperties personProperties : newList) {
|
||||
if (StringUtils.isNotBlank((CharSequence)personProperties.getId())) {
|
||||
throw new ServiceException("53004121", "\u65b0\u589e\u6761\u76eeid\u5fc5\u987b\u4e3a\u7a7a\u6216\u4f20\u5165id\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u6570\u636e\u540e\u91cd\u8bd5");
|
||||
throw new ServiceException("53004121", "新增条目id必须为空或传入id错误,请检查数据后重试");
|
||||
}
|
||||
personProperties.setId(CloudwalkDateUtils.getUUID());
|
||||
personProperties.setStatus(Integer.valueOf(0));
|
||||
String code = this.getCode(codeSet);
|
||||
if (code == null) {
|
||||
throw new ServiceException("53004116", "\u6269\u5c55\u5b57\u6bb5\u5df2\u6ee1");
|
||||
throw new ServiceException("53004116", "扩展字段已满");
|
||||
}
|
||||
personProperties.setCode(code);
|
||||
this.personPropertiesMapper.insertSelective(personProperties);
|
||||
@@ -297,12 +297,12 @@ implements ImgStorePersonPropertiesService {
|
||||
}
|
||||
|
||||
public CloudwalkResult<EngineResult> engineStatus() throws ServiceException {
|
||||
this.logger.info("\u901a\u8fc7\u5206\u6790\u5f15\u64ce\u5217\u8868\u7aef\u53e3\u6765\u5224\u65ad\u901a\u7528\u4fee\u56fe\u5f15\u64ce\u662f\u5426\u5728\u7ebf");
|
||||
this.logger.info("通过分析引擎列表端口来判断通用修图引擎是否在线");
|
||||
EngineListParam engineListParam = EngineListParam.builder().build();
|
||||
EngineListResult result = this.pineappleEngineClient.engineList(engineListParam);
|
||||
this.logger.info("\u5f15\u64ce\u72b6\u6001\u67e5\u8be2\u8fd4\u56de\u7ed3\u679c\uff1a{}, \u5f85\u67e5\u8be2\u5f15\u64ce\u7aef\u53e3\u4e3a{}", (Object)JSON.toJSONString((Object)result), (Object)this.revisionEnginePort);
|
||||
this.logger.info("引擎状态查询返回结果:{}, 待查询引擎端口为{}", (Object)JSON.toJSONString((Object)result), (Object)this.revisionEnginePort);
|
||||
if (ObjectUtils.isEmpty((Object)result) || result.getResult() != 0 || ObjectUtils.isEmpty((Object)result.getRows())) {
|
||||
this.logger.error("\u67e5\u8be2\u5f15\u64ce\u72b6\u6001\u5f02\u5e38\uff0c\u9519\u8bef\u539f\u56e0\uff1a{}", (Object)result.getInfo());
|
||||
this.logger.error("查询引擎状态异常,错误原因:{}", (Object)result.getInfo());
|
||||
throw new ServiceException("53004123", this.getMessage("53004123"));
|
||||
}
|
||||
List engines = result.getRows();
|
||||
@@ -344,7 +344,7 @@ implements ImgStorePersonPropertiesService {
|
||||
return CloudwalkResult.success((Object)true);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4fdd\u5b58\u6ce8\u518c\u56fe\u4f18\u5316\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("保存注册图优化参数失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ implements ImgStorePersonPropertiesService {
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u6ce8\u518c\u56fe\u4f18\u5316\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("查询注册图优化参数失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
+46
-46
@@ -203,8 +203,8 @@ implements ImgStorePersonService {
|
||||
private String templatePath;
|
||||
@Value(value="${download.rows.of.page:5000}")
|
||||
private int rowsOfPage;
|
||||
private String reminder = "\u6ce8\uff1a\u6b64\u8868\u4e2d\u7684\u5c5e\u6027\u5b57\u6bb5\u7531\u7528\u6237\u5728\u4eba\u5458\u5c5e\u6027\u7ba1\u7406\u4e2d\u914d\u7f6e\u6309\u5e8f\u751f\u6210\n1\u3001\u6807\u8bb0\u4e3a\u5fc5\u586b\u5b57\u6bb5\u4e3a\u5fc5\u586b\u9879\uff0c\u5982\u679c\u9700\u8981\u5bf9\u4eba\u5458\u540c\u6b65\u521b\u5efa\u8d26\u53f7\uff0c\u8bf7\u5728\u201c\u540c\u6b65\u521b\u5efa\u7cfb\u7edf\u8d26\u53f7ID\u201d\u5217\u8f93\u5165\u7cfb\u7edf\u8d26\u53f7ID\uff0c\u5efa\u8bae\u5339\u914d\u7528\u6237\u540d/\u90ae\u7bb1/\u624b\u673a\u53f7/\u5de5\u53f7\u5bf9\u5e94\u7684\u5c5e\u6027\u5185\u5bb9\uff0c\u8bf7\u4fdd\u8bc1\u7cfb\u7edf\u8d26\u53f7ID\u552f\u4e00\uff0c\u4e0d\u586b\u5219\u4e0d\u521b\u5efa\u7cfb\u7edf\u8d26\u53f7\uff1b\n2\u3001\u65e5\u671f\u65f6\u95f4\u683c\u5f0f\uff1ayyyy-MM-dd \uff0c\u4f8b\u5982\uff1a2020-03-02\uff1b\n3\u3001\u591a\u4e2a\u6807\u7b7e/\u591a\u4e2a\u673a\u6784\u76f4\u63a5\u7528\u82f1\u6587;\u9694\u5f00\uff1b\n4\u3001\u673a\u6784/\u6807\u7b7e\u81f3\u5c11\u4e8c\u9009\u4e00\u3002\n";
|
||||
private String NO_PROPERTIES_REMINDER = "\u5f53\u524d\u4f01\u4e1a\u6ca1\u6709\u914d\u7f6e\u4eba\u5458\u5c5e\u6027\uff0c\u65e0\u6cd5\u751f\u6210\u6b63\u786e\u6709\u6548\u7684\u5bfc\u5165\u6a21\u677f\n\u8bf7\u5728\u4eba\u5458\u5c5e\u6027\u7ba1\u7406\u9875\u9762\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u91cd\u65b0\u4e0b\u8f7d\u4eba\u5458\u5bfc\u5165\u6a21\u677f";
|
||||
private String reminder = "注:此表中的属性字段由用户在人员属性管理中配置按序生成\n1、标记为必填字段为必填项,如果需要对人员同步创建账号,请在“同步创建系统账号ID”列输入系统账号ID,建议匹配用户名/邮箱/手机号/工号对应的属性内容,请保证系统账号ID唯一,不填则不创建系统账号;\n2、日期时间格式:yyyy-MM-dd ,例如:2020-03-02;\n3、多个标签/多个机构直接用英文;隔开;\n4、机构/标签至少二选一。\n";
|
||||
private String NO_PROPERTIES_REMINDER = "当前企业没有配置人员属性,无法生成正确有效的导入模板\n请在人员属性管理页面配置完成后,重新下载人员导入模板";
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<String> add(AddImgPersonParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
@@ -223,15 +223,15 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员信息新增失败,原因:{}", e);
|
||||
throw e;
|
||||
}
|
||||
catch (ImageStoreException e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员信息新增失败,原因:{}", e);
|
||||
throw new ServiceException(e.getCode(), e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员信息新增失败,原因:{}", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014008", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014008", errorMessage);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ implements ImgStorePersonService {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员信息新增失败,原因:{}", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014008", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014008", errorMessage);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty((Collection)imgStorePersonResult.getLabelNames()) && imgStorePersonResult.getLabelNames().contains("\u8bbf\u5ba2")) continue;
|
||||
if (!CollectionUtils.isEmpty((Collection)imgStorePersonResult.getLabelNames()) && imgStorePersonResult.getLabelNames().contains("访客")) continue;
|
||||
newPersonResults.add(imgStorePersonResult);
|
||||
}
|
||||
pageAble = new CloudwalkPageAble(newPersonResults, page, gets.getTotal());
|
||||
@@ -361,7 +361,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询人员信息失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014011", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014011", errorMessage);
|
||||
}
|
||||
@@ -411,14 +411,14 @@ implements ImgStorePersonService {
|
||||
AgFeatureExtractParam featureExtractParam = new AgFeatureExtractParam();
|
||||
featureExtractParam.setImageUrl(param.getComparePicture());
|
||||
CloudwalkResult result = this.cpImageStoreToolService.extractFeature(featureExtractParam);
|
||||
this.logger.info("scoreResult\uff1a{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
this.logger.info("scoreResult:{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
if (result.isSuccess()) {
|
||||
AgFeatureExtractResult featureExtractResult = (AgFeatureExtractResult)result.getData();
|
||||
if (featureExtractResult != null) {
|
||||
Double score = featureExtractResult.getScore();
|
||||
this.logger.info("score\uff1a{}", (Object)score);
|
||||
this.logger.info("score:{}", (Object)score);
|
||||
if (this.imgQualityScore > score) {
|
||||
String errorMessage = "\u7cfb\u7edf\u8981\u6c42\u8bc6\u522b\u8d28\u91cf\u5206>=" + this.imgQualityScore + ",\u5f53\u524d\u8bc6\u522b\u8d28\u91cf\u5206:" + score + ",\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002";
|
||||
String errorMessage = "系统要求识别质量分>=" + this.imgQualityScore + ",当前识别质量分:" + score + ",请重新上传。";
|
||||
return CloudwalkResult.fail((String)"53003820", (String)errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -477,7 +477,7 @@ implements ImgStorePersonService {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u7f16\u8f91\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("人员信息编辑失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014009", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014009", errorMessage);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ implements ImgStorePersonService {
|
||||
throw new ServiceException(e.getCode(), e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u7f16\u8f91\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("人员信息编辑失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014009", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014009", errorMessage);
|
||||
}
|
||||
@@ -534,7 +534,7 @@ implements ImgStorePersonService {
|
||||
queryZoneForm.setBusinessId(businessId);
|
||||
queryZoneForm.setIds(ids);
|
||||
CloudwalkResult<List<ZoneResult>> zoneDetail = this.zoneFeignClient.findZonelist(queryZoneForm);
|
||||
this.logger.debug("\u5f53\u524d\u697c\u5c42\u4fe1\u606f{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
this.logger.debug("当前楼层信息{}", (Object)JSON.toJSONString(zoneDetail));
|
||||
if ("00000000".equals(zoneDetail.getCode())) {
|
||||
String zoneName = "";
|
||||
List data = (List)zoneDetail.getData();
|
||||
@@ -579,7 +579,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u4eba\u5458\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("查询人员详情失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014011", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014011", errorMessage);
|
||||
}
|
||||
@@ -598,7 +598,7 @@ implements ImgStorePersonService {
|
||||
result = CloudwalkResult.success(imgStorePersonResults);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u4eba\u5458\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("查询人员详情失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014011", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014011", errorMessage);
|
||||
}
|
||||
@@ -616,7 +616,7 @@ implements ImgStorePersonService {
|
||||
long s1 = System.currentTimeMillis();
|
||||
int totalCount = this.imgStorePersonMapper.count(dto);
|
||||
long e1 = System.currentTimeMillis();
|
||||
this.logger.info("\u4eba\u5458\u5bfc\u51fa\u67e5\u8be2\u603b\u6570{},\u8017\u65f6{}\u6beb\u79d2", (Object)totalCount, (Object)(e1 - s1));
|
||||
this.logger.info("人员导出查询总数{},耗时{}毫秒", (Object)totalCount, (Object)(e1 - s1));
|
||||
int totalPage = 1;
|
||||
if (totalCount != 0) {
|
||||
totalPage = totalCount % this.rowsOfPage == 0 ? totalCount / this.rowsOfPage : totalCount / this.rowsOfPage + 1;
|
||||
@@ -625,17 +625,17 @@ implements ImgStorePersonService {
|
||||
for (int i = 1; i <= totalPage; ++i) {
|
||||
PageHelper.startPage((int)i, (int)this.rowsOfPage);
|
||||
PageHelper.orderBy((String)"LAST_UPDATE_TIME DESC, ID DESC");
|
||||
this.logger.info("\u5206\u9875\u67e5\u8be2\u4eba\u5458\u5217\u8868,\u67e5\u8be2\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
this.logger.info("分页查询人员列表,查询参数:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
long s2 = System.currentTimeMillis();
|
||||
Page gets = (Page)this.imgStorePersonMapper.gets(dto);
|
||||
long e2 = System.currentTimeMillis();
|
||||
this.logger.info("\u4eba\u5458\u5bfc\u51fa\u7b2c{}\u6b21\u5206\u9875\u67e5\u8be2,\u8017\u65f6{}\u6beb\u79d2", (Object)i, (Object)(e2 - s2));
|
||||
this.logger.info("人员导出第{}次分页查询,耗时{}毫秒", (Object)i, (Object)(e2 - s2));
|
||||
personList.addAll(gets.getResult());
|
||||
}
|
||||
long s3 = System.currentTimeMillis();
|
||||
List<ImgStorePersonGetResult> imgStorePersonResults = this.getImgStorePersonResults(personList, businessId);
|
||||
long e3 = System.currentTimeMillis();
|
||||
this.logger.info("\u4eba\u5458\u5bfc\u51fa\u8bbe\u7f6e\u4eba\u5458\u673a\u6784\u4fe1\u606f\u3001\u6807\u7b7e\u4fe1\u606f,\u8017\u65f6{}\u6beb\u79d2", (Object)(e3 - s3));
|
||||
this.logger.info("人员导出设置人员机构信息、标签信息,耗时{}毫秒", (Object)(e3 - s3));
|
||||
Set<String> orgSet = this.getOrgSet(imgStorePersonResults);
|
||||
if (orgSet != null && (orgResult = this.organizationService.getOrg(new ArrayList<String>(orgSet), businessId, context)).isSuccess()) {
|
||||
Map orgMap = (Map)orgResult.getData();
|
||||
@@ -696,7 +696,7 @@ implements ImgStorePersonService {
|
||||
return CloudwalkResult.success(imgStorePersonResults);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -713,7 +713,7 @@ implements ImgStorePersonService {
|
||||
result = CloudwalkResult.success(imgStorePersonResults);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("查询人员信息失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014011", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014011", errorMessage);
|
||||
}
|
||||
@@ -730,11 +730,11 @@ implements ImgStorePersonService {
|
||||
String delName = ((ImgStorePerson)persons.get(0)).getName();
|
||||
if (persons.size() > 1) {
|
||||
for (int i = 1; i < persons.size(); ++i) {
|
||||
delName = delName + "\u3001" + ((ImgStorePerson)persons.get(i)).getName();
|
||||
delName = delName + "、" + ((ImgStorePerson)persons.get(i)).getName();
|
||||
}
|
||||
}
|
||||
if (delName.length() > 255) {
|
||||
delName = delName.substring(0, 250) + "\u7b49";
|
||||
delName = delName.substring(0, 250) + "等";
|
||||
}
|
||||
SysLog logParam = new SysLog();
|
||||
logParam.setLogType(Integer.valueOf(6));
|
||||
@@ -752,7 +752,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u4fe1\u606f\u5220\u9664\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("人员信息删除失败,原因:", e);
|
||||
String errorMessage = this.messageSource.getMessage("53014010", null, LocaleContextHolder.getLocale());
|
||||
throw new ServiceException("53014010", errorMessage);
|
||||
}
|
||||
@@ -761,7 +761,7 @@ implements ImgStorePersonService {
|
||||
|
||||
private List<ImgStorePersonGetResult> getImgStorePersonResults(List<ImgStorePerson> storePersonList, String businessId) {
|
||||
if (CollectionUtil.isEmpty(storePersonList)) {
|
||||
this.logger.warn("\u4eba\u5458\u5217\u8868\u4e3a\u7a7a");
|
||||
this.logger.warn("人员列表为空");
|
||||
return new ArrayList<ImgStorePersonGetResult>();
|
||||
}
|
||||
ArrayList<ImgStorePersonGetResult> imgStorePersonGetResults = new ArrayList<ImgStorePersonGetResult>(storePersonList.size());
|
||||
@@ -848,21 +848,21 @@ implements ImgStorePersonService {
|
||||
File templateDir = new File(this.templatePath + File.separator + context.getCompany().getCompanyName());
|
||||
if (!templateDir.exists()) {
|
||||
if (templateDir.mkdirs()) {
|
||||
this.logger.debug("\u7f13\u5b58\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u521b\u5efa\u7f13\u5b58\u76ee\u5f55\u6210\u529f\u3002\u76ee\u5f55\uff1a{}", (Object)templateDir.getAbsolutePath());
|
||||
this.logger.debug("缓存目录不存在,创建缓存目录成功。目录:{}", (Object)templateDir.getAbsolutePath());
|
||||
} else {
|
||||
this.logger.warn("\u7f13\u5b58\u76ee\u5f55\u4e0d\u5b58\u5728,\u521b\u5efa\u7f13\u5b58\u76ee\u5f55\u5931\u8d25");
|
||||
this.logger.warn("缓存目录不存在,创建缓存目录失败");
|
||||
}
|
||||
}
|
||||
File file = new File(this.templatePath + File.separator + context.getCompany().getCompanyName() + File.separator + context.getCompany().getCompanyName() + "-\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u6a21\u677f.xls");
|
||||
File file = new File(this.templatePath + File.separator + context.getCompany().getCompanyName() + File.separator + context.getCompany().getCompanyName() + "-人员批量导入模板.xls");
|
||||
try {
|
||||
if (!file.exists() && !file.createNewFile()) {
|
||||
this.logger.info("\u521b\u5efa\u4eba\u5458\u5bfc\u5165\u6a21\u677f\u5931\u8d25,\u6587\u4ef6\u540d\uff1a{}", (Object)file.getAbsolutePath());
|
||||
this.logger.info("创建人员导入模板失败,文件名:{}", (Object)file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u521b\u5efa\u4eba\u5458\u5bfc\u5165\u6a21\u677f\u5931\u8d25", e);
|
||||
this.logger.error("创建人员导入模板失败", e);
|
||||
}
|
||||
File imageFile = new File(this.templatePath + File.separator + "\u4eba\u8138.png");
|
||||
File imageFile = new File(this.templatePath + File.separator + "人脸.png");
|
||||
if (!imageFile.exists()) {
|
||||
try {
|
||||
this.storage(imageFile.getPath(), Base64Utils.decodeFromString((String)imageBase64));
|
||||
@@ -872,7 +872,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
this.exportExcel(cellTitles, file, context.getCompany().getCompanyName(), imageFile, titlePropertiesMap);
|
||||
File zipFile = new File(this.templatePath + File.separator + context.getCompany().getCompanyName() + "-\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u6a21\u677f.zip");
|
||||
File zipFile = new File(this.templatePath + File.separator + context.getCompany().getCompanyName() + "-人员批量导入模板.zip");
|
||||
if (!zipFile.exists()) {
|
||||
try {
|
||||
boolean newFile = zipFile.createNewFile();
|
||||
@@ -890,7 +890,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
catch (IOException e) {
|
||||
try {
|
||||
this.logger.warn("\u6a21\u677f\u538b\u7f29\u5305\u672a\u751f\u6210:{}", (Object)e.getMessage());
|
||||
this.logger.warn("模板压缩包未生成:{}", (Object)e.getMessage());
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
IOUtils.closeQuietly(fis);
|
||||
@@ -902,7 +902,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
IOUtils.closeQuietly((InputStream)fis);
|
||||
IOUtils.closeQuietly((OutputStream)outputStream);
|
||||
return context.getCompany().getCompanyName() + "-\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u6a21\u677f.zip";
|
||||
return context.getCompany().getCompanyName() + "-人员批量导入模板.zip";
|
||||
}
|
||||
|
||||
private void exportExcel(List<String> cellTitles, File excelFile, String companyName, File imageFile, Map<String, ImgStorePersonProperties> titlePropertiesMap) {
|
||||
@@ -916,8 +916,8 @@ implements ImgStorePersonService {
|
||||
columnWidht = cellTitle.length();
|
||||
}
|
||||
workbook = new HSSFWorkbook();
|
||||
sheet = workbook.createSheet("\u5bfc\u5165\u6a21\u677f");
|
||||
this.setTitleStyle(sheet, workbook, cellTitles.size(), companyName + "-\u4eba\u5458\u6279\u91cf\u5bfc\u5165\u6a21\u677f");
|
||||
sheet = workbook.createSheet("导入模板");
|
||||
this.setTitleStyle(sheet, workbook, cellTitles.size(), companyName + "-人员批量导入模板");
|
||||
if (titlePropertiesMap.size() < 10) {
|
||||
this.setReminderStyle(sheet, workbook, cellTitles.size(), this.NO_PROPERTIES_REMINDER);
|
||||
} else {
|
||||
@@ -937,7 +937,7 @@ implements ImgStorePersonService {
|
||||
HSSFCell cell = rowData.createCell(i);
|
||||
ImgStorePersonProperties properties = titlePropertiesMap.get(cellTitle);
|
||||
if (properties.getType().intValue() == 4) {
|
||||
cell.setCellValue(imageFile == null ? "\u7cfb\u7edf\u672a\u914d\u7f6e\u9ed8\u8ba4\u6a21\u677f\u56fe\u7247" : imageFile.getName());
|
||||
cell.setCellValue(imageFile == null ? "系统未配置默认模板图片" : imageFile.getName());
|
||||
continue;
|
||||
}
|
||||
if (properties.getCode().equals("phone")) {
|
||||
@@ -969,7 +969,7 @@ implements ImgStorePersonService {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6a21\u677f\u63d2\u5165\u793a\u4f8b\u6570\u636e\u5f02\u5e38", e);
|
||||
this.logger.error("模板插入示例数据异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,17 +1030,17 @@ implements ImgStorePersonService {
|
||||
ArrayList<String> cellTitles = new ArrayList<String>();
|
||||
for (ImgStorePersonProperties properties : personProperties) {
|
||||
if (StringUtils.equals((CharSequence)"floorNames", (CharSequence)properties.getCode())) continue;
|
||||
String required = properties.getHasRequired() == 1 ? "\u5fc5\u586b" : "\u9009\u586b";
|
||||
cellTitles.add(properties.getName() + "\uff08" + required + "\uff09");
|
||||
titlePropertiesMap.put(properties.getName() + "\uff08" + required + "\uff09", properties);
|
||||
String required = properties.getHasRequired() == 1 ? "必填" : "选填";
|
||||
cellTitles.add(properties.getName() + "(" + required + ")");
|
||||
titlePropertiesMap.put(properties.getName() + "(" + required + ")", properties);
|
||||
}
|
||||
cellTitles.add("\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID\uff08\u9009\u586b\uff09");
|
||||
cellTitles.add("同步创建账号系统ID(选填)");
|
||||
ImgStorePersonProperties storePersonProperties = new ImgStorePersonProperties();
|
||||
storePersonProperties.setType(Short.valueOf((short)1));
|
||||
storePersonProperties.setHasRequired(Integer.valueOf(0));
|
||||
storePersonProperties.setCode("sysAccountId");
|
||||
storePersonProperties.setName("\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID");
|
||||
titlePropertiesMap.put("\u540c\u6b65\u521b\u5efa\u8d26\u53f7\u7cfb\u7edfID\uff08\u9009\u586b\uff09", storePersonProperties);
|
||||
storePersonProperties.setName("同步创建账号系统ID");
|
||||
titlePropertiesMap.put("同步创建账号系统ID(选填)", storePersonProperties);
|
||||
return cellTitles;
|
||||
}
|
||||
|
||||
@@ -1138,7 +1138,7 @@ implements ImgStorePersonService {
|
||||
this.sysLogMapper.addLog(param);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u7cfb\u7edf\u64cd\u4f5c\u65e5\u5fd7\u5931\u8d25,\u5931\u8d25\u539f\u56e0\u662f\uff1a{}", e);
|
||||
this.logger.error("新增系统操作日志失败,失败原因是:{}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -209,7 +209,7 @@ implements LabelService {
|
||||
ret = (Page)this.imgStoreLabelMapper.page(pageLabelDTO);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u5f02\u5e38\uff0ce\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("分页查询异常,e:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)"53003702", (String)this.getMessage("53003702"));
|
||||
}
|
||||
List res = BeanCopyUtils.copy((Collection)ret.getResult(), PageLabelResult.class);
|
||||
@@ -249,7 +249,7 @@ implements LabelService {
|
||||
long s1 = System.currentTimeMillis();
|
||||
int totalCount = this.imgStoreLabelMapper.count(dto);
|
||||
long e1 = System.currentTimeMillis();
|
||||
this.logger.info("\u6807\u7b7e\u5bfc\u51fa\u67e5\u8be2\u603b\u6570{},\u8017\u65f6{}\u6beb\u79d2", (Object)totalCount, (Object)(e1 - s1));
|
||||
this.logger.info("标签导出查询总数{},耗时{}毫秒", (Object)totalCount, (Object)(e1 - s1));
|
||||
int totalPage = 1;
|
||||
if (totalCount != 0) {
|
||||
totalPage = totalCount % this.rowsOfPage == 0 ? totalCount / this.rowsOfPage : totalCount / this.rowsOfPage + 1;
|
||||
@@ -258,11 +258,11 @@ implements LabelService {
|
||||
for (int i = 1; i <= totalPage; ++i) {
|
||||
PageHelper.startPage((int)i, (int)this.rowsOfPage);
|
||||
PageHelper.orderBy((String)"LAST_UPDATE_TIME DESC, ID DESC");
|
||||
this.logger.info("\u5206\u9875\u67e5\u8be2\u6807\u7b7e\u4fe1\u606f\u5217\u8868,\u67e5\u8be2\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
this.logger.info("分页查询标签信息列表,查询参数:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
long s2 = System.currentTimeMillis();
|
||||
Page gets = (Page)this.imgStoreLabelMapper.gets(dto);
|
||||
long e2 = System.currentTimeMillis();
|
||||
this.logger.info("\u6807\u7b7e\u5bfc\u51fa\u7b2c{}\u6b21\u5206\u9875\u67e5\u8be2,\u8017\u65f6{}\u6beb\u79d2", (Object)i, (Object)(e2 - s2));
|
||||
this.logger.info("标签导出第{}次分页查询,耗时{}毫秒", (Object)i, (Object)(e2 - s2));
|
||||
personList.addAll(gets.getResult());
|
||||
}
|
||||
List res = BeanCopyUtils.copy((Collection)personList, PageLabelResult.class);
|
||||
@@ -325,7 +325,7 @@ implements LabelService {
|
||||
return CloudwalkResult.success((Object)res);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -452,7 +452,7 @@ implements LabelService {
|
||||
this.sysLogMapper.addLog(param);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u7cfb\u7edf\u64cd\u4f5c\u65e5\u5fd7\u5931\u8d25,\u5931\u8d25\u539f\u56e0\u662f\uff1a{}", e);
|
||||
this.logger.error("新增系统操作日志失败,失败原因是:{}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ implements IOperationLogService {
|
||||
this.operationLogMapper.addLog(log);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u64cd\u4f5c\u65e5\u5fd7\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("操作日志新增失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
@@ -37,7 +37,7 @@ implements IOperationLogService {
|
||||
this.operationLogMapper.deleteByDelTime(param.getDeleteTime());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u64cd\u4f5c\u65e5\u5fd7\u5220\u9664\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("操作日志删除失败,原因:", e);
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
|
||||
+12
-12
@@ -264,11 +264,11 @@ implements OrganizationService {
|
||||
String delName = ((Organization)orgByIds.get(0)).getName();
|
||||
if (orgByIds.size() > 1) {
|
||||
for (int i = 1; i < orgByIds.size(); ++i) {
|
||||
delName = delName + "\u3001" + ((Organization)orgByIds.get(i)).getName();
|
||||
delName = delName + "、" + ((Organization)orgByIds.get(i)).getName();
|
||||
}
|
||||
}
|
||||
if (delName.length() > 100) {
|
||||
delName = delName.substring(0, 100) + "\u7b49";
|
||||
delName = delName.substring(0, 100) + "等";
|
||||
}
|
||||
SysLog logParam = new SysLog();
|
||||
logParam.setLogType(Integer.valueOf(6));
|
||||
@@ -279,7 +279,7 @@ implements OrganizationService {
|
||||
DelUnitZoneForm delUnitZoneForm = new DelUnitZoneForm();
|
||||
delUnitZoneForm.setUnitIds(param.getIds());
|
||||
CloudwalkResult<Boolean> data = this.zoneFeignClient.delUnit(delUnitZoneForm);
|
||||
this.logger.info("\u5220\u9664\u5173\u8054\u673a\u6784{}", data.getData());
|
||||
this.logger.info("删除关联机构{}", data.getData());
|
||||
}
|
||||
return CloudwalkResult.success((Object)Boolean.TRUE);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ implements OrganizationService {
|
||||
if (userList.isSuccess() && !CollectionUtils.isEmpty((Collection)((Collection)userList.getData()))) {
|
||||
return (UserQueryResult)((List)userList.getData()).get(0);
|
||||
}
|
||||
this.logger.error("\u901a\u8fc7\u767b\u5f55\u7528\u6237\u67e5\u8be2\u673a\u6784\uff0c\u67e5\u8be2\u767b\u5f55\u7528\u6237\u5931\u8d25\uff1a{}\uff0c{}\uff0c{}", new Object[]{userId, userList.getCode(), userList.getMessage()});
|
||||
this.logger.error("通过登录用户查询机构,查询登录用户失败:{},{},{}", new Object[]{userId, userList.getCode(), userList.getMessage()});
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ implements OrganizationService {
|
||||
HashSet orgAllIds = new HashSet();
|
||||
try {
|
||||
String userId = context.getUser().getCaller();
|
||||
this.logger.info("\u901a\u8fc7\u767b\u5f55\u7528\u6237\u67e5\u8be2\u673a\u6784\uff1a{}", (Object)userId);
|
||||
this.logger.info("通过登录用户查询机构:{}", (Object)userId);
|
||||
UserQueryResult user = this.getByUserId(userId, context);
|
||||
if (user != null) {
|
||||
AcAccountDTO account = this.getAccountById(user.getLoginId());
|
||||
@@ -324,7 +324,7 @@ implements OrganizationService {
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
String errorMessage = this.messageSource.getMessage(e.getCode(), null, LocaleContextHolder.getLocale());
|
||||
this.logger.error("\u901a\u8fc7\u767b\u5f55\u7528\u6237\u67e5\u8be2\u673a\u6784\uff1a{}\uff0c{}", (Object)e.getCode(), (Object)errorMessage);
|
||||
this.logger.error("通过登录用户查询机构:{},{}", (Object)e.getCode(), (Object)errorMessage);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -666,7 +666,7 @@ implements OrganizationService {
|
||||
long s1 = System.currentTimeMillis();
|
||||
int totalCount = this.imgStoreOrganizationMapper.count(dto);
|
||||
long e1 = System.currentTimeMillis();
|
||||
this.logger.info("\u673a\u6784\u5bfc\u51fa\u67e5\u8be2\u603b\u6570{},\u8017\u65f6{}\u6beb\u79d2", (Object)totalCount, (Object)(e1 - s1));
|
||||
this.logger.info("机构导出查询总数{},耗时{}毫秒", (Object)totalCount, (Object)(e1 - s1));
|
||||
int totalPage = 1;
|
||||
if (totalCount != 0) {
|
||||
totalPage = totalCount % this.rowsOfPage == 0 ? totalCount / this.rowsOfPage : totalCount / this.rowsOfPage + 1;
|
||||
@@ -675,11 +675,11 @@ implements OrganizationService {
|
||||
for (int i = 1; i <= totalPage; ++i) {
|
||||
PageHelper.startPage((int)i, (int)this.rowsOfPage);
|
||||
PageHelper.orderBy((String)"LAST_UPDATE_TIME DESC, ID DESC");
|
||||
this.logger.info("\u5206\u9875\u67e5\u8be2\u673a\u6784\u4fe1\u606f\u5217\u8868,\u67e5\u8be2\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
this.logger.info("分页查询机构信息列表,查询参数:[{}]", (Object)JSON.toJSONString((Object)dto));
|
||||
long s2 = System.currentTimeMillis();
|
||||
Page gets = (Page)this.imgStoreOrganizationMapper.gets(dto);
|
||||
long e2 = System.currentTimeMillis();
|
||||
this.logger.info("\u673a\u6784\u5bfc\u51fa\u7b2c{}\u6b21\u5206\u9875\u67e5\u8be2,\u8017\u65f6{}\u6beb\u79d2", (Object)i, (Object)(e2 - s2));
|
||||
this.logger.info("机构导出第{}次分页查询,耗时{}毫秒", (Object)i, (Object)(e2 - s2));
|
||||
orgList.addAll(gets.getResult());
|
||||
}
|
||||
ArrayList<String> ids = new ArrayList<String>();
|
||||
@@ -764,7 +764,7 @@ implements OrganizationService {
|
||||
return CloudwalkResult.success((Object)resultList);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ implements OrganizationService {
|
||||
|
||||
public CloudwalkResult<Map<String, String>> listNames(QueryOrganizationParam param, CloudwalkCallContext context) {
|
||||
if (param.getId() == null && (param.getIds() == null || param.getIds().isEmpty())) {
|
||||
return CloudwalkResult.fail((String)"", (String)"\u8bf7\u8f93\u5165\u67e5\u8be2\u53c2\u6570");
|
||||
return CloudwalkResult.fail((String)"", (String)"请输入查询参数");
|
||||
}
|
||||
String businessId = context.getCompany().getCompanyId();
|
||||
List<String> ids = new ArrayList<String>();
|
||||
@@ -1112,7 +1112,7 @@ implements OrganizationService {
|
||||
this.sysLogMapper.addLog(param);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u7cfb\u7edf\u64cd\u4f5c\u65e5\u5fd7\u5931\u8d25,\u5931\u8d25\u539f\u56e0\u662f\uff1a{}", e);
|
||||
this.logger.error("新增系统操作日志失败,失败原因是:{}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -322,7 +322,7 @@ implements OrganizationTypeService {
|
||||
return CloudwalkResult.success((Object)pageAble);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u673a\u6784\u7c7b\u578b\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询机构类型信息失败,原因:", e);
|
||||
throw new ServiceException("53003804", this.getMessage("53003804"));
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,7 @@ implements OrganizationTypeService {
|
||||
}
|
||||
return CloudwalkResult.success((Object)Boolean.TRUE);
|
||||
}
|
||||
String[] initNameArray = new String[]{"\u5730\u5740", "\u90ae\u7f16", "\u7535\u8bdd", "\u4f20\u771f", "\u9762\u79ef", "\u8d22\u52a1\u662f\u5426\u72ec\u7acb\u6838\u7b97"};
|
||||
String[] initNameArray = new String[]{"地址", "邮编", "电话", "传真", "面积", "财务是否独立核算"};
|
||||
int index = 1;
|
||||
for (String name : initNameArray) {
|
||||
OrganizationTypeProperties property = new OrganizationTypeProperties();
|
||||
@@ -431,11 +431,11 @@ implements OrganizationTypeService {
|
||||
|
||||
@Transactional(rollbackFor={Exception.class})
|
||||
public CloudwalkResult<Boolean> defaultInit(CloudwalkCallContext cloudwalkContext) throws ServiceException {
|
||||
this.logger.info("\u521d\u59cb\u5316\u673a\u6784\u7c7b\u578b");
|
||||
this.logger.info("初始化机构类型");
|
||||
OrganizationType organizationType = new OrganizationType();
|
||||
String uuid = CloudwalkDateUtils.getUUID();
|
||||
organizationType.setId(uuid);
|
||||
organizationType.setName("\u516c\u53f8");
|
||||
organizationType.setName("公司");
|
||||
organizationType.setBusinessId("cloudwalk");
|
||||
organizationType.setStatus(Integer.valueOf(0));
|
||||
organizationType.setHasDefault(Integer.valueOf(1));
|
||||
@@ -443,7 +443,7 @@ implements OrganizationTypeService {
|
||||
organizationType.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
organizationType.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
this.orgTypeMapper.insertSelective(organizationType);
|
||||
String[] initNameArray = new String[]{"\u5730\u5740", "\u90ae\u7f16", "\u7535\u8bdd", "\u8d1f\u8d23\u4eba", "\u8bf4\u660e"};
|
||||
String[] initNameArray = new String[]{"地址", "邮编", "电话", "负责人", "说明"};
|
||||
int index = 1;
|
||||
for (String name : initNameArray) {
|
||||
OrganizationTypeProperties property = new OrganizationTypeProperties();
|
||||
|
||||
+2
-2
@@ -169,7 +169,7 @@ implements OrganizationService {
|
||||
List personCount = this.organizationMapper.getPersonCount(ids);
|
||||
for (OrgCountDTO orgCountDTO : personCount) {
|
||||
if (orgCountDTO.getCount() <= 0) continue;
|
||||
return CloudwalkResult.fail((String)"53003315", (String)"\u5355\u4f4d\u4eba\u5458\u6570\u91cf\u5927\u4e8e0\uff0c\u8bf7\u5c06\u4eba\u5458\u4ece\u5355\u4f4d\u4e2d\u79fb\u9664\u540e\u518d\u5220\u9664");
|
||||
return CloudwalkResult.fail((String)"53003315", (String)"单位人员数量大于0,请将人员从单位中移除后再删除");
|
||||
}
|
||||
this.organizationMapper.batchDel(param.getIds(), System.currentTimeMillis(), context.getUser().getCaller(), businessId);
|
||||
this.personOrganizationMapper.deleteByOrgIds(param.getIds());
|
||||
@@ -178,7 +178,7 @@ implements OrganizationService {
|
||||
|
||||
@Override
|
||||
public CloudwalkResult<String> add(AddOrganizationParam param, CloudwalkCallContext context) {
|
||||
return CloudwalkResult.success((Object)"\u6682\u4e0d\u652f\u6301\u65b0\u589e\u5355\u4f4d");
|
||||
return CloudwalkResult.success((Object)"暂不支持新增单位");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@ extends AbstractImagStoreService {
|
||||
return CloudwalkResult.success((Object)pageAble);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u673a\u6784\u7c7b\u578b\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询机构类型信息失败,原因:", e);
|
||||
throw new ServiceException("53003804", this.getMessage("53003804"));
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ extends AbstractImagStoreService {
|
||||
queryDto.setStatus(Integer.valueOf(0));
|
||||
List count = this.orgTypeMapper.selectByCondition(queryDto);
|
||||
if (count.size() > 0) {
|
||||
this.logger.info("\u7c7b\u578b\u5df2\u521d\u59cb\u5316\uff0c\u8bf7\u52ff\u91cd\u590d\u8c03\u7528");
|
||||
this.logger.info("类型已初始化,请勿重复调用");
|
||||
return CloudwalkResult.success((Object)Boolean.TRUE);
|
||||
}
|
||||
if (isSuperCorp) {
|
||||
|
||||
+31
-31
@@ -146,7 +146,7 @@ implements IPersonAuditServcie {
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<String> add(AddPersonAuditParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
boolean syncAccount;
|
||||
this.logger.debug("\u6dfb\u52a0\u6ce8\u518c\u8bb0\u5f55,\u8bf7\u6c42\u53c2\u6570:[{}]", (Object)JSON.toJSONString((Object)param));
|
||||
this.logger.debug("添加注册记录,请求参数:[{}]", (Object)JSON.toJSONString((Object)param));
|
||||
this.checkSource(param);
|
||||
String businessId = StringUtils.isEmpty((CharSequence)param.getBusinessId()) ? context.getCompany().getCompanyId() : param.getBusinessId();
|
||||
boolean bl = syncAccount = param.getCreateSysAccount() != null && param.getCreateSysAccount().intValue() == 1;
|
||||
@@ -210,11 +210,11 @@ implements IPersonAuditServcie {
|
||||
this.imgStorePersonAuditMapper.insert(personAudit);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("人员注册新增失败,原因:{}", (Object)e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u65b0\u589e\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("人员注册新增失败,原因:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("53060535", this.messageSource.getMessage("53060535", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)auditId);
|
||||
@@ -240,11 +240,11 @@ implements IPersonAuditServcie {
|
||||
}
|
||||
FaceDetectResult.FaceData faceData = this.detectFace(frontIdentityImage);
|
||||
if (faceData == null) {
|
||||
throw new ServiceException("\u83b7\u53d6\u4eba\u8138\u6570\u636e\u5931\u8d25");
|
||||
throw new ServiceException("获取人脸数据失败");
|
||||
}
|
||||
BufferedImage bufferedImage = this.base64ToBufferedImage(frontIdentityImage);
|
||||
if (bufferedImage == null) {
|
||||
throw new ServiceException("\u83b7\u53d6\u56fe\u7247\u5927\u5c0f\u5931\u8d25");
|
||||
throw new ServiceException("获取图片大小失败");
|
||||
}
|
||||
int x = PersonFileServiceImpl.getX(faceData);
|
||||
int y = PersonFileServiceImpl.getY(faceData);
|
||||
@@ -253,29 +253,29 @@ implements IPersonAuditServcie {
|
||||
String cropBase64 = this.openCvUtils.cropImgBase64(frontIdentityImage, x, y, width, height);
|
||||
ExtractFeatureResult extractFeatureResult = this.pineappleClient.extractFeature(ExtractFeatureParam.builder().img(cropBase64).build());
|
||||
if (extractFeatureResult == null) {
|
||||
throw new ServiceException("\u83b7\u53d6\u8eab\u4efd\u8bc1\u6b63\u9762\u4eba\u8138\u7279\u5f81\u5931\u8d25");
|
||||
throw new ServiceException("获取身份证正面人脸特征失败");
|
||||
}
|
||||
String featureOne = extractFeatureResult.getFeature();
|
||||
ExtractFeatureResult extractFeatureResultTwo = this.pineappleClient.extractFeature(ExtractFeatureParam.builder().img(comparePicture).build());
|
||||
if (extractFeatureResultTwo == null) {
|
||||
throw new ServiceException("\u83b7\u53d6\u4eba\u8138\u7279\u5f81\u5931\u8d25");
|
||||
throw new ServiceException("获取人脸特征失败");
|
||||
}
|
||||
String featureTwo = extractFeatureResultTwo.getFeature();
|
||||
ImgCompareParam imgCompareParam = ImgCompareParam.builder().featureA(featureOne).featureB(featureTwo).build();
|
||||
ImgCompareResult imgCompareResult = this.pineappleClient.imgCompare(imgCompareParam);
|
||||
if (imgCompareResult == null) {
|
||||
this.logger.error("\u8bc1\u4ef6\u8bc6\u522b\u5931\u8d25,\u672a\u8fd4\u56de\u54cd\u5e94");
|
||||
throw new ServiceException("\u8bc1\u4ef6\u8bc6\u522b\u5931\u8d25");
|
||||
this.logger.error("证件识别失败,未返回响应");
|
||||
throw new ServiceException("证件识别失败");
|
||||
}
|
||||
String score = imgCompareResult.getScore();
|
||||
if (StringUtils.isBlank((CharSequence)score)) {
|
||||
this.logger.error("\u8bc1\u4ef6\u8bc6\u522b\u5931\u8d25,\u53ef\u4fe1\u5206\u672a\u8fd4\u56de");
|
||||
throw new ServiceException("\u8bc1\u4ef6\u8bc6\u522b\u5931\u8d25");
|
||||
this.logger.error("证件识别失败,可信分未返回");
|
||||
throw new ServiceException("证件识别失败");
|
||||
}
|
||||
double scoreDouble = Double.parseDouble(score);
|
||||
if (scoreDouble < this.faceCompareScore) {
|
||||
this.logger.error("\u8bc1\u4ef6\u6bd4\u5bf9\u5931\u8d25,\u672a\u8fbe\u5230\u53ef\u4fe1\u5206");
|
||||
throw new ServiceException("\u8bc1\u4ef6\u6bd4\u5bf9\u5931\u8d25");
|
||||
this.logger.error("证件比对失败,未达到可信分");
|
||||
throw new ServiceException("证件比对失败");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ implements IPersonAuditServcie {
|
||||
bufferedImage = ImageIO.read(bais);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u83b7\u53d6\u56fe\u7247\u5927\u5c0f\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("获取图片大小异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
return bufferedImage;
|
||||
}
|
||||
@@ -308,16 +308,16 @@ implements IPersonAuditServcie {
|
||||
OcrCardParam cardParam = OcrCardParam.builder().app_id("").app_secret("").img(frontIdentityImage).build();
|
||||
OcrCardResult ocrCardResult = this.pineappleClient.ocrCard(cardParam);
|
||||
if (ocrCardResult == null) {
|
||||
this.logger.error("\u6839\u636e\u8eab\u4efd\u8bc1\u83b7\u53d6\u59d3\u540d\u5931\u8d25,\u672a\u6b63\u5e38\u54cd\u5e94");
|
||||
throw new ServiceException("\u5458\u5de5\u59d3\u540d\u4e0e\u8eab\u4efd\u8bc1\u59d3\u540d\u6821\u9a8c\u5931\u8d25");
|
||||
this.logger.error("根据身份证获取姓名失败,未正常响应");
|
||||
throw new ServiceException("员工姓名与身份证姓名校验失败");
|
||||
}
|
||||
String name = ocrCardResult.getName();
|
||||
if (StringUtils.isBlank((CharSequence)name)) {
|
||||
this.logger.error("\u6839\u636e\u8eab\u4efd\u8bc1\u83b7\u53d6\u59d3\u540d\u5931\u8d25,\u5f15\u64ce\u672a\u8fd4\u56de\u59d3\u540d");
|
||||
throw new ServiceException("\u5458\u5de5\u59d3\u540d\u4e0e\u8eab\u4efd\u8bc1\u59d3\u540d\u6821\u9a8c\u5931\u8d25");
|
||||
this.logger.error("根据身份证获取姓名失败,引擎未返回姓名");
|
||||
throw new ServiceException("员工姓名与身份证姓名校验失败");
|
||||
}
|
||||
if (!name.equals(paramName)) {
|
||||
throw new ServiceException("\u5458\u5de5\u59d3\u540d\u4e0e\u8eab\u4efd\u8bc1\u59d3\u540d\u4e0d\u5339\u914d");
|
||||
throw new ServiceException("员工姓名与身份证姓名不匹配");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ implements IPersonAuditServcie {
|
||||
this.imgStorePersonAuditMapper.updateByPrimaryKey(personAudit);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u4fee\u6539\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员注册修改失败,原因:{}", e);
|
||||
throw new ServiceException("53060535", this.messageSource.getMessage("53060535", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)personAudit.getId());
|
||||
@@ -598,7 +598,7 @@ implements IPersonAuditServcie {
|
||||
}
|
||||
ImageInfoDto compressInfoDto = Optional.ofNullable(this.openCvUtils.getGraphicsCompressBase64(base64)).orElse(new ImageInfoDto());
|
||||
if (StringUtils.isEmpty((CharSequence)compressInfoDto.getBase64Compress())) {
|
||||
this.logger.error("\u56fe\u7247\u538b\u7f29\u5931\u8d25");
|
||||
this.logger.error("图片压缩失败");
|
||||
return null;
|
||||
}
|
||||
String compressBase64 = compressInfoDto.getBase64Compress();
|
||||
@@ -607,7 +607,7 @@ implements IPersonAuditServcie {
|
||||
throw new ServiceException("53060428", this.messageSource.getMessage("53060428", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
String fileName = ToolUtil.generateUUID();
|
||||
this.logger.info("\u4e0a\u4f20\u6587\u4ef6:{},size={}", (Object)fileName, (Object)bytes.length);
|
||||
this.logger.info("上传文件:{},size={}", (Object)fileName, (Object)bytes.length);
|
||||
CloudwalkResult storeResult = this.personFileService.upload(fileName, bytes);
|
||||
if (storeResult != null && storeResult.isSuccess() && StringUtils.isNotBlank((CharSequence)((CharSequence)storeResult.getData()))) {
|
||||
return (String)storeResult.getData();
|
||||
@@ -644,11 +644,11 @@ implements IPersonAuditServcie {
|
||||
return CloudwalkResult.success((Object)personId);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u5ba1\u6838\u901a\u8fc7\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("人员注册审核通过失败,原因:{}", (Object)e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u5ba1\u6838\u901a\u8fc7\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员注册审核通过失败,原因:{}", e);
|
||||
throw new ServiceException("53060539", this.messageSource.getMessage("53060539", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
}
|
||||
@@ -699,7 +699,7 @@ implements IPersonAuditServcie {
|
||||
this.imgStorePersonAuditMapper.update(personAudit);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u5ba1\u6838\u62d2\u7edd\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("人员注册审核拒绝失败,原因:", e);
|
||||
throw new ServiceException("53060539", this.messageSource.getMessage("53060539", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
@@ -722,11 +722,11 @@ implements IPersonAuditServcie {
|
||||
}
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u6279\u91cf\u540c\u6784\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("人员注册批量同构失败,原因:{}", (Object)e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u6279\u91cf\u540c\u6784\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", e);
|
||||
this.logger.error("人员注册批量同构失败,原因:{}", e);
|
||||
throw new ServiceException("53060539", this.messageSource.getMessage("53060539", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
@@ -745,7 +745,7 @@ implements IPersonAuditServcie {
|
||||
this.imgStorePersonAuditMapper.batchUpdate(applyList, CpPersonAuditEnum.INIT.getCode());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u6279\u91cf\u62d2\u7edd\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("人员注册批量拒绝失败,原因:", e);
|
||||
throw new ServiceException("53060539", this.messageSource.getMessage("53060539", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)true);
|
||||
@@ -770,7 +770,7 @@ implements IPersonAuditServcie {
|
||||
pageAble = new CloudwalkPageAble(collect, page, pageData.getTotal());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u4eba\u5458\u6ce8\u518c\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", e);
|
||||
this.logger.error("分页查询人员注册信息失败,原因:", e);
|
||||
throw new ServiceException("53060540", this.messageSource.getMessage("53060540", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
return CloudwalkResult.success((Object)pageAble);
|
||||
@@ -808,7 +808,7 @@ implements IPersonAuditServcie {
|
||||
if (Objects.equals(audit.getSource(), CpPersonSourceEnum.DEVICE.getCode())) {
|
||||
UserProperties properties = new UserProperties();
|
||||
properties.setCode("deviceName");
|
||||
properties.setLabel("\u8bbe\u5907\u540d\u79f0");
|
||||
properties.setLabel("设备名称");
|
||||
properties.setValue((Object)audit.getDeviceName());
|
||||
result.add(properties);
|
||||
}
|
||||
@@ -839,7 +839,7 @@ implements IPersonAuditServcie {
|
||||
personAudit = this.imgStorePersonAuditMapper.userQuery(queryDto);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4eba\u5458\u6ce8\u518c\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("人员注册查询失败,原因:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)"53060548", (String)this.messageSource.getMessage("53060548", null, LocaleContextHolder.getLocale()));
|
||||
}
|
||||
if (personAudit == null) {
|
||||
|
||||
+3
-3
@@ -57,7 +57,7 @@ public class PersonCardCompareEventHandler {
|
||||
try {
|
||||
String applicationId = this.commonPersonRegistryService.getApplicationId(personCardCompareEvent.getBusinessId());
|
||||
if (StringUtils.isBlank((CharSequence)applicationId) || !Objects.equals(applicationId, personCardCompareEvent.getApplicationId())) {
|
||||
this.logger.warn("PersonCardCompareEventHandler handler \u5e94\u7528id\u4e0d\u5339\u914d:[{}]", (Object)JSON.toJSONString((Object)personCardCompareEvent));
|
||||
this.logger.warn("PersonCardCompareEventHandler handler 应用id不匹配:[{}]", (Object)JSON.toJSONString((Object)personCardCompareEvent));
|
||||
return;
|
||||
}
|
||||
CompanyContext company = new CompanyContext();
|
||||
@@ -80,7 +80,7 @@ public class PersonCardCompareEventHandler {
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class PersonCardCompareEventHandler {
|
||||
}
|
||||
if (CertPropertyEnum.SEX.getValue().equals(personProperties.getBindProp())) {
|
||||
int sexValue = Integer.valueOf(Optional.ofNullable(value).orElse("0").toString());
|
||||
value = 1 == sexValue ? "\u7537" : (2 == sexValue ? "\u5973" : "\u672a\u77e5");
|
||||
value = 1 == sexValue ? "男" : (2 == sexValue ? "女" : "未知");
|
||||
}
|
||||
if (CertPropertyEnum.BIRTHDAY.getValue().equals(personProperties.getBindProp())) {
|
||||
String birthdayValue = Optional.ofNullable(value).orElse("").toString();
|
||||
|
||||
+10
-10
@@ -174,7 +174,7 @@ implements PersonFileService {
|
||||
return result;
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u4e0a\u4f20\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("上传图片异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,7 +252,7 @@ implements PersonFileService {
|
||||
bufferedImage = ImageIO.read(bais);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u83b7\u53d6\u56fe\u7247\u5927\u5c0f\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("获取图片大小异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
return bufferedImage;
|
||||
}
|
||||
@@ -263,18 +263,18 @@ implements PersonFileService {
|
||||
throw new ServiceException("53060428", this.getMessage("53060428"));
|
||||
}
|
||||
String fileName = file.getOriginalFilename();
|
||||
this.logger.info("\u4e0a\u4f20\u56fe\u7247\uff1a{}", (Object)fileName);
|
||||
this.logger.info("上传图片:{}", (Object)fileName);
|
||||
if (!FileUtil.isAppointFileType(fileName.substring(fileName.lastIndexOf(46) + 1), FileType.JPEG, FileType.JPG, FileType.PNG)) {
|
||||
this.logger.info("\u6587\u4ef6\u540e\u7f00\u7c7b\u578b\u4e0d\u5408\u6cd5\uff1a{}", (Object)fileName);
|
||||
this.logger.info("文件后缀类型不合法:{}", (Object)fileName);
|
||||
throw new ServiceException("53060429", this.getMessage("53060429"));
|
||||
}
|
||||
if (!FileUtil.isAppointFileContentType(FileUtil.getFileContentType(file.getBytes()), FileContentType.PNG, FileContentType.JPEG)) {
|
||||
this.logger.info("\u6587\u4ef6\u5185\u5bb9\u7c7b\u578b\u4e0d\u5408\u6cd5");
|
||||
this.logger.info("文件内容类型不合法");
|
||||
throw new ServiceException("53060429", this.getMessage("53060429"));
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u6821\u9a8c\u4e0a\u4f20\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("校验上传图片异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("80014013", this.getMessage("80014013"));
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,7 @@ implements PersonFileService {
|
||||
return fileContent;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65cb\u8f6c\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("旋转图片异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("53060430", this.getMessage("53060430"));
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ implements PersonFileService {
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u83b7\u53d6\u56fe\u7247\u5927\u5c0f\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("获取图片大小异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -359,7 +359,7 @@ implements PersonFileService {
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u538b\u7f29\u56fe\u7247\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("压缩图片异常:{}", (Object)e.getMessage());
|
||||
}
|
||||
if (file.getSize() >= (long)(this.imageSizeMin * 1024) && file.getSize() <= (long)(this.imageSizeMax * 1024) && null != bufferedImage && bufferedImage.getWidth() >= this.imageWidthMin && bufferedImage.getWidth() <= this.imageWidthMax && bufferedImage.getHeight() >= this.imageHeightMin && bufferedImage.getHeight() <= this.imageHeightMax) {
|
||||
return file;
|
||||
@@ -379,7 +379,7 @@ implements PersonFileService {
|
||||
return this.openCvUtils.resizeImageBytes(file.getBytes(), width, height);
|
||||
}
|
||||
catch (IOException e) {
|
||||
this.logger.error("\u538b\u7f29\u56fe\u7247\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("压缩图片异常:{}", (Object)e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+23
-23
@@ -47,7 +47,7 @@ public class PictureResultEventHandler {
|
||||
if (null == event) {
|
||||
return;
|
||||
}
|
||||
this.logger.debug("Kafka\u6d88\u8d39\u56fe\u7247\u6ce8\u518c\u7ed3\u679c\u6570\u636e:[{}]", (Object)JSON.toJSONString((Object)event));
|
||||
this.logger.debug("Kafka消费图片注册结果数据:[{}]", (Object)JSON.toJSONString((Object)event));
|
||||
try {
|
||||
String deviceId = event.getDeviceId();
|
||||
List imageDataList = event.getImageData();
|
||||
@@ -56,7 +56,7 @@ public class PictureResultEventHandler {
|
||||
queryPerson.setImageId(imageData.getFaceId());
|
||||
List dbPersonList = this.imgStorePersonMapper.query(queryPerson);
|
||||
if (CollectionUtils.isEmpty((Collection)dbPersonList)) {
|
||||
this.logger.warn("\u6839\u636e\u4eba\u8138[{}]\u67e5\u8be2\u4eba\u5458,\u4e0d\u5b58\u5728\u4eba\u5458\u8bb0\u5f55", (Object)imageData.getFaceId());
|
||||
this.logger.warn("根据人脸[{}]查询人员,不存在人员记录", (Object)imageData.getFaceId());
|
||||
continue;
|
||||
}
|
||||
ImgStorePerson dbPerson = (ImgStorePerson)dbPersonList.get(0);
|
||||
@@ -65,9 +65,9 @@ public class PictureResultEventHandler {
|
||||
devicePersonSyncLogDTO.setImageStoreId(imageData.getGroupId());
|
||||
devicePersonSyncLogDTO.setPersonId(dbPerson.getId());
|
||||
List syncLogs = this.devicePersonSyncLogMapper.query(devicePersonSyncLogDTO);
|
||||
this.logger.debug("\u6839\u636e\u8bbe\u5907[{}]\u56fe\u5e93[{}]\u4eba\u5458[{}]\u67e5\u8be2\u540c\u6b65\u8bb0\u5f55\u65e5\u5fd7:[{}]", new Object[]{deviceId, imageData.getGroupId(), dbPerson.getId(), JSON.toJSONString((Object)syncLogs)});
|
||||
this.logger.debug("根据设备[{}]图库[{}]人员[{}]查询同步记录日志:[{}]", new Object[]{deviceId, imageData.getGroupId(), dbPerson.getId(), JSON.toJSONString((Object)syncLogs)});
|
||||
if (CollectionUtils.isEmpty((Collection)syncLogs)) {
|
||||
this.logger.warn("\u4e0d\u5b58\u5728\u540c\u6b65\u8bb0\u5f55\u65e5\u5fd7");
|
||||
this.logger.warn("不存在同步记录日志");
|
||||
continue;
|
||||
}
|
||||
DevicePersonSyncLog dbSyncLog = (DevicePersonSyncLog)syncLogs.get(0);
|
||||
@@ -75,14 +75,14 @@ public class PictureResultEventHandler {
|
||||
queryGroupPersonDTO.setImageStoreId(imageData.getGroupId());
|
||||
queryGroupPersonDTO.setPersonId(dbPerson.getId());
|
||||
List groupPersonRefs = this.groupPersonRefMapper.query(queryGroupPersonDTO);
|
||||
this.logger.debug("\u6839\u636e\u56fe\u5e93[{}]\u4eba\u5458[{}]\u67e5\u8be2\u56fe\u5e93\u4eba\u5458\u5173\u7cfb\u8bb0\u5f55:[{}]", new Object[]{imageData.getGroupId(), dbPerson.getId(), JSON.toJSONString((Object)groupPersonRefs)});
|
||||
this.logger.debug("根据图库[{}]人员[{}]查询图库人员关系记录:[{}]", new Object[]{imageData.getGroupId(), dbPerson.getId(), JSON.toJSONString((Object)groupPersonRefs)});
|
||||
if (CollectionUtils.isEmpty((Collection)groupPersonRefs)) {
|
||||
this.logger.warn("\u4e0d\u5b58\u5728\u56fe\u5e93\u4eba\u5458\u8bb0\u5f55");
|
||||
this.logger.warn("不存在图库人员记录");
|
||||
continue;
|
||||
}
|
||||
GroupPersonRef dbGroupPersonRef = (GroupPersonRef)groupPersonRefs.get(0);
|
||||
if (null != imageData.getLastUpdateTime()) {
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u5b58\u5728\u540c\u6b65\u65f6\u95f4[{}]", (Object)deviceId, (Object)imageData.getLastUpdateTime());
|
||||
this.logger.debug("设备[{}]上报注册结果存在同步时间[{}]", (Object)deviceId, (Object)imageData.getLastUpdateTime());
|
||||
if (this.lockDeviceReport(deviceId, dbGroupPersonRef.getImageStoreId(), dbGroupPersonRef.getPersonId())) {
|
||||
this.handleSyncTime(imageData, dbGroupPersonRef, dbSyncLog);
|
||||
this.unclockDeviceReport(deviceId, dbGroupPersonRef.getImageStoreId(), dbGroupPersonRef.getPersonId());
|
||||
@@ -98,38 +98,38 @@ public class PictureResultEventHandler {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
this.logger.debug("\u8bbe\u5907[{}]\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u4e0d\u5b58\u5728\u540c\u6b65\u65f6\u95f4", (Object)deviceId);
|
||||
this.logger.debug("设备[{}]上报注册结果不存在同步时间", (Object)deviceId);
|
||||
this.handleNoSyncTime(event.getReportTime(), imageData, dbSyncLog);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6267\u884c\u62a5\u9519 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
this.logger.error("执行报错 {}: {}", (Object)e.getClass().getName(), (Object)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSyncTime(ImageData imageData, GroupPersonRef dbGroupPersonRef, DevicePersonSyncLog dbSyncLog) {
|
||||
if (null == dbGroupPersonRef.getLastUpdateTime()) {
|
||||
this.logger.warn("\u6570\u636e\u5e93\u56fe\u5e93\u4eba\u5458\u5173\u7cfb\u8bb0\u5f55[{}]\u540c\u6b65\u65f6\u95f4\u4e3a\u7a7a", (Object)dbGroupPersonRef.getId());
|
||||
this.logger.warn("数据库图库人员关系记录[{}]同步时间为空", (Object)dbGroupPersonRef.getId());
|
||||
return;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (imageData.getLastUpdateTime() >= dbGroupPersonRef.getLastUpdateTime()) {
|
||||
this.logger.debug("\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u7684\u540c\u6b65\u65f6\u95f4[{}]\u5927\u4e8e\u7b49\u4e8e\u6570\u636e\u5e93\u540c\u6b65\u65f6\u95f4[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbGroupPersonRef.getLastUpdateTime());
|
||||
sb.append("\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u540c\u6b65\u65f6\u95f4[" + imageData.getLastUpdateTime() + "]\u5927\u4e8e\u7b49\u4e8e\u6570\u636e\u5e93\u540c\u6b65\u65f6\u95f4[" + dbGroupPersonRef.getLastUpdateTime() + "],\u5e76\u4e14\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u540c\u6b65\u65f6\u95f4[" + imageData.getLastUpdateTime() + "]\u5927\u4e8e\u7b49\u4e8e\u540c\u6b65\u8bb0\u5f55\u6700\u8fd1\u540c\u6b65\u65f6\u95f4[" + dbSyncLog.getLastReportTime() + "],\u66f4\u65b0count=0");
|
||||
this.logger.debug("上报注册结果的同步时间[{}]大于等于数据库同步时间[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbGroupPersonRef.getLastUpdateTime());
|
||||
sb.append("上报注册结果同步时间[" + imageData.getLastUpdateTime() + "]大于等于数据库同步时间[" + dbGroupPersonRef.getLastUpdateTime() + "],并且上报注册结果同步时间[" + imageData.getLastUpdateTime() + "]大于等于同步记录最近同步时间[" + dbSyncLog.getLastReportTime() + "],更新count=0");
|
||||
dbSyncLog.setUpdateInfo(sb.toString());
|
||||
this.updateStatusAndCount(imageData, dbSyncLog);
|
||||
} else {
|
||||
this.logger.debug("\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u7684\u540c\u6b65\u65f6\u95f4[{}]\u5c0f\u4e8e\u6570\u636e\u5e93\u540c\u6b65\u65f6\u95f4[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbGroupPersonRef.getLastUpdateTime());
|
||||
sb.append("\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u7684\u540c\u6b65\u65f6\u95f4[" + imageData.getLastUpdateTime() + "]\u5c0f\u4e8e\u6570\u636e\u5e93\u540c\u6b65\u65f6\u95f4[" + dbGroupPersonRef.getLastUpdateTime() + "]");
|
||||
this.logger.debug("上报注册结果的同步时间[{}]小于数据库同步时间[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbGroupPersonRef.getLastUpdateTime());
|
||||
sb.append("上报注册结果的同步时间[" + imageData.getLastUpdateTime() + "]小于数据库同步时间[" + dbGroupPersonRef.getLastUpdateTime() + "]");
|
||||
if (dbSyncLog.getCount() == 0) {
|
||||
sb.append(",count=0,\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u540c\u6b65\u65f6\u95f4[" + imageData.getLastUpdateTime() + "]\u5927\u4e8e\u7b49\u4e8e\u540c\u6b65\u8bb0\u5f55\u6700\u8fd1\u540c\u6b65\u65f6\u95f4[" + dbSyncLog.getLastReportTime() + "],\u66f4\u65b0count=0");
|
||||
sb.append(",count=0,上报注册结果同步时间[" + imageData.getLastUpdateTime() + "]大于等于同步记录最近同步时间[" + dbSyncLog.getLastReportTime() + "],更新count=0");
|
||||
dbSyncLog.setUpdateInfo(sb.toString());
|
||||
this.updateStatusAndCount(imageData, dbSyncLog);
|
||||
} else if (dbSyncLog.getCount() == 1) {
|
||||
sb.append(",count=1,\u66f4\u65b0\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u672a\u62c9\u53d6,count--");
|
||||
sb.append(",count=1,更新同步状态:设备未拉取,count--");
|
||||
this.updateStatusAndCountDec(SyncStatusEnum.NOT_PULL.getValue(), imageData, dbSyncLog, sb.toString(), imageData.getLastUpdateTime());
|
||||
} else if (dbSyncLog.getCount() > 1) {
|
||||
sb.append(",count>1,\u66f4\u65b0\u540c\u6b65\u72b6\u6001:\u8bbe\u5907\u5df2\u62c9\u53d6,count--");
|
||||
sb.append(",count>1,更新同步状态:设备已拉取,count--");
|
||||
this.updateStatusAndCountDec(SyncStatusEnum.PULL.getValue(), imageData, dbSyncLog, sb.toString(), imageData.getLastUpdateTime());
|
||||
}
|
||||
}
|
||||
@@ -139,17 +139,17 @@ public class PictureResultEventHandler {
|
||||
int syncStatus;
|
||||
int n = syncStatus = imageData.getCode().equals("00000000") ? SyncStatusEnum.SYNC_SUCCESS.getValue() : SyncStatusEnum.SYNC_FAIL.getValue();
|
||||
if (SyncStatusEnum.SYNC_SUCCESS.getValue() == dbSyncLog.getStatus().intValue() || SyncStatusEnum.SYNC_FAIL.getValue() == dbSyncLog.getStatus().intValue()) {
|
||||
this.logger.debug("\u6570\u636e\u5e93\u540c\u6b65\u8bb0\u5f55[{}]\u662f\u4e0a\u62a5\u72b6\u6001[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog.getStatus());
|
||||
this.logger.debug("数据库同步记录[{}]是上报状态[{}]", (Object)dbSyncLog.getId(), (Object)dbSyncLog.getStatus());
|
||||
if (syncStatus != dbSyncLog.getStatus()) {
|
||||
this.logger.debug("\u4e0a\u62a5\u72b6\u6001\u4e0e\u540c\u6b65\u8bb0\u5f55[{}]\u4e0d\u4e00\u81f4,\u4e0a\u62a5\u72b6\u6001[{}],\u540c\u6b65\u8bb0\u5f55\u72b6\u6001[{}]", new Object[]{dbSyncLog.getId(), syncStatus, dbSyncLog.getStatus()});
|
||||
this.logger.debug("上报状态与同步记录[{}]不一致,上报状态[{}],同步记录状态[{}]", new Object[]{dbSyncLog.getId(), syncStatus, dbSyncLog.getStatus()});
|
||||
if (null == reportTime || null != dbSyncLog.getLastUpdateTime() && Math.abs(reportTime - dbSyncLog.getLastUpdateTime()) <= this.approachTime) {
|
||||
this.logger.warn("\u4e0a\u62a5\u65f6\u95f4[{}]\u4e0e\u540c\u6b65\u8bb0\u5f55\u8868\u4e0a\u62a5\u65f6\u95f4[{}]\u76f8\u8fd1,\u4e0d\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}]", new Object[]{reportTime, dbSyncLog.getLastReportTime(), dbSyncLog.getId()});
|
||||
this.logger.warn("上报时间[{}]与同步记录表上报时间[{}]相近,不更新同步记录[{}]", new Object[]{reportTime, dbSyncLog.getLastReportTime(), dbSyncLog.getId()});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.logger.debug("\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55[{}],\u540c\u6b65\u72b6\u6001[{}]\u548ccount[{}]", new Object[]{dbSyncLog.getId(), syncStatus, dbSyncLog.getCount() - 1});
|
||||
this.updateStatusAndCountDec(syncStatus, imageData, dbSyncLog, "\u8bbe\u5907\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u4e0d\u5b58\u5728\u540c\u6b65\u65f6\u95f4,\u66f4\u65b0\u540c\u6b65\u8bb0\u5f55", reportTime);
|
||||
this.logger.debug("更新同步记录[{}],同步状态[{}]和count[{}]", new Object[]{dbSyncLog.getId(), syncStatus, dbSyncLog.getCount() - 1});
|
||||
this.updateStatusAndCountDec(syncStatus, imageData, dbSyncLog, "设备上报注册结果不存在同步时间,更新同步记录", reportTime);
|
||||
}
|
||||
|
||||
private synchronized boolean lockDeviceReport(String deviceId, String imageStoreId, String personId) {
|
||||
@@ -176,7 +176,7 @@ public class PictureResultEventHandler {
|
||||
int syncStatus;
|
||||
int n = syncStatus = imageData.getCode().equals("00000000") ? SyncStatusEnum.SYNC_SUCCESS.getValue() : SyncStatusEnum.SYNC_FAIL.getValue();
|
||||
if (null == dbSyncLog.getLastReportTime() || imageData.getLastUpdateTime() >= dbSyncLog.getLastReportTime()) {
|
||||
this.logger.debug("\u4e0a\u62a5\u6ce8\u518c\u7ed3\u679c\u540c\u6b65\u65f6\u95f4[{}]\u5927\u4e8e\u7b49\u4e8e\u540c\u6b65\u8bb0\u5f55\u6700\u8fd1\u540c\u6b65\u65f6\u95f4[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbSyncLog.getLastReportTime());
|
||||
this.logger.debug("上报注册结果同步时间[{}]大于等于同步记录最近同步时间[{}]", (Object)imageData.getLastUpdateTime(), (Object)dbSyncLog.getLastReportTime());
|
||||
dbSyncLog.setStatus(Integer.valueOf(syncStatus));
|
||||
dbSyncLog.setCount(Integer.valueOf(0));
|
||||
dbSyncLog.setCode(imageData.getCode());
|
||||
|
||||
+21
-21
@@ -59,38 +59,38 @@ implements PictureRevisionService {
|
||||
@Async(value="pictureRevisionExecutor")
|
||||
public void personPicRevision(String personId, CloudwalkCallContext cloudwalkContext) throws ServiceException {
|
||||
String img;
|
||||
this.logger.info("\u9632\u6b62\u4eba\u5458\u672a\u5165\u6570\u636e\u5e93\u5373\u5f00\u59cb\u4fee\u56fe\uff0c\u4f11\u772030\u79d2");
|
||||
this.logger.info("防止人员未入数据库即开始修图,休眠30秒");
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(500L);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
this.logger.error("\u4f11\u7720\u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("休眠失败,失败原因:{}", (Object)e.getMessage());
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
PersonPropertiesSwitch personPropertiesSwitch = this.personPropertiesSwitchMapper.selectByBusinessId(cloudwalkContext.getCompany().getCompanyId());
|
||||
if (ObjectUtils.isEmpty((Object)personPropertiesSwitch) || !personPropertiesSwitch.getSwitchParam().booleanValue() || personPropertiesSwitch.getStatus() != 0) {
|
||||
this.logger.error("\u79df\u6237id\u4e3a{}\u7684\u7528\u6237\u4fee\u56fe\u529f\u80fd\u672a\u5f00\u542f", (Object)cloudwalkContext.getCompany().getCompanyId());
|
||||
throw new ServiceException("\u4fee\u56fe\u529f\u80fd\u672a\u5f00\u542f");
|
||||
this.logger.error("租户id为{}的用户修图功能未开启", (Object)cloudwalkContext.getCompany().getCompanyId());
|
||||
throw new ServiceException("修图功能未开启");
|
||||
}
|
||||
ImgStorePerson person = this.imgStorePersonMapper.selectByPrimaryKey(personId);
|
||||
if (ObjectUtils.isEmpty((Object)person)) {
|
||||
this.logger.error("id\u4e3a{}\u7684\u4eba\u5458\u4e0d\u5b58\u5728", (Object)personId);
|
||||
throw new ServiceException("\u4eba\u5458\u4e0d\u5b58\u5728");
|
||||
this.logger.error("id为{}的人员不存在", (Object)personId);
|
||||
throw new ServiceException("人员不存在");
|
||||
}
|
||||
if (ObjectUtils.isEmpty((Object)person.getComparePicture())) {
|
||||
this.logger.error("id\u4e3a{}\u7684\u4eba\u5458\u4e0d\u5b58\u5728\u6bd4\u5bf9\u7167\u7247", (Object)personId);
|
||||
throw new ServiceException("\u4eba\u5458\u4e0d\u5b58\u5728\u6bd4\u5bf9\u7167\u7247");
|
||||
this.logger.error("id为{}的人员不存在比对照片", (Object)personId);
|
||||
throw new ServiceException("人员不存在比对照片");
|
||||
}
|
||||
try {
|
||||
byte[] bytes = this.fileStorageManager.fileDownload(person.getComparePicture());
|
||||
img = ImageUtil.encodeByte2Base64(bytes);
|
||||
if (ObjectUtils.isEmpty((Object)img)) {
|
||||
this.logger.error("\u56fe\u7247\u4e0b\u8f7d\u5931\u8d25");
|
||||
throw new ServiceException("\u56fe\u7247\u4e0b\u8f7d\u5931\u8d25");
|
||||
this.logger.error("图片下载失败");
|
||||
throw new ServiceException("图片下载失败");
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4e0b\u8f7d\u56fe\u7247\u5f02\u5e38\uff1a{}", (Object)e.getMessage());
|
||||
this.logger.error("下载图片异常:{}", (Object)e.getMessage());
|
||||
throw new ServiceException("80014016", this.getMessage("80014016"));
|
||||
}
|
||||
int customType = personPropertiesSwitch.getShapeParam() != false ? CustEditEnum.FT_MORPH.getCode() : 0;
|
||||
@@ -124,48 +124,48 @@ implements PictureRevisionService {
|
||||
AgFeatureExtractParam featureExtractParam = new AgFeatureExtractParam();
|
||||
featureExtractParam.setImageBase64(img);
|
||||
CloudwalkResult result = this.cpImageStoreToolService.extractFeature(featureExtractParam);
|
||||
this.logger.info("scoreResult\uff1a{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
this.logger.info("scoreResult:{}", (Object)JSONObject.toJSONString((Object)result));
|
||||
Long time = System.currentTimeMillis();
|
||||
personUpdate.setLastUpdateTime(time);
|
||||
this.imgStorePersonMapper.updateByPrimaryKeySelective(personUpdate);
|
||||
}
|
||||
|
||||
public String pictureRevision(RevisionParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u4fee\u56fe\uff0c\u5f00\u59cb\u65f6\u95f4\uff1a{}", (Object)new Date());
|
||||
this.logger.info("开始修图,开始时间:{}", (Object)new Date());
|
||||
long beginTime = System.currentTimeMillis();
|
||||
PicRevisionParam picRevisionParam = PicRevisionParam.builder().imgA(param.getImg()).angle(param.getCustomType()).build();
|
||||
PictureRevisionResult pictureRevisionResult = this.pineappleClient.pictureRevision(picRevisionParam);
|
||||
if (ObjectUtils.isEmpty((Object)pictureRevisionResult) || pictureRevisionResult.getResult() != 0 || ObjectUtils.isEmpty((Object)pictureRevisionResult.getImgDest())) {
|
||||
this.logger.error("\u4fee\u56fe\u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a{}", (Object)pictureRevisionResult.getInfo());
|
||||
this.logger.error("修图失败,失败原因:{}", (Object)pictureRevisionResult.getInfo());
|
||||
throw new ServiceException(pictureRevisionResult.getResult().toString(), pictureRevisionResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u4fee\u56fe\u6210\u529f\uff0c\u8017\u65f6{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
this.logger.info("修图成功,耗时{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
return pictureRevisionResult.getImgDest();
|
||||
}
|
||||
|
||||
public String changeBackground(ChangeBackgroundParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u6362\u80cc\u666f\uff0c\u5f00\u59cb\u65f6\u95f4\uff1a{}", (Object)new Date());
|
||||
this.logger.info("开始换背景,开始时间:{}", (Object)new Date());
|
||||
long beginTime = System.currentTimeMillis();
|
||||
PicChangeBackgroundParam engineParam = PicChangeBackgroundParam.builder().imgA(param.getImg()).backgroundType(param.getImgType()).build();
|
||||
PictureRevisionResult pictureRevisionResult = this.pineappleClient.pictureChangeBackground(engineParam);
|
||||
if (ObjectUtils.isEmpty((Object)pictureRevisionResult) || pictureRevisionResult.getResult() != 0 || ObjectUtils.isEmpty((Object)pictureRevisionResult.getImgDest())) {
|
||||
this.logger.error("\u6362\u80cc\u666f\u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a{}", (Object)pictureRevisionResult.getInfo());
|
||||
this.logger.error("换背景失败,失败原因:{}", (Object)pictureRevisionResult.getInfo());
|
||||
throw new ServiceException(pictureRevisionResult.getResult().toString(), pictureRevisionResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u6362\u80cc\u666f\u6210\u529f\uff0c\u8017\u65f6{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
this.logger.info("换背景成功,耗时{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
return pictureRevisionResult.getImgDest();
|
||||
}
|
||||
|
||||
public String cropImg(CropParam param) throws ServiceException {
|
||||
this.logger.info("\u5f00\u59cb\u88c1\u526a\uff0c\u5f00\u59cb\u65f6\u95f4\uff1a{}", (Object)new Date());
|
||||
this.logger.info("开始裁剪,开始时间:{}", (Object)new Date());
|
||||
long beginTime = System.currentTimeMillis();
|
||||
PicCropParam picRevisionParam = PicCropParam.builder().imgA(param.getImg()).cropType(param.getCardType()).build();
|
||||
PictureRevisionResult pictureRevisionResult = this.pineappleClient.pictureCrop(picRevisionParam);
|
||||
if (ObjectUtils.isEmpty((Object)pictureRevisionResult) || pictureRevisionResult.getResult() != 0 || ObjectUtils.isEmpty((Object)pictureRevisionResult.getImgDest())) {
|
||||
this.logger.error("\u88c1\u526a\u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a{}", (Object)pictureRevisionResult.getInfo());
|
||||
this.logger.error("裁剪失败,失败原因:{}", (Object)pictureRevisionResult.getInfo());
|
||||
throw new ServiceException(pictureRevisionResult.getResult().toString(), pictureRevisionResult.getInfo());
|
||||
}
|
||||
this.logger.info("\u88c1\u526a\u6210\u529f\uff0c\u8017\u65f6{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
this.logger.info("裁剪成功,耗时{}", (Object)(System.currentTimeMillis() - beginTime));
|
||||
return pictureRevisionResult.getImgDest();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class PortalUserServiceImpl {
|
||||
queryResult = this.userFeignClient.query(userQueryParam);
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("\u67e5\u8be2\u7528\u6237\u4fe1\u606f\u5931\u8d25", e);
|
||||
log.error("查询用户信息失败", e);
|
||||
}
|
||||
if (queryResult != null && queryResult.isSuccess()) {
|
||||
return (List)queryResult.getData();
|
||||
|
||||
+5
-5
@@ -85,14 +85,14 @@ implements IPersonRegistryHandler {
|
||||
}
|
||||
List dbPersonProList = this.imgStorePersonPropertiesMapper.selectByIds(param.getBusinessId(), param.getPropertyIdList());
|
||||
if (CollectionUtils.isEmpty((Collection)dbPersonProList) || dbPersonProList.size() != param.getPropertyIdList().size()) {
|
||||
this.logger.warn("\u6ce8\u518c\u5c5e\u6027\u4e0d\u5c5e\u4e8e\u4eba\u5458\u57fa\u672c\u5c5e\u6027,\u6ce8\u518c\u5c5e\u6027Id\u5217\u8868:[{}]", (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
this.logger.warn("注册属性不属于人员基本属性,注册属性Id列表:[{}]", (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
return CloudwalkResult.fail((String)"53014508", (String)this.getMessage("53014508"));
|
||||
}
|
||||
for (DefaultPropertyEnum default_property : DefaultPropertyEnum.values()) {
|
||||
Optional<ImgStorePersonProperties> requiredOptional = dbPersonProList.stream().filter(property -> default_property.getValue().equals(property.getCode())).findFirst();
|
||||
if (requiredOptional.isPresent()) continue;
|
||||
this.logger.warn("{}\u672a\u52fe\u9009,\u6ce8\u518c\u5c5e\u6027Id\u5217\u8868:[{}]", (Object)default_property.getDescription(), (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
return CloudwalkResult.fail((String)"53014511", (String)("\u6ce8\u518c\u5c5e\u6027" + default_property.getDescription() + "\u5fc5\u987b\u52fe\u9009"));
|
||||
this.logger.warn("{}未勾选,注册属性Id列表:[{}]", (Object)default_property.getDescription(), (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
return CloudwalkResult.fail((String)"53014511", (String)("注册属性" + default_property.getDescription() + "必须勾选"));
|
||||
}
|
||||
if (Objects.equals(param.getDeviceStatus(), StatusEnum.CLOSE.getValue()) || Objects.equals(param.getCodeStatus(), StatusEnum.CLOSE.getValue())) {
|
||||
ImgStorePersonProperties queryPersonPro = new ImgStorePersonProperties();
|
||||
@@ -103,7 +103,7 @@ implements IPersonRegistryHandler {
|
||||
if (!CollectionUtils.isEmpty((Collection)requiredPersonProList)) {
|
||||
List requiredPersonProIdList = Collections3.extractToList((Collection)requiredPersonProList, (String)"id");
|
||||
if ((dbPersonProList = dbPersonProList.stream().filter(pro -> requiredPersonProIdList.contains(pro.getId())).collect(Collectors.toList())).size() != requiredPersonProList.size()) {
|
||||
this.logger.warn("\u8bbe\u5907\u6ce8\u518c\u5ba1\u6838\u548c\u626b\u7801\u6ce8\u518c\u5ba1\u6838\u672a\u540c\u65f6\u6253\u5f00,\u6709\u672a\u52fe\u9009\u7684\u5fc5\u586b\u5c5e\u6027,\u6ce8\u518c\u5c5e\u6027Id\u5217\u8868:[{}]", (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
this.logger.warn("设备注册审核和扫码注册审核未同时打开,有未勾选的必填属性,注册属性Id列表:[{}]", (Object)JSONObject.toJSONString((Object)param.getPropertyIdList()));
|
||||
return CloudwalkResult.fail((String)"53014511", (String)this.getMessage("53014511"));
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ implements IPersonRegistryHandler {
|
||||
queryPersonPro.setStatus(StatusEnum.VALID.getValue());
|
||||
List personPropertyList = this.imgStorePersonPropertiesMapper.select(queryPersonPro);
|
||||
if (CollectionUtils.isEmpty((Collection)personPropertyList)) {
|
||||
this.logger.warn("\u4e0d\u5b58\u5728\u4eba\u5458\u5c5e\u6027");
|
||||
this.logger.warn("不存在人员属性");
|
||||
return CloudwalkResult.fail((String)"53014524", (String)this.getMessage("53014524"));
|
||||
}
|
||||
List<PersonPropertiesResult> proResultList = BeanCopyUtils.copy((Collection)personPropertyList, PersonPropertiesResult.class);
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class EnterpriseChangeHandler {
|
||||
this.unitInfoInitService.init(event);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u4f01\u4e1a\u4e8b\u4ef6\u5904\u7406\u5f02\u5e38", e);
|
||||
this.logger.error("新增企业事件处理异常", e);
|
||||
}
|
||||
}
|
||||
if (BusinessChangeEnum.UPDATE.getCode().equals(change)) {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public interface DeviceAppFeignClient {
|
||||
|
||||
@Override
|
||||
public CloudwalkResult<String> addDevice(String param) {
|
||||
return CloudwalkResult.success((Object)"\u670d\u52a1\u5668\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u8bbf\u95ee");
|
||||
return CloudwalkResult.success((Object)"服务器繁忙,请稍后访问");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public interface UserFeignClient {
|
||||
@Override
|
||||
public CloudwalkResult<List<UserQueryResult>> query(PortalUserQueryParam param) {
|
||||
this.logger.error("call portal query user failed");
|
||||
return CloudwalkResult.fail((String)"53013553", (String)"\u67e5\u8be2\u7528\u6237\u4fe1\u606f\u5931\u8d25");
|
||||
return CloudwalkResult.fail((String)"53013553", (String)"查询用户信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -29,19 +29,19 @@ public interface VehicleFeignClient {
|
||||
@Override
|
||||
public CloudwalkResult<Boolean> setVehiclePerson(AddVehiclePersonParam param) {
|
||||
this.logger.error("call VehicleFeignClient setVehiclePerson failed");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"\u8fdc\u7a0b\u8c03\u7528\u8f66\u8f86\u7ba1\u7406\u7ed1\u5b9a\u8f66\u8f86\u548c\u4eba\u5458\u5173\u7cfb\u5931\u8d25");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"远程调用车辆管理绑定车辆和人员关系失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudwalkResult<List<String>> getVehicleIds(AddVehiclePersonForm form) {
|
||||
this.logger.error("call VehicleFeignClient getVehicleIds failed");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"\u67e5\u8be2\u4eba\u5458\u8f66\u8f86\u5931\u8d25");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"查询人员车辆失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudwalkResult<List<VehicleCountCompany>> getVehicleIdsCountByCompany(AddVehiclePersonForm form) {
|
||||
this.logger.error("call VehicleFeignClient getVehicleIdsCountByCompany failed");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"\u67e5\u8be2\u5355\u4f4d\u8f66\u8f86\u5931\u8d25");
|
||||
return CloudwalkResult.fail((String)"500001", (String)"查询单位车辆失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ extends AbstractJob {
|
||||
this.cpImageStorePersonManager.handleGroupPersonChange2();
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("CpImageStoreImageSyncTask \u540c\u6b65\u5931\u8d25\uff1a{0}", e);
|
||||
this.logger.error("CpImageStoreImageSyncTask 同步失败:{0}", e);
|
||||
}
|
||||
this.logger.info("CpImageStoreImageSyncTask end");
|
||||
}
|
||||
|
||||
+3
-3
@@ -111,9 +111,9 @@ public class CSVUtils {
|
||||
|
||||
public void exportCsv() {
|
||||
ArrayList<String> dataList = new ArrayList<String>();
|
||||
dataList.add("1,\u5f20\u4e09,\u7537");
|
||||
dataList.add("2,\u674e\u56db,\u7537");
|
||||
dataList.add("3,\u5c0f\u7ea2,\u5973");
|
||||
dataList.add("1,张三,男");
|
||||
dataList.add("2,李四,男");
|
||||
dataList.add("3,小红,女");
|
||||
boolean isSuccess = CSVUtils.exportCsv(new File("D:/test/test.csv"), dataList);
|
||||
System.out.println(isSuccess);
|
||||
}
|
||||
|
||||
+9
-9
@@ -41,7 +41,7 @@ public class DateUtils {
|
||||
return sdf.parse(str);
|
||||
}
|
||||
catch (ParseException e) {
|
||||
logger.error("\u65e5\u671f\u683c\u5f0f\u8f6c\u6362\u5931\u8d25", e);
|
||||
logger.error("日期格式转换失败", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class DateUtils {
|
||||
return sdf.parse(str);
|
||||
}
|
||||
catch (ParseException e) {
|
||||
logger.error("\u65e5\u671f\u683c\u5f0f\u8f6c\u6362\u5931\u8d25", e);
|
||||
logger.error("日期格式转换失败", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class DateUtils {
|
||||
return sdf.format(date);
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.error("\u65e5\u671f\u683c\u5f0f\u8f6c\u6362\u5931\u8d25", e);
|
||||
logger.error("日期格式转换失败", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public class DateUtils {
|
||||
public static String getTwoDaysDesc(Integer startTime, Integer endTime) {
|
||||
ArrayList<Integer> days = new ArrayList<Integer>();
|
||||
if (null == startTime || null == endTime) {
|
||||
return "\u65e5";
|
||||
return "日";
|
||||
}
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(YYYYMMDD);
|
||||
try {
|
||||
@@ -145,7 +145,7 @@ public class DateUtils {
|
||||
e.printStackTrace();
|
||||
}
|
||||
int dayOfWeek = 7;
|
||||
String twoDayDesc = days.size() > dayOfWeek ? "\u6708" : (days.size() > 1 ? "\u5468" : "\u65e5");
|
||||
String twoDayDesc = days.size() > dayOfWeek ? "月" : (days.size() > 1 ? "周" : "日");
|
||||
return twoDayDesc;
|
||||
}
|
||||
|
||||
@@ -215,16 +215,16 @@ public class DateUtils {
|
||||
long day = fduration / 1000L / 60L / 60L / 24L;
|
||||
if (day > 0L && format > 0) {
|
||||
--format;
|
||||
builder.append(day).append("\u5929");
|
||||
builder.append(day).append("天");
|
||||
}
|
||||
if (hour > 0L && --format > 0) {
|
||||
builder.append(hour).append("\u5c0f\u65f6");
|
||||
builder.append(hour).append("小时");
|
||||
}
|
||||
if (min > 0L && --format > 0) {
|
||||
builder.append(min).append("\u5206\u949f");
|
||||
builder.append(min).append("分钟");
|
||||
}
|
||||
if (sec > 0L && --format > 0) {
|
||||
builder.append(sec).append("\u79d2");
|
||||
builder.append(sec).append("秒");
|
||||
}
|
||||
if (fu) {
|
||||
builder.insert(0, "-");
|
||||
|
||||
+9
-9
@@ -35,15 +35,15 @@ extends AbstractCloudwalkController {
|
||||
public CloudwalkResult<?> add(@RequestHeader(value="businessId") String businessId, @RequestBody QueryImgPersonParam task) throws ServiceException {
|
||||
task.setBusinessId(businessId);
|
||||
CloudwalkCallContext cloudwalkCallContext = this.getCloudwalkContext();
|
||||
this.logger.info("\u6dfb\u52a0\u4eba\u5458\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1... {}", (Object)task);
|
||||
this.logger.info("添加人员检索记录导出任务... {}", (Object)task);
|
||||
ExportRecordTaskParam exportRecordTaskParam = new ExportRecordTaskParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)exportRecordTaskParam);
|
||||
String fileId = this.commonAppExportTaskService.add(cloudwalkCallContext, exportRecordTaskParam);
|
||||
if (fileId != null) {
|
||||
this.logger.info("\u6dfb\u52a0\u4eba\u5458\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u6210\u529f fileId = {}", (Object)fileId);
|
||||
this.logger.info("添加人员检索记录导出任务成功 fileId = {}", (Object)fileId);
|
||||
return CloudwalkResult.success((Object)fileId);
|
||||
}
|
||||
this.logger.info("\u6dfb\u52a0\u4eba\u5458\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u5931\u8d25{}", (Object)task);
|
||||
this.logger.info("添加人员检索记录导出任务失败{}", (Object)task);
|
||||
return CloudwalkResult.fail((String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getCode(), (String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getMessage());
|
||||
}
|
||||
|
||||
@@ -51,15 +51,15 @@ extends AbstractCloudwalkController {
|
||||
public CloudwalkResult<?> addOrgExport(@RequestHeader(value="businessId") String businessId, @RequestBody QueryOrganizationParam task) throws ServiceException {
|
||||
task.setBusinessId(businessId);
|
||||
CloudwalkCallContext cloudwalkCallContext = this.getCloudwalkContext();
|
||||
this.logger.info("\u6dfb\u52a0\u673a\u6784\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1... {}", (Object)task);
|
||||
this.logger.info("添加机构检索记录导出任务... {}", (Object)task);
|
||||
ExportOrgTaskParam exportOrgTaskParam = new ExportOrgTaskParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)exportOrgTaskParam);
|
||||
String fileId = this.commonAppExportTaskService.addOrgExport(cloudwalkCallContext, exportOrgTaskParam);
|
||||
if (fileId != null) {
|
||||
this.logger.info("\u6dfb\u52a0\u673a\u6784\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u6210\u529f fileId = {}", (Object)fileId);
|
||||
this.logger.info("添加机构检索记录导出任务成功 fileId = {}", (Object)fileId);
|
||||
return CloudwalkResult.success((Object)fileId);
|
||||
}
|
||||
this.logger.info("\u6dfb\u52a0\u673a\u6784\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u5931\u8d25{}", (Object)task);
|
||||
this.logger.info("添加机构检索记录导出任务失败{}", (Object)task);
|
||||
return CloudwalkResult.fail((String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getCode(), (String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getMessage());
|
||||
}
|
||||
|
||||
@@ -67,15 +67,15 @@ extends AbstractCloudwalkController {
|
||||
public CloudwalkResult<?> addLabelExport(@RequestHeader(value="businessId") String businessId, @RequestBody PageLabelParam task) throws ServiceException {
|
||||
task.setBusinessId(businessId);
|
||||
CloudwalkCallContext cloudwalkCallContext = this.getCloudwalkContext();
|
||||
this.logger.info("\u6dfb\u52a0\u6807\u7b7e\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1... {}", (Object)task);
|
||||
this.logger.info("添加标签检索记录导出任务... {}", (Object)task);
|
||||
ExportLabelTaskParam exportLabelTaskParam = new ExportLabelTaskParam();
|
||||
BeanUtils.copyProperties((Object)task, (Object)exportLabelTaskParam);
|
||||
String fileId = this.commonAppExportTaskService.addLabelExport(cloudwalkCallContext, exportLabelTaskParam);
|
||||
if (fileId != null) {
|
||||
this.logger.info("\u6dfb\u52a0\u6807\u7b7e\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u6210\u529f fileId = {}", (Object)fileId);
|
||||
this.logger.info("添加标签检索记录导出任务成功 fileId = {}", (Object)fileId);
|
||||
return CloudwalkResult.success((Object)fileId);
|
||||
}
|
||||
this.logger.info("\u6dfb\u52a0\u6807\u7b7e\u68c0\u7d22\u8bb0\u5f55\u5bfc\u51fa\u4efb\u52a1\u5931\u8d25{}", (Object)task);
|
||||
this.logger.info("添加标签检索记录导出任务失败{}", (Object)task);
|
||||
return CloudwalkResult.fail((String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getCode(), (String)CommonExportStateCodeEnum.EXPORT_TASK_FAILURE.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -29,7 +29,7 @@ extends AbstractCloudwalkController {
|
||||
return this.applicationImageStoreService.add(addParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5e94\u7528\u56fe\u5e93\u5173\u8054\u65b0\u589e\u5f02\u5e38,", e);
|
||||
this.logger.error("应用图库关联新增异常,", e);
|
||||
return CloudwalkResult.fail((String)"53013525", (String)this.getMessage("53013525"));
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ extends AbstractCloudwalkController {
|
||||
return this.applicationImageStoreService.delete(deleteParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5e94\u7528\u56fe\u5e93\u5173\u8054\u5220\u9664\u5f02\u5e38,", e);
|
||||
this.logger.error("应用图库关联删除异常,", e);
|
||||
return CloudwalkResult.fail((String)"53013526", (String)this.getMessage("53013526"));
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ extends AbstractCloudwalkController {
|
||||
return this.applicationImageStoreService.save(saveParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5e94\u7528\u56fe\u5e93\u5173\u8054\u4fdd\u5b58\u5f02\u5e38,", e);
|
||||
this.logger.error("应用图库关联保存异常,", e);
|
||||
return CloudwalkResult.fail((String)"53013528", (String)this.getMessage("53013528"));
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ extends AbstractCloudwalkController {
|
||||
return this.applicationImageStoreService.query(queryParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5e94\u7528\u56fe\u5e93\u5173\u8054\u67e5\u8be2\u5f02\u5e38,", e);
|
||||
this.logger.error("应用图库关联查询异常,", e);
|
||||
return CloudwalkResult.fail((String)"53013527", (String)this.getMessage("53013527"));
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ extends AbstractCloudwalkController {
|
||||
return this.applicationImageStoreService.page(queryParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5e94\u7528\u56fe\u5e93\u5173\u8054\u67e5\u8be2\u5f02\u5e38,", e);
|
||||
this.logger.error("应用图库关联查询异常,", e);
|
||||
return CloudwalkResult.fail((String)"53013527", (String)this.getMessage("53013527"));
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -33,11 +33,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStoreService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u6dfb\u52a0\u56fe\u5e93\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("添加图库异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6dfb\u52a0\u56fe\u5e93\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("添加图库未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013508", (String)this.getMessage("53013508"));
|
||||
}
|
||||
}
|
||||
@@ -48,11 +48,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStoreService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u56fe\u5e93\u7f16\u8f91\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("图库编辑异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93\u7f16\u8f91\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("图库编辑未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013509", (String)this.getMessage("53013509"));
|
||||
}
|
||||
}
|
||||
@@ -63,11 +63,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStoreService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5220\u9664\u56fe\u5e93\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("删除图库异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5220\u9664\u56fe\u5e93\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("删除图库未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013511", (String)this.getMessage("53013511"));
|
||||
}
|
||||
}
|
||||
@@ -78,11 +78,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStoreService.list(queryImageStoreParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u56fe\u5e93\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("查询图库异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u56fe\u5e93\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("查询图库未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013510", (String)this.getMessage("53013510"));
|
||||
}
|
||||
}
|
||||
@@ -93,11 +93,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStoreService.page(queryImageStoreParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u56fe\u5e93\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("分页查询图库异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u56fe\u5e93\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("分页查询图库未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013510", (String)this.getMessage("53013510"));
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -35,7 +35,7 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStorePersonService.page(queryParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u67e5\u8be2\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("图库人员查询未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013534", (String)this.getMessage("53013534"));
|
||||
}
|
||||
}
|
||||
@@ -47,11 +47,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStorePersonService.save(addParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u4fdd\u5b58\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("图库人员保存异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u4fdd\u5b58\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("图库人员保存未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013532", (String)this.getMessage("53013532"));
|
||||
}
|
||||
}
|
||||
@@ -62,11 +62,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStorePersonService.delete(deleteParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u5220\u9664\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("图库人员删除异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u5220\u9664\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("图库人员删除未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013533", (String)this.getMessage("53013533"));
|
||||
}
|
||||
}
|
||||
@@ -93,11 +93,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStorePersonService.bind(bindParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u7ed1\u5b9a\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("图库人员绑定异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u7ed1\u5b9a\u672a\u77e5\u5f02\u5e38:{}", e);
|
||||
this.logger.error("图库人员绑定未知异常:{}", e);
|
||||
return CloudwalkResult.fail((String)"53013541", (String)this.getMessage("53013541"));
|
||||
}
|
||||
}
|
||||
@@ -108,11 +108,11 @@ extends AbstractCloudwalkController {
|
||||
return this.cpImageStorePersonService.batchBind(batchBindParam, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u6279\u91cf\u7ed1\u5b9a\u56fe\u5e93\u4eba\u5458\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("批量绑定图库人员异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u6279\u91cf\u7ed1\u5b9a\u56fe\u5e93\u4eba\u5458\u672a\u77e5\u5f02\u5e38:{}", (Object)e.getMessage());
|
||||
this.logger.error("批量绑定图库人员未知异常:{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)"53013541", (String)this.getMessage("53013541"));
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ extends AbstractCloudwalkController {
|
||||
}
|
||||
|
||||
public CloudwalkResult<ImageStorePersonResult> saveFallback(AddImageStorePersonParam addParam) {
|
||||
this.logger.error("\u56fe\u5e93\u4eba\u5458\u4fdd\u5b58\u672a\u77e5\u5f02\u5e38....");
|
||||
this.logger.error("图库人员保存未知异常....");
|
||||
return CloudwalkResult.fail((String)"53013532", (String)this.getMessage("53013532"));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ extends AbstractCloudwalkController {
|
||||
return this.imageStoreSyncService.page(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u56fe\u5e93\u540c\u6b65\u8bb0\u5f55\u8be6\u60c5\u5f02\u5e38:[{}]", e);
|
||||
this.logger.error("查询图库同步记录详情异常:[{}]", e);
|
||||
return CloudwalkResult.fail((String)"53013549", (String)this.getMessage("53013549"));
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user