Browse Source

Merge branch 'feature/visit_zhy'

dev_zufangUpdate
zhangyuan 3 years ago
parent
commit
dbabc0cf64
  1. 7
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java
  2. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml
  3. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java
  4. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java
  5. 9
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/controller/VisitVisitorController.java
  6. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/VisitVisitorService.java
  7. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/service/impl/VisitVisitorServiceImpl.java
  8. 59
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java

7
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<RentTenantInfoDTO> tenantList;
/**
* 附件列表
* 附件列表图片
*/
@NotEmpty
private List<RentContractFileDTO> fileList;
/**
* 附件列表文件
*/
private List<RentContractFileDTO> docList;
/**
* 中介资料
*/

2
epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml

@ -207,7 +207,7 @@
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip>192.168.43.132</nacos.ip>
<nacos.ip>192.168.43.95</nacos.ip>
<!--是否开启服务列表变更监听-->
<nacos.service-list-changed-listening.enable>false</nacos.service-list-changed-listening.enable>

2
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;

15
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<RentContractInf
// 取出合同文件信息
dto.setFileList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.ONE_STR));
dto.setAgencyImgList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.THREE_STR));
dto.setDocList(rentContractFileService.listByRefAndType(dto.getId(), NumConstant.FOUR_STR));
return dto;
}
@ -474,7 +475,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
}
// 附件处理
// 图片附件处理
if (null == dto.getFileList() || dto.getFileList().isEmpty()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "合同附件不能为空");
} else {
@ -487,6 +488,17 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
rentContractFileService.insertBatch(fileList);
}
// 文件附件处理
if (null != dto.getDocList() && dto.getDocList().size() > 0) {
List<RentContractFileEntity> 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<RentContractFileEntity> fileList = ConvertUtils.sourceToTarget(dto.getAgencyImgList(), RentContractFileEntity.class);
@ -497,6 +509,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
rentContractFileService.insertBatch(fileList);
}
}
}

9
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) {
//效验数据

10
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<VisitVisitorEntity> {
*/
void visit(VisitVisitorFormDTO dto);
/**
* 视频获取
*
* @param dto
* @return void
* @author generator
* @date 2022-07-26
*/
void video(VisitVisitorDTO dto);
/**
* 临时授权
*

6
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<VisitVisitorDao, Vi
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void video(VisitVisitorDTO dto) {
dhDeviceUtil.getAllChannel();
}
@Override
@Transactional(rollbackFor = Exception.class)
public void doorAuthority(VisitVisitorFormDTO dto) {

59
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/visit/utils/DhDeviceUtil.java

@ -566,6 +566,65 @@ public class DhDeviceUtil {
return list;
}
/**
* 查询通道-从全部设备中获取(视频获取)
*
* @param
* @return java.lang.String
* @author zhy
* @date 2022/5/23 11:04
*/
public List<DhChannelResultDTO> getAllChannel() {
String url = dhCloudProperties.getUrl().concat(GET_CHANNEL);
String urlParam = getDhUrlParams();
url = url + urlParam;
Map<String, String> paramsMap = new HashMap<>(4);
DhChannelFormDTO dto = new DhChannelFormDTO();
dto.setInterfaceId("admin_001_006");
dto.setJsonParam("{\"param\":{\"unitType\":1 ,\"category\":1,\"type\":6}}");
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<DhChannelResultDTO> 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 = "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());
}
return list;
}
/**
* 新增人员
*

Loading…
Cancel
Save