Compare commits
36 Commits
a8e4c6871a
...
de75da4b68
Author | SHA1 | Date |
---|---|---|
wangliwen | de75da4b68 | |
dinggang | 2d18cbbf9a | |
dinggang | 83d9b7b4db | |
dinggang | c4a121464b | |
huangweixiong | fd406c9bfd | |
dinggang | ab9e30b755 | |
huangweixiong | cf658307a8 | |
wangliwen | f667967d7e | |
wangliwen | 75683440de | |
wangliwen | e12f4f0a62 | |
wangliwen | f2ec0b118d | |
wangliwen | 2189f6a3f0 | |
wangliwen | 5333b18711 | |
wangliwen | aaeda5f9bd | |
wangliwen | 40817f2ddf | |
wangliwen | 8ac9091f9b | |
wangliwen | c81aaa34b0 | |
wangliwen | 1c9a83fcd2 | |
wangliwen | 6a07620ba3 | |
huangweixiong | 5b2f0bef95 | |
huangweixiong | b531192f91 | |
wangliwen | 3dc4676491 | |
huangweixiong | 8e87eb848f | |
huangweixiong | b1e489bc27 | |
dinggang | 27218ae82b | |
huangweixiong | 2a5334dc81 | |
wangliwen | e057a5550c | |
wangliwen | 0c8b2f1f57 | |
wangliwen | 64e37fcbb8 | |
wangliwen | 36db201d67 | |
wangliwen | 0462d36d97 | |
wangliwen | f1f404c45b | |
wangliwen | 848ee0cb4e | |
wangliwen | 5627a804da | |
wangliwen | 6d400ff9ae | |
wangliwen | b029bac595 |
|
@ -0,0 +1 @@
|
||||||
|
baotou.hlsurl=http://10.110.205.1:18088/server/device/hisdeviceapplylist/url/%s
|
|
@ -0,0 +1,7 @@
|
||||||
|
tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
||||||
|
tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
||||||
|
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
||||||
|
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
||||||
|
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
|
||||||
|
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
|
||||||
|
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43
|
|
@ -304,7 +304,8 @@
|
||||||
<!-- 排除生产环境配置 -->
|
<!-- 排除生产环境配置 -->
|
||||||
<exclude>application-prod.yml</exclude>
|
<exclude>application-prod.yml</exclude>
|
||||||
<!-- 排除flyway管理的sql -->
|
<!-- 排除flyway管理的sql -->
|
||||||
<!-- <exclude>db/*.sql</exclude>-->
|
<exclude>db/*.sql</exclude>
|
||||||
|
<exclude>domain/**</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
|
|
|
@ -172,6 +172,7 @@ public class ActivitiNoticeAspect {
|
||||||
dto.setSenderDate(new Date());
|
dto.setSenderDate(new Date());
|
||||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||||
dto.setCreateDate(new Date());
|
dto.setCreateDate(new Date());
|
||||||
|
dto.setFrom("通知");
|
||||||
sysNoticeService.save(dto);
|
sysNoticeService.save(dto);
|
||||||
}).thenRunAsync(() -> {
|
}).thenRunAsync(() -> {
|
||||||
// 防止重放
|
// 防止重放
|
||||||
|
@ -319,6 +320,7 @@ public class ActivitiNoticeAspect {
|
||||||
String finalCreator = creator;
|
String finalCreator = creator;
|
||||||
CompletableFuture.runAsync(() -> { // 发起人
|
CompletableFuture.runAsync(() -> { // 发起人
|
||||||
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||||
|
logger.error("审核人:" + assignee.getId());
|
||||||
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
||||||
SysNoticeDTO dto = new SysNoticeDTO();
|
SysNoticeDTO dto = new SysNoticeDTO();
|
||||||
dto.setType(2);
|
dto.setType(2);
|
||||||
|
|
|
@ -10,6 +10,8 @@ import io.renren.common.constant.Constant;
|
||||||
import io.renren.common.domain.Tsingtao_xhaProperties;
|
import io.renren.common.domain.Tsingtao_xhaProperties;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||||
|
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
|
||||||
|
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
|
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||||
|
@ -20,6 +22,7 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -42,6 +45,8 @@ import java.util.stream.Collectors;
|
||||||
public class CensusControllerV2 {
|
public class CensusControllerV2 {
|
||||||
@Value("${project.place}")
|
@Value("${project.place}")
|
||||||
private Integer projectPlace;
|
private Integer projectPlace;
|
||||||
|
@Value("${project.higher}")
|
||||||
|
private Boolean higher;
|
||||||
private static final Logger logger = LoggerFactory.getLogger(CensusControllerV2.class);
|
private static final Logger logger = LoggerFactory.getLogger(CensusControllerV2.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -116,7 +121,7 @@ public class CensusControllerV2 {
|
||||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目
|
CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目
|
||||||
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源';", Long.class);
|
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源' AND del_flag = 0;", Long.class);
|
||||||
}).thenAccept(sum -> {
|
}).thenAccept(sum -> {
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
|
@ -175,7 +180,7 @@ public class CensusControllerV2 {
|
||||||
String sql = String.format("SELECT COUNT(id) FROM tb_data_resource WHERE dept_id = %s AND type = '应用资源' AND del_flag = 0;", index.get("id").toString());
|
String sql = String.format("SELECT COUNT(id) FROM tb_data_resource WHERE dept_id = %s AND type = '应用资源' AND del_flag = 0;", index.get("id").toString());
|
||||||
logger.info(sql);
|
logger.info(sql);
|
||||||
Long count = jdbcTemplate.queryForObject(sql, Long.class);
|
Long count = jdbcTemplate.queryForObject(sql, Long.class);
|
||||||
if (!"0".equals(index.get("pid").toString())) { // 有上级部门
|
if (!"0".equals(index.get("pid").toString()) && higher) { // 有上级部门 且 配置资源归属上级
|
||||||
Optional<SysDeptDTO> sysDeptDTO =
|
Optional<SysDeptDTO> sysDeptDTO =
|
||||||
Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString())));
|
Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString())));
|
||||||
if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) {
|
if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) {
|
||||||
|
@ -195,7 +200,7 @@ public class CensusControllerV2 {
|
||||||
re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName());
|
re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName());
|
||||||
re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum());
|
re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum());
|
||||||
return re;
|
return re;
|
||||||
}).collect(Collectors.toList());
|
}).filter(index -> ObjectUtils.allNotNull(index)).collect(Collectors.toList());
|
||||||
result.sort(Comparator.comparing(x -> {
|
result.sort(Comparator.comparing(x -> {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
try {
|
try {
|
||||||
|
@ -314,6 +319,7 @@ public class CensusControllerV2 {
|
||||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||||
CompletableFuture<Void> allAmount = null;
|
CompletableFuture<Void> allAmount = null;
|
||||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||||
|
case TSINGTAO: // 青岛市局
|
||||||
case BAOTOU: { // 包头
|
case BAOTOU: { // 包头
|
||||||
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
||||||
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type = '基础设施' AND del_flag = 0", Long.class);
|
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type = '基础设施' AND del_flag = 0", Long.class);
|
||||||
|
@ -327,26 +333,15 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TSINGTAO: { // 青岛大数据局
|
|
||||||
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
|
||||||
return jdbcTemplate.queryForObject("SELECT COUNT(*) FROM t_camera;", Long.class);
|
|
||||||
}).thenAccept(sum -> {
|
|
||||||
result.add(new HashMap<String, Object>() {
|
|
||||||
{
|
|
||||||
put("amount", sum);
|
|
||||||
put("type", "视频资源数量");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TSINGTAO_XHA: { // 青岛西海岸
|
case TSINGTAO_XHA: { // 青岛西海岸
|
||||||
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
|
||||||
List<Long> result_ = new CopyOnWriteArrayList<>();
|
List<Long> result_ = new CopyOnWriteArrayList<>();
|
||||||
CompletableFuture cloud =
|
CompletableFuture cloud =
|
||||||
CompletableFuture.runAsync(() -> { // 云脑专网
|
CompletableFuture.runAsync(() -> { // 云脑专网
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder().url(tsingtao_xhaProperties.getCloudcam()).build();
|
String url = String.format(tsingtao_xhaProperties.getCloudcam(), "", 1, 10);
|
||||||
|
logger.info(url);
|
||||||
|
Request request = new Request.Builder().url(url).build();
|
||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||||
|
@ -354,16 +349,18 @@ public class CensusControllerV2 {
|
||||||
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
|
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("包头获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("包头失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
CompletableFuture local =
|
CompletableFuture local =
|
||||||
CompletableFuture.runAsync(() -> { // 金宏网
|
CompletableFuture.runAsync(() -> { // 金宏网
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder().url(tsingtao_xhaProperties.getLocalcam()).build();
|
String url = String.format(tsingtao_xhaProperties.getLocalcam(), "", 1, 10);
|
||||||
|
logger.info(url);
|
||||||
|
Request request = new Request.Builder().url(url).build();
|
||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||||
|
@ -371,10 +368,10 @@ public class CensusControllerV2 {
|
||||||
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
|
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("包头获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("包头失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
CompletableFuture.allOf(cloud, local);
|
CompletableFuture.allOf(cloud, local);
|
||||||
|
@ -431,15 +428,21 @@ public class CensusControllerV2 {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TSINGTAO: { // TODO 青岛大数据局
|
case TSINGTAO: { // TODO 青岛大数据局
|
||||||
|
TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService();
|
||||||
|
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto();
|
||||||
|
getDataResourceListDto.setPageNum(1);
|
||||||
|
getDataResourceListDto.setPageSize(5);
|
||||||
|
JSONObject dataResource = (JSONObject) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
||||||
|
JSONObject data = dataResource.getJSONObject("data");
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("amount", 0L);
|
put("amount", data.get("rows"));
|
||||||
put("type", "总数据量");
|
put("type", "总数据量");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("amount", 0l);
|
put("amount", 0L);
|
||||||
put("type", "总申请次数");
|
put("type", "总申请次数");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -451,7 +454,7 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("resourceTop5", new ArrayList<>());
|
put("resourceTop5", data.get("data"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -468,10 +471,10 @@ public class CensusControllerV2 {
|
||||||
total = jsonObject.getJSONObject("data").getLongValue("total");
|
total = jsonObject.getJSONObject("data").getLongValue("total");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("包头获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("包头失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
}).thenAccept(sum -> {
|
}).thenAccept(sum -> {
|
||||||
|
@ -515,10 +518,10 @@ public class CensusControllerV2 {
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("包头获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("包头失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Component
|
@Component
|
||||||
@PropertySource("classpath:/domain/baotou.properties")
|
@PropertySource("file:config/domain/baotou.properties")
|
||||||
@ConfigurationProperties(prefix = "baotou")
|
@ConfigurationProperties(prefix = "baotou")
|
||||||
public class BaoTouProperties {
|
public class BaoTouProperties {
|
||||||
private String hlsurl;
|
private String hlsurl;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Component
|
@Component
|
||||||
@PropertySource("classpath:/domain/tsingtao.properties")
|
@PropertySource("file:config/domain/tsingtao.properties")
|
||||||
@ConfigurationProperties(prefix = "tsingtao")
|
@ConfigurationProperties(prefix = "tsingtao")
|
||||||
public class TsingtaoProperties {
|
public class TsingtaoProperties {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Component
|
@Component
|
||||||
@PropertySource("classpath:/domain/tsingtao-xha.properties")
|
@PropertySource("file:config/domain/tsingtao-xha.properties")
|
||||||
@ConfigurationProperties(prefix = "tsingtao-xha")
|
@ConfigurationProperties(prefix = "tsingtao-xha")
|
||||||
public class Tsingtao_xhaProperties {
|
public class Tsingtao_xhaProperties {
|
||||||
private String cloudhls;
|
private String cloudhls;
|
||||||
|
@ -20,4 +20,5 @@ public class Tsingtao_xhaProperties {
|
||||||
private String localcam;
|
private String localcam;
|
||||||
private String resourcecount;
|
private String resourcecount;
|
||||||
private String resourceapplyinfo;
|
private String resourceapplyinfo;
|
||||||
|
private String sjzy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
||||||
dto.setSenderDate(new Date());
|
dto.setSenderDate(new Date());
|
||||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||||
dto.setCreateDate(new Date());
|
dto.setCreateDate(new Date());
|
||||||
|
dto.setFrom("评论");
|
||||||
sysNoticeService.save(dto);
|
sysNoticeService.save(dto);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,15 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,10 +38,13 @@ import java.util.Map;
|
||||||
@RequestMapping("sys/notice")
|
@RequestMapping("sys/notice")
|
||||||
@Api(tags = "通知管理")
|
@Api(tags = "通知管理")
|
||||||
public class SysNoticeController {
|
public class SysNoticeController {
|
||||||
|
private static Logger logger = LoggerFactory.getLogger(SysNoticeController.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeService sysNoticeService;
|
private SysNoticeService sysNoticeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeUserService sysNoticeUserService;
|
private SysNoticeUserService sysNoticeUserService;
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
|
@ -75,7 +83,8 @@ public class SysNoticeController {
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "readStatus", value = "阅读状态 0:未读 1:已读", paramType = "query", dataType = "Integer")
|
@ApiImplicitParam(name = "readStatus", value = "阅读状态 0:未读 1:已读", paramType = "query", dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "from", value = "通知来源 (通知、评论、其他)", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
|
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
|
||||||
|
@ -85,9 +94,26 @@ public class SysNoticeController {
|
||||||
|
|
||||||
@PutMapping("mynotice/read/{noticeId}")
|
@PutMapping("mynotice/read/{noticeId}")
|
||||||
@ApiOperation("标记我的通知为已读")
|
@ApiOperation("标记我的通知为已读")
|
||||||
public Result read(@PathVariable("noticeId") Long noticeId) {
|
public Result read(@PathVariable("noticeId") String noticeId) {
|
||||||
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), noticeId);
|
if (StringUtils.isNotEmpty(noticeId) && noticeId.contains(";")) {
|
||||||
|
String[] noticeIds = noticeId.split(";");
|
||||||
|
Arrays.asList(noticeIds).stream().distinct().forEach(index -> {
|
||||||
|
try {
|
||||||
|
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), Long.valueOf(index));
|
||||||
|
} catch (Exception exception) {
|
||||||
|
logger.error("标识已读失败", exception);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), Long.valueOf(noticeId));
|
||||||
|
}
|
||||||
|
return new Result();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("mynotice/readall")
|
||||||
|
@ApiOperation("标记我的所有未读通知为已读")
|
||||||
|
public Result readAll() {
|
||||||
|
jdbcTemplate.update(String.format("UPDATE sys_notice_user SET read_status = 1,read_date =NOW() WHERE receiver_id = %s AND read_status = 0;"), SecurityUser.getUserId().toString());
|
||||||
return new Result();
|
return new Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,4 +48,6 @@ public class SysNoticeDTO implements Serializable {
|
||||||
private Date readDate;
|
private Date readDate;
|
||||||
@ApiModelProperty(value = "阅读状态 0:未读 1:已读")
|
@ApiModelProperty(value = "阅读状态 0:未读 1:已读")
|
||||||
private Integer readStatus;
|
private Integer readStatus;
|
||||||
|
@ApiModelProperty(value = "通知来源 (通知、评论、其他)")
|
||||||
|
private String from;
|
||||||
}
|
}
|
|
@ -10,7 +10,6 @@ import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知管理
|
* 通知管理
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ -65,4 +64,9 @@ public class SysNoticeEntity extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Date readDate;
|
private Date readDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知来源 (通知、评论、其他)
|
||||||
|
*/
|
||||||
|
private String from;
|
||||||
}
|
}
|
|
@ -44,10 +44,17 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<SysNoticeEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<SysNoticeEntity> getWrapper(Map<String, Object> params) {
|
||||||
String type = (String) params.get("type");
|
|
||||||
|
|
||||||
QueryWrapper<SysNoticeEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<SysNoticeEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq(StringUtils.isNotBlank(type), "type", type);
|
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||||
|
switch (index) {
|
||||||
|
case "type":
|
||||||
|
wrapper.eq(StringUtils.isNotBlank((String) params.get("type")), "type", (String) params.get("type"));
|
||||||
|
break;
|
||||||
|
case "from":
|
||||||
|
wrapper.eq(StringUtils.isNotBlank((String) params.get("from")), "`from`", (String) params.get("from"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
wrapper.orderByDesc(Constant.CREATE_DATE);
|
wrapper.orderByDesc(Constant.CREATE_DATE);
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +86,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(SysNoticeDTO dto) {
|
public void save(SysNoticeDTO dto) {
|
||||||
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
|
||||||
|
entity.setFrom("其它"); // 站内信通知来源 (通知、评论、其它)
|
||||||
|
|
||||||
//更新发送者信息
|
//更新发送者信息
|
||||||
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
||||||
|
|
|
@ -10,15 +10,15 @@ import io.renren.common.utils.Result;
|
||||||
import io.renren.common.validator.ValidatorUtils;
|
import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
import io.renren.common.validator.group.DefaultGroup;
|
import io.renren.common.validator.group.DefaultGroup;
|
||||||
|
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
|
||||||
|
import io.renren.modules.resource.dataResource.DataResourceFactory;
|
||||||
|
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||||
import io.renren.modules.resource.dto.ResourceDTO;
|
import io.renren.modules.resource.dto.ResourceDTO;
|
||||||
import io.renren.modules.resource.excel.ResourceExcelImportListener;
|
import io.renren.modules.resource.excel.ResourceExcelImportListener;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
|
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
|
||||||
import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
|
import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -38,6 +38,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -301,19 +302,34 @@ public class ResourceController {
|
||||||
|
|
||||||
@GetMapping("ZywMessage/list")
|
@GetMapping("ZywMessage/list")
|
||||||
@ApiOperation("资源列表转发")
|
@ApiOperation("资源列表转发")
|
||||||
public Result ZywMessageList(Integer page, Integer size) {
|
public Result ZywMessageList(@ApiParam("页数") Integer page,
|
||||||
|
@ApiParam("页大小") Integer size,
|
||||||
|
@ApiParam("排序字段;fbrq(发布日期),syqk(申请数量)") String pxcol,
|
||||||
|
@ApiParam("排序方式,取值asc/desc") String order,
|
||||||
|
@ApiParam("部门") String bmname,
|
||||||
|
@ApiParam("资源模糊搜索") String zyname) {
|
||||||
|
|
||||||
|
if (page == null) page = 1;
|
||||||
|
if (size == null) size = 10;
|
||||||
|
if (pxcol == null) pxcol = "fbrq";
|
||||||
|
if (order == null) order = "desc";
|
||||||
|
|
||||||
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
|
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
|
||||||
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
||||||
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
|
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
|
||||||
" <soap:Body>\n" +
|
" <soap:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
|
||||||
" <ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
|
|
||||||
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n", page, size) +
|
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n", page, size) +
|
||||||
" </ZWCJ_mainPort>\n" +
|
String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n", pxcol, order);
|
||||||
" </soap:Body>\n" +
|
if (bmname != null) {
|
||||||
"</soap:Envelope>";
|
parame = parame + String.format("<bmname>%s</bmname>", bmname);
|
||||||
|
}
|
||||||
|
if (zyname != null) {
|
||||||
|
parame = parame + String.format("<zyname>%s</zyname>", zyname);
|
||||||
|
}
|
||||||
|
parame = parame + "</ZWCJ_mainPort></soap:Body></soap:Envelope>";
|
||||||
HttpHeaders requestHeaders = new HttpHeaders();
|
HttpHeaders requestHeaders = new HttpHeaders();
|
||||||
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
|
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
|
||||||
requestHeaders.setContentType(MediaType.TEXT_XML);
|
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
|
||||||
HttpEntity<String> requestEntity = new HttpEntity(parame, requestHeaders);
|
HttpEntity<String> requestEntity = new HttpEntity(parame, requestHeaders);
|
||||||
try {
|
try {
|
||||||
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
||||||
|
@ -323,8 +339,6 @@ public class ResourceController {
|
||||||
HashMap result = JSONObject.parseObject(json, HashMap.class);
|
HashMap result = JSONObject.parseObject(json, HashMap.class);
|
||||||
|
|
||||||
List<Map> rows = (List<Map>) result.get("data");
|
List<Map> rows = (List<Map>) result.get("data");
|
||||||
|
|
||||||
|
|
||||||
List<Object> objects = rows.stream()
|
List<Object> objects = rows.stream()
|
||||||
.filter(item -> item.get("main") != null)
|
.filter(item -> item.get("main") != null)
|
||||||
.map(item -> item.get("main"))
|
.map(item -> item.get("main"))
|
||||||
|
@ -401,15 +415,25 @@ public class ResourceController {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("getHls")
|
@GetMapping("/hls/getHls")
|
||||||
@ApiOperation("对接知识库数据")
|
|
||||||
public Result<String> getHls(String key) {
|
public Result<String> getHls(String key) {
|
||||||
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
|
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
|
||||||
if (factory.isPresent()) {
|
if (factory.isPresent()) {
|
||||||
String hls = factory.get().getHls(key);
|
String hls = factory.get().getHls(key);
|
||||||
return new Result<String>().ok(hls);
|
return new Result<String>().ok(hls);
|
||||||
}
|
}
|
||||||
return null;
|
return new Result<String>().ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/getDataResource")
|
||||||
|
@ApiOperation("获取数据资源")
|
||||||
|
public Result<Object> getDataResource(@RequestBody GetDataResourceListDto dto) {
|
||||||
|
Optional<AbstractDataResourceService> factory = DataResourceFactory.build();
|
||||||
|
if (factory.isPresent()) {
|
||||||
|
Object dataResource = factory.get().getDataResource(dto);
|
||||||
|
return new Result<Object>().ok(dataResource);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package io.renren.modules.resource.dataResource;
|
||||||
|
|
||||||
|
|
||||||
|
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频预览抽象类
|
||||||
|
*/
|
||||||
|
public abstract class AbstractDataResourceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据资源列表
|
||||||
|
*
|
||||||
|
* @param Map 查询参数集合
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public abstract Object getDataResource(GetDataResourceListDto dto);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package io.renren.modules.resource.dataResource;
|
||||||
|
|
||||||
|
import io.renren.common.constant.Constant;
|
||||||
|
import io.renren.common.domain.BaoTouProperties;
|
||||||
|
import io.renren.common.domain.TsingtaoProperties;
|
||||||
|
import io.renren.common.domain.Tsingtao_xhaProperties;
|
||||||
|
import io.renren.common.utils.SpringContextUtils;
|
||||||
|
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
|
||||||
|
import io.renren.modules.resource.dataResource.domain.TsingtaoXHADataResourceService;
|
||||||
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据资源工厂类
|
||||||
|
*/
|
||||||
|
public final class DataResourceFactory {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(DataResourceFactory.class);
|
||||||
|
|
||||||
|
private static ResourceService resourceService;
|
||||||
|
|
||||||
|
private static int projectPlace;
|
||||||
|
|
||||||
|
private static TsingtaoProperties tsingtaoProperties; // 青岛市区配置
|
||||||
|
|
||||||
|
private static Tsingtao_xhaProperties tsingtao_xhaProperties; // 青岛西海岸配置
|
||||||
|
|
||||||
|
static {
|
||||||
|
DataResourceFactory.resourceService = SpringContextUtils.getBean(ResourceService.class);
|
||||||
|
DataResourceFactory.projectPlace = resourceService.getProjectPlace();
|
||||||
|
DataResourceFactory.tsingtaoProperties = SpringContextUtils.getBean(TsingtaoProperties.class);
|
||||||
|
DataResourceFactory.tsingtao_xhaProperties = SpringContextUtils.getBean(Tsingtao_xhaProperties.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据资源服务实现
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Optional<AbstractDataResourceService> build() {
|
||||||
|
AbstractDataResourceService abstractDataResourceService = null;
|
||||||
|
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||||
|
case TSINGTAO: { // 青岛市局
|
||||||
|
abstractDataResourceService = new TsingtaoDataResourceService();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TSINGTAO_XHA: { // 青岛西海岸
|
||||||
|
abstractDataResourceService = new TsingtaoXHADataResourceService(tsingtao_xhaProperties);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case UNKNOWN: { // 未知区域
|
||||||
|
logger.error("区域未知");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return Optional.ofNullable(abstractDataResourceService);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
package io.renren.modules.resource.dataResource.domain;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.renren.common.utils.SpringContextUtils;
|
||||||
|
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
|
||||||
|
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.HttpEntity;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 青岛市局数据资源
|
||||||
|
*/
|
||||||
|
public class TsingtaoDataResourceService extends AbstractDataResourceService {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(TsingtaoDataResourceService.class);
|
||||||
|
|
||||||
|
private static RestTemplate restTemplate;
|
||||||
|
|
||||||
|
static {
|
||||||
|
TsingtaoDataResourceService.restTemplate = SpringContextUtils.getBean(RestTemplate.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getDataResource(GetDataResourceListDto dto) {
|
||||||
|
|
||||||
|
Integer page = dto.getPageNum();
|
||||||
|
Integer size = dto.getPageSize();
|
||||||
|
String pxcol = dto.getOrderField();
|
||||||
|
String order = dto.getOrderType();
|
||||||
|
String zyname = dto.getServiceName();
|
||||||
|
|
||||||
|
if (page == null) page = 1;
|
||||||
|
if (size == null) size = 10;
|
||||||
|
if (pxcol == null) pxcol = "fbrq";
|
||||||
|
if (order == null) order = "desc";
|
||||||
|
|
||||||
|
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
|
||||||
|
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
||||||
|
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
|
||||||
|
" <soap:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
|
||||||
|
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n",page, size) +
|
||||||
|
String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n",pxcol, order);
|
||||||
|
// if (bmname != null){
|
||||||
|
// parame = parame + String.format("<bmname>%s</bmname>",bmname);
|
||||||
|
// }
|
||||||
|
if (zyname != null) {
|
||||||
|
parame = parame + String.format("<zyname>%s</zyname>",zyname);
|
||||||
|
}
|
||||||
|
parame = parame + "</ZWCJ_mainPort></soap:Body></soap:Envelope>";
|
||||||
|
HttpHeaders requestHeaders = new HttpHeaders();
|
||||||
|
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
|
||||||
|
requestHeaders.setContentType(new MediaType("text","xml", Charset.forName("utf-8")));
|
||||||
|
HttpEntity<String> requestEntity = new HttpEntity(parame, requestHeaders);
|
||||||
|
try {
|
||||||
|
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
|
||||||
|
String startTag = "<ZWCJ_mainPortResult>";
|
||||||
|
String endTag = "</ZWCJ_mainPortResult>";
|
||||||
|
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
|
||||||
|
HashMap result = JSONObject.parseObject(json, HashMap.class);
|
||||||
|
|
||||||
|
List<Map> rows = (List<Map>) result.get("data");
|
||||||
|
List<Object> objects = rows.stream()
|
||||||
|
.filter(item -> item.get("main") != null)
|
||||||
|
.map(item -> item.get("main"))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
result.put("data", objects);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package io.renren.modules.resource.dataResource.domain;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.renren.common.domain.Tsingtao_xhaProperties;
|
||||||
|
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
|
||||||
|
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 青岛西海岸数据资源
|
||||||
|
*/
|
||||||
|
public class TsingtaoXHADataResourceService extends AbstractDataResourceService {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(TsingtaoXHADataResourceService.class);
|
||||||
|
Tsingtao_xhaProperties tsingtao_xhaProperties;
|
||||||
|
|
||||||
|
public TsingtaoXHADataResourceService(Tsingtao_xhaProperties tsingtao_xhaProperties) {
|
||||||
|
this.tsingtao_xhaProperties = tsingtao_xhaProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getDataResource(GetDataResourceListDto dto){
|
||||||
|
JSONObject result = null;
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
Request request = new Request.Builder().url(String.format(tsingtao_xhaProperties.getSjzy(),
|
||||||
|
dto.getServiceName(), dto.getOrderField(), dto.getOrderType(), dto.getPageNum(), dto.getPageSize())).build();
|
||||||
|
try (Response response = client.newCall(request).execute()) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||||
|
if (jsonObject.containsKey("data")) {
|
||||||
|
result = jsonObject.getJSONObject("data");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.error("西海岸数据资源列表获取失败");
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
logger.error("西海岸数据资源列表获取失败", exception);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package io.renren.modules.resource.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据资源查询参数对象
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GetDataResourceListDto {
|
||||||
|
|
||||||
|
//名称,模糊查询
|
||||||
|
private String serviceName;
|
||||||
|
//排序字段
|
||||||
|
private String orderField;
|
||||||
|
//排序方式:desc,asc
|
||||||
|
private String orderType;
|
||||||
|
//分页页数
|
||||||
|
private Integer pageNum;
|
||||||
|
//分页大小
|
||||||
|
private Integer pageSize;
|
||||||
|
}
|
|
@ -338,7 +338,7 @@ public class ResourceExcelImportListener extends AnalysisEventListener<Map<Integ
|
||||||
|
|
||||||
AttrEntity attrEntity = new AttrEntity();
|
AttrEntity attrEntity = new AttrEntity();
|
||||||
attrEntity.setAttrType("文件类型");
|
attrEntity.setAttrType("文件类型");
|
||||||
attrEntity.setAttrValue(date.get(6));
|
attrEntity.setAttrValue(date.get(5));
|
||||||
|
|
||||||
infoList.add(attrEntity);
|
infoList.add(attrEntity);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.renren.common.constant.Constant;
|
||||||
|
import io.renren.common.domain.Tsingtao_xhaProperties;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.modules.resource.dao.AttrDao;
|
import io.renren.modules.resource.dao.AttrDao;
|
||||||
import io.renren.modules.resource.dao.ResourceDao;
|
import io.renren.modules.resource.dao.ResourceDao;
|
||||||
|
@ -38,6 +40,8 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -113,6 +117,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
@Autowired
|
@Autowired
|
||||||
private JdbcTemplate jdbcTemplate;
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Tsingtao_xhaProperties tsingtao_xhaProperties;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
||||||
QueryWrapper<ResourceEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<ResourceEntity> wrapper = new QueryWrapper<>();
|
||||||
|
@ -221,6 +228,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
String orderField = StringUtils.isBlank(jsonObject.getString("orderField")) ? "total" : jsonObject.getString("orderField");
|
String orderField = StringUtils.isBlank(jsonObject.getString("orderField")) ? "total" : jsonObject.getString("orderField");
|
||||||
String orderType = StringUtils.isBlank(jsonObject.getString("orderType")) ? "DESC" : jsonObject.getString("orderType");
|
String orderType = StringUtils.isBlank(jsonObject.getString("orderType")) ? "DESC" : jsonObject.getString("orderType");
|
||||||
Page<ResourceDTO> resultPage = new Page<>(pageNum, pageSize);
|
Page<ResourceDTO> resultPage = new Page<>(pageNum, pageSize);
|
||||||
|
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||||
|
case TSINGTAO:
|
||||||
|
case BAOTOU: { // 包头、青岛
|
||||||
|
logger.info("包头、青岛");
|
||||||
if (resourceDTO.getInfoList().isEmpty()) {
|
if (resourceDTO.getInfoList().isEmpty()) {
|
||||||
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
|
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
|
||||||
resultPage.setRecords(resourceDTOS);
|
resultPage.setRecords(resourceDTOS);
|
||||||
|
@ -240,6 +251,120 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
resultPage.setTotal(resourceDTOS.size());
|
resultPage.setTotal(resourceDTOS.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TSINGTAO_XHA: {
|
||||||
|
if ("基础设施".equals(resourceDTO.getType())) { // 基础设施
|
||||||
|
logger.info("西海岸基础设施");
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
CompletableFuture cloud =
|
||||||
|
CompletableFuture.runAsync(() -> { // 云脑专网
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
String url = String.format(tsingtao_xhaProperties.getCloudcam(), resourceDTO.getName(), pageNum, pageSize);
|
||||||
|
logger.info(url);
|
||||||
|
Request request = new Request.Builder().url(url).build();
|
||||||
|
try (Response response = client.newCall(request).execute()) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
|
||||||
|
if (jsonObject_.containsKey("data")) {
|
||||||
|
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
||||||
|
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
||||||
|
resultPage.setRecords(jsonObject_.getJSONObject("data").getJSONArray("list").stream().map(index -> (JSONObject) JSON.toJSON(index))
|
||||||
|
.map(index -> {
|
||||||
|
ResourceDTO resourceDTO1 = new ResourceDTO();
|
||||||
|
resourceDTO1.setId(Long.valueOf(index.getString("id")));
|
||||||
|
resourceDTO1.setDelFlag(index.getIntValue("delFlag"));
|
||||||
|
resourceDTO1.setLink(index.getString("cameraIndexCode"));
|
||||||
|
resourceDTO1.setName(index.getString("name"));
|
||||||
|
resourceDTO1.setType("基础设施");
|
||||||
|
try {
|
||||||
|
resourceDTO1.setCreateDate(sdf.parse(index.getString("createdTime")));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
logger.error("时间异常");
|
||||||
|
resourceDTO1.setCreateDate(new Date());
|
||||||
|
}
|
||||||
|
return resourceDTO1;
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
resultPage.setRecords(null);
|
||||||
|
resultPage.setTotal(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.error("获取失败");
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
logger.error("失败", exception);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
CompletableFuture local =
|
||||||
|
CompletableFuture.runAsync(() -> { // 金宏网
|
||||||
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
String url = String.format(tsingtao_xhaProperties.getLocalcam(), resourceDTO.getName(), pageNum, pageSize);
|
||||||
|
logger.info(url);
|
||||||
|
Request request = new Request.Builder().url(url).build();
|
||||||
|
try (Response response = client.newCall(request).execute()) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
|
||||||
|
if (jsonObject_.containsKey("data")) {
|
||||||
|
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
||||||
|
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
||||||
|
resultPage.setRecords(jsonObject_.getJSONObject("data").getJSONArray("list").stream().map(index -> (JSONObject) JSON.toJSON(index))
|
||||||
|
.map(index -> {
|
||||||
|
ResourceDTO resourceDTO1 = new ResourceDTO();
|
||||||
|
resourceDTO1.setId(Long.valueOf(index.getString("id")));
|
||||||
|
resourceDTO1.setDelFlag(index.getIntValue("delFlag"));
|
||||||
|
resourceDTO1.setLink(index.getString("cameraIndexCode"));
|
||||||
|
resourceDTO1.setName(index.getString("name"));
|
||||||
|
resourceDTO1.setType("基础设施");
|
||||||
|
try {
|
||||||
|
resourceDTO1.setCreateDate(sdf.parse(index.getString("createdTime")));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
logger.error("时间异常");
|
||||||
|
resourceDTO1.setCreateDate(new Date());
|
||||||
|
}
|
||||||
|
return resourceDTO1;
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
resultPage.setRecords(null);
|
||||||
|
resultPage.setTotal(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.error("获取失败");
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
logger.error("失败", exception);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
CompletableFuture.allOf(cloud, local);
|
||||||
|
} else {
|
||||||
|
logger.info("西海岸基普通");
|
||||||
|
if (resourceDTO.getInfoList().isEmpty()) {
|
||||||
|
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
|
||||||
|
resultPage.setRecords(resourceDTOS);
|
||||||
|
resultPage.setTotal(resourceDao.selectDTOPage(resourceDTO, 0, 100000, orderField, orderType).size());
|
||||||
|
} else {
|
||||||
|
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
|
||||||
|
int j = Math.min(pageNum * pageSize, resourceDTOS.size());
|
||||||
|
if (resourceDTOS.isEmpty()) {
|
||||||
|
resultPage.setRecords(null);
|
||||||
|
resultPage.setTotal(0);
|
||||||
|
} else {
|
||||||
|
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
|
||||||
|
for (int i = (pageNum - 1) * pageSize; i < j; i++) {
|
||||||
|
recordLists.add(resourceDTOS.get(i));
|
||||||
|
}
|
||||||
|
resultPage.setRecords(recordLists);
|
||||||
|
resultPage.setTotal(resourceDTOS.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,6 +515,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
HashMap<Object, Object> areaMap = new HashMap<>();
|
HashMap<Object, Object> areaMap = new HashMap<>();
|
||||||
areaMap.put("type", "区级");
|
areaMap.put("type", "区级");
|
||||||
Integer integer = resourceDao.selectTypeCountByDept("区级", jsonObject.getString("type"));
|
Integer integer = resourceDao.selectTypeCountByDept("区级", jsonObject.getString("type"));
|
||||||
|
if (null == integer) {
|
||||||
|
integer = 0;
|
||||||
|
}
|
||||||
areaMap.put("total", integer);
|
areaMap.put("total", integer);
|
||||||
ArrayList<Map> areaListTemp = new ArrayList<>();
|
ArrayList<Map> areaListTemp = new ArrayList<>();
|
||||||
areaTypeList.orElse(new HashMap<>()).forEach((key, value) -> {
|
areaTypeList.orElse(new HashMap<>()).forEach((key, value) -> {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.modules.resource.videoPreview;
|
package io.renren.modules.resource.videoPreview;
|
||||||
|
|
||||||
|
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
import io.renren.common.domain.BaoTouProperties;
|
import io.renren.common.domain.BaoTouProperties;
|
||||||
import io.renren.common.domain.TsingtaoProperties;
|
import io.renren.common.domain.TsingtaoProperties;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
import io.renren.common.validator.group.DefaultGroup;
|
import io.renren.common.validator.group.DefaultGroup;
|
||||||
import io.renren.common.validator.group.UpdateGroup;
|
import io.renren.common.validator.group.UpdateGroup;
|
||||||
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
import io.renren.modules.resourceBrowse.dto.ResourceBrowseDTO;
|
import io.renren.modules.resourceBrowse.dto.ResourceBrowseDTO;
|
||||||
import io.renren.modules.resourceBrowse.excel.ResourceBrowseExcel;
|
import io.renren.modules.resourceBrowse.excel.ResourceBrowseExcel;
|
||||||
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
|
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
|
||||||
|
@ -38,6 +39,8 @@ import java.util.Map;
|
||||||
public class ResourceBrowseController {
|
public class ResourceBrowseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResourceBrowseService resourceBrowseService;
|
private ResourceBrowseService resourceBrowseService;
|
||||||
|
@Autowired
|
||||||
|
private ResourceService resourceService;
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
|
@ -45,12 +48,12 @@ public class ResourceBrowseController {
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
|
||||||
})
|
})
|
||||||
//@RequiresPermissions("resourceBrowse:resourcebrowse:page")
|
//@RequiresPermissions("resourceBrowse:resourcebrowse:page")
|
||||||
public Result<PageData<ResourceBrowseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<ResourceBrowseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||||
PageData<ResourceBrowseDTO> page = resourceBrowseService.page(params);
|
PageData<ResourceBrowseDTO> page = resourceBrowseService.page(params);
|
||||||
|
page.getList().forEach(item -> item.setResourceDTO(resourceService.get(item.getResourceId())));
|
||||||
return new Result<PageData<ResourceBrowseDTO>>().ok(page);
|
return new Result<PageData<ResourceBrowseDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.renren.modules.resourceBrowse.dto;
|
package io.renren.modules.resourceBrowse.dto;
|
||||||
|
|
||||||
|
import io.renren.modules.resource.dto.ResourceDTO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -41,4 +42,9 @@ public class ResourceBrowseDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "备用字段3")
|
@ApiModelProperty(value = "备用字段3")
|
||||||
private String note3;
|
private String note3;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "能力信息")
|
||||||
|
private ResourceDTO resourceDTO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -25,6 +25,7 @@ public class ResourceBrowseServiceImpl extends CrudServiceImpl<ResourceBrowseDao
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResourceBrowseDao resourceBrowseDao;
|
private ResourceBrowseDao resourceBrowseDao;
|
||||||
|
|
||||||
@Value("${system.startDay}")
|
@Value("${system.startDay}")
|
||||||
private String systemDay;
|
private String systemDay;
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ spring:
|
||||||
wall:
|
wall:
|
||||||
config:
|
config:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
|
flyway:
|
||||||
|
enabled: false
|
||||||
#上传的静态资源配置
|
#上传的静态资源配置
|
||||||
resource:
|
resource:
|
||||||
root_url: 15.2.21.238
|
root_url: 15.2.21.238
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
project:
|
project:
|
||||||
# 平台部署位置 0:青岛市区 1:青岛西海岸 2:包头
|
# 平台部署位置 0:青岛市区 1:青岛西海岸 2:包头
|
||||||
place: 0
|
place: 0
|
||||||
|
# 是否将资源归为上级
|
||||||
|
higher: false
|
||||||
# 大数据部门相关配置
|
# 大数据部门相关配置
|
||||||
big_date:
|
big_date:
|
||||||
name: 青岛市大数据发展管理局
|
name: 青岛市大数据发展管理局
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<include>*.properties</include>
|
<include>*.properties</include>
|
||||||
<include>*.json</include>
|
<include>*.json</include>
|
||||||
<include>db/*.sql</include>
|
<include>db/*.sql</include>
|
||||||
|
<include>domain/**</include>
|
||||||
</includes>
|
</includes>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>application-prod.yml</exclude>
|
<exclude>application-prod.yml</exclude>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
UPDATE sys_notice SET `from` = '评论' WHERE title LIKE '需求%';
|
||||||
|
UPDATE sys_notice SET `from` = '通知' WHERE title LIKE '流程%';
|
||||||
|
UPDATE sys_notice SET `from` = '其他' WHERE title IS NULL;
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE `sys_user` ADD COLUMN `guid` varchar(100) NULL;
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE `sys_notice` ADD COLUMN `from` varchar(255) NULL COMMENT '通知来源';
|
|
@ -1,6 +1,7 @@
|
||||||
tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
||||||
tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
|
||||||
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=&pageNo=1&pageSize=10
|
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
||||||
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=&pageNo=1&pageSize=10
|
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
|
||||||
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
|
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
|
||||||
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
|
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
|
||||||
|
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43
|
||||||
|
|
|
@ -11,11 +11,15 @@
|
||||||
|
|
||||||
<!-- 获取我的通知列表 -->
|
<!-- 获取我的通知列表 -->
|
||||||
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
||||||
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content from sys_notice_user t1, sys_notice t2
|
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from` from
|
||||||
|
sys_notice_user t1, sys_notice t2
|
||||||
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
|
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
|
||||||
<if test="readStatus != null">
|
<if test="readStatus != null">
|
||||||
AND read_status = #{readStatus}
|
AND read_status = #{readStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="from != null">
|
||||||
|
AND `from` = #{from}
|
||||||
|
</if>
|
||||||
order by t2.create_date desc
|
order by t2.create_date desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -215,6 +215,11 @@ public interface Constant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目部署地点
|
||||||
|
*/
|
||||||
|
String PROJECT_PLACE = "PROJECT_PLACE";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目运行地点
|
* 项目运行地点
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue