From 3d786cb715a7c4479110dd7dc36de6ea03564881 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 19 Sep 2022 16:39:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pli-power-base-server/pom.xml | 2 +- .../controller/VisitVisitorController.java | 9 ++++ .../visit/service/VisitVisitorService.java | 10 ++++ .../service/impl/VisitVisitorServiceImpl.java | 6 +++ .../modules/visit/utils/DhDeviceUtil.java | 54 +++++++++++++++++++ 5 files changed, 80 insertions(+), 1 deletion(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml index c04ded1..1afc4c9 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml @@ -207,7 +207,7 @@ false - 192.168.43.132 + 192.168.43.43 false diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/controller/VisitVisitorController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/controller/VisitVisitorController.java index 2412a18..29d9fda 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/controller/VisitVisitorController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/controller/VisitVisitorController.java @@ -91,6 +91,15 @@ public class VisitVisitorController { return new Result(); } + @NoRepeatSubmit + @PostMapping("video") + public Result video(@RequestBody VisitVisitorDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + visitVisitorService.video(dto); + return new Result(); + } + @PostMapping("visitorlogout") public Result visitorLogout(@RequestBody VisitorLogoutFormDTO dto) { //效验数据 diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/VisitVisitorService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/VisitVisitorService.java index 57d10c1..c6372b5 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/VisitVisitorService.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/VisitVisitorService.java @@ -90,6 +90,16 @@ public interface VisitVisitorService extends BaseService { */ void visit(VisitVisitorFormDTO dto); + /** + * 视频获取 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-26 + */ + void video(VisitVisitorDTO dto); + /** * 临时授权 * diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/impl/VisitVisitorServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/impl/VisitVisitorServiceImpl.java index 9f25eac..18a6e91 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/impl/VisitVisitorServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/impl/VisitVisitorServiceImpl.java @@ -138,6 +138,12 @@ public class VisitVisitorServiceImpl extends BaseServiceImpl getAllChannel() { + String url = dhCloudProperties.getUrl().concat(GET_CHANNEL); + String urlParam = getDhUrlParams(); + url = url + urlParam; + + Map paramsMap = new HashMap<>(4); + DhChannelFormDTO dto = new DhChannelFormDTO(); + dto.setInterfaceId("admin_001_006"); + dto.setJsonParam("{\"param\":{\"unitType\":1}}"); + + String data = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(dto), paramsMap).getData(); + + if (null == data) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询通道列表失败"); + } + JSONObject toResult = JSON.parseObject(data); + DhResult result = ConvertUtils.mapToEntity(toResult, DhResult.class); + if (null != toResult.get("success")) { + result.setCode(200); + } + if (!result.getSuccess()) { + logger.info(result.getErrMsg()); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询通道列表失败!" + result.getErrMsg()); + } + Object registerResult = result.getData(); + + JSONArray jsonArray = JSON.parseArray(registerResult.toString()); + + List list = new ArrayList<>(); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jsonItem = jsonArray.getJSONObject(i); + DhChannelResultDTO channel = new DhChannelResultDTO(); + channel.setPrivilegeType("1"); + channel.setResouceCode(jsonItem.get("channelId").toString()); + list.add(channel); + String channelId = jsonItem.get("channelId").toString(); + String[] channelIds = channelId.split("\\$"); + String videoUrl = "http://112.6.213.175:7086/live/cameraid/" + jsonItem.get("deviceId").toString() + "%24" + channelIds[channelIds.length - 1] + "/substream/1.m3u8"; + System.out.println("INSERT INTO epv_monitor_details (url,customer_id,create_time) VALUES ('" + videoUrl + "','1550309684576591874',NOW());"); + } + + return list; + } + + /** * 新增人员 * From 19bf83b511da5b3ea8e265c3bf751fb958d2e7a3 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 20 Sep 2022 15:44:44 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pli-power-base/pli-power-base-server/pom.xml | 2 +- .../plugin/power/modules/visit/utils/DhDeviceUtil.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml index 1afc4c9..6fa63f8 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml @@ -207,7 +207,7 @@ false - 192.168.43.43 + 192.168.43.95 false diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java index f734a3b..cb11422 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java @@ -583,7 +583,7 @@ public class DhDeviceUtil { Map paramsMap = new HashMap<>(4); DhChannelFormDTO dto = new DhChannelFormDTO(); dto.setInterfaceId("admin_001_006"); - dto.setJsonParam("{\"param\":{\"unitType\":1}}"); + dto.setJsonParam("{\"param\":{\"unitType\":1 ,\"category\":1,\"type\":6}}"); String data = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(dto), paramsMap).getData(); @@ -612,8 +612,12 @@ public class DhDeviceUtil { list.add(channel); String channelId = jsonItem.get("channelId").toString(); String[] channelIds = channelId.split("\\$"); - String videoUrl = "http://112.6.213.175:7086/live/cameraid/" + jsonItem.get("deviceId").toString() + "%24" + channelIds[channelIds.length - 1] + "/substream/1.m3u8"; - System.out.println("INSERT INTO epv_monitor_details (url,customer_id,create_time) VALUES ('" + videoUrl + "','1550309684576591874',NOW());"); + String videoUrl = "http://112.6.213.175:7086/live/cameraid/" + channelIds[0] + "%24" + channelIds[channelIds.length - 1] + "/substream/1.m3u8"; + if (jsonItem.get("deviceName").toString().contains("顺德")) { +// System.out.println(jsonItem.get("channelId").toString()); + System.out.println("INSERT INTO epv_monitor_details (url,customer_id,create_time) VALUES ('" + videoUrl + "','1550309684576591874',NOW());"); + } +// System.out.println(jsonItem.get("channelId").toString() + "//" + jsonItem.get("deviceName").toString()); } return list; From f5860a032557e18f52c5d8d30fefecc778b9ac89 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 21 Sep 2022 13:51:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?nginx=E8=BD=AC=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java index cb11422..55185e7 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java @@ -612,9 +612,10 @@ public class DhDeviceUtil { list.add(channel); String channelId = jsonItem.get("channelId").toString(); String[] channelIds = channelId.split("\\$"); - String videoUrl = "http://112.6.213.175:7086/live/cameraid/" + channelIds[0] + "%24" + channelIds[channelIds.length - 1] + "/substream/1.m3u8"; + String videoUrl = "https://rxs-video.elinkservice.cn/live/cameraid/" + channelIds[0] + "%24" + channelIds[channelIds.length - 1] + "/substream/1.m3u8"; if (jsonItem.get("deviceName").toString().contains("顺德")) { // System.out.println(jsonItem.get("channelId").toString()); +// System.out.println(jsonItem.get("channelName").toString()); System.out.println("INSERT INTO epv_monitor_details (url,customer_id,create_time) VALUES ('" + videoUrl + "','1550309684576591874',NOW());"); } // System.out.println(jsonItem.get("channelId").toString() + "//" + jsonItem.get("deviceName").toString()); From b0962b02c539da42a1f145a9a0a020f2df324e91 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 27 Sep 2022 10:05:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../power/dto/rent/RentContractInfoDTO.java | 7 ++++++- .../rent/entity/RentContractFileEntity.java | 2 +- .../service/impl/RentContractInfoServiceImpl.java | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java index e0351b5..1f11537 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java @@ -198,11 +198,16 @@ public class RentContractInfoDTO implements Serializable { private List tenantList; /** - * 附件列表 + * 附件列表(图片) */ @NotEmpty private List fileList; + /** + * 附件列表(文件) + */ + private List docList; + /** * 中介资料 */ diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java index 1315055..07b844b 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java @@ -32,7 +32,7 @@ public class RentContractFileEntity extends BaseEpmetEntity { private String fileUrl; /** - * 文件类型 0:图片(人脸/头像),1 文件(合同),2 身份证照片,3 中介资料 + * 文件类型 0:图片(人脸/头像),1 文件(合同照片),2 身份证照片,3 中介资料,4 文件(其他文档) */ private String fileType; diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 9551e26..052dce2 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -175,6 +175,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl 0) { + List fileList = ConvertUtils.sourceToTarget(dto.getDocList(), RentContractFileEntity.class); + fileList.forEach(item -> { + item.setReferenceId(contractId); + item.setFileType(NumConstant.FOUR_STR); + item.setCustomerId(loginUserUtil.getLoginUserCustomerId()); + }); + rentContractFileService.insertBatch(fileList); + } + // 中介资料处理 if (null != dto.getAgencyImgList() && dto.getAgencyImgList().size() > 0) { List fileList = ConvertUtils.sourceToTarget(dto.getAgencyImgList(), RentContractFileEntity.class); @@ -413,6 +425,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl